Go to the documentation of this file.
25 Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion()
30 Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(vector<Nasa9Poly1*>& regionPts) :
44 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
45 "refPressure inconsistency");
49 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
50 "minTemp bounds inconsistency");
53 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
54 "Temp bounds inconsistency");
60 Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(
double tlow,
double thigh,
double pref,
64 size_t regions =
static_cast<size_t>(coeffs[0]);
66 for (
size_t i=0; i<regions; i++) {
68 pref, coeffs + 11*i + 3);
77 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
78 "minTemp bounds inconsistency");
81 throw CanteraError(
"Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion",
82 "Temp bounds inconsistency");
92 for (
const auto& region : regions) {
106 Nasa9PolyMultiTempRegion::~Nasa9PolyMultiTempRegion()
119 T_poly[2] = T_poly[1] * T;
120 T_poly[3] = T_poly[2] * T;
122 T_poly[5] = T_poly[4] / T;
123 T_poly[6] = std::log(T);
129 doublereal* s_R)
const
143 doublereal* cp_R, doublereal* h_RT,
144 doublereal* s_R)
const
164 doublereal& tlow, doublereal& thigh,
166 doublereal*
const coeffs)
const
178 double pref_tmp = 0.0;
179 for (
size_t iReg = 0; iReg <
m_regionPts.size(); iReg++) {
180 m_regionPts[iReg]->reportParameters(n_tmp, type_tmp,
181 coeffs[index], coeffs[index+1],
183 for (
int i = 0; i < 9; i++) {
184 coeffs[index+2+i] = ctmp[3+i];
std::vector< std::unique_ptr< Nasa9Poly1 > > m_regionPts
Individual temperature region objects.
virtual doublereal maxTemp() const
Returns the maximum temperature that the thermo parameterization is valid.
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
vector_fp m_lowerTempBounds
Lower boundaries of each temperature regions.
Abstract Base class for the thermodynamic manager for an individual species' reference state.
void setParameters(const vector_fp &coeffs)
Set the array of 9 polynomial coefficients.
virtual size_t nCoeffs() const
This utility function returns the number of coefficients for a given type of species parameterization...
doublereal m_lowT
lowest valid temperature
void setParameters(const std::map< double, vector_fp > ®ions)
Set the array of polynomial coefficients for each temperature region.
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.
int m_currRegion
current region
doublereal m_Pref
Reference state pressure.
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...
virtual void updateTemperaturePoly(double T, double *T_poly) const
Given the temperature T, compute the terms of the temperature polynomial T_poly.
#define NASA9MULTITEMP
9 coefficient NASA Polynomials in multiple temperature regions This is implemented in the class Nasa9...
virtual void setMinTemp(double Tmin)
Set the minimum temperature at which the thermo parameterization is valid.
The NASA 9 polynomial parameterization for one temperature range.
doublereal m_highT
Highest valid temperature.
virtual doublereal refPressure() const
Returns the reference pressure (Pa)
Base class for exceptions thrown by Cantera classes.
Namespace for the Cantera kernel.
virtual void setRefPressure(double Pref)
Set the reference pressure [Pa].
virtual int reportType() const
Returns an integer representing the type of parameterization.