models.atmosphere¶
machwave.models.atmosphere
¶
Atmosphere
¶
Bases: ABC
Abstract class that represents an atmospheric model.
Source code in machwave/models/atmosphere/base.py
get_density(y_amsl)
abstractmethod
¶
Get the air density at the given altitude above mean sea level (AMSL).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_amsl
|
float
|
Altitude above mean sea level in meters. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Air density in kg/m^3. |
Source code in machwave/models/atmosphere/base.py
get_gravity(y_amsl)
abstractmethod
¶
Get the acceleration due to gravity at the given altitude above mean sea level (AMSL).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_amsl
|
float
|
Altitude above mean sea level in meters. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Acceleration due to gravity in m/s^2. |
Source code in machwave/models/atmosphere/base.py
get_pressure(y_amsl)
abstractmethod
¶
Get the air pressure at the given altitude above mean sea level (AMSL).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_amsl
|
float
|
Altitude above mean sea level in meters. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Air pressure in Pascal (Pa). |
Source code in machwave/models/atmosphere/base.py
get_sonic_velocity(y_amsl)
abstractmethod
¶
Get the speed of sound in air at the given altitude above mean sea level (AMSL).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_amsl
|
float
|
Altitude above mean sea level in meters. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Speed of sound in m/s. |
Source code in machwave/models/atmosphere/base.py
get_viscosity(y_amsl)
abstractmethod
¶
Get the dynamic viscosity of air at the given altitude above mean sea level (AMSL).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_amsl
|
float
|
Altitude above mean sea level in meters. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Dynamic viscosity of air in Pascal-second (Pa-s). |
Source code in machwave/models/atmosphere/base.py
get_wind_velocity(y_amsl)
abstractmethod
¶
Get the wind velocity components at the given altitude above mean sea level (AMSL).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_amsl
|
float
|
Altitude above mean sea level in meters. |
required |
Returns:
| Type | Description |
|---|---|
tuple[float, float]
|
Wind velocity components (Northward, Eastward) in m/s. |
Source code in machwave/models/atmosphere/base.py
Atmosphere1976
¶
Bases: Atmosphere
Atmospheric model based on the 1976 Standard Atmosphere. This model uses the fluids library to calculate the properties of the atmosphere.
Source code in machwave/models/atmosphere/atm_1976.py
Atmosphere1976WindPowerLaw
¶
Bases: Atmosphere1976
Atmospheric model based on the 1976 Standard Atmosphere, using a power-law model for wind velocity variation with altitude.
Source code in machwave/models/atmosphere/atm_1976.py
__init__(v_ref, z_ref, alpha, direction_deg)
¶
Initialize the atmosphere model with power-law wind parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v_ref
|
float
|
Wind speed at the reference height (in m/s). |
required |
z_ref
|
float
|
Reference height (in meters) where the wind speed is known. |
required |
alpha
|
float
|
Wind shear exponent. |
required |
direction_deg
|
float
|
Wind direction in degrees (0° is North, 90° is East). |
required |
Source code in machwave/models/atmosphere/atm_1976.py
get_wind_velocity(y_amsl)
¶
Get the wind velocity components at the given altitude above mean sea level (AMSL) using the power law.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y_amsl
|
float
|
Altitude above mean sea level in meters. |
required |
Returns:
| Type | Description |
|---|---|
tuple[float, float]
|
Wind velocity components (Northward, Eastward) in m/s. |