Jump to content

Calculating exponential growth in speed.


Super 6-1

Recommended Posts

As you go higher up in the atmosphere, the air becomes less dense. The more you burn, the lighter you ship gets as well. These are both constantly changing during a flight. Is there a way to calculate your exponential increase in speed as the mission goes on? To make it easier, lets just do a one stage rocket launching off of kerbin. This is probably still not enough info though.

Link to comment
Share on other sites

I do not know of a better way than a second by second calculation of the vehicle state, like launching the ship in the game for instance. There may be a better way but I don't know of a way to mathematically account for decreasing drag and mass with constant thrust over time with a single equation.

Link to comment
Share on other sites

Calculating the drag that the atmosphere induces is the tricky part, there are a lot of variables to consider, and to be honest I don’t know if the game even fully represents everything that occurs in real life. In the game, is turbulent flow around a rocket represented, or does it stay laminar, no matter what? What is the skin friction coefficient of various parts in the game? Is compressible flow represented and can shockwaves form at supersonic speed? I don’t know how detailed the physics calculations of the game are.

If you knew what exactly goes into the games drag calculations, you could determine your speed at any point in time by using basic differential calculus. You would need to know the rate of change in pressure, rate of change of mass, due to expended fuel . Both of these rates of change would be with respect to time. It would basically boil down to the most fundamental of physics equations:

F = m*a

In this event, F = Fr – Fd

Where Fr = force produced from the rocket engine (constant)

Fd = force created from drag (not a constant, function of the change in pressure).

m (mass) is also not a constant, it’s changing with time, as mentioned above. As acceleration is the second derivative of position with respect with time, you could rewrite the equation to look something like this:

Fr – d(Fd)/dt = [d(m)/dt]*a

Not by any means a simple calculation for an atmospheric world.

For a non atmospheric world it’s not as bad, I will demonstrate:

d(Fd)/dt goes to zero (which is by far the hardest to figure out), and I’ll rearrange the equation to this:

a = Fr/[d(m)/dt]

d(m)/dt again is mass changing with time, which when written as a function of time, could be represented as m0 - k*t, where k is a constant (0.1 ton/sec as an arbritrary example) and m0 is your original mass. So we have this:

a = Fr/(m0 - k*t)

Thanks to the handy dandy kinematic equations you learn is high school physics class, you don’t have to do any actual calculus here (don’t know if you know it or not… I might have already gone over your head). You may recognize this equation:

x = vi*t + 0.5*a*t^2

where x is your displacement (ie position or altitude)

Since vi (initial velocity) is zero, we can rewrite this as

a = 2*x/t^2

So we have

2*x/t^2 = Fr/(m0 - k*t)

Rewritten as:

x = Fr*t^2 / [2*(m0 – kt)]

And there you have it, an equation to represent your position with respect to time. Let’s plug in some numbers to try it out. Let’s assume your engine puts out Fr = 100,000N of force, and your change in mass rate is k = 100 kg/sec and your starting mass was 100,000 kg. At t = 10s you would be 202.02m off the ground. At t = 60s you’re 7659.57m off the ground, and so on.

Hopefully I’ve done the math right, if anyone sees an error please point it out.

Edit: Yikes, well I already discovered one error in my work, I completely forgot to account for gravity, which is again another changing variable. So where I had written

F = Fr – Fd

It SHOULD be

F = Fr – Fd – Fg

Where Fg = G*M*m / (x + r)^2

G is a constant (6.67 x 10^-11 N*m^2/kg^2)

M is the mass of the body you are on

r is the radius of the body you are on

x is your displacement above the bodies surface, which is what we were trying to calculate in the first place (or actually I see now you wanted velocity, not displacement, but the two are related).

So yeah, the math for this got quite messy quite quickly, and my head hurts.

Edited by Jokurr
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...