rizer.kin.extend_NASA9_temperature_limits#

Attributes#

Functions#

extend_nasa9_temperature_limits(→ None)

Extend temperature limits of NASA9 polynomial thermo data for Cantera.

Module Contents#

rizer.kin.extend_NASA9_temperature_limits.c#
rizer.kin.extend_NASA9_temperature_limits.extend_nasa9_temperature_limits(mechanism_to_extend: pathlib.Path, new_mechanism_to_write: pathlib.Path | None = None, excluded_species: list[str] | None = None, max_temperature_extrapolated: float = 100000.0, number_of_points_fit: int = 1000, plot: bool = False, check_coefficients: bool = True, skip_on_check: bool = False) None#

Extend temperature limits of NASA9 polynomial thermo data for Cantera.

This is needed because Cantera extrapolates the data at high temperature, which can lead to unphysical results (diverging Cp, etc.).

Extension is done by keeping constant values of Cp, H, and S at the maximum valid temperature, and extending them to max_temperature_extrapolated [K].

Then, pmutt is used to fit the data from Cantera in the valid zone, and then extend them with constant values at high temperature. This will give us a NASA9 polynomial set that we can use in Cantera.

Parameters:
  • mechanism_to_extend (pathlib.Path) – Path to the mechanism file to extend.

  • new_mechanism_to_write (pathlib.Path or None, optional) – Path to the new mechanism file to write. If None, the new mechanism will not be written to a file, by default None.

  • excluded_species (list of str or None, optional) – List of species names to exclude from the extension. If None, all species will be included, by default None.

  • max_temperature_extrapolated (float, optional) – Maximum temperature to extrapolate to, in K, by default 100_000.0.

  • number_of_points_fit (int, optional) – Number of points to use for fitting the NASA9 polynomials, by default 1_000.

  • plot (bool, optional) – Whether to plot the results, by default False.

  • check_coefficients (bool, optional) – Whether to check that the coefficients are the same as in Cantera, except for the extra zones, by default True.

  • skip_on_check (bool, optional) – Whether to skip the species if the coefficients check fails, by default False.

Raises:
  • FileNotFoundError – If the mechanism file to extend is not found.

  • ValueError – If max_temperature_extrapolated is not greater than max_temperature_valid. If the coefficients are not the same as in Cantera, except for the extra zones.

rizer.kin.extend_NASA9_temperature_limits.path_to_thermo_data#