pioneer
pioneer copied to clipboard
Atmospheric heating doesn't work quite as it should
A Hammerhead Heavy Freighter can't have shields fitted, but that's OK, because it's nearly impossible to get it significantly warmed up. One pixel on the thermometer, perhaps.
No ship should be able to aerobrake from orbital speed to landing speed, on Earth, without shielding. None.
Atmospheric heating is directly proportional to surface area and the outside pressure, but proportional to the square of the speed. Orbital speeds are very, very high.
In addition to this, the current behaviour is that the thermometer rises, and when it hits the top the ship explodes. Presumably the thermometer threw shards of glass into the hyperdrive or something... anyway, it might be better if the hull sustains damage when the temperature is above some threshold. The ship then explodes due to the hull being damaged rather than due to the temperature itself.
Temperature is currently calculated like this (Ship::GetHullTemperature):
double dragGs = GetAtmosForce().Length() / (GetMass() * 9.81);
return dragGs / 5.0; //atmoshielded multiplier is 300.0
AtmosForce being (DynamicBody::CalcExternalForce):
const double speed = m_vel.Length();
Body *body = GetFrame()->GetBodyFor();
if ((speed > 0) && body && body->IsType(Object::PLANET))
{
Planet *planet = static_cast<Planet*>(body);
double dist = GetPosition().Length(); //altitude
double pressure, density;
planet->GetAtmosphericState(dist, &pressure, &density);
const double radius = GetBoundingRadius();
const double AREA = radius;
// ^^^ yes that is as stupid as it looks
const double DRAG_COEFF = 0.1; // 'smooth sphere'
vector3d dragDir = -m_vel.Normalized();
vector3d fDrag = 0.5*density*speed*speed*AREA*DRAG_COEFF*dragDir;
// make this a bit less daft at high time accel
// only allow atmosForce to increase by .1g per frame
vector3d f1g = m_atmosForce + dragDir * GetMass();
if (fDrag.LengthSqr() > f1g.LengthSqr())
m_atmosForce = f1g;
else
m_atmosForce = fDrag;
}
Sure that's the temperature, and not just the acceleration?
In any case, Wikipedia to the rescue:
An approximate rule-of-thumb used by heat shield designers for estimating peak shock layer temperature is to assume the air temperature in kelvins to be equal to the entry speed in meters per second — a mathematical coincidence. For example, a spacecraft entering the atmosphere at 7.8 km/s would experience a peak shock layer temperature of 7800 K. This is unexpected, since the kinetic energy increases with the square of the velocity, and can only occur because the specific heat of the gas increases greatly with temperature (unlike the nearly constant specific heat assumed for solids under ordinary conditions).
So, we have a rule of thumb we can use. It would seem that the heating effect is greatly exaggerated in real life.
Something tells me this is outdated and should/could be closed. I can't remember who's worked on friction and atmospheric heating last, but maybe @WKFO @fluffyfreak
Nope, atmo heating is definitely 100% broken and I was the one to do it. It's still pending a full investigation, as I hacked in a temporary workaround when we merged in atmospheric flight. I'll put this on my backlog but it might be a bit before I get a chance.