Directory for sub-models
sub-models: -drag model -thermal model -sun position -atmoshphere model (for development purposes)
This commit is contained in:
28
models/simple_atmosphere.py
Normal file
28
models/simple_atmosphere.py
Normal file
@ -0,0 +1,28 @@
|
||||
from input.natural_constants import *
|
||||
import numpy as np
|
||||
|
||||
# ATMOSPHERE MODEL:
|
||||
|
||||
def T_air(h):
|
||||
if h >= 0 and h <= 11000:
|
||||
res = 288.15 - 0.0065 * h
|
||||
return res
|
||||
elif h > 11000 and h <= 20000:
|
||||
res = 216.65
|
||||
return res
|
||||
elif h >= 20000:
|
||||
res = 216.65 + 0.0010 * (h - 20000)
|
||||
return res
|
||||
def p_air(h):
|
||||
if h >= 0 and h <= 11000:
|
||||
res = 101325 * ((288.15 - 0.0065 * h)/288.15) ** 5.25577
|
||||
return res
|
||||
elif h > 11000 and h <= 20000:
|
||||
res = 22632 * np.exp(-(h - 11000)/6341.62)
|
||||
return res
|
||||
elif h > 20000:
|
||||
res = 5474.87 * ((216.65 + 0.0010 * (h - 20000))/216.65) ** (-34.163)
|
||||
return res
|
||||
def rho_air(h):
|
||||
res = p_air(h)/(R_air * T_air(h))
|
||||
return res
|
Reference in New Issue
Block a user