SurfPhase.cpp Source File#
SurfPhase.cpp
Go to the documentation of this file.
Declarations for the EdgePhase ThermoPhase object, which models the interface between two surfaces (s...
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...
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
double convert(const string &key, const string &units) const
Convert the item stored by the given key to the units specified in units.
Definition AnyMap.cpp:1535
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
EdgePhase(const string &infile="", const string &id="")
Construct and initialize an EdgePhase directly from an input file.
Definition SurfPhase.cpp:335
virtual void update(double T, double *cp_R, double *h_RT, double *s_R) const
Compute the reference-state properties for all species.
Definition MultiSpeciesThermo.cpp:94
virtual void getConcentrations(double *const c) const
Get the species concentrations (kmol/m^3).
Definition Phase.cpp:482
void assignDensity(const double density_)
Set the internally stored constant density (kg/m^3) of the phase.
Definition Phase.cpp:597
virtual void setMoleFractions(const double *const x)
Set the mole fractions to the specified values.
Definition Phase.cpp:289
virtual double concentration(const size_t k) const
Concentration of species k.
Definition Phase.cpp:476
void getMoleFractions(double *const x) const
Get the species mole fraction vector.
Definition Phase.cpp:434
double moleFraction(size_t k) const
Return the mole fraction of a single species.
Definition Phase.cpp:439
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
Definition Phase.cpp:905
double mean_X(const double *const Q) const
Evaluate the mole-fraction-weighted mean of an array Q.
Definition Phase.cpp:616
const vector< string > & speciesNames() const
Return a const reference to the vector of species names.
Definition Phase.cpp:148
virtual void setMoleFractions_NoNorm(const double *const x)
Set the mole fractions to the specified values without normalizing.
Definition Phase.cpp:321
SurfPhase(const string &infile="", const string &id="")
Construct and initialize a SurfPhase ThermoPhase object directly from an input file.
Definition SurfPhase.cpp:22
void getStandardChemPotentials(double *mu0) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
Definition SurfPhase.cpp:97
void getPureGibbs(double *g) const override
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
Definition SurfPhase.cpp:128
double enthalpy_mole() const override
Return the Molar Enthalpy. Units: J/kmol.
Definition SurfPhase.cpp:28
void setSiteDensity(double n0)
Set the site density of the surface phase (kmol m-2)
Definition SurfPhase.cpp:204
double logStandardConc(size_t k=0) const override
Natural logarithm of the standard concentration of the kth species.
Definition SurfPhase.cpp:123
void setState(const AnyMap &state) override
Set the state using an AnyMap containing any combination of properties supported by the thermodynamic...
Definition SurfPhase.cpp:286
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
Definition SurfPhase.cpp:64
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
Definition SurfPhase.cpp:103
void getEntropy_R(double *sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
Definition SurfPhase.cpp:146
vector< double > m_logsize
vector storing the log of the size of each species.
Definition SurfPhase.h:342
void getCp_R(double *cpr) const override
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
Definition SurfPhase.cpp:152
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
void getActivityConcentrations(double *c) const override
Return a vector of activity concentrations for each species.
Definition SurfPhase.cpp:113
double size(size_t k) const
Returns the number of sites occupied by one molecule of species k.
Definition SurfPhase.h:221
vector< double > m_h0
Temporary storage for the reference state enthalpies.
Definition SurfPhase.h:323
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
Definition SurfPhase.cpp:92
double cv_mole() const override
Molar heat capacity at constant volume. Units: J/kmol/K.
Definition SurfPhase.cpp:59
void setCoverages(const double *theta)
Set the surface site fractions to a specified state.
Definition SurfPhase.cpp:215
vector< double > m_cp0
Temporary storage for the reference state heat capacities.
Definition SurfPhase.h:329
vector< double > m_speciesSize
Vector of species sizes (number of sites occupied). length m_kk.
Definition SurfPhase.h:314
void getEnthalpy_RT(double *hrt) const override
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
Definition SurfPhase.cpp:140
void getEntropy_R_ref(double *er) const override
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
Definition SurfPhase.cpp:175
void getGibbs_RT(double *grt) const override
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
Definition SurfPhase.cpp:134
double intEnergy_mole() const override
Return the Molar Internal Energy. Units: J/kmol.
Definition SurfPhase.cpp:37
double entropy_mole() const override
Return the Molar Entropy. Units: J/kmol-K.
Definition SurfPhase.cpp:42
void _updateThermo(bool force=false) const
Update the species reference state thermodynamic functions.
Definition SurfPhase.cpp:303
void getCp_R_ref(double *cprt) const override
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
Definition SurfPhase.cpp:180
void getStandardVolumes(double *vol) const override
Get the molar volumes of the species standard states at the current T and P of the solution.
Definition SurfPhase.cpp:158
void setCoveragesNoNorm(const double *theta)
Set the surface site fractions to a specified state.
Definition SurfPhase.cpp:231
void getCoverages(double *theta) const
Return a vector of surface coverages.
Definition SurfPhase.cpp:249
double cp_mole() const override
Molar heat capacity at constant pressure. Units: J/kmol/K.
Definition SurfPhase.cpp:53
void getPartialMolarCp(double *cpbar) const override
Return an array of partial molar heat capacities for the species in the mixture.
Definition SurfPhase.cpp:82
void compositionChanged() override
Apply changes to the state which are needed after the composition changes.
Definition SurfPhase.cpp:297
double standardConcentration(size_t k=0) const override
Return the standard concentration for the kth species.
Definition SurfPhase.cpp:118
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
void setCoveragesByName(const string &cov)
Set the coverages from a string of colon-separated name:value pairs.
Definition SurfPhase.cpp:263
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 SurfPhase.cpp:165
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
Definition SurfPhase.cpp:72
void getEnthalpy_RT_ref(double *hrt) const override
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Definition SurfPhase.cpp:170
virtual void getParameters(AnyMap &phaseNode) const
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
Definition ThermoPhase.cpp:1099
virtual void setState(const AnyMap &state)
Set the state using an AnyMap containing any combination of properties supported by the thermodynamic...
Definition ThermoPhase.cpp:145
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
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
Definition ThermoPhase.h:1962
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Definition ThermoPhase.cpp:1054
A representation of the units associated with a dimensional quantity.
Definition Units.h:35
Composition parseCompString(const string &ss, const vector< string > &names)
Parse a composition string into a map consisting of individual key:composition pairs.
Definition stringUtils.cpp:58
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Definition utilities.h:104
const U & getValue(const map< T, U > &m, const T &key, const U &default_val)
Const accessor for a value in a map.
Definition utilities.h:190
Contains declarations for string manipulation functions within Cantera.
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...
Generated by 1.9.7