flow360.operating_condition_from_mach_reynolds

flow360.operating_condition_from_mach_reynolds#

operating_condition_from_mach_reynolds(mach, reynolds, project_length_unit=FieldInfo(annotation=_Constrained, required=True, description='The Length unit of the project.', metadata=[PlainSerializer(func=<function _dimensioned_type_serializer>, return_type=PydanticUndefined, when_used='always')]), temperature=unyt_quantity(288.15, 'K'), alpha=unyt_quantity(0, 'degree'), beta=unyt_quantity(0, 'degree'), reference_mach=None)[source]#

Create an AerospaceCondition from Mach number and Reynolds number.

This function computes the thermal state based on the given Mach number, Reynolds number, and temperature, and returns an AerospaceCondition object initialized with the computed thermal state and given aerodynamic angles.

Parameters:
  • mach (NonNegativeFloat) – Freestream Mach number (must be non-negative).

  • reynolds (PositiveFloat) – Freestream Reynolds number defined with mesh unit (must be positive).

  • project_length_unit (LengthType.Positive) – Project length unit.

  • temperature (AbsoluteTemperatureType, optional) – Freestream static temperature (must be a positive temperature value). Default is 288.15 Kelvin.

  • alpha (AngleType, optional) – Angle of attack. Default is 0 degrees.

  • beta (AngleType, optional) – Sideslip angle. Default is 0 degrees.

  • reference_mach (PositiveFloat, optional) – Reference Mach number. Default is None.

Returns:

An AerospaceCondition object initialized with the given parameters.

Return type:

AerospaceCondition

Raises:
  • ValidationError – If the input values do not meet the specified constraints.

  • ValueError – If required parameters are missing or calculations cannot be performed.

Example

Example usage:

>>> condition = operating_condition_from_mach_reynolds(
...     mach=0.85,
...     reynolds=1e6,
...     project_length_unit=1 * u.mm,
...     temperature=288.15 * u.K,
...     alpha=2.0 * u.deg,
...     beta=0.0 * u.deg,
...     reference_mach=0.85,
... )
>>> print(condition)
AerospaceCondition(...)