2021-01-11 10:54:24 +01:00
|
|
|
from input.natural_constants import *
|
|
|
|
import numpy as np
|
|
|
|
|
|
|
|
# ATMOSPHERE MODEL:
|
|
|
|
|
2021-04-09 13:36:19 +02:00
|
|
|
|
2021-05-03 10:41:42 +02:00
|
|
|
def T_air_simple(h):
|
2021-04-09 13:36:19 +02:00
|
|
|
if 0 <= h <= 11000:
|
2021-01-11 10:54:24 +01:00
|
|
|
res = 288.15 - 0.0065 * h
|
2021-04-09 13:36:19 +02:00
|
|
|
elif 11000 < h <= 20000:
|
2021-01-11 10:54:24 +01:00
|
|
|
res = 216.65
|
|
|
|
elif h >= 20000:
|
|
|
|
res = 216.65 + 0.0010 * (h - 20000)
|
2021-04-09 13:36:19 +02:00
|
|
|
return res
|
|
|
|
|
|
|
|
|
2021-05-03 10:41:42 +02:00
|
|
|
def p_air_simple(h):
|
2021-04-09 13:36:19 +02:00
|
|
|
if 0 <= h <= 11000:
|
2021-01-11 10:54:24 +01:00
|
|
|
res = 101325 * ((288.15 - 0.0065 * h)/288.15) ** 5.25577
|
2021-04-09 13:36:19 +02:00
|
|
|
elif 11000 < h <= 20000:
|
2021-01-11 10:54:24 +01:00
|
|
|
res = 22632 * np.exp(-(h - 11000)/6341.62)
|
|
|
|
elif h > 20000:
|
|
|
|
res = 5474.87 * ((216.65 + 0.0010 * (h - 20000))/216.65) ** (-34.163)
|
2021-04-09 13:36:19 +02:00
|
|
|
return res
|
|
|
|
|
|
|
|
|
2021-05-03 10:41:42 +02:00
|
|
|
def rho_air_simple(h):
|
2021-01-11 10:54:24 +01:00
|
|
|
res = p_air(h)/(R_air * T_air(h))
|
2021-04-09 13:36:19 +02:00
|
|
|
return res
|