Cantera  3.1.0a1

Abstract Base class for the thermodynamic manager for an individual species' reference state. More...

#include <SpeciesThermoInterpType.h>

Inheritance diagram for SpeciesThermoInterpType:
[legend]

Detailed Description

Abstract Base class for the thermodynamic manager for an individual species' reference state.

One key feature is that the update routines use the same form as the update routines in the MultiSpeciesThermo class. They update values of cp_R, s_R, and H_R.

Definition at line 112 of file SpeciesThermoInterpType.h.

Public Member Functions

 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...
 
virtual int reportType () const
 Returns an integer representing the type of parameterization. More...
 
virtual size_t temperaturePolySize () const
 Number of terms in the temperature polynomial for this parameterization. More...
 
virtual void updateTemperaturePoly (double T, double *T_poly) const
 Given the temperature T, compute the terms of the temperature polynomial T_poly. More...
 
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. More...
 
virtual void updatePropertiesTemp (const double temp, double *cp_R, double *h_RT, double *s_R) const
 Compute the reference-state property of one species. More...
 
virtual size_t nCoeffs () const
 This utility function returns the number of coefficients for a given type of species parameterization. More...
 
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. 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 Member Functions

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. More...
 

Protected Attributes

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
 

Member Function Documentation

◆ minTemp()

virtual double minTemp ( ) const
inlinevirtual

Returns the minimum temperature that the thermo parameterization is valid.

Definition at line 127 of file SpeciesThermoInterpType.h.

◆ setMinTemp()

virtual void setMinTemp ( double  Tmin)
inlinevirtual

Set the minimum temperature at which the thermo parameterization is valid.

Reimplemented in ShomatePoly2, and NasaPoly2.

Definition at line 132 of file SpeciesThermoInterpType.h.

◆ maxTemp()

virtual double maxTemp ( ) const
inlinevirtual

Returns the maximum temperature that the thermo parameterization is valid.

Definition at line 138 of file SpeciesThermoInterpType.h.

◆ setMaxTemp()

virtual void setMaxTemp ( double  Tmax)
inlinevirtual

Set the maximum temperature at which the thermo parameterization is valid.

Reimplemented in ShomatePoly2, and NasaPoly2.

Definition at line 143 of file SpeciesThermoInterpType.h.

◆ refPressure()

virtual double refPressure ( ) const
inlinevirtual

Returns the reference pressure (Pa)

Definition at line 148 of file SpeciesThermoInterpType.h.

◆ setRefPressure()

virtual void setRefPressure ( double  Pref)
inlinevirtual

Set the reference pressure [Pa].

Reimplemented in ShomatePoly2, and NasaPoly2.

Definition at line 153 of file SpeciesThermoInterpType.h.

◆ validate()

virtual void validate ( const string &  name)
inlinevirtual

Check for problems with the parameterization, and generate warnings or throw and exception if any are found.

Reimplemented in NasaPoly2.

Definition at line 159 of file SpeciesThermoInterpType.h.

◆ reportType()

virtual int reportType ( ) const
inlinevirtual

Returns an integer representing the type of parameterization.

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9PolyMultiTempRegion, Nasa9Poly1, Mu0Poly, and ConstCpPoly.

Definition at line 162 of file SpeciesThermoInterpType.h.

◆ temperaturePolySize()

virtual size_t temperaturePolySize ( ) const
inlinevirtual

Number of terms in the temperature polynomial for this parameterization.

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9PolyMultiTempRegion, and Nasa9Poly1.

Definition at line 165 of file SpeciesThermoInterpType.h.

◆ updateTemperaturePoly()

virtual void updateTemperaturePoly ( double  T,
double *  T_poly 
) const
inlinevirtual

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

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9PolyMultiTempRegion, and Nasa9Poly1.

Definition at line 169 of file SpeciesThermoInterpType.h.

◆ updateProperties()

void updateProperties ( const double *  tt,
double *  cp_R,
double *  h_RT,
double *  s_R 
) const
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.

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

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9PolyMultiTempRegion, Nasa9Poly1, Mu0Poly, and ConstCpPoly.

Definition at line 23 of file SpeciesThermoInterpType.cpp.

◆ updatePropertiesTemp()

void updatePropertiesTemp ( const double  temp,
double *  cp_R,
double *  h_RT,
double *  s_R 
) const
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, 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 in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9PolyMultiTempRegion, Nasa9Poly1, Mu0Poly, and ConstCpPoly.

Definition at line 30 of file SpeciesThermoInterpType.cpp.

◆ nCoeffs()

size_t nCoeffs ( ) const
virtual

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

Reimplemented in ShomatePoly2, NasaPoly2, Nasa9PolyMultiTempRegion, Mu0Poly, and ConstCpPoly.

Definition at line 36 of file SpeciesThermoInterpType.cpp.

◆ reportParameters()

void reportParameters ( size_t &  index,
int &  type,
double &  minTemp,
double &  maxTemp,
double &  refPressure,
double *const  coeffs 
) const
virtual

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

All parameters are output variables

Parameters
indexSpecies index
typeInteger type of the standard type
minTempoutput - Minimum temperature
maxTempoutput - Maximum temperature
refPressureoutput - reference pressure (Pa).
coeffsVector of coefficients used to set the parameters for the standard state.

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9PolyMultiTempRegion, Nasa9Poly1, Mu0Poly, and ConstCpPoly.

Definition at line 41 of file SpeciesThermoInterpType.cpp.

◆ parameters()

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.

Behavior specific to derived classes is handled by the getParameters() method.

Parameters
withInputIf true, include additional input data fields associated with the object, such as user-defined fields from a YAML input file, as returned by the input() method.

Definition at line 48 of file SpeciesThermoInterpType.cpp.

◆ reportHf298()

double reportHf298 ( double *const  h298 = 0) const
virtual

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.

Parameters
h298If 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].
Returns
the current value of the Heat of Formation at 298K and 1 bar for species m_speciesIndex.

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, and ConstCpPoly.

Definition at line 65 of file SpeciesThermoInterpType.cpp.

◆ modifyOneHf298()

void modifyOneHf298 ( const size_t  k,
const double  Hf298New 
)
virtual

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.

Parameters
kSpecies k
Hf298NewSpecify the new value of the Heat of Formation at 298K and 1 bar

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, and ConstCpPoly.

Definition at line 70 of file SpeciesThermoInterpType.cpp.

◆ resetHf298()

virtual void resetHf298 ( )
inlinevirtual

Restore the original heat of formation for this species.

Resets changes made by modifyOneHf298().

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, and ConstCpPoly.

Definition at line 269 of file SpeciesThermoInterpType.h.

◆ input()

const AnyMap & input ( ) const

Access input data associated with the species thermo definition.

Definition at line 75 of file SpeciesThermoInterpType.cpp.

◆ getParameters()

void getParameters ( AnyMap thermo) const
protectedvirtual

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

Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9PolyMultiTempRegion, Nasa9Poly1, Mu0Poly, and ConstCpPoly.

Definition at line 58 of file SpeciesThermoInterpType.cpp.

Member Data Documentation

◆ m_lowT

double m_lowT = 0.0
protected

lowest valid temperature

Definition at line 284 of file SpeciesThermoInterpType.h.

◆ m_highT

double m_highT = 0.0
protected

Highest valid temperature.

Definition at line 286 of file SpeciesThermoInterpType.h.

◆ m_Pref

double m_Pref = 0.0
protected

Reference state pressure.

Definition at line 288 of file SpeciesThermoInterpType.h.


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