fastoad.model_base.atmosphere module

Simple implementation of International Standard Atmosphere.

class fastoad.model_base.atmosphere.Atmosphere(*args, **kwargs)[source]

Bases: object

Simple implementation of International Standard Atmosphere for troposphere and stratosphere.

Atmosphere properties are provided in the same “shape” as provided altitude:

  • if altitude is given as a float, returned values will be floats

  • if altitude is given as a sequence (list, 1D numpy array, …), returned values will be 1D numpy arrays

  • if altitude is given as nD numpy array, returned values will be nD numpy arrays

Usage:

>>> pressure = Atmosphere(30000).pressure # pressure at 30,000 feet, dISA = 0 K
>>> density = Atmosphere(5000, 10).density # density at 5,000 feet, dISA = 10 K


>>> atm = Atmosphere(np.arange(0,10001,1000, 15)) # init for alt. 0 to 10,000, dISA = 15K
>>> temperatures = atm.pressure # pressures for all defined altitudes
>>> viscosities = atm.kinematic_viscosity # viscosities for all defined altitudes
Parameters
  • altitude – altitude (units decided by altitude_in_feet)

  • delta_t – temperature increment (°C) applied to whole temperature profile

  • altitude_in_feet – if True, altitude should be provided in feet. Otherwise, it should be provided in meters.

get_altitude(altitude_in_feet: bool = True) Union[float, Sequence[float]][source]
Parameters

altitude_in_feet – if True, altitude is returned in feet. Otherwise, it is returned in meters

Returns

altitude provided at instantiation

property delta_t: Union[float, Sequence[float]]

Temperature increment applied to whole temperature profile.

property temperature: Union[float, Sequence[float]]

Temperature in K.

property pressure: Union[float, Sequence[float]]

Pressure in Pa.

property density: Union[float, Sequence[float]]

Density in kg/m3.

property speed_of_sound: Union[float, Sequence[float]]

Speed of sound in m/s.

property kinematic_viscosity: Union[float, Sequence[float]]

Kinematic viscosity in m2/s.

property mach: Union[float, Sequence[float]]

Mach number.

property true_airspeed: Union[float, Sequence[float]]

True airspeed (TAS) in m/s.

property equivalent_airspeed: Union[float, Sequence[float]]

Equivalent airspeed (EAS) in m/s.

property unitary_reynolds: Union[float, Sequence[float]]

Unitary Reynolds number in 1/m.

class fastoad.model_base.atmosphere.AtmosphereSI(*args, **kwargs)[source]

Bases: Atmosphere

Same as Atmosphere except that altitudes are always in meters.

Parameters
  • altitude – altitude in meters

  • delta_t – temperature increment (°C) applied to whole temperature profile

property altitude

Altitude in meters.