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];
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the N...
Base class for exceptions thrown by Cantera classes.
The NASA 9 polynomial parameterization for one temperature range.
void setParameters(const vector_fp &coeffs)
Set the array of 9 polynomial coefficients.
virtual int reportType() const
Returns an integer representing the type of parameterization.
vector_fp m_lowerTempBounds
Lower boundaries of each temperature regions.
void setParameters(const std::map< double, vector_fp > ®ions)
Set the array of polynomial coefficients for each temperature region.
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 size_t nCoeffs() const
This utility function returns the number of coefficients for a given type of species parameterization...
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...
std::vector< std::unique_ptr< Nasa9Poly1 > > m_regionPts
Individual temperature region objects.
int m_currRegion
current region
virtual void updateTemperaturePoly(double T, double *T_poly) const
Given the temperature T, compute the terms of the temperature polynomial T_poly.
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.
Abstract Base class for the thermodynamic manager for an individual species' reference state.
virtual doublereal maxTemp() const
Returns the maximum temperature that the thermo parameterization is valid.
virtual void setRefPressure(double Pref)
Set the reference pressure [Pa].
virtual doublereal refPressure() const
Returns the reference pressure (Pa)
doublereal m_lowT
lowest valid temperature
virtual void setMinTemp(double Tmin)
Set the minimum temperature at which the thermo parameterization is valid.
doublereal m_highT
Highest valid temperature.
doublereal m_Pref
Reference state pressure.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
Namespace for the Cantera kernel.
#define NASA9MULTITEMP
9 coefficient NASA Polynomials in multiple temperature regions This is implemented in the class Nasa9...