60 NasaPoly1(
double tlow,
double thigh,
double pref,
const double* coeffs)
69 if (coeffs.size() != 7) {
70 throw CanteraError(
"NasaPoly1::setParameters",
"Array must contain "
71 "7 coefficients, but {} were given.", coeffs.size());
86 T_poly[2] = T_poly[1] * T;
87 T_poly[3] = T_poly[2] * T;
89 T_poly[5] = std::log(T);
104 double* s_R)
const override {
112 cp = ct0 + ct1 + ct2 + ct3 + ct4;
113 h = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
115 s = ct0*tt[5] + ct1 + 0.5*ct2 + 1.0/3.0*ct3
125 double* s_R)
const override {
132 double& pref,
double*
const coeffs)
const override {
144 thermo[
"data"].asVector<vector<double>>().push_back(
m_coeff);
149 double temp = 298.15;
157 double h_RT = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
169 double delH = Hf298New - hcurr;
181 double m_coeff5_orig;
Pure Virtual Base class for individual species reference state thermodynamic managers and text for th...
A map of string keys to values whose type can vary at runtime.
Base class for exceptions thrown by Cantera classes.
The NASA polynomial parameterization for one temperature range.
vector< double > m_coeff
array of polynomial coefficients, stored in the order [a0, ..., a6]
int reportType() const override
Returns an integer representing the type of parameterization.
void setParameters(const vector< double > &coeffs)
Set array of 7 polynomial coefficients.
size_t temperaturePolySize() const override
Number of terms in the temperature polynomial for this parameterization.
void getParameters(AnyMap &thermo) const override
Store the parameters of the species thermo object such that an identical species thermo object could ...
void updateTemperaturePoly(double T, double *T_poly) const override
Given the temperature T, compute the terms of the temperature polynomial T_poly.
void reportParameters(size_t &n, int &type, double &tlow, double &thigh, double &pref, double *const coeffs) const override
This utility function returns the type of parameterization and all of the parameters for the species.
void updateProperties(const double *tt, double *cp_R, double *h_RT, double *s_R) const override
Update the properties for this species, given a temperature polynomial.
double reportHf298(double *const h298=nullptr) const override
Report the 298 K Heat of Formation of the standard state of one species (J kmol-1)
NasaPoly1(double tlow, double thigh, double pref, const double *coeffs)
Constructor with all input data.
void resetHf298() override
Restore the original heat of formation for this species.
void modifyOneHf298(const size_t k, const double Hf298New) override
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1)
void updatePropertiesTemp(const double temp, double *cp_R, double *h_RT, double *s_R) const override
Compute the reference-state property of one species.
Abstract Base class for the thermodynamic manager for an individual species' reference state.
double m_Pref
Reference state pressure.
double m_lowT
lowest valid temperature
double m_highT
Highest valid temperature.
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.
Contains const definitions for types of species reference-state thermodynamics managers (see Species ...
#define NASA1
7 coefficient NASA Polynomials This is implemented in the class NasaPoly1 in NasaPoly1....