10 NasaPoly2::NasaPoly2()
30 double cp_low, h_low, s_low;
31 double cp_high, h_high, s_high;
35 double delta = cp_low - cp_high;
36 if (fabs(delta/(fabs(cp_low)+1.0E-4)) > 0.01) {
38 "\nFor species {}, discontinuity in cp/R detected at Tmid = {}\n"
39 "\tValue computed using low-temperature polynomial: {}\n"
40 "\tValue computed using high-temperature polynomial: {}\n",
41 name,
m_midT, cp_low, cp_high);
45 delta = h_low - h_high;
46 if (fabs(delta/cp_low) > 0.001) {
48 "\nFor species {}, discontinuity in h/RT detected at Tmid = {}\n"
49 "\tValue computed using low-temperature polynomial: {}\n"
50 "\tValue computed using high-temperature polynomial: {}\n",
51 name,
m_midT, h_low, h_high);
55 delta = s_low - s_high;
56 if (fabs(delta/(fabs(s_low)+cp_low)) > 0.001) {
58 "\nFor species {}, discontinuity in s/R detected at Tmid = {}\n"
59 "\tValue computed using low-temperature polynomial: {}\n"
60 "\tValue computed using high-temperature polynomial: {}\n",
61 name,
m_midT, s_low, s_high);
void setParameters(const vector_fp &coeffs)
Set array of 7 polynomial coefficients.
doublereal m_midT
Midrange temperature.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
void validate(const std::string &name)
Check for problems with the parameterization, and generate warnings or throw and exception if any are...
NasaPoly1 mnp_high
NasaPoly1 object for the high temperature region.
virtual void setMaxTemp(double Tmax)
Set the maximum temperature at which the thermo parameterization is valid.
NasaPoly1 mnp_low
NasaPoly1 object for the low temperature region.
virtual void setMinTemp(double Tmin)
Set the minimum temperature at which the thermo parameterization is valid.
void setParameters(double Tmid, const vector_fp &low, const vector_fp &high)
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
Namespace for the Cantera kernel.