Clean up doxygen comments for SpeciesThermoInterpType classes
This commit is contained in:
parent
75b0c71044
commit
78b471fbf9
9 changed files with 269 additions and 493 deletions
|
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
* @file AdsorbateThermo.h
|
||||
* @file AdsorbateThermo.h
|
||||
*
|
||||
* Header for a single-species standard
|
||||
* state object derived from \link Cantera::SpeciesThermoInterpType
|
||||
* SpeciesThermoInterpType\endlink based on the expressions for the
|
||||
* thermo properties of a species with several vibrational models.
|
||||
* Header for a single-species standard state object derived from \link
|
||||
* Cantera::SpeciesThermoInterpType SpeciesThermoInterpType\endlink based on the
|
||||
* expressions for the thermo properties of a species with several vibrational
|
||||
* models.
|
||||
*/
|
||||
// Copyright 2007 California Institute of Technology
|
||||
|
||||
|
|
@ -20,9 +20,9 @@ namespace Cantera
|
|||
* An adsorbed surface species.
|
||||
*
|
||||
* This class is designed specifically for use by the class
|
||||
* GeneralSpeciesThermo. It implements a model for the
|
||||
* thermodynamic properties of a molecule that can be modeled as a
|
||||
* set of independent quantum harmonic oscillators.
|
||||
* GeneralSpeciesThermo. It implements a model for the thermodynamic properties
|
||||
* of a molecule that can be modeled as a set of independent quantum harmonic
|
||||
* oscillators.
|
||||
*
|
||||
* @ingroup spthermo
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,11 +15,10 @@ namespace Cantera
|
|||
{
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* \f[
|
||||
* \frac{c_p(T)}{R} = Cp0\_R
|
||||
|
|
@ -50,9 +49,9 @@ public:
|
|||
* @param tlow Minimum temperature
|
||||
* @param thigh Maximum temperature
|
||||
* @param pref reference pressure (Pa).
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state for species n.
|
||||
* There are 4 coefficients for the ConstCpPoly parameterization.
|
||||
* @param coeffs Vector of coefficients used to set the parameters for
|
||||
* the standard state for species n. There are 4
|
||||
* coefficients for the ConstCpPoly parameterization.
|
||||
* - c[0] = \f$ T_0 \f$(Kelvin)
|
||||
* - c[1] = \f$ H_k^o(T_0, p_{ref}) \f$ (J/kmol)
|
||||
* - c[2] = \f$ S_k^o(T_0, p_{ref}) \f$ (J/kmol K)
|
||||
|
|
@ -67,20 +66,12 @@ public:
|
|||
return CONSTANT_CP;
|
||||
}
|
||||
|
||||
//! 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.
|
||||
* @copydoc SpeciesThermoInterpType::updateProperties
|
||||
*
|
||||
* Form and Length of the temperature polynomial:
|
||||
* - m_t[0] = tt;
|
||||
*
|
||||
* @param tt Vector of temperature polynomials
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
*/
|
||||
void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT,
|
||||
|
|
@ -93,11 +84,6 @@ public:
|
|||
doublereal& tlow, doublereal& thigh,
|
||||
doublereal& pref,
|
||||
doublereal* const coeffs) const;
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParameters(doublereal* coeffs);
|
||||
|
||||
virtual doublereal reportHf298(doublereal* const h298 = 0) const;
|
||||
|
|
|
|||
|
|
@ -15,23 +15,22 @@ namespace Cantera
|
|||
class SpeciesThermo;
|
||||
class XML_Node;
|
||||
|
||||
//! The Mu0Poly class implements an interpolation of the Gibbs free energy based on a
|
||||
//! piecewise constant heat capacity approximation.
|
||||
//! The Mu0Poly class implements an interpolation of the Gibbs free energy based
|
||||
//! on a piecewise constant heat capacity approximation.
|
||||
/*!
|
||||
* The Mu0Poly class implements a piecewise constant heat capacity approximation.
|
||||
* of the standard state chemical potential of one
|
||||
* species at a single reference pressure.
|
||||
* The chemical potential is input as a series of (\f$T\f$, \f$ \mu^o(T)\f$)
|
||||
* values. The first temperature is assumed to be equal
|
||||
* to 298.15 K; however, this may be relaxed in the future.
|
||||
* This information, and an assumption of a constant
|
||||
* heat capacity within each interval is enough to
|
||||
* calculate all thermodynamic functions.
|
||||
* The Mu0Poly class implements a piecewise constant heat capacity
|
||||
* approximation. of the standard state chemical potential of one species at a
|
||||
* single reference pressure. The chemical potential is input as a series of
|
||||
* (\f$T\f$, \f$ \mu^o(T)\f$) values. The first temperature is assumed to be
|
||||
* equal to 298.15 K; however, this may be relaxed in the future. This
|
||||
* information, and an assumption of a constant heat capacity within each
|
||||
* interval is enough to calculate all thermodynamic functions.
|
||||
*
|
||||
* The piece-wise constant heat capacity is calculated from the change in the chemical potential over each interval.
|
||||
* Once the heat capacity is known, the other thermodynamic functions may be determined.
|
||||
* The basic equation for going from temperature point 1 to temperature point 2
|
||||
* are as follows for \f$ T \f$, \f$ T_1 <= T <= T_2 \f$
|
||||
* The piece-wise constant heat capacity is calculated from the change in the
|
||||
* chemical potential over each interval. Once the heat capacity is known, the
|
||||
* other thermodynamic functions may be determined. The basic equation for going
|
||||
* from temperature point 1 to temperature point 2 are as follows for \f$ T \f$,
|
||||
* \f$ T_1 <= T <= T_2 \f$
|
||||
*
|
||||
* \f[
|
||||
* \mu^o(T_1) = h^o(T_1) - T_1 * s^o(T_1)
|
||||
|
|
@ -46,7 +45,8 @@ class XML_Node;
|
|||
* h^o(T_2) = h^o(T_1) + Cp^o(T_1)(T_2 - T_1)
|
||||
* \f]
|
||||
*
|
||||
* Within each interval the following relations are used. For \f$ T \f$, \f$ T_1 <= T <= T_2 \f$
|
||||
* Within each interval the following relations are used. For \f$ T \f$, \f$
|
||||
* T_1 <= T <= T_2 \f$
|
||||
*
|
||||
* \f[
|
||||
* \mu^o(T) = \mu^o(T_1) + Cp^o(T_1)(T - T_1) - Cp^o(T_1)(T_2)ln(\frac{T}{T_1}) - s^o(T_1)(T - T_1)
|
||||
|
|
@ -58,13 +58,12 @@ class XML_Node;
|
|||
* h^o(T) = h^o(T_1) + Cp^o(T_1)(T - T_1)
|
||||
* \f]
|
||||
*
|
||||
* Notes about temperature interpolation for \f$ T < T_1 \f$ and \f$ T > T_{npoints} \f$.
|
||||
* These are achieved by assuming a constant heat capacity
|
||||
* equal to the value in the closest temperature interval.
|
||||
* No error is thrown.
|
||||
* Notes about temperature interpolation for \f$ T < T_1 \f$ and \f$ T >
|
||||
* T_{npoints} \f$: These are achieved by assuming a constant heat capacity
|
||||
* equal to the value in the closest temperature interval. No error is thrown.
|
||||
*
|
||||
* @note In the future, a better assumption about the heat
|
||||
* capacity may be employed, so that it can be continuous.
|
||||
* @note In the future, a better assumption about the heat capacity may be
|
||||
* employed, so that it can be continuous.
|
||||
*
|
||||
* @ingroup spthermo
|
||||
*/
|
||||
|
|
@ -79,22 +78,21 @@ public:
|
|||
* In the constructor, we calculate and store the piecewise linear
|
||||
* approximation to the thermodynamic functions.
|
||||
*
|
||||
* @param tlow Minimum temperature
|
||||
* @param thigh Maximum temperature
|
||||
* @param pref reference pressure (Pa).
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state for species n.
|
||||
* There are \f$ 2+npoints*2 \f$ coefficients, where
|
||||
* \f$ npoints \f$ are the number of temperature points.
|
||||
* Their identity is further broken down:
|
||||
* @param tlow Minimum temperature
|
||||
* @param thigh Maximum temperature
|
||||
* @param pref reference pressure (Pa).
|
||||
* @param coeffs Vector of coefficients used to set the parameters for the
|
||||
* standard state for species n. There are \f$ 2+npoints*2
|
||||
* \f$ coefficients, where \f$ npoints \f$ are the number of
|
||||
* temperature points. Their identity is further broken down:
|
||||
* - coeffs[0] = number of points (integer)
|
||||
* - coeffs[1] = \f$ h^o(298.15 K) \f$ (J/kmol)
|
||||
* - coeffs[2] = \f$ T_1 \f$ (Kelvin)
|
||||
* - coeffs[3] = \f$ \mu^o(T_1) \f$ (J/kmol)
|
||||
* - coeffs[4] = \f$ T_2 \f$ (Kelvin)
|
||||
* - coeffs[5] = \f$ \mu^o(T_2) \f$ (J/kmol)
|
||||
* - coeffs[6] = \f$ T_3 \f$ (Kelvin)
|
||||
* - coeffs[7] = \f$ \mu^o(T_3) \f$ (J/kmol)
|
||||
* - coeffs[1] = \f$ h^o(298.15 K) \f$ (J/kmol)
|
||||
* - coeffs[2] = \f$ T_1 \f$ (Kelvin)
|
||||
* - coeffs[3] = \f$ \mu^o(T_1) \f$ (J/kmol)
|
||||
* - coeffs[4] = \f$ T_2 \f$ (Kelvin)
|
||||
* - coeffs[5] = \f$ \mu^o(T_2) \f$ (J/kmol)
|
||||
* - coeffs[6] = \f$ T_3 \f$ (Kelvin)
|
||||
* - coeffs[7] = \f$ \mu^o(T_3) \f$ (J/kmol)
|
||||
* - ........
|
||||
* .
|
||||
*/
|
||||
|
|
@ -107,23 +105,13 @@ public:
|
|||
return MU0_INTERP;
|
||||
}
|
||||
|
||||
//! 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.
|
||||
* @copydoc SpeciesThermoInterpType::updateProperties
|
||||
*
|
||||
* Temperature Polynomial:
|
||||
*
|
||||
* tPoly[0] = temp (Kelvin)
|
||||
*
|
||||
* @param tPoly vector of temperature polynomials. Length = 1
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
* tt[0] = temp (Kelvin)
|
||||
*/
|
||||
virtual void updateProperties(const doublereal* tPoly,
|
||||
virtual void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT,
|
||||
doublereal* s_R) const;
|
||||
|
||||
|
|
@ -136,33 +124,22 @@ public:
|
|||
doublereal& pref,
|
||||
doublereal* const coeffs) const;
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParameters(doublereal* coeffs);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Number of intervals in the interpolating linear approximation. Number
|
||||
* of points is one more than the number of intervals.
|
||||
*/
|
||||
//! Number of intervals in the interpolating linear approximation. Number
|
||||
//! of points is one more than the number of intervals.
|
||||
size_t m_numIntervals;
|
||||
|
||||
/**
|
||||
* Value of the enthalpy at T = 298.15. This value is tied to the Heat of
|
||||
* formation of the species at 298.15.
|
||||
*/
|
||||
//! Value of the enthalpy at T = 298.15. This value is tied to the Heat of
|
||||
//! formation of the species at 298.15.
|
||||
doublereal m_H298;
|
||||
|
||||
//! Points at which the standard state chemical potential are given.
|
||||
vector_fp m_t0_int;
|
||||
|
||||
/**
|
||||
* Mu0's are primary input data. They aren't strictly
|
||||
* needed, but are kept here for convenience.
|
||||
*/
|
||||
//! Mu0's are primary input data. They aren't strictly needed, but are kept
|
||||
//! here for convenience.
|
||||
vector_fp m_mu0_R_int;
|
||||
|
||||
//! Dimensionless Enthalpies at the temperature points
|
||||
|
|
@ -177,36 +154,32 @@ protected:
|
|||
private:
|
||||
//! process the coefficients
|
||||
/*!
|
||||
* Mu0Poly():
|
||||
*
|
||||
* In the constructor, we calculate and store the piecewise linear
|
||||
* approximation to the thermodynamic functions.
|
||||
*
|
||||
* @param coeffs coefficients. These are defined as follows:
|
||||
*
|
||||
* coeffs[0] = number of points (integer)
|
||||
* 1 = H298(J/kmol)
|
||||
* 2 = T1 (Kelvin)
|
||||
* 3 = mu1 (J/kmol)
|
||||
* 4 = T2 (Kelvin)
|
||||
* 5 = mu2 (J/kmol)
|
||||
* 6 = T3 (Kelvin)
|
||||
* 7 = mu3 (J/kmol)
|
||||
* ........
|
||||
* - coeffs[0] = number of points (integer)
|
||||
* - coeffs[1] = \f$ h^o(298.15 K) \f$ (J/kmol)
|
||||
* - coeffs[2] = \f$ T_1 \f$ (Kelvin)
|
||||
* - coeffs[3] = \f$ \mu^o(T_1) \f$ (J/kmol)
|
||||
* - coeffs[4] = \f$ T_2 \f$ (Kelvin)
|
||||
* - coeffs[5] = \f$ \mu^o(T_2) \f$ (J/kmol)
|
||||
* - coeffs[6] = \f$ T_3 \f$ (Kelvin)
|
||||
* - coeffs[7] = \f$ \mu^o(T_3) \f$ (J/kmol)
|
||||
* - ........
|
||||
*/
|
||||
void processCoeffs(const doublereal* coeffs);
|
||||
};
|
||||
|
||||
//! Install a Mu0 polynomial thermodynamic reference state
|
||||
//! Install a Mu0 polynomial thermodynamic reference state
|
||||
/*!
|
||||
* Install a Mu0 polynomial thermodynamic reference state property
|
||||
* parameterization for species k into a SpeciesThermo instance,
|
||||
* getting the information from an XML database.
|
||||
* parameterization for species k into a SpeciesThermo instance, getting the
|
||||
* information from an XML database.
|
||||
*
|
||||
* @param Mu0Node Pointer to the XML element containing the
|
||||
* Mu0 information.
|
||||
* @param Mu0Node Pointer to the XML element containing the Mu0 information.
|
||||
*
|
||||
* @ingroup spthermo
|
||||
* @ingroup spthermo
|
||||
*/
|
||||
Mu0Poly* newMu0ThermoFromXML(const XML_Node& Mu0Node);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
/**
|
||||
* @file Nasa9Poly1.h
|
||||
* Header for a single-species standard state object derived
|
||||
* from
|
||||
* \link Cantera::SpeciesThermoInterpType SpeciesThermoInterpType\endlink based
|
||||
* on the NASA 9 coefficient temperature polynomial form applied to
|
||||
* one temperature region
|
||||
* (see \ref spthermo and class \link Cantera::Nasa9Poly1 Nasa9Poly1\endlink).
|
||||
* @file Nasa9Poly1.h Header for a single-species standard state object derived
|
||||
* from \link Cantera::SpeciesThermoInterpType
|
||||
* SpeciesThermoInterpType\endlink based on the NASA 9 coefficient
|
||||
* temperature polynomial form applied to one temperature region (see \ref
|
||||
* spthermo and class \link Cantera::Nasa9Poly1 Nasa9Poly1\endlink).
|
||||
*
|
||||
* This parameterization has one NASA temperature region.
|
||||
* This parameterization has one NASA temperature region.
|
||||
*/
|
||||
/*
|
||||
* Copyright (2006) Sandia Corporation. Under the terms of
|
||||
|
|
@ -24,16 +22,13 @@ namespace Cantera
|
|||
{
|
||||
//! The NASA 9 polynomial parameterization for one temperature range.
|
||||
/*!
|
||||
* This parameterization expresses the heat capacity via a
|
||||
* 7 coefficient polynomial.
|
||||
* Note that this is the form used in the
|
||||
* 2002 NASA equilibrium program. A reference to the form is
|
||||
* provided below:
|
||||
* This parameterization expresses the heat capacity via a 7 coefficient
|
||||
* polynomial. Note that this is the form used in the 2002 NASA equilibrium
|
||||
* program. A reference to the form is provided below:
|
||||
*
|
||||
* "NASA Glenn Coefficients for Calculating Thermodynamic
|
||||
* Properties of Individual Species,"
|
||||
* B. J. McBride, M. J. Zehe, S. Gordon
|
||||
* NASA/TP-2002-211556, Sept. 2002
|
||||
* "NASA Glenn Coefficients for Calculating Thermodynamic Properties of
|
||||
* Individual Species," B. J. McBride, M. J. Zehe, S. Gordon
|
||||
* NASA/TP-2002-211556, Sept. 2002
|
||||
*
|
||||
* Nine coefficients \f$(a_0,\dots,a_8)\f$ are used to represent
|
||||
* \f$ C_p^0(T)\f$, \f$ H^0(T)\f$, and \f$ S^0(T) \f$ as
|
||||
|
|
@ -54,16 +49,13 @@ namespace Cantera
|
|||
* + a_3 T + \frac{a_4}{2} T^2 + \frac{a_5}{3} T^3 + \frac{a_6}{4} T^4 + a_8
|
||||
* \f]
|
||||
*
|
||||
* The standard state is assumed to be an ideal gas at the
|
||||
* standard pressure of 1 bar, for gases.
|
||||
* For condensed species, the standard state is the
|
||||
* pure crystalline or liquid substance at the standard
|
||||
* pressure of 1 atm.
|
||||
* The standard state is assumed to be an ideal gas at the standard pressure of
|
||||
* 1 bar, for gases. For condensed species, the standard state is the pure
|
||||
* crystalline or liquid substance at the standard pressure of 1 atm.
|
||||
*
|
||||
* These NASA representations may have multiple temperature regions
|
||||
* through the use of the Nasa9PolyMultiTempRegion object, which uses
|
||||
* multiple copies of this Nasa9Poly1 object to handle multiple temperature
|
||||
* regions.
|
||||
* These NASA representations may have multiple temperature regions through the
|
||||
* use of the Nasa9PolyMultiTempRegion object, which uses multiple copies of
|
||||
* this Nasa9Poly1 object to handle multiple temperature regions.
|
||||
*
|
||||
* @ingroup spthermo
|
||||
* @see Nasa9PolyMultiTempRegion
|
||||
|
|
@ -92,58 +84,27 @@ public:
|
|||
virtual size_t temperaturePolySize() const { return 7; }
|
||||
virtual void updateTemperaturePoly(double T, double* T_poly) const;
|
||||
|
||||
//! 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.
|
||||
* @copydoc SpeciesThermoInterpType::updateProperties
|
||||
*
|
||||
* Temperature Polynomial:
|
||||
* tt[0] = t;
|
||||
* tt[1] = t*t;
|
||||
* tt[2] = t*t*t;
|
||||
* tt[3] = t*t*t*t;
|
||||
* tt[4] = 1.0/t;
|
||||
* tt[5] = 1.0/(t*t);
|
||||
* tt[6] = std::log(t);
|
||||
*
|
||||
* @param tt vector of temperature polynomials
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
* - tt[0] = t;
|
||||
* - tt[1] = t*t;
|
||||
* - tt[2] = t*t*t;
|
||||
* - tt[3] = t*t*t*t;
|
||||
* - tt[4] = 1.0/t;
|
||||
* - tt[5] = 1.0/(t*t);
|
||||
* - tt[6] = std::log(t);
|
||||
*/
|
||||
virtual void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT, doublereal* s_R) const;
|
||||
|
||||
//! 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.
|
||||
*
|
||||
* Temperature Polynomial:
|
||||
* tt[0] = t;
|
||||
* tt[1] = t*t;
|
||||
* tt[2] = t*t*t;
|
||||
* tt[3] = t*t*t*t;
|
||||
* tt[4] = 1.0/t;
|
||||
* tt[5] = 1.0/(t*t);
|
||||
* tt[6] = std::log(t);
|
||||
*
|
||||
* @param temp Temperature (Kelvin)
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
*/
|
||||
virtual void updatePropertiesTemp(const doublereal temp,
|
||||
doublereal* cp_R, doublereal* h_RT,
|
||||
doublereal* s_R) const;
|
||||
|
||||
//!This utility function reports back the type of
|
||||
//! parameterization and all of the parameters for the
|
||||
//! species, index.
|
||||
//! This utility function reports back the type of parameterization and all
|
||||
//! of the parameters for the species
|
||||
/*!
|
||||
* All parameters are output variables
|
||||
*
|
||||
|
|
@ -152,25 +113,19 @@ public:
|
|||
* @param tlow output - Minimum temperature
|
||||
* @param thigh output - Maximum temperature
|
||||
* @param pref output - reference pressure (Pa).
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state. There are
|
||||
* 12 of them, designed to be compatible
|
||||
* with the multiple temperature formulation.
|
||||
* coeffs[0] is equal to one.
|
||||
* coeffs[1] is min temperature
|
||||
* coeffs[2] is max temperature
|
||||
* coeffs[3+i] from i =0,9 are the coefficients themselves
|
||||
* @param coeffs Vector of coefficients used to set the parameters for
|
||||
* the standard state. There are 12 of them, designed to be compatible
|
||||
* with the multiple temperature formulation.
|
||||
* - coeffs[0] is equal to one.
|
||||
* - coeffs[1] is min temperature
|
||||
* - coeffs[2] is max temperature
|
||||
* - coeffs[3+i] from i =0,9 are the coefficients themselves
|
||||
*/
|
||||
virtual void reportParameters(size_t& n, int& type,
|
||||
doublereal& tlow, doublereal& thigh,
|
||||
doublereal& pref,
|
||||
doublereal* const coeffs) const;
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParameters(doublereal* coeffs);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -18,16 +18,15 @@
|
|||
|
||||
namespace Cantera
|
||||
{
|
||||
//! The NASA 9 polynomial parameterization for a single species
|
||||
//! encompassing multiple temperature regions.
|
||||
//! The NASA 9 polynomial parameterization for a single species encompassing
|
||||
//! multiple temperature regions.
|
||||
/*!
|
||||
* The parameterization used in each temperature range is described in the
|
||||
* documentation for class Nasa9Poly1.
|
||||
*
|
||||
* These NASA representations may have multiple temperature regions
|
||||
* through the use of this Nasa9PolyMultiTempRegion object, which uses
|
||||
* multiple copies of the Nasa9Poly1 object to handle multiple temperature
|
||||
* regions.
|
||||
* These NASA representations may have multiple temperature regions through the
|
||||
* use of this Nasa9PolyMultiTempRegion object, which uses multiple copies of
|
||||
* the Nasa9Poly1 object to handle multiple temperature regions.
|
||||
*
|
||||
* @ingroup spthermo
|
||||
* @see Nasa9Poly1
|
||||
|
|
@ -40,31 +39,19 @@ public:
|
|||
|
||||
//! Constructor used in templated instantiations
|
||||
/*!
|
||||
* @param regionPts Vector of pointers to Nasa9Poly1 objects. These
|
||||
* objects all refer to the temperature regions for the
|
||||
* same species. The vector must be in increasing
|
||||
* temperature region format. Together they
|
||||
* represent the reference temperature parameterization
|
||||
* for a single species.
|
||||
* @param regionPts Vector of pointers to Nasa9Poly1 objects. These objects
|
||||
* all refer to the temperature regions for the same species. The vector
|
||||
* must be in increasing temperature region format. Together they
|
||||
* represent the reference temperature parameterization for a single
|
||||
* species.
|
||||
*
|
||||
* Note, after the constructor, we will own the underlying
|
||||
* Nasa9Poly1 objects and be responsible for owning them.
|
||||
* Note, after the constructor, we will own the underlying Nasa9Poly1
|
||||
* objects and be responsible for owning them.
|
||||
*/
|
||||
Nasa9PolyMultiTempRegion(std::vector<Nasa9Poly1*> ®ionPts);
|
||||
|
||||
//! Copy constructor
|
||||
/*!
|
||||
* @param b object to be copied
|
||||
*/
|
||||
Nasa9PolyMultiTempRegion(const Nasa9PolyMultiTempRegion& b);
|
||||
|
||||
//! Assignment operator
|
||||
/*!
|
||||
* @param b object to be copied
|
||||
*/
|
||||
Nasa9PolyMultiTempRegion& operator=(const Nasa9PolyMultiTempRegion& b);
|
||||
|
||||
//! Destructor
|
||||
virtual ~Nasa9PolyMultiTempRegion();
|
||||
|
||||
virtual SpeciesThermoInterpType*
|
||||
|
|
@ -75,60 +62,17 @@ public:
|
|||
virtual size_t temperaturePolySize() const { return 7; }
|
||||
virtual void updateTemperaturePoly(double T, double* T_poly) const;
|
||||
|
||||
//! 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.
|
||||
*
|
||||
* Temperature Polynomial:
|
||||
* tt[0] = t;
|
||||
* tt[1] = t*t;
|
||||
* tt[2] = t*t*t;
|
||||
* tt[3] = t*t*t*t;
|
||||
* tt[4] = 1.0/t;
|
||||
* tt[5] = 1.0/(t*t);
|
||||
* tt[6] = std::log(t);
|
||||
*
|
||||
* @param tt vector of temperature polynomials
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
*/
|
||||
//! @copydoc Nasa9Poly1::updateProperties
|
||||
virtual void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT,
|
||||
doublereal* s_R) const;
|
||||
|
||||
//! 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.
|
||||
*
|
||||
* Temperature Polynomial:
|
||||
* tt[0] = t;
|
||||
* tt[1] = t*t;
|
||||
* tt[2] = t*t*t;
|
||||
* tt[3] = t*t*t*t;
|
||||
* tt[4] = 1.0/t;
|
||||
* tt[5] = 1.0/(t*t);
|
||||
* tt[6] = std::log(t);
|
||||
*
|
||||
* @param temp Temperature (Kelvin)
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
*/
|
||||
virtual void updatePropertiesTemp(const doublereal temp,
|
||||
doublereal* cp_R, doublereal* h_RT,
|
||||
doublereal* s_R) const;
|
||||
|
||||
//!This utility function reports back the type of
|
||||
//! parameterization and all of the parameters for the
|
||||
//! species, index.
|
||||
//! This utility function reports back the type of parameterization and all
|
||||
//! of the parameters for the species, index.
|
||||
/*!
|
||||
* All parameters are output variables
|
||||
*
|
||||
|
|
@ -137,9 +81,8 @@ public:
|
|||
* @param tlow output - Minimum temperature
|
||||
* @param thigh output - Maximum temperature
|
||||
* @param pref output - reference pressure (Pa).
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
* There are 1 + 11*nzones coefficients
|
||||
* @param coeffs Vector of coefficients used to set the parameters for
|
||||
* the standard state. There are 1 + 11*nzones coefficients.
|
||||
* coeffs[0] is equal to nTempZones.
|
||||
* index = 1
|
||||
* for each zone:
|
||||
|
|
@ -152,11 +95,6 @@ public:
|
|||
doublereal& pref,
|
||||
doublereal* const coeffs) const;
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParameters(doublereal* coeffs);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -17,12 +17,11 @@
|
|||
namespace Cantera
|
||||
{
|
||||
/**
|
||||
* The NASA polynomial parameterization for one temperature range.
|
||||
* This parameterization expresses the heat capacity as a
|
||||
* fourth-order polynomial. Note that this is the form used in the
|
||||
* 1971 NASA equilibrium program and by the Chemkin software
|
||||
* package, but differs from the form used in the more recent NASA
|
||||
* equilibrium program.
|
||||
* The NASA polynomial parameterization for one temperature range. This
|
||||
* parameterization expresses the heat capacity as a fourth-order polynomial.
|
||||
* Note that this is the form used in the 1971 NASA equilibrium program and by
|
||||
* the Chemkin software package, but differs from the form used in the more
|
||||
* recent NASA equilibrium program.
|
||||
*
|
||||
* Seven coefficients \f$(a_0,\dots,a_6)\f$ are used to represent
|
||||
* \f$ c_p^0(T)\f$, \f$ h^0(T)\f$, and \f$ s^0(T) \f$ as
|
||||
|
|
@ -32,11 +31,11 @@ namespace Cantera
|
|||
* \f]
|
||||
* \f[
|
||||
* \frac{h^0(T)}{RT} = a_0 + \frac{a_1}{2} T + \frac{a_2}{3} T^2
|
||||
* + \frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}.
|
||||
* + \frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}.
|
||||
* \f]
|
||||
* \f[
|
||||
* \frac{s^0(T)}{R} = a_0\ln T + a_1 T + \frac{a_2}{2} T^2
|
||||
+ \frac{a_3}{3} T^3 + \frac{a_4}{4} T^4 + a_6.
|
||||
* + \frac{a_3}{3} T^3 + \frac{a_4}{4} T^4 + a_6.
|
||||
* \f]
|
||||
*
|
||||
* @ingroup spthermo
|
||||
|
|
@ -82,12 +81,8 @@ public:
|
|||
T_poly[5] = std::log(T);
|
||||
}
|
||||
|
||||
//! 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.
|
||||
* @copydoc SpeciesThermoInterpType::updateProperties
|
||||
*
|
||||
* Temperature Polynomial:
|
||||
* tt[0] = t;
|
||||
|
|
@ -96,11 +91,6 @@ public:
|
|||
* tt[3] = m_t[2]*t;
|
||||
* tt[4] = 1.0/t;
|
||||
* tt[5] = std::log(t);
|
||||
*
|
||||
* @param tt vector of temperature polynomials
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
*/
|
||||
virtual void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT, doublereal* s_R) const {
|
||||
|
|
@ -143,11 +133,6 @@ public:
|
|||
std::copy(m_coeff.begin(), m_coeff.end(), coeffs);
|
||||
}
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParameters(doublereal* coeffs) {
|
||||
std::copy(coeffs, coeffs+7, m_coeff.begin());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,11 @@
|
|||
namespace Cantera
|
||||
{
|
||||
/**
|
||||
* The NASA polynomial parameterization for two temperature ranges.
|
||||
* This parameterization expresses the heat capacity as a
|
||||
* fourth-order polynomial. Note that this is the form used in the
|
||||
* 1971 NASA equilibrium program and by the Chemkin software
|
||||
* package, but differs from the form used in the more recent NASA
|
||||
* equilibrium program.
|
||||
* The NASA polynomial parameterization for two temperature ranges. This
|
||||
* parameterization expresses the heat capacity as a fourth-order polynomial.
|
||||
* Note that this is the form used in the 1971 NASA equilibrium program and by
|
||||
* the Chemkin software package, but differs from the form used in the more
|
||||
* recent NASA equilibrium program.
|
||||
*
|
||||
* Seven coefficients \f$(a_0,\dots,a_6)\f$ are used to represent
|
||||
* \f$ c_p^0(T)\f$, \f$ h^0(T)\f$, and \f$ s^0(T) \f$ as
|
||||
|
|
@ -33,11 +32,11 @@ namespace Cantera
|
|||
* \f]
|
||||
* \f[
|
||||
* \frac{h^0(T)}{RT} = a_0 + \frac{a_1}{2} T + \frac{a_2}{3} T^2
|
||||
* + \frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}.
|
||||
* + \frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}.
|
||||
* \f]
|
||||
* \f[
|
||||
* \frac{s^0(T)}{R} = a_0\ln T + a_1 T + \frac{a_2}{2} T^2
|
||||
+ \frac{a_3}{3} T^3 + \frac{a_4}{4} T^4 + a_6.
|
||||
* + \frac{a_3}{3} T^3 + \frac{a_4}{4} T^4 + a_6.
|
||||
* \f]
|
||||
*
|
||||
* This class is designed specifically for use by the class
|
||||
|
|
@ -89,26 +88,7 @@ public:
|
|||
mnp_low.updateTemperaturePoly(T, T_poly);
|
||||
}
|
||||
|
||||
//! 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.
|
||||
*
|
||||
* Temperature Polynomial:
|
||||
* tt[0] = t;
|
||||
* tt[1] = t*t;
|
||||
* tt[2] = m_t[1]*t;
|
||||
* tt[3] = m_t[2]*t;
|
||||
* tt[4] = 1.0/t;
|
||||
* tt[5] = std::log(t);
|
||||
*
|
||||
* @param tt vector of temperature polynomials
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
*/
|
||||
//! @copydoc NasaPoly1::updateProperties
|
||||
void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT, doublereal* s_R) const {
|
||||
if (tt[0] <= m_midT) {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
namespace Cantera
|
||||
{
|
||||
//! The Shomate polynomial parameterization for one temperature range
|
||||
//! for one species
|
||||
//! The Shomate polynomial parameterization for one temperature range for one
|
||||
//! species
|
||||
/*!
|
||||
* Seven coefficients \f$(A,\dots,G)\f$ are used to represent
|
||||
* \f$ c_p^0(T)\f$, \f$ h^0(T)\f$, and \f$ s^0(T) \f$ as
|
||||
|
|
@ -29,15 +29,15 @@ namespace Cantera
|
|||
* \f]
|
||||
* \f[
|
||||
* \tilde{h}^0(T) = A t + \frac{B t^2}{2} + \frac{C t^3}{3}
|
||||
+ \frac{D t^4}{4} - \frac{E}{t} + F.
|
||||
* + \frac{D t^4}{4} - \frac{E}{t} + F.
|
||||
* \f]
|
||||
* \f[
|
||||
* \tilde{s}^0(T) = A\ln t + B t + \frac{C t^2}{2}
|
||||
+ \frac{D t^3}{3} - \frac{E}{2t^2} + G.
|
||||
* + \frac{D t^3}{3} - \frac{E}{2t^2} + G.
|
||||
* \f]
|
||||
*
|
||||
* In the above expressions, the thermodynamic polynomials are expressed
|
||||
* in dimensional units, but the temperature,\f$ t \f$, is divided by 1000. The
|
||||
* In the above expressions, the thermodynamic polynomials are expressed in
|
||||
* dimensional units, but the temperature,\f$ t \f$, is divided by 1000. The
|
||||
* following dimensions are assumed in the above expressions:
|
||||
*
|
||||
* - \f$ \tilde{c}_p^0(T)\f$ = Heat Capacity (J/gmol*K)
|
||||
|
|
@ -45,8 +45,8 @@ namespace Cantera
|
|||
* - \f$ \tilde{s}^0(T) \f$= standard Entropy (J/gmol*K)
|
||||
* - \f$ t \f$= temperature (K) / 1000.
|
||||
*
|
||||
* For more information about Shomate polynomials, see the NIST website,
|
||||
* http://webbook.nist.gov/
|
||||
* For more information about Shomate polynomials, see the NIST website,
|
||||
* http://webbook.nist.gov/
|
||||
*
|
||||
* Before being used within Cantera, the dimensions must be adjusted to those
|
||||
* used by Cantera (i.e., Joules and kmol).
|
||||
|
|
@ -100,13 +100,10 @@ public:
|
|||
T_poly[5] = 1.0/tt;
|
||||
}
|
||||
|
||||
//! 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.
|
||||
* @copydoc SpeciesThermoInterpType::updateProperties
|
||||
*
|
||||
* Form of the temperature polynomial:
|
||||
* - `t` is T/1000.
|
||||
* - `t[0] = t`
|
||||
* - `t[1] = t*t`
|
||||
|
|
@ -114,11 +111,6 @@ public:
|
|||
* - `t[3] = 1.0/t[1]`
|
||||
* - `t[4] = log(t)`
|
||||
* - `t[5] = 1.0/t;
|
||||
*
|
||||
* @param[in] tt Array of evaluated temperature functions
|
||||
* @param[out] cp_R Dimensionless heat capacity
|
||||
* @param[out] h_RT Dimensionless enthalpy
|
||||
* @param[out] s_R Dimensionless entropy
|
||||
*/
|
||||
virtual void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT,
|
||||
|
|
@ -158,11 +150,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
*/
|
||||
virtual void modifyParameters(doublereal* coeffs) {
|
||||
for (size_t i = 0; i < 7; i++) {
|
||||
m_coeff[i] = coeffs[i] * 1000 / GasConstant;
|
||||
|
|
@ -186,8 +173,8 @@ protected:
|
|||
vector_fp m_coeff;
|
||||
};
|
||||
|
||||
//! The Shomate polynomial parameterization for two temperature ranges
|
||||
//! for one species
|
||||
//! The Shomate polynomial parameterization for two temperature ranges for one
|
||||
//! species
|
||||
/*!
|
||||
* Seven coefficients \f$(A,\dots,G)\f$ are used to represent
|
||||
* \f$ c_p^0(T)\f$, \f$ h^0(T)\f$, and \f$ s^0(T) \f$ as
|
||||
|
|
@ -198,11 +185,11 @@ protected:
|
|||
* \f]
|
||||
* \f[
|
||||
* \tilde{h}^0(T) = A t + \frac{B t^2}{2} + \frac{C t^3}{3}
|
||||
+ \frac{D t^4}{4} - \frac{E}{t} + F.
|
||||
* + \frac{D t^4}{4} - \frac{E}{t} + F.
|
||||
* \f]
|
||||
* \f[
|
||||
* \tilde{s}^0(T) = A\ln t + B t + \frac{C t^2}{2}
|
||||
+ \frac{D t^3}{3} - \frac{E}{2t^2} + G.
|
||||
* + \frac{D t^3}{3} - \frac{E}{2t^2} + G.
|
||||
* \f]
|
||||
*
|
||||
* In the above expressions, the thermodynamic polynomials are expressed
|
||||
|
|
@ -214,8 +201,8 @@ protected:
|
|||
* - \f$ \tilde{s}^0(T) \f$= standard Entropy (J/gmol*K)
|
||||
* - \f$ t \f$= temperature (K) / 1000.
|
||||
*
|
||||
* For more information about Shomate polynomials, see the NIST website,
|
||||
* http://webbook.nist.gov/
|
||||
* For more information about Shomate polynomials, see the NIST website,
|
||||
* http://webbook.nist.gov/
|
||||
*
|
||||
* Before being used within Cantera, the dimensions must be adjusted to those
|
||||
* used by Cantera (i.e., Joules and kmol).
|
||||
|
|
|
|||
|
|
@ -23,57 +23,50 @@ class VPSSMgr;
|
|||
/**
|
||||
* @defgroup spthermo Species Reference-State Thermodynamic Properties
|
||||
*
|
||||
* The ThermoPhase object relies on classes to calculate the thermodynamic
|
||||
* properties of the reference state for all of the species in the phase.
|
||||
* This group describes the types and functionality of the classes that
|
||||
* calculate the reference state thermodynamic functions within %Cantera.
|
||||
* The ThermoPhase object relies on classes to calculate the thermodynamic
|
||||
* properties of the reference state for all of the species in the phase. This
|
||||
* group describes the types and functionality of the classes that calculate
|
||||
* the reference state thermodynamic functions within %Cantera.
|
||||
*
|
||||
* To compute the thermodynamic properties of multicomponent
|
||||
* solutions, it is necessary to know something about the
|
||||
* thermodynamic properties of the individual species present in
|
||||
* the solution. Exactly what sort of species properties are
|
||||
* required depends on the thermodynamic model for the
|
||||
* solution. For a gaseous solution (i.e., a gas mixture), the
|
||||
* species properties required are usually ideal gas properties at
|
||||
* the mixture temperature and at a reference pressure (almost always at
|
||||
* 1 bar). For other types of solutions, however, it may
|
||||
* not be possible to isolate the species in a "pure" state. For
|
||||
* example, the thermodynamic properties of, say, Na+ and Cl- in
|
||||
* saltwater are not easily determined from data on the properties
|
||||
* of solid NaCl, or solid Na metal, or chlorine gas. In this
|
||||
* case, the solvation in water is fundamental to the identity of
|
||||
* the species, and some other reference state must be used. One
|
||||
* common convention for liquid solutions is to use thermodynamic
|
||||
* data for the solutes in the limit of infinite dilution within the
|
||||
* pure solvent; another convention is to reference all properties
|
||||
* to unit molality.
|
||||
* To compute the thermodynamic properties of multicomponent solutions, it is
|
||||
* necessary to know something about the thermodynamic properties of the
|
||||
* individual species present in the solution. Exactly what sort of species
|
||||
* properties are required depends on the thermodynamic model for the solution.
|
||||
* For a gaseous solution (i.e., a gas mixture), the species properties
|
||||
* required are usually ideal gas properties at the mixture temperature and at
|
||||
* a reference pressure (almost always at 1 bar). For other types of solutions,
|
||||
* however, it may not be possible to isolate the species in a "pure" state.
|
||||
* For example, the thermodynamic properties of, say, Na+ and Cl- in saltwater
|
||||
* are not easily determined from data on the properties of solid NaCl, or
|
||||
* solid Na metal, or chlorine gas. In this case, the solvation in water is
|
||||
* fundamental to the identity of the species, and some other reference state
|
||||
* must be used. One common convention for liquid solutions is to use
|
||||
* thermodynamic data for the solutes in the limit of infinite dilution within
|
||||
* the pure solvent; another convention is to reference all properties to unit
|
||||
* molality.
|
||||
*
|
||||
* In defining these standard states for species in a phase, we make
|
||||
* the following definition. A reference state is a standard state
|
||||
* of a species in a phase limited to one particular pressure, the reference
|
||||
* pressure. The reference state specifies the dependence of all
|
||||
* thermodynamic functions as a function of the temperature, in
|
||||
* between a minimum temperature and a maximum temperature. The
|
||||
* reference state also specifies the molar volume of the species
|
||||
* as a function of temperature. The molar volume is a thermodynamic
|
||||
* function.
|
||||
* A full standard state does the same thing as a reference state,
|
||||
* In defining these standard states for species in a phase, we make the
|
||||
* following definition. A reference state is a standard state of a species in
|
||||
* a phase limited to one particular pressure, the reference pressure. The
|
||||
* reference state specifies the dependence of all thermodynamic functions as a
|
||||
* function of the temperature, in between a minimum temperature and a maximum
|
||||
* temperature. The reference state also specifies the molar volume of the
|
||||
* species as a function of temperature. The molar volume is a thermodynamic
|
||||
* function. A full standard state does the same thing as a reference state,
|
||||
* but specifies the thermodynamics functions at all pressures.
|
||||
*
|
||||
* Whatever the conventions used by a particular solution model,
|
||||
* means need to be provided to compute the species properties in
|
||||
* the reference state. Class SpeciesThermo is the base class
|
||||
* for a family of classes that compute properties of all
|
||||
* species in a phase in their reference states, for a range of temperatures.
|
||||
* Note, the pressure dependence of the species thermodynamic functions is not
|
||||
* handled by this particular species thermodynamic model. SpeciesThermo
|
||||
* calculates the reference-state thermodynamic values of all species in a single
|
||||
* phase during each call.
|
||||
* Whatever the conventions used by a particular solution model, means need to
|
||||
* be provided to compute the species properties in the reference state. Class
|
||||
* SpeciesThermo is the base class for a family of classes that compute
|
||||
* properties of all species in a phase in their reference states, for a range
|
||||
* of temperatures. Note, the pressure dependence of the species thermodynamic
|
||||
* functions is not handled by this particular species thermodynamic model.
|
||||
* SpeciesThermo calculates the reference-state thermodynamic values of all
|
||||
* species in a single phase during each call.
|
||||
*
|
||||
* The class SpeciesThermoInterpType is a pure virtual base class for
|
||||
* calculation of thermodynamic functions for a single species
|
||||
* in its reference state.
|
||||
* The following classes inherit from SpeciesThermoInterpType.
|
||||
* calculation of thermodynamic functions for a single species in its reference
|
||||
* state. The following classes inherit from SpeciesThermoInterpType.
|
||||
*
|
||||
* - NasaPoly1 in file NasaPoly1.h
|
||||
* - This is a one zone model, consisting of a 7
|
||||
|
|
@ -112,46 +105,41 @@ class VPSSMgr;
|
|||
* functions by relying on a pressure dependent
|
||||
* standard state object (i.e., a PDSS object) to calculate
|
||||
* the thermodynamic functions.
|
||||
* .
|
||||
*
|
||||
* The most important member function for the SpeciesThermoInterpType class
|
||||
* is the member function
|
||||
* \link SpeciesThermoInterpType::updatePropertiesTemp() updatePropertiesTemp()\endlink.
|
||||
* The function calculates the values of Cp, H, and S for the specific
|
||||
* species pertaining to this class. It takes as its arguments the
|
||||
* base pointer for the vector of Cp, H, and S values for all species
|
||||
* in the phase. The offset for the species is known within the
|
||||
* object.
|
||||
* The most important member function for the SpeciesThermoInterpType class is
|
||||
* the member function SpeciesThermoInterpType::updatePropertiesTemp(). The
|
||||
* function calculates the values of Cp, H, and S for the specific species
|
||||
* pertaining to this class. It takes as its arguments the base pointer for the
|
||||
* vector of Cp, H, and S values for all species in the phase. The offset for
|
||||
* the species is known within the object.
|
||||
*
|
||||
* A key concept for reference states is that there is a maximum and a minimum
|
||||
* temperature beyond which the thermodynamic formulation isn't valid.
|
||||
* Calls for temperatures outside this range will cause the
|
||||
* object to throw a CanteraError.
|
||||
* A key concept for reference states is that there is a maximum and a minimum
|
||||
* temperature beyond which the thermodynamic formulation isn't valid. Calls
|
||||
* for temperatures outside this range will cause the object to throw a
|
||||
* CanteraError.
|
||||
*
|
||||
* @ingroup thermoprops
|
||||
*/
|
||||
|
||||
//! Pure Virtual Base class for the thermodynamic manager for
|
||||
//! an individual species' reference state
|
||||
//! Pure Virtual Base class for the thermodynamic manager for an individual
|
||||
//! species' reference state
|
||||
/*!
|
||||
* This differs from the SpeciesThermo virtual
|
||||
* base class in the sense that this class is meant to handle only
|
||||
* one species. The speciesThermo class is meant to handle the
|
||||
* calculation of all the species (or a large subset) in a phase.
|
||||
* This differs from the SpeciesThermo virtual base class in the sense that this
|
||||
* class is meant to handle only one species. The speciesThermo class is meant
|
||||
* to handle the calculation of all the species (or a large subset) in a phase.
|
||||
*
|
||||
* One key feature is that the update routines use the same
|
||||
* form as the update routines in the speciesThermo class. They update
|
||||
* into a vector of cp_R, s_R, and H_R that spans all of the species in
|
||||
* a phase. Therefore, this class must carry along a species index into that
|
||||
* vector.
|
||||
* One key feature is that the update routines use the same form as the update
|
||||
* routines in the speciesThermo class. They update into a vector of cp_R, s_R,
|
||||
* and H_R that spans all of the species in a phase. Therefore, this class must
|
||||
* carry along a species index into that vector.
|
||||
*
|
||||
* These routine may be templated. A key requirement of the template is that
|
||||
* there is a constructor with the following form:
|
||||
*
|
||||
* @code
|
||||
* SpeciesThermoInterpType(int index, doublereal tlow, doublereal thigh,
|
||||
* doublereal pref, const doublereal* coeffs)
|
||||
* @endcode
|
||||
* @code
|
||||
* SpeciesThermoInterpType(int index, doublereal tlow, doublereal thigh,
|
||||
* doublereal pref, const doublereal* coeffs)
|
||||
* @endcode
|
||||
*
|
||||
* @ingroup spthermo
|
||||
*/
|
||||
|
|
@ -169,14 +157,14 @@ public:
|
|||
virtual SpeciesThermoInterpType*
|
||||
duplMyselfAsSpeciesThermoInterpType() const = 0;
|
||||
|
||||
//! Returns the minimum temperature that the thermo
|
||||
//! parameterization is valid
|
||||
//! Returns the minimum temperature that the thermo parameterization is
|
||||
//! valid
|
||||
virtual doublereal minTemp() const {
|
||||
return m_lowT;
|
||||
}
|
||||
|
||||
//! Returns the maximum temperature that the thermo
|
||||
//! parameterization is valid
|
||||
//! Returns the maximum temperature that the thermo parameterization is
|
||||
//! valid
|
||||
virtual doublereal maxTemp() const {
|
||||
return m_highT;
|
||||
}
|
||||
|
|
@ -212,22 +200,20 @@ public:
|
|||
* The form and length of the Temperature Polynomial may vary depending on
|
||||
* the parameterization.
|
||||
*
|
||||
* @param tempPoly vector of temperature polynomials
|
||||
* @param tt vector of evaluated temperature functions
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
|
||||
* @param s_R Vector of Dimensionless entropies. (length m_kk).
|
||||
*/
|
||||
virtual void updateProperties(const doublereal* tempPoly,
|
||||
virtual void updateProperties(const doublereal* tt,
|
||||
doublereal* cp_R, doublereal* h_RT,
|
||||
doublereal* s_R) const;
|
||||
|
||||
//! 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.
|
||||
* 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, of the species.
|
||||
*
|
||||
* @param temp Temperature (Kelvin)
|
||||
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
|
||||
|
|
@ -239,9 +225,8 @@ public:
|
|||
doublereal* h_RT,
|
||||
doublereal* s_R) const = 0;
|
||||
|
||||
//!This utility function reports back the type of
|
||||
//! parameterization and all of the parameters for the
|
||||
//! species, index.
|
||||
//! This utility function reports back the type of parameterization and all
|
||||
//! of the parameters for the species.
|
||||
/*!
|
||||
* All parameters are output variables
|
||||
*
|
||||
|
|
@ -260,36 +245,36 @@ public:
|
|||
|
||||
//! Modify parameters for the standard state
|
||||
/*!
|
||||
* @param coeffs Vector of coefficients used to set the
|
||||
* parameters for the standard state.
|
||||
* @param coeffs Vector of coefficients used to set the parameters for the
|
||||
* standard state.
|
||||
*/
|
||||
virtual void modifyParameters(doublereal* coeffs) {}
|
||||
|
||||
//! Report the 298 K Heat of Formation of the standard state of one species
|
||||
//! (J kmol-1)
|
||||
/*!
|
||||
* The 298K Heat of Formation is defined as the enthalpy change to create
|
||||
* the standard state of the species from its constituent elements in
|
||||
* their standard states at 298 K and 1 bar.
|
||||
* The 298K Heat of Formation is defined as the enthalpy change to create
|
||||
* the standard state of the species from its constituent elements in their
|
||||
* standard states at 298 K and 1 bar.
|
||||
*
|
||||
* @param h298 If this is nonnull, the current value of the Heat of
|
||||
* Formation at 298K and 1 bar for species m_speciesIndex is
|
||||
* returned in h298[m_speciesIndex].
|
||||
* @return Returns the current value of the Heat of Formation at 298K
|
||||
* and 1 bar for species m_speciesIndex.
|
||||
* @param h298 If this is nonnull, the current value of the Heat of
|
||||
* Formation at 298K and 1 bar for species m_speciesIndex is
|
||||
* returned in h298[m_speciesIndex].
|
||||
* @return the current value of the Heat of Formation at 298K and 1 bar for
|
||||
* species m_speciesIndex.
|
||||
*/
|
||||
virtual doublereal reportHf298(doublereal* const h298 = 0) const;
|
||||
|
||||
//! Modify the value of the 298 K Heat of Formation of one species in the
|
||||
//! phase (J kmol-1)
|
||||
/*!
|
||||
* The 298K heat of formation is defined as the enthalpy change to create
|
||||
* the standard state of the species from its constituent elements in
|
||||
* their standard states at 298 K and 1 bar.
|
||||
* The 298K heat of formation is defined as the enthalpy change to create
|
||||
* the standard state of the species from its constituent elements in their
|
||||
* standard states at 298 K and 1 bar.
|
||||
*
|
||||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at
|
||||
* 298K and 1 bar
|
||||
* @param k Species k
|
||||
* @param Hf298New Specify the new value of the Heat of Formation at
|
||||
* 298K and 1 bar
|
||||
*/
|
||||
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New);
|
||||
|
||||
|
|
@ -305,13 +290,13 @@ protected:
|
|||
//! Class for the thermodynamic manager for an individual species' reference
|
||||
//! state which uses the PDSS base class to satisfy the requests.
|
||||
/*!
|
||||
* This class is a pass-through class for handling thermodynamics calls
|
||||
* for reference state thermo to an pressure dependent standard state (PDSS)
|
||||
* class. For some situations, it makes no sense to have a reference state
|
||||
* at all. One example of this is the real water standard state.
|
||||
* This class is a pass-through class for handling thermodynamics calls for
|
||||
* reference state thermo to an pressure dependent standard state (PDSS) class.
|
||||
* For some situations, it makes no sense to have a reference state at all. One
|
||||
* example of this is the real water standard state.
|
||||
*
|
||||
* What this class does is just to pass through the calls for thermo at (T, p0)
|
||||
* to the PDSS class, which evaluates the calls at (T, p0).
|
||||
* What this class does is just to pass through the calls for thermo at (T, p0)
|
||||
* to the PDSS class, which evaluates the calls at (T, p0).
|
||||
*
|
||||
* @ingroup spthermo
|
||||
*/
|
||||
|
|
@ -323,50 +308,37 @@ public:
|
|||
|
||||
//! Main Constructor
|
||||
/*!
|
||||
* @param vpssmgr_ptr Pointer to the Variable pressure standard state
|
||||
* manager that owns the PDSS object that will handle calls for this
|
||||
* object
|
||||
* @param PDSS_ptr Pointer to the PDSS object that handles calls for
|
||||
* this object
|
||||
* @param vpssmgr_ptr Pointer to the Variable pressure standard state
|
||||
* manager that owns the PDSS object that will handle calls for this
|
||||
* object
|
||||
* @param PDSS_ptr Pointer to the PDSS object that handles calls for
|
||||
* this object
|
||||
*/
|
||||
STITbyPDSS(VPSSMgr* vpssmgr_ptr, PDSS* PDSS_ptr);
|
||||
|
||||
//! copy constructor
|
||||
/*!
|
||||
* @param b Object to be copied
|
||||
*/
|
||||
STITbyPDSS(const STITbyPDSS& b);
|
||||
|
||||
virtual SpeciesThermoInterpType* duplMyselfAsSpeciesThermoInterpType() const;
|
||||
|
||||
//! Initialize and/or Reinitialize all the pointers for this object
|
||||
/*!
|
||||
* This routine is needed because the STITbyPDSS object doesn't own the
|
||||
* underlying objects. Therefore, shallow copies during duplication
|
||||
* operations may fail.
|
||||
* This routine is needed because the STITbyPDSS object doesn't own the
|
||||
* underlying objects. Therefore, shallow copies during duplication
|
||||
* operations may fail.
|
||||
*
|
||||
* @param speciesIndex species index for this object. Note, this must
|
||||
* agree with what was internally set before.
|
||||
* @param vpssmgr_ptr Pointer to the Variable pressure standard state
|
||||
* manager that owns the PDSS object that will handle calls for this
|
||||
* object
|
||||
* @param PDSS_ptr Pointer to the PDSS object that handles calls for
|
||||
* this object
|
||||
* @param speciesIndex species index for this object. Note, this must agree
|
||||
* with what was internally set before.
|
||||
* @param vpssmgr_ptr Pointer to the Variable pressure standard state
|
||||
* manager that owns the PDSS object that will handle calls for this
|
||||
* object
|
||||
* @param PDSS_ptr Pointer to the PDSS object that handles calls for
|
||||
* this object
|
||||
*/
|
||||
void initAllPtrs(size_t speciesIndex, VPSSMgr* vpssmgr_ptr, PDSS* PDSS_ptr);
|
||||
|
||||
//! Returns the minimum temperature that the thermo
|
||||
//! parameterization is valid
|
||||
virtual doublereal minTemp() const;
|
||||
|
||||
//! Returns the maximum temperature that the thermo
|
||||
//! parameterization is valid
|
||||
virtual doublereal maxTemp() const;
|
||||
|
||||
//! Returns the reference pressure (Pa)
|
||||
virtual doublereal refPressure() const;
|
||||
|
||||
//! Returns an integer representing the type of parameterization
|
||||
virtual int reportType() const;
|
||||
|
||||
virtual void updateProperties(const doublereal* tempPoly,
|
||||
|
|
@ -386,8 +358,8 @@ public:
|
|||
virtual void modifyParameters(doublereal* coeffs) {}
|
||||
|
||||
private:
|
||||
//! Pointer to the Variable pressure standard state manager
|
||||
//! that owns the PDSS object that will handle calls for this object
|
||||
//! Pointer to the Variable pressure standard state manager that owns the
|
||||
//! PDSS object that will handle calls for this object
|
||||
VPSSMgr* m_vpssmgr_ptr;
|
||||
|
||||
//! Pointer to the PDSS object that handles calls for this object
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue