Jump to content

Optimal drag is g dependent?


Recommended Posts

So I was going through the KSP wiki article on atmospheres, which is a mess, and it states that the terminal velocity of a falling object at x altitude = the velocity to match at x altitude during launch.

For that to be true the vehicle must be accelerating at g.

Why is it a given that a rocket should accelerate at local g?

Given some confusion, my actual question is: Why should drag be g dependent in an optimal assent?

Edited by Superluminaut
Link to comment
Share on other sites

I think you might be a bit confused

Basically, terminal velocity is when atmospheric drag creates the same deceleration as gravity does. Before you reach terminal velocity, your acceleration doesn't matter much. But once you reach it, in KSP it' preferable not to go faster than it. So if you want to not cross terminal velocity, you have to accelerate at the same speed the air drag decelerates you, and as mentioned above, at terminal velocity, drag slows you at the same rate as g, so to cancel it out, you have to accelerate at g. And that's why when you follow terminal velocity you should accelerate at g :)

Link to comment
Share on other sites

Your acceleration isn't g if you're perfectly following terminal velocity. It will be the slope of terminal velocity with respect to altitude (in meters per second per meter) times your vertical speed (in meters per second). Terminal velocity increases as you ascend, so that net acceleration is a small positive value, and the total thrust you have to apply is equal to weight plus drag force plus (mass times acceleration). Weight and drag force are equal at terminal velocity, so this ends up translating to a TWR slightly higher than 2.

In practice your TWR increases as you burn off fuel so unless you want to be throttling down constantly it's a good idea to shoot for somewhat lower than 2 TWR at the start of the first few stages.

Edited by tavert
Link to comment
Share on other sites

Your acceleration isn't g if you're perfectly following terminal velocity. It will be the slope of terminal velocity with respect to altitude (in meters per second per meter) times your vertical speed (in meters per second). Terminal velocity increases as you ascend, so that net acceleration is a small positive value, and the total thrust you have to apply is equal to weight plus drag force plus (mass times acceleration). Weight and drag force are equal at terminal velocity, so this ends up translating to a TWR slightly higher than 2.

In practice your TWR increases as you burn off fuel so unless you want to be throttling down constantly it's a good idea to shoot for somewhat lower than 2 TWR at the start of the first few stages.

Good point, I see now that my question is not stated properly. What I'm actually after is why drag force should be g dependent. Or, why should (drag force) = (weight force)?

Link to comment
Share on other sites

Good point, I see now that my question is not stated properly. What I'm actually after is why drag force should be g dependent. Or, why should (drag force) = (weight force)?

The drag force increase by the square if the speed is doubled. At some speed the drag force equals the gravity force and an falling object will not fall faster, at some point the forces will match up.

Now if the gravity is lighter the terminal speed is lower, same if the atmosphere is thicker and the atmosphere thickness is most important, terminal speed is lower on Eve than Duna even if Duna has far lower gravity.

Link to comment
Share on other sites

That's not actually true in real life - the fuel optimal ascent would vary greatly depending on several factors - the drag coefficient of the ship, the thrust-to-weight ratio, changes in specific impulse of the engine from altitude. To my knowledge about KSP, though, which you should take with a grain of salt, the game calculates drag under terminal velocity as relatively constant, then sharply increases the drag above terminal velocity. I believe, based on purely qualitative observations of how fast ships decelerate on reentry, that the drag increases quadratically after terminal velocity, which is accurate at subsonic speeds, though I can't back that up with quantitative data from the game.

Link to comment
Share on other sites

That's a better question. It's known as the Goddard problem, let's see how tough it is to actually work out.

First assume we're only talking about a vertical ascent. Once you start turning and trying to get into orbit the math gets more complicated. So for now, we want to maximize altitude for a given amount of fuel.

Let x = altitude, t = time, v = dx/dt = vertical speed, a = dv/dt = net acceleration, T = thrust

Drag in KSP is proportional to atmospheric density (rho) times craft mass (m) times velocity squared for some coefficient we'll call 0.5*c, so we have

m*dv/dt = T - m*g - 0.5*c*rho*m*v^2

For a single-stage rocket, mass decreases only due to expended propellant, at a rate proportional to the thrust. The constant of proportionality is the reciprocal of the effective exhaust velocity g0*Isp.

dm/dt = -T / (g0*Isp)

m*dv/dt + g0*Isp*dm/dt + m*g + 0.5*c*rho*m*v^2 = 0

The time derivative dv/dt can also be expressed as

dv/dt = (dv/dx)*(dx/dt) = (dv/dx)*v

We want to maximize altitude gain per unit of expended mass dx/dm, which is equivalent to (dx/dt)/(dm/dt) = v/(dm/dt).

dm/dt = -(m*(dv/dx)*v + m*g + 0.5*c*rho*m*v^2) / (g0*Isp)

v/(dm/dt) = -(g0*Isp*v) / (m*(dv/dx)*v + m*g + 0.5*c*rho*m*v^2)

This is a bit annoying to maximize, since we don't know how v varies with x yet! To make things easier, let's just see what the solution would be for the best velocity at the current altitude neglecting how that velocity changes with altitude. So we want to solve for v such that d(v/(dm/dt))/dv = 0, assuming for the moment that dv/dx = 0.

d(v/(dm/dt))/dv = -(g0*Isp) / (0 + m*g + 0.5*c*rho*m*v^2) + (c*rho*m*v*g0*Isp*v) / (0 + m*g + 0.5*c*rho*m*v^2)^2

0 = -g0*Isp*(m*g + 0.5*c*rho*m*v^2) + c*rho*m*g0*Isp*v^2

v^2 = g/(0.5*c*rho)

And we have the expected terminal velocity result. Let me play around in Mathematica a bit to see what happens when we calculate dv/dx as a function of v using this result as well as density and gravity varying with altitude, and see whether it's still optimal.

Edited by tavert
Link to comment
Share on other sites

So trying to express everything in terms of v is not a good idea, it leads to a mess of product-log functions and inconclusive results. There's an easier way, a little less hand-wavy than treating dv/dx as zero. Instead we assume it is nonzero, but treat it as a constant with respect to v when trying to determine the maximum of dx/dm = v/(dm/dt).

v/(dm/dt) = -(g0*Isp*v) / (m*(dv/dx)*v + m*g + 0.5*c*rho*m*v^2)

d(v/(dm/dt))/dv = -(g0*Isp) / (m*(dv/dx)*v + m*g + 0.5*c*rho*m*v^2) + (m*(dv/dx) + c*rho*m*v)*g0*Isp*v / (m*(dv/dx)*v + m*g + 0.5*c*rho*m*v^2)^2

0 = -g0*Isp*(m*(dv/dx)*v + m*g + 0.5*c*rho*m*v^2) + (m*(dv/dx) + c*rho*m*v)*g0*Isp*v

0 = -m*g + 0.5*c*rho*m*v^2

v^2 = g/(0.5*c*rho)

Link to comment
Share on other sites

That's a better question. It's known as the Goddard problem, let's see how tough it is to actually work out.

My math is seldomly used and rusty but I noted a few things.

m*dv/dt

If you use a changing mass can you really pull it out of Newtons equation like this?

Also, should this not be in an accelerating reference frame?

Link to comment
Share on other sites

If you use a changing mass can you really pull it out of Newtons equation like this?

Also, should this not be in an accelerating reference frame?

The issue with Newton's laws here is actually a pretty subtle one. Technically he applied it correctly by virtue of the fact that he included the thrust as T. Another way of looking at it is to consider the rocket as a variable mass system where the only forces applied to it are gravity and aerodynamic drag. The thrust force is kind of a fictitious force that arises due to the fact that the rocket is ejecting mass. So, the completely proper statement of Newton's second law that you're probably thinking of would go something like this:

dp/dt = -m g - 0.5 * àA Cd v |v| ( technically the form given above was only correct for positive velocities, v |v| gives v² but with a sign, so it also works if the rocket goes down, not a really relevant in this analysis but I figured I bring it up anyway)

It turns out that for a system that's ejecting mass at some velocity relative to its center of mass, Vr, we get this:

dp/dt = m dv/dt - Vr dm/dt

In the case of a rocket, Vr is the exhaust velocity and we define Vr dm/dt to be[/be] the thrust produced by the rocket. Putting the above equations together we get this:

m dv/dt - Vr dm/dt = -m g - 0.5 * ÃÂ A Cd v |v|

m dv/dt = Vr dm/dt - m g - 0.5 * àΑ Cd v |v|

In the equation by tavert the Vr dm/dt term has simply been called T for thrust.

I'm not sure what you mean by your question about accelerating reference frames. The reference frame chosen here is that of the ground, it is non-accelerating. It doesn't really matter what reference frame we pick, but picking an accelerating reference frame is usually pretty inconvenient. Inertial reference frames are much easier to deal with since the laws of physics are typically more naturally expressed in inertial frames.

Link to comment
Share on other sites

  • 2 weeks later...

Hi people, sorry about my long absence but I simply haven't been able to give this as much attention as I would like.

m dv/dt = Vr dm/dt - m g - 0.5 * àΑ Cd v |v|

In the equation by tavert the Vr dm/dt term has simply been called T for thrust.

Thank you for explaining. It makes sense now, I believe...

Math can be confusing.

To make things easier, let's just see what the solution would be for the best velocity at the current altitude neglecting how that velocity changes with altitude. So we want to solve for v such that d(v/(dm/dt))/dv = 0, assuming for the moment that dv/dx = 0.
There's an easier way, a little less hand-wavy than treating dv/dx as zero. Instead we assume it is nonzero, but treat it as a constant with respect to v when trying to determine the maximum of dx/dm = v/(dm/dt).

However I'm still not sure that turning dv/dx into a constant is the right idea. How can this result in anything useful?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...