Cantera
2.1.2
|
A constant-heat capacity species thermodynamic property manager class. More...
#include <ConstCpPoly.h>
Public Member Functions | |
ConstCpPoly () | |
empty constructor More... | |
ConstCpPoly (size_t n, doublereal tlow, doublereal thigh, doublereal pref, const doublereal *coeffs) | |
Constructor used in templated instantiations. More... | |
ConstCpPoly (const ConstCpPoly &) | |
copy constructor More... | |
ConstCpPoly & | operator= (const ConstCpPoly &) |
Assignment operator. More... | |
virtual SpeciesThermoInterpType * | duplMyselfAsSpeciesThermoInterpType () const |
duplicator More... | |
virtual int | reportType () const |
Returns an integer representing the type of parameterization. More... | |
void | updateProperties (const doublereal *tt, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Update the properties for this species, given a temperature polynomial. More... | |
void | updatePropertiesTemp (const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Compute the reference-state property of one species. More... | |
void | reportParameters (size_t &n, int &type, doublereal &tlow, doublereal &thigh, doublereal &pref, doublereal *const coeffs) const |
This utility function reports back the type of parameterization and all of the parameters for the species, index. More... | |
virtual void | modifyParameters (doublereal *coeffs) |
Modify parameters for the standard state. More... | |
Public Member Functions inherited from SpeciesThermoInterpType | |
SpeciesThermoInterpType () | |
Constructor. More... | |
SpeciesThermoInterpType (size_t n, doublereal tlow, doublereal thigh, doublereal pref) | |
Constructor. More... | |
virtual | ~SpeciesThermoInterpType () |
Destructor. More... | |
virtual doublereal | minTemp () const |
Returns the minimum temperature that the thermo parameterization is valid. More... | |
virtual doublereal | maxTemp () const |
Returns the maximum temperature that the thermo parameterization is valid. More... | |
virtual doublereal | refPressure () const |
Returns the reference pressure (Pa) More... | |
virtual size_t | speciesIndex () const |
Returns an integer representing the species index. More... | |
Protected Attributes | |
doublereal | m_t0 |
Base temperature. More... | |
doublereal | m_cp0_R |
Dimensionless value of the heat capacity. More... | |
doublereal | m_h0_R |
dimensionless value of the enthaply at t0 More... | |
doublereal | m_s0_R |
Dimensionless value of the entropy at t0. More... | |
doublereal | m_logt0 |
log of the t0 value More... | |
Protected Attributes inherited from SpeciesThermoInterpType | |
doublereal | m_lowT |
lowest valid temperature More... | |
doublereal | m_highT |
Highest valid temperature. More... | |
doublereal | m_Pref |
Reference state pressure. More... | |
size_t | m_index |
species index More... | |
A constant-heat capacity species thermodynamic property manager class.
This makes the assumption that the heat capacity is a constant. Then, the following relations are used to complete the specification of the thermodynamic functions for the species.
\[ \frac{c_p(T)}{R} = Cp0\_R \]
\[ \frac{h^0(T)}{RT} = \frac{1}{T} * (h0\_R + (T - T_0) * Cp0\_R) \]
\[ \frac{s^0(T)}{R} = (s0\_R + (log(T) - log(T_0)) * Cp0\_R) \]
This parameterization takes 4 input values. These are:
The multispecies SimpleThermo class makes the same assumptions as this class does.
Definition at line 47 of file ConstCpPoly.h.
ConstCpPoly | ( | ) |
empty constructor
Definition at line 13 of file ConstCpPoly.cpp.
Referenced by ConstCpPoly::duplMyselfAsSpeciesThermoInterpType().
ConstCpPoly | ( | size_t | n, |
doublereal | tlow, | ||
doublereal | thigh, | ||
doublereal | pref, | ||
const doublereal * | coeffs | ||
) |
Constructor used in templated instantiations.
n | Species index |
tlow | Minimum temperature |
thigh | Maximum temperature |
pref | reference pressure (Pa). |
coeffs | Vector of coefficients used to set the parameters for the standard state for species n. There are 4 coefficients for the ConstCpPoly parameterization.
|
Definition at line 22 of file ConstCpPoly.cpp.
References Cantera::GasConstant, ConstCpPoly::m_cp0_R, ConstCpPoly::m_h0_R, ConstCpPoly::m_logt0, ConstCpPoly::m_s0_R, and ConstCpPoly::m_t0.
ConstCpPoly | ( | const ConstCpPoly & | b | ) |
copy constructor
Definition at line 34 of file ConstCpPoly.cpp.
ConstCpPoly & operator= | ( | const ConstCpPoly & | b | ) |
Assignment operator.
Definition at line 44 of file ConstCpPoly.cpp.
References ConstCpPoly::m_cp0_R, ConstCpPoly::m_h0_R, ConstCpPoly::m_logt0, ConstCpPoly::m_s0_R, and ConstCpPoly::m_t0.
|
virtual |
duplicator
Implements SpeciesThermoInterpType.
Definition at line 58 of file ConstCpPoly.cpp.
References ConstCpPoly::ConstCpPoly().
|
inlinevirtual |
Returns an integer representing the type of parameterization.
Implements SpeciesThermoInterpType.
Definition at line 80 of file ConstCpPoly.h.
References CONSTANT_CP.
|
virtual |
Update the properties for this species, given a temperature polynomial.
This method is called with a pointer to an array containing the functions of temperature needed by this parameterization, and three pointers to arrays where the computed property values should be written. This method updates only one value in each array.
Form and Length of the temperature polynomial:
tt | Vector of temperature polynomials |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Reimplemented from SpeciesThermoInterpType.
Definition at line 63 of file ConstCpPoly.cpp.
References ConstCpPoly::m_cp0_R, ConstCpPoly::m_h0_R, SpeciesThermoInterpType::m_index, ConstCpPoly::m_logt0, ConstCpPoly::m_s0_R, and ConstCpPoly::m_t0.
|
virtual |
Compute the reference-state property of one species.
Given temperature T in K, this method updates the values of the non-dimensional heat capacity at constant pressure, enthalpy, and entropy, at the reference pressure, Pref of one of the species. The species index is used to reference into the cp_R, h_RT, and s_R arrays.
temp | Temperature (Kelvin) |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Implements SpeciesThermoInterpType.
Definition at line 76 of file ConstCpPoly.cpp.
References ConstCpPoly::m_cp0_R, ConstCpPoly::m_h0_R, SpeciesThermoInterpType::m_index, ConstCpPoly::m_logt0, ConstCpPoly::m_s0_R, and ConstCpPoly::m_t0.
|
virtual |
This utility function reports back the type of parameterization and all of the parameters for the species, index.
All parameters are output variables
index | Species index |
type | Integer type of the standard type |
minTemp | output - Minimum temperature |
maxTemp | output - Maximum temperature |
refPressure | output - reference pressure (Pa). |
coeffs | Vector of coefficients used to set the parameters for the standard state. |
Implements SpeciesThermoInterpType.
Definition at line 88 of file ConstCpPoly.cpp.
References CONSTANT_CP, Cantera::GasConstant, ConstCpPoly::m_cp0_R, ConstCpPoly::m_h0_R, SpeciesThermoInterpType::m_highT, SpeciesThermoInterpType::m_index, SpeciesThermoInterpType::m_lowT, SpeciesThermoInterpType::m_Pref, ConstCpPoly::m_s0_R, and ConstCpPoly::m_t0.
|
virtual |
Modify parameters for the standard state.
coeffs | Vector of coefficients used to set the parameters for the standard state. |
Reimplemented from SpeciesThermoInterpType.
Definition at line 104 of file ConstCpPoly.cpp.
References Cantera::GasConstant, ConstCpPoly::m_cp0_R, ConstCpPoly::m_h0_R, ConstCpPoly::m_logt0, ConstCpPoly::m_s0_R, and ConstCpPoly::m_t0.
|
protected |
Base temperature.
Definition at line 124 of file ConstCpPoly.h.
Referenced by ConstCpPoly::ConstCpPoly(), ConstCpPoly::modifyParameters(), ConstCpPoly::operator=(), ConstCpPoly::reportParameters(), ConstCpPoly::updateProperties(), and ConstCpPoly::updatePropertiesTemp().
|
protected |
Dimensionless value of the heat capacity.
Definition at line 126 of file ConstCpPoly.h.
Referenced by ConstCpPoly::ConstCpPoly(), ConstCpPoly::modifyParameters(), ConstCpPoly::operator=(), ConstCpPoly::reportParameters(), ConstCpPoly::updateProperties(), and ConstCpPoly::updatePropertiesTemp().
|
protected |
dimensionless value of the enthaply at t0
Definition at line 128 of file ConstCpPoly.h.
Referenced by ConstCpPoly::ConstCpPoly(), ConstCpPoly::modifyParameters(), ConstCpPoly::operator=(), ConstCpPoly::reportParameters(), ConstCpPoly::updateProperties(), and ConstCpPoly::updatePropertiesTemp().
|
protected |
Dimensionless value of the entropy at t0.
Definition at line 130 of file ConstCpPoly.h.
Referenced by ConstCpPoly::ConstCpPoly(), ConstCpPoly::modifyParameters(), ConstCpPoly::operator=(), ConstCpPoly::reportParameters(), ConstCpPoly::updateProperties(), and ConstCpPoly::updatePropertiesTemp().
|
protected |
log of the t0 value
Definition at line 132 of file ConstCpPoly.h.
Referenced by ConstCpPoly::ConstCpPoly(), ConstCpPoly::modifyParameters(), ConstCpPoly::operator=(), ConstCpPoly::updateProperties(), and ConstCpPoly::updatePropertiesTemp().