14 const vector<double>& high) {
24 thermo[
"model"] =
"NASA7";
27 thermo[
"temperature-ranges"].setQuantity(Tranges,
"K");
28 thermo[
"data"] = vector<vector<double>>();
39 double cp_low, h_low, s_low;
40 double cp_high, h_high, s_high;
41 mnp_low.updatePropertiesTemp(
m_midT, &cp_low, &h_low, &s_low);
44 double delta = cp_low - cp_high;
45 if (fabs(delta/(fabs(cp_low)+1.0E-4)) > 0.01) {
47 "\nFor species {}, discontinuity in cp/R detected at Tmid = {}\n"
48 "\tValue computed using low-temperature polynomial: {}\n"
49 "\tValue computed using high-temperature polynomial: {}\n",
50 name,
m_midT, cp_low, cp_high);
54 delta = h_low - h_high;
55 if (fabs(delta/cp_low) > 0.001) {
57 "\nFor species {}, discontinuity in h/RT detected at Tmid = {}\n"
58 "\tValue computed using low-temperature polynomial: {}\n"
59 "\tValue computed using high-temperature polynomial: {}\n",
60 name,
m_midT, h_low, h_high);
64 delta = s_low - s_high;
65 if (fabs(delta/(fabs(s_low)+cp_low)) > 0.001) {
67 "\nFor species {}, discontinuity in s/R detected at Tmid = {}\n"
68 "\tValue computed using low-temperature polynomial: {}\n"
69 "\tValue computed using high-temperature polynomial: {}\n",
70 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.
void getParameters(AnyMap &thermo) const override
Store the parameters of the species thermo object such that an identical species thermo object could ...
void validate(const string &name) override
Check for problems with the parameterization, and generate warnings or throw and exception if any are...
void setParameters(double Tmid, const vector< double > &low, const vector< double > &high)
double m_midT
Midrange temperature.
NasaPoly1 mnp_low
NasaPoly1 object for the low temperature region.
NasaPoly1 mnp_high
NasaPoly1 object for the high temperature region.
virtual void getParameters(AnyMap &thermo) const
Store the parameters of the species thermo object such that an identical species thermo object could ...
double m_lowT
lowest valid temperature
double m_highT
Highest valid temperature.
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
bool thermo_warnings_suppressed()
Returns true if thermo warnings should be suppressed.
void warn_user(const string &method, const string &msg, const Args &... args)
Print a user warning raised from method as CanteraWarning.
Namespace for the Cantera kernel.
Contains declarations for string manipulation functions within Cantera.