22 Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion() :
44 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
45 "m_index inconsistency");
48 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
49 "refPressure inconsistency");
53 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
54 "minTemp bounds inconsistency");
57 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
58 "Temp bounds inconsistency");
66 m_numTempRegions(b.m_numTempRegions),
67 m_lowerTempBounds(b.m_lowerTempBounds),
68 m_currRegion(b.m_currRegion)
81 SpeciesThermoInterpType::operator=(b);
106 Nasa9PolyMultiTempRegion::duplMyselfAsSpeciesThermoInterpType()
const
127 T_poly[2] = T_poly[1] * T;
128 T_poly[3] = T_poly[2] * T;
130 T_poly[5] = T_poly[4] / T;
131 T_poly[6] = std::log(T);
137 doublereal* s_R)
const
151 doublereal* cp_R, doublereal* h_RT,
152 doublereal* s_R)
const
167 doublereal& tlow, doublereal& thigh,
169 doublereal*
const coeffs)
const
181 double pref_tmp = 0.0;
183 m_regionPts[iReg]->reportParameters(n_tmp, type_tmp,
184 coeffs[index], coeffs[index+1],
186 for (
int i = 0; i < 9; i++) {
187 coeffs[index+2+i] = ctmp[3+i];
198 m_regionPts[iReg]->modifyParameters(coeffs + index);
size_t m_numTempRegions
Number of temperature regions.
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state...
Nasa9PolyMultiTempRegion()
Empty constructor.
size_t m_index
species index
virtual size_t speciesIndex() const
Returns an integer representing the species index.
virtual void setIndex(size_t index)
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the N...
vector_fp m_lowerTempBounds
Lower boundaries of each temperature regions.
virtual int reportType() const
Returns an integer representing the type of parameterization.
int m_currRegion
current region
virtual doublereal refPressure() const
Returns the reference pressure (Pa)
virtual doublereal maxTemp() const
Returns the maximum temperature that the thermo parameterization is valid.
#define NASA9MULTITEMP
9 coefficient NASA Polynomials in multiple temperature regions This is implemented in the class Nasa9...
virtual void updateTemperaturePoly(double T, double *T_poly) const
Given the temperature T, compute the terms of the temperature polynomial T_poly.
virtual void setIndex(size_t 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.
doublereal m_highT
Highest valid temperature.
Base class for exceptions thrown by Cantera classes.
doublereal m_lowT
lowest valid temperature
The NASA 9 polynomial parameterization for one temperature range.
Nasa9PolyMultiTempRegion & operator=(const Nasa9PolyMultiTempRegion &b)
Assignment operator.
virtual ~Nasa9PolyMultiTempRegion()
Destructor.
doublereal m_Pref
Reference state pressure.
The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions...
virtual void modifyParameters(doublereal *coeffs)
Modify parameters for the standard state.
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
std::vector< Nasa9Poly1 * > m_regionPts
pointers to the objects
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
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 spe...