Cantera  3.1.0a1

The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions. More...

#include <Nasa9PolyMultiTempRegion.h>

Inheritance diagram for Nasa9PolyMultiTempRegion:
[legend]

Detailed Description

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.

See also
Nasa9Poly1

Definition at line 36 of file Nasa9PolyMultiTempRegion.h.

Public Member Functions

 Nasa9PolyMultiTempRegion (vector< Nasa9Poly1 * > &regionPts)
 Constructor with all input data. More...
 
 Nasa9PolyMultiTempRegion (double tlow, double thigh, double pref, const double *coeffs)
 Constructor with all input data. More...
 
void setParameters (const map< double, vector< double >> &regions)
 Set the array of polynomial coefficients for each temperature region. More...
 
int reportType () const override
 Returns an integer representing the type of parameterization. More...
 
size_t temperaturePolySize () const override
 Number of terms in the temperature polynomial for this parameterization. More...
 
void updateTemperaturePoly (double T, double *T_poly) const override
 Given the temperature T, compute the terms of the temperature polynomial T_poly. More...
 
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. More...
 
void updatePropertiesTemp (const double temp, double *cp_R, double *h_RT, double *s_R) const override
 Compute the reference-state property of one species. More...
 
size_t nCoeffs () const override
 This utility function returns the number of coefficients for a given type of species parameterization. More...
 
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, index. More...
 
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. More...
 
- 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. More...
 
virtual void setMinTemp (double Tmin)
 Set the minimum temperature at which the thermo parameterization is valid. More...
 
virtual double maxTemp () const
 Returns the maximum temperature that the thermo parameterization is valid. More...
 
virtual void setMaxTemp (double Tmax)
 Set the maximum temperature at which the thermo parameterization is valid. More...
 
virtual double refPressure () const
 Returns the reference pressure (Pa) More...
 
virtual void setRefPressure (double Pref)
 Set the reference pressure [Pa]. More...
 
virtual void validate (const string &name)
 Check for problems with the parameterization, and generate warnings or throw and exception if any are found. More...
 
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. More...
 
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) More...
 
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) More...
 
virtual void resetHf298 ()
 Restore the original heat of formation for this species. More...
 
const AnyMapinput () const
 Access input data associated with the species thermo definition. More...
 
AnyMapinput ()
 

Protected Attributes

vector< double > m_lowerTempBounds
 Lower boundaries of each temperature regions. More...
 
vector< unique_ptr< Nasa9Poly1 > > m_regionPts
 Individual temperature region objects. More...
 
int m_currRegion = 0
 current region More...
 
- Protected Attributes inherited from SpeciesThermoInterpType
double m_lowT = 0.0
 lowest valid temperature More...
 
double m_highT = 0.0
 Highest valid temperature. More...
 
double m_Pref = 0.0
 Reference state pressure. More...
 
AnyMap m_input
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ Nasa9PolyMultiTempRegion() [1/2]

Nasa9PolyMultiTempRegion ( vector< Nasa9Poly1 * > &  regionPts)

Constructor with all input data.

Parameters
regionPtsVector 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.

Definition at line 25 of file Nasa9PolyMultiTempRegion.cpp.

◆ Nasa9PolyMultiTempRegion() [2/2]

Nasa9PolyMultiTempRegion ( 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. The vector has 1 + 11*nzones elements in the following order:
  • coeffs[0]: Number of zones (nzones)
  • coeffs[1 + 11*zone]: minimum temperature within zone
  • coeffs[2 + 11*zone]: maximum temperature within zone
  • coeffs[3:11 + 11*zone]: 9 coefficient parameterization where zone runs from zero to nzones-1.

Definition at line 54 of file Nasa9PolyMultiTempRegion.cpp.

Member Function Documentation

◆ setParameters()

void setParameters ( const map< double, vector< double >> &  regions)

Set the array of polynomial coefficients for each temperature region.

Parameters
regionsMap where each key is the minimum temperature for a region and each value is the array of 9 polynomial coefficients for that region.

Definition at line 82 of file Nasa9PolyMultiTempRegion.cpp.

◆ reportType()

int reportType ( ) const
overridevirtual

Returns an integer representing the type of parameterization.

Reimplemented from SpeciesThermoInterpType.

Definition at line 100 of file Nasa9PolyMultiTempRegion.cpp.

◆ temperaturePolySize()

size_t temperaturePolySize ( ) const
inlineoverridevirtual

Number of terms in the temperature polynomial for this parameterization.

Reimplemented from SpeciesThermoInterpType.

Definition at line 81 of file Nasa9PolyMultiTempRegion.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 105 of file Nasa9PolyMultiTempRegion.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 116 of file Nasa9PolyMultiTempRegion.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 130 of file Nasa9PolyMultiTempRegion.cpp.

◆ nCoeffs()

size_t nCoeffs ( ) const
overridevirtual

This utility function returns the number of coefficients for a given type of species parameterization.

Reimplemented from SpeciesThermoInterpType.

Definition at line 145 of file Nasa9PolyMultiTempRegion.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, index.

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 1 + 11*nzones coefficients. coeffs[0] is equal to nTempZones. index = 1 for each zone: coeffs[index] = minTempZone coeffs[index+1] = maxTempZone coeffs[index+2+i] from i =0,9 are the coefficients themselves

Reimplemented from SpeciesThermoInterpType.

Definition at line 150 of file Nasa9PolyMultiTempRegion.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 175 of file Nasa9PolyMultiTempRegion.cpp.

Member Data Documentation

◆ m_lowerTempBounds

vector<double> m_lowerTempBounds
protected

Lower boundaries of each temperature regions.

Definition at line 119 of file Nasa9PolyMultiTempRegion.h.

◆ m_regionPts

vector<unique_ptr<Nasa9Poly1> > m_regionPts
protected

Individual temperature region objects.

Definition at line 122 of file Nasa9PolyMultiTempRegion.h.

◆ m_currRegion

int m_currRegion = 0
mutableprotected

current region

Definition at line 125 of file Nasa9PolyMultiTempRegion.h.


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