Air#

class Air[source]#

Bases: MaterialBase

Represents the material properties for air.

Attributes

name: str#
Default:

'air'

dynamic_viscosity: Sutherland | Any#

The dynamic viscosity model or value for air. Defaults to a Sutherland model with standard atmospheric conditions.

Default:

Sutherland()

thermally_perfect_gas: ThermallyPerfectGas#

Thermally perfect gas model with NASA 9-coefficient polynomials for temperature-dependent thermodynamic properties. Defaults to a single-species ‘Air’ with coefficients that reproduce constant gamma=1.4 (calorically perfect gas). For multi-species gas mixtures, specify multiple FrozenSpecies with their respective mass fractions.

Default:

ThermallyPerfectGas()

prandtl_number: float#

Laminar Prandtl number. Default is 0.72 for air.

Default:

0.72

turbulent_prandtl_number: float#

Turbulent Prandtl number. Default is 0.9.

Default:

0.9

Properties

gas_constant: Any#

Returns the specific gas constant for air.

Additional Constructors

classmethod from_file(filename)#

Load a Flow360BaseModel from a .json file.

Parameters:

filename (str)

Return type:

Flow360BaseModel

Methods

get_specific_heat_ratio(temperature)[source]#

Computes the specific heat ratio (gamma) at a given temperature from NASA polynomial.

Parameters:

temperature (Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={'type': 'object', 'properties': {'value': {'$ref': 'https://flexcompute.com/schemas/1.0.0/Float64.json'}, 'units': {'type': 'string'}}, 'required': ['value', 'units'], 'additionalProperties': False}, mode=None)])

Return type:

Annotated[float, Gt(gt=0)]

get_pressure(density, temperature)[source]#

Calculates the pressure of air using the ideal gas law.

Parameters:
  • density (Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={'type': 'object', 'properties': {'value': {'$ref': 'https://flexcompute.com/schemas/1.0.0/PositiveFloat64.json'}, 'units': {'type': 'string'}}, 'required': ['value', 'units'], 'additionalProperties': False}, mode=None)])

  • temperature (Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={'type': 'object', 'properties': {'value': {'$ref': 'https://flexcompute.com/schemas/1.0.0/Float64.json'}, 'units': {'type': 'string'}}, 'required': ['value', 'units'], 'additionalProperties': False}, mode=None)])

Return type:

Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={‘type’: ‘object’, ‘properties’: {‘value’: {‘$ref’: ‘https://flexcompute.com/schemas/1.0.0/PositiveFloat64.json’}, ‘units’: {‘type’: ‘string’}}, ‘required’: [‘value’, ‘units’], ‘additionalProperties’: False}, mode=None)]

get_speed_of_sound(temperature)[source]#

Calculates the speed of sound in air at a given temperature.

Parameters:

temperature (Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={'type': 'object', 'properties': {'value': {'$ref': 'https://flexcompute.com/schemas/1.0.0/Float64.json'}, 'units': {'type': 'string'}}, 'required': ['value', 'units'], 'additionalProperties': False}, mode=None)])

Return type:

Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={‘type’: ‘object’, ‘properties’: {‘value’: {‘$ref’: ‘https://flexcompute.com/schemas/1.0.0/PositiveFloat64.json’}, ‘units’: {‘type’: ‘string’}}, ‘required’: [‘value’, ‘units’], ‘additionalProperties’: False}, mode=None)]

get_dynamic_viscosity(temperature)[source]#

Calculates the dynamic viscosity of air at a given temperature.

Parameters:

temperature (Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={'type': 'object', 'properties': {'value': {'$ref': 'https://flexcompute.com/schemas/1.0.0/Float64.json'}, 'units': {'type': 'string'}}, 'required': ['value', 'units'], 'additionalProperties': False}, mode=None)])

Return type:

Annotated[Any, BeforeValidator(func=~flow360_schema.framework.physical_dimensions.composers._create_validator.<locals>.validate, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~flow360_schema.framework.physical_dimensions.composers._create_serializer.<locals>.serialize, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={‘type’: ‘object’, ‘properties’: {‘value’: {‘$ref’: ‘https://flexcompute.com/schemas/1.0.0/NonNegativeFloat64.json’}, ‘units’: {‘type’: ‘string’}}, ‘required’: [‘value’, ‘units’], ‘additionalProperties’: False}, mode=None)]

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