flow360.AerospaceCondition#

class AerospaceCondition[source]#

Bases: MultiConstructorBaseModel

Operating condition for aerospace applications. Defines both reference parameters used to compute nondimensional coefficients in postprocessing and the default Freestream boundary condition for the simulation.

Example


type_name: Literal['AerospaceCondition'] = 'AerospaceCondition'#
alpha: AngleType = unyt_quantity(0, 'degree')#

The angle of attack.

Constraints:
  • func = <function _dimensioned_type_serializer at 0x79c44aad7130>

  • return_type = PydanticUndefined

  • when_used = always

beta: AngleType = unyt_quantity(0, 'degree')#

The side slip angle.

Constraints:
  • func = <function _dimensioned_type_serializer at 0x79c44aad7130>

  • return_type = PydanticUndefined

  • when_used = always

velocity_magnitude: VelocityType.NonNegative | None = None#

Freestream velocity magnitude. Used as reference velocity magnitude when reference_velocity_magnitude is not specified.

thermal_state: ThermalState = ThermalState(type_name='ThermalState', private_attribute_constructor='default', private_attribute_input_cache=ThermalStateCache(altitude=None, temperature_offset=None), temperature=unyt_quantity(288.15, 'K'), density=unyt_quantity(1.225, 'kg/m**3'), material=Air(type='air', name='air', dynamic_viscosity=Sutherland(reference_viscosity=unyt_quantity(1.716e-05, 'Pa*s'), reference_temperature=unyt_quantity(273.15, 'K'), effective_temperature=unyt_quantity(110.4, 'K')))) (alias 'atmosphere')#

Reference and freestream thermal state. Defaults to US standard atmosphere at sea level.

reference_velocity_magnitude: VelocityType.Positive | None = None#

Reference velocity magnitude. Is required when velocity_magnitude is 0.

classmethod from_mach(mach, alpha=unyt_quantity(0, 'degree'), beta=unyt_quantity(0, 'degree'), thermal_state=ThermalState(type_name='ThermalState', private_attribute_constructor='default', private_attribute_input_cache=ThermalStateCache(altitude=None, temperature_offset=None), temperature=unyt_quantity(288.15, 'K'), density=unyt_quantity(1.225, 'kg/m**3'), material=Air(type='air', name='air', dynamic_viscosity=Sutherland(reference_viscosity=unyt_quantity(1.716e-05, 'Pa*s'), reference_temperature=unyt_quantity(273.15, 'K'), effective_temperature=unyt_quantity(110.4, 'K')))), reference_mach=None)[source]#

Constructs an AerospaceCondition instance from a Mach number and thermal state.

Parameters:
  • mach (float) – Freestream Mach number (non-negative). Used as reference Mach number when reference_mach is not specified.

  • alpha (AngleType, optional) – The angle of attack. Defaults to 0 * u.deg.

  • beta (AngleType, optional) – The side slip angle. Defaults to 0 * u.deg.

  • thermal_state (ThermalState, optional) – Reference and freestream thermal state. Defaults to US standard atmosphere at sea level.

  • reference_mach (float, optional) – Reference Mach number (positive). If provided, calculates the reference velocity magnitude.

Returns:

An instance of AerospaceCondition with the calculated velocity magnitude and provided parameters.

Return type:

AerospaceCondition

Notes

  • The velocity_magnitude is calculated as mach * thermal_state.speed_of_sound.

  • If reference_mach is provided, the reference_velocity_magnitude is calculated as reference_mach * thermal_state.speed_of_sound.

Examples

Create an aerospace condition with a Mach number of 0.85:

>>> condition = AerospaceCondition.from_mach(mach=0.85)
>>> condition.velocity_magnitude
<calculated_value>

Specify angle of attack and side slip angle:

>>> condition = AerospaceCondition.from_mach(mach=0.85, alpha=5 * u.deg, beta=2 * u.deg)

Include a custom thermal state and reference Mach number:

>>> custom_thermal = ThermalState(temperature=250 * u.K)
>>> condition = AerospaceCondition.from_mach(
...     mach=0.85,
...     thermal_state=custom_thermal,
...     reference_mach=0.8
... )
property mach: Annotated[float, Gt(gt=0)]#

Computes Mach number.