Table Of Contents

Previous topic

scikit-aero

This Page

API Reference

Complete reference of the API.

Isentropic

Isentropic relations.

Routines

mach_angle(M) prandtl_meyer_function(M, gamma=1.4) mach_from_area_ratio(fl, A_Astar)

Classes

IsentropicFlow(gamma)

Examples

>>> from skaero.gasdynamics import isentropic
>>> fl = Isentropic(gamma=1.4)
>>> _, M = isentropic.mach_from_area_ratio(fl, 2.5)
class skaero.gasdynamics.isentropic.IsentropicFlow(gamma=1.4)[source]

Class representing an isentropic flow.

gamma : float, optional
Specific heat ratio, default 7 / 5.
A_Astar(x, *args, **kwargs)[source]

Area ratio from Mach number.

Duct area divided by critial area given Mach number.

M : array_like
Mach number.
A_Astar : array_like
Area ratio.
T_T0(x, *args, **kwargs)[source]

Temperature ratio from Mach number.

M : array_like
Mach number.
T_T0 : array_like
Temperature ratio.
p_p0(x, *args, **kwargs)[source]

Pressure ratio from Mach number.

M : array_like
Mach number.
p_p0 : array_like
Pressure ratio.
rho_rho0(x, *args, **kwargs)[source]

Density ratio from Mach number.

M : array_like
Mach number.
rho_rho0 : array_like
Density ratio.
class skaero.gasdynamics.isentropic.PrandtlMeyerExpansion(M_1, nu, gamma=1.4)[source]

Class representing a Prandtl-Meyer expansion fan.

M_1 : float
Upstream Mach number.
nu : float
Deflection angle, in radians.
gamma : float, optional
Specific heat ratio, default 7 / 5.
ValueError
If given Mach number is subsonic.
  • What does the relationship with the IsentropicFlow class look like?
  • Tests.
M_2[source]

Downstream Mach number.

static nu(M, gamma=1.4)[source]

Turn angle given Mach number.

The result is given by evaluating the Prandtl-Meyer function.

M : float
Mach number.
gamma : float, optional.
Specific heat ratio, default 7 / 5.
nu : float
Turn angle, in radians.
ValueError
If Mach number is subsonic.
skaero.gasdynamics.isentropic.mach_angle(M)[source]

Returns Mach angle given supersonic Mach number.

M : float
Mach number.
mu : float
Mach angle.
ValueError
If given Mach number is subsonic.
skaero.gasdynamics.isentropic.mach_from_area_ratio(fl, A_Astar)[source]

Computes the Mach number given an area ratio asuming isentropic flow.

Uses the relation between Mach number and area ratio for isentropic flow, and returns both the subsonic and the supersonic solution.

fl : IsentropicFlow
Isentropic flow object.
A_Astar : float
Cross sectional area.
out : tuple of floats
Subsonic and supersonic Mach number solution of the equation.
ValueError
If the area ratio is less than 1.0 (the critical area is always the minimum).

Shocks

Shock waves.

Routines

max_deflection(M_1, gamma=1.4) Shock(**kwargs)

The important piece of the module is Shock, which returns a shock object from a variety of combinations of parameters. For more information and examples, see the docstring of Shock.

Examples

>>> from skaero.gasdynamics import shocks
>>> ns = shocks.Shock(M_1=2.0, gamma=1.4)  # Normal shock by default
>>> shocks.Shock(M_1=3.0, theta=np.radians(25), weak=True)
skaero.gasdynamics.shocks.Shock(**kwargs)

Returns an object representing a shock wave.

gamma : float, optional
Specific heat ratio, default 7 / 5.
>>> ss1 = Shock(M_1=1.5)  # Given upstream Mach number (default beta = 90°)
>>> ss1.M_2
0.70108874169309943
>>> ss1.beta
1.5707963267948966
>>> ss1.theta
0.0
>>> ss2 = Shock(M_1=3.0, theta=np.radians(20.0), weak=True)
>>> ss2.beta  # Notice it is an oblique shock
0.6590997534071927
  • This is a list of possible cases
    • M_1(, beta=np.pi / 2) -> _ShockClass(M_1, beta) (only direct case)
    • M_2(, beta=np.pi / 2)
    • p2_p1(, beta=np.pi / 2)
    • ...
    • M_1, theta(, weak=True)
    • M_2, theta(, weak=True)
    • p2_p1, theta(, weak=True)
skaero.gasdynamics.shocks.max_deflection(M_1, gamma=1.4)[source]

Returns maximum deflection angle and corresponding wave angle for given Mach number.

M_1 : float
Upstream Mach number.
gamma : float, optional
Specific heat ratio, default 7 / 5.
theta : float
Maximum deflection angle.
beta : float
Corresponding wave angle.

Atmosphere

COESA model.

Routines

geometric_to_geopotential(z) coesa(h)

Examples

>>> from skaero.atmosphere import coesa
>>> h, T, p, rho = coesa.table(1000)

TODO

  • Check geopotential temperature
  • Move to OOP
skaero.atmosphere.coesa.geometric_to_geopotential(z)[source]

Returns geopotential altitude from geometric altitude.

z : array_like
Geometric altitude in meters.
h : array_like
Geopotential altitude in meters.
skaero.atmosphere.coesa.table(h)[source]

Computes table of COESA atmosphere properties.

Returns temperature, pressure and density COESA values at the given geopotential altitude.

h : array_like
Geopotential altitude given in meters.
h : array_like
Given geopotential altitude in meters.
T : array_like
Temperature in Kelvin.
p : array_like
Pressure in Pascal.
rho : array_like
Density in kilograms per cubic meter.

Based on the U.S. 1976 Standard Atmosphere.