Difference between revisions of "Template:VT"

From Kerbal Space Program Wiki
Jump to: navigation, search
(!didn't respect thinner atmosphere at higher altitudes;)
(*mass, radius, pressure and scale height from subtemplates to parameters; *rewritten documentation according to the newest findings on the atmosphere article;)
Line 1: Line 1:
 
<includeonly>{{#expr: <!--
 
<includeonly>{{#expr: <!--
 
-->    ( <!--
 
-->    ( <!--
-->        2 * {{G}} * {{BodyData/Mass|{{{planet}}}}} <!--
+
-->        2 * {{G}} * {{BodyData|{{{planet}}}|mass}} <!--
 
-->        / ( <!--
 
-->        / ( <!--
-->            ({{{alt}}} + {{BodyData/Radius|{{{planet}}}}} <!--
+
-->            ({{{alt}}} + {{BodyData|{{{planet}}}|radius}} <!--
 
-->            )^2 * <!--
 
-->            )^2 * <!--
-->            ( {{BodyData/Pressure|{{{planet}}}}} * e^(-{{{alt}}}/{{BodyData/ScaleHeight|{{{planet}}}}}) <!--
+
-->            ( {{BodyData|{{{planet}}}|pressure}} * e^(-{{{alt}}}/{{BodyData|{{{planet}}}|scale height}}) <!--
 
-->            ) * (1.2230948554874 * 0.008) * 0.2 * 1 <!--
 
-->            ) * (1.2230948554874 * 0.008) * 0.2 * 1 <!--
 
-->        ) <!--
 
-->        ) <!--
Line 16: Line 16:
 
|}
 
|}
  
This template calculates terminal velocity of an object given the planet and the altitude from the planet's surface. It assumes that the coefficient of drag is 0.2 and that the cross-sectional area is 1 m<sup>2</sup>. It also assumes that atmospheric density is equal to the atmospheric pressure multiplied by 1.2230948554874 * 0.008.<ref>See the [[Atmosphere]] article.</ref>
+
This template calculates terminal velocity of an object given the planet and the altitude from the planet's surface. It uses {{Tl|BodyData}} with the properties <tt>mass</tt>, <tt>radius</tt>, <tt>pressure</tt> and <tt>scale height</tt>.
  
    Result = ((2·G·M)/((alt+r)<sup>2</sup>·p<sub>0</sub>·e<sup>-alt/scale</sup>·1.2230948554874·0.008·0.2·1&nbsp;m<sup>2</sup>))<sup>½</sup>
+
: <math>v_T = \sqrt{\frac{250 \frac{\text{kg}}{\text{m}^2} \cdot GM}{(a+r)^2 \cdot \rho \cdot d}}</math>
 +
: <math>\rho = 1.2230948554874 \frac{\text{kg}}{\text{m}^3 \cdot \text{atm}} \cdot p_0 \cdot e^\frac{-a}{H}</math>
 +
<small>(<tt>M</tt> is the mass of the body, <tt>r</tt> is the body's radius, <tt>p<sub>0</sub></tt> is pressure at 0 m altitude (“sea level”), <tt>a</tt> is the altitude above sea level and <tt>H</tt> is the scale height)</small>
  
<small>([[Template:BodyData/Mass|M]] is Mass, [[Template:BodyData/Radius|r]] is Radius, [[Template:BodyData/Pressure|p<sub>0</sub>]] is pressure at 0 m altitude (“sea level”) and [[Template:BodyData/ScaleHeight|scale]] is the scale height)</small>
+
The formula assumes that the coefficient of drag (d) is 0.2 and is used from the [[atmosphere]] article.
  
== Notes ==
+
[[Category:Templates]]
<references />
 
 
 
[[Category:Templates|VT]]
 
 
</noinclude>
 
</noinclude>

Revision as of 15:22, 14 September 2013


Usage Produces
{{VT | planet = Kerbin | alt = 0}}
100.1288989294

This template calculates terminal velocity of an object given the planet and the altitude from the planet's surface. It uses {{BodyData}} with the properties mass, radius, pressure and scale height.

(M is the mass of the body, r is the body's radius, p0 is pressure at 0 m altitude (“sea level”), a is the altitude above sea level and H is the scale height)

The formula assumes that the coefficient of drag (d) is 0.2 and is used from the atmosphere article.