atmosphere

class description

class atmosphere.Atmosphere(**kwargs)[source]

Bases: openmdao.core.explicitcomponent.ExplicitComponent

Compute ambient parameters along the trajectory.

The Atmosphere component requires the following inputs:

  • inputs['z']: aircraft z-position [m]

The Atmosphere component computes the following outputs:

  • outputs['p_0']: ambient pressure [Pa]

  • outputs['rho_0']: ambient density [kg/m3]

  • outputs['T_0']: ambient temperature [K]

  • outputs['c_0']: ambient speed of sound [m/s]

  • outputs['c_bar']: average ambient speed of sound between observer and source [m/s]

  • outputs['mu_0']: ambient dynamic viscosity [kg/ms]

  • outputs['k_0']: ambient thermal conductivity [W/mK]

  • outputs['I_0']: ambient characteristic impedance [kg/m2/s]

compute(inputs: openmdao.vectors.default_vector.DefaultVector, outputs: openmdao.vectors.default_vector.DefaultVector)[source]

Compute outputs given inputs. The model is assumed to be in an unscaled state.

Parameters
  • inputs (Vector) – Unscaled, dimensional input variables read via inputs[key].

  • outputs (Vector) – Unscaled, dimensional output variables read via outputs[key].

  • discrete_inputs (dict or None) – If not None, dict containing discrete input values.

  • discrete_outputs (dict or None) – If not None, dict containing discrete output values.

compute_partials(inputs: openmdao.vectors.default_vector.DefaultVector, partials: openmdao.vectors.default_vector.DefaultVector)[source]

Compute sub-jacobian parts. The model is assumed to be in an unscaled state.

Parameters
  • inputs (Vector) – Unscaled, dimensional input variables read via inputs[key].

  • partials (Jacobian) – Sub-jac components written to partials[output_name, input_name]..

  • discrete_inputs (dict or None) – If not None, dict containing discrete input values.

initialize()[source]

Perform any one-time initialization run at instantiation.

setup()[source]

Declare inputs and outputs.

Available attributes:

name pathname comm options

setup_partials()[source]

Declare partials.

theory

The 1976 US Standard Atmospheric (USSA) model computes the ambient temperature, \(T_0\), pressure, \(p_0\), density, \(\rho_0\), speed of sound, \(c_0\), dynamic viscosity, $mu_0$, and characteristic impedance, \(I_0\), at altitude, \(z\), given the sea level conditions (referenced by subscript sl). A temperature deviation from the USSA model is implemented using \(\Delta T_{USSA}\). The ratio of specific heats, the gravitational constant, the air gas constant and the atmospheric lapse rate are given by $gamma$, \(g\), \(R\), and \(\lambda\), respectively.

\[\begin{split}\begin{array}{lp{2cm}l} T_{USSA} = T_{sl} - \lambda z && c_0 = \sqrt{\gamma R T_0}\\ T_0 = T_{sl} - \lambda z + \Delta T_{USSA} && \mu_0 = \mu_{sl} \left(1.38313 \left[\frac{T_0}{T_{sl}}\right]^{1.5} \right) \bigg/ \left(\frac{T_0}{T_{sl}} + 0.38313 \right) \\ % Sutherlands equation\\ p_0 = p_{sl} \left(\frac{T_{USSA}}{T_{sl}}\right)^{\frac{g}{\lambda R}} && I_0 = \rho_{sl} c_{sl} \left(\frac{p_0}{p_{sl}}\right) \sqrt{\frac{T_{sl}}{T_0}}\\ \rho_0 = \frac{p_0}{RT_0} &&\\ \end{array}\end{split}\]