flight_mech.atmosphere module#
Module providing simple atmospheric models.
- class flight_mech.atmosphere.AtmosphereModel[source]#
- Bases: - ABC- Atmosphere abstract class. - abstract static compute_altitude_from_sigma(sigma: float) float[source]#
- Compute the altitude corresponding to the given density coefficient. - Parameters:
- sigma (float) – Density coefficient. 
- Returns:
- Altitude in meters. 
- Return type:
- float 
 
 - abstract classmethod compute_density_from_altitude(z: float) float[source]#
- Compute the air density. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Air density in kg.m-3 
- Return type:
- float 
 
 - abstract static compute_sigma_from_altitude(z: float) float[source]#
- Compute the density coefficient sigma. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Density coefficient. 
- Return type:
- float 
 
 - gas_model: GasModel#
 - plot_graph(variable: Literal['pressure', 'temperature', 'density', 'sound_speed', 'dynamic_viscosity'], min_altitude: float = 0.0, max_altitude: float = 20000.0, nb_points: int = 100, **kwargs)[source]#
- Plot the graph of evolution of the given variable in the atmosphere. - Parameters:
- variable (Literal["pressure", "temperature", "density", "sound_speed", "dynamic_viscosity"]) – Name of the variable to plot. 
- min_altitude (float, optional) – Minimum altitude on the plot in meters, by default 0. 
- max_altitude (float, optional) – Maximum altitude on the plot in meters, by default 20000. 
- nb_points (int, optional) – Number of points in the plot. 
 
 - Note - For more details on the optional arguments, please check flight_mech._common.plot_graph. 
 
- class flight_mech.atmosphere.ConstantAtmosphere[source]#
- Bases: - AtmosphereModel- A constant atmosphere model. Used for test purposes only. - static compute_altitude_from_sigma(sigma: float)[source]#
- Compute the altitude corresponding to the given density coefficient. - Parameters:
- sigma (float) – Density coefficient. 
- Returns:
- Altitude in meters. 
- Return type:
- float 
 
 - classmethod compute_density_from_altitude(z: float)[source]#
- Compute the air density. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Air density in kg.m-3 
- Return type:
- float 
 
 - static compute_sigma_from_altitude(z: float)[source]#
- Compute the density coefficient sigma. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Density coefficient. 
- Return type:
- float 
 
 - gas_model: GasModel = <flight_mech.gas.Air object>#
 
- class flight_mech.atmosphere.LinearAtmosphere[source]#
- Bases: - AtmosphereModel- A very basic linear model for the atmosphere allowing to compute the density only. - static compute_altitude_from_sigma(sigma: float)[source]#
- Compute the altitude corresponding to the given density coefficient. - Parameters:
- sigma (float) – Density coefficient. 
- Returns:
- Altitude in meters. 
- Return type:
- float 
 
 - classmethod compute_density_from_altitude(z: float)[source]#
- Compute the air density. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Air density in kg.m-3 
- Return type:
- float 
 
 - static compute_sigma_from_altitude(z: float)[source]#
- Compute the density coefficient sigma. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Density coefficient. 
- Return type:
- float 
 
 - gas_model: GasModel = <flight_mech.gas.Air object>#
 
- class flight_mech.atmosphere.StandardAtmosphere[source]#
- Bases: - AtmosphereModel- International Standard Atmosphere model to compute pressure, temperature and density with altitude. - Notes - For more details, see: https://en.wikipedia.org/wiki/International_Standard_Atmosphere. For the original paper, see: https://www.digitaldutch.com/atmoscalc/US_Standard_Atmosphere_1976.pdf. - classmethod compute_altitude_from_sigma(sigma: float)[source]#
- Compute the altitude from a given density ratio. This only works for altitude below 20km. - Parameters:
- z (float) – Density ratio. 
- Returns:
- Altitude in m. 
- Return type:
- float 
 
 - classmethod compute_density_from_altitude(z: float)[source]#
- Compute the air density. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Air density in kg.m-3 
- Return type:
- float 
 
 - classmethod compute_dynamic_viscosity_from_altitude(z: float)[source]#
- Compute the dynamic viscosity at a given altitude. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Dynamic viscosity in kg.m-1.s-1. 
- Return type:
- float 
 
 - classmethod compute_kinematic_viscosity_from_altitude(z: float)[source]#
- Compute the kinematic viscosity at a given altitude. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Kinematic viscosity in m2.s-1. 
- Return type:
- float 
 
 - static compute_pressure_from_altitude(z: float)[source]#
- Compute the pressure at a given altitude. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Air pressure in Pa. 
- Return type:
- float 
 
 - classmethod compute_sigma_from_altitude(z: float)[source]#
- Compute the density coefficient sigma. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Density coefficient. 
- Return type:
- float 
 
 - classmethod compute_sound_speed_from_altitude(z: float)[source]#
- Compute the sound speed at a given altitude. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Sound speed in m.s-1. 
- Return type:
- float 
 
 - static compute_temperature_from_altitude(z: float)[source]#
- Compute the temperature at a given altitude. - Parameters:
- z (float) – Altitude in meters. 
- Returns:
- Air temperature in K. 
- Return type:
- float 
 
 - gas_model: GasModel = <flight_mech.gas.Air object>#
 
 
    