Cantera  2.1.2
Public Member Functions | Protected Attributes | List of all members
Nasa9PolyMultiTempRegion Class Reference

The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions. More...

#include <Nasa9PolyMultiTempRegion.h>

Inheritance diagram for Nasa9PolyMultiTempRegion:
[legend]
Collaboration diagram for Nasa9PolyMultiTempRegion:
[legend]

Public Member Functions

 Nasa9PolyMultiTempRegion ()
 Empty constructor. More...
 
 Nasa9PolyMultiTempRegion (std::vector< Cantera::Nasa9Poly1 * > &regionPts)
 Constructor used in templated instantiations. More...
 
 Nasa9PolyMultiTempRegion (const Nasa9PolyMultiTempRegion &b)
 Copy constructor. More...
 
Nasa9PolyMultiTempRegionoperator= (const Nasa9PolyMultiTempRegion &b)
 Assignment operator. More...
 
virtual ~Nasa9PolyMultiTempRegion ()
 Destructor. More...
 
virtual SpeciesThermoInterpTypeduplMyselfAsSpeciesThermoInterpType () const
 duplicator More...
 
virtual int reportType () const
 Returns an integer representing the type of parameterization. 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, index. More...
 
virtual void modifyParameters (doublereal *coeffs)
 Modify parameters for the standard state. More...
 
- Public Member Functions inherited from SpeciesThermoInterpType
 SpeciesThermoInterpType ()
 Constructor. More...
 
 SpeciesThermoInterpType (size_t n, doublereal tlow, doublereal thigh, doublereal pref)
 Constructor. More...
 
virtual ~SpeciesThermoInterpType ()
 Destructor. More...
 
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 size_t speciesIndex () const
 Returns an integer representing the species index. More...
 

Protected Attributes

size_t m_numTempRegions
 Number of temperature regions. More...
 
vector_fp m_lowerTempBounds
 Lower boundaries of each temperature regions. More...
 
std::vector< Nasa9Poly1 * > m_regionPts
 pointers to the objects More...
 
int m_currRegion
 current region 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...
 
size_t m_index
 species index More...
 

Detailed Description

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 \((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 this Nasa9PolyMultiTempRegion object, which uses multiple copies of the Nasa9Poly1 object to handle multiple temperature regions.

Definition at line 67 of file Nasa9PolyMultiTempRegion.h.

Constructor & Destructor Documentation

Empty constructor.

Definition at line 23 of file Nasa9PolyMultiTempRegion.cpp.

Referenced by Nasa9PolyMultiTempRegion::duplMyselfAsSpeciesThermoInterpType().

Nasa9PolyMultiTempRegion ( std::vector< Cantera::Nasa9Poly1 * > &  regionPts)

Constructor used in templated instantiations.

Parameters
regionPtsVector 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 30 of file Nasa9PolyMultiTempRegion.cpp.

References SpeciesThermoInterpType::m_highT, SpeciesThermoInterpType::m_index, Nasa9PolyMultiTempRegion::m_lowerTempBounds, SpeciesThermoInterpType::m_lowT, Nasa9PolyMultiTempRegion::m_numTempRegions, SpeciesThermoInterpType::m_Pref, Nasa9PolyMultiTempRegion::m_regionPts, SpeciesThermoInterpType::maxTemp(), SpeciesThermoInterpType::refPressure(), and SpeciesThermoInterpType::speciesIndex().

Copy constructor.

Parameters
bobject to be copied

Definition at line 67 of file Nasa9PolyMultiTempRegion.cpp.

References Nasa9PolyMultiTempRegion::m_numTempRegions, and Nasa9PolyMultiTempRegion::m_regionPts.

Member Function Documentation

SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType ( ) const
virtual
int reportType ( ) const
virtual

Returns an integer representing the type of parameterization.

Implements SpeciesThermoInterpType.

Definition at line 114 of file Nasa9PolyMultiTempRegion.cpp.

References NASA9MULTITEMP.

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);

Parameters
ttvector of temperature polynomials
cp_RVector of Dimensionless heat capacities. (length m_kk).
h_RTVector of Dimensionless enthalpies. (length m_kk).
s_RVector of Dimensionless entropies. (length m_kk).

Reimplemented from SpeciesThermoInterpType.

Definition at line 119 of file Nasa9PolyMultiTempRegion.cpp.

References Nasa9PolyMultiTempRegion::m_currRegion, Nasa9PolyMultiTempRegion::m_numTempRegions, Nasa9PolyMultiTempRegion::m_regionPts, SpeciesThermoInterpType::maxTemp(), and SpeciesThermoInterpType::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);

Parameters
tempTemperature (Kelvin)
cp_RVector of Dimensionless heat capacities. (length m_kk).
h_RTVector of Dimensionless enthalpies. (length m_kk).
s_RVector of Dimensionless entropies. (length m_kk).

Implements SpeciesThermoInterpType.

Definition at line 144 of file Nasa9PolyMultiTempRegion.cpp.

References Nasa9PolyMultiTempRegion::m_currRegion, Nasa9PolyMultiTempRegion::m_lowerTempBounds, Nasa9PolyMultiTempRegion::m_numTempRegions, and Nasa9PolyMultiTempRegion::updateProperties().

void reportParameters ( size_t &  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

Parameters
nSpecies index
typeInteger type of the standard type
tlowoutput - Minimum temperature
thighoutput - Maximum temperature
prefoutput - reference pressure (Pa).
coeffsVector 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
Deprecated:

Implements SpeciesThermoInterpType.

Definition at line 168 of file Nasa9PolyMultiTempRegion.cpp.

References SpeciesThermoInterpType::m_highT, SpeciesThermoInterpType::m_index, SpeciesThermoInterpType::m_lowT, Nasa9PolyMultiTempRegion::m_numTempRegions, SpeciesThermoInterpType::m_Pref, Nasa9PolyMultiTempRegion::m_regionPts, NASA9MULTITEMP, and Cantera::warn_deprecated().

void modifyParameters ( doublereal *  coeffs)
virtual

Modify parameters for the standard state.

Parameters
coeffsVector of coefficients used to set the parameters for the standard state.
Deprecated:

Reimplemented from SpeciesThermoInterpType.

Definition at line 197 of file Nasa9PolyMultiTempRegion.cpp.

References Nasa9PolyMultiTempRegion::m_numTempRegions, Nasa9PolyMultiTempRegion::m_regionPts, and Cantera::warn_deprecated().

Member Data Documentation

size_t m_numTempRegions
protected
vector_fp m_lowerTempBounds
protected
std::vector<Nasa9Poly1*> m_regionPts
protected
int m_currRegion
mutableprotected

The documentation for this class was generated from the following files: