# Modeling a rocket using Tsiolkovsky's equation and ordinary differential equations

So I have this uni assignment to make a model out of ODEs, and my idea was to use rockets. After some research I found about Tsiolkovsky's equation and tried using it on a Falcon 9 (disconsidering gravity and drag for now). However, my calculations always return a speed smaller than the real one, which means the gravity/drag thing isn't the problem. For reference, I'm using this for data (the Falcon 9 v1.1 bit, page 9), which gives me, at first stage separation: $$\Delta v = 282\times9.81\times ln(\frac{439+78+6}{28+78+6})\rightarrow4383m/s$$ Which is nowhere near the speed the rocket has here near the stage separation. I know the first stage mass isn't dry by the end, but considering that, the results would be even farther. I've also considered the dragon shuttle's mass.

What I would like to know is if my mistake is in the model I'm using or the data. All help is welcome.

• The video has it at 6995 km/h, that's 1943m/s. By the time of staging, the rocket has been "hanging" in gravity for 159 seconds. That's about 1560m/s of gravity loss right there. So 3503m/s of your calculated 4383m/s accounted for, and we haven't even begun to look at air drag. Your calc(as far as it goes) is quite correct. Jul 24 at 20:31
• You may enjoy some of the simulations at [flightclub.io](). You can also read about them in questions and answers here that mention it. By the way, it's easier to model reentry by starting with a circular trajectory and simply lowering the speed by only about 100 m/s.
– uhoh
Jul 24 at 23:44
• Once you get that to work, you can start the much more difficult task of modeling launch to orbit, where you have to lean over and slowly change your thrust from vertical to horizontal.
– uhoh
Jul 24 at 23:44

Which is nowhere near the speed the rocket has here near the stage separation.

The video is reporting velocity in km/hour, not in m/s. 4383 m/s is 15780 km/hour -- over twice as fast as the Falcon 9 is moving at stage separation.

In general, the rocket equation isn't going to give you directly usable results for the initial ascent phase of a rocket. Drag varies with velocity and air density (dependent on altitude); the flight path of the rocket is continuously changing, so the effect of gravity on velocity isn't straightforward, etc.

I would like to thank everyone for the immense help, and inform that I've found a study on modeling rockets using the forces involved:

https://pages.vassar.edu/magnes/2019/05/12/computational-simulation-of-rocket-trajectories/

It works like a charm, but for some reason I still don't understand it gives out half the actual speed and half the actual altitude for the Falcon 9 (I compared the model to the CRS 10 launch). And yes, I changed the rocket parameters in the code (it's originally the Falcon 1). If I multiply the end result by 2, it ends up with a quite accurate prediction, which is amazing (less than 5% error up to the end). Also, it accounts for Max Q, (but not for multiple stages (that's only a matter of adding some lines of code I guess)).

Thanks to you guys now I actually understand what my mistake was (unit conversion) and what Tsiolkovsky's equation is about (an ideal estimate of the maximum speed a rocket can achieve with given mass of propelant).

As for the new model (using the forces instead of Tsiolkovsky's equation), I got to a ODE as intended and it is quite... big. I'll probably stick to using the computer.

Thanks again!

• It sounds like the linked model assumes constant thrust which is quite a bad assumption for such a detailed model. It actually increases quite a bit. See the linked questions and answers. space.stackexchange.com/questions/46521/… space.stackexchange.com/questions/43844/… Jul 25 at 20:17
• I see. However, the model considers the first stage only, and I imagine the sea level engines are not used in vacuum (hence their thrust is "constant"). Jul 27 at 1:56
• Check the graphs in the linked answers. Jul 27 at 2:07
• Oh now I see it. Sorry for not reading past the question (I was kind of in a hurry because of university, but my mistake anyway). That does raise an interesting point, and I look foward to implementing that as to perfect the code. Thanks a lot! Jul 28 at 3:22