16void NasaPoly2::setParameters(
double Tmid,
const vector_fp& low,
19 mnp_low.setMaxTemp(Tmid);
20 mnp_high.setMinTemp(Tmid);
21 mnp_low.setParameters(low);
22 mnp_high.setParameters(high);
25void NasaPoly2::getParameters(
AnyMap& thermo)
const
27 thermo[
"model"] =
"NASA7";
28 SpeciesThermoInterpType::getParameters(thermo);
29 vector_fp Tranges {m_lowT, m_midT, m_highT};
30 thermo[
"temperature-ranges"].setQuantity(Tranges,
"K");
31 thermo[
"data"] = std::vector<vector_fp>();
32 mnp_low.getParameters(thermo);
33 mnp_high.getParameters(thermo);
36void NasaPoly2::validate(
const std::string& name)
42 double cp_low, h_low, s_low;
43 double cp_high, h_high, s_high;
44 mnp_low.updatePropertiesTemp(m_midT, &cp_low, &h_low, &s_low);
45 mnp_high.updatePropertiesTemp(m_midT, &cp_high, &h_high, &s_high);
47 double delta = cp_low - cp_high;
48 if (fabs(delta/(fabs(cp_low)+1.0E-4)) > 0.01) {
50 "\nFor species {}, discontinuity in cp/R detected at Tmid = {}\n"
51 "\tValue computed using low-temperature polynomial: {}\n"
52 "\tValue computed using high-temperature polynomial: {}\n",
53 name, m_midT, cp_low, cp_high);
57 delta = h_low - h_high;
58 if (fabs(delta/cp_low) > 0.001) {
60 "\nFor species {}, discontinuity in h/RT detected at Tmid = {}\n"
61 "\tValue computed using low-temperature polynomial: {}\n"
62 "\tValue computed using high-temperature polynomial: {}\n",
63 name, m_midT, h_low, h_high);
67 delta = s_low - s_high;
68 if (fabs(delta/(fabs(s_low)+cp_low)) > 0.001) {
70 "\nFor species {}, discontinuity in s/R detected at Tmid = {}\n"
71 "\tValue computed using low-temperature polynomial: {}\n"
72 "\tValue computed using high-temperature polynomial: {}\n",
73 name, m_midT, s_low, s_high);
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the N...
A map of string keys to values whose type can vary at runtime.
This file contains definitions for utility functions and text for modules, inputfiles,...
Namespace for the Cantera kernel.
bool thermo_warnings_suppressed()
Returns true if thermo warnings should be suppressed.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
void warn_user(const std::string &method, const std::string &msg, const Args &... args)
Print a user warning raised from method as CanteraWarning.
Contains declarations for string manipulation functions within Cantera.