How can I integrate an equation of acceleration vs position to position vs time.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
An uncontrolled automobile traveling at 45 mph strikes a highway crash barrier square on. After initially hitting the barrier, the automobile decelerates at a rate proportional to the distance x the automobile has moved into the barrier; specifically, a=(-60)*sqrt(x) where a is experess as ft/s^2 and x as ft. Develope the plots for position vs time, velocity vs time and acceleration vs time for a vehicle initallity traveling at 40 mph, 50 mph and 60 mph.
So far I set the (-60)*sqrt(x) to v*(dv/dx) then rearranged the equation to get vdv=(-60)*sqrt(x). Then I integrated the dv side from Vinitial to Vfinal and the dx from 0 to Xfinal to find velocity in terms of position. Vfinal=sqrt(-80x^(3/2)+(Vi^2)).
I then set Vfinal equal to dx/dt so that sqrt(-80*xfinal^(3/2)+(Vinital^2))=dx/dt --> dt=dx/sqrt(-80x^(3/2)+(Vi^2)). Then I need to integrate the dt side from 0 to Tfinal and dx from 0 to Xfinal but doing that in matlab is where I get stuck. Then I have no clue how I can use matlab to rearrange the equation so that its position in terms of time and not time in terms of position.
0 commentaires
Réponses (1)
Raghavendra Ragipani
le 6 Fév 2020
Hi,
You can simplify the equations as follows:
dv/dt = (-60)*sqrt(x)
dx/dt = v
with initial conditions t=0: x=0 and v=?
Integrate two dependent variables (x,v) using ode45.
You can take help from matlab help on ode45 for further instructions.
cheers,
raghav
0 commentaires
Voir également
Catégories
En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!