pioneer icon indicating copy to clipboard operation
pioneer copied to clipboard

Atmosphere calculations

Open joonicks opened this issue 6 years ago • 15 comments

Bad news. The whole atmosphere calculation functions Planet::InitParams and Planet::GetAtmosphericState seems to be fubar.

InitParams calculates how thick the atmosphere is for all bodies with an atmosphere. The result is most often much too thin compared to reality. earth, 25km vs reality 480km (google) venus, 80km vs reality 250km (wikipedia) jupiter gets stuck with 79km of atmosphere saturn gets 143km explore a bit and you'll run into gas giants with only 10-30km of atmosphere

in any case, it seems calculating the thickness of the atmosphere isnt as easy as the current code tries to make it out to be.

so the question is, what to do about it.

joonicks avatar Dec 27 '17 16:12 joonicks

Would this be part of the reason I don't seem to get any atmospheric heating gear-up even at orbital velocity, and barely anything worth mentioning even with gear down? Was recently thinking that seemed odd, like there was no reason to ever be concerned with temperature.

caligari87 avatar Dec 27 '17 16:12 caligari87

this is not about the temperature. this is about how far the atmosphere extends and the atmospheric pressure at different altitudes. basically everything about atmospheres.

joonicks avatar Dec 27 '17 16:12 joonicks

@caligari87 You'd have way more heating without the Atmospheric shielding equipment.

bszlrd avatar Dec 27 '17 17:12 bszlrd

Surely the "atmosphere height" is somewhat arbitrary, given that the density is an exponential falloff? Given how the frames work, it's a reasonable approximation to set the density threshold relatively high.

Now if the density is way off within the threshold range that Pioneer simulates, that's a reasonable issue to fix.

jaj22 avatar Dec 27 '17 17:12 jaj22

atmosphere height also influences the haze drawn around atmospheric planets

joonicks avatar Dec 27 '17 17:12 joonicks

25 km doesn't sound that far off in my mind. Planes fly at 10 km, at 20 km you see earth curvature and those flying there report it (thus) feels like being in space. Where to put the limit for where atmosphere stops is arbitrary, as there's not a hard limit.

earth, 25km vs reality 480km (google)

I'm guessing 480km is in the higher end of the spectrum. Also, this would mean the international space station, isn't even in space, assuming "space" and atmosphere don't overlap.

Wikipedia:

The mass of Earth's atmosphere is distributed approximately as follows:

  • 50% is below 5.6 km (18,000 ft).

  • 90% is below 16 km (52,000 ft).

  • 99.99997% is below 100 km (62 mi; 330,000 ft), the Kármán line. By international convention, this marks the beginning of space where human travelers are considered astronauts.

This raises the question, should the atmosphere overlap with "space"? If 90% of the mass is below 16 km, then from 100 km to 480 km there must be negligible amout (less than 0.00003 % of our atmosphere mass).

My point is partially, that 25 km doesn't sound outrageously wrong to me, thus any change would need to be a model that has even higher precision and understanding of how to "best" model an atmosphere, then our current one.

impaktor avatar Dec 28 '17 10:12 impaktor

Im not suggesting any changes because I dont know the math involved. However, the current calculation is fubar. it spits out values that are literally all over the place and that makes very little sense.

joonicks avatar Dec 28 '17 15:12 joonicks

In Orbiter space simulator, the shuttle starts heating up (smoke trail) at about 70km. No Idea how accurate this is, but it can give a better estimate.

Another-MrZ avatar Dec 28 '17 17:12 Another-MrZ

Isn't that condensation? Like a contrail.

bszlrd avatar Dec 28 '17 17:12 bszlrd

Don't think so, I think there is no much water to condense at that altitude, and the shuttle just glides, no exhaust for condensation. Also, it starts slowing down heavily at that same altitude.

Another-MrZ avatar Dec 28 '17 17:12 Another-MrZ

Oh, you mean during reentry..

bszlrd avatar Dec 28 '17 18:12 bszlrd

Ive spent some hours digging around for formulas etc. But now Ive come to the realization that existing formulas that have to do with gasses, pressures, temperatures, are not suitable to calculate the thickness of an atmosphere. Im afraid I think we have to come up with our own arbitrary method for it.

joonicks avatar Dec 28 '17 19:12 joonicks

According to Space.com "Earth's atmosphere is about 480 kilometers thick, but most of it is within 16 km of the surface. Air pressure decreases with altitude. At sea level, air pressure is about 1 kilogram per square centimeter." The heating is more based on how much drag the ship is getting from the amount of atmosphere, so even higher up at around 70km there is still a lot of heating at the 10km/s velocity that is required for orbit.

csildev avatar Aug 24 '18 11:08 csildev

It is to my knowledge just an exponential fallout (like a lot of beautiful things in nature). This implies that there is no "hard" boundary of an atmosphere. The best bet may be to set a density threshold and compute the distance where the density is equal with a simple logarithmic formula. It's pretty basic math to me. The code in master looks ok to me, good work.

PtrMan avatar Jul 21 '20 01:07 PtrMan

If this is still work in progress: A Gas Giant's "Surface" or "zero level elevation" is defined as a geoid where the average pressure is 10^5 Pascal = 1000hPa. If there shall be more realistic Gas Giants, it should therefore be possible/allowed to have negative heights for ships plunging into them.

Image: At this pressure, I expected from my astronomical knowledge a slightly negative height instead of 57.61 km.

Jupiter_surface

Bodasey avatar Oct 15 '20 16:10 Bodasey