Cantera
2.0
|
The NASA 9 polynomial parameterization for one temperature range. More...
#include <Nasa9Poly1.h>
Public Member Functions | |
Nasa9Poly1 () | |
Empty constructor. | |
Nasa9Poly1 (size_t n, doublereal tlow, doublereal thigh, doublereal pref, const doublereal *coeffs) | |
constructor used in templated instantiations | |
Nasa9Poly1 (const Nasa9Poly1 &b) | |
copy constructor | |
Nasa9Poly1 & | operator= (const Nasa9Poly1 &b) |
assignment operator | |
virtual | ~Nasa9Poly1 () |
Destructor. | |
virtual SpeciesThermoInterpType * | duplMyselfAsSpeciesThermoInterpType () const |
duplicator | |
virtual doublereal | minTemp () const |
Returns the minimum temperature that the thermo parameterization is valid. | |
virtual doublereal | maxTemp () const |
Returns the maximum temperature that the thermo parameterization is valid. | |
virtual doublereal | refPressure () const |
Returns the reference pressure (Pa) | |
virtual int | reportType () const |
Returns an integer representing the type of parameterization. | |
virtual size_t | speciesIndex () const |
Returns an integer representing the species index. | |
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. | |
virtual void | updatePropertiesTemp (const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Compute the reference-state property of one species. | |
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, index. | |
virtual void | modifyParameters (doublereal *coeffs) |
Modify parameters for the standard state. | |
Protected Attributes | |
doublereal | m_lowT |
lowest valid temperature | |
doublereal | m_highT |
highest valid temperature | |
doublereal | m_Pref |
standard-state pressure | |
size_t | m_index |
species index | |
vector_fp | m_coeff |
array of polynomial coefficients | |
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_6)\) 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 + a_3 T + a_4 T^2 + a_5 T^3 + a_6 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 71 of file Nasa9Poly1.h.
Nasa9Poly1 | ( | ) |
Empty constructor.
Definition at line 65 of file Nasa9Poly1.cpp.
Referenced by Nasa9Poly1::duplMyselfAsSpeciesThermoInterpType().
Nasa9Poly1 | ( | size_t | n, |
doublereal | tlow, | ||
doublereal | thigh, | ||
doublereal | pref, | ||
const doublereal * | coeffs | ||
) |
constructor used in templated instantiations
n | Species index |
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 79 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff.
Nasa9Poly1 | ( | const Nasa9Poly1 & | b | ) |
copy constructor
b | object to be copied |
Definition at line 95 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff.
|
virtual |
Destructor.
Definition at line 126 of file Nasa9Poly1.cpp.
Nasa9Poly1 & operator= | ( | const Nasa9Poly1 & | b | ) |
assignment operator
b | object to be copied |
Definition at line 111 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff, Nasa9Poly1::m_highT, Nasa9Poly1::m_index, Nasa9Poly1::m_lowT, and Nasa9Poly1::m_Pref.
|
virtual |
duplicator
Implements SpeciesThermoInterpType.
Definition at line 132 of file Nasa9Poly1.cpp.
References Nasa9Poly1::Nasa9Poly1().
|
virtual |
Returns the minimum temperature that the thermo parameterization is valid.
Implements SpeciesThermoInterpType.
Definition at line 140 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_lowT.
|
virtual |
Returns the maximum temperature that the thermo parameterization is valid.
Implements SpeciesThermoInterpType.
Definition at line 147 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_highT.
|
virtual |
Returns the reference pressure (Pa)
Implements SpeciesThermoInterpType.
Definition at line 153 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_Pref.
|
virtual |
Returns an integer representing the type of parameterization.
Implements SpeciesThermoInterpType.
Definition at line 159 of file Nasa9Poly1.cpp.
References NASA9.
|
virtual |
Returns an integer representing the species index.
Implements SpeciesThermoInterpType.
Definition at line 165 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_index.
|
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.
Temperature Polynomial: tt[0] = t; tt[1] = t*t; tt[2] = t*t*t; tt[3] = t*t*t*t; tt[4] = 1.0/t; tt[5] = 1.0/(t*t); tt[6] = std::log(t);
tt | vector of temperature polynomials |
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). |
Reimplemented from SpeciesThermoInterpType.
Definition at line 194 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff, Nasa9Poly1::m_index, and Cantera::OneThird.
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, Pref of one of the species. The species index is used to reference into the cp_R, h_RT, and s_R arrays.
Temperature Polynomial: tt[0] = t; tt[1] = t*t; tt[2] = t*t*t; tt[3] = t*t*t*t; tt[4] = 1.0/t; tt[5] = 1.0/(t*t); tt[6] = std::log(t);
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 249 of file Nasa9Poly1.cpp.
References Nasa9Poly1::updateProperties().
|
virtual |
This utility function reports back the type of parameterization and all of the parameters for the species, index.
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. coeffs[0] is equal to one. coeffs[1] is min temperature coeffs[2] is max temperature coeffs[3+i] from i =0,9 are the coefficients themselves |
Implements SpeciesThermoInterpType.
Definition at line 278 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff, Nasa9Poly1::m_highT, Nasa9Poly1::m_index, Nasa9Poly1::m_lowT, Nasa9Poly1::m_Pref, and NASA9.
|
virtual |
Modify parameters for the standard state.
coeffs | Vector of coefficients used to set the parameters for the standard state. |
Reimplemented from SpeciesThermoInterpType.
Definition at line 302 of file Nasa9Poly1.cpp.
References Nasa9Poly1::m_coeff.
|
protected |
lowest valid temperature
Definition at line 219 of file Nasa9Poly1.h.
Referenced by Nasa9Poly1::minTemp(), Nasa9Poly1::operator=(), and Nasa9Poly1::reportParameters().
|
protected |
highest valid temperature
Definition at line 221 of file Nasa9Poly1.h.
Referenced by Nasa9Poly1::maxTemp(), Nasa9Poly1::operator=(), and Nasa9Poly1::reportParameters().
|
protected |
standard-state pressure
Definition at line 223 of file Nasa9Poly1.h.
Referenced by Nasa9Poly1::operator=(), Nasa9Poly1::refPressure(), and Nasa9Poly1::reportParameters().
|
protected |
species index
Definition at line 225 of file Nasa9Poly1.h.
Referenced by Nasa9Poly1::operator=(), Nasa9Poly1::reportParameters(), Nasa9Poly1::speciesIndex(), and Nasa9Poly1::updateProperties().
|
protected |
array of polynomial coefficients
Definition at line 227 of file Nasa9Poly1.h.
Referenced by Nasa9Poly1::modifyParameters(), Nasa9Poly1::Nasa9Poly1(), Nasa9Poly1::operator=(), Nasa9Poly1::reportParameters(), and Nasa9Poly1::updateProperties().