F=ma ODE solving matlab

4 visualizzazioni (ultimi 30 giorni)
Abdullaziz Errayes
Abdullaziz Errayes il 8 Mag 2018
I need to Write a function into which you pass the end time and time step size that returns the time and speed arrays for the following problem. A car initially at rest, speed equals 0.0 m/s, is accelerated along a runway located at sea level. The mass of the car is 1000 kg, the coefficient of drag is 0.5 and the front area of the car is 2.0 m2 . The thrust, in Newtons, provided by the engines is given by the following equation T=10000*t t<1, T=10000 1<=y<=50, T=0 t>50. Small t is time and big T is thrust and the friction is between car and runway is 200N the ODE is F=ma how do i go about doing this question?

Risposta accettata

Kurtis McIntosh
Kurtis McIntosh il 8 Mag 2018
Modificato: Kurtis McIntosh il 8 Mag 2018
m = 1000
F = T - D
(T-D)/1000 = a
V = a*dt
T - cd*rho*V^2*A = 1000*dV/dt
1000*dV/dt + cd*rho*V^2*A - T = 0
The very end is your ODE where T will be a cell array characterized by your set of equations for thrust vs time. I assume you know how to do that. Once you have everything set up, you can have your pick from a number of different ODE solvers within MATLAB or you can program your own using Euler's method since this is a first order ODE.
  2 Commenti
Abdullaziz Errayes
Abdullaziz Errayes il 8 Mag 2018
thank you very much, however because i am a transfer from a different course i have little to no experience with the programming language so this is all new to me and i am quite lost haha
Kurtis McIntosh
Kurtis McIntosh il 8 Mag 2018
I would just use the euler method. Here is a link to a step-by-step guide on how to implement it where you know your function. Euler Method - MATLAB

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by