27 VPStandardStateTP::VPStandardStateTP() :
74 for (
size_t k = 0; k <
m_kk; k++) {
100 for (
size_t k = 0; k <
m_kk; k++) {
134 throw CanteraError(
"VPStandardStateTP",
"Base class method "
142 doublereal invRT = 1.0 /
_RT();
143 for (
size_t k = 0; k <
m_kk; k++) {
154 doublereal RT =
_RT();
155 for (
size_t k = 0; k <
m_kk; k++) {
168 #ifdef H298MODIFY_CAPABILITY
208 void VPStandardStateTP::getStandardVolumes(doublereal* vol)
const
213 const vector_fp& VPStandardStateTP::getStandardVolumes()
const
241 const vector_fp& VPStandardStateTP::Gibbs_RT_ref()
const
270 for (
size_t k = 0; k <
m_kk; k++) {
308 err(
"VPStandardStateTP::calcDensity() called, but EOS for phase is not known");
342 VPStandardStateTP::createInstallPDSS(
size_t k,
const XML_Node& s,
353 VPStandardStateTP::providePDSS(
size_t k)
359 VPStandardStateTP::providePDSS(
size_t k)
const
371 for (
size_t k = 0; k <
m_kk; k++) {
394 "Probably indicates that ThermoPhase object wasn't initialized correctly");
doublereal m_Tlast_ss
The last temperature at which the standard statethermodynamic properties were calculated at...
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species at their standard states of solution at the cu...
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
const vector_fp & Gibbs_RT_ref() const
Return a reference to the vector of Gibbs free energies of the species.
virtual ThermoPhase * duplMyselfAsThermoPhase() const
Duplication routine.
doublereal m_Plast_ss
The last pressure at which the Standard State thermodynamic properties were calculated at...
const doublereal OneAtm
One atmosphere [Pa].
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Virtual base class for the classes that manage the calculation of standard state properties for all t...
Declaration file for a virtual base class that manages the calculation of standard state properties f...
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional internal Energies of the standard state at the current temperatu...
doublereal _RT() const
Return the Gas Constant multiplied by the current temperature.
virtual void initThermoXML(const XML_Node &phaseNode, const std::string &id)
Initialization routine for the PDSS object based on the phaseNode.
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
ThermoPhase & operator=(const ThermoPhase &right)
Assignment operator.
virtual void getGibbs_RT_ref(doublereal *grt) const
Returns the vector of nondimensional Gibbs free energies of the reference state at the current temper...
virtual void setTemperature(const doublereal temp)
Set the temperature of the phase.
virtual PDSS * createInstallPDSS(size_t k, const XML_Node &speciesNode, const XML_Node *const phaseNode_ptr)
Install specific content for species k in the standard-state thermodynamic calculator and also create...
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the standard state of the species at ...
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Finalize the thermo after all species have been entered.
VPStandardStateTP()
Constructor.
virtual void modifyOneHf298SS(const int k, const doublereal Hf298New)
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) ...
virtual int eosType() const
Equation of state type flag.
Class XML_Node is a tree-based representation of the contents of an XML file.
virtual void updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
std::vector< PDSS * > m_PDSS_storage
Storage for the PDSS objects for the species.
virtual void initAllPtrs(VPStandardStateTP *vptp_ptr, VPSSMgr *vpssmgr_ptr, SpeciesThermo *spthermo_ptr)
Initialize or Reinitialize all shallow pointers in the object.
virtual void getCp_R_ref(doublereal *cprt) const
virtual void initThermo()
VPSSMgr * m_VPSS_ptr
Pointer to the VPSS manager that calculates all of the standard state info efficiently.
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
#define AssertThrowMsg(expr, procedure, message)
Assertion must be true or an error is thrown.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity.
VPStandardStateTP & operator=(const VPStandardStateTP &b)
Assignment operator.
Base class for a phase with thermodynamic properties.
virtual PDSS * duplMyselfAsPDSS() const
Duplication routine for objects which inherit from PDSS.
virtual void getCp_R_ref(doublereal *cpr) const
void setVPSSMgr(VPSSMgr *vp_ptr)
set the VPSS Mgr
virtual void initThermo()
Initialization routine for all of the shallow pointers.
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
virtual int standardStateConvention() const
This method returns the convention used in specification of the standard state, of which there are cu...
virtual ~VPStandardStateTP()
Destructor.
virtual void getStandardVolumes_ref(doublereal *vol) const
Get the molar volumes of the species reference states at the current T and P_ref of the solution...
virtual void initAllPtrs(VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
Initialize the internal shallow pointers in this object.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
void getPureGibbs(doublereal *gpure) const
Get the standard state Gibbs functions for each species at the current T and P.
virtual void getStandardVolumes_ref(doublereal *vol) const
Get the molar volumes of the species reference states at the current T and P_ref of the solution...
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Enthalpy functions for the standard state species at the current T an...
Base class for exceptions thrown by Cantera classes.
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species at their standard states of solution at the cu...
This is a filter class for ThermoPhase that implements some prepatory steps for efficiently handling ...
size_t nSpecies() const
Returns the number of species in the phase.
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional internal Energies of the standard state at the current temperatu...
#define AssertTrace(expr)
Assertion must be true or an error is thrown.
doublereal temperature() const
Temperature (K).
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Enthalpy functions for the standard state species at the current T an...
virtual void getGibbs_ref(doublereal *g) const
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Virtual base class for a species with a pressure dependent standard state.
virtual void setTemperature(const doublereal temp)
Set the internally stored temperature of the phase (K).
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Initialize a ThermoPhase object, potentially reading activity coefficient information from an XML dat...
const int cSS_CONVENTION_VPSS
Standard state uses the molality convention.
Contains declarations for string manipulation functions within Cantera.
virtual void getStandardVolumes(doublereal *vol) const
Get the molar volumes of each species in their standard states at the current T and P of the solution...
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the standard state of the species at ...
size_t m_kk
Number of species in the phase.
virtual void getEntropy_R_ref(doublereal *er) const
doublereal m_Pcurrent
Current value of the pressure - state variable.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity.
virtual void setState_TP(doublereal T, doublereal P)
Set the temperature (K) and pressure (Pa)
virtual void getGibbs_RT_ref(doublereal *grt) const
doublereal err(const std::string &msg) const
VPStandardStateTP has its own err routine.
VPSSMgr * provideVPSSMgr()
Return a pointer to the VPSSMgr for this phase.
SpeciesThermo * m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
virtual void getEntropy_R_ref(doublereal *er) const
virtual void getGibbs_ref(doublereal *g) const
void getChemPotentials_RT(doublereal *mu) const
Get the array of non-dimensional species chemical potentials.
virtual void setState_TP(doublereal T, doublereal pres)
Set the temperature and pressure at the same time.
virtual void _updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.