|
|
Line 30: |
Line 30: |
| [[File:Mk16-XL Parachute.jpg|thumb|right|A Mk1-2 pod with a Mk16-XL parachute being slowed by drag in Kerbin's atmosphere.]] | | [[File:Mk16-XL Parachute.jpg|thumb|right|A Mk1-2 pod with a Mk16-XL parachute being slowed by drag in Kerbin's atmosphere.]] |
| | | |
− | In the game, the force of atmospheric drag (''F<sub>D</sub>'') is modeled as follows:<ref>http://forum.kerbalspaceprogram.com/showthread.php/5235-Atmospheric-drag?p=88804&viewfull=1#post88804</ref> | + | In the game, the force of atmospheric drag is dependent on the shape of a part and which of the part's attachment nodes are in use. (For example, nose cones reduce drag on the part to which they are attached.) A debug-mode option allows you to see the exact drag force on a given part by right-clicking on it. |
− | | |
− | : <math>F_D = 0.5\, \rho\, v^2\, d\, A</math>
| |
− | | |
− | where ''ρ'' is the atmospheric density (kg/m<sup>3</sup>), ''v'' is the ship's velocity (m/s), ''d'' is the coefficient of drag (dimensionless), and ''A'' is the [[w:cross section (geometry)|cross-sectional area]] (m<sup>2</sup>).
| |
− | | |
− | Note that the cross-sectional area is not actually calculated in the game. It is instead assumed that it is directly proportional to the mass, which is an unrealistic simplification made by KSP. The parameter [[API:FlightGlobals|FlightGlobals]].DragMultiplier indicates that the proportionality ratio is 0.008 m<sup>2</sup>/kg, so:
| |
− | | |
− | : <math>A = 0.008 \cdot m</math>
| |
− | | |
− | where ''m'' is the ship's mass (kg).
| |
| | | |
| The atmospheric density ''ρ'' is directly proportional to atmospheric pressure (''p'' of unit ''atm''), which is a function of altitude, the atmosphere's pressure at altitude 0 (''p<sub>0</sub>''), and scale height (''H''): | | The atmospheric density ''ρ'' is directly proportional to atmospheric pressure (''p'' of unit ''atm''), which is a function of altitude, the atmosphere's pressure at altitude 0 (''p<sub>0</sub>''), and scale height (''H''): |
Line 50: |
Line 40: |
| | | |
| where p here is in units atm, and ''ρ'' in kg/m<sup>3</sup>. The conversion factor of 1.2230948554874 kg/(m<sup>3</sup>·atm) is given by [[API:FlightGlobals|FlightGlobals]].getAtmDensity(1.0), which returns the density at 1 atmosphere (sea level on Kerbin) pressure. | | where p here is in units atm, and ''ρ'' in kg/m<sup>3</sup>. The conversion factor of 1.2230948554874 kg/(m<sup>3</sup>·atm) is given by [[API:FlightGlobals|FlightGlobals]].getAtmDensity(1.0), which returns the density at 1 atmosphere (sea level on Kerbin) pressure. |
− |
| |
− | The coefficient of drag (''d'') is calculated as the mass-weighted average of the max_drag values of all [[parts]] on the ship. For most ships without deployed parachutes, ''d'' will be very near 0.2, since this is the max_drag value of the vast majority of parts. Also a group of the same part have always the same drag coefficient. Parts with a drag coefficient other than 0.2 are fuel lines,
| |
− | chairs,
| |
− | all spaceplane cockpits,
| |
− | all boosters,
| |
− | all rcs engines,
| |
− | bz-52 radial,
| |
− | regular strut,
| |
− | ncs adapter,
| |
− | all quad- and tricouplers,
| |
− | all nose cones,
| |
− | circular intake,
| |
− | shock cone intake,
| |
− | all wings,
| |
− | all docking ports,
| |
− | launch escape system,
| |
− | all parachutes,
| |
− | all wheels but the Rovemax Model XL-3,
| |
− | small gear bay,
| |
− | and mystery goo.
| |
− |
| |
− | As an example, the coefficient of drag for a craft consisting simply of a [[Mk1-2 Command Pod]] (mass 4, drag 0.2) and a deployed [[Mk16-XL Parachute]] (mass 0.3, drag 500) is:
| |
− |
| |
− | : <math>\frac{4 \cdot 0.2 + 0.3 \cdot 500}{4 + 0.3} = 35.07</math>
| |
− |
| |
− | === Improvements ===
| |
− | The current drag and lift calculations are relatively simplistic, and as such make it relatively simple to get aircraft flying. However, a more sophisticated drag system is planned to be included in version 1.0.<ref>[[article:326|KSP forum official post "Beyond Beta"]]</ref> Meanwhile, some players use the popular [http://forum.kerbalspaceprogram.com/showthread.php/20451-0-21-Ferram-Aerospace-Research-v0-9-5-5-Aerodynamics-Fixes-For-Planes-Rockets Ferram Aerospace Research mod] which implements more realistic drag and lift models.
| |
− |
| |
− | == Terminal velocity ==
| |
− | The [[w:terminal velocity|terminal velocity]] of an object falling through an atmosphere is the velocity at which the force of gravity is equal to the force of drag. Terminal velocity changes as a function of altitude. Given enough time, an object falling into the atmosphere will slow to terminal velocity and then remain at terminal velocity for the rest of its fall.
| |
− |
| |
− | Terminal velocity is important because:
| |
− | # It describes the amount of velocity which a spacecraft must burn away when it is close to the ground.
| |
− | # It represents the speed at which a ship should be traveling upward during a fuel-optimal ascent.
| |
− |
| |
− | The force of gravity (''F<sub>G</sub>'') is:
| |
− |
| |
− | : <math>F_G = m \cdot a = m \cdot \frac{GM}{r^2}</math>
| |
− |
| |
− | where ''m'' is still the ship's mass, ''G'' is the [[Template:G|gravitational constant]], ''M'' is the mass of the planet, and ''r'' is the distance from the ''center'' of the planet to the falling object.
| |
− |
| |
− | To find terminal velocity, we set ''F<sub>G</sub>'' equal to ''F<sub>D</sub>'':
| |
− |
| |
− | : <math>\begin{align}
| |
− | m \cdot \frac{GM}{r^2} &= 0.5 \cdot \rho \cdot v^2 \cdot d \cdot \left(0.008 \frac{\text{m}^2}{\text{kg}} \cdot m\right) \\
| |
− | \frac{GM}{r^2} &= 0.004\frac{\text{m}^2}{\text{kg}} \cdot \rho \cdot v^2 \cdot d \\
| |
− | v &= v_T = \sqrt{\frac{250 \frac{\text{kg}}{\text{m}^2} \cdot GM}{r^2 \cdot \rho \cdot d}}
| |
− | \end{align}</math>
| |
− |
| |
− | Assuming ''d'' is 0.2 (which is a good approximation, provided parachutes are not in use), this simplifies to:
| |
− |
| |
− | : <math>v_T = \sqrt{\frac{1250 \frac{\text{kg}}{\text{m}^2} \cdot GM}{r^2\, \rho}}</math>
| |
− |
| |
− | For the Mk1-2 pod and Mk16XL parachute example pictured above, the drag coefficient is 35.07, so its terminal velocity at sea level on Kerbin (which is 600 km from Kerbin's center) is:
| |
− |
| |
− | : <math>v_T = \sqrt{\frac{250 \frac{\text{kg}}{\text{m}^2} \cdot GM}{r^2\, \rho \cdot 35.07}}</math>
| |
− |
| |
− | : <math>\rho = 1.2230948554874 \frac{\text{kg}}{\text{m}^3 \cdot \text{atm}} \cdot 1 \text{atm} \cdot e^\frac{-0 \text{m}}{5000 \text{m}}</math>
| |
− |
| |
− | : <math>v_T = \sqrt{\frac{250 \frac{\text{kg}}{\text{m}^2} \cdot 6.674 \cdot 10^{-11} \frac{\text{m}^3}{\text{kg} \cdot \text{s}^2} \cdot 5.2915793 \cdot 10^{22} \operatorname{kg}}{(600000 \operatorname{m})^2 \cdot 1.2230948554874 \frac{\text{kg}}{\text{m}^3} \cdot 35.07}} = 7.56 \frac{\text{m}}{\text{s}}</math>
| |
− |
| |
− | === Examples ===
| |
− | {| class="wikitable"
| |
− | !rowspan=2 valign=bottom| Altitude (m) ||colspan=6| v<sub>T</sub> (m/s)
| |
− | |-
| |
− | ! Eve !! Kerbin !! Duna !! Jool !! Laythe
| |
− | |-
| |
− | | 0 || {{sigfigs|{{VT | planet=Eve | alt= 0}}|5}} || {{sigfigs|{{VT | planet=Kerbin | alt= 0}}|5}} || {{sigfigs|{{VT | planet=Duna | alt= 0}}|5}} || {{sigfigs|{{VT | planet=Jool | alt= 0}}|5}} || {{sigfigs|{{VT | planet=Laythe | alt= 0}}|5}}
| |
− | |-
| |
− | | 100 || {{sigfigs|{{VT | planet=Eve | alt= 100}}|5}} || {{sigfigs|{{VT | planet=Kerbin | alt= 100}}|5}} || {{sigfigs|{{VT | planet=Duna | alt= 100}}|5}} || {{sigfigs|{{VT | planet=Jool | alt= 100}}|5}} || {{sigfigs|{{VT | planet=Laythe | alt= 100}}|5}}
| |
− | |-
| |
− | | 1000 || {{sigfigs|{{VT | planet=Eve | alt= 1000}}|5}} || {{sigfigs|{{VT | planet=Kerbin | alt= 1000}}|5}} || {{sigfigs|{{VT | planet=Duna | alt= 1000}}|5}} || {{sigfigs|{{VT | planet=Jool | alt= 1000}}|5}} || {{sigfigs|{{VT | planet=Laythe | alt= 1000}}|5}}
| |
− | |-
| |
− | | 10000 || {{sigfigs|{{VT | planet=Eve | alt=10000}}|5}} || {{sigfigs|{{VT | planet=Kerbin | alt=10000}}|5}} || {{sigfigs|{{VT | planet=Duna | alt=10000}}|5}} || {{sigfigs|{{VT | planet=Jool | alt=10000}}|5}} || {{sigfigs|{{VT | planet=Laythe | alt=10000}}|5}}
| |
− | |}
| |
− |
| |
− | == On-rails physics ==
| |
− | A ship is "on rails" when it's no longer the primary focus of the simulation, which occurs when it's further than 2.25 km from the actively-controlled ship. If such a ship have its orbit passing through a planet's atmosphere, one of two things will happen based on atmospheric pressure at the ship's altitude:
| |
− |
| |
− | * below 0.01 atm: no atmospheric drag will occur — the ship will be completely unaffected
| |
− | * 0.01 atm or above: the ship will disappear
| |
− |
| |
− | The following table gives the altitude of this 0.01 atm threshold for each celestial body with an atmosphere:
| |
− | {| class="wikitable"
| |
− | |-
| |
− | ! Body || Altitude (m)
| |
− | |-
| |
− | | [[Eve]] ||align="right"| {{Formatnum|{{Body data/alt at pressure|pressure=0.01|body=Eve}}}}
| |
− | |-
| |
− | | [[Kerbin]] ||align="right"| {{Formatnum|{{Body data/alt at pressure|pressure=0.01|body=Kerbin}}}}
| |
− | |-
| |
− | | [[Duna]] ||align="right"| {{Formatnum|{{Body data/alt at pressure|pressure=0.01|body=Duna}}}}
| |
− | |-
| |
− | | [[Jool]] ||align="right"| {{Formatnum|{{Body data/alt at pressure|pressure=0.01|body=Jool}}}}
| |
− | |-
| |
− | | [[Laythe]] ||align="right"| {{Formatnum|{{Body data/alt at pressure|pressure=0.01|body=Laythe}}}}
| |
− | |}
| |
| | | |
| == Atmospheric height == | | == Atmospheric height == |
Atmospheric pressure diminishes exponentially with increasing altitude. An atmosphere's scale height is the distance over which atmospheric pressure changes as a factor of e, or 2.718. For example, Kerbin's atmosphere has a scale height of 5000 m, meaning the atmospheric pressure at altitude n is 2.718 times greater than the pressure at altitude n + 5000.
Atmospheres vary in temperature, though this has no bearing on gameplay.
In the game, the force of atmospheric drag is dependent on the shape of a part and which of the part's attachment nodes are in use. (For example, nose cones reduce drag on the part to which they are attached.) A debug-mode option allows you to see the exact drag force on a given part by right-clicking on it.
The atmospheric height depends on the scale height of the celestial body and is where 0.000001th (0.0001%) of the surface pressure remains. Therefore, the atmospheric pressure at the edge of the atmosphere is relative; for example a craft in orbit around Jool can have a lower orbit (relative to the surface) because the surface pressure is higher.