Cantera
2.3.0
|
The NASA 9 polynomial parameterization for one temperature range. More...
#include <Nasa9Poly1.h>
Public Member Functions | |
Nasa9Poly1 () | |
Empty constructor. More... | |
Nasa9Poly1 (double tlow, double thigh, double pref, const double *coeffs) | |
Normal constructor. More... | |
virtual SpeciesThermoInterpType * | duplMyselfAsSpeciesThermoInterpType () const |
virtual int | reportType () const |
Returns an integer representing the type of parameterization. More... | |
virtual size_t | temperaturePolySize () const |
Number of terms in the temperature polynomial for this parameterization. More... | |
virtual void | updateTemperaturePoly (double T, double *T_poly) const |
Given the temperature T, compute the terms of the temperature polynomial T_poly. More... | |
virtual void | updateProperties (const doublereal *tt, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Update the properties for this species, given a temperature polynomial. More... | |
virtual void | updatePropertiesTemp (const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Compute the reference-state property of one species. More... | |
virtual void | reportParameters (size_t &n, int &type, doublereal &tlow, doublereal &thigh, doublereal &pref, doublereal *const coeffs) const |
This utility function reports back the type of parameterization and all of the parameters for the species. More... | |
virtual void | modifyParameters (doublereal *coeffs) |
Public Member Functions inherited from SpeciesThermoInterpType | |
SpeciesThermoInterpType (double tlow, double thigh, double pref) | |
SpeciesThermoInterpType (const SpeciesThermoInterpType &b) | |
SpeciesThermoInterpType & | operator= (const SpeciesThermoInterpType &b) |
virtual doublereal | minTemp () const |
Returns the minimum temperature that the thermo parameterization is valid. More... | |
virtual doublereal | maxTemp () const |
Returns the maximum temperature that the thermo parameterization is valid. More... | |
virtual doublereal | refPressure () const |
Returns the reference pressure (Pa) More... | |
virtual void | validate (const std::string &name) |
Check for problems with the parameterization, and generate warnings or throw and exception if any are found. More... | |
virtual doublereal | reportHf298 (doublereal *const h298=0) const |
Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) More... | |
virtual void | modifyOneHf298 (const size_t k, const doublereal Hf298New) |
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) More... | |
virtual void | resetHf298 () |
Restore the original heat of formation for this species. More... | |
Protected Attributes | |
vector_fp | m_coeff |
array of polynomial coefficients More... | |
Protected Attributes inherited from SpeciesThermoInterpType | |
doublereal | m_lowT |
lowest valid temperature More... | |
doublereal | m_highT |
Highest valid temperature. More... | |
doublereal | m_Pref |
Reference state pressure. More... | |
The NASA 9 polynomial parameterization for one temperature range.
This parameterization expresses the heat capacity via a 7 coefficient polynomial. Note that this is the form used in the 2002 NASA equilibrium program. A reference to the form is provided below:
"NASA Glenn Coefficients for Calculating Thermodynamic Properties of Individual Species," B. J. McBride, M. J. Zehe, S. Gordon NASA/TP-2002-211556, Sept. 2002
Nine coefficients \((a_0,\dots,a_8)\) are used to represent \( C_p^0(T)\), \( H^0(T)\), and \( S^0(T) \) as polynomials in \( T \) :
\[ \frac{C_p^0(T)}{R} = a_0 T^{-2} + a_1 T^{-1} + a_2 + a_3 T + a_4 T^2 + a_5 T^3 + a_6 T^4 \]
\[ \frac{H^0(T)}{RT} = - a_0 T^{-2} + a_1 \frac{\ln T}{T} + a_2 + \frac{a_3}{2} T + \frac{a_4}{3} T^2 + \frac{a_5}{4} T^3 + \frac{a_6}{5} T^4 + \frac{a_7}{T} \]
\[ \frac{s^0(T)}{R} = - \frac{a_0}{2} T^{-2} - a_1 T^{-1} + a_2 \ln T + a_3 T + \frac{a_4}{2} T^2 + \frac{a_5}{3} T^3 + \frac{a_6}{4} T^4 + a_8 \]
The standard state is assumed to be an ideal gas at the standard pressure of 1 bar, for gases. For condensed species, the standard state is the pure crystalline or liquid substance at the standard pressure of 1 atm.
These NASA representations may have multiple temperature regions through the use of the Nasa9PolyMultiTempRegion object, which uses multiple copies of this Nasa9Poly1 object to handle multiple temperature regions.
Definition at line 61 of file Nasa9Poly1.h.
Nasa9Poly1 | ( | ) |
Empty constructor.
Definition at line 19 of file Nasa9Poly1.cpp.
References SpeciesThermoInterpType::m_Pref, and Cantera::warn_deprecated().
Referenced by Nasa9Poly1::duplMyselfAsSpeciesThermoInterpType().
Nasa9Poly1 | ( | double | tlow, |
double | thigh, | ||
double | pref, | ||
const double * | coeffs | ||
) |
Normal constructor.
tlow | Minimum temperature |
thigh | Maximum temperature |
pref | reference pressure (Pa). |
coeffs | Vector of coefficients used to set the parameters for the standard state. |
Definition at line 27 of file Nasa9Poly1.cpp.
|
virtual |
Implements SpeciesThermoInterpType.
Definition at line 34 of file Nasa9Poly1.cpp.
References Nasa9Poly1::Nasa9Poly1().
|
virtual |
Returns an integer representing the type of parameterization.
Implements SpeciesThermoInterpType.
Definition at line 39 of file Nasa9Poly1.cpp.
References NASA9.
|
inlinevirtual |
Number of terms in the temperature polynomial for this parameterization.
Reimplemented from SpeciesThermoInterpType.
Definition at line 83 of file Nasa9Poly1.h.
|
virtual |
Given the temperature T, compute the terms of the temperature polynomial T_poly.
Reimplemented from SpeciesThermoInterpType.
Definition at line 44 of file Nasa9Poly1.cpp.
Referenced by Nasa9Poly1::updatePropertiesTemp().
|
virtual |
Update the properties for this species, given a temperature polynomial.
This method is called with a pointer to an array containing the functions of temperature needed by this parameterization, and three pointers to arrays where the computed property values should be written. This method updates only one value in each array.
The form and length of the Temperature Polynomial may vary depending on the parameterization.
tt | vector of evaluated temperature functions |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Temperature Polynomial:
Reimplemented from SpeciesThermoInterpType.
Definition at line 55 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff.
Referenced by Nasa9Poly1::updatePropertiesTemp().
|
virtual |
Compute the reference-state property of one species.
Given temperature T in K, this method updates the values of the non- dimensional heat capacity at constant pressure, enthalpy, and entropy, at the reference pressure, of the species.
temp | Temperature (Kelvin) |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Implements SpeciesThermoInterpType.
Definition at line 80 of file Nasa9Poly1.cpp.
References Nasa9Poly1::updateProperties(), and Nasa9Poly1::updateTemperaturePoly().
|
virtual |
This utility function reports back the type of parameterization and all of the parameters for the species.
All parameters are output variables
n | Species index |
type | Integer type of the standard type |
tlow | output - Minimum temperature |
thigh | output - Maximum temperature |
pref | output - reference pressure (Pa). |
coeffs | Vector of coefficients used to set the parameters for the standard state. There are 12 of them, designed to be compatible with the multiple temperature formulation.
|
Implements SpeciesThermoInterpType.
Definition at line 89 of file Nasa9Poly1.cpp.
|
virtual |
Use MultiSpeciesThermo::modifySpecies instead.
Reimplemented from SpeciesThermoInterpType.
Definition at line 107 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff, and Cantera::warn_deprecated().
|
protected |
array of polynomial coefficients
Definition at line 134 of file Nasa9Poly1.h.
Referenced by Nasa9Poly1::modifyParameters(), and Nasa9Poly1::updateProperties().