Cantera 2.6.0

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SpeciesThermoInterpType Class Reference
Models of Phases of Matter » Thermodynamic Properties » Species Reference-State Thermodynamic Properties

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

`#include <SpeciesThermoInterpType.h>`

Inheritance diagram for SpeciesThermoInterpType:
[legend]
Collaboration diagram for SpeciesThermoInterpType:
[legend]

## Public Member Functions
| SpeciesThermoInterpType (double tlow, double thigh, double pref)
| SpeciesThermoInterpType (const SpeciesThermoInterpType &b)=delete
SpeciesThermoInterpType & | operator= (const SpeciesThermoInterpType &b)=delete
virtual doublereal | 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 doublereal | 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 doublereal | refPressure () const
| Returns the reference pressure (Pa) More...
virtual void | setRefPressure (double Pref)
| Set the reference pressure [Pa]. More...
virtual void | validate (const std::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 doublereal *tt, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
| Update the properties for this species, given a temperature polynomial. More...
virtual void | updatePropertiesTemp (const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *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, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure, doublereal *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 doublereal | reportHf298 (doublereal *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 doublereal 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 AnyMap & | input () const
| Access input data associated with the species thermo definition. More...
AnyMap & | input ()

## 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
doublereal | m_lowT
| lowest valid temperature More...
doublereal | m_highT
| Highest valid temperature. More...
doublereal | m_Pref
| Reference state pressure. More...
AnyMap | m_input

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

## Constructor & Destructor Documentation

## ◆ SpeciesThermoInterpType() [1/2]

SpeciesThermoInterpType | ( |  | ) |

Definition at line 14 of file SpeciesThermoInterpType.cpp.

## ◆ SpeciesThermoInterpType() [2/2]

SpeciesThermoInterpType | ( | double | tlow,
|  | double | thigh,
|  | double | pref
| ) |  |

Definition at line 21 of file SpeciesThermoInterpType.cpp.

## ◆ ~SpeciesThermoInterpType()

virtual ~SpeciesThermoInterpType | ( |  | ) |
| inline virtual

Definition at line 123 of file SpeciesThermoInterpType.h.

## Member Function Documentation

## ◆ minTemp()

virtual doublereal minTemp | ( |  | ) | const
| inline virtual

Returns the minimum temperature that the thermo parameterization is valid.

Definition at line 127 of file SpeciesThermoInterpType.h.

References SpeciesThermoInterpType::m_lowT.

Referenced by MultiSpeciesThermo::minTemp().

## ◆ setMinTemp()

virtual void setMinTemp | ( | double | Tmin | ) |
| inline virtual

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

Reimplemented in NasaPoly2, and ShomatePoly2.

Definition at line 132 of file SpeciesThermoInterpType.h.

References SpeciesThermoInterpType::m_lowT.

Referenced by NasaPoly2::setMinTemp(), ShomatePoly2::setMinTemp(), Nasa9PolyMultiTempRegion::setParameters(), and ShomatePoly2::setParameters().

## ◆ maxTemp()

virtual doublereal maxTemp | ( |  | ) | const
| inline virtual

Returns the maximum temperature that the thermo parameterization is valid.

Definition at line 138 of file SpeciesThermoInterpType.h.

References SpeciesThermoInterpType::m_highT.

Referenced by MultiSpeciesThermo::maxTemp(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), and Nasa9PolyMultiTempRegion::setParameters().

## ◆ setMaxTemp()

virtual void setMaxTemp | ( | double | Tmax | ) |
| inline virtual

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

Reimplemented in NasaPoly2, and ShomatePoly2.

Definition at line 143 of file SpeciesThermoInterpType.h.

References SpeciesThermoInterpType::m_highT.

Referenced by NasaPoly2::setMaxTemp(), ShomatePoly2::setMaxTemp(), and ShomatePoly2::setParameters().

## ◆ refPressure()

virtual doublereal refPressure | ( |  | ) | const
| inline virtual

Returns the reference pressure (Pa)

Definition at line 148 of file SpeciesThermoInterpType.h.

References SpeciesThermoInterpType::m_Pref.

Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), MultiSpeciesThermo::refPressure(), and Nasa9PolyMultiTempRegion::setParameters().

## ◆ setRefPressure()

virtual void setRefPressure | ( | double | Pref | ) |
| inline virtual

Set the reference pressure [Pa].

Reimplemented in NasaPoly2, and ShomatePoly2.

Definition at line 153 of file SpeciesThermoInterpType.h.

References SpeciesThermoInterpType::m_Pref.

Referenced by Nasa9PolyMultiTempRegion::setParameters(), NasaPoly2::setRefPressure(), and ShomatePoly2::setRefPressure().

## ◆ validate()

virtual void validate | ( | const std::string & | name | ) |
| inline virtual

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
| inline virtual

Returns an integer representing the type of parameterization.

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

Definition at line 162 of file SpeciesThermoInterpType.h.

Referenced by MultiSpeciesThermo::reportType().

## ◆ temperaturePolySize()

virtual size_t temperaturePolySize | ( |  | ) | const
| inline virtual

Number of terms in the temperature polynomial for this parameterization.

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

Definition at line 165 of file SpeciesThermoInterpType.h.

## ◆ updateTemperaturePoly()

virtual void updateTemperaturePoly | ( | double | T,
|  | double * | T_poly
| ) |  | const
| inline virtual

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

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

Definition at line 169 of file SpeciesThermoInterpType.h.

## ◆ updateProperties()

void updateProperties | ( | const doublereal * | tt,
|  | doublereal * | cp_R,
|  | doublereal * | h_RT,
|  | doublereal * | 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

  tt | vector of evaluated temperature functions
  cp_R | Vector of Dimensionless heat capacities. (length m_kk).
  h_RT | Vector of Dimensionless enthalpies. (length m_kk).
  s_R | Vector of Dimensionless entropies. (length m_kk).

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

Definition at line 30 of file SpeciesThermoInterpType.cpp.

## ◆ updatePropertiesTemp()

void updatePropertiesTemp | ( | const doublereal | temp,
|  | doublereal * | cp_R,
|  | doublereal * | h_RT,
|  | doublereal * | 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

  temp | Temperature (Kelvin)
  cp_R | Vector of Dimensionless heat capacities. (length m_kk).
  h_RT | Vector of Dimensionless enthalpies. (length m_kk).
  s_R | Vector of Dimensionless entropies. (length m_kk).

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

Definition at line 37 of file SpeciesThermoInterpType.cpp.

Referenced by MultiSpeciesThermo::update_single().

## ◆ nCoeffs()

size_t nCoeffs | ( |  | ) | const
| virtual

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

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

Definition at line 43 of file SpeciesThermoInterpType.cpp.

## ◆ reportParameters()

void reportParameters | ( | size_t & | index,
|  | int & | type,
|  | doublereal & | minTemp,
|  | doublereal & | maxTemp,
|  | doublereal & | refPressure,
|  | doublereal *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

  index | Species index
  type | Integer type of the standard type
  minTemp | output - Minimum temperature
  maxTemp | output - Maximum temperature
  refPressure | output - reference pressure (Pa).
  coeffs | Vector of coefficients used to set the parameters for the standard state.

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

Definition at line 48 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

  withInput | If 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 55 of file SpeciesThermoInterpType.cpp.

References AnyMap::update().

## ◆ reportHf298()

doublereal reportHf298 | ( | doublereal *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

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

Returns
  the current value of the Heat of Formation at 298K and 1 bar for species m_speciesIndex.

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

Definition at line 72 of file SpeciesThermoInterpType.cpp.

Referenced by MultiSpeciesThermo::reportOneHf298().

## ◆ modifyOneHf298()

void modifyOneHf298 | ( | const size_t | k,
|  | const doublereal | 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

  k | Species k
  Hf298New | Specify the new value of the Heat of Formation at 298K and 1 bar

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

Definition at line 77 of file SpeciesThermoInterpType.cpp.

Referenced by MultiSpeciesThermo::modifyOneHf298().

## ◆ resetHf298()

virtual void resetHf298 | ( |  | ) |
| inline virtual

Restore the original heat of formation for this species.

Resets changes made by modifyOneHf298().

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

Definition at line 271 of file SpeciesThermoInterpType.h.

Referenced by MultiSpeciesThermo::resetHf298().

## ◆ input() [1/2]

const AnyMap & input | ( |  | ) | const

Access input data associated with the species thermo definition.

Definition at line 83 of file SpeciesThermoInterpType.cpp.

## ◆ input() [2/2]

AnyMap & input | ( |  | ) |

Definition at line 88 of file SpeciesThermoInterpType.cpp.

## ◆ getParameters()

void getParameters | ( | AnyMap & | thermo | ) | const
| protected virtual

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

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

Definition at line 65 of file SpeciesThermoInterpType.cpp.

References Cantera::OneAtm.

Referenced by ConstCpPoly::getParameters(), Mu0Poly::getParameters(), Nasa9PolyMultiTempRegion::getParameters(), and ShomatePoly2::getParameters().

## Member Data Documentation

## ◆ m_lowT

doublereal m_lowT
| protected

lowest valid temperature

Definition at line 286 of file SpeciesThermoInterpType.h.

Referenced by ShomatePoly2::getParameters(), SpeciesThermoInterpType::minTemp(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), and SpeciesThermoInterpType::setMinTemp().

## ◆ m_highT

doublereal m_highT
| protected

Highest valid temperature.

Definition at line 288 of file SpeciesThermoInterpType.h.

Referenced by Nasa9PolyMultiTempRegion::getParameters(), ShomatePoly2::getParameters(), SpeciesThermoInterpType::maxTemp(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), and SpeciesThermoInterpType::setMaxTemp().

## ◆ m_Pref

doublereal m_Pref
| protected

Reference state pressure.

Definition at line 290 of file SpeciesThermoInterpType.h.

Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), SpeciesThermoInterpType::refPressure(), and SpeciesThermoInterpType::setRefPressure().

## ◆ m_input

AnyMap m_input
| protected

Definition at line 292 of file SpeciesThermoInterpType.h.

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

- SpeciesThermoInterpType.h
- SpeciesThermoInterpType.cpp