Why does my rocket velocity simulation flatten out instead of accelerating?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 3K views
aaaa202
Messages
1,144
Reaction score
2
Did a question about this a few weeks ago, but I thought I might do another, as I don't quite get, what is going on.
The relationship:
v=vex * log(m0/m(t))
tells us that a rocket will attain greater and greater acceleration as time goes. However, when I try to simulate this in Matlab I get the curve attached (time versus velocity). Anyone got an idea, what could be wrong? It looks similar to that of a ln-curve, but shouldn't it look differently. If someone is into Matlab programming, can they please look at what I've failed in my (short!) script (attached).
 

Attachments

  • Unavngivet.png
    Unavngivet.png
    2.3 KB · Views: 542
  • raketprojekt.m
    raketprojekt.m
    391 bytes · Views: 474
Physics news on Phys.org
If you want something to compare with you can look at plot of the normalized rocket equation on WolframAlpha: http://www.wolframalpha.com/input/?i=plot+-ln(1-x)+from+0+to+1 where x-axis is the mass ratio (relative to initial mass) spend as fuel and y-axis is the change in velocity relative in unit of the exhaust speed.
 
aaaa202: Typically the independent variable (time in this case) is on the horizontal axis and the dependent variable (velocity in this case) is on the vertical axis. You are plotting time on the vertical axis, velocity on the horizontal.

Switch the arguments to the plot function and all will be well.
 
OMG! I can't believe that solved it! Thank you so much!