12 const vector<double>& high) {
22 thermo[
"model"] =
"NASA7";
25 thermo[
"temperature-ranges"].setQuantity(Tranges,
"K");
26 thermo[
"data"] = vector<vector<double>>();
37 double cp_low, h_low, s_low;
38 double cp_high, h_high, s_high;
42 double delta = cp_low - cp_high;
43 if (fabs(delta/(fabs(cp_low)+1.0E-4)) > 0.01) {
45 "\nFor species {}, discontinuity in cp/R detected at Tmid = {}\n"
46 "\tValue computed using low-temperature polynomial: {}\n"
47 "\tValue computed using high-temperature polynomial: {}\n",
48 name,
m_midT, cp_low, cp_high);
52 delta = h_low - h_high;
53 if (fabs(delta/cp_low) > 0.001) {
55 "\nFor species {}, discontinuity in h/RT detected at Tmid = {}\n"
56 "\tValue computed using low-temperature polynomial: {}\n"
57 "\tValue computed using high-temperature polynomial: {}\n",
58 name,
m_midT, h_low, h_high);
62 delta = s_low - s_high;
63 if (fabs(delta/(fabs(s_low)+cp_low)) > 0.001) {
65 "\nFor species {}, discontinuity in s/R detected at Tmid = {}\n"
66 "\tValue computed using low-temperature polynomial: {}\n"
67 "\tValue computed using high-temperature polynomial: {}\n",
68 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 setParameters(const vector< double > &coeffs)
Set array of 7 polynomial coefficients.
void getParameters(AnyMap &thermo) const override
Store the parameters of the species thermo object such that an identical species thermo object could ...
void updatePropertiesTemp(const double temp, double *cp_R, double *h_RT, double *s_R) const override
Compute the reference-state property of one species.
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
virtual void setMinTemp(double Tmin)
Set the minimum temperature at which the thermo parameterization is valid.
double m_highT
Highest valid temperature.
virtual void setMaxTemp(double Tmax)
Set the maximum temperature at which the thermo parameterization is valid.
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.