Difference between revisions of "User:XZise/Atmospheric Height"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (*a bit prettified;)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Hey, I stumbled upon this one, when I worked on the [[Template:Infobox/Body|Infobox/Body]] template at the Wiki.
+
Hey, I stumbled upon this one, when I worked on the {{Tl|Infobox/Body}} template on this wiki.
  
=== Scale height ===
+
According to the section [[drag]] in the [[atmosphere]] article, the pressure at a specific height can be calculated and those calculations do return the same results as measurements taken by the [[PresMat Barometer]]:
  
According to the [[Atmosphere#Drag|wiki]] and [[w:Scale height|wikipedia], the pressure at a specific height could be calculated by:
+
:<math>p_a = p_0 \cdot e^\frac{-a}{H}</math>
  
:p<SUB>alt</SUB> = p<SUB>0</SUB> × e<SUP>-alt/H</SUP>
+
In the <nowiki>{{Infobox/Body}}</nowiki> template the atmospheric height is now calculated by:
  
=== Atmosphere height ===
+
:<math>a_\text{atmo} = -ln(10^{-6}) \cdot H</math>
Atmospheric height is defined as the altitude where pressure falls bellow a millionth the pressure at sea level:
 
  
:alt<SUB>atmo</SUB> = -ln(10⁻⁶)×H
+
Now <math>H</math> is the scale height which could be found also in the infobox, but is not important for the next step because it cancels out: Determine the pressure at the atmospheric height. Now in theory this should be constant, as the drag also depend on the pressure because otherwise that would mean a craft would slow down due to drag around one celestial body while around another the game doesn't simulate the drag anymore because it's above the atmosphere. But in both cases the ''theoretical'' pressure would be the same. So lets calculate this pressure:
  
To check this, compute the pressure at altitude alt<SUB>atmo</SUB>:
+
:<math>\begin{align}
 +
p_\text{atmo} &= p_0 \cdot e^\frac{-a_\text{atmo}}{H} \\
 +
&=  p_0 \cdot e^{-\frac{-ln(10^{-6} \cdot H}{H}} \\
 +
&=  p_0 \cdot e^{ln(10^{-6}} \\
 +
&=  p_0 \cdot 10^{-6}
 +
\end{align}</math>
  
:{|
+
So the pressure at the atmospheric height is simply <math>p_0 \cdot 10^{-6}</math> where <math>p_0</math> is the pressure at sea level. On Kerbin this is 1&nbsp;atm on sea level and 10⁻⁶&nbsp;atm at the atmospheric height. But Jool for example has still 15×10⁻⁶&nbsp;atm left at the atmospheric height, as the pressure on “sea level” is 15 atm. Now doing the reverse: At which altitude is 15×10⁻⁶ atm on Kerbin. By my understanding, this should be a save height as craft in Jool's orbit won't be slowed down at this height/pressure.
| p<SUB>atmo</SUB>
 
| = p<SUB>0</SUB> × e<SUP>-alt<SUB>atmo</SUB>/H</SUP>
 
|-
 
|
 
| = p<SUB>0</SUB> × e<SUP>-(-ln(10⁻⁶)×H)/H</SUP>
 
|-
 
|
 
| = p<SUB>0</SUB> × e<SUP>ln(10⁻⁶)</SUP>
 
|-
 
|
 
| = p<SUB>0</SUB> × 10⁻⁶
 
|}
 
  
It checks out. Kerbin this has 1 atm at sea level and 10⁻⁶ atm at atmospheric height; Jool has 15 atm at sea level and 15×10⁻⁶ atm left at atmospheric height.
+
Now to calculate the altitude for a specific pressure change the formula:
  
=== Deriving altitude from pressure ===
+
:<math>\begin{align}
 +
p_0 \cdot e^\frac{-a}{H} &= p_a \\
 +
e^\frac{-a}{H} &= \frac{p_a}{p_0} \\
 +
\frac{-a}{H} &= ln\left(\frac{p_a}{p_0}\right) \\
 +
a &= -ln\left(\frac{p_a}{p_0}\right) \cdot H
 +
\end{align}</math>
  
Now, suppose we want to find where on Kerbin pressure is 15×10⁻⁶ atm. We simply reverse the scale height formula:
+
This looks like the “atmospheric height” formula, with the difference that p<sub>alt</sub>/p<sub>0</sub> is 10⁻⁶. So now for Kerbin we use for p<SUB>alt</SUB> (the pressure for the searched altitude) is 15×10⁻⁶ atm, p<SUB>0</SUB> is 1 atm and H is 5000 m. This is now saying 55537.3018 meters.
  
:{|
+
So applying Jool's “atmospheric height pressure” on Kerbin means, that you can savely orbit at about 56 km which is way lower than 69 km. On the other side, the altitude of 10⁻⁶ atm at Jool is 165 235.608 m so about 30 km higher. Eve has a difference of 10 km and Duna about -5 km (as p<SUB>0</SUB> is lower than 1 atm).
| p<sub>alt</sub>
 
| = p<SUB>0</SUB> × e<SUP>-alt/H</SUP>
 
|| | ÷p<SUB>0</SUB>
 
|-
 
| p<SUB>alt</SUB>/p<SUB>0</SUB>
 
| = e<SUP>-alt/H</SUP>
 
|| | ln()
 
|-
 
| ln(p<SUB>alt</SUB>/p<SUB>0</SUB>)
 
| = -alt/H
 
|| | ×-H
 
|-
 
| -ln(p<SUB>alt</SUB>/p<SUB>0</SUB>) × H
 
| = alt
 
|
 
|}
 
  
This is very similar to the expression for alt<SUB>atmo</SUB>. It makes sense since, in both case, we compute an altitude for a given pressure (absolute or relative to pressure at sea level).
+
Now you maybe saying that 15×10⁻⁶ atm and 10⁻⁶ atm aren't very far away (although the different altitudes are pretty far away as 56 km are only 80 % of 69 km) you know could construct an example with an sea level pressure of 10⁺⁶ atm resulting in a pressure of 1 atm at the “atmospheric height” which is the pressure at Kerbin's sea level.
  
Plugging in the values p<SUB>alt</SUB> = 15×10⁻⁶ atm, p<SUB>0</SUB> = 1 atm and H = 5000 m, it gives us the 55537.3018 meters above sea level.
+
So either I mixed something up or the calculation for the atmospheric height is wrong or the formula for the atmospheric drag in the wiki is wrong.
  
=== Safe altitude ===
+
So please let me know who does what wrong.
 
 
Since there is no drag effect on Jool right above atmospheric height with p = 15×10⁻⁶ atm, we could expect an orbit in Kerbin's atmosphere at this altitude (i.e. 56km) to be safe as well.
 
 
 
Note: since the threshold defining atmosphere height is relative to pressure at sea level, the pressure at atmosphere height is not guaranteed to actually be negligible
 
 
 
Kerbal Space Program uses a simplified model to allow logical acceleration by ignoring atmospheric drag above an arbitrary limit. In a more precise model of Kerbin, vessels would still experience orbital decay above 69km due to atmospheric drag. Since drag is actually taken into account below 69km, any orbit whose periapsis is below this altitude will ultimately decay in the game; however, even at 50km this would take a really long time (only physical ×4 acceleration would be available).
 
 
 
Finally, there is another trick to this: drag is not simulated at all on background vessels (e.g. dropped stages farther than 2.5km). Instead, the vessel can orbit safely even in the atmosphere (unless switched to), but is considered as having crashed if its altitude falls below some threshold It looks like this limit is around ~30km on Kerbin, but more Science © is needed to derive the way this is computed.
 

Latest revision as of 18:35, 26 December 2014

Hey, I stumbled upon this one, when I worked on the {{Infobox/Body}} template on this wiki.

According to the section drag in the atmosphere article, the pressure at a specific height can be calculated and those calculations do return the same results as measurements taken by the PresMat Barometer:

In the {{Infobox/Body}} template the atmospheric height is now calculated by:

Now is the scale height which could be found also in the infobox, but is not important for the next step because it cancels out: Determine the pressure at the atmospheric height. Now in theory this should be constant, as the drag also depend on the pressure because otherwise that would mean a craft would slow down due to drag around one celestial body while around another the game doesn't simulate the drag anymore because it's above the atmosphere. But in both cases the theoretical pressure would be the same. So lets calculate this pressure:

So the pressure at the atmospheric height is simply where is the pressure at sea level. On Kerbin this is 1 atm on sea level and 10⁻⁶ atm at the atmospheric height. But Jool for example has still 15×10⁻⁶ atm left at the atmospheric height, as the pressure on “sea level” is 15 atm. Now doing the reverse: At which altitude is 15×10⁻⁶ atm on Kerbin. By my understanding, this should be a save height as craft in Jool's orbit won't be slowed down at this height/pressure.

Now to calculate the altitude for a specific pressure change the formula:

This looks like the “atmospheric height” formula, with the difference that palt/p0 is 10⁻⁶. So now for Kerbin we use for palt (the pressure for the searched altitude) is 15×10⁻⁶ atm, p0 is 1 atm and H is 5000 m. This is now saying 55537.3018 meters.

So applying Jool's “atmospheric height pressure” on Kerbin means, that you can savely orbit at about 56 km which is way lower than 69 km. On the other side, the altitude of 10⁻⁶ atm at Jool is 165 235.608 m so about 30 km higher. Eve has a difference of 10 km and Duna about -5 km (as p0 is lower than 1 atm).

Now you maybe saying that 15×10⁻⁶ atm and 10⁻⁶ atm aren't very far away (although the different altitudes are pretty far away as 56 km are only 80 % of 69 km) you know could construct an example with an sea level pressure of 10⁺⁶ atm resulting in a pressure of 1 atm at the “atmospheric height” which is the pressure at Kerbin's sea level.

So either I mixed something up or the calculation for the atmospheric height is wrong or the formula for the atmospheric drag in the wiki is wrong.

So please let me know who does what wrong.