[183] | 1 | ''' |
---|
| 2 | Physical and other constants in one place to achieve consistency across my |
---|
| 3 | scripts. |
---|
| 4 | ''' |
---|
| 5 | |
---|
| 6 | import numpy as n |
---|
| 7 | |
---|
| 8 | # International Standard Atmosphere -> ISA -> isa_ |
---|
| 9 | isa_levels = 7 |
---|
| 10 | # m |
---|
| 11 | isa_lower_boundaries = n.array([0, 11, 20, 32, 47, 51, 71]) * 1e3 |
---|
| 12 | # NB 86km (geometric) corresponds to 84.852km (geopotential) |
---|
| 13 | # I have not derived the above so I am not sure what formula for the height |
---|
| 14 | # dependecy of g -> TODO verify |
---|
| 15 | isa_upper_boundaries = n.array([11, 20, 32, 47, 51, 71, 84.852]) * 1e3 |
---|
| 16 | # Pa = N m^-2 = kg m s^-2 m^-2 = kg m^-1 s^-2 |
---|
| 17 | isa_sea_level_pressure = 101325 |
---|
| 18 | # K |
---|
| 19 | isa_sea_level_temperature = 288.15 |
---|
| 20 | # K/m |
---|
| 21 | isa_temperature_gradient = n.array([-6.5, 0, 1, 2.8, 0, -2.8, -2]) * 1e-3 |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | # m^3 kg^-1 s^-2 and plus minus 0.001 |
---|
| 25 | gravitational_constant = 6.6742e-11 |
---|
| 26 | # m s^-2 |
---|
| 27 | gravitational_acceleration = 9.80665 |
---|
| 28 | |
---|
| 29 | # air |
---|
| 30 | # common g mol-1 here kg mol-1 |
---|
| 31 | nitrogen_molecular_weight = 28.01 * 1e-3 |
---|
| 32 | oxygen_molecular_weight = 32 * 1e-3 |
---|
| 33 | carbon_dioxide_molecular_weight = 44.01 * 1e-3 |
---|
| 34 | water_molecular_weight = 18.02 * 1e-3 |
---|
| 35 | air_molecular_weight = 28.97 * 1e-3 |
---|
| 36 | # J kg^-1 K^-1 (approximate) |
---|
| 37 | dry_air_gas_constant = 287 |
---|
| 38 | # J K^-1 mol^-1 |
---|
| 39 | universal_gas_constant = 8.3143 |
---|
| 40 | # J Kg^-1 K^-1 |
---|
| 41 | air_specific_heat_constant_pressure = 1004 |
---|
| 42 | air_specific_heat_constant_volume = 717 |
---|