The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions. More...
#include <Nasa9PolyMultiTempRegion.h>
Public Member Functions | |
Nasa9PolyMultiTempRegion () | |
Empty constructor. | |
Nasa9PolyMultiTempRegion (std::vector< Cantera::Nasa9Poly1 * > ®ionPts) | |
Constructor used in templated instantiations. | |
Nasa9PolyMultiTempRegion (const Nasa9PolyMultiTempRegion &b) | |
Copy constructor. | |
Nasa9PolyMultiTempRegion & | operator= (const Nasa9PolyMultiTempRegion &b) |
Assignment operator. | |
virtual | ~Nasa9PolyMultiTempRegion () |
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 int | 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 (int &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 | |
int | m_index |
species index | |
int | m_numTempRegions |
Number of temperature regions. | |
vector_fp | m_lowerTempBounds |
Lower boundaries of each temperature regions. | |
std::vector< Nasa9Poly1 * > | m_regionPts |
pointers to the objects | |
int | m_currRegion |
current region |
The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions.
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 are used to represent , , and as polynomials in :
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 this Nasa9PolyMultiTempRegion object, which uses multiple copies of the Nasa9Poly1 object to handle multiple temperature regions.
Definition at line 75 of file Nasa9PolyMultiTempRegion.h.
Empty constructor.
Definition at line 77 of file Nasa9PolyMultiTempRegion.cpp.
Referenced by Nasa9PolyMultiTempRegion::duplMyselfAsSpeciesThermoInterpType().
Nasa9PolyMultiTempRegion | ( | std::vector< Cantera::Nasa9Poly1 * > & | regionPts | ) |
Constructor used in templated instantiations.
regionPts | Vector of pointers to Nasa9Poly1 objects. These objects all refer to the temperature regions for the same species. The vector must be in increasing temperature region format. Together they represent the reference temperature parameterization for a single species. |
Note, after the constructor, we will own the underlying Nasa9Poly1 objects and be responsible for owning them.
Definition at line 98 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_highT, Nasa9PolyMultiTempRegion::m_index, Nasa9PolyMultiTempRegion::m_lowerTempBounds, Nasa9PolyMultiTempRegion::m_lowT, Nasa9PolyMultiTempRegion::m_numTempRegions, Nasa9PolyMultiTempRegion::m_Pref, Nasa9PolyMultiTempRegion::m_regionPts, Nasa9PolyMultiTempRegion::maxTemp(), Nasa9PolyMultiTempRegion::refPressure(), and Nasa9PolyMultiTempRegion::speciesIndex().
Nasa9PolyMultiTempRegion | ( | const Nasa9PolyMultiTempRegion & | b | ) |
Copy constructor.
b | object to be copied |
Definition at line 143 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_numTempRegions, and Nasa9PolyMultiTempRegion::m_regionPts.
~Nasa9PolyMultiTempRegion | ( | ) | [virtual] |
Destructor.
Definition at line 186 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_numTempRegions, and Nasa9PolyMultiTempRegion::m_regionPts.
SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType | ( | ) | const [virtual] |
Duplicator.
Implements SpeciesThermoInterpType.
Definition at line 195 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion().
doublereal maxTemp | ( | ) | const [virtual] |
Returns the maximum temperature that the thermo parameterization is valid.
Implements SpeciesThermoInterpType.
Definition at line 208 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_highT.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), and Nasa9PolyMultiTempRegion::updateProperties().
doublereal minTemp | ( | ) | const [virtual] |
Returns the minimum temperature that the thermo parameterization is valid.
Implements SpeciesThermoInterpType.
Definition at line 202 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_lowT.
Referenced by Nasa9PolyMultiTempRegion::updateProperties().
void modifyParameters | ( | doublereal * | coeffs | ) | [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 372 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_numTempRegions, and Nasa9PolyMultiTempRegion::m_regionPts.
Nasa9PolyMultiTempRegion & operator= | ( | const Nasa9PolyMultiTempRegion & | b | ) |
Assignment operator.
b | object to be copied |
Definition at line 164 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_currRegion, Nasa9PolyMultiTempRegion::m_highT, Nasa9PolyMultiTempRegion::m_index, Nasa9PolyMultiTempRegion::m_lowerTempBounds, Nasa9PolyMultiTempRegion::m_lowT, Nasa9PolyMultiTempRegion::m_numTempRegions, Nasa9PolyMultiTempRegion::m_Pref, and Nasa9PolyMultiTempRegion::m_regionPts.
doublereal refPressure | ( | ) | const [virtual] |
Returns the reference pressure (Pa).
Implements SpeciesThermoInterpType.
Definition at line 213 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_Pref.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion().
void reportParameters | ( | int & | n, | |
int & | type, | |||
doublereal & | tlow, | |||
doublereal & | thigh, | |||
doublereal & | pref, | |||
doublereal *const | coeffs | |||
) | const [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 1 + 11*nzones coefficients coeffs[0] is equal to nTempZones. index = 1 for each zone: coeffs[index] = minTempZone coeffs[index+1] = maxTempZone coeffs[index+2+i] from i =0,9 are the coefficients themselves |
Implements SpeciesThermoInterpType.
Definition at line 340 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_highT, Nasa9PolyMultiTempRegion::m_index, Nasa9PolyMultiTempRegion::m_lowT, Nasa9PolyMultiTempRegion::m_numTempRegions, Nasa9PolyMultiTempRegion::m_Pref, Nasa9PolyMultiTempRegion::m_regionPts, and NASA9MULTITEMP.
int reportType | ( | ) | const [virtual] |
Returns an integer representing the type of parameterization.
Implements SpeciesThermoInterpType.
Definition at line 218 of file Nasa9PolyMultiTempRegion.cpp.
References NASA9MULTITEMP.
int speciesIndex | ( | ) | const [virtual] |
Returns an integer representing the species index.
Implements SpeciesThermoInterpType.
Definition at line 224 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_index.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion().
void updateProperties | ( | const doublereal * | tt, | |
doublereal * | cp_R, | |||
doublereal * | h_RT, | |||
doublereal * | s_R | |||
) | const [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 253 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_currRegion, Nasa9PolyMultiTempRegion::m_numTempRegions, Nasa9PolyMultiTempRegion::m_regionPts, Nasa9PolyMultiTempRegion::maxTemp(), and Nasa9PolyMultiTempRegion::minTemp().
Referenced by Nasa9PolyMultiTempRegion::updatePropertiesTemp().
void updatePropertiesTemp | ( | const doublereal | temp, | |
doublereal * | cp_R, | |||
doublereal * | h_RT, | |||
doublereal * | s_R | |||
) | const [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 303 of file Nasa9PolyMultiTempRegion.cpp.
References Nasa9PolyMultiTempRegion::m_currRegion, Nasa9PolyMultiTempRegion::m_lowerTempBounds, Nasa9PolyMultiTempRegion::m_numTempRegions, and Nasa9PolyMultiTempRegion::updateProperties().
int m_currRegion [mutable, protected] |
current region
Definition at line 246 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::operator=(), Nasa9PolyMultiTempRegion::updateProperties(), and Nasa9PolyMultiTempRegion::updatePropertiesTemp().
doublereal m_highT [protected] |
highest valid temperature
Definition at line 227 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::maxTemp(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Nasa9PolyMultiTempRegion::operator=(), and Nasa9PolyMultiTempRegion::reportParameters().
int m_index [protected] |
species index
Definition at line 231 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Nasa9PolyMultiTempRegion::operator=(), Nasa9PolyMultiTempRegion::reportParameters(), and Nasa9PolyMultiTempRegion::speciesIndex().
vector_fp m_lowerTempBounds [protected] |
Lower boundaries of each temperature regions.
Definition at line 236 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Nasa9PolyMultiTempRegion::operator=(), and Nasa9PolyMultiTempRegion::updatePropertiesTemp().
doublereal m_lowT [protected] |
lowest valid temperature
Definition at line 225 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::minTemp(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Nasa9PolyMultiTempRegion::operator=(), and Nasa9PolyMultiTempRegion::reportParameters().
int m_numTempRegions [protected] |
Number of temperature regions.
Definition at line 233 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::modifyParameters(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Nasa9PolyMultiTempRegion::operator=(), Nasa9PolyMultiTempRegion::reportParameters(), Nasa9PolyMultiTempRegion::updateProperties(), Nasa9PolyMultiTempRegion::updatePropertiesTemp(), and Nasa9PolyMultiTempRegion::~Nasa9PolyMultiTempRegion().
doublereal m_Pref [protected] |
standard-state pressure
Definition at line 229 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Nasa9PolyMultiTempRegion::operator=(), Nasa9PolyMultiTempRegion::refPressure(), and Nasa9PolyMultiTempRegion::reportParameters().
std::vector<Nasa9Poly1 *> m_regionPts [protected] |
pointers to the objects
This object will now own these pointers and delete them when the current object is deleted.
Definition at line 243 of file Nasa9PolyMultiTempRegion.h.
Referenced by Nasa9PolyMultiTempRegion::modifyParameters(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Nasa9PolyMultiTempRegion::operator=(), Nasa9PolyMultiTempRegion::reportParameters(), Nasa9PolyMultiTempRegion::updateProperties(), and Nasa9PolyMultiTempRegion::~Nasa9PolyMultiTempRegion().