Cantera
2.4.0
|
Virtual base class for a species with a pressure dependent standard state. More...
#include <PDSS.h>
Public Member Functions | |
Constructors | |
PDSS () | |
Default Constructor. More... | |
PDSS (const PDSS &b)=delete | |
PDSS & | operator= (const PDSS &b)=delete |
virtual | ~PDSS () |
Molar Thermodynamic Properties of the Species Standard State in | |
the Solution | |
virtual doublereal | enthalpy_mole () const |
Return the molar enthalpy in units of J kmol-1. More... | |
virtual doublereal | enthalpy_RT () const |
Return the standard state molar enthalpy divided by RT. More... | |
virtual doublereal | intEnergy_mole () const |
Return the molar internal Energy in units of J kmol-1. More... | |
virtual doublereal | entropy_mole () const |
Return the molar entropy in units of J kmol-1 K-1. More... | |
virtual doublereal | entropy_R () const |
Return the standard state entropy divided by RT. More... | |
virtual doublereal | gibbs_mole () const |
Return the molar Gibbs free energy in units of J kmol-1. More... | |
virtual doublereal | gibbs_RT () const |
Return the molar Gibbs free energy divided by RT. More... | |
virtual doublereal | cp_mole () const |
Return the molar const pressure heat capacity in units of J kmol-1 K-1. More... | |
virtual doublereal | cp_R () const |
Return the molar const pressure heat capacity divided by RT. More... | |
virtual doublereal | cv_mole () const |
Return the molar const volume heat capacity in units of J kmol-1 K-1. More... | |
virtual doublereal | molarVolume () const |
Return the molar volume at standard state. More... | |
virtual doublereal | density () const |
Return the standard state density at standard state. More... | |
virtual doublereal | enthalpyDelp_mole () const |
Get the difference in the standard state enthalpy between the current pressure and the reference pressure, p0. More... | |
virtual doublereal | entropyDelp_mole () const |
Get the difference in the standard state entropy between the current pressure and the reference pressure, p0. More... | |
virtual doublereal | gibbsDelp_mole () const |
Get the difference in the standard state Gibbs free energy between the current pressure and the reference pressure, p0. More... | |
virtual doublereal | cpDelp_mole () const |
Get the difference in standard state heat capacity between the current pressure and the reference pressure, p0. More... | |
Properties of the Reference State of the Species in the Solution | |
doublereal | refPressure () const |
Return the reference pressure for this phase. More... | |
doublereal | minTemp () const |
return the minimum temperature More... | |
doublereal | maxTemp () const |
return the minimum temperature More... | |
virtual doublereal | gibbs_RT_ref () const |
Return the molar Gibbs free energy divided by RT at reference pressure. More... | |
virtual doublereal | enthalpy_RT_ref () const |
Return the molar enthalpy divided by RT at reference pressure. More... | |
virtual doublereal | entropy_R_ref () const |
Return the molar entropy divided by R at reference pressure. More... | |
virtual doublereal | cp_R_ref () const |
Return the molar heat capacity divided by R at reference pressure. More... | |
virtual doublereal | molarVolume_ref () const |
Return the molar volume at reference pressure. More... | |
Mechanical Equation of State Properties | |
virtual doublereal | pressure () const |
Returns the pressure (Pa) More... | |
virtual void | setPressure (doublereal pres) |
Sets the pressure in the object. More... | |
virtual doublereal | thermalExpansionCoeff () const |
Return the volumetric thermal expansion coefficient. Units: 1/K. More... | |
Partial Molar Properties of the Solution | |
virtual void | setTemperature (doublereal temp) |
Set the internal temperature. More... | |
virtual doublereal | temperature () const |
Return the current stored temperature. More... | |
virtual void | setState_TP (doublereal temp, doublereal pres) |
Set the internal temperature and pressure. More... | |
virtual void | setState_TR (doublereal temp, doublereal rho) |
Set the internal temperature and density. More... | |
Miscellaneous properties of the standard state | |
virtual doublereal | critTemperature () const |
critical temperature More... | |
virtual doublereal | critPressure () const |
critical pressure More... | |
virtual doublereal | critDensity () const |
critical density More... | |
virtual doublereal | satPressure (doublereal T) |
saturation pressure More... | |
doublereal | molecularWeight () const |
Return the molecular weight of the species in units of kg kmol-1. More... | |
void | setMolecularWeight (doublereal mw) |
Set the molecular weight of the species. More... | |
Initialization of the Object | |
void | setReferenceThermo (shared_ptr< SpeciesThermoInterpType > stit) |
Set the SpeciesThermoInterpType object used to calculate reference state properties. More... | |
virtual bool | useSTITbyPDSS () const |
Returns 'true' if this object should be used in an STITbyPDSS object in the phase's reference thermo manager, or 'false' if a separate SpeciesThermoInterpType should be constructed. More... | |
virtual void | setParent (VPStandardStateTP *phase, size_t k) |
Set the parent VPStandardStateTP object of this PDSS object. More... | |
virtual void | initThermo () |
Initialization routine. More... | |
virtual void | setParametersFromXML (const XML_Node &speciesNode) |
Initialization routine for the PDSS object based on the speciesNode. More... | |
virtual void | reportParams (size_t &kindex, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const |
This utility function reports back the type of parameterization and all of the parameters for the species, index. More... | |
Protected Attributes | |
doublereal | m_temp |
Current temperature used by the PDSS object. More... | |
doublereal | m_pres |
State of the system - pressure. More... | |
doublereal | m_p0 |
Reference state pressure of the species. More... | |
doublereal | m_minTemp |
Minimum temperature. More... | |
doublereal | m_maxTemp |
Maximum temperature. More... | |
doublereal | m_mw |
Molecular Weight of the species. More... | |
shared_ptr< SpeciesThermoInterpType > | m_spthermo |
Pointer to the species thermodynamic property manager. More... | |
Virtual base class for a species with a pressure dependent standard state.
Virtual base class for calculation of the pressure dependent standard state for a single species
Class PDSS is the base class for a family of classes that compute properties of a set of species in their standard states at a range of temperatures and pressures. The independent variables for this object are temperature and pressure. The class may have a reference to a MultiSpeciesThermo object which handles the calculation of the reference state temperature behavior of a subset of species.
This class is analogous to the SpeciesThermoInterpType class, except that the standard state inherently incorporates the pressure dependence.
The class operates on a setState temperature and pressure basis. It only recalculates the standard state when the setState functions for temperature and pressure are called.
These classes are designed such that they are not thread safe when called by themselves. The reason for this is that they sometimes use shared MultiSpeciesThermo resources where they set the states. This condition may be remedied in the future if we get serious about employing multithreaded capabilities by adding mutex locks to the MultiSpeciesThermo resources.
However, in many other respects they can be thread safe. They use separate memory and hold intermediate data.
|
virtual |
Return the molar enthalpy in units of J kmol-1.
Reimplemented in PDSS_Nondimensional, PDSS_Water, and PDSS_HKFT.
Definition at line 27 of file PDSS.cpp.
Referenced by PDSS_Molar::enthalpy_RT(), and PDSS::enthalpyDelp_mole().
|
virtual |
Return the standard state molar enthalpy divided by RT.
Reimplemented in PDSS_Nondimensional, PDSS_Molar, and PDSS_IonsFromNeutral.
Definition at line 32 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo().
|
virtual |
Return the molar internal Energy in units of J kmol-1.
Reimplemented in PDSS_SSVol, PDSS_Water, PDSS_HKFT, PDSS_IonsFromNeutral, PDSS_IdealGas, and PDSS_ConstVol.
|
virtual |
Return the molar entropy in units of J kmol-1 K-1.
Reimplemented in PDSS_Nondimensional, PDSS_Water, and PDSS_HKFT.
Definition at line 42 of file PDSS.cpp.
Referenced by PDSS_Molar::entropy_R(), and PDSS::entropyDelp_mole().
|
virtual |
Return the standard state entropy divided by RT.
Reimplemented in PDSS_Nondimensional, PDSS_Molar, and PDSS_IonsFromNeutral.
Definition at line 47 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo().
|
virtual |
Return the molar Gibbs free energy in units of J kmol-1.
Reimplemented in PDSS_Nondimensional, PDSS_Water, and PDSS_HKFT.
Definition at line 52 of file PDSS.cpp.
Referenced by PDSS_Molar::gibbs_RT(), and PDSS::gibbsDelp_mole().
|
virtual |
Return the molar Gibbs free energy divided by RT.
Reimplemented in PDSS_Nondimensional, PDSS_Molar, and PDSS_IonsFromNeutral.
|
virtual |
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
Reimplemented in PDSS_Nondimensional, PDSS_Water, and PDSS_HKFT.
Definition at line 62 of file PDSS.cpp.
Referenced by PDSS_Molar::cp_R(), and PDSS::cpDelp_mole().
|
virtual |
Return the molar const pressure heat capacity divided by RT.
Reimplemented in PDSS_Nondimensional, PDSS_Molar, and PDSS_IonsFromNeutral.
Definition at line 67 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo().
|
virtual |
Return the molar const volume heat capacity in units of J kmol-1 K-1.
Reimplemented in PDSS_SSVol, PDSS_Water, PDSS_IdealGas, and PDSS_ConstVol.
|
virtual |
Return the molar volume at standard state.
Reimplemented in PDSS_Nondimensional, PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
Definition at line 72 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo(), IdealMolalSoln::initThermo(), and DebyeHuckel::standardConcentration().
|
virtual |
Return the standard state density at standard state.
Reimplemented in PDSS_Nondimensional, PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
|
virtual |
Get the difference in the standard state enthalpy between the current pressure and the reference pressure, p0.
Definition at line 112 of file PDSS.cpp.
References PDSS::enthalpy_mole(), PDSS::enthalpy_RT_ref(), Cantera::GasConstant, and PDSS::m_temp.
|
virtual |
Get the difference in the standard state entropy between the current pressure and the reference pressure, p0.
Definition at line 117 of file PDSS.cpp.
References PDSS::entropy_mole(), PDSS::entropy_R_ref(), and Cantera::GasConstant.
|
virtual |
Get the difference in the standard state Gibbs free energy between the current pressure and the reference pressure, p0.
Definition at line 122 of file PDSS.cpp.
References Cantera::GasConstant, PDSS::gibbs_mole(), PDSS::gibbs_RT_ref(), and PDSS::m_temp.
|
virtual |
Get the difference in standard state heat capacity between the current pressure and the reference pressure, p0.
Definition at line 127 of file PDSS.cpp.
References PDSS::cp_mole(), PDSS::cp_R_ref(), and Cantera::GasConstant.
|
inline |
Return the reference pressure for this phase.
Definition at line 293 of file PDSS.h.
References PDSS::m_p0.
Referenced by STITbyPDSS::refPressure().
|
inline |
return the minimum temperature
Definition at line 298 of file PDSS.h.
References PDSS::m_minTemp.
Referenced by STITbyPDSS::minTemp().
|
inline |
return the minimum temperature
Definition at line 303 of file PDSS.h.
References PDSS::m_maxTemp.
Referenced by STITbyPDSS::maxTemp().
|
virtual |
Return the molar Gibbs free energy divided by RT at reference pressure.
Reimplemented in PDSS_Nondimensional, PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
Definition at line 87 of file PDSS.cpp.
Referenced by PDSS::gibbsDelp_mole().
|
virtual |
Return the molar enthalpy divided by RT at reference pressure.
Reimplemented in PDSS_Nondimensional, PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
Definition at line 92 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo(), PDSS::enthalpyDelp_mole(), and STITbyPDSS::updatePropertiesTemp().
|
virtual |
Return the molar entropy divided by R at reference pressure.
Reimplemented in PDSS_Nondimensional, PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
Definition at line 97 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo(), PDSS::entropyDelp_mole(), and STITbyPDSS::updatePropertiesTemp().
|
virtual |
Return the molar heat capacity divided by R at reference pressure.
Reimplemented in PDSS_Nondimensional, PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
Definition at line 102 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo(), PDSS::cpDelp_mole(), and STITbyPDSS::updatePropertiesTemp().
|
virtual |
Return the molar volume at reference pressure.
Reimplemented in PDSS_Nondimensional, PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
Definition at line 107 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo().
|
virtual |
Returns the pressure (Pa)
Reimplemented in PDSS_Water, and PDSS_IdealGas.
Definition at line 132 of file PDSS.cpp.
References PDSS::m_pres.
|
virtual |
Sets the pressure in the object.
Currently, this sets the pressure in the PDSS object. It is indeterminant what happens to the owning VPStandardStateTP object.
pres | Pressure to be set (Pascal) |
Reimplemented in PDSS_SSVol, PDSS_Water, PDSS_IdealGas, and PDSS_ConstVol.
Definition at line 157 of file PDSS.cpp.
References PDSS::m_pres.
Referenced by PDSS_HKFT::setState_TP().
|
virtual |
Return the volumetric thermal expansion coefficient. Units: 1/K.
The thermal expansion coefficient is defined as
\[ \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P \]
Reimplemented in PDSS_Water.
|
virtual |
Set the internal temperature.
temp | Temperature (Kelvin) |
Reimplemented in PDSS_SSVol, PDSS_Water, PDSS_IdealGas, and PDSS_ConstVol.
Definition at line 167 of file PDSS.cpp.
References PDSS::m_temp.
Referenced by PDSS_HKFT::setState_TP(), and STITbyPDSS::updatePropertiesTemp().
|
virtual |
Return the current stored temperature.
Definition at line 162 of file PDSS.cpp.
References PDSS::m_temp.
Referenced by PDSS_Nondimensional::enthalpy_mole(), PDSS_Molar::enthalpy_RT(), PDSS_Nondimensional::gibbs_mole(), and PDSS_Molar::gibbs_RT().
|
virtual |
Set the internal temperature and pressure.
temp | Temperature (Kelvin) |
pres | pressure (Pascals) |
Reimplemented in PDSS_SSVol, PDSS_Water, PDSS_IonsFromNeutral, PDSS_HKFT, PDSS_IdealGas, and PDSS_ConstVol.
Definition at line 181 of file PDSS.cpp.
Referenced by VPStandardStateTP::_updateStandardStateThermo(), and HMWSoln::satPressure().
|
virtual |
Set the internal temperature and density.
temp | Temperature (Kelvin) |
rho | Density (kg m-3) |
Reimplemented in PDSS_SSVol, PDSS_Water, PDSS_IonsFromNeutral, PDSS_IdealGas, and PDSS_ConstVol.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
saturation pressure
T | Temperature (Kelvin) |
Reimplemented in PDSS_SSVol, PDSS_Water, and PDSS_ConstVol.
Definition at line 191 of file PDSS.cpp.
Referenced by HMWSoln::satPressure().
doublereal molecularWeight | ( | ) | const |
Return the molecular weight of the species in units of kg kmol-1.
Definition at line 172 of file PDSS.cpp.
References PDSS::m_mw.
void setMolecularWeight | ( | doublereal | mw | ) |
Set the molecular weight of the species.
mw | Molecular Weight in kg kmol-1 |
Definition at line 176 of file PDSS.cpp.
References PDSS::m_mw.
|
inline |
Set the SpeciesThermoInterpType object used to calculate reference state properties.
Definition at line 428 of file PDSS.h.
References PDSS::m_spthermo.
|
inlinevirtual |
Returns 'true' if this object should be used in an STITbyPDSS object in the phase's reference thermo manager, or 'false' if a separate SpeciesThermoInterpType should be constructed.
Reimplemented in PDSS_Water, PDSS_IonsFromNeutral, and PDSS_HKFT.
|
inlinevirtual |
Set the parent VPStandardStateTP object of this PDSS object.
This information is only used by certain PDSS subclasses
phase | Pointer to the parent phase |
k | Index of this species in the phase |
Reimplemented in PDSS_IonsFromNeutral, and PDSS_HKFT.
|
inlinevirtual |
Initialization routine.
This is a cascading call, where each level should call the the parent level.
Reimplemented in PDSS_SSVol, PDSS_IonsFromNeutral, PDSS_HKFT, PDSS_ConstVol, and PDSS_IdealGas.
Definition at line 452 of file PDSS.h.
Referenced by PDSS_HKFT::initThermo(), PDSS_IonsFromNeutral::initThermo(), PDSS_SSVol::initThermo(), and VPStandardStateTP::initThermo().
|
inlinevirtual |
Initialization routine for the PDSS object based on the speciesNode.
This is a cascading call, where each level should call the the parent level. This function is called before initThermo()
Reimplemented in PDSS_SSVol, PDSS_HKFT, PDSS_IonsFromNeutral, and PDSS_ConstVol.
Definition at line 459 of file PDSS.h.
Referenced by PDSS_IonsFromNeutral::setParametersFromXML(), PDSS_HKFT::setParametersFromXML(), and PDSS_SSVol::setParametersFromXML().
|
virtual |
This utility function reports back the type of parameterization and all of the parameters for the species, index.
kindex | Species index (unused) |
type | Integer type of the standard type (unused) |
c | Vector of coefficients used to set the parameters for the standard state. |
minTemp | output - Minimum temperature |
maxTemp | output - Maximum temperature |
refPressure | output - reference pressure (Pa). |
Reimplemented in PDSS_HKFT.
|
mutableprotected |
Current temperature used by the PDSS object.
Definition at line 480 of file PDSS.h.
Referenced by PDSS_SSVol::calcMolarVolume(), PDSS_HKFT::cp_mole(), PDSS_HKFT::cp_R_ref(), PDSS_HKFT::deltaG(), PDSS_HKFT::deltaH(), PDSS_HKFT::deltaS(), PDSS_IonsFromNeutral::density(), PDSS_Water::dthermalExpansionCoeffdT(), PDSS_HKFT::enthalpy_mole(), PDSS_HKFT::enthalpy_RT_ref(), PDSS::enthalpyDelp_mole(), PDSS_HKFT::entropy_R_ref(), PDSS_Water::gibbs_mole(), PDSS_HKFT::gibbs_RT_ref(), PDSS::gibbsDelp_mole(), PDSS_HKFT::initThermo(), PDSS_IonsFromNeutral::intEnergy_mole(), PDSS_SSVol::intEnergy_mole(), PDSS_HKFT::molarVolume(), PDSS_HKFT::molarVolume_ref(), PDSS_Water::setDensity(), PDSS_IonsFromNeutral::setState_TP(), PDSS_Water::setState_TP(), PDSS_Water::setState_TR(), PDSS_Water::setTemperature(), PDSS_SSVol::setTemperature(), PDSS::setTemperature(), and PDSS::temperature().
|
mutableprotected |
State of the system - pressure.
Definition at line 483 of file PDSS.h.
Referenced by PDSS_HKFT::cp_mole(), PDSS_HKFT::cp_R_ref(), PDSS_HKFT::deltaG(), PDSS_HKFT::deltaH(), PDSS_HKFT::deltaS(), PDSS_IonsFromNeutral::density(), PDSS_HKFT::enthalpy_RT_ref(), PDSS_HKFT::entropy_R_ref(), PDSS_HKFT::gibbs_RT_ref(), PDSS_HKFT::initThermo(), PDSS_HKFT::intEnergy_mole(), PDSS_SSVol::intEnergy_mole(), PDSS_HKFT::molarVolume(), PDSS_HKFT::molarVolume_ref(), PDSS_HKFT::PDSS_HKFT(), PDSS_Water::pressure(), PDSS::pressure(), PDSS_SSVol::setPressure(), PDSS::setPressure(), PDSS_IonsFromNeutral::setState_TP(), PDSS_SSVol::setState_TP(), and PDSS_SSVol::setTemperature().
|
protected |
Reference state pressure of the species.
Definition at line 486 of file PDSS.h.
Referenced by PDSS_IonsFromNeutral::initThermo(), PDSS_SSVol::initThermo(), PDSS::refPressure(), PDSS_HKFT::setParametersFromXML(), PDSS_SSVol::setPressure(), and PDSS_SSVol::setTemperature().
|
protected |
Minimum temperature.
Definition at line 489 of file PDSS.h.
Referenced by PDSS_IonsFromNeutral::initThermo(), PDSS_SSVol::initThermo(), PDSS::minTemp(), and PDSS_HKFT::setParametersFromXML().
|
protected |
Maximum temperature.
Definition at line 492 of file PDSS.h.
Referenced by PDSS_IonsFromNeutral::initThermo(), PDSS_SSVol::initThermo(), PDSS::maxTemp(), and PDSS_HKFT::setParametersFromXML().
|
protected |
Molecular Weight of the species.
Definition at line 495 of file PDSS.h.
Referenced by PDSS_SSVol::calcMolarVolume(), PDSS_HKFT::density(), PDSS_IonsFromNeutral::density(), PDSS_Nondimensional::density(), PDSS::molecularWeight(), PDSS::setMolecularWeight(), and PDSS_SSVol::setState_TR().
|
protected |
Pointer to the species thermodynamic property manager.
Not used in all PDSS models.
Definition at line 499 of file PDSS.h.
Referenced by PDSS_SSVol::initThermo(), PDSS::setReferenceThermo(), and PDSS_SSVol::setTemperature().