10 NasaPoly2::NasaPoly2()
15 void NasaPoly2::setParameters(
double Tmid,
const vector_fp& low,
18 mnp_low.setMaxTemp(Tmid);
19 mnp_high.setMinTemp(Tmid);
20 mnp_low.setParameters(low);
21 mnp_high.setParameters(high);
24 void NasaPoly2::validate(
const std::string& name)
30 double cp_low, h_low, s_low;
31 double cp_high, h_high, s_high;
32 mnp_low.updatePropertiesTemp(m_midT, &cp_low, &h_low, &s_low);
33 mnp_high.updatePropertiesTemp(m_midT, &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);
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the N...
This file contains definitions for utility functions and text for modules, inputfiles,...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Namespace for the Cantera kernel.
Contains declarations for string manipulation functions within Cantera.