Jump to content

How does KSP compute aerodynamic heating?


Arrowstar
 Share

Recommended Posts

Not sure how much I can add to what is provided by that link that @Arrowstar posted except that stock KSP scales  supersonic heating up because Kerbins reentry speeds are much lower than earths. I think it’s 3x but I’m typing this on my phone in bed and I don’t remember the exact value. (It’s in physicsglobals in physics.cfg or ModuleManager.ConfigCache in the event physics was patched)

Link to comment
Share on other sites

42 minutes ago, Starwaster said:

Not sure how much I can add to what is provided by that link that @Arrowstar posted except that stock KSP scales  supersonic heating up because Kerbins reentry speeds are much lower than earths. I think it’s 3x but I’m typing this on my phone in bed and I don’t remember the exact value. (It’s in physicsglobals in physics.cfg or ModuleManager.ConfigCache in the event physics was patched)

Okay thanks for that tidbit of information.  I guess what I'm still hoping to find is the actual math that KSP uses to compute reentry heating.  The link I showed has a relationship but it's a mere proportionality, implying that there's some constant out there that I would need to get an actual value.  Any idea what that constant is?

Link to comment
Share on other sites

 

On 3/26/2019 at 8:22 PM, Arrowstar said:

Does anyone know how KSP computes aerodynamic heating on vehicles in the atmosphere of a body?

What I do know is that heating is closely related to dynamic pressure, which is part property

Edited by FreeThinker
Link to comment
Share on other sites

@FreeThinker Nope, barking up the wrong tree. Heating is proportional to sqrt(rho) * v^3, not rho * v^2 (the latter being dynamic pressure). What's actually related to dynamic pressure is those cool swirly visual FX you see.

 

@Arrowstar sure thing. So, in the simple case (let's assume nothing is occluded), then the hypersonic convective coefficient is:

1E-07 * MachConvectionFactor * (density ^ MachConvectionDensityExponent) * (velocity ^ MachConvectionVelocityExponent)

EDIT: Oh, right, and the sqrt is ignored if density >= 1, so it's really (if density > 1, density, else sqrt(density)). Uh,  since MachConvectionDensityExponent is presumably still 0.5, unless y'all changed it while I've been gone. :D

HOWEVER. Two caveats. First, if you get too low while going too fast, we have a "pseudo-Reynolds number" that punishes you for doing so. If that gets too high, your convective coefficient spikes because you're in turbulent flow. Second, occlusion does weird things--the above math is only valid for the frontmost part, and behind that you're inside the shock cone and both area presented to the heating, and the effective shock temperature, get decreased.

(And by "some work" I presume you mean "done wrote it" -- again, unless it's been rewritten since. :) )

 

If you want the entire thing all the way down, there's some general multipliers too, like the general convective constant, the part's convection multiplier, the part's exposed surface area, etc. Oh, and the above yields watts (like any sane formula would) and we convert to kW because KSP masses (and thus thermal masses) are in tonnes.

 

ARGH, hopefully last edit: don't forget radiative heat. I've talked only about convection, above, but for fast reentries the radiation really matters too. We lerp between the full shock temperature and space background radiation based on a "density thermal lerp" calculation that involves the atmosphere's adiabatic index and the mach. That's fairly complex, and has some empirically-determined piece-wise bits.

Edited by NathanKell
Link to comment
Share on other sites

10 hours ago, NathanKell said:

 

@Arrowstar sure thing. So, in the simple case (let's assume nothing is occluded), then the hypersonic convective coefficient is:

1E-07 * MachConvectionFactor * (density ^ MachConvectionDensityExponent) * (velocity ^ MachConvectionVelocityExponent)

EDIT: Oh, right, and the sqrt is ignored if density >= 1, so it's really (if density > 1, density, else sqrt(density)). Uh,  since MachConvectionDensityExponent is presumably still 0.5, unless y'all changed it while I've been gone. :D

HOWEVER. Two caveats. First, if you get too low while going too fast, we have a "pseudo-Reynolds number" that punishes you for doing so. If that gets too high, your convective coefficient spikes because you're in turbulent flow. Second, occlusion does weird things--the above math is only valid for the frontmost part, and behind that you're inside the shock cone and both area presented to the heating, and the effective shock temperature, get decreased.

(And by "some work" I presume you mean "done wrote it" -- again, unless it's been rewritten since. :) )

 

If you want the entire thing all the way down, there's some general multipliers too, like the general convective constant, the part's convection multiplier, the part's exposed surface area, etc. Oh, and the above yields watts (like any sane formula would) and we convert to kW because KSP masses (and thus thermal masses) are in tonnes.

 

ARGH, hopefully last edit: don't forget radiative heat. I've talked only about convection, above, but for fast reentries the radiation really matters too. We lerp between the full shock temperature and space background radiation based on a "density thermal lerp" calculation that involves the atmosphere's adiabatic index and the mach. That's fairly complex, and has some empirically-determined piece-wise bits.

This is great, thanks!  Where are the MachConvectionFactor, MachConvectionDensityExponent, and MachConvectionVelocityExponent defined?  Are there "typical" values for these quantities?

Also, if I'm reading this right, the expression you provided is the heat transfer coefficient for hypersonic convection.  There must be an expression then for the heat flux or heating rate of a body that uses this, then?  Could I see that, too?  Those are really what I'm after. :)

I'm honestly very pleasantly surprised that KSP uses such a detailed heating model.  Great work to the people who put it together. :)

Link to comment
Share on other sites

13 hours ago, NathanKell said:

@FreeThinker Nope, barking up the wrong tree. Heating is proportional to sqrt(rho) * v^3, not rho * v^2 (the latter being dynamic pressure). What's actually related to dynamic pressure is those cool swirly visual FX you se

 

 

what does "rho" stand for?

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.

 Share

×
×
  • Create New...