NASA9Coefficients#

class NASA9Coefficients[source]#

Bases: Flow360BaseModel

NASA 9-coefficient polynomial coefficients for computing temperature-dependent thermodynamic properties.

Attributes

temperature_ranges: list[NASA9CoefficientSet]#

List of NASA 9-coefficient sets for different temperature ranges. Must be ordered by increasing temperature and be continuous. Maximum 5 ranges supported.

Methods

validate_temperature_continuity()[source]#

Validate that temperature ranges are continuous and non-overlapping.

validate_thermo_continuity()[source]#

Validate that adjacent NASA-9 ranges agree on cp, h and s where they meet.

Consecutive ranges are separate fits of one substance, so the polynomials must agree at the boundary they share. Nothing in the fit enforces that: cp comes out continuous on its own, but h and s also depend on the a7 and a8 integration constants, which are set per range and so can disagree. A jump in h drives the solver’s nodal caloric surrogate to a negative heat capacity and aborts the run; a jump in s is quieter but reaches stagnation pressure as exp(ds/R).

The tolerance is set by transcription, not by the fits: the curated library agrees to 5e-7 in cp/R and s/R and to 5e-5 in h/(R T), so 1e-4 passes every entry while catching discontinuities orders of magnitude smaller than the ones that break the solver.

classmethod constant_gamma(gamma)[source]#

Coefficients of a calorically perfect gas with specific heat ratio gamma in (1, 5/3].

Parameters:

gamma (Annotated[float, Gt(gt=0)])

get_coefficients_at_temperature(temp_k)[source]#

Get the NASA 9 coefficients for a given temperature.

Parameters:

temp_k (float)

Return type:

list