Skip to content

Air

Air

`Wikipedia https://fr.wikipedia.org/wiki/Air models.

dynamic_viscosity staticmethod

dynamic_viscosity(
    air_temperature: floatArrayLike,
) -> floatArrayLike

Compute air dynamic viscosity.

Parameters:

Name Type Description Default

air_temperature

float | ndarray

Air temperature (in Celsius)

required

Returns:

Type Description
floatArrayLike

float | numpy.ndarray: Dynamic viscosity in kg·m⁻¹·s⁻¹.

Source code in src/thermohl/power/olla/air.py
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@staticmethod
def dynamic_viscosity(air_temperature: floatArrayLike) -> floatArrayLike:
    r"""Compute air dynamic viscosity.

    Args:
        air_temperature (float | numpy.ndarray): Air temperature (in Celsius)

    Returns:
        float | numpy.ndarray: Dynamic viscosity in kg·m⁻¹·s⁻¹.

    """
    air_temperature_k = kelvin(air_temperature)
    return (
        8.8848e-15 * air_temperature_k**3
        - 3.2398e-11 * air_temperature_k**2
        + 6.2657e-08 * air_temperature_k
        + 2.3543e-06
    )

kinematic_viscosity staticmethod

kinematic_viscosity(
    air_temperature: floatArrayLike,
    altitude: floatArrayLike = 0.0,
) -> floatArrayLike

Compute air kinematic viscosity.

Parameters:

Name Type Description Default

air_temperature

float | ndarray

Air temperature (in Celsius)

required

altitude

float | ndarray

Altitude above sea-level. The default is 0.

0.0

Returns:

Type Description
floatArrayLike

float | numpy.ndarray: Kinematic viscosity in m²·s⁻¹.

Source code in src/thermohl/power/olla/air.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@staticmethod
def kinematic_viscosity(
    air_temperature: floatArrayLike, altitude: floatArrayLike = 0.0
) -> floatArrayLike:
    r"""Compute air kinematic viscosity.

    Args:
        air_temperature (float | numpy.ndarray): Air temperature (in Celsius)
        altitude (float | numpy.ndarray, optional): Altitude above sea-level. The default is 0.

    Returns:
        float | numpy.ndarray: Kinematic viscosity in m²·s⁻¹.

    """
    return Air.dynamic_viscosity(air_temperature) / Air.volumic_mass(
        air_temperature, altitude=altitude
    )

thermal_conductivity staticmethod

thermal_conductivity(
    air_temperature: floatArrayLike,
) -> floatArrayLike

Compute air thermal conductivity.

The output is valid for input in [-150, 1300] range (in Celsius)

Parameters:

Name Type Description Default

air_temperature

float | ndarray

Air temperature (in Celsius)

required

Returns:

Type Description
floatArrayLike

float | numpy.ndarray: Thermal conductivity in W·m⁻¹·K⁻¹.

Source code in src/thermohl/power/olla/air.py
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
@staticmethod
def thermal_conductivity(air_temperature: floatArrayLike) -> floatArrayLike:
    r"""Compute air thermal conductivity.

    The output is valid for input in [-150, 1300] range (in Celsius)

    Args:
        air_temperature (float | numpy.ndarray): Air temperature (in Celsius)

    Returns:
        float | numpy.ndarray: Thermal conductivity in W·m⁻¹·K⁻¹.

    """
    air_temperature_k = kelvin(air_temperature)
    return (
        1.5207e-11 * air_temperature_k**3
        - 4.8570e-08 * air_temperature_k**2
        + 1.0184e-04 * air_temperature_k
        - 3.9333e-04
    )

volumic_mass staticmethod

volumic_mass(
    air_temperature: floatArrayLike,
    altitude: floatArrayLike = 0.0,
) -> floatArrayLike

Compute air volumic mass.

If both inputs are numpy arrays, they should have the same size.

Parameters:

Name Type Description Default

air_temperature

float | ndarray

Air temperature (in Celsius).

required

altitude

float | ndarray

Altitude above sea-level. The default is 0.

0.0

Returns:

Type Description
floatArrayLike

float | numpy.ndarray: Volumic mass in kg·m⁻³.

Source code in src/thermohl/power/olla/air.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@staticmethod
def volumic_mass(
    air_temperature: floatArrayLike, altitude: floatArrayLike = 0.0
) -> floatArrayLike:
    r"""
    Compute air volumic mass.

    If both inputs are numpy arrays, they should have the same size.

    Args:
        air_temperature (float | numpy.ndarray): Air temperature (in Celsius).
        altitude (float | numpy.ndarray, optional): Altitude above sea-level. The default is 0.

    Returns:
        float | numpy.ndarray: Volumic mass in kg·m⁻³.

    """
    air_temperature_k = kelvin(air_temperature)
    return (
        1.292
        * _zerok
        * np.exp(-3.42e-02 * altitude / air_temperature_k)
        / air_temperature_k
    )