CoverageDependentSurfPhase.cpp Source File#
CoverageDependentSurfPhase.cpp
Go to the documentation of this file.
Header for a thermodynamics model of a coverage-dependent surface phase derived from SurfPhase,...
Declaration for class Cantera::Species.
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
Base class defining common data possessed by both AnyMap and AnyValue objects.
Definition AnyMap.h:34
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
Definition AnyMap.cpp:1423
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
void getStandardChemPotentials(double *mu0) const override
Get the standard state chemical potential vector. Units: J/kmol.
Definition CoverageDependentSurfPhase.cpp:391
void getPureGibbs(double *g) const override
Get the standard state gibbs free energy vector. Units: J/kmol.
Definition CoverageDependentSurfPhase.cpp:383
double enthalpy_mole() const override
Return the solution's molar enthalpy. Units: J/kmol.
Definition CoverageDependentSurfPhase.cpp:433
vector< double > m_entropy
Temporary storage for the sum of reference state entropies and coverage-dependent entropies.
Definition CoverageDependentSurfPhase.h:401
vector< InterpolativeDependency > m_InterpolativeDependency
Array of enthalpy and entropy coverage dependency parameters used in the piecewise-linear and interpo...
Definition CoverageDependentSurfPhase.h:417
void getPartialMolarEnthalpies(double *hbar) const override
Get the partial molar enthalpy vector. Units: J/kmol.
Definition CoverageDependentSurfPhase.cpp:403
void getChemPotentials(double *mu) const override
Get the chemical potential vector. Units: J/kmol.
Definition CoverageDependentSurfPhase.cpp:424
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...
Definition CoverageDependentSurfPhase.cpp:238
void getEntropy_R(double *sr) const override
Get the nondimensionalized standard state entropy vector.
Definition CoverageDependentSurfPhase.cpp:353
CoverageDependentSurfPhase(const string &infile="", const string &id="")
Construct and initialize a CoverageDependentSurfPhase ThermoPhase object directly from an ASCII input...
Definition CoverageDependentSurfPhase.cpp:124
vector< double > m_enthalpy
Temporary storage for the sum of reference state enthalpies and coverage-dependent enthalpies.
Definition CoverageDependentSurfPhase.h:397
vector< HeatCapacityDependency > m_HeatCapacityDependency
Array of heat capacity coverage dependency parameters.
Definition CoverageDependentSurfPhase.h:420
void getCp_R_ref(double *cpr) const override
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
Definition CoverageDependentSurfPhase.cpp:341
void getCp_R(double *cpr) const override
Get the nondimensionalized standard state heat capacity vector.
Definition CoverageDependentSurfPhase.cpp:365
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
Definition CoverageDependentSurfPhase.cpp:232
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
Definition CoverageDependentSurfPhase.cpp:157
vector< double > m_h_cov
Temporary storage for the coverage-dependent enthalpies.
Definition CoverageDependentSurfPhase.h:384
void getEntropy_R_ref(double *sr) const override
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
Definition CoverageDependentSurfPhase.cpp:335
int m_stateNumlast
Last value of the state number processed.
Definition CoverageDependentSurfPhase.h:428
vector< double > m_chempot
Temporary storage for the sum of reference state chemical potentials and coverage-dependent chemical ...
Definition CoverageDependentSurfPhase.h:409
void addInterpolativeDependency(const InterpolativeDependency &int_deps)
Add interpolative coverage dependence parameters for a species.
Definition CoverageDependentSurfPhase.cpp:133
vector< double > m_heatcapacity
Temporary storage for the sum of reference state heat capacities and coverage-dependent heat capaciti...
Definition CoverageDependentSurfPhase.h:405
void _updateTotalThermo() const
Update the total (reference state + coverage-dependent) thermodynamic functions.
Definition CoverageDependentSurfPhase.cpp:530
void getEnthalpy_RT(double *hrt) const override
Get the nondimensionalized standard state enthalpy vector.
Definition CoverageDependentSurfPhase.cpp:347
double m_theta_ref
Storage for the user-defined reference state coverage which has to be greater than 0....
Definition CoverageDependentSurfPhase.h:425
void _updateCovDepThermo() const
Update the species coverage-dependent thermodynamic functions.
Definition CoverageDependentSurfPhase.cpp:456
void getGibbs_RT(double *grt) const override
Get the nondimensionalized standard state gibbs free energy vector.
Definition CoverageDependentSurfPhase.cpp:371
double entropy_mole() const override
Return the solution's molar entropy. Units: J/kmol/K.
Definition CoverageDependentSurfPhase.cpp:439
vector< double > m_mu_cov
Temporary storage for the coverage-dependent chemical potentials.
Definition CoverageDependentSurfPhase.h:393
vector< double > m_s_cov
Temporary storage for the coverage-dependent entropies.
Definition CoverageDependentSurfPhase.h:387
double cp_mole() const override
Return the solution's molar heat capacity. Units: J/kmol/K.
Definition CoverageDependentSurfPhase.cpp:450
vector< double > m_cov
Temporary storage for the coverages.
Definition CoverageDependentSurfPhase.h:381
void getPartialMolarCp(double *cpbar) const override
Get the partial molar heat capacity vector. Units: J/kmol/K.
Definition CoverageDependentSurfPhase.cpp:418
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Definition CoverageDependentSurfPhase.cpp:215
void getGibbs_RT_ref(double *grt) const override
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
Definition CoverageDependentSurfPhase.cpp:323
vector< PolynomialDependency > m_PolynomialDependency
Array of enthalpy and entropy coverage dependency parameters used in the linear and polynomial depend...
Definition CoverageDependentSurfPhase.h:413
vector< double > m_cp_cov
Temporary storage for the coverage-dependent heat capacities.
Definition CoverageDependentSurfPhase.h:390
void getPartialMolarEntropies(double *sbar) const override
Get the partial molar entropy vector. Units: J/kmol/K.
Definition CoverageDependentSurfPhase.cpp:409
void getEnthalpy_RT_ref(double *hrt) const override
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Definition CoverageDependentSurfPhase.cpp:329
Error thrown for problems processing information contained in an AnyMap or AnyValue.
Definition AnyMap.h:738
size_t speciesIndex(const string &name) const
Returns the index of a species named 'name' within the Phase object.
Definition Phase.cpp:129
double moleFraction(size_t k) const
Return the mole fraction of a single species.
Definition Phase.cpp:439
double mean_X(const double *const Q) const
Evaluate the mole-fraction-weighted mean of an array Q.
Definition Phase.cpp:616
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
Definition SurfPhase.cpp:328
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
Definition SurfPhase.cpp:319
vector< double > m_h0
Temporary storage for the reference state enthalpies.
Definition SurfPhase.h:323
vector< double > m_cp0
Temporary storage for the reference state heat capacities.
Definition SurfPhase.h:329
void _updateThermo(bool force=false) const
Update the species reference state thermodynamic functions.
Definition SurfPhase.cpp:303
void getCoverages(double *theta) const
Return a vector of surface coverages.
Definition SurfPhase.cpp:249
vector< double > m_mu0
Temporary storage for the reference state Gibbs energies.
Definition SurfPhase.h:332
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Definition SurfPhase.cpp:185
double RT() const
Return the Gas Constant multiplied by the current temperature.
Definition ThermoPhase.h:1062
double m_tlast
last value of the temperature processed by reference state
Definition ThermoPhase.h:1985
void initThermoFile(const string &inputFile, const string &id)
Initialize a ThermoPhase object using an input file.
Definition ThermoPhase.cpp:995
virtual void getSpeciesParameters(const string &name, AnyMap &speciesNode) const
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
Definition ThermoPhase.h:1831
#define AssertThrowMsg(expr, procedure,...)
Assertion must be true or an error is thrown.
Definition ctexceptions.h:278
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Definition utilities.h:104
Contains declarations for string manipulation functions within Cantera.
A struct to store sets of parameters used in coverage-dependent heat capacity calculations by a log-q...
Definition CoverageDependentSurfPhase.h:192
double coeff_a
coefficient [J/kmol/K] in the coverage-dependent heat capacity model
Definition CoverageDependentSurfPhase.h:207
double coeff_b
coefficient [J/kmol/K] in the coverage-dependent heat capacity model
Definition CoverageDependentSurfPhase.h:210
A struct to store sets of parameters used in coverage-dependent enthalpy and entropy calculations by ...
Definition CoverageDependentSurfPhase.h:165
map< double, double > enthalpy_map
map of <coverage[dimensionless], enthalpy[J/kmol]> pairs
Definition CoverageDependentSurfPhase.h:182
map< double, double > entropy_map
map of <coverage[dimensionless], entropy[J/kmol/K]> pairs
Definition CoverageDependentSurfPhase.h:184
InterpolativeDependency(size_t k, size_t j, const AnyMap &dep_map, const AnyBase &node)
Definition CoverageDependentSurfPhase.cpp:58
A struct to store sets of parameters used in coverage-dependent enthalpy and entropy calculations by ...
Definition CoverageDependentSurfPhase.h:133
PolynomialDependency(size_t k, size_t j, const AnyMap &dep_map)
Definition CoverageDependentSurfPhase.cpp:25
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...
Generated by