Jump to content

How to get drag coefficient for a rocket?


Recommended Posts

I'm looking to model KSP's dynamics to do some offline optimization.  Modeling gravity and thrust are pretty easy, but modeling drag is harder.  I can get the density at all points along my flight path, but to turn that into the drag force, I need to know the overall drag coefficient times the reference area.  Computing it from the drag cubes of all parts seems like a lot of work that's hard to get right, and the engine does it for us anyway.  Can we get access to it?  I can't find anything relevant in the Vessel class.  My fallback would be to take the total acceleration, subtract out gravity and thrust, divide by density and speed squared, and pray that the answer is both accurate and numerically stable. :)

Link to comment
Share on other sites

Drag coefficient is meaningless without also getting reference area. Aero GUI will give you the product (i.e. the Cd * S combined term in the drag equation) but in order to compute Cd you need to decide on how to compute S (and then you just divide the Cd*S term by S, to get Cd).

Link to comment
Share on other sites

I may be doing something wrong but I found the atmospheric density from GetPressure(alt), GetTemperature(alt), GetDensity(P, T) differed from part.GetAtmDensity() by a significant bit.

The first method read 1.115  while the second read 1.214 while sitting on the runway.

Might throw your calculations off if your using the first method.

(or do you know a better way to get atmospheric density at a remote location?)

 

Link to comment
Share on other sites

Thanks NathanKell, Cd * S is really what I want.  I would have thought it was a static property of my rocket, but even for a very simple rocket traveling straight up it changes quite a bit, from 0.675 at launch to 0.24 then stabilizes at 0.30.  I thought Cd * S would be independent of atmospheric density, ship velocity, altitude and everything else, and depend only on ship geometry and wind direction, which is constant in this case.  Any ideas?

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