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()
... )

Properties

altitude: Any, optional#

Return user specified altitude.

temperature_offset: Any, optional#

Return user specified temperature offset.

speed_of_sound: Any#

Computes speed of sound.

pressure: Any#

Computes pressure.

dynamic_viscosity: Any#

Computes dynamic viscosity.

Additional Constructors

classmethod from_standard_atmosphere(altitude=0 * fl.u.m, temperature_offset=0 * fl.u.K)[source]#

Constructs a ThermalState instance from the standard atmosphere model.

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

  • temperature_offset (DeltaTemperature.Float64, 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>
classmethod from_file(filename)#

Load a Flow360BaseModel from a .json file.

Parameters:

filename (str)

Return type:

Flow360BaseModel

Methods

help(methods=False)#

Print fields and methods of a Flow360BaseModel using rich.

Parameters:

methods (bool)

Return type:

None

to_file(filename, **kwargs)#

Export Flow360BaseModel instance to a .json file.

Parameters:
Return type:

None