21Nasa9Poly1::Nasa9Poly1()
26Nasa9Poly1::Nasa9Poly1(
double tlow,
double thigh,
double pref,
27 span<const double> coeffs) :
29 m_coeff(coeffs.begin(), coeffs.end())
36 m_coeff.assign(coeffs.begin(), coeffs.end());
48 T_poly[2] = T_poly[1] * T;
49 T_poly[3] = T_poly[2] * T;
51 T_poly[5] = T_poly[4] / T;
52 T_poly[6] = std::log(T);
56 double& h_RT,
double& s_R)
const
59 double ct0 =
m_coeff[0] * tt[5];
60 double ct1 =
m_coeff[1] * tt[4];
62 double ct3 =
m_coeff[3] * tt[0];
63 double ct4 =
m_coeff[4] * tt[1];
64 double ct5 =
m_coeff[5] * tt[2];
65 double ct6 =
m_coeff[6] * tt[3];
67 double cpdivR = ct0 + ct1 + ct2 + ct3 + ct4 + ct5 + ct6;
68 double hdivRT = -ct0 + tt[6]*ct1 + ct2 + 0.5*ct3 + 1.0/3.0*ct4
69 + 0.25*ct5 + 0.2*ct6 +
m_coeff[7] * tt[4];
70 double sdivR = -0.5*ct0 - ct1 + tt[6]*ct2 + ct3 + 0.5*ct4
71 + 1.0/3.0*ct5 + 0.25*ct6 +
m_coeff[8];
88 double& pref, span<double> coeffs)
const
99 for (
int i = 0; i < 9; i++) {
108 thermo[
"data"].asVector<vector<double>>().push_back(
m_coeff);
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.
vector< double > m_coeff
array of polynomial coefficients
int reportType() const override
Returns an integer representing the type of parameterization.
void setParameters(span< const double > coeffs)
Set the array of 9 polynomial coefficients.
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 reportParameters(size_t &n, int &type, double &tlow, double &thigh, double &pref, span< double > coeffs) const override
This utility function reports back the type of parameterization and all of the parameters for the spe...
void updateTemperaturePoly(double T, span< double > T_poly) const override
Given the temperature T, compute the terms of the temperature polynomial T_poly.
void updateProperties(span< const double > tt, double &cp_R, double &h_RT, double &s_R) const override
Update the properties for this species, given a temperature polynomial.
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.
Namespace for the Cantera kernel.
void checkArraySize(const char *procedure, size_t available, size_t required)
Wrapper for throwing ArraySizeError.
#define NASA9
9 coefficient NASA Polynomials This is implemented in the class Nasa9Poly1 in Nasa9Poly1....