-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
36 lines (27 loc) · 1.47 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Constants
R_universal = 8.3144598 # universal gas constant, J/(mol*K)
MM_air = 0.0289644 # molar mass of air, kg/mol
adiabatic_index_air = 1.4 # unitless
"""Notes on adiabatic index (also known as the heat capacity ratio or ratio of specific heats (cp/cv)) for air
As per https://www.grc.nasa.gov/WWW/BGH/realspec.html, air is calorically perfect up to low supersonic Mach numbers, so the adiabatic index doesn't change with airspeed over the speeds that most hobbyist or collegiate team rockets will experience.
As a function of teperature, for dry air, the adiabatic index according to different sources is:
https://en.wikipedia.org/wiki/Heat_capacity_ratio
- 1.404 at -15°C
- 1.403 at 0°C
- 1.400 at 20°C
- 1.398 at 200°C
https://www.chemeurope.com/en/encyclopedia/Heat_capacity_ratio.html
- 1.403 at 0°C
- 1.400 at 20°C
- 1.401 at 100°C
The value of 1.4 is a very good approximation for the temperature ranges that most hobbyist or collegiate team rockets will experience.
"""
# Derived constants
R_specific_air = R_universal / MM_air # J/(kg*K)
adiabatic_index_air_times_R_specific_air = adiabatic_index_air * R_specific_air # J/(kg*K)
# Conversion factors
ft_to_m_conversion = 0.3048 # m/ft
m_to_ft_conversion = 1/ft_to_m_conversion # ft/m
# Default launch site values. Specific launch site values can be set at initialization of the Location class.
F_gravity = 9.80665 # m/s^2
T_lapse_rate = -0.0065 # K/m