Question XR2 Heating Models?

thepenguin

Flying Penguin
Addon Developer
Joined
Jul 27, 2013
Messages
220
Reaction score
1
Points
16
Location
Earth-Moon Lagrange Point (L4)
does anybody have an algorithm for predicting the hull temps of an XR2 during re-entry, as well as standard atmospheric flight? (I would appreviate it if they are the same ones used in-simulation)

I would assume that atmo. density, atmo. temperature, vessel velocity, and heading all factor in.

Thanks in advance,
thepenguin
 
Last edited:

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
does anybody have an algorithm for predicting the hull temps of an XR2 during re-entry? (I would appreviate it if they are the same ones used in-simulation)

I would assume that atmo. density, atmo. temperature, vessel velocity, and heading all factor in.

Thanks in advance,
thepenguin

You could use Aerobrake MFD :shrug:

If you flick to the second page it shows a graph of heat vs time, which you can use to somewhat predict how high it will go. That's the best I know of myself.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,218
Reaction score
1,566
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
There are several parts to computing the actual hull temperature, including: 1) friction/compression, 2) conductive cooling (determined by atmosphere density but isn't a factor during most of reentry), and 3) radiative cooling. In addition, each hull surface's temperature will vary based on slip and AoA. However, computing frictional/compression heating should get you in the ballpark for the nosecone temperature of the XR2 if you have GetAtmPressure() and GetAirspeed() values from the Orbiter core. [Note: effectiveOAT, "Effective Outside Air Temperature", is computed from GetAtmTemperature() from the core, but of course the affect it has on hull temperature is only a factor at all where there is enough static pressure to make any difference. The effect it has varies by static pressure.]

XR2 nose temp in Kelvin = effectiveOAT + ((1.4 * 3.1034e-10 * 0.642) * ((atmpressure / 2) * (airspeed^3)))

You could simplify it of course and remove most of the parentheses and/or collapse the constants, but that is how the code does it for the XR2. The XR1 and XR5 use slightly different formulas, but the principle is the same.
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,927
Reaction score
340
Points
98
Location
Sparta
does anybody have an algorithm for predicting the hull temps of an XR2 during re-entry? (I would appreviate it if they are the same ones used in-simulation)

I would assume that atmo. density, atmo. temperature, vessel velocity, and heading all factor in.

Thanks in advance,
thepenguin

This kind of prediction is useful for knowing where to place your periapsis altitude, so that you don't burn up during reentry.

In order to make a prediction, you'll need to know 3 things and then use Doug's formula.
The 3 things are: Periapsis velocity, Periapsis Alt and Static Pressure at that altitude.

(Doug is using Airspeed and not Orbital (periapsis) velocity, but you can deduce it if you know the eq inclination and your periapsis latitude).

The velocity and altitude can be easily found by the elements of the trajectory. The static pressure is slightly more difficult.

Earth, Venus and Mars use custom atmospheric models, which means that you will have to make some short of table with the static pressures for the range of altitudes you need. (Earth for example would need the static pressures for altitudes 75 km to 55 km).

The rest of the bodies with an atmosphere, model their static pressure using this formula (from Orbitersdk\doc\API_guide.pdf)
Untitled-1_zps8d20d148.jpg


Good luck with your script
:cheers:
 

thepenguin

Flying Penguin
Addon Developer
Joined
Jul 27, 2013
Messages
220
Reaction score
1
Points
16
Location
Earth-Moon Lagrange Point (L4)
There are several parts to computing the actual hull temperature, including: 1) friction/compression, 2) conductive cooling (determined by atmosphere density but isn't a factor during most of reentry), and 3) radiative cooling. In addition, each hull surface's temperature will vary based on slip and AoA. However, computing frictional/compression heating should get you in the ballpark for the nosecone temperature of the XR2 if you have GetAtmPressure() and GetAirspeed() values from the Orbiter core.

Wow. That's awesome, thanks! what are the algorithms for the other parts of the vessel body? (there's approximately 6 parts), and I seem to breach every one but the nose. (as you said, they vary by slip and AoA, but how do they vary, exactly?)

I would also be interested in knowing the ways that the three parts you mentioned about temperature work as well, as I tend to toast myself when I do a scram takeoff by autopilot (as well as atmospheric/suborbital flights too)

EDIT: I looked more closely at the algorithm, and it seems to contain the first factor of hull temperature, but not the others (If this were only calculating re-entries, that would be sensible, but I just realized I need to do more).
 
Last edited:

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,218
Reaction score
1,566
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
The other two factors have relatively minor effects and are somewhat more involved, so it's not worth messing with all that for a reentry autopilot.

EDIT:
In any case, since you're writing an autopilot you really can't rely on trying to "guess" the hull temperature in flight: just query the XR2 vessel directly each frame and get its exact hull temperatures. To do that, just use the XRVesselCtrl API like this:

Code:
XRSystemStatusRead xrStatus;
pXR2Vessel->GetXRSystemStatus(&xrStatus);
const double noseconeTemp = xrStatus.NoseconeTemp;
const double leftWingTemp = xrStatus.LeftWingTemp;
// etc.

Here are the XRSystemStatusRead fields you're interested in (refer to XRVesselCtrl.h for more information):

Code:
double NoseconeTemp;        // in Kelvin
double LeftWingTemp;        // in Kelvin
double RightWingTemp;       // in Kelvin
double CockpitTemp;         // external cockpit hull temperature in Kelvin
double TopHullTemp;         // in Kelvin

double MaxSafeNoseconeTemp; // in Kelvin
double MaxSafeWingTemp;     // in Kelvin
double MaxSafeCockpitTemp;  // in Kelvin
double MaxSafeTopHullTemp;  // in Kelvin
 
Last edited:

thepenguin

Flying Penguin
Addon Developer
Joined
Jul 27, 2013
Messages
220
Reaction score
1
Points
16
Location
Earth-Moon Lagrange Point (L4)
In any case, since you're writing an autopilot you really can't rely on trying to "guess" the hull temperature in flight: just query the XR2 vessel directly each frame and get its exact hull temperatures. To do that, just use the XRVesselCtrl API like this:

Unfortunately, it would seem that your lua interfaces are not so extensive as to support this within the context of my script.

as far as I know, that looks like c++ code. unless there are interfaces that work in LUA, this is the best I can do.

If I just got the part of the c++ source code that handles temperatures, I could port the calculations over to LUA, but without anything to port, I don't see a good option.

also, for things like SCRAM takeoffs & atmospheric flight, I need to be able to predict how these things will influence hull temps before I actually perform the maneuver! It is useless to know that there are problems after the ship has already turned into a fireball.
 
Last edited:

Cras

Spring of Life!
Donator
Joined
Apr 13, 2011
Messages
2,215
Reaction score
0
Points
36
Location
Los Angeles
Website
www.youtube.com
for SCRAMS.....just worry about dynamic pressure. Keep that under control and the hull temp will be fine as a consequence.
 

thepenguin

Flying Penguin
Addon Developer
Joined
Jul 27, 2013
Messages
220
Reaction score
1
Points
16
Location
Earth-Moon Lagrange Point (L4)
for SCRAMS.....just worry about dynamic pressure. Keep that under control and the hull temp will be fine as a consequence.

About what range is deemed "under control"? I've heard of people saying 20kPa, but others say higher dynamic pressures are okay as well.
 

Cras

Spring of Life!
Donator
Joined
Apr 13, 2011
Messages
2,215
Reaction score
0
Points
36
Location
Los Angeles
Website
www.youtube.com
About what range is deemed "under control"? I've heard of people saying 20kPa, but others say higher dynamic pressures are okay as well.

I have found for optimal engine performance, and for heat, targeting 10kPa is best. That is how I flew the XR2 SCRAM ascent. Adjust pitch to keep at 10kPa, but without ever going lower than 2.5 degrees, because at the end, there is just nothing you can do, you will be gaining altitude and will not be able to maintain any sort of dynamic pressure on the hull. I usually then am either out of fuel and the diffuser is near its temp limits. Shut the SCRAMS down, close the doors, pitch up to 20 degrees and burn to target Apogee, since now I no longer need air, get out of the atmosphere fast to reduce drag on the coast up to apogee.

That procedure worked for me everytime. I no longer use the SCRAMS anymore however.
 

thepenguin

Flying Penguin
Addon Developer
Joined
Jul 27, 2013
Messages
220
Reaction score
1
Points
16
Location
Earth-Moon Lagrange Point (L4)
I'd just like to thank dbeachy1 for giving me this great algorithm to work with.

It seems to constantly overestimate hull temps (the error is larger as you reach lower altitudes), but at least it can tell you when you are going to burn up (and how to prevent that.)

I think I should be able to put in a few simple modifications and get it even more on track with the real hull temps (I beleive it would be atmospheric cooling effects that were not included). However, at crusing altitude it is never off by more than ~5 degrees, and for that I am thankful.
 
Top