FrozenSpecies#

class FrozenSpecies[source]#

Bases: Flow360BaseModel

Represents a single gas species with NASA 9-coefficient thermodynamic properties.

Used within ThermallyPerfectGas to define multi-species gas mixtures where each species contributes to the mixture properties weighted by mass fraction. The term “frozen” indicates fixed mass fractions (non-reacting flow).

Example

>>> fl.FrozenSpecies(
...     name="N2",
...     nasa_9_coefficients=fl.NASA9Coefficients(
...         temperature_ranges=[
...             fl.NASA9CoefficientSet(
...                 temperature_range_min=200.0 * fl.u.K,
...                 temperature_range_max=6000.0 * fl.u.K,
...                 coefficients=[0.0, 0.0, 3.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
...             )
...         ]
...     ),
...     mass_fraction=0.7555
... )

Attributes

name: str#

Species name (e.g., ‘N2’, ‘O2’, ‘Ar’)

nasa_9_coefficients: NASA9Coefficients#

NASA 9-coefficient polynomial for this species

mass_fraction: float#

Mass fraction of this species (must sum to 1 across all species in mixture)

Additional Constructors

classmethod from_file(filename)#

Loads a Flow360BaseModel from .json, or .yaml file.

Parameters:

filename (str) – Full path to the .yaml or .json file to load the Flow360BaseModel from.

Returns:

An instance of the component class calling load.

Return type:

Flow360BaseModel

Example

>>> params = Flow360BaseModel.from_file(filename='folder/sim.json') 

Methods

help(methods=False)#

Prints message describing the fields and methods of a Flow360BaseModel.

Parameters:

methods (bool = False) – Whether to also print out information about object’s methods.

Return type:

None

Example

>>> params.help(methods=True) 
to_file(filename, **kwargs)#

Exports Flow360BaseModel instance to .json or .yaml file

Parameters:

filename (str) – Full path to the .json or .yaml or file to save the Flow360BaseModel to.

Return type:

None

Example

>>> params.to_file(filename='folder/flow360.json')