Jump to content

Trouble computing terminal velocity


Questor213

Recommended Posts

Hi, new to KSP.  I have been googling for hours trying to manually compute terminal velocity for the mk1 command pod at 100m but it's not working.  

These are my values and functions:

altitude (h) = 100 m

planetary mass (M) = 5.29E+22 kg

gravitational constant (G) = 6.77E-11

equatorial radius (R) = 600000 m

ship mass (m) = 762 kg

atmospheric density (p) = 101325 kg/m^3

velocity (v) = 101.01 m/s

coefficient of drag (d) (retrieved from PartDatabase) = .4785

cross sectional area = 1.23 m^2

force of drag (F_D) = .5 * p * v^2 * d * A

force of gravity (F_G) = m * ( ( G * M ) / (R + h)^2 )

According to the Atmosphere wiki page, on Kerbin the terminal velocity at 100 m is 101.01 m/s.  Which means the forces of drag and gravity should be equal.  But they are definitely not.  

What am I doing wrong?  

P.S., why am I doing this?  pure dorkness.  

Edited by Questor213
Corrected Cd
Link to comment
Share on other sites

18 hours ago, Boris-Barboris said:

There is no simple formula to calculate drag of non-wing part. Your best option is to measure, not calculate.

Can't you calculate it from the drag cubes somehow? KSP has to do the calculation as well, so why can't you do it on paper?

Link to comment
Share on other sites

32 minutes ago, Kobymaru said:

Can't you calculate it from the drag cubes somehow? KSP has to do the calculation as well, so why can't you do it on paper?

And drag cubes are calculated from colliders (or even the mesh itself using shaders, I can't recall atm) using magic. Not to mention, they are not "cubes" per se. The logic that gets Cd from them is not trivial either.

Edited by Boris-Barboris
Link to comment
Share on other sites

The basic problem, @Questor213 , of "why can't I just calculate terminal velocity", as others have pointed out, boils down to "because drag is really hard."

It's a complicated interaction of many different factors. Even in a grossly simplified model such as KSP's, it's still complex enough to make an analytical solution pretty much impossible.

You can "solve" it (approximately) numerically rather than analytically: i.e. by running a simulation which takes into account all the pieces of the physics model. But we already have that; it's called "playing KSP". :wink:

So, there's basically only one way to have what you want, but fortunately it's pretty quick and easy to do. You've just built a ship in the VAB and want to know its terminal velocity? Launch it to the pad, then use the cheat menu to teleport it to an altitude of, say, 20 km (or whatever you like; a trade-off between accuracy and patience). Then watch it fall. When you have your answer, revert to VAB.

Bam, done. :)

Link to comment
Share on other sites

  • 4 weeks later...

The game wraps a whole bunch of different numbers together into a composite "coefficient of drag" for each presented part. The rest of the calculation is simple enough, though. I really, really want to get into the drag code, but I can't find anything in there that mentions drag cubes. I've looked...

On 4/20/2017 at 11:37 AM, Snark said:

The basic problem, @Questor213 , of "why can't I just calculate terminal velocity", as others have pointed out, boils down to "because drag is really hard."

It's a complicated interaction of many different factors. Even in a grossly simplified model such as KSP's, it's still complex enough to make an analytical solution pretty much impossible.

You can "solve" it (approximately) numerically rather than analytically: i.e. by running a simulation which takes into account all the pieces of the physics model. But we already have that; it's called "playing KSP". :wink:

So, there's basically only one way to have what you want, but fortunately it's pretty quick and easy to do. You've just built a ship in the VAB and want to know its terminal velocity? Launch it to the pad, then use the cheat menu to teleport it to an altitude of, say, 20 km (or whatever you like; a trade-off between accuracy and patience). Then watch it fall. When you have your answer, revert to VAB.

Bam, done. :)

To really reach terminal velocity by falling, or more accurately to asymptotically approach it, you have to fall for an indefinite length of time, in the same orientation, through an endless atmosphere which has the same density at every altitude. But of course the real Kerbin density changes rapidly, it doubles going from about 5300 m to 0 m. (Some rough density "half lives": 5300, 9700, 13200, 16800, 20200, 24000, 27500, 32000. So that's about 1/256 of surface density at 32000 m. This also gives an idea of how quickly engines change from their ASL stats to their VAC stats, though that depends on pressure rather than density.) When a large, dense object comes in fast like the Chelyabinsk meteor or Tunguska event, neither one dropped to anywhere near terminal velocity before almost reaching the surface. Similarly, a dense rocket can easily come in and reach the surface going much faster than terminal velocity, and it can also ascend faster, or slower. So, terminal velocity is not as immediately useful or intuitive a number as many people think for large, dense objects like metal ships. Even more so because successfully reducing drag with nose cones and reduced profile area increases the terminal velocity, which is a good thing.

I think terminal velocity on Kerbin is sqrt(m/A/p/C*9.81*2)/(1+altitude/6e5), where altitude is in km, m is ship mass in kg, A is the profile area in m^2 which is presented to direction of travel, p is atmospheric density in kg/m^3, C is drag coefficient weighted by profile area and has other things in it. Note that the "9.81" is for calculating Kerbin's mass, so it's constant with altitude.

This is density as calculated at 232 data points from the USSA formulas, which are nearly entirely accurate with the exception that, I think, Kerbin temperature varies from standard temperature depending on latitude and time of day. Compared to the USSA, the altitudes are reduced to 80%. The graph to 40km is on the Kerbin wiki page. https://docs.google.com/spreadsheets/d/1MkjDjxzgPV9_FNodnoDsBUuI-dcXZmvifoD6KwK6nOI/edit?usp=sharing

Edited by Aru
oops, fixed km to m
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...