Cantera  3.0.0
Loading...
Searching...
No Matches

The NASA 9 polynomial parameterization for one temperature range. More...

#include <Nasa9Poly1.h>

Inheritance diagram for Nasa9Poly1:
[legend]

Detailed Description

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 in McBride, et al. [26].

Nine coefficients \( (a_0,\dots,a_8) \) are used to represent \( C_p^0(T) \), \( H^0(T) \), and \( S^0(T) \) as polynomials in \( T \) :

\[ \frac{C_p^0(T)}{R} = a_0 T^{-2} + a_1 T^{-1} + a_2 + a_3 T + a_4 T^2 + a_5 T^3 + a_6 T^4 \]

\[ \frac{H^0(T)}{RT} = - a_0 T^{-2} + a_1 \frac{\ln T}{T} + a_2 + \frac{a_3}{2} T + \frac{a_4}{3} T^2 + \frac{a_5}{4} T^3 + \frac{a_6}{5} T^4 + \frac{a_7}{T} \]

\[ \frac{s^0(T)}{R} = - \frac{a_0}{2} T^{-2} - a_1 T^{-1} + a_2 \ln T + a_3 T + \frac{a_4}{2} T^2 + \frac{a_5}{3} T^3 + \frac{a_6}{4} T^4 + a_8 \]

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.

See also
Nasa9PolyMultiTempRegion

Definition at line 59 of file Nasa9Poly1.h.

Public Member Functions

 Nasa9Poly1 (double tlow, double thigh, double pref, const double *coeffs)
 Constructor with all input data.
 
void setParameters (const vector< double > &coeffs)
 Set the array of 9 polynomial coefficients.
 
int reportType () const override
 Returns an integer representing the type of parameterization.
 
size_t temperaturePolySize () const override
 Number of terms in the temperature polynomial for this parameterization.
 
void updateTemperaturePoly (double T, double *T_poly) const override
 Given the temperature T, compute the terms of the temperature polynomial T_poly.
 
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.
 
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 reportParameters (size_t &n, int &type, double &tlow, double &thigh, double &pref, double *const coeffs) const override
 This utility function reports back the type of parameterization and all of the parameters for the species.
 
void getParameters (AnyMap &thermo) const override
 Store the parameters of the species thermo object such that an identical species thermo object could be reconstructed using the newSpeciesThermo() function.
 
- Public Member Functions inherited from SpeciesThermoInterpType
 SpeciesThermoInterpType (double tlow, double thigh, double pref)
 
 SpeciesThermoInterpType (const SpeciesThermoInterpType &b)=delete
 
SpeciesThermoInterpTypeoperator= (const SpeciesThermoInterpType &b)=delete
 
virtual double minTemp () const
 Returns the minimum temperature that the thermo parameterization is valid.
 
virtual void setMinTemp (double Tmin)
 Set the minimum temperature at which the thermo parameterization is valid.
 
virtual double maxTemp () const
 Returns the maximum temperature that the thermo parameterization is valid.
 
virtual void setMaxTemp (double Tmax)
 Set the maximum temperature at which the thermo parameterization is valid.
 
virtual double refPressure () const
 Returns the reference pressure (Pa)
 
virtual void setRefPressure (double Pref)
 Set the reference pressure [Pa].
 
virtual void validate (const string &name)
 Check for problems with the parameterization, and generate warnings or throw and exception if any are found.
 
virtual int reportType () const
 Returns an integer representing the type of parameterization.
 
virtual size_t temperaturePolySize () const
 Number of terms in the temperature polynomial for this parameterization.
 
virtual void updateTemperaturePoly (double T, double *T_poly) const
 Given the temperature T, compute the terms of the temperature polynomial T_poly.
 
virtual void updateProperties (const double *tt, double *cp_R, double *h_RT, double *s_R) const
 Update the properties for this species, given a temperature polynomial.
 
virtual void updatePropertiesTemp (const double temp, double *cp_R, double *h_RT, double *s_R) const
 Compute the reference-state property of one species.
 
virtual size_t nCoeffs () const
 This utility function returns the number of coefficients for a given type of species parameterization.
 
virtual void reportParameters (size_t &index, int &type, double &minTemp, double &maxTemp, double &refPressure, double *const coeffs) const
 This utility function returns the type of parameterization and all of the parameters for the species.
 
AnyMap parameters (bool withInput=true) const
 Return the parameters of the species thermo object such that an identical species thermo object could be reconstructed using the newSpeciesThermo() function.
 
virtual double reportHf298 (double *const h298=0) const
 Report the 298 K Heat of Formation of the standard state of one species (J kmol-1)
 
virtual void modifyOneHf298 (const size_t k, const double Hf298New)
 Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1)
 
virtual void resetHf298 ()
 Restore the original heat of formation for this species.
 
const AnyMapinput () const
 Access input data associated with the species thermo definition.
 
AnyMapinput ()
 

Protected Attributes

vector< double > m_coeff
 array of polynomial coefficients
 
- Protected Attributes inherited from SpeciesThermoInterpType
double m_lowT = 0.0
 lowest valid temperature
 
double m_highT = 0.0
 Highest valid temperature.
 
double m_Pref = 0.0
 Reference state pressure.
 
AnyMap m_input
 

Additional Inherited Members

virtual void getParameters (AnyMap &thermo) const
 Store the parameters of the species thermo object such that an identical species thermo object could be reconstructed using the newSpeciesThermo() function.
 

Constructor & Destructor Documentation

◆ Nasa9Poly1() [1/2]

Definition at line 21 of file Nasa9Poly1.cpp.

◆ Nasa9Poly1() [2/2]

Nasa9Poly1 ( double  tlow,
double  thigh,
double  pref,
const double *  coeffs 
)

Constructor with all input data.

Parameters
tlowMinimum temperature
thighMaximum temperature
prefreference pressure (Pa).
coeffsVector of coefficients used to set the parameters for the standard state.

Definition at line 26 of file Nasa9Poly1.cpp.

Member Function Documentation

◆ setParameters()

void setParameters ( const vector< double > &  coeffs)

Set the array of 9 polynomial coefficients.

Definition at line 33 of file Nasa9Poly1.cpp.

◆ reportType()

int reportType ( ) const
overridevirtual

Returns an integer representing the type of parameterization.

Reimplemented from SpeciesThermoInterpType.

Definition at line 42 of file Nasa9Poly1.cpp.

◆ temperaturePolySize()

size_t temperaturePolySize ( ) const
inlineoverridevirtual

Number of terms in the temperature polynomial for this parameterization.

Reimplemented from SpeciesThermoInterpType.

Definition at line 79 of file Nasa9Poly1.h.

◆ updateTemperaturePoly()

void updateTemperaturePoly ( double  T,
double *  T_poly 
) const
overridevirtual

Given the temperature T, compute the terms of the temperature polynomial T_poly.

Reimplemented from SpeciesThermoInterpType.

Definition at line 47 of file Nasa9Poly1.cpp.

◆ updateProperties()

void updateProperties ( const double *  tt,
double *  cp_R,
double *  h_RT,
double *  s_R 
) const
overridevirtual

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.

The form and length of the Temperature Polynomial may vary depending on the parameterization.

Parameters
ttvector of evaluated temperature functions
cp_RVector of Dimensionless heat capacities. (length m_kk).
h_RTVector of Dimensionless enthalpies. (length m_kk).
s_RVector of Dimensionless entropies. (length m_kk).

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);

Reimplemented from SpeciesThermoInterpType.

Definition at line 58 of file Nasa9Poly1.cpp.

◆ updatePropertiesTemp()

void updatePropertiesTemp ( const double  temp,
double *  cp_R,
double *  h_RT,
double *  s_R 
) const
overridevirtual

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, of the species.

Parameters
tempTemperature (Kelvin)
cp_RVector of Dimensionless heat capacities. (length m_kk).
h_RTVector of Dimensionless enthalpies. (length m_kk).
s_RVector of Dimensionless entropies. (length m_kk).

Reimplemented from SpeciesThermoInterpType.

Definition at line 82 of file Nasa9Poly1.cpp.

◆ reportParameters()

void reportParameters ( size_t &  n,
int &  type,
double &  tlow,
double &  thigh,
double &  pref,
double *const  coeffs 
) const
overridevirtual

This utility function reports back the type of parameterization and all of the parameters for the species.

All parameters are output variables

Parameters
nSpecies index
typeInteger type of the standard type
tlowoutput - Minimum temperature
thighoutput - Maximum temperature
prefoutput - reference pressure (Pa).
coeffsVector 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

Reimplemented from SpeciesThermoInterpType.

Definition at line 90 of file Nasa9Poly1.cpp.

◆ getParameters()

void getParameters ( AnyMap thermo) const
overridevirtual

Store the parameters of the species thermo object such that an identical species thermo object could be reconstructed using the newSpeciesThermo() function.

Reimplemented from SpeciesThermoInterpType.

Definition at line 106 of file Nasa9Poly1.cpp.

Member Data Documentation

◆ m_coeff

vector<double> m_coeff
protected

array of polynomial coefficients

Definition at line 125 of file Nasa9Poly1.h.


The documentation for this class was generated from the following files: