Final velocity of a rocket launching to space

Click For Summary

Discussion Overview

The discussion revolves around the optimal thrust-to-weight ratio (TWR) for rockets in the context of the video game "Kerbal Space Program." Participants explore the mathematical modeling of rocket motion, specifically focusing on a differential equation that describes the rocket's acceleration and velocity as it ascends through varying gravitational conditions. The conversation includes considerations of fuel dynamics, momentum conservation, and numerical solutions for complex scenarios.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Participants discuss the need to solve a differential equation related to rocket motion, specifically the equation involving gravitational force and thrust.
  • Some participants propose that assumptions could be made about the thrust being a function of the fuel flow rate, suggesting a potential simplification of the problem.
  • There is acknowledgment that the differential equation may not be solvable in terms of position, but a solution for velocity is sought.
  • One participant mentions the importance of considering conservation of momentum in addition to force balance, providing a detailed breakdown of momentum changes during rocket ascent.
  • Another participant expresses a preference for numerical solutions due to the complexity of the in-game model, particularly regarding the fuel flow rate's dependence on atmospheric pressure.
  • Concerns are raised about the inclusion of drag in the model, which varies with height and adds complexity to the calculations.
  • Participants discuss the use of MATLAB for numerical simulations and the challenges of finding optimal solutions for TWR to maximize delta-v.
  • There is a suggestion to empirically identify parameters through design experiments to inform the modeling process.

Areas of Agreement / Disagreement

Participants express various viewpoints on how to approach the problem, with some advocating for analytical methods while others lean towards numerical solutions. There is no consensus on the best method to solve the differential equation or the optimal approach to modeling the rocket's ascent.

Contextual Notes

Limitations include the complexity of the differential equation, the dependence of fuel flow rate on atmospheric pressure, and the unresolved effects of drag on the rocket's motion. The discussion also reflects the challenges of modeling in a gaming environment, where parameters may differ from real-world physics.

Who May Find This Useful

This discussion may be useful for game developers, physics enthusiasts, and students interested in rocket dynamics, numerical methods, and the application of physics in gaming simulations.

ellipsis
Messages
158
Reaction score
24
Background
This is for a video game, "Kerbal Space Program"... I'm sure some of you here have heard of it. It's the type of game you guys would be interested in.

I have built a program to design rockets, but I'm not sure what the optimal thrust-to-weight ratio is. That is, how much fuel I should tack on before the cost of getting it into space exceeds the benefit of having more fuel. I've already figured out how to analytically find the optimal TWR given an environment of constant -9.81 m/s^2 gravity, but... gravity changes via the inverse square law.

Question
I need to solve the following differential equation for ## \frac{dx}{dt} ##. I can solve either one of the two RHS components separately, but not both of them at once.
$$
\frac{d^2x}{dt^2} = \frac{-S}{x^2}+\frac{F_T}{m_i-\dot{m}t}
$$

S, F_T, m_i, and m_dot are constants relating to the specifications of the rocket. All of them are positive.
 
Physics news on Phys.org
ellipsis said:
Background
This is for a video game, "Kerbal Space Program"... I'm sure some of you here have heard of it. It's the type of game you guys would be interested in.

I have built a program to design rockets, but I'm not sure what the optimal thrust-to-weight ratio is. That is, how much fuel I should tack on before the cost of getting it into space exceeds the benefit of having more fuel. I've already figured out how to analytically find the optimal TWR given an environment of constant -9.81 m/s^2 gravity, but... gravity changes via the inverse square law.

Question
I need to solve the following differential equation for ## \frac{dx}{dt} ##. I can solve either one of the two RHS components separately, but not both of them at once.
$$
\frac{d^2x}{dt^2} = \frac{-S}{x^2}+\frac{F_T}{m_i-\dot{m}t}
$$

S, F_T, m_i, and m_dot are constants relating to the specifications of the rocket. All of them are positive.

Is there a reason you can't make assumptions for the one of the terms on the right hand side? For one, it wouldn't be unreasonable to assume F_T is a function of \dot{m}. But not sure if how you laid it out is just how you wanted to approach the problem.
 
dawin said:
Is there a reason you can't make assumptions for the one of the terms on the right hand side? For one, it wouldn't be unreasonable to assume F_T is a function of \dot{m}. But not sure if how you laid it out is just how you wanted to approach the problem.

That sounds like a reasonable assumption, but I don't know how I would formalize that. I know that this DE is unsolvable in terms of x. But I only want an equation for the velocity at a given point... the derivative of x, really. When I try to get MATLAB to symbolically solve it, it tries to completely solve it and fails. Is there a way to convince MATLAB to only partially solve it?
 
ellipsis said:
That sounds like a reasonable assumption, but I don't know how I would formalize that. I know that this DE is unsolvable in terms of x. But I only want an equation for the velocity at a given point... the derivative of x, really. When I try to get MATLAB to symbolically solve it, it tries to completely solve it and fails. Is there a way to convince MATLAB to only partially solve it?

Well it looks like you have just the force balance there. Have you considered looking at conservation of momentum too?

You have an \dot{m} term in there... if the "rocket" starts out with mass m, and loses a bit of propellant going in the opposite direction (staying consistent with your model's 1-Dness) then the momentum of that system is:
<br /> (m-dm)(v+dv) + dm(v-v_p) = mv + mdv - vdm - dmdv + vdm - v_pdm<br /> \\ = mv + mdv - v_pdm<br />
where v_p is just the velocity of the propellant (you can define this with blanket rocket parameters I would think, big hole low velocity, little hole higher velocity). So the change in momentum is:
<br /> dp = mdv - v_pdm<br />
Using your force balance equation, you know the total forces on the system are just:
<br /> \sum{F} = -S/x^2 + F_T<br />
The change in momentum can be equated to the impulse imparted by these two forces:
<br /> Fdt = (\frac{-S}{x^2} + F_T)dt = mdv - v_pdm; dm = \dot{m}dt<br /> \\(\frac{-S}{x^2} + F_T + v_p\dot{m})dt = mdv<br /> \\\frac{\frac{-S}{x^2} + F_T + v_p\dot{m}}{m}dt = dv<br />
Doesn't seem crazy to define F_T, \dot{m}, v_p (assuming you have knowledge of propellant & nozzle parameters in your model). This help at all? Not sure if it's right but eh...

edit: seriously struggling with , don&#039;t mind me.
 
Last edited:
Dawin, thanks for the reply. I learned how to apply momentum and kinetic/potential energy in lower-division physics, but that was never my first vector of attack because it always involves so many variables and terms. I suspect the problem of final velocity (when the fuel runs out) is solvable by kinetic/potential analysis if you neglect drag (on the moon, for example).

I've mostly resigned myself to a numerical solution now, since I've discovered the in-game model is even _more_ complex than I thought. The fuel flow rate (m_dot) decreases linearly with respect to atmospheric pressure (i.e. height). This means as the rocket gets higher, it will expend less fuel per second.

I've got a working one, but I'm not sure how to efficiently find the optimal solution. That is, all of my rocket parameters are constant /except/ for the thrust-to-weight ratio. To find the thrust-to-weight ratio that ends up giving me the highest delta-v, must I just continually run ode45? I'm doing it in MATLAB at the moment. Oh yeah, I didn't even include drag in the above equation. It varies with respect to height as well.

I'm mathematically emulating the physics engine so I can shoot off a thousands rockets a second and see which one is best. My subgoal right now is to predict the outcomes of launches really well in advance, using a numerical solution to this DE.

If I want to make it 2d, I'll have to read up on vector calculus and rocket ascent profiles. The question "How much fuel will this craft have after it reaches a 100km orbit" is both alluring and practical.
 
ellipsis said:
Dawin, thanks for the reply. I learned how to apply momentum and kinetic/potential energy in lower-division physics, but that was never my first vector of attack because it always involves so many variables and terms. I suspect the problem of final velocity (when the fuel runs out) is solvable by kinetic/potential analysis if you neglect drag (on the moon, for example).

I've mostly resigned myself to a numerical solution now, since I've discovered the in-game model is even _more_ complex than I thought. The fuel flow rate (m_dot) decreases linearly with respect to atmospheric pressure (i.e. height). This means as the rocket gets higher, it will expend less fuel per second.

I've got a working one, but I'm not sure how to efficiently find the optimal solution. That is, all of my rocket parameters are constant /except/ for the thrust-to-weight ratio. To find the thrust-to-weight ratio that ends up giving me the highest delta-v, must I just continually run ode45? I'm doing it in MATLAB at the moment. Oh yeah, I didn't even include drag in the above equation. It varies with respect to height as well.

I'm mathematically emulating the physics engine so I can shoot off a thousands rockets a second and see which one is best. My subgoal right now is to predict the outcomes of launches really well in advance, using a numerical solution to this DE.

If I want to make it 2d, I'll have to read up on vector calculus and rocket ascent profiles. The question "How much fuel will this craft have after it reaches a 100km orbit" is both alluring and practical.

I've never played the game, so I can't really speak to how it works out. Where did you see the physics engine?

Why not identify some parameters and come up with an empirical solution from some mini design of experiments!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 42 ·
2
Replies
42
Views
6K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
57
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
3
Views
2K
  • · Replies 22 ·
Replies
22
Views
3K