26VPStandardStateTP::~VPStandardStateTP()
41 for (
size_t k = 0; k <
m_kk; k++) {
75 for (
size_t k = 0; k <
m_kk; k++) {
86void VPStandardStateTP::getStandardVolumes(
double* vol)
const
91const vector<double>& VPStandardStateTP::getStandardVolumes()
const
118const vector<double>& VPStandardStateTP::Gibbs_RT_ref()
const
145 for (
size_t k = 0; k <
m_kk; k++) {
149 "No PDSS object for species {}", k);
156 AnyMap& speciesNode)
const
160 speciesNode[
"equation-of-state"].getMapWhere(
161 "model", eos.
getString(
"model",
""),
true) = std::move(eos);
184 m_Vss.push_back(0.0);
227 pdss->setParent(
this, k);
231 pdss->setReferenceThermo(spec.
thermo);
243PDSS* VPStandardStateTP::providePDSS(
size_t k)
248const PDSS* VPStandardStateTP::providePDSS(
size_t k)
const
262 for (
size_t k = 0; k <
m_kk; k++) {
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
Declaration for class Cantera::Species.
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
A map of string keys to values whose type can vary at runtime.
const string & getString(const string &key, const string &default_) const
If key exists, return it as a string, otherwise return default_.
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 double cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
virtual double entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
virtual double molarVolume_ref() const
Return the molar volume at reference pressure.
virtual double enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
virtual double enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
virtual double entropy_R() const
Return the standard state entropy divided by RT.
virtual double cp_R() const
Return the molar const pressure heat capacity divided by RT.
virtual double molarVolume() const
Return the molar volume at standard state.
virtual void getParameters(AnyMap &eosNode) const
Store the parameters needed to reconstruct a copy of this PDSS object.
virtual void setState_TP(double temp, double pres)
Set the internal temperature and pressure.
virtual bool addSpecies(shared_ptr< Species > spec)
Add a Species to this Phase.
size_t m_kk
Number of species in the phase.
double temperature() const
Temperature (K).
size_t speciesIndex(const string &name) const
Returns the index of a species named 'name' within the Phase object.
virtual void setTemperature(double temp)
Set the internally stored temperature of the phase (K).
double molecularWeight(size_t k) const
Molecular weight of species k.
shared_ptr< Species > species(const string &name) const
Return the Species object for the named species.
string name() const
Return the name of the phase.
Contains data about a single chemical species.
string name
The name of the species.
shared_ptr< SpeciesThermoInterpType > thermo
Thermodynamic data for the species.
double RT() const
Return the Gas Constant multiplied by the current temperature.
double m_tlast
last value of the temperature processed by reference state
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
void invalidateCache() override
Invalidate any cached values which are normally updated only when a change in state is detected.
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
double m_Plast_ss
The last pressure at which the Standard State thermodynamic properties were calculated at.
int standardStateConvention() const override
This method returns the convention used in specification of the standard state, of which there are cu...
vector< double > m_g0_RT
Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.
vector< double > m_sss_R
Vector containing the species Standard State entropies at T = m_tlast and P = m_plast.
void installPDSS(size_t k, unique_ptr< PDSS > &&pdss)
Install a PDSS object for species k
void getSpeciesParameters(const string &name, AnyMap &speciesNode) const override
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
void getEntropy_R(double *sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
vector< double > m_h0_RT
Vector containing the species reference enthalpies at T = m_tlast and P = p_ref.
virtual void _updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
void getGibbs_ref(double *g) const override
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
void getStandardChemPotentials(double *mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
void getCp_R(double *cpr) const override
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
void setPressure(double p) override
Set the internally stored pressure (Pa) at constant temperature and composition.
vector< unique_ptr< PDSS > > m_PDSS_storage
Storage for the PDSS objects for the species.
void getStandardVolumes_ref(double *vol) const override
Get the molar volumes of the species reference states at the current T and P_ref of the solution.
vector< double > m_gss_RT
Vector containing the species Standard State Gibbs functions at T = m_tlast and P = m_plast.
double m_Tlast_ss
The last temperature at which the standard state thermodynamic properties were calculated at.
void getPureGibbs(double *gpure) const override
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
void getEnthalpy_RT(double *hrt) const override
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
vector< double > m_cpss_R
Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P =...
double m_maxTemp
The maximum temperature at which data for all species is valid.
void getEntropy_R_ref(double *er) const override
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
void setTemperature(const double temp) override
Set the temperature of the phase.
double minTemp(size_t k=npos) const override
Minimum temperature for which the thermodynamic data for the species or phase are valid.
vector< double > m_s0_R
Vector containing the species reference entropies at T = m_tlast and P = p_ref.
vector< double > m_Vss
Vector containing the species standard state volumes at T = m_tlast and P = m_plast.
double m_minTemp
The minimum temperature at which data for all species is valid.
void getGibbs_RT(double *grt) const override
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
vector< double > m_V0
Vector containing the species reference molar volumes.
void invalidateCache() override
Invalidate any cached values which are normally updated only when a change in state is detected.
void getCp_R_ref(double *cprt) const override
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
void setState_TP(double T, double pres) override
Set the temperature and pressure at the same time.
void getIntEnergy_RT(double *urt) const override
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
vector< double > m_cp0_R
Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_re...
virtual void updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
vector< double > m_hss_RT
Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast.
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
VPStandardStateTP()
Constructor.
void getGibbs_RT_ref(double *grt) const override
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
double maxTemp(size_t k=npos) const override
Maximum temperature for which the thermodynamic data for the species are valid.
double m_Pcurrent
Current value of the pressure - state variable.
void getEnthalpy_RT_ref(double *hrt) const override
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Namespace for the Cantera kernel.
const size_t npos
index returned by functions to indicate "no position"
const int cSS_CONVENTION_VPSS
Standard state uses the molality convention.
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...