Skip to content

Types

types

This module contains a set of type aliases for isqx physical quantity kinds and units.

Usage

When annotating functions, use unconstrained generic types:

from aerocore import types as t

def foo(x: t.StaticTemperatureK) -> t.PressurePA:
    ...

This signals to the static type checker that we want an Unknown type, not the Any type. Do not annotate with NDArray[np.float64] or float.

Reasoning: we wish to support a wide range of numerical libraries, so restricting ourselves to numpy will lead to many false positives in strict mode. See https://docs.jax.dev/en/latest/jep/12049-type-annotations.html for more information.

TEMPERATURE_GRADIENT

TEMPERATURE_GRADIENT = QtyKind(
    K * M**-1, ("temperature_gradient",)
)

Temperature lapse rate, e.g., in an atmosphere model.

BelowTropopause

BelowTropopause = 'below_tropopause'

STATIC_TEMPERATURE_BELOW_TROPO

STATIC_TEMPERATURE_BELOW_TROPO = STATIC_TEMPERATURE[
    BelowTropopause
]

STATIC_PRESSURE_BELOW_TROPO

STATIC_PRESSURE_BELOW_TROPO = STATIC_PRESSURE[
    BelowTropopause
]

DENSITY_FACTOR

DENSITY_FACTOR = Dimensionless('density_factor')

COMPRESSIBILITY_FACTOR

COMPRESSIBILITY_FACTOR = Dimensionless(
    "compressibility_factor"
)

LengthM

LengthM = Annotated[_T, LENGTH(M)]

AngleRad

AngleRad = Annotated[_T, ANGLE(RAD)]

GravitationalAcceleration

GravitationalAcceleration = Annotated[
    _T, ACCELERATION_OF_FREE_FALL(M_PERS2)
]

PressurePA

PressurePA = Annotated[_T, PRESSURE(PA)]

PressureHPA

PressureHPA = Annotated[_T, PRESSURE(HECTO * PA)]

DensityKGM3

DensityKGM3 = Annotated[_T, DENSITY(KG * M ** -3)]

StaticTemperatureK

StaticTemperatureK = Annotated[_T, STATIC_TEMPERATURE(K)]

StaticPressurePA

StaticPressurePA = Annotated[_T, STATIC_PRESSURE(PA)]

DynamicPressurePA

DynamicPressurePA = Annotated[_T, DYNAMIC_PRESSURE(PA)]

ImpactPressurePA

ImpactPressurePA = Annotated[_T, IMPACT_PRESSURE(PA)]

TotalPressurePA

TotalPressurePA = Annotated[_T, TOTAL_PRESSURE(PA)]

GasConstantJMolK

GasConstantJMolK = Annotated[
    _T, MOLAR_GAS_CONSTANT(J * MOL**-1 * K**-1)
]

MolarMassKGMol

MolarMassKGMol = Annotated[_T, MOLAR_MASS(KG * MOL ** -1)]

SpecificGasConstantJKGK

SpecificGasConstantJKGK = Annotated[
    _T, SPECIFIC_GAS_CONSTANT(J * KG**-1 * K**-1)
]

TemperatureGradientKPM

TemperatureGradientKPM = Annotated[
    _T, TEMPERATURE_GRADIENT(K * M**-1)
]

StaticTemperatureKBelowTropo

StaticTemperatureKBelowTropo = Annotated[
    _T, STATIC_TEMPERATURE_BELOW_TROPO(K)
]

StaticPressurePABelowTropo

StaticPressurePABelowTropo = Annotated[
    _T, STATIC_PRESSURE_BELOW_TROPO(PA)
]

CasMPS

EasMPS

TasMPS

SpeedOfSoundMPS

SpeedOfSoundMPS = Annotated[_T, SPEED_OF_SOUND(M_PERS)]

GeopotentialAltitudeM

GeopotentialAltitudeM = Annotated[
    _T, GEOPOTENTIAL_ALTITUDE(M)
]

GeometricAltitudeM

GeometricAltitudeM = Annotated[_T, GEOMETRIC_ALTITUDE(M)]

ThrustN

ThrustN = Annotated[_T, FORCE(N)]

MassFlowKgPS

MassFlowKgPS = Annotated[_T, MASS_FLOW_RATE(KG * S ** -1)]

SpecificFuelConsumptionKgPNPS

SpecificFuelConsumptionKgPNPS = Annotated[
    _T,
    THRUST_SPECIFIC_FUEL_CONSUMPTION(KG * N**-1 * S**-1),
]

MachNumber

MachNumber = Annotated[_T, MACH_NUMBER]

RatioOfSpecificHeats

RatioOfSpecificHeats = Annotated[_T, HEAT_CAPACITY_RATIO]

DensityFactor

DensityFactor = Annotated[_T, DENSITY_FACTOR]

CompressibilityFactor

CompressibilityFactor = Annotated[
    _T, COMPRESSIBILITY_FACTOR
]

BypassRatio

BypassRatio = Annotated[_T, BYPASS_RATIO]

DeltaTemperatureK

DeltaTemperatureK = Annotated[_T, TEMPERATURE[DELTA](K)]

DeltaLengthM

DeltaLengthM = Annotated[_T, LENGTH[DELTA](M)]