26 VPStandardStateTP::VPStandardStateTP() :
43 for (
size_t k = 0; k <
m_kk; k++) {
44 muRT[k] *= 1.0 /
RT();
53 for (
size_t k = 0; k <
m_kk; k++) {
87 for (
size_t k = 0; k <
m_kk; k++) {
98 void VPStandardStateTP::getStandardVolumes(doublereal* vol)
const
103 const vector_fp& VPStandardStateTP::getStandardVolumes()
const
130 const vector_fp& VPStandardStateTP::Gibbs_RT_ref()
const
157 for (
size_t k = 0; k <
m_kk; k++) {
161 "No PDSS object for species {}", k);
187 m_Vss.push_back(0.0);
230 pdss->setParent(
this, k);
234 pdss->setReferenceThermo(spec.
thermo);
246 PDSS* VPStandardStateTP::providePDSS(
size_t k)
251 const PDSS* VPStandardStateTP::providePDSS(
size_t k)
const
265 for (
size_t k = 0; k <
m_kk; k++) {
Header for intermediate ThermoPhase object for phases which consist of ions whose thermodynamics is c...
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
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 ...
Base class for exceptions thrown by Cantera classes.
virtual void install_STIT(size_t index, shared_ptr< SpeciesThermoInterpType > stit)
Install a new species thermodynamic property parameterization for one species.
An error indicating that an unimplemented function has been called.
Virtual base class for a species with a pressure dependent standard state.
virtual void initThermo()
Initialization routine.
virtual doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
virtual doublereal entropy_R() const
Return the standard state entropy divided by RT.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.
virtual doublereal molarVolume_ref() const
Return the molar volume at reference pressure.
virtual doublereal molarVolume() const
Return the molar volume at standard state.
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
virtual bool addSpecies(shared_ptr< Species > spec)
Add a Species to this Phase.
size_t m_kk
Number of species in the phase.
doublereal molecularWeight(size_t k) const
Molecular weight of species k.
doublereal temperature() const
Temperature (K).
virtual void setTemperature(const doublereal temp)
Set the internally stored temperature of the phase (K).
shared_ptr< Species > species(const std::string &name) const
Return the Species object for the named species.
Contains data about a single chemical species.
std::string name
The name of the species.
shared_ptr< SpeciesThermoInterpType > thermo
Thermodynamic data for the species.
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
doublereal m_tlast
last value of the temperature processed by reference state
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
virtual void invalidateCache()
Invalidate any cached values which are normally updated only when a change in state is detected.
vector_fp m_g0_RT
Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.
vector_fp m_cp0_R
Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_re...
virtual bool addSpecies(shared_ptr< Species > spec)
Add a Species to this Phase.
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 getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
doublereal m_Tlast_ss
The last temperature at which the standard state thermodynamic properties were calculated at.
virtual void _updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
vector_fp m_h0_RT
Vector containing the species reference enthalpies at T = m_tlast and P = p_ref.
doublereal m_Plast_ss
The last pressure at which the Standard State thermodynamic properties were calculated at.
virtual void setState_TP(doublereal T, doublereal pres)
Set the temperature and pressure at the same time.
vector_fp m_s0_R
Vector containing the species reference entropies at T = m_tlast and P = p_ref.
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_Vss
Vector containing the species standard state volumes at T = m_tlast and P = m_plast.
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 void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
void installPDSS(size_t k, std::unique_ptr< PDSS > &&pdss)
Install a PDSS object for species k
virtual void initThermo()
double m_maxTemp
The maximum temperature at which data for all species is valid.
virtual double minTemp(size_t k=npos) const
Minimum temperature for which the thermodynamic data for the species or phase are valid.
double m_minTemp
The minimum temperature at which data for all species is valid.
virtual int standardStateConvention() const
This method returns the convention used in specification of the standard state, of which there are cu...
virtual void getEntropy_R_ref(doublereal *er) const
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
vector_fp m_sss_R
Vector containing the species Standard State entropies at T = m_tlast and P = m_plast.
vector_fp m_cpss_R
Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P =...
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
virtual void setTemperature(const doublereal temp)
Set the temperature of the phase.
doublereal m_Pcurrent
Current value of the pressure - state variable.
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 getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
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 double maxTemp(size_t k=npos) const
Maximum temperature for which the thermodynamic data for the species are valid.
virtual void getChemPotentials_RT(doublereal *mu) const
Get the array of non-dimensional species chemical potentials.
vector_fp m_gss_RT
Vector containing the species Standard State Gibbs functions at T = m_tlast and P = m_plast.
vector_fp m_V0
Vector containing the species reference molar volumes.
virtual void updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
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...
virtual void invalidateCache()
Invalidate any cached values which are normally updated only when a change in state is detected.
vector_fp m_hss_RT
Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast.
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
std::vector< std::unique_ptr< PDSS > > m_PDSS_storage
Storage for the PDSS objects for the species.
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 getEnthalpy_RT_ref(doublereal *hrt) const
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data.
const size_t npos
index returned by functions to indicate "no position"
const double OneAtm
One atmosphere [Pa].
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
const double BigNumber
largest number to compare to inf.
Namespace for the Cantera kernel.
const int cSS_CONVENTION_VPSS
Standard state uses the molality convention.
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Various templated functions that carry out common vector operations (see Templated Utility Functions)...