NASA9CoefficientSet#

class NASA9CoefficientSet[source]#

Bases: Flow360BaseModel

Represents a set of 9 NASA polynomial coefficients for a specific temperature range.

The NASA 9-coefficient polynomial (McBride et al., 2002) computes thermodynamic properties as:

cp/R = a0*T^-2 + a1*T^-1 + a2 + a3*T + a4*T^2 + a5*T^3 + a6*T^4

h/RT = -a0*T^-2 + a1*ln(T)/T + a2 + (a3/2)*T + (a4/3)*T^2 + (a5/4)*T^3 + (a6/5)*T^4 + a7/T

s/R = -(a0/2)*T^-2 - a1*T^-1 + a2*ln(T) + a3*T + (a4/2)*T^2 + (a5/3)*T^3 + (a6/4)*T^4 + a8

Coefficients: - a0-a6: cp polynomial coefficients - a7: enthalpy integration constant - a8: entropy integration constant

Example

>>> fl.NASA9CoefficientSet(
...     temperature_range_min=200.0 * fl.u.K,
...     temperature_range_max=1000.0 * fl.u.K,
...     coefficients=[0.0, 0.0, 3.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
... )

Attributes

temperature_range_min: AbsoluteTemperatureType#

Minimum temperature for which this coefficient set is valid.

temperature_range_max: AbsoluteTemperatureType#

Maximum temperature for which this coefficient set is valid.

coefficients: list[float]#

Nine NASA polynomial coefficients [a0, a1, a2, a3, a4, a5, a6, a7, a8]. a0-a6 are cp/R polynomial coefficients, a7 is the enthalpy integration constant, and a8 is the entropy integration constant.

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')