26 VPStandardStateTP::VPStandardStateTP() :
41 for (
size_t k = 0; k <
m_kk; k++) {
42 muRT[k] *= 1.0 /
RT();
51 for (
size_t k = 0; k <
m_kk; k++) {
85 for (
size_t k = 0; k <
m_kk; k++) {
96 void VPStandardStateTP::getStandardVolumes(doublereal* vol)
const 101 const vector_fp& VPStandardStateTP::getStandardVolumes()
const 128 const vector_fp& VPStandardStateTP::Gibbs_RT_ref()
const 155 for (
size_t k = 0; k <
m_kk; k++) {
159 "No PDSS object for species {}", k);
182 m_Vss.push_back(0.0);
201 "but EOS for phase is not known");
226 pdss->setParent(
this, k);
228 if (pdss->useSTITbyPDSS()) {
231 auto stit =
species(k)->thermo;
233 pdss->setReferenceThermo(stit);
243 PDSS* VPStandardStateTP::providePDSS(
size_t k)
248 const PDSS* VPStandardStateTP::providePDSS(
size_t k)
const 262 for (
size_t k = 0; k <
m_kk; k++) {
virtual void updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
doublereal m_Tlast_ss
The last temperature at which the standard statethermodynamic properties were calculated at...
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
vector_fp m_sss_R
Vector containing the species Standard State entropies at T = m_tlast and P = m_plast.
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 initThermo()
Initialization routine.
virtual void getGibbs_ref(doublereal *g) const
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
doublereal temperature() const
Temperature (K).
An error indicating that an unimplemented function has been called.
virtual void getChemPotentials_RT(doublereal *mu) const
Get the array of non-dimensional species chemical potentials.
Various templated functions that carry out common vector operations (see Templated Utility Functions)...
Header for intermediate ThermoPhase object for phases which consist of ions whose thermodynamics is c...
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
virtual doublereal entropy_R() const
Return the standard state entropy divided by RT.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
virtual void setTemperature(const doublereal temp)
Set the temperature of the phase.
std::vector< std::unique_ptr< PDSS > > m_PDSS_storage
Storage for the PDSS objects for the species.
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
vector_fp m_cp0_R
Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_re...
vector_fp m_Vss
Vector containing the species standard state volumes at T = m_tlast and P = m_plast.
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
doublereal m_tlast
last value of the temperature processed by reference state
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
virtual doublereal molarVolume_ref() const
Return the molar volume at reference pressure.
virtual bool addSpecies(shared_ptr< Species > spec)
virtual void invalidateCache()
Invalidate any cached values which are normally updated only when a change in state is detected...
virtual void invalidateCache()
Invalidate any cached values which are normally updated only when a change in state is detected...
virtual doublereal molarVolume() const
Return the molar volume at standard state.
virtual void getEntropy_R_ref(doublereal *er) const
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
virtual void initThermo()
virtual doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
shared_ptr< Species > species(const std::string &name) const
Return the Species object for the named species.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
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...
std::string speciesName(size_t k) const
Name of the species with index k.
virtual void _updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
Base class for exceptions thrown by Cantera classes.
virtual void getGibbs_RT_ref(doublereal *grt) const
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
void installPDSS(size_t k, std::unique_ptr< PDSS > &&pdss)
Install a PDSS object for species k
vector_fp m_cpss_R
Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P =...
virtual bool addSpecies(shared_ptr< Species > spec)
Add a Species to this Phase.
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
virtual void getCp_R_ref(doublereal *cprt) const
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
virtual void getPureGibbs(doublereal *gpure) const
Get the Gibbs functions for the standard state of the species at the current T and P of the solution...
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
Header for factory functions to build instances of classes that manage the standard-state thermodynam...
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
vector_fp m_gss_RT
Vector containing the species Standard State Gibbs functions at T = m_tlast and P = m_plast...
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).
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
vector_fp m_hss_RT
Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast.
vector_fp m_g0_RT
Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.
vector_fp m_h0_RT
Vector containing the species reference enthalpies at T = m_tlast and P = p_ref.
const int cSS_CONVENTION_VPSS
Standard state uses the molality convention.
size_t m_kk
Number of species in the phase.
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
doublereal molecularWeight(size_t k) const
Molecular weight of species k.
doublereal m_Pcurrent
Current value of the pressure - state variable.
virtual void install_STIT(size_t index, shared_ptr< SpeciesThermoInterpType > stit)
Install a new species thermodynamic property parameterization for one species.
vector_fp m_s0_R
Vector containing the species reference entropies at T = m_tlast and P = p_ref.
Namespace for the Cantera kernel.
vector_fp m_V0
Vector containing the species reference molar volumes.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
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 setState_TP(doublereal T, doublereal pres)
Set the temperature and pressure at the same time.
virtual int standardStateConvention() const
This method returns the convention used in specification of the standard state, of which there are cu...