Jump to content

Serious Bug in Convective Aerodynamic Heating?


Recommended Posts

So, i've noticed that some of my craft appear to explode for no reason in 1.0, so i decided to debug a bit.

I think i've found the (a?) problem:

When i look at the ram intake temperature, it is larger than air stream temperature, and yet, the convective flux is still positive-- why? Rg01W6D.jpg

Edited by arkie87
Link to comment
Share on other sites

The airstream temperature is the temperature of air around your craft. The convective flux is the flux you suffer from ramming into the air. Not quite the same thing.

The temperature around the craft is the temperature the surrounding air is heated to due to isentropic compression (i.e. ramming into the air). If not, why is it so damn high?? (temperature in upper atmosphere is low, not high)

- - - Updated - - -

After some studying, it appears convective flux is hyper-sensitive to attitude. Look at these two images taken just three seconds apart after changing attitude slightly:

8B6vge7.jpg

And three seconds later:

kqIF9JL.jpg

That's an over 10x increase in convective flux...

Link to comment
Share on other sites

It appears to be applied based on frontal area, and also modified by occlusion (per the changelog), so if you're changing attitude, things may go in and out of occlusion.

but that doesnt explain the 10x increase, does it?

Link to comment
Share on other sites

Do you know off hand how it's being calculated. As far as the sign is concerned, it changes if it's Air->Intake or Intake->Air.

As well, your attitude with respect to your velocity vector is going to make a large difference, as that will change the local velocity of the air over the intake and since this is convection your heat transfer changes based on the fluid velocity.

Link to comment
Share on other sites

Do you know off hand how it's being calculated. As far as the sign is concerned, it changes if it's Air->Intake or Intake->Air.

As well, your attitude with respect to your velocity vector is going to make a large difference, as that will change the local velocity of the air over the intake and since this is convection your heat transfer changes based on the fluid velocity.

It shouldnt matter which direction heat is going, the general form is the same-- it should still follow newton's law of cooling (at least as a first order approximation).

The angle difference in the picture is like 30 degrees. Can 30 degrees really increase convection 10x? There is barely any part shading, and i dont beleive KSP does any complicated calculations to change velocity based on part shape and attitude etc...

- - - Updated - - -

There definitely seems to be something wrong with the convection equations.

I turned off temperature damage and flew a plane at 1500 m/s and some parts got to nearly four times the temperature of the surface of the sun.

http://i.imgur.com/1pte659.jpg

this is a good test. thanks!

It doesnt make sense that temperature can get so hot when outside air is so cold!?!?!?!?! There is clearly some bug/equation being used incorrectly.

Link to comment
Share on other sites

It shouldnt matter which direction heat is going, the general form is the same-- it should still follow newton's law of cooling (at least as a first order approximation).

What the heck is Newton's Law of Cooling?

The angle difference in the picture is like 30 degrees. Can 30 degrees really increase convection 10x? There is barely any part shading, and i dont beleive KSP does any complicated calculations to change velocity based on part shape and attitude etc...

Yes, in fact, 30 degrees can cause those variations, because the part that was previously occluded by a heat shield is now in the airstream. And also, KSP does do those calculations, that was part of the aero update.

It doesnt make sense that temperature can get so hot when outside air is so cold!?!?!?!?! There is clearly some bug/equation being used incorrectly.

Maybe it's got something to do with that fact that that test was at about 0.95 atm, going at 1.5 thousand m/s (Or, to put some scale in there, 3.35 thousand miles per hour, or 5.4 thousand kilometers per hour.) You were going at near hypersonic velocities at very low altitude. That's going to make you heat up a LOT.

Link to comment
Share on other sites

What the heck is Newton's Law of Cooling?

Let me google that for you :sticktongue:

If you arent familiar with Newton's law of cooling or convective heat transfer, why are participating in this thread? (not trying to be rude, but...)

Yes, in fact, 30 degrees can cause those variations, because the part that was previously occluded by a heat shield is now in the airstream. And also, KSP does do those calculations, that was part of the aero update.

the part wasnt occluded by the heat shield. Look at the picture! Velocity vector is mostly horizontal... also, there is no heat shield part since i did not build this with one...

Maybe it's got something to do with that fact that that test was at about 0.95 atm, going at 1.5 thousand m/s (Or, to put some scale in there, 3.35 thousand miles per hour, or 5.4 thousand kilometers per hour.) You were going at near hypersonic velocities at very low altitude. That's going to make you heat up a LOT.

Yes, the air heats up a lot. If you look at the debug menu, the air temperature (Temp ext) is 1505.6 K-- that's how hot it gets from heating. So how exactly is the part almost 20,000 K?

Edited by arkie87
Link to comment
Share on other sites

It shouldnt matter which direction heat is going, the general form is the same-- it should still follow newton's law of cooling (at least as a first order approximation).

The angle difference in the picture is like 30 degrees. Can 30 degrees really increase convection 10x? There is barely any part shading, and i dont beleive KSP does any complicated calculations to change velocity based on part shape and attitude etc...

Yes, the order matters, if T and Tenv are swapped you get different signs, it's entirely a matter of convention. Regardless, that bit is just nitpicking and it's not really the issue you have shown here. You can't base your assessment if this is a bug based on only Newton's Law of Cooling, the coefficient of heat transfer is dependent on Reynolds Number, among a dozen other variables, all of which can change radically depending on the angle of incidence.

You can't disregard the angle and airflow unless you know how it's being calculated in the engine. If you are considering this a bug, then it should be in the bug report forum not gameplay questions.

Turning off temperature damage is a terrible way of proving your point. Of course the whole thing is going to skyrocket, it was supposed to fail, if the part doesn't fail then the thermal flux will stay and keep pumping thermal energy into it. It may never reach equilibrium.

Link to comment
Share on other sites

Yes, the order matters, if T and Tenv are swapped you get different signs, it's entirely a matter of convention. Regardless, that bit is just nitpicking and it's not really the issue you have shown here. You can't base your assessment if this is a bug based on only Newton's Law of Cooling, the coefficient of heat transfer is dependent on Reynolds Number, among a dozen other variables, all of which can change radically depending on the angle of incidence.

It's not entirely a matter of convention. The relative signs matter.

Q=h*A*(T-T_fluid) -- if T < T_fluid, Q is negative, so heat is leaving the part, but that is clearly not what is shown here.

For low mach number, Q is negative when T_fluid > T. The problem only occurs at high Mach numbers...

You can't disregard the angle and airflow unless you know how it's being calculated in the engine. If you are considering this a bug, then it should be in the bug report forum not gameplay questions.

The effect of Reynolds number, attitude etc... cannot influence sign, just magnitude of the value of "h". I think i will post it to the bug reports... but first i wanted to see if anyone was aware of this or had a logical explanation.

Turning off temperature damage is a terrible way of proving your point. Of course the whole thing is going to skyrocket, it was supposed to fail, if the part doesn't fail then the thermal flux will stay and keep pumping thermal energy into it. It may never reach equilibrium.

If there was proper implementation, turning off temperature damage wouldnt matter, since Q would be negative and T would approach T_ext... I dont think you understand how heat transfer is supposed to work....

- - - Updated - - -

There definitely seems to be something wrong with the convection equations.

I turned off temperature damage and flew a plane at 1500 m/s and some parts got to nearly four times the temperature of the surface of the sun.

http://i.imgur.com/1pte659.jpg

Anyone notice how 1505.6 is both the value for surface velocity as well as T_ext?

Edited by arkie87
Link to comment
Share on other sites

Anyone notice how 1505.6 is both the value for surface velocity as well as T_ext?

External temperature(assuming that's what T_ext stands for) raises with speed????

We are going to burn the planet!!!!!

Link to comment
Share on other sites

What's been bothering me about the convection in KSP is that heat continues to flow from the super-heated air to the ship even though the ship is already several times hotter than the air.

Flying like I did should be punished by making the external temperature higher due to doing it so close to sea level, and making the ship quickly reach equilibrium with that, instead of adding some extra term to the convection equation that makes heat flow backwards.

Link to comment
Share on other sites

What's been bothering me about the convection in KSP is that heat continues to flow from the super-heated air to the ship even though the ship is already several times hotter than the air.

Flying like I did should be punished by making the external temperature higher due to doing it so close to sea level, and making the ship quickly reach equilibrium with that, instead of adding some extra term to the convection equation that makes heat flow backwards.

that's what ive been saying :)

Unless it's just a display bug, and the game actually simulates atmospheric compression to 20,000 K :sticktongue:

- - - Updated - - -

that's what ive been saying :)

Unless it's just a display bug, and the game actually simulates atmospheric compression to 20,000 K :sticktongue:

The main reason this is a problem is because it seems to be acting up even when it shouldnt...

i.e. everyone would be fine with the plane getting superhot at sea level and going 1500 m/s. However, at 65 km, there shouldnt be any convection even at interplanetary velocities... and my ships have had trouble returning at orbital velocity...

Link to comment
Share on other sites

As you can tell from Physics.cfg, and some ingame experimentation, KSP uses two convection models:

1. a Newtonian model, where convection is based on the temperature delta between part and enviroment and a heat transfer coefficient. The external temperature for this is calculated as the ship's velocity (which is true, ish, for Earthlike atmospheres between 300m/s and ~7000m/s).

2. a mach model (might call it hypersonic heating) where convection is based on velocity and density, and does not care about external temperature (indeed, it seems external temperature under this model is not computed, since it's still computed the "old" way). Instead, convective flux is directly calcutaed, going by the exponents in Physics.cfg as k * density^1 * velocity^3 * convectionFactor (40).

Model 1 has a multiplier of 1.0 to heating. Model 2, by Physics.cfg, has a multiplier of 40.

The bug here seems to be that a 'fake' external temperature for model 2 isn't calculated for you. ;)

Link to comment
Share on other sites

As you can tell from Physics.cfg, and some ingame experimentation, KSP uses two convection models:

1. a Newtonian model, where convection is based on the temperature delta between part and enviroment and a heat transfer coefficient. The external temperature for this is calculated as the ship's velocity (which is true, ish, for Earthlike atmospheres between 300m/s and ~7000m/s).

2. a mach model (might call it hypersonic heating) where convection is based on velocity and density, and does not care about external temperature (indeed, it seems external temperature under this model is not computed, since it's still computed the "old" way). Instead, convective flux is directly calcutaed, going by the exponents in Physics.cfg as k * density^1 * velocity^3 * convectionFactor (40).

Model 1 has a multiplier of 1.0 to heating. Model 2, by Physics.cfg, has a multiplier of 40.

The bug here seems to be that a 'fake' external temperature for model 2 isn't calculated for you. ;)

Thanks! That is consistent with everything we have observed.

Since external temperature isnt used (i.e. bypassed when doing convective flux calculations), it has been a bit misleading.

Marked as answered!

I would like to know what the effective Temp_ext, given the flux and heat transfer coefficient to see if that is realistic...

Thanks again.

Edited by arkie87
Link to comment
Share on other sites

As you can tell from Physics.cfg, and some ingame experimentation, KSP uses two convection models:

1. a Newtonian model, where convection is based on the temperature delta between part and enviroment and a heat transfer coefficient. The external temperature for this is calculated as the ship's velocity (which is true, ish, for Earthlike atmospheres between 300m/s and ~7000m/s).

2. a mach model (might call it hypersonic heating) where convection is based on velocity and density, and does not care about external temperature (indeed, it seems external temperature under this model is not computed, since it's still computed the "old" way). Instead, convective flux is directly calcutaed, going by the exponents in Physics.cfg as k * density^1 * velocity^3 * convectionFactor (40).

Model 1 has a multiplier of 1.0 to heating. Model 2, by Physics.cfg, has a multiplier of 40.

The bug here seems to be that a 'fake' external temperature for model 2 isn't calculated for you. ;)

I found a good reference for the convective flux relationship:

convective_flux = density*velocity^3*convection_constant

See Page 22

Interestingly, the derivation assumes that the wall temperature is much less than stagnation temperature. Thus, this formula correctly predicts heating when the wall is cold and heating is just beginning, but as T_wall approaches stagnation temperature, convective flux will not approach zero, as it should...

NathanKell: how difficult would it be to make a mod that corrects this incorrect assumption?

After reviewing the equations all that is needed is to add an additional term to the convective flux:

from:

convective_flux = density*velocity^3*convection coefficient

To:

convective_flux = density*velocity*convection_coefficient*(velocity^2 - 2*specific_heat*(T_part - T_atm))

where T_atm is static temperature (not stagnation temperature)

What do you think?

Edited by arkie87
Link to comment
Share on other sites

I found a good reference for the convective flux relationship:

convective_flux = density*velocity^3*convection_constant

See Page 22

Interestingly, the derivation assumes that the wall temperature is much less than stagnation temperature. Thus, this formula correctly predicts heating when the wall is cold and heating is just beginning, but as T_wall approaches stagnation temperature, convective flux will not approach zero, as it should...

NathanKell: how difficult would it be to make a mod that corrects this incorrect assumption?

After reviewing the equations all that is needed is to add an additional term to the convective flux:

from:

convective_flux = density*velocity^3*convection coefficient

To:

convective_flux = density*velocity*convection_coefficient*(velocity^2 - 2*specific_heat*(T_part - T_atm))

where T_atm is static temperature (not stagnation temperature)

What do you think?

Almost, however in that those equations its not T_atm, it's the Adiabatic temperature(T_aw), not the same. Though T_aq depends on the temperature of the air. I'll have to go back to my old Heat Transfer and Aerodynamics textbooks to confirm but for now:

http://www.thermopedia.com/content/291/

Equation (2) and (3), since it's Air, and you want an accurate model you need to use the compressibility equations. However, it can quickly spiral out, since in that equation is also depend son the Prandtl number but only for certain ranges of Prandtl numbers. We don't want to have to do CFD for all of this, so a line must be drawn somewhere.

Link to comment
Share on other sites

Almost, however in that those equations its not T_atm, it's the Adiabatic temperature(T_aw), not the same. Though T_aq depends on the temperature of the air. I'll have to go back to my old Heat Transfer and Aerodynamics textbooks to confirm but for now:

http://www.thermopedia.com/content/291/

Equation (2) and (3), since it's Air, and you want an accurate model you need to use the compressibility equations. However, it can quickly spiral out, since in that equation is also depend son the Prandtl number but only for certain ranges of Prandtl numbers. We don't want to have to do CFD for all of this, so a line must be drawn somewhere.

Thanks for the informative reply. I will review your source.

Based on my derivation from my source, i arrived at T_atm (static temperature) is in the equation. it is not a mistake. please double check my derivation. I am aware that T_aw is not T_atm...

Yes, the source i posted ignored recovery, apparently (i'm not an aerospace engineer so some of these equations are new to me). We can assume Pr is 1 for simplicity and still be more accurate than what KSP does now. The main benefit is convective flux not spiraling out of control...(it seems in the forums, other people are starting to complain about re-entry heating difficulty)

- - - Updated - - -

Almost, however in that those equations its not T_atm, it's the Adiabatic temperature(T_aw), not the same. Though T_aq depends on the temperature of the air. I'll have to go back to my old Heat Transfer and Aerodynamics textbooks to confirm but for now:

http://www.thermopedia.com/content/291/

Equation (2) and (3), since it's Air, and you want an accurate model you need to use the compressibility equations. However, it can quickly spiral out, since in that equation is also depend son the Prandtl number but only for certain ranges of Prandtl numbers. We don't want to have to do CFD for all of this, so a line must be drawn somewhere.

Your source says:

q=h(T_w-T_r)

with

T_r = T_atm +1/2* r*V^2/Cp

My formula is:

q=C0*rho*V*(V^2 - 2*Cp*(T_w - T_atm))

if we make the simplification that r=1 everywhere (an overestimate), then we can substitute T_atm = T_r - 1/2*V^2/Cp

q=C0*rho*V*(V^2 - 2*Cp*(T_w - T_r + 1/2*V^2/Cp))

q=C0*rho*V*(V^2 - 2*Cp*(T_w - T_r) - V^2)

q=2*C0*rho*V*Cp*(T_w-T_r)

so our formulations are equivalent and your h = 2*C0*rho*V*Cp

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