flow360.ThermalState#

class ThermalState[source]#

Bases: MultiConstructorBaseModel

Represents the thermal state of a fluid with specific properties.

Example

>>> fl.ThermalState(
...     temperature=300 * fl.u.K,
...     density=1.225 * fl.u.kg / fl.u.m**3,
...     material=fl.Air()
... )

type_name: Literal['ThermalState'] = 'ThermalState'#
temperature: AbsoluteTemperatureType = unyt_quantity(288.15, 'K')#

The temperature of the fluid.

Constraints:
  • func = <function _check_temperature_is_physical at 0x79c44aad76d0>

  • return_type = PydanticUndefined

  • when_used = always

density: DensityType.Positive = unyt_quantity(1.225, 'kg/m**3')#

The density of the fluid.

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

  • return_type = PydanticUndefined

  • when_used = always

material: FluidMaterialTypes = 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')))#

The material of the fluid.

classmethod from_standard_atmosphere(altitude=unyt_quantity(0, 'm'), temperature_offset=unyt_quantity(0, 'K'))[source]#

Constructs a ThermalState instance from the standard atmosphere model.

Parameters:
  • altitude (LengthType, optional) – The altitude at which the thermal state is calculated. Defaults to 0 * u.m.

  • temperature_offset (DeltaTemperatureType, optional) – The temperature offset to be applied to the standard temperature at the given altitude. Defaults to 0 * u.K.

Returns:

A thermal state representing the atmospheric conditions at the specified altitude and temperature offset.

Return type:

ThermalState

Notes

  • This method uses the StandardAtmosphereModel to compute the standard atmospheric conditions based on the given altitude.

  • The temperature_offset allows for adjustments to the standard temperature, simulating non-standard atmospheric conditions.

Examples

Create a thermal state at an altitude of 10,000 meters:

>>> thermal_state = ThermalState.from_standard_atmosphere(altitude=10000 * u.m)
>>> thermal_state.temperature
<calculated_temperature>
>>> thermal_state.density
<calculated_density>

Apply a temperature offset of -5 Fahrenheit at 5,000 meters:

>>> thermal_state = ThermalState.from_standard_atmosphere(
...     altitude=5000 * u.m,
...     temperature_offset=-5 * u.delta_degF
... )
>>> thermal_state.temperature
<adjusted_temperature>
>>> thermal_state.density
<adjusted_density>
property altitude: Annotated[_LengthType, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)] | None#

Return user specified altitude.

property temperature_offset: Annotated[_DeltaTemperatureType, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)] | None#

Return user specified temperature offset.

property speed_of_sound: Annotated[_Constrained, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)]#

Computes speed of sound.

property pressure: Annotated[_Constrained, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)]#

Computes pressure.

property dynamic_viscosity: Annotated[_Constrained, PlainSerializer(func=_dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always)]#

Computes dynamic viscosity.