A simple thermoydnamics model for a surface phase, assuming an ideal solution model. More...
#include <SurfPhase.h>
Public Member Functions | |
SurfPhase (doublereal n0=0.0) | |
Constructor. | |
SurfPhase (std::string infile, std::string id) | |
Construct and initialize a SurfPhase ThermoPhase object directly from an asci input file. | |
SurfPhase (XML_Node &xmlphase) | |
Construct and initialize a SurfPhase ThermoPhase object directly from an XML database. | |
SurfPhase (const SurfPhase &right) | |
Copy Constructor. | |
SurfPhase & | operator= (const SurfPhase &right) |
Asignment operator. | |
virtual | ~SurfPhase () |
Destructor. | |
ThermoPhase * | duplMyselfAsThermoPhase () const |
Duplicator from the ThermoPhase parent class. | |
virtual int | eosType () const |
Equation of state type flag. | |
virtual doublereal | enthalpy_mole () const |
Return the Molar Enthalpy. Units: J/kmol. | |
virtual doublereal | intEnergy_mole () const |
Return the Molar Internal Energy. Units: J/kmol. | |
virtual void | getChemPotentials (doublereal *mu) const |
Get the species chemical potentials. Units: J/kmol. | |
virtual void | getPartialMolarEnthalpies (doublereal *hbar) const |
Returns an array of partial molar enthalpies for the species in the mixture. | |
virtual void | getPartialMolarEntropies (doublereal *sbar) const |
Returns an array of partial molar entropies of the species in the solution. | |
virtual void | getPartialMolarCp (doublereal *cpbar) const |
Return an array of partial molar heat capacities for the species in the mixture. | |
virtual void | getPartialMolarVolumes (doublereal *vbar) const |
Return an array of partial molar volumes for the species in the mixture. | |
virtual void | getStandardChemPotentials (doublereal *mu0) const |
Get the array of chemical potentials at unit activity for the standard state species at the current T and P of the solution. | |
virtual void | getActivityConcentrations (doublereal *c) const |
Return a vector of activity concentrations for each species. | |
virtual doublereal | standardConcentration (int k=0) const |
Return the standard concentration for the kth species. | |
virtual doublereal | logStandardConc (int k=0) const |
Return the log of the standard concentration for the kth species. | |
virtual void | setParameters (int n, doublereal *const c) |
Set the equation of state parameters from the argument list. | |
virtual void | setParametersFromXML (const XML_Node &thermoData) |
Set the Equation-of-State parameters by reading an XML Node Input. | |
virtual void | initThermo () |
Initialize the SurfPhase object after all species have been set up. | |
virtual void | setStateFromXML (const XML_Node &state) |
Set the initial state of the Surface Phase from an XML_Node. | |
doublereal | siteDensity () |
Returns the site density. | |
void | setPotentialEnergy (int k, doublereal pe) |
Sets the potential energy of species k. | |
doublereal | potentialEnergy (int k) |
Return the potential energy of species k. | |
void | setSiteDensity (doublereal n0) |
Set the site density of the surface phase (kmol m-2). | |
virtual void | getGibbs_RT (doublereal *grt) const |
Get the nondimensional Gibbs functions for the species in their standard states at the current T and P of the solution. | |
virtual void | getEnthalpy_RT (doublereal *hrt) const |
Get the nondimensional Enthalpy functions for the species standard states at their standard states at the current T and P of the solution. | |
virtual void | getEntropy_R (doublereal *sr) const |
Get the array of nondimensional Entropy functions for the species standard states at the current T and P of the solution. | |
virtual void | getCp_R (doublereal *cpr) const |
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the current T and P of the solution. | |
virtual void | getStandardVolumes (doublereal *vol) const |
Get the molar volumes of the species standard states at the current T and P of the solution. | |
virtual doublereal | pressure () const |
Return the thermodynamic pressure (Pa). | |
virtual void | setPressure (doublereal p) |
Set the internally storred pressure (Pa) at constant temperature and composition. | |
virtual void | getGibbs_RT_ref (doublereal *grt) const |
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temperature of the solution and the reference pressure for the species. | |
virtual void | getEnthalpy_RT_ref (doublereal *hrt) const |
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of the solution and the reference pressure for the species. | |
virtual void | getEntropy_R_ref (doublereal *er) const |
Returns the vector of nondimensional entropies of the reference state at the current temperature of the solution and the reference pressure for each species. | |
virtual void | getCp_R_ref (doublereal *cprt) const |
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the current temperature of the solution and reference pressure for each species. | |
void | setCoverages (const doublereal *theta) |
Set the surface site fractions to a specified state. | |
void | setCoveragesNoNorm (const doublereal *theta) |
Set the surface site fractions to a specified state. | |
void | setCoveragesByName (std::string cov) |
Set the coverages from a string of colon-separated name:value pairs. | |
void | getCoverages (doublereal *theta) const |
Return a vector of surface coverages. | |
doublereal | _RT () const |
Return the Gas Constant multiplied by the current temperature. | |
bool | chargeNeutralityNecessary () const |
Returns the chargeNeutralityNecessity boolean. | |
virtual std::string | report (bool show_thermo=true) const |
returns a summary of the state of the phase as a string | |
XML_Node & | xml () |
Returns a reference to the XML_Node storred for the phase. | |
std::string | id () const |
Return the string id for the phase. | |
void | setID (std::string id) |
Set the string id for the phase. | |
std::string | name () const |
Return the name of the phase. | |
void | setName (std::string nm) |
Sets the string name for the phase. | |
void | saveState (vector_fp &state) const |
Save the current internal state of the phase. | |
void | saveState (int lenstate, doublereal *state) const |
Write to array 'state' the current internal state. | |
void | restoreState (const vector_fp &state) |
Restore a state saved on a previous call to saveState. | |
void | restoreState (int lenstate, const doublereal *state) |
Restore the state of the phase from a previously saved state vector. | |
void | setMoleFractionsByName (compositionMap &xMap) |
Set the species mole fractions by name. | |
void | setMoleFractionsByName (const std::string &x) |
Set the mole fractions of a group of species by name. | |
void | setMassFractionsByName (compositionMap &yMap) |
Set the species mass fractions by name. | |
void | setMassFractionsByName (const std::string &x) |
Set the species mass fractions by name. | |
void | setState_TRX (doublereal t, doublereal dens, const doublereal *x) |
Set the internally storred temperature (K), density, and mole fractions. | |
void | setState_TRX (doublereal t, doublereal dens, compositionMap &x) |
Set the internally storred temperature (K), density, and mole fractions. | |
void | setState_TRY (doublereal t, doublereal dens, const doublereal *y) |
Set the internally storred temperature (K), density, and mass fractions. | |
void | setState_TRY (doublereal t, doublereal dens, compositionMap &y) |
Set the internally storred temperature (K), density, and mass fractions. | |
void | setState_TNX (doublereal t, doublereal n, const doublereal *x) |
Set the internally storred temperature (K), molar density (kmol/m^3), and mole fractions. | |
void | setState_TR (doublereal t, doublereal rho) |
Set the internally storred temperature (K) and density (kg/m^3). | |
void | setState_TX (doublereal t, doublereal *x) |
Set the internally storred temperature (K) and mole fractions. | |
void | setState_TY (doublereal t, doublereal *y) |
Set the internally storred temperature (K) and mass fractions. | |
void | setState_RX (doublereal rho, doublereal *x) |
Set the density (kg/m^3) and mole fractions. | |
void | setState_RY (doublereal rho, doublereal *y) |
Set the density (kg/m^3) and mass fractions. | |
void | getMolecularWeights (vector_fp &weights) const |
Copy the vector of molecular weights into vector weights. | |
void | getMolecularWeights (int iwt, doublereal *weights) const |
Copy the vector of molecular weights into array weights. | |
void | getMolecularWeights (doublereal *weights) const |
Copy the vector of molecular weights into array weights. | |
const array_fp & | molecularWeights () const |
Return a const reference to the internal vector of molecular weights. | |
void | getMoleFractionsByName (compositionMap &x) const |
Get the mole fractions by name. | |
doublereal | moleFraction (int k) const |
Return the mole fraction of a single species. | |
doublereal | moleFraction (std::string name) const |
Return the mole fraction of a single species. | |
doublereal | massFraction (int k) const |
Return the mass fraction of a single species. | |
doublereal | massFraction (std::string name) const |
Return the mass fraction of a single species. | |
doublereal | chargeDensity () const |
Charge density [C/m^3]. | |
int | nDim () const |
Returns the number of spatial dimensions (1, 2, or 3). | |
void | setNDim (int ndim) |
Set the number of spatial dimensions (1, 2, or 3). | |
virtual void | freezeSpecies () |
Finished adding species, prepare to use them for calculation of mixture properties. | |
virtual bool | ready () const |
True if both elements and species have been frozen. | |
int | nSpecies () const |
Returns the number of species in the phase. | |
doublereal | molecularWeight (int k) const |
Molecular weight of species k . | |
doublereal | molarMass (int k) const |
Return the Molar mass of species k . | |
doublereal | charge (int k) const |
doublereal | nAtoms (int k, int m) const |
Number of atoms of element m in species k . | |
void | getAtoms (int k, double *atomArray) const |
Get a vector containing the atomic composition of species k. | |
void | stateMFChangeCalc (bool forceChange=false) |
Every time the mole fractions have changed, this routine will increment the stateMFNumber. | |
int | stateMFNumber () const |
Return the state number. | |
Information Methods | |
doublereal | refPressure () const |
Returns the reference pressure in Pa. | |
doublereal | minTemp (int k=-1) const |
Minimum temperature for which the thermodynamic data for the species or phase are valid. | |
doublereal | Hf298SS (const int k) const |
Report the 298 K Heat of Formation of the standard state of one species (J kmol-1). | |
virtual void | modifyOneHf298SS (const int k, const doublereal Hf298New) |
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1). | |
doublereal | maxTemp (int k=-1) const |
Maximum temperature for which the thermodynamic data for the species are valid. | |
Molar Thermodynamic Properties of the Solution | |
virtual doublereal | entropy_mole () const |
Molar entropy. Units: J/kmol/K. | |
virtual doublereal | gibbs_mole () const |
Molar Gibbs function. Units: J/kmol. | |
virtual doublereal | cp_mole () const |
Molar heat capacity at constant pressure. Units: J/kmol/K. | |
virtual doublereal | cv_mole () const |
Molar heat capacity at constant volume. Units: J/kmol/K. | |
virtual void | getdlnActCoeffdlnC (doublereal *dlnActCoeffdlnC) const |
Get the array of log concentration-like derivatives of the log activity coefficients. | |
Mechanical Properties | |
virtual doublereal | isothermalCompressibility () const |
Returns the isothermal compressibility. Units: 1/Pa. | |
virtual doublereal | thermalExpansionCoeff () const |
Return the volumetric thermal expansion coefficient. Units: 1/K. | |
virtual void | updateDensity () |
Electric Potential | |
void | setElectricPotential (doublereal v) |
Set the electric potential of this phase (V). | |
doublereal | electricPotential () const |
Returns the electric potential of this phase (V). | |
Activities, Standard States, and Activity Concentrations | |
virtual int | activityConvention () const |
This method returns the convention used in specification of the activities, of which there are currently two, molar- and molality-based conventions. | |
virtual int | standardStateConvention () const |
This method returns the convention used in specification of the standard state, of which there are currently two, temperature based, and variable pressure based. | |
virtual void | getUnitsStandardConc (double *uA, int k=0, int sizeUA=6) const |
Returns the units of the standard and generalized concentrations. | |
virtual void | getActivities (doublereal *a) const |
Get the array of non-dimensional activities at the current solution temperature, pressure, and solution concentration. | |
virtual void | getActivityCoefficients (doublereal *ac) const |
Get the array of non-dimensional molar-based activity coefficients at the current solution temperature, pressure, and solution concentration. | |
virtual void | getLNActivityCoefficients (doublereal *const lnac) const |
Partial Molar Properties of the Solution | |
virtual void | getChemPotentials_RT (doublereal *mu) const |
Get the array of non-dimensional species chemical potentials These are partial molar Gibbs free energies. | |
void | getElectrochemPotentials (doublereal *mu) const |
Get the species electrochemical potentials. | |
virtual void | getPartialMolarIntEnergies (doublereal *ubar) const |
Return an array of partial molar internal energies for the species in the mixture. | |
Properties of the Standard State of the Species in the Solution | |
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 and P of the solution. | |
Thermodynamic Values for the Species Reference States | |
virtual void | getGibbs_ref (doublereal *g) const |
Returns the vector of the gibbs function of the reference state at the current temperature of the solution and the reference pressure for the species. | |
virtual void | getIntEnergy_RT_ref (doublereal *urt) const |
Returns the vector of nondimensional internal Energies of the reference state at the current temperature of the solution and the reference pressure for each species. | |
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 void | setReferenceComposition (const doublereal *const x) |
Sets the reference composition. | |
virtual void | getReferenceComposition (doublereal *const x) const |
Gets the reference composition. | |
Specific Properties | |
doublereal | enthalpy_mass () const |
Specific enthalpy. | |
doublereal | intEnergy_mass () const |
Specific internal energy. | |
doublereal | entropy_mass () const |
Specific entropy. | |
doublereal | gibbs_mass () const |
Specific Gibbs function. | |
doublereal | cp_mass () const |
Specific heat at constant pressure. | |
doublereal | cv_mass () const |
Specific heat at constant volume. | |
Setting the State | |
void | setState_TPX (doublereal t, doublereal p, const doublereal *x) |
Set the temperature (K), pressure (Pa), and mole fractions. | |
void | setState_TPX (doublereal t, doublereal p, compositionMap &x) |
Set the temperature (K), pressure (Pa), and mole fractions. | |
void | setState_TPX (doublereal t, doublereal p, const std::string &x) |
Set the temperature (K), pressure (Pa), and mole fractions. | |
void | setState_TPY (doublereal t, doublereal p, const doublereal *y) |
Set the internally storred temperature (K), pressure (Pa), and mass fractions of the phase. | |
void | setState_TPY (doublereal t, doublereal p, compositionMap &y) |
Set the internally storred temperature (K), pressure (Pa), and mass fractions of the phase. | |
void | setState_TPY (doublereal t, doublereal p, const std::string &y) |
Set the internally storred temperature (K), pressure (Pa), and mass fractions of the phase. | |
void | setState_TP (doublereal t, doublereal p) |
Set the temperature (K) and pressure (Pa). | |
void | setState_PX (doublereal p, doublereal *x) |
Set the pressure (Pa) and mole fractions. | |
void | setState_PY (doublereal p, doublereal *y) |
Set the internally storred pressure (Pa) and mass fractions. | |
virtual void | setState_HP (doublereal h, doublereal p, doublereal tol=1.e-4) |
Set the internally storred specific enthalpy (J/kg) and pressure (Pa) of the phase. | |
virtual void | setState_UV (doublereal u, doublereal v, doublereal tol=1.e-4) |
Set the specific internal energy (J/kg) and specific volume (m^3/kg). | |
virtual void | setState_SP (doublereal s, doublereal p, doublereal tol=1.e-4) |
Set the specific entropy (J/kg/K) and pressure (Pa). | |
virtual void | setState_SV (doublereal s, doublereal v, doublereal tol=1.e-4) |
Set the specific entropy (J/kg/K) and specific volume (m^3/kg). | |
Chemical Equilibrium | |
virtual void | setToEquilState (const doublereal *lambda_RT) |
This method is used by the ChemEquil equilibrium solver. | |
void | setElementPotentials (const vector_fp &lambda) |
Stores the element potentials in the ThermoPhase object. | |
bool | getElementPotentials (doublereal *lambda) const |
Returns the element potentials storred in the ThermoPhase object. | |
Critical State Properties. | |
These methods are only implemented by some subclasses, and may be moved out of ThermoPhase at a later date. | |
virtual doublereal | critTemperature () const |
Critical temperature (K). | |
virtual doublereal | critPressure () const |
Critical pressure (Pa). | |
virtual doublereal | critDensity () const |
Critical density (kg/m3). | |
Saturation Properties. | |
virtual doublereal | satTemperature (doublereal p) const |
Return the saturation temperature given the pressure. | |
virtual doublereal | satPressure (doublereal t) const |
Return the saturation pressure given the temperature. | |
virtual doublereal | vaporFraction () const |
Return the fraction of vapor at the current conditions. | |
virtual void | setState_Tsat (doublereal t, doublereal x) |
Set the state to a saturated system at a particular temperature. | |
virtual void | setState_Psat (doublereal p, doublereal x) |
Set the state to a saturated system at a particular pressure. | |
Initialization Methods - For Internal Use (ThermoPhase) | |
void | saveSpeciesData (const int k, const XML_Node *const data) |
Store a reference pointer to the XML tree containing the species data for this phase. | |
const std::vector< const XML_Node * > & | speciesData () const |
Return a pointer to the vector of XML nodes containing the species data for this phase. | |
void | setSpeciesThermo (SpeciesThermo *spthermo) |
Install a species thermodynamic property manager. | |
SpeciesThermo & | speciesThermo () |
Return a changeable reference to the calculation manager for species reference-state thermodynamic properties. | |
virtual void | initThermoFile (std::string inputFile, std::string id) |
virtual void | initThermoXML (XML_Node &phaseNode, std::string id) |
Import and initialize a ThermoPhase object using an XML tree. | |
int | index () const |
void | setIndex (int m) |
virtual void | getParameters (int &n, doublereal *const c) const |
Get the equation of state parameters in a vector. | |
Element Information | |
std::string | elementName (int m) const |
Name of the element with index m. | |
int | elementIndex (std::string name) const |
Index of element named 'name'. | |
doublereal | atomicWeight (int m) const |
Atomic weight of element m. | |
doublereal | entropyElement298 (int m) const |
Entropy of the element in its standard state at 298 K and 1 bar. | |
int | atomicNumber (int m) const |
Atomic number of element m. | |
const std::vector< std::string > & | elementNames () const |
Return a read-only reference to the vector of element names. | |
const vector_fp & | atomicWeights () const |
Return a read-only reference to the vector of atomic weights. | |
int | nElements () const |
Number of elements. | |
Adding Elements and Species | |
void | addElement (const std::string &symbol, doublereal weight) |
Add an element. | |
void | addElement (const XML_Node &e) |
Add an element from an XML specification. | |
void | addUniqueElement (const std::string &symbol, doublereal weight, int atomicNumber=0, doublereal entropy298=ENTROPY298_UNKNOWN) |
Add an element, checking for uniqueness. | |
void | addUniqueElement (const XML_Node &e) |
Adde an element, checking for uniqueness. | |
void | addElementsFromXML (const XML_Node &phase) |
Add all elements referenced in an XML_Node tree. | |
void | freezeElements () |
Prohibit addition of more elements, and prepare to add species. | |
bool | elementsFrozen () |
True if freezeElements has been called. | |
Adding Species | |
void | addSpecies (const std::string &name, const doublereal *comp, doublereal charge=0.0, doublereal size=1.0) |
void | addUniqueSpecies (const std::string &name, const doublereal *comp, doublereal charge=0.0, doublereal size=1.0) |
Add a species to the phase, checking for uniqueness of the name. | |
int | speciesIndex (std::string name) const |
Index of species named 'name'. | |
std::string | speciesName (int k) const |
Name of the species with index k. | |
const std::vector< std::string > & | speciesNames () const |
Return a const referernce to the vector of species names. | |
doublereal | size (int k) const |
This routine returns the size of species k. | |
bool | speciesFrozen () |
True if freezeSpecies has been called. | |
void | clear () |
Remove all elements and species. | |
Composition | |
void | getMoleFractions (doublereal *const x) const |
Get the species mole fraction vector. | |
virtual void | setMoleFractions (const doublereal *const x) |
Set the mole fractions to the specified values, and then normalize them so that they sum to 1.0. | |
virtual void | setMoleFractions_NoNorm (const doublereal *const x) |
Set the mole fractions to the specified values without normalizing. | |
void | getMassFractions (doublereal *const y) const |
Get the species mass fractions. | |
virtual void | setMassFractions (const doublereal *const y) |
Set the mass fractions to the specified values, and then normalize them so that they sum to 1.0. | |
virtual void | setMassFractions_NoNorm (const doublereal *const y) |
Set the mass fractions to the specified values without normalizing. | |
void | getConcentrations (doublereal *const c) const |
Get the species concentrations (kmol/m^3). | |
doublereal | concentration (const int k) const |
Concentration of species k. | |
virtual void | setConcentrations (const doublereal *const conc) |
Set the concentrations to the specified values within the phase. | |
const doublereal * | massFractions () const |
Returns a read-only pointer to the start of the massFraction array. | |
const doublereal * | moleFractdivMMW () const |
Returns a read-only pointer to the start of the moleFraction/MW array. | |
Mean Properties | |
doublereal | mean_X (const doublereal *const Q) const |
Evaluate the mole-fraction-weighted mean of Q:
| |
doublereal | mean_Y (const doublereal *const Q) const |
Evaluate the mass-fraction-weighted mean of Q:
| |
doublereal | meanMolecularWeight () const |
The mean molecular weight. | |
doublereal | sum_xlogx () const |
Evaluate . | |
doublereal | sum_xlogQ (doublereal *const Q) const |
Evaluate . | |
Thermodynamic Properties | |
Class State only stores enough thermodynamic data to specify the state. In addition to composition information, it stores the temperature and mass density. | |
doublereal | temperature () const |
Temperature (K). | |
virtual doublereal | density () const |
Density (kg/m^3). | |
doublereal | molarDensity () const |
Molar density (kmol/m^3). | |
virtual void | setDensity (const doublereal density) |
Set the internally storred density (kg/m^3) of the phase. | |
virtual void | setMolarDensity (const doublereal molarDensity) |
Set the internally storred molar density (kmol/m^3) of the phase. | |
virtual void | setTemperature (const doublereal temp) |
Set the temperature (K). | |
Protected Member Functions | |
void | init (const array_fp &mw) |
void | setMolecularWeight (const int k, const double mw) |
Set the molecular weight of a single species to a given value. | |
Protected Attributes | |
doublereal | m_n0 |
Surface site density (kmol m-2). | |
doublereal | m_logn0 |
log of the surface site density | |
doublereal | m_tmin |
Minimum temperature for valid species standard state thermo props. | |
doublereal | m_tmax |
Maximum temperature for valid species standard state thermo props. | |
doublereal | m_press |
Current value of the pressure (Pa). | |
doublereal | m_tlast |
Current value of the temperature (Kelvin). | |
array_fp | m_h0 |
Temporary storage for the reference state enthalpies. | |
array_fp | m_s0 |
Temporary storage for the reference state entropies. | |
array_fp | m_cp0 |
Temporary storage for the reference state heat capacities. | |
array_fp | m_mu0 |
Temporary storage for the reference state gibbs energies. | |
array_fp | m_work |
Temporary work array. | |
array_fp | m_pe |
Potential energy of each species in the surface phase. | |
array_fp | m_logsize |
vector storring the log of the size of each species. | |
SpeciesThermo * | m_spthermo |
Pointer to the calculation manager for species reference-state thermodynamic properties. | |
std::vector< const XML_Node * > | m_speciesData |
Vector of pointers to the species databases. | |
int | m_index |
Index number of the phase. | |
doublereal | m_phi |
Storred value of the electric potential for this phase. | |
vector_fp | m_lambdaRRT |
Vector of element potentials. | |
bool | m_hasElementPotentials |
Boolean indicating whether there is a valid set of saved element potentials for this phase. | |
bool | m_chargeNeutralityNecessary |
Boolean indicating whether a charge neutrality condition is a necessity. | |
int | m_ssConvention |
Contains the standard state convention. | |
std::vector< doublereal > | xMol_Ref |
Reference Mole Fraction Composition. | |
int | m_kk |
m_kk = Number of species in the phase. | |
int | m_ndim |
m_ndim is the dimensionality of the phase. | |
vector_fp | m_weight |
Vector of molecular weights of the species. | |
bool | m_speciesFrozen |
Boolean indicating whether the number of species has been frozen. | |
Elements * | m_Elements |
std::vector< std::string > | m_speciesNames |
Vector of the species names. | |
vector_fp | m_speciesComp |
Atomic composition of the species. | |
vector_fp | m_speciesCharge |
m_speciesCharge: Vector of species charges length = m_kk | |
vector_fp | m_speciesSize |
m_speciesSize(): Vector of species sizes. | |
Private Member Functions | |
void | _updateThermo (bool force=false) const |
Update the species reference state thermodynamic functions. |
A simple thermoydnamics model for a surface phase, assuming an ideal solution model.
The surface consists of a grid of equivalent sites. Surface species may be defined to occupy one or more sites. The surface species are assumed to be independent, and thus the species form an ideal solution.
The density of surface sites is given by the variable , which has SI units of kmol m-2.
Specification of Species Standard State Properties
It is assumed that the reference state thermodynamics may be obtained by a pointer to a populated species thermodynamic property manager class (see ThermoPhase::m_spthermo). How to relate pressure changes to the reference state thermodynamics is resolved at this level.
Pressure is defined as an independent variable in this phase. However, it has no effect on any quantities, as the molar concentration is a constant.
Therefore, The standard state internal energy for species k is equal to the enthalpy for species k.
Also, the standard state chemical potentials, entropy, and heat capacities are independent of pressure. The standard state gibbs free energy is obtained from the enthalpy and entropy functions.
Specification of Solution Thermodynamic Properties
The activity of species defined in the phase is given by
The chemical potential for species k is equal to
Pressure is defined as an independent variable in this phase. However, it has no effect on any quantities, as the molar concentration is a constant.
The internal energy for species k is equal to the enthalpy for species k
The entropy for the phase is given by the following relation, which is independent of the pressure:
Application within Kinetics Managers
The activity concentration,, used by the kinetics manager, is equal to the actual concentration, , and is given by the following expression.
The standard concentration for species k is:
Instantiation of the Class
The constructor for this phase is located in the default ThermoFactory for Cantera. A new SurfPhase may be created by the following code snippet:
XML_Node *xc = get_XML_File("diamond.xml"); XML_Node * const xs = xc->findNameID("phase", "diamond_100"); ThermoPhase *diamond100TP_tp = newPhase(*xs); SurfPhase *diamond100TP = dynamic_cast <SurfPhase *>(diamond100TP_tp);
or by the following constructor:
XML_Node *xc = get_XML_File("diamond.xml"); XML_Node * const xs = xc->findNameID("phase", "diamond_100"); SurfPhase *diamond100TP = new SurfPhase(*xs);
XML Example
An example of an XML Element named phase setting up a SurfPhase object named diamond_100 is given below.
* <phase dim="2" id="diamond_100"> * <elementArray datasrc="elements.xml">H C</elementArray> * <speciesArray datasrc="#species_data">c6HH c6H* c6*H c6** c6HM c6HM* c6*M c6B </speciesArray> * <reactionArray datasrc="#reaction_data"/> * <state> * <temperature units="K">1200.0</temperature> * <coverages>c6H*:0.1, c6HH:0.9</coverages> * </state> * <thermo model="Surface"> * <site_density units="mol/cm2">3e-09</site_density> * </thermo> * <kinetics model="Interface"/> * <transport model="None"/> * <phaseArray> * gas_phase diamond_bulk * </phaseArray> * </phase> * *
The model attribute, "Surface", on the thermo element identifies the phase as being a SurfPhase object.
Definition at line 149 of file SurfPhase.h.
SurfPhase | ( | doublereal | n0 = 0.0 |
) |
Constructor.
n0 | Site Density of the Surface Phase Units: kmol m-2. |
Definition at line 36 of file SurfPhase.cpp.
References SurfPhase::m_logn0, and Phase::setNDim().
Referenced by SurfPhase::duplMyselfAsThermoPhase().
SurfPhase | ( | std::string | infile, | |
std::string | id | |||
) |
Construct and initialize a SurfPhase ThermoPhase object directly from an asci input file.
infile | name of the input file | |
id | name of the phase id in the file. If this is blank, the first phase in the file is used. |
Definition at line 49 of file SurfPhase.cpp.
References XML_Node::child(), Cantera::get_XML_File(), Cantera::get_XML_NameID(), and Cantera::importPhase().
Construct and initialize a SurfPhase ThermoPhase object directly from an XML database.
xmlphase | XML node pointing to a SurfPhase description |
Definition at line 76 of file SurfPhase.cpp.
References XML_Node::child(), and Cantera::importPhase().
Copy Constructor.
Copy constructor for the object. Constructed object will be a clone of this object, but will also own all of its data. This is a wrapper around the assignment operator
right | Object to be copied. |
Definition at line 103 of file SurfPhase.cpp.
References SurfPhase::operator=().
~SurfPhase | ( | ) | [virtual] |
Destructor.
Definition at line 163 of file SurfPhase.cpp.
doublereal _RT | ( | ) | const [inline, inherited] |
Return the Gas Constant multiplied by the current temperature.
The units are Joules kmol-1
Definition at line 1526 of file ThermoPhase.h.
References Cantera::GasConstant, and State::temperature().
Referenced by VPStandardStateTP::getChemPotentials_RT(), IdealSolnGasVPSS::getChemPotentials_RT(), WaterSSTP::getGibbs_ref(), IdealGasPhase::getGibbs_ref(), IdealSolidSolnPhase::getGibbs_RT(), IdealMolalSoln::getPartialMolarEnthalpies(), IdealSolidSolnPhase::getPureGibbs(), IdealGasPhase::getPureGibbs(), ConstDensityThermo::getPureGibbs(), VPStandardStateTP::getStandardChemPotentials(), IdealGasPhase::getStandardChemPotentials(), and IdealGasPhase::getStandardVolumes_ref().
void _updateThermo | ( | bool | force = false |
) | const [private] |
Update the species reference state thermodynamic functions.
The polynomials for the standard state functions are only reevalulated if the temperature has changed.
force | Boolean, which if true, forces a reevalulation of the thermo polynomials. default = false. |
Definition at line 425 of file SurfPhase.cpp.
References DATA_PTR, Cantera::GasConstant, SurfPhase::m_cp0, SurfPhase::m_h0, Phase::m_kk, SurfPhase::m_mu0, SurfPhase::m_s0, ThermoPhase::m_spthermo, SurfPhase::m_tlast, State::temperature(), and SpeciesThermo::update().
Referenced by SurfPhase::enthalpy_mole(), SurfPhase::getChemPotentials(), SurfPhase::getCp_R(), SurfPhase::getEnthalpy_RT(), SurfPhase::getEntropy_R(), SurfPhase::getGibbs_RT(), SurfPhase::getStandardChemPotentials(), SurfPhase::getStandardVolumes(), and SurfPhase::setPotentialEnergy().
int activityConvention | ( | ) | const [virtual, inherited] |
This method returns the convention used in specification of the activities, of which there are currently two, molar- and molality-based conventions.
Currently, there are two activity conventions:
Reimplemented in MolalityVPSSTP.
Definition at line 150 of file ThermoPhase.cpp.
References Cantera::cAC_CONVENTION_MOLAR.
Referenced by vcs_MultiPhaseEquil::reportCSV().
void addElement | ( | const XML_Node & | e | ) | [inherited] |
Add an element from an XML specification.
e | Reference to the XML_Node where the element is described. |
Definition at line 138 of file Constituents.cpp.
References Elements::addElement(), and Constituents::m_Elements.
void addElement | ( | const std::string & | symbol, | |
doublereal | weight | |||
) | [inherited] |
Add an element.
symbol | Atomic symbol std::string. | |
weight | Atomic mass in amu. |
Definition at line 132 of file Constituents.cpp.
References Elements::addElement(), and Constituents::m_Elements.
void addElementsFromXML | ( | const XML_Node & | phase | ) | [inherited] |
Add all elements referenced in an XML_Node tree.
phase | Reference to the top XML_Node of a phase |
Definition at line 169 of file Constituents.cpp.
References Elements::addElementsFromXML(), and Constituents::m_Elements.
void addUniqueElement | ( | const XML_Node & | e | ) | [inherited] |
Adde an element, checking for uniqueness.
The uniqueness is checked by comparing the string symbol. If not unique, nothing is done.
e | Reference to the XML_Node where the element is described. |
Definition at line 164 of file Constituents.cpp.
References Elements::addUniqueElement(), and Constituents::m_Elements.
void addUniqueElement | ( | const std::string & | symbol, | |
doublereal | weight, | |||
int | atomicNumber = 0 , |
|||
doublereal | entropy298 = ENTROPY298_UNKNOWN | |||
) | [inherited] |
Add an element, checking for uniqueness.
The uniqueness is checked by comparing the string symbol. If not unique, nothing is done.
symbol | String symbol of the element | |
weight | Atomic weight of the element (kg kmol-1). | |
atomicNumber | Atomic number of the element (unitless) | |
entropy298 | Entropy of the element at 298 K and 1 bar in its most stable form. The default is the value ENTROPY298_UNKNOWN, which is interpreted as an unknown, and if used will cause Cantera to throw an error. |
Definition at line 157 of file Constituents.cpp.
References Elements::addUniqueElement(), and Constituents::m_Elements.
void addUniqueSpecies | ( | const std::string & | name, | |
const doublereal * | comp, | |||
doublereal | charge = 0.0 , |
|||
doublereal | size = 1.0 | |||
) | [inherited] |
Add a species to the phase, checking for uniqueness of the name.
This routine checks for uniqueness of the string name. It only adds the species if it is unique.
name | String name of the species | |
comp | Double vector containing the elemental composition of the species. | |
charge | Charge of the species. Defaults to zero. | |
size | Size of the species (meters). Defaults to 1 meter. |
Definition at line 357 of file Constituents.cpp.
References Constituents::m_Elements, Constituents::m_speciesCharge, Constituents::m_speciesComp, Constituents::m_speciesNames, Constituents::m_speciesSize, and Elements::nElements().
int atomicNumber | ( | int | m | ) | const [inherited] |
Atomic number of element m.
m | Element index |
Definition at line 117 of file Constituents.cpp.
References Elements::atomicNumber(), and Constituents::m_Elements.
Referenced by MultiPhase::addPhase().
doublereal atomicWeight | ( | int | m | ) | const [inherited] |
Atomic weight of element m.
m | Element index |
Definition at line 95 of file Constituents.cpp.
References Elements::atomicWeight(), and Constituents::m_Elements.
Referenced by WaterSSTP::initThermoXML().
const vector_fp & atomicWeights | ( | ) | const [inherited] |
Return a read-only reference to the vector of atomic weights.
Definition at line 109 of file Constituents.cpp.
References Elements::atomicWeights(), and Constituents::m_Elements.
doublereal charge | ( | int | k | ) | const [inherited] |
Electrical charge of one species k molecule, divided by the magnitude of the electron charge ( Coulombs). Dimensionless.
k | species index |
Definition at line 266 of file Constituents.cpp.
References Constituents::m_speciesCharge.
Referenced by Phase::chargeDensity(), PDSS_HKFT::constructPDSSXML(), ThermoPhase::getElectrochemPotentials(), MolalityVPSSTP::getElectrochemPotentials(), PDSS_HKFT::initThermo(), DebyeHuckel::initThermoXML(), HMWSoln::readXMLBinarySalt(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), and MolalityVPSSTP::setMolalitiesByName().
doublereal chargeDensity | ( | ) | const [inherited] |
Charge density [C/m^3].
Definition at line 334 of file Phase.cpp.
References Constituents::charge(), Phase::moleFraction(), and Constituents::nSpecies().
bool chargeNeutralityNecessary | ( | ) | const [inline, inherited] |
Returns the chargeNeutralityNecessity boolean.
Some phases must have zero net charge in order for their thermodynamics functions to be valid. If this is so, then the value returned from this function is true. If this is not the case, then this is false. Now, ideal gases have this parameter set to false, while solution with molality-based activity coefficients have this parameter set to true.
Definition at line 2066 of file ThermoPhase.h.
References ThermoPhase::m_chargeNeutralityNecessary.
void clear | ( | ) | [inherited] |
Remove all elements and species.
doublereal concentration | ( | const int | k | ) | const [inherited] |
Concentration of species k.
If k is outside the valid range, an exception will be thrown.
k | Index of species |
Definition at line 134 of file State.cpp.
References State::m_dens, State::m_kk, State::m_rmolwts, and State::m_y.
doublereal cp_mass | ( | ) | const [inline, inherited] |
Specific heat at constant pressure.
Units: J/kg/K.
Definition at line 1510 of file ThermoPhase.h.
References ThermoPhase::cp_mole(), and State::meanMolecularWeight().
Referenced by ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), SingleSpeciesTP::setState_HP(), ThermoPhase::setState_HPorUV(), SingleSpeciesTP::setState_SP(), and ThermoPhase::setState_SPorSV().
virtual doublereal cp_mole | ( | ) | const [inline, virtual, inherited] |
Molar heat capacity at constant pressure. Units: J/kmol/K.
Reimplemented in ConstDensityThermo, DebyeHuckel, HMWSoln, IdealGasPhase, IdealMolalSoln, IdealSolidSolnPhase, IdealSolnGasVPSS, LatticePhase, PureFluidPhase, and SingleSpeciesTP.
Definition at line 876 of file ThermoPhase.h.
References ThermoPhase::err().
Referenced by ThermoPhase::cp_mass(), ThermoPhase::report(), and MolalityVPSSTP::report().
virtual doublereal critDensity | ( | ) | const [inline, virtual, inherited] |
Critical density (kg/m3).
Reimplemented in HMWSoln, IdealMolalSoln, PureFluidPhase, and WaterSSTP.
Definition at line 1791 of file ThermoPhase.h.
References ThermoPhase::err().
virtual doublereal critPressure | ( | ) | const [inline, virtual, inherited] |
Critical pressure (Pa).
Reimplemented in HMWSoln, IdealMolalSoln, PureFluidPhase, and WaterSSTP.
Definition at line 1786 of file ThermoPhase.h.
References ThermoPhase::err().
virtual doublereal critTemperature | ( | ) | const [inline, virtual, inherited] |
Critical temperature (K).
Reimplemented in HMWSoln, IdealMolalSoln, PureFluidPhase, and WaterSSTP.
Definition at line 1781 of file ThermoPhase.h.
References ThermoPhase::err().
doublereal cv_mass | ( | ) | const [inline, inherited] |
Specific heat at constant volume.
Units: J/kg/K.
Definition at line 1517 of file ThermoPhase.h.
References ThermoPhase::cv_mole(), and State::meanMolecularWeight().
Referenced by ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::setState_HPorUV(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), and SingleSpeciesTP::setState_UV().
virtual doublereal cv_mole | ( | ) | const [inline, virtual, inherited] |
Molar heat capacity at constant volume. Units: J/kmol/K.
Reimplemented in ConstDensityThermo, DebyeHuckel, HMWSoln, IdealGasPhase, IdealMolalSoln, IdealSolidSolnPhase, IdealSolnGasVPSS, LatticePhase, PureFluidPhase, SingleSpeciesTP, and WaterSSTP.
Definition at line 881 of file ThermoPhase.h.
References ThermoPhase::err().
Referenced by ThermoPhase::cv_mass(), ThermoPhase::report(), and MolalityVPSSTP::report().
virtual doublereal density | ( | ) | const [inline, virtual, inherited] |
Density (kg/m^3).
Reimplemented in HMWSoln.
Definition at line 314 of file State.h.
References State::m_dens.
Referenced by SingleSpeciesTP::cv_mole(), WaterSSTP::dthermalExpansionCoeffdT(), WaterSSTP::getCp_R_ref(), WaterSSTP::getEnthalpy_RT_ref(), WaterSSTP::getEntropy_R_ref(), WaterSSTP::getGibbs_RT_ref(), StoichSubstanceSSTP::getParameters(), MineralEQ3::getParameters(), MetalSHEelectrons::getParameters(), ConstDensityThermo::getParameters(), SingleSpeciesTP::getPartialMolarVolumes(), SingleSpeciesTP::getStandardVolumes(), WaterSSTP::getStandardVolumes_ref(), State::molarDensity(), ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), WaterSSTP::satPressure(), Phase::saveState(), IdealSolidSolnPhase::setDensity(), IdealMolalSoln::setDensity(), DebyeHuckel::setDensity(), WaterSSTP::setPressure(), WaterSSTP::setTemperature(), and WaterSSTP::vaporFraction().
ThermoPhase * duplMyselfAsThermoPhase | ( | ) | const [virtual] |
Duplicator from the ThermoPhase parent class.
Reimplemented from ThermoPhase.
Reimplemented in EdgePhase.
Definition at line 151 of file SurfPhase.cpp.
References SurfPhase::SurfPhase().
doublereal electricPotential | ( | ) | const [inline, inherited] |
Returns the electric potential of this phase (V).
Units are Volts (which are Joules/coulomb)
Reimplemented in IdealMolalSoln.
Definition at line 1003 of file ThermoPhase.h.
References ThermoPhase::m_phi.
Referenced by ThermoPhase::getElectrochemPotentials(), MolalityVPSSTP::getElectrochemPotentials(), ThermoPhase::report(), PureFluidPhase::report(), and MolalityVPSSTP::report().
int elementIndex | ( | std::string | name | ) | const [inherited] |
Index of element named 'name'.
The index is an integer assigned to each element in the order it was added, beginning with 0 for the first element.
name | name of the element |
If 'name' is not the name of an element in the set, then the value -1 is returned.
Definition at line 197 of file Constituents.cpp.
References Elements::elementIndex(), and Constituents::m_Elements.
Referenced by MultiPhase::init(), WaterSSTP::initThermoXML(), and PDSS_HKFT::LookupGe().
string elementName | ( | int | m | ) | const [inherited] |
Name of the element with index m.
This is a passthrough routine to the Element object.
m | Element index. |
If | m < 0 or m >= nElements(), the exception, ElementRangeError, is thrown. |
Definition at line 209 of file Constituents.cpp.
References Elements::elementName(), and Constituents::m_Elements.
Referenced by MultiPhase::addPhase(), PDSS_HKFT::convertDGFormation(), and MolalityVPSSTP::findCLMIndex().
const vector< string > & elementNames | ( | ) | const [inherited] |
Return a read-only reference to the vector of element names.
Definition at line 229 of file Constituents.cpp.
References Elements::elementNames(), and Constituents::m_Elements.
bool elementsFrozen | ( | ) | [inherited] |
True if freezeElements has been called.
Definition at line 183 of file Constituents.cpp.
References Elements::elementsFrozen(), and Constituents::m_Elements.
doublereal enthalpy_mass | ( | ) | const [inline, inherited] |
Specific enthalpy.
Units: J/kg.
Definition at line 1482 of file ThermoPhase.h.
References ThermoPhase::enthalpy_mole(), and State::meanMolecularWeight().
Referenced by ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), SingleSpeciesTP::setState_HP(), ThermoPhase::setState_HPorUV(), and ThermoPhase::setState_SPorSV().
doublereal enthalpy_mole | ( | ) | const [virtual] |
Return the Molar Enthalpy. Units: J/kmol.
For an ideal solution,
and is a function only of temperature. The standard-state pure-species Enthalpies are computed by the species thermodynamic property manager.
Reimplemented from ThermoPhase.
Definition at line 157 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), DATA_PTR, SurfPhase::m_h0, SurfPhase::m_n0, and State::mean_X().
Referenced by SurfPhase::intEnergy_mole().
doublereal entropy_mass | ( | ) | const [inline, inherited] |
Specific entropy.
Units: J/kg/K.
Definition at line 1496 of file ThermoPhase.h.
References ThermoPhase::entropy_mole(), and State::meanMolecularWeight().
Referenced by ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), SingleSpeciesTP::setState_SP(), ThermoPhase::setState_SPorSV(), and SingleSpeciesTP::setState_SV().
virtual doublereal entropy_mole | ( | ) | const [inline, virtual, inherited] |
Molar entropy. Units: J/kmol/K.
Reimplemented in ConstDensityThermo, DebyeHuckel, HMWSoln, IdealGasPhase, IdealMolalSoln, IdealSolidSolnPhase, IdealSolnGasVPSS, LatticePhase, PureFluidPhase, and SingleSpeciesTP.
Definition at line 866 of file ThermoPhase.h.
References ThermoPhase::err().
Referenced by ThermoPhase::entropy_mass(), ThermoPhase::report(), and MolalityVPSSTP::report().
doublereal entropyElement298 | ( | int | m | ) | const [inherited] |
Entropy of the element in its standard state at 298 K and 1 bar.
m | Element index |
Definition at line 100 of file Constituents.cpp.
References Elements::entropyElement298(), and Constituents::m_Elements.
Referenced by PDSS_HKFT::LookupGe().
virtual int eosType | ( | ) | const [inline, virtual] |
Equation of state type flag.
Redefine this to return cSurf, listed in mix_defs.h.
Reimplemented from ThermoPhase.
Reimplemented in EdgePhase.
Definition at line 216 of file SurfPhase.h.
void freezeElements | ( | ) | [inherited] |
Prohibit addition of more elements, and prepare to add species.
Definition at line 176 of file Constituents.cpp.
References Elements::freezeElements(), and Constituents::m_Elements.
void freezeSpecies | ( | ) | [virtual, inherited] |
Finished adding species, prepare to use them for calculation of mixture properties.
Reimplemented from Constituents.
Definition at line 348 of file Phase.cpp.
References State::init(), Phase::m_data, Phase::m_kk, Constituents::molecularWeights(), and Constituents::nSpecies().
void getActivities | ( | doublereal * | a | ) | const [virtual, inherited] |
Get the array of non-dimensional activities at the current solution temperature, pressure, and solution concentration.
Note, for molality based formulations, this returns the molality based activities.
We resolve this function at this level by calling on the activityConcentration function. However, derived classes may want to override this default implementation.
a | Output vector of activities. Length: m_kk. |
Reimplemented in DebyeHuckel, HMWSoln, IdealMolalSoln, MolalityVPSSTP, and SingleSpeciesTP.
Definition at line 162 of file ThermoPhase.cpp.
References ThermoPhase::getActivityConcentrations(), Constituents::nSpecies(), and ThermoPhase::standardConcentration().
Referenced by vcs_MultiPhaseEquil::reportCSV().
virtual void getActivityCoefficients | ( | doublereal * | ac | ) | const [inline, virtual, inherited] |
Get the array of non-dimensional molar-based activity coefficients at the current solution temperature, pressure, and solution concentration.
ac | Output vector of activity coefficients. Length: m_kk. |
Reimplemented in ConstDensityThermo, IdealGasPhase, IdealSolidSolnPhase, IdealSolnGasVPSS, LatticePhase, MolalityVPSSTP, and SingleSpeciesTP.
Definition at line 1154 of file ThermoPhase.h.
References ThermoPhase::err(), and Phase::m_kk.
Referenced by vcs_MultiPhaseEquil::reportCSV().
void getActivityConcentrations | ( | doublereal * | c | ) | const [virtual] |
Return a vector of activity concentrations for each species.
For this phase the activity concentrations,, are defined to be equal to the actual concentrations, . Activity concentrations are
where is the surface site fraction for species k, is the surface site density for the phase, and is the surface size of species k.
that are defined such that where is a standard concentration defined below and are activities used in the thermodynamic functions. These activity concentrations are used by kinetics manager classes to compute the forward and reverse rates of elementary reactions. Note that they may or may not have units of concentration --- they might be partial pressures, mole fractions, or surface coverages,
c | vector of activity concentration (kmol m-2). |
Reimplemented from ThermoPhase.
Definition at line 232 of file SurfPhase.cpp.
References State::getConcentrations().
Referenced by SurfPhase::getChemPotentials().
void getAtoms | ( | int | k, | |
double * | atomArray | |||
) | const [inherited] |
Get a vector containing the atomic composition of species k.
k | species index | |
atomArray | vector containing the atomic number in the species. Length: m_mm |
Definition at line 480 of file Constituents.cpp.
References Constituents::m_Elements, Constituents::m_speciesComp, and Elements::nElements().
void getChemPotentials | ( | doublereal * | mu | ) | const [virtual] |
Get the species chemical potentials. Units: J/kmol.
This function returns a vector of chemical potentials of the species in solution at the current temperature, pressure and mole fraction of the solution.
mu | Output vector of species chemical potentials. Length: m_kk. Units: J/kmol |
Reimplemented from ThermoPhase.
Definition at line 221 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), DATA_PTR, Cantera::GasConstant, SurfPhase::getActivityConcentrations(), SurfPhase::logStandardConc(), Phase::m_kk, SurfPhase::m_mu0, SurfPhase::m_work, and State::temperature().
virtual void getChemPotentials_RT | ( | doublereal * | mu | ) | const [inline, virtual, inherited] |
Get the array of non-dimensional species chemical potentials These are partial molar Gibbs free energies.
. Units: unitless
mu | Output vector of dimensionless chemical potentials. Length: m_kk. |
Reimplemented in IdealSolidSolnPhase, IdealSolnGasVPSS, SingleSpeciesTP, and VPStandardStateTP.
Definition at line 1177 of file ThermoPhase.h.
References ThermoPhase::err().
void getConcentrations | ( | doublereal *const | c | ) | const [inherited] |
Get the species concentrations (kmol/m^3).
c | On return, c contains the concentrations for all species. Array c must have a length greater than or equal to the number of species. |
Definition at line 219 of file State.cpp.
References State::m_dens, State::m_ym, and Cantera::scale().
Referenced by ConstDensityThermo::getActivityCoefficients(), SurfPhase::getActivityConcentrations(), IdealSolnGasVPSS::getActivityConcentrations(), IdealGasPhase::getActivityConcentrations(), and SurfPhase::getCoverages().
void getCoverages | ( | doublereal * | theta | ) | const |
Return a vector of surface coverages.
Get the coverages.
theta | Array theta must be at least as long as the number of species. |
Definition at line 390 of file SurfPhase.cpp.
References State::getConcentrations(), Phase::m_kk, SurfPhase::m_n0, and Constituents::size().
void getCp_R | ( | doublereal * | cpr | ) | const [virtual] |
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the current T and P of the solution.
cpr | Output vector of nondimensional standard state heat capacities Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 277 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), Cantera::GasConstant, SurfPhase::m_cp0, and Cantera::scale().
Referenced by SurfPhase::getCp_R_ref(), and SurfPhase::getPartialMolarCp().
void getCp_R_ref | ( | doublereal * | cprt | ) | const [virtual] |
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the current temperature of the solution and reference pressure for each species.
cprt | Output vector of nondimensional reference state heat capacities at constant pressure for the species. Length: m_kk |
Reimplemented from ThermoPhase.
Definition at line 302 of file SurfPhase.cpp.
References SurfPhase::getCp_R().
virtual void getdlnActCoeffdlnC | ( | doublereal * | dlnActCoeffdlnC | ) | const [inline, virtual, inherited] |
Get the array of log concentration-like derivatives of the log activity coefficients.
This function is a virtual method. For ideal mixtures (unity activity coefficients), this can return zero. Implementations should take the derivative of the logarithm of the activity coefficient with respect to the logarithm of the concentration-like variable (i.e. mole fraction, molality, etc.) that represents the standard state. This quantity is to be used in conjunction with derivatives of that concentration-like variable when the derivative of the chemical potential is taken.
units = dimensionless
dlnActCoeffdlnC | Output vector of derivatives of the log Activity Coefficients. length = m_kk |
Reimplemented in VPStandardStateTP.
Definition at line 904 of file ThermoPhase.h.
References ThermoPhase::err().
void getElectrochemPotentials | ( | doublereal * | mu | ) | const [inline, inherited] |
Get the species electrochemical potentials.
These are partial molar quantities. This method adds a term to each chemical potential. The electrochemical potential of species k in a phase p, , is related to the chemical potential via the following equation,
mu | Output vector of species electrochemical potentials. Length: m_kk. Units: J/kmol |
Reimplemented in MolalityVPSSTP, and SingleSpeciesTP.
Definition at line 1210 of file ThermoPhase.h.
References Constituents::charge(), ThermoPhase::electricPotential(), ThermoPhase::getChemPotentials(), and Phase::m_kk.
bool getElementPotentials | ( | doublereal * | lambda | ) | const [inherited] |
Returns the element potentials storred in the ThermoPhase object.
Returns the storred element potentials. The element potentials are retrieved from their storred dimensionless forms by multiplying by RT.
lambda | Output vector containing the element potentials. Length = nElements. Units are Joules/kmol. |
Definition at line 1015 of file ThermoPhase.cpp.
References Cantera::GasConstant, ThermoPhase::m_hasElementPotentials, ThermoPhase::m_lambdaRRT, Constituents::nElements(), and State::temperature().
void getEnthalpy_RT | ( | doublereal * | hrt | ) | const [virtual] |
Get the nondimensional Enthalpy functions for the species standard states at their standard states at the current T and P of the solution.
hrt | Output vector of nondimensional standard state enthalpies. Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 265 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), Cantera::GasConstant, SurfPhase::m_h0, Cantera::scale(), and State::temperature().
Referenced by SurfPhase::getEnthalpy_RT_ref(), and SurfPhase::getPartialMolarEnthalpies().
void getEnthalpy_RT_ref | ( | doublereal * | hrt | ) | const [virtual] |
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of the solution and the reference pressure for the species.
hrt | Output vector of nondimensional standard state enthalpies. Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 294 of file SurfPhase.cpp.
References SurfPhase::getEnthalpy_RT().
void getEntropy_R | ( | doublereal * | sr | ) | const [virtual] |
Get the array of nondimensional Entropy functions for the species standard states at the current T and P of the solution.
sr | Output vector of nondimensional standard state entropies. Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 271 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), Cantera::GasConstant, SurfPhase::m_s0, and Cantera::scale().
Referenced by SurfPhase::getEntropy_R_ref(), and SurfPhase::getPartialMolarEntropies().
void getEntropy_R_ref | ( | doublereal * | er | ) | const [virtual] |
Returns the vector of nondimensional entropies of the reference state at the current temperature of the solution and the reference pressure for each species.
er | Output vector containing the nondimensional reference state entropies. Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 298 of file SurfPhase.cpp.
References SurfPhase::getEntropy_R().
virtual void getGibbs_ref | ( | doublereal * | g | ) | const [inline, virtual, inherited] |
Returns the vector of the gibbs function of the reference state at the current temperature of the solution and the reference pressure for the species.
units = J/kmol
g | Output vector containing the reference state Gibbs Free energies. Length: m_kk. Units: J/kmol. |
Reimplemented in IdealGasPhase, IdealSolidSolnPhase, SingleSpeciesTP, VPStandardStateTP, and WaterSSTP.
Definition at line 1401 of file ThermoPhase.h.
References ThermoPhase::err().
void getGibbs_RT | ( | doublereal * | grt | ) | const [virtual] |
Get the nondimensional Gibbs functions for the species in their standard states at the current T and P of the solution.
grt | Output vector of nondimensional standard state gibbs free energies Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 258 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), Cantera::GasConstant, SurfPhase::m_mu0, Cantera::scale(), and State::temperature().
Referenced by SurfPhase::getGibbs_RT_ref().
void getGibbs_RT_ref | ( | doublereal * | grt | ) | const [virtual] |
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temperature of the solution and the reference pressure for the species.
grt | Output vector containing the nondimensional reference state Gibbs Free energies. Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 290 of file SurfPhase.cpp.
References SurfPhase::getGibbs_RT().
virtual void getIntEnergy_RT | ( | doublereal * | urt | ) | const [inline, virtual, inherited] |
Returns the vector of nondimensional Internal Energies of the standard state species at the current T and P of the solution.
urt | output vector of nondimensional standard state internal energies of the species. Length: m_kk. |
Reimplemented in IdealGasPhase, IdealSolidSolnPhase, MetalSHEelectrons, MineralEQ3, StoichSubstanceSSTP, VPStandardStateTP, and WaterSSTP.
Definition at line 1334 of file ThermoPhase.h.
References ThermoPhase::err().
Referenced by SingleSpeciesTP::getPartialMolarIntEnergies().
virtual void getIntEnergy_RT_ref | ( | doublereal * | urt | ) | const [inline, virtual, inherited] |
Returns the vector of nondimensional internal Energies of the reference state at the current temperature of the solution and the reference pressure for each species.
urt | Output vector of nondimensional reference state internal energies of the species. Length: m_kk |
Reimplemented in IdealGasPhase, IdealSolidSolnPhase, MetalSHEelectrons, MineralEQ3, and StoichSubstanceSSTP.
Definition at line 1424 of file ThermoPhase.h.
References ThermoPhase::err().
void getMassFractions | ( | doublereal *const | y | ) | const [inherited] |
Get the species mass fractions.
y | On return, y contains the mass fractions. Array y must have a length greater than or equal to the number of species. | |
y | Output vector of mass fractions. Length is m_kk. |
Definition at line 235 of file State.cpp.
References State::m_y.
Referenced by ThermoPhase::report(), PureFluidPhase::report(), and Phase::saveState().
void getMolecularWeights | ( | doublereal * | weights | ) | const [inherited] |
Copy the vector of molecular weights into array weights.
weights | Output array of molecular weights (kg/kmol) |
Definition at line 289 of file Phase.cpp.
References Phase::molecularWeights().
void getMolecularWeights | ( | int | iwt, | |
doublereal * | weights | |||
) | const [inherited] |
Copy the vector of molecular weights into array weights.
iwt | Unused. | |
weights | Output array of molecular weights (kg/kmol) |
Definition at line 281 of file Phase.cpp.
References Phase::molecularWeights().
void getMolecularWeights | ( | vector_fp & | weights | ) | const [inherited] |
Copy the vector of molecular weights into vector weights.
weights | Output vector of molecular weights (kg/kmol) |
Definition at line 271 of file Phase.cpp.
References Phase::molecularWeights().
void getMoleFractions | ( | doublereal *const | x | ) | const [inherited] |
Get the species mole fraction vector.
x | On return, x contains the mole fractions. Must have a length greater than or equal to the number of species. |
Definition at line 231 of file State.cpp.
References State::m_mmw, State::m_ym, and Cantera::scale().
Referenced by IdealMolalSoln::calcDensity(), DebyeHuckel::calcDensity(), MolalityVPSSTP::calcMolalities(), IdealMolalSoln::enthalpy_mole(), LatticePhase::getActivityCoefficients(), HMWSoln::relative_enthalpy(), ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), MolalityVPSSTP::setMolalitiesByName(), MultiPhase::setMoles(), ThermoPhase::setReferenceComposition(), and MultiPhase::uploadMoleFractionsFromPhases().
void getMoleFractionsByName | ( | compositionMap & | x | ) | const [inherited] |
Get the mole fractions by name.
x | Output composition map containing the species mole fractions. |
Definition at line 306 of file Phase.cpp.
References Phase::moleFraction(), Constituents::nSpecies(), and Constituents::speciesName().
virtual void getParameters | ( | int & | n, | |
doublereal *const | c | |||
) | const [inline, virtual, inherited] |
Get the equation of state parameters in a vector.
For internal use only.
The number and meaning of these depends on the subclass.
n | number of parameters | |
c | array of n coefficients |
Reimplemented in ConstDensityThermo, DebyeHuckel, HMWSoln, IdealMolalSoln, LatticePhase, MetalSHEelectrons, MineralEQ3, SingleSpeciesTP, and StoichSubstanceSSTP.
Definition at line 2020 of file ThermoPhase.h.
void getPartialMolarCp | ( | doublereal * | cpbar | ) | const [virtual] |
Return an array of partial molar heat capacities for the species in the mixture.
Units: J/kmol/K
cpbar | Output vector of species partial molar heat capacities at constant pressure. Length = m_kk. units are J/kmol/K. |
Reimplemented from ThermoPhase.
Definition at line 205 of file SurfPhase.cpp.
References Cantera::GasConstant, SurfPhase::getCp_R(), and Phase::m_kk.
void getPartialMolarEnthalpies | ( | doublereal * | hbar | ) | const [virtual] |
Returns an array of partial molar enthalpies for the species in the mixture.
Units (J/kmol)
hbar | Output vector of species partial molar enthalpies. Length: m_kk. units are J/kmol. |
Reimplemented from ThermoPhase.
Definition at line 178 of file SurfPhase.cpp.
References Cantera::GasConstant, SurfPhase::getEnthalpy_RT(), Phase::m_kk, and State::temperature().
void getPartialMolarEntropies | ( | doublereal * | sbar | ) | const [virtual] |
Returns an array of partial molar entropies of the species in the solution.
Units: J/kmol/K.
sbar | Output vector of species partial molar entropies. Length = m_kk. units are J/kmol/K. |
Reimplemented from ThermoPhase.
Definition at line 192 of file SurfPhase.cpp.
References Cantera::GasConstant, SurfPhase::getEntropy_R(), and Phase::m_kk.
virtual void getPartialMolarIntEnergies | ( | doublereal * | ubar | ) | const [inline, virtual, inherited] |
Return an array of partial molar internal energies for the species in the mixture.
Units: J/kmol.
ubar | Output vector of speciar partial molar internal energies. Length = m_kk. units are J/kmol. |
Reimplemented in IdealGasPhase, IdealSolnGasVPSS, and SingleSpeciesTP.
Definition at line 1244 of file ThermoPhase.h.
References ThermoPhase::err().
void getPartialMolarVolumes | ( | doublereal * | vbar | ) | const [virtual] |
Return an array of partial molar volumes for the species in the mixture.
Units: m^3/kmol.
vbar | Output vector of speciar partial molar volumes. Length = m_kk. units are m^3/kmol. |
Reimplemented from ThermoPhase.
Definition at line 212 of file SurfPhase.cpp.
References SurfPhase::getStandardVolumes().
virtual void getPureGibbs | ( | doublereal * | gpure | ) | const [inline, virtual, inherited] |
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
Units are Joules/kmol
gpure | Output vector of standard state gibbs free energies Length: m_kk. |
Reimplemented in ConstDensityThermo, IdealGasPhase, IdealSolidSolnPhase, LatticePhase, SingleSpeciesTP, and VPStandardStateTP.
Definition at line 1324 of file ThermoPhase.h.
References ThermoPhase::err().
void getReferenceComposition | ( | doublereal *const | x | ) | const [virtual, inherited] |
Gets the reference composition.
The reference mole fraction is a safe mole fraction.
x | Mole fraction vector containing the reference composition. |
Definition at line 911 of file ThermoPhase.cpp.
References Phase::m_kk, and ThermoPhase::xMol_Ref.
void getStandardChemPotentials | ( | doublereal * | mu0 | ) | const [virtual] |
Get the array of chemical potentials at unit activity for the standard state species at the current T and P of the solution.
These are the standard state chemical potentials . The values are evaluated at the current temperature and pressure of the solution
mu0 | Output vector of chemical potentials. Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 216 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), and SurfPhase::m_mu0.
void getStandardVolumes | ( | doublereal * | vol | ) | const [virtual] |
Get the molar volumes of the species standard states at the current T and P of the solution.
units = m^3 / kmol
vol | Output vector containing the standard state volumes. Length: m_kk. |
Reimplemented from ThermoPhase.
Definition at line 283 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), Phase::m_kk, and SurfPhase::standardConcentration().
Referenced by SurfPhase::getPartialMolarVolumes().
virtual void getStandardVolumes_ref | ( | doublereal * | vol | ) | const [inline, virtual, inherited] |
Get the molar volumes of the species reference states at the current T and P_ref of the solution.
units = m^3 / kmol
vol | Output vector containing the standard state volumes. Length: m_kk. |
Reimplemented in IdealGasPhase, VPStandardStateTP, and WaterSSTP.
Definition at line 1449 of file ThermoPhase.h.
References ThermoPhase::err().
void getUnitsStandardConc | ( | double * | uA, | |
int | k = 0 , |
|||
int | sizeUA = 6 | |||
) | const [virtual, inherited] |
Returns the units of the standard and generalized concentrations.
Note they have the same units, as their ratio is defined to be equal to the activity of the kth species in the solution, which is unitless.
This routine is used in print out applications where the units are needed. Usually, MKS units are assumed throughout the program and in the XML input files.
The base ThermoPhase class assigns the default quantities of (kmol/m3) for all species. Inherited classes are responsible for overriding the default values if necessary.
uA | Output vector containing the units uA[0] = kmol units - default = 1 uA[1] = m units - default = -nDim(), the number of spatial dimensions in the Phase class. uA[2] = kg units - default = 0; uA[3] = Pa(pressure) units - default = 0; uA[4] = Temperature units - default = 0; uA[5] = time units - default = 0 | |
k | species index. Defaults to 0. | |
sizeUA | output int containing the size of the vector. Currently, this is equal to 6. |
Reimplemented in DebyeHuckel, HMWSoln, IdealMolalSoln, IdealSolidSolnPhase, IdealSolnGasVPSS, and MolalityVPSSTP.
Definition at line 804 of file ThermoPhase.cpp.
References Phase::nDim().
doublereal gibbs_mass | ( | ) | const [inline, inherited] |
Specific Gibbs function.
Units: J/kg.
Definition at line 1503 of file ThermoPhase.h.
References ThermoPhase::gibbs_mole(), and State::meanMolecularWeight().
Referenced by ThermoPhase::report(), PureFluidPhase::report(), and MolalityVPSSTP::report().
virtual doublereal gibbs_mole | ( | ) | const [inline, virtual, inherited] |
Molar Gibbs function. Units: J/kmol.
Reimplemented in ConstDensityThermo, DebyeHuckel, HMWSoln, IdealGasPhase, IdealMolalSoln, IdealSolidSolnPhase, IdealSolnGasVPSS, LatticePhase, PureFluidPhase, and SingleSpeciesTP.
Definition at line 871 of file ThermoPhase.h.
References ThermoPhase::err().
Referenced by ThermoPhase::gibbs_mass(), ThermoPhase::report(), and MolalityVPSSTP::report().
doublereal Hf298SS | ( | const int | k | ) | const [inline, inherited] |
Report the 298 K Heat of Formation of the standard state of one species (J kmol-1).
The 298K Heat of Formation is defined as the enthalpy change to create the standard state of the species from its constituent elements in their standard states at 298 K and 1 bar.
k | species index |
Definition at line 816 of file ThermoPhase.h.
References ThermoPhase::err().
std::string id | ( | ) | const [inherited] |
Return the string id for the phase.
Returns the id of the phase. The ID of the phase is set to the string name of the phase within the XML file Generally, it refers to the individual model name that denotes the species, the thermo, and the reaction rate info.
Definition at line 116 of file Phase.cpp.
References Phase::m_id.
Referenced by Kinetics::kineticsSpeciesIndex(), MultiPhase::phaseIndex(), and MultiPhase::phaseName().
int index | ( | ) | const [inline, inherited] |
For internal use only.
Index number. This method can be used to identify the location of a phase object in a list, and is used by the interface library (clib) routines for this purpose.
Reimplemented from Phase.
Definition at line 1985 of file ThermoPhase.h.
References ThermoPhase::m_index.
void init | ( | const array_fp & | mw | ) | [protected, inherited] |
For internal use only.
Initialize. Make a local copy of the vector of molecular weights, and resize the composition arrays to the appropriate size. The only information an instance of State has about the species is their molecular weights.
mw | Vector of molecular weights of the species. |
Definition at line 244 of file State.cpp.
References Cantera::int2str(), State::m_kk, State::m_mmw, State::m_molwts, State::m_rmolwts, State::m_y, State::m_ym, and Cantera::Tiny.
Referenced by Phase::freezeSpecies().
void initThermo | ( | ) | [virtual] |
Initialize the SurfPhase object after all species have been set up.
For internal use only.
Initialize.
This method is provided to allow subclasses to perform any initialization required after all species have been added. For example, it might be used to resize internal work arrays that must have an entry for each species. The base class implementation does nothing, and subclasses that do not require initialization do not need to overload this method. When importing a CTML phase description, this method is called from ThermoPhase::initThermoXML(), which is called from importPhase(), just prior to returning from function importPhase().
Reimplemented from ThermoPhase.
Definition at line 306 of file SurfPhase.cpp.
References DATA_PTR, SurfPhase::m_cp0, SurfPhase::m_h0, Phase::m_kk, SurfPhase::m_logsize, SurfPhase::m_mu0, SurfPhase::m_pe, SurfPhase::m_s0, SurfPhase::m_work, SurfPhase::setCoverages(), and Constituents::size().
void initThermoFile | ( | std::string | inputFile, | |
std::string | id | |||
) | [virtual, inherited] |
For internal use only.
Initialization of a ThermoPhase object using an ctml file.
This routine is a precursor to initThermoXML(XML_Node*) routine, which does most of the work. Here we read extra information about the XML description of a phase. Regular information about elements and species and their reference state thermodynamic information have already been read at this point. For example, we do not need to call this function for ideal gas equations of state.
inputFile | XML file containing the description of the phase | |
id | Optional parameter identifying the name of the phase. If none is given, the first XML phase element encountered will be used. |
Definition at line 830 of file ThermoPhase.cpp.
References XML_Node::build(), XML_Node::copy(), Cantera::findInputFile(), Cantera::findXMLPhase(), ThermoPhase::initThermoXML(), and Phase::xml().
void initThermoXML | ( | XML_Node & | phaseNode, | |
std::string | id | |||
) | [virtual, inherited] |
Import and initialize a ThermoPhase object using an XML tree.
For internal use only.
Here we read extra information about the XML description of a phase. Regular information about elements and species and their reference state thermodynamic information have already been read at this point. For example, we do not need to call this function for ideal gas equations of state. This function is called from importPhase() after the elements and the species are initialized with default ideal solution level data.
The default implementation in ThermoPhase calls the virtual function initThermo() and then sets the "state" of the phase by looking for an XML element named "state", and then interpreting its contents by calling the virtual function setStateFromXML().
phaseNode | This object must be the phase node of a complete XML tree description of the phase, including all of the species data. In other words while "phase" must point to an XML phase object, it must have sibling nodes "speciesData" that describe the species in the phase. | |
id | ID of the phase. If nonnull, a check is done to see if phaseNode is pointing to the phase with the correct id. |
Reimplemented in DebyeHuckel, HMWSoln, IdealMolalSoln, IdealSolidSolnPhase, IdealSolnGasVPSS, MetalSHEelectrons, MineralEQ3, MolalityVPSSTP, StoichSubstanceSSTP, electrodeElectron, VPStandardStateTP, and WaterSSTP.
Definition at line 879 of file ThermoPhase.cpp.
References XML_Node::child(), XML_Node::hasChild(), ThermoPhase::setReferenceComposition(), and ThermoPhase::setStateFromXML().
Referenced by ThermoPhase::initThermoFile().
doublereal intEnergy_mass | ( | ) | const [inline, inherited] |
Specific internal energy.
Units: J/kg.
Definition at line 1489 of file ThermoPhase.h.
References ThermoPhase::intEnergy_mole(), and State::meanMolecularWeight().
Referenced by ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::setState_HPorUV(), and SingleSpeciesTP::setState_UV().
doublereal intEnergy_mole | ( | ) | const [virtual] |
Return the Molar Internal Energy. Units: J/kmol.
For a surface phase, the pressure is not a relevant thermodynamic variable, and so the Enthalpy is equal to the Internal Energy.
Reimplemented from ThermoPhase.
Definition at line 172 of file SurfPhase.cpp.
References SurfPhase::enthalpy_mole().
virtual doublereal isothermalCompressibility | ( | ) | const [inline, virtual, inherited] |
Returns the isothermal compressibility. Units: 1/Pa.
The isothermal compressibility is defined as
or
Reimplemented in DebyeHuckel, HMWSoln, IdealGasPhase, IdealMolalSoln, IdealSolnGasVPSS, MetalSHEelectrons, MineralEQ3, PureFluidPhase, StoichSubstanceSSTP, and WaterSSTP.
Definition at line 955 of file ThermoPhase.h.
References ThermoPhase::err().
Referenced by SingleSpeciesTP::cv_mole().
doublereal logStandardConc | ( | int | k = 0 |
) | const [virtual] |
Return the log of the standard concentration for the kth species.
k | species index (default 0) |
Reimplemented from ThermoPhase.
Definition at line 240 of file SurfPhase.cpp.
References SurfPhase::m_logn0, and SurfPhase::m_logsize.
Referenced by SurfPhase::getChemPotentials().
doublereal massFraction | ( | std::string | name | ) | const [inherited] |
Return the mass fraction of a single species.
name | String name of the species |
Definition at line 328 of file Phase.cpp.
References State::massFractions(), and Constituents::speciesIndex().
doublereal massFraction | ( | int | k | ) | const [inherited] |
const doublereal* massFractions | ( | ) | const [inline, inherited] |
Returns a read-only pointer to the start of the massFraction array.
The pointer returned is readonly
Definition at line 242 of file State.h.
References State::m_y.
Referenced by Phase::massFraction().
doublereal maxTemp | ( | int | k = -1 |
) | const [inline, inherited] |
Maximum temperature for which the thermodynamic data for the species are valid.
If no argument is supplied, the value returned will be the highest temperature at which the data for all species are valid. Otherwise, the value will be only for species k. This function is a wrapper that calls the species thermo maxTemp function.
k | index of the species. Default is -1, which will return the min of the max value over all species. |
Definition at line 845 of file ThermoPhase.h.
References ThermoPhase::m_spthermo, and SpeciesThermo::maxTemp().
Referenced by MultiPhase::addPhase(), ThermoPhase::setState_HPorUV(), and ThermoPhase::setState_SPorSV().
doublereal mean_X | ( | const doublereal *const | Q | ) | const [inherited] |
Evaluate the mole-fraction-weighted mean of Q:
Array Q should contain pure-species molar property values.
Q | input vector of length m_kk that is to be averaged. |
Definition at line 223 of file State.cpp.
References State::m_mmw, and State::m_ym.
Referenced by IdealSolnGasVPSS::cp_mole(), IdealSolidSolnPhase::cp_mole(), IdealMolalSoln::cp_mole(), IdealGasPhase::cp_mole(), DebyeHuckel::cp_mole(), LatticePhase::cv_mole(), HMWSoln::cv_mole(), ConstDensityThermo::cv_mole(), SurfPhase::enthalpy_mole(), IdealSolnGasVPSS::enthalpy_mole(), IdealSolidSolnPhase::enthalpy_mole(), IdealMolalSoln::enthalpy_mole(), IdealGasPhase::enthalpy_mole(), DebyeHuckel::enthalpy_mole(), IdealSolnGasVPSS::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), IdealMolalSoln::entropy_mole(), IdealGasPhase::entropy_mole(), DebyeHuckel::entropy_mole(), IdealSolidSolnPhase::gibbs_mole(), IdealMolalSoln::gibbs_mole(), HMWSoln::gibbs_mole(), DebyeHuckel::gibbs_mole(), IdealSolidSolnPhase::intEnergy_mole(), IdealMolalSoln::intEnergy_mole(), IdealGasPhase::intEnergy_mole(), and HMWSoln::relative_enthalpy().
doublereal mean_Y | ( | const doublereal *const | Q | ) | const [inherited] |
Evaluate the mass-fraction-weighted mean of Q:
.
Q | Array Q contains a vector of species property values in mass units. |
Definition at line 227 of file State.cpp.
References Cantera::dot(), and State::m_y.
doublereal meanMolecularWeight | ( | ) | const [inline, inherited] |
The mean molecular weight.
Units: (kg/kmol)
Definition at line 282 of file State.h.
References State::m_mmw.
Referenced by IdealSolnGasVPSS::calcDensity(), IdealMolalSoln::calcDensity(), DebyeHuckel::calcDensity(), ThermoPhase::cp_mass(), ThermoPhase::cv_mass(), ThermoPhase::enthalpy_mass(), ThermoPhase::entropy_mass(), IdealSolidSolnPhase::getActivityConcentrations(), WaterSSTP::getStandardVolumes_ref(), ThermoPhase::gibbs_mass(), ThermoPhase::intEnergy_mass(), State::molarDensity(), ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), State::setMolarDensity(), and IdealGasPhase::setPressure().
doublereal minTemp | ( | int | k = -1 |
) | const [inline, inherited] |
Minimum temperature for which the thermodynamic data for the species or phase are valid.
If no argument is supplied, the value returned will be the lowest temperature at which the data for all species are valid. Otherwise, the value will be only for species k. This function is a wrapper that calls the species thermo minTemp function.
k | index of the species. Default is -1, which will return the max of the min value over all species. |
Definition at line 776 of file ThermoPhase.h.
References ThermoPhase::m_spthermo, and SpeciesThermo::minTemp().
Referenced by MultiPhase::addPhase(), ThermoPhase::setState_HPorUV(), and ThermoPhase::setState_SPorSV().
virtual void modifyOneHf298SS | ( | const int | k, | |
const doublereal | Hf298New | |||
) | [inline, virtual, inherited] |
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1).
The 298K heat of formation is defined as the enthalpy change to create the standard state of the species from its constituent elements in their standard states at 298 K and 1 bar.
k | Species k | |
Hf298New | Specify the new value of the Heat of Formation at 298K and 1 bar |
Definition at line 828 of file ThermoPhase.h.
References ThermoPhase::err().
doublereal molarDensity | ( | ) | const [inherited] |
Molar density (kmol/m^3).
Definition at line 192 of file State.cpp.
References State::density(), and State::meanMolecularWeight().
Referenced by IdealSolidSolnPhase::enthalpy_mole(), ConstDensityThermo::getChemPotentials(), StoichSubstanceSSTP::getEnthalpy_RT(), MineralEQ3::getEnthalpy_RT(), StoichSubstanceSSTP::getIntEnergy_RT(), MineralEQ3::getIntEnergy_RT(), StoichSubstanceSSTP::getIntEnergy_RT_ref(), MineralEQ3::getIntEnergy_RT_ref(), MetalSHEelectrons::getIntEnergy_RT_ref(), IdealGasPhase::getPartialMolarVolumes(), IdealGasPhase::getStandardVolumes(), IdealSolnGasVPSS::intEnergy_mole(), IdealSolidSolnPhase::intEnergy_mole(), HMWSoln::intEnergy_mole(), DebyeHuckel::intEnergy_mole(), ConstDensityThermo::logStandardConc(), IdealGasPhase::pressure(), IdealMolalSoln::setMolarDensity(), and DebyeHuckel::setMolarDensity().
doublereal molarMass | ( | int | k | ) | const [inline, inherited] |
Return the Molar mass of species k
.
Preferred name for molecular weight.
k | index for species |
Definition at line 240 of file Constituents.h.
References Constituents::molecularWeight().
doublereal molecularWeight | ( | int | k | ) | const [inherited] |
Molecular weight of species k
.
k | index of species k |
k
. Definition at line 240 of file Constituents.cpp.
References Constituents::m_weight, and Constituents::nSpecies().
Referenced by VPSSMgr_Water_HKFT::_updateRefStateThermo(), VPSSMgr_Water_ConstVol::_updateRefStateThermo(), VPSSMgr_Water_HKFT::_updateStandardStateThermo(), VPSSMgr_Water_ConstVol::_updateStandardStateThermo(), SingleSpeciesTP::cv_mole(), SingleSpeciesTP::getPartialMolarVolumes(), SingleSpeciesTP::getStandardVolumes(), VPSSMgr_Water_ConstVol::getStandardVolumes_ref(), PDSS::initThermo(), VPSSMgr_Water_HKFT::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), PDSS_SSVol::initThermoXML(), PDSS_ConstVol::initThermoXML(), MineralEQ3::initThermoXML(), Constituents::molarMass(), and MolalityVPSSTP::setSolvent().
const array_fp & molecularWeights | ( | ) | const [inherited] |
Return a const reference to the internal vector of molecular weights.
Reimplemented from Constituents.
Definition at line 298 of file Phase.cpp.
Referenced by Phase::getMolecularWeights().
const doublereal * moleFractdivMMW | ( | ) | const [inherited] |
Returns a read-only pointer to the start of the moleFraction/MW array.
This array is the array of mole fractions, each divided by the mean molecular weight.
Definition at line 215 of file State.cpp.
References State::m_ym.
Referenced by IdealSolnGasVPSS::calcDensity(), IdealSolidSolnPhase::calcDensity(), and IdealSolidSolnPhase::getActivityConcentrations().
doublereal moleFraction | ( | std::string | name | ) | const [inherited] |
Return the mole fraction of a single species.
name | String name of the species |
Definition at line 318 of file Phase.cpp.
References Phase::moleFraction(), and Constituents::speciesIndex().
doublereal moleFraction | ( | int | k | ) | const [inherited] |
Return the mole fraction of a single species.
k | String name of the species |
Reimplemented from State.
Definition at line 314 of file Phase.cpp.
Referenced by Phase::chargeDensity(), IdealMolalSoln::getActivities(), HMWSoln::getActivities(), DebyeHuckel::getActivities(), MolalityVPSSTP::getActivityCoefficients(), IdealSolnGasVPSS::getActivityConcentrations(), IdealSolnGasVPSS::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), IdealMolalSoln::getChemPotentials(), IdealGasPhase::getChemPotentials(), HMWSoln::getChemPotentials(), DebyeHuckel::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials_RT(), IdealMolalSoln::getMolalityActivityCoefficients(), Phase::getMoleFractionsByName(), IdealSolnGasVPSS::getPartialMolarEntropies(), IdealSolidSolnPhase::getPartialMolarEntropies(), IdealMolalSoln::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), HMWSoln::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), Phase::moleFraction(), DebyeHuckel::s_update_d2lnMolalityActCoeff_dT2(), DebyeHuckel::s_update_dlnMolalityActCoeff_dP(), DebyeHuckel::s_update_dlnMolalityActCoeff_dT(), DebyeHuckel::s_update_lnMolalityActCoeff(), IdealMolalSoln::s_updateIMS_lnMolalityActCoeff(), HMWSoln::s_updateIMS_lnMolalityActCoeff(), and HMWSoln::s_updatePitzer_lnMolalityActCoeff().
std::string name | ( | ) | const [inherited] |
Return the name of the phase.
Returns the name of the phase. The name of the phase is set to the string name of the phase within the XML file Generally, it refers to the individual model name that denotes the species, the thermo, and the reaction rate info. It may also refer more specifically to a location within the domain.
Definition at line 124 of file Phase.cpp.
References Phase::m_name.
Referenced by Cantera::operator<<(), ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), and vcs_MultiPhaseEquil::reportCSV().
doublereal nAtoms | ( | int | k, | |
int | m | |||
) | const [inherited] |
Number of atoms of element m
in species k
.
k | species index | |
m | element index |
Definition at line 463 of file Constituents.cpp.
References Constituents::m_Elements, Constituents::m_speciesComp, Constituents::nElements(), Elements::nElements(), and Constituents::nSpecies().
Referenced by PDSS_HKFT::convertDGFormation(), MolalityVPSSTP::findCLMIndex(), MultiPhase::init(), and IdealSolidSolnPhase::setToEquilState().
int nDim | ( | ) | const [inline, inherited] |
Returns the number of spatial dimensions (1, 2, or 3).
Definition at line 475 of file Phase.h.
References Phase::m_ndim.
Referenced by Kinetics::addPhase(), ThermoPhase::getUnitsStandardConc(), MolalityVPSSTP::getUnitsStandardConc(), IdealSolnGasVPSS::getUnitsStandardConc(), IdealSolidSolnPhase::getUnitsStandardConc(), IdealMolalSoln::getUnitsStandardConc(), HMWSoln::getUnitsStandardConc(), and DebyeHuckel::getUnitsStandardConc().
int nElements | ( | ) | const [inherited] |
Number of elements.
Definition at line 88 of file Constituents.cpp.
References Constituents::m_Elements, and Elements::nElements().
Referenced by MultiPhase::addPhase(), PDSS_HKFT::convertDGFormation(), MolalityVPSSTP::findCLMIndex(), ThermoPhase::getElementPotentials(), IdealSolidSolnPhase::initLengths(), IdealGasPhase::initThermo(), Constituents::nAtoms(), and ThermoPhase::setElementPotentials().
int nSpecies | ( | ) | const [inline, inherited] |
Returns the number of species in the phase.
Definition at line 222 of file Constituents.h.
References Constituents::m_kk.
Referenced by MultiPhase::addPhase(), MultiPhase::calcElemAbundances(), Phase::chargeDensity(), vcs_MultiPhaseEquil::equilibrate_TP(), Phase::freezeSpecies(), ThermoPhase::getActivities(), Phase::getMoleFractionsByName(), MultiPhase::getMoles(), MultiPhase::init(), VPStandardStateTP::initLengths(), VPSSMgr::initLengths(), MolalityVPSSTP::initLengths(), IdealSolnGasVPSS::initLengths(), IdealSolidSolnPhase::initLengths(), IdealMolalSoln::initLengths(), HMWSoln::initLengths(), DebyeHuckel::initLengths(), StoichSubstanceSSTP::initThermo(), SingleSpeciesTP::initThermo(), Constituents::molecularWeight(), Constituents::nAtoms(), Kinetics::nTotalSpecies(), ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), vcs_MultiPhaseEquil::reportCSV(), Phase::restoreState(), Phase::saveState(), Kinetics::selectPhase(), SurfPhase::setCoveragesByName(), Phase::setMassFractionsByName(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), MultiPhase::setMoles(), MultiPhase::setPhaseMoleFractions(), ThermoPhase::setState_TPX(), ThermoPhase::setState_TPY(), Constituents::speciesName(), and MultiPhase::uploadMoleFractionsFromPhases().
Asignment operator.
Assignment operator for the object. Constructed object will be a clone of this object, but will also own all of its data.
right | Object to be copied. |
Definition at line 123 of file SurfPhase.cpp.
References SurfPhase::m_cp0, SurfPhase::m_h0, SurfPhase::m_logn0, SurfPhase::m_logsize, SurfPhase::m_mu0, SurfPhase::m_n0, SurfPhase::m_pe, SurfPhase::m_press, SurfPhase::m_s0, SurfPhase::m_tlast, SurfPhase::m_tmax, SurfPhase::m_tmin, and SurfPhase::m_work.
Referenced by SurfPhase::SurfPhase().
doublereal potentialEnergy | ( | int | k | ) | [inline] |
Return the potential energy of species k.
Returns the potential energy of species, k, J kmol-1
k | Species index |
Definition at line 448 of file SurfPhase.h.
References SurfPhase::m_pe.
virtual doublereal pressure | ( | ) | const [inline, virtual] |
Return the thermodynamic pressure (Pa).
This method must be overloaded in derived classes. Since the mass density, temperature, and mass fractions are stored, this method should use these values to implement the mechanical equation of state .
Reimplemented from ThermoPhase.
Definition at line 507 of file SurfPhase.h.
References SurfPhase::m_press.
bool ready | ( | ) | const [virtual, inherited] |
True if both elements and species have been frozen.
Reimplemented from Constituents.
Definition at line 363 of file Phase.cpp.
References Phase::m_kk, State::ready(), and Constituents::ready().
doublereal refPressure | ( | ) | const [inline, inherited] |
Returns the reference pressure in Pa.
This function is a wrapper that calls the species thermo refPressure function.
Definition at line 759 of file ThermoPhase.h.
References ThermoPhase::m_spthermo, and SpeciesThermo::refPressure().
Referenced by IdealSolidSolnPhase::initLengths(), StoichSubstanceSSTP::initThermo(), SingleSpeciesTP::initThermo(), and IdealGasPhase::initThermo().
std::string report | ( | bool | show_thermo = true |
) | const [virtual, inherited] |
returns a summary of the state of the phase as a string
show_thermo | If true, extra information is printed out about the thermodynamic state of the system. |
Reimplemented in MolalityVPSSTP, and PureFluidPhase.
Definition at line 1029 of file ThermoPhase.cpp.
References ThermoPhase::cp_mass(), ThermoPhase::cp_mole(), ThermoPhase::cv_mass(), ThermoPhase::cv_mole(), State::density(), ThermoPhase::electricPotential(), ThermoPhase::enthalpy_mass(), ThermoPhase::enthalpy_mole(), ThermoPhase::entropy_mass(), ThermoPhase::entropy_mole(), Cantera::GasConstant, ThermoPhase::getChemPotentials(), State::getMassFractions(), State::getMoleFractions(), ThermoPhase::gibbs_mass(), ThermoPhase::gibbs_mole(), ThermoPhase::intEnergy_mass(), ThermoPhase::intEnergy_mole(), State::meanMolecularWeight(), Phase::name(), Constituents::nSpecies(), ThermoPhase::pressure(), Cantera::SmallNumber, Constituents::speciesName(), and State::temperature().
void restoreState | ( | int | lenstate, | |
const doublereal * | state | |||
) | [inherited] |
Restore the state of the phase from a previously saved state vector.
lenstate | Length of the state vector | |
state | Vector of state conditions. |
Definition at line 154 of file Phase.cpp.
References Constituents::nSpecies(), State::setDensity(), State::setMassFractions_NoNorm(), and State::setTemperature().
void restoreState | ( | const vector_fp & | state | ) | [inherited] |
virtual doublereal satPressure | ( | doublereal | t | ) | const [inline, virtual, inherited] |
Return the saturation pressure given the temperature.
t | Temperature (Kelvin) |
Reimplemented in DebyeHuckel, HMWSoln, PureFluidPhase, SingleSpeciesTP, and WaterSSTP.
Definition at line 1817 of file ThermoPhase.h.
References ThermoPhase::err().
virtual doublereal satTemperature | ( | doublereal | p | ) | const [inline, virtual, inherited] |
Return the saturation temperature given the pressure.
p | Pressure (Pa) |
Reimplemented in DebyeHuckel, HMWSoln, PureFluidPhase, and SingleSpeciesTP.
Definition at line 1809 of file ThermoPhase.h.
References ThermoPhase::err().
void saveSpeciesData | ( | const int | k, | |
const XML_Node *const | data | |||
) | [inherited] |
Store a reference pointer to the XML tree containing the species data for this phase.
The following methods are used in the process of constructing the phase and setting its parameters from a specification in an input file. They are not normally used in application programs. To see how they are used, see files importCTML.cpp and ThermoFactory.cpp.
This is used to access data needed to construct transport manager later.
For internal use only.
k | Species index | |
data | Pointer to the XML_Node data containing information about the species in the phase. |
Definition at line 941 of file ThermoPhase.cpp.
References ThermoPhase::m_speciesData.
void saveState | ( | int | lenstate, | |
doublereal * | state | |||
) | const [inherited] |
Write to array 'state' the current internal state.
lenstate | length of the state array. Must be >= nSpecies() + 2 | |
state | output vector. Must be of length nSpecies() + 2 or greater. |
Definition at line 144 of file Phase.cpp.
References State::density(), State::getMassFractions(), and State::temperature().
void saveState | ( | vector_fp & | state | ) | const [inherited] |
Save the current internal state of the phase.
Write to vector 'state' the current internal state.
state | output vector. Will be resized to nSpecies() + 2 on return. |
Definition at line 140 of file Phase.cpp.
References Constituents::nSpecies().
void setConcentrations | ( | const doublereal *const | conc | ) | [virtual, inherited] |
Set the concentrations to the specified values within the phase.
We set the concentrations here and therefore we set the overall density of the phase. We hold the temperature constant during this operation. Therefore, we have possibly changed the pressure of the phase by calling this routine.
conc | The input vector to this routine is in dimensional units. For volumetric phases c[k] is the concentration of the kth species in kmol/m3. For surface phases, c[k] is the concentration in kmol/m2. The length of the vector is the number of species in the phase. |
Reimplemented in IdealSolidSolnPhase.
Definition at line 196 of file State.cpp.
References State::m_kk, State::m_mmw, State::m_molwts, State::m_y, State::m_ym, State::setDensity(), and State::stateMFChangeCalc().
Referenced by SurfPhase::setCoverages(), and SurfPhase::setCoveragesNoNorm().
void setCoverages | ( | const doublereal * | theta | ) |
Set the surface site fractions to a specified state.
Set the coverage fractions to a specified state.
This routine converts to concentrations in kmol/m2, using m_n0, the surface site density, and size(k), which is defined to be the number of surface sites occupied by the kth molecule. It then calls State::setConcentrations to set the internal concentration in the object.
theta | This is the surface site fraction for the kth species in the surface phase. This is a dimensionless quantity. |
This routine normalizes the theta's to 1, before application
This routine converts to concentrations in kmol/m2, using m_n0, the surface site density, and size(k), which is defined to be the number of surface sites occupied by the kth molecule. It then calls State::setConcentrations to set the internal concentration in the object.
Definition at line 354 of file SurfPhase.cpp.
References DATA_PTR, Phase::m_kk, SurfPhase::m_n0, SurfPhase::m_work, State::setConcentrations(), and Constituents::size().
Referenced by SurfPhase::initThermo(), and SurfPhase::setCoveragesByName().
void setCoveragesByName | ( | std::string | cov | ) |
Set the coverages from a string of colon-separated name:value pairs.
cov | String containing colon-separated name:value pairs |
Definition at line 398 of file SurfPhase.cpp.
References DATA_PTR, Constituents::nSpecies(), Cantera::parseCompString(), SurfPhase::setCoverages(), and Constituents::speciesName().
Referenced by SurfPhase::setStateFromXML().
void setCoveragesNoNorm | ( | const doublereal * | theta | ) |
Set the surface site fractions to a specified state.
This routine converts to concentrations in kmol/m2, using m_n0, the surface site density, and size(k), which is defined to be the number of surface sites occupied by the kth molecule. It then calls State::setConcentrations to set the internal concentration in the object.
theta | This is the surface site fraction for the kth species in the surface phase. This is a dimensionless quantity. |
Definition at line 378 of file SurfPhase.cpp.
References DATA_PTR, Phase::m_kk, SurfPhase::m_n0, SurfPhase::m_work, State::setConcentrations(), and Constituents::size().
virtual void setDensity | ( | const doublereal | density | ) | [inline, virtual, inherited] |
Set the internally storred density (kg/m^3) of the phase.
Note the density of a phase is an indepedent variable.
density | Input density (kg/m^3). |
Reimplemented in DebyeHuckel, HMWSoln, IdealMolalSoln, IdealSolidSolnPhase, and WaterSSTP.
Definition at line 327 of file State.h.
References State::m_dens.
Referenced by IdealSolnGasVPSS::calcDensity(), electrodeElectron::initThermoXML(), StoichSubstanceSSTP::initThermoXML(), MineralEQ3::initThermoXML(), MetalSHEelectrons::initThermoXML(), Phase::restoreState(), State::setConcentrations(), electrodeElectron::setParameters(), StoichSubstanceSSTP::setParameters(), MineralEQ3::setParameters(), MetalSHEelectrons::setParameters(), ConstDensityThermo::setParameters(), StoichSubstanceSSTP::setParametersFromXML(), MetalSHEelectrons::setParametersFromXML(), IdealGasPhase::setPressure(), ThermoPhase::setState_HPorUV(), Phase::setState_RX(), Phase::setState_RY(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), Phase::setState_TR(), Phase::setState_TRX(), Phase::setState_TRY(), SingleSpeciesTP::setState_UV(), and ThermoPhase::setStateFromXML().
void setElectricPotential | ( | doublereal | v | ) | [inline, inherited] |
Set the electric potential of this phase (V).
This is used by classes InterfaceKinetics and EdgeKinetics to compute the rates of charge-transfer reactions, and in computing the electrochemical potentials of the species.
Each phase may have its own electric potential.
v | Input value of the electric potential in Volts |
Reimplemented in IdealMolalSoln.
Definition at line 995 of file ThermoPhase.h.
References ThermoPhase::m_phi.
void setElementPotentials | ( | const vector_fp & | lambda | ) | [inherited] |
Stores the element potentials in the ThermoPhase object.
Called by function 'equilibrate' in ChemEquil.h to transfer the element potentials to this object after every successful equilibration routine. The element potentials are storred in their dimensionless forms, calculated by dividing by RT.
lambda | Input vector containing the element potentials. Length = nElements. Units are Joules/kmol. |
Definition at line 993 of file ThermoPhase.cpp.
References Cantera::GasConstant, ThermoPhase::m_hasElementPotentials, ThermoPhase::m_lambdaRRT, Constituents::nElements(), and State::temperature().
void setID | ( | std::string | id | ) | [inherited] |
Set the string id for the phase.
Sets the id of the phase. The ID of the phase is originally set to the string name of the phase within the XML file. Generally, it refers to the individual model name that denotes the species, the thermo, and the reaction rate info.
id | String id of the phase |
Definition at line 120 of file Phase.cpp.
References Phase::m_id.
void setIndex | ( | int | m | ) | [inline, inherited] |
For internal use only.
Set the index number. The Cantera interface library uses this method to set the index number to the location of the pointer to this object in the pointer array it maintains. Using this method for any other purpose will lead to unpredictable results if used in conjunction with the interface library.
m | Input the index number. |
Reimplemented from Phase.
Definition at line 1998 of file ThermoPhase.h.
References ThermoPhase::m_index.
void setMassFractions | ( | const doublereal *const | y | ) | [virtual, inherited] |
Set the mass fractions to the specified values, and then normalize them so that they sum to 1.0.
y | Array of unnormalized mass fraction values (input). Must have a length greater than or equal to the number of species. | |
y | Input vector of mass fractions. There is no restriction on the sum of the mass fraction vector. Internally, the State object will normalize this vector before storring its contents. Length is m_kk. |
Reimplemented in IdealSolidSolnPhase.
Definition at line 142 of file State.cpp.
References State::m_kk, State::m_mmw, State::m_rmolwts, State::m_y, State::m_ym, Cantera::scale(), and State::stateMFChangeCalc().
Referenced by Phase::setMassFractionsByName(), ThermoPhase::setState_PY(), Phase::setState_RY(), ThermoPhase::setState_TPY(), Phase::setState_TRY(), and Phase::setState_TY().
void setMassFractions_NoNorm | ( | const doublereal *const | y | ) | [virtual, inherited] |
Set the mass fractions to the specified values without normalizing.
This is useful when the normalization condition is being handled by some other means, for example by a constraint equation as part of a larger set of equations.
y | Input vector of mass fractions. Length is m_kk. |
Reimplemented in IdealSolidSolnPhase.
Definition at line 167 of file State.cpp.
References State::m_kk, State::m_mmw, State::m_rmolwts, State::m_y, State::m_ym, and State::stateMFChangeCalc().
Referenced by Phase::restoreState().
void setMassFractionsByName | ( | const std::string & | x | ) | [inherited] |
Set the species mass fractions by name.
Species not listed by name in x
are set to zero.
x | String containing a composition map |
Definition at line 204 of file Phase.cpp.
References Constituents::nSpecies(), Cantera::parseCompString(), Phase::setMassFractionsByName(), and Constituents::speciesName().
void setMassFractionsByName | ( | compositionMap & | yMap | ) | [inherited] |
Set the species mass fractions by name.
yMap | map from species names to mass fraction values. Species not listed by name in yMap are set to zero. |
Definition at line 193 of file Phase.cpp.
References Constituents::nSpecies(), State::setMassFractions(), and Constituents::speciesName().
Referenced by Phase::setMassFractionsByName(), ThermoPhase::setState_TPY(), Phase::setState_TRY(), and ThermoPhase::setStateFromXML().
void setMolarDensity | ( | const doublereal | molarDensity | ) | [virtual, inherited] |
Set the internally storred molar density (kmol/m^3) of the phase.
molarDensity | Input molar density (kmol/m^3). |
Reimplemented in DebyeHuckel, HMWSoln, IdealMolalSoln, and IdealSolidSolnPhase.
Definition at line 239 of file State.cpp.
References State::m_dens, and State::meanMolecularWeight().
Referenced by Phase::setState_TNX().
void setMolecularWeight | ( | const int | k, | |
const double | mw | |||
) | [inline, protected, inherited] |
Set the molecular weight of a single species to a given value.
k | id of the species | |
mw | Molecular Weight (kg kmol-1) |
Definition at line 385 of file State.h.
References State::m_molwts, and State::m_rmolwts.
Referenced by WaterSSTP::initThermoXML().
void setMoleFractions | ( | const doublereal *const | x | ) | [virtual, inherited] |
Set the mole fractions to the specified values, and then normalize them so that they sum to 1.0.
x | Array of unnormalized mole fraction values (input). Must have a length greater than or equal to the number of species. | |
x | Input vector of mole fractions. There is no restriction on the sum of the mole fraction vector. Internally, the State object will normalize this vector before storring its contents. Length is m_kk. |
Reimplemented in IdealSolidSolnPhase.
Definition at line 102 of file State.cpp.
References Cantera::dot(), State::m_kk, State::m_mmw, State::m_molwts, State::m_y, State::m_ym, and State::stateMFChangeCalc().
Referenced by SingleSpeciesTP::initThermo(), WaterSSTP::initThermoXML(), MolalityVPSSTP::setMolalities(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), ThermoPhase::setState_PX(), Phase::setState_RX(), Phase::setState_TNX(), ThermoPhase::setState_TPX(), Phase::setState_TRX(), and Phase::setState_TX().
void setMoleFractions_NoNorm | ( | const doublereal *const | x | ) | [virtual, inherited] |
Set the mole fractions to the specified values without normalizing.
This is useful when the normalization condition is being handled by some other means, for example by a constraint equation as part of a larger set of equations.
x | Input vector of mole fractions. Length is m_kk. |
Reimplemented in IdealSolidSolnPhase.
Definition at line 115 of file State.cpp.
References Cantera::dot(), State::m_kk, State::m_mmw, State::m_molwts, State::m_y, State::m_ym, and State::stateMFChangeCalc().
void setMoleFractionsByName | ( | const std::string & | x | ) | [inherited] |
Set the mole fractions of a group of species by name.
The string x is in the form of a composition map Species which are not listed by name in the composition map are set to zero.
x | string x in the form of a composition map |
Definition at line 177 of file Phase.cpp.
References Constituents::nSpecies(), Cantera::parseCompString(), Phase::setMoleFractionsByName(), and Constituents::speciesName().
void setMoleFractionsByName | ( | compositionMap & | xMap | ) | [inherited] |
Set the species mole fractions by name.
xMap | map from species names to mole fraction values. Species not listed by name in xMap are set to zero. |
Definition at line 166 of file Phase.cpp.
References Constituents::nSpecies(), State::setMoleFractions(), and Constituents::speciesName().
Referenced by Phase::setMoleFractionsByName(), ThermoPhase::setState_TPX(), Phase::setState_TRX(), and ThermoPhase::setStateFromXML().
void setName | ( | std::string | nm | ) | [inherited] |
Sets the string name for the phase.
Sets the name of the phase. The name of the phase is originally set to the string name of the phase within the XML file. Generally, it refers to the individual model name that denotes the species, the thermo, and the reaction rate info. It may also refer more specifically to a location within the domain.
nm | String name of the phase |
Definition at line 128 of file Phase.cpp.
References Phase::m_name.
void setNDim | ( | int | ndim | ) | [inline, inherited] |
Set the number of spatial dimensions (1, 2, or 3).
The number of spatial dimensions is used for vector involving directions.
ndim | Input number of dimensions. |
Definition at line 484 of file Phase.h.
References Phase::m_ndim.
Referenced by EdgePhase::EdgePhase(), EdgePhase::operator=(), and SurfPhase::SurfPhase().
void setParameters | ( | int | n, | |
doublereal *const | c | |||
) | [virtual] |
Set the equation of state parameters from the argument list.
The only parameter that can be set is the site density.
For internal use only.
Set equation of state parameters.
n | number of parameters. Must be one | |
c | array of n coefficients c[0] = The site density (kmol m-2) |
Reimplemented from ThermoPhase.
Definition at line 245 of file SurfPhase.cpp.
References SurfPhase::m_logn0, and SurfPhase::m_n0.
Referenced by SurfPhase::setSiteDensity().
void setParametersFromXML | ( | const XML_Node & | thermoData | ) | [virtual] |
Set the Equation-of-State parameters by reading an XML Node Input.
The Equation-of-State data consists of one item, the site density.
thermoData | Reference to an XML_Node named thermo containing the equation-of-state data. The XML_Node is within the phase XML_Node describing the SurfPhase object. |
An example of the contents of the thermoData XML_Node is provided below. The units attribute is used to supply the units of the site density in any convenient form. Internally it is changed into MKS form.
* <thermo model="Surface"> * <site_density units="mol/cm2"> 3e-09 </site_density> * </thermo> *
Reimplemented from ThermoPhase.
Reimplemented in EdgePhase.
Definition at line 444 of file SurfPhase.cpp.
References XML_Node::_require(), ctml::getFloat(), SurfPhase::m_logn0, and SurfPhase::m_n0.
void setPotentialEnergy | ( | int | k, | |
doublereal | pe | |||
) |
Sets the potential energy of species k.
k | Species index | |
pe | Value of the potential energy (J kmol-1) |
Definition at line 325 of file SurfPhase.cpp.
References SurfPhase::_updateThermo(), and SurfPhase::m_pe.
virtual void setPressure | ( | doublereal | p | ) | [inline, virtual] |
Set the internally storred pressure (Pa) at constant temperature and composition.
This method must be reimplemented in derived classes, where it may involve the solution of a nonlinear equation. Within Cantera, the independent variable is the density. Therefore, this function solves for the density that will yield the desired input pressure. The temperature and composition iare held constant during this process.
This base class function will print an error, if not overwritten.
p | input Pressure (Pa) |
Reimplemented from ThermoPhase.
Definition at line 524 of file SurfPhase.h.
References SurfPhase::m_press.
void setReferenceComposition | ( | const doublereal *const | x | ) | [virtual, inherited] |
Sets the reference composition.
x | Mole fraction vector to set the reference composition to. If this is zero, then the reference mole fraction is set to the current mole fraction vector. |
Definition at line 891 of file ThermoPhase.cpp.
References DATA_PTR, State::getMoleFractions(), Phase::m_kk, and ThermoPhase::xMol_Ref.
Referenced by ThermoPhase::initThermoXML().
void setSiteDensity | ( | doublereal | n0 | ) |
Set the site density of the surface phase (kmol m-2).
n0 | Site density of the surface phase (kmol m-2) |
Definition at line 330 of file SurfPhase.cpp.
References SurfPhase::setParameters().
void setSpeciesThermo | ( | SpeciesThermo * | spthermo | ) | [inline, inherited] |
Install a species thermodynamic property manager.
The species thermodynamic property manager computes properties of the pure species for use in constructing solution properties. It is meant for internal use, and some classes derived from ThermoPhase may not use any species thermodynamic property manager. This method is called by function importPhase() in importCTML.cpp.
spthermo | input pointer to the species thermodynamic property manager. |
For internal use only.
Definition at line 1887 of file ThermoPhase.h.
References ThermoPhase::m_spthermo.
Referenced by VPSSMgrFactory::newVPSSMgr().
void setState_HP | ( | doublereal | h, | |
doublereal | p, | |||
doublereal | tol = 1.e-4 | |||
) | [virtual, inherited] |
Set the internally storred specific enthalpy (J/kg) and pressure (Pa) of the phase.
h | Specific enthalpy (J/kg) | |
p | Pressure (Pa) | |
tol | Optional parameter setting the tolerance of the calculation. Defaults to 1.0E-4 |
Reimplemented in PureFluidPhase, and SingleSpeciesTP.
Definition at line 238 of file ThermoPhase.cpp.
References ThermoPhase::setState_HPorUV().
virtual void setState_Psat | ( | doublereal | p, | |
doublereal | x | |||
) | [inline, virtual, inherited] |
Set the state to a saturated system at a particular pressure.
p | Pressure (Pa) | |
x | Fraction of vapor |
Reimplemented in DebyeHuckel, HMWSoln, PureFluidPhase, and SingleSpeciesTP.
Definition at line 1840 of file ThermoPhase.h.
References ThermoPhase::err().
void setState_PX | ( | doublereal | p, | |
doublereal * | x | |||
) | [inherited] |
Set the pressure (Pa) and mole fractions.
Note, the mole fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
p | Pressure (Pa) | |
x | Vector of mole fractions. Length is equal to m_kk. |
Reimplemented in SingleSpeciesTP.
Definition at line 230 of file ThermoPhase.cpp.
References State::setMoleFractions(), and ThermoPhase::setPressure().
Referenced by IdealSolnGasVPSS::setToEquilState(), IdealSolidSolnPhase::setToEquilState(), and IdealGasPhase::setToEquilState().
void setState_PY | ( | doublereal | p, | |
doublereal * | y | |||
) | [inherited] |
Set the internally storred pressure (Pa) and mass fractions.
Note, the temperature is held constant during this operation. Note, the mass fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
p | Pressure (Pa) | |
y | Vector of mass fractions. Length is equal to m_kk. |
Reimplemented in SingleSpeciesTP.
Definition at line 234 of file ThermoPhase.cpp.
References State::setMassFractions(), and ThermoPhase::setPressure().
void setState_RX | ( | doublereal | rho, | |
doublereal * | x | |||
) | [inherited] |
Set the density (kg/m^3) and mole fractions.
rho | Density (kg/m^3) | |
x | vector of species mole fractions. Length is equal to m_kk |
Definition at line 259 of file Phase.cpp.
References State::setDensity(), and State::setMoleFractions().
void setState_RY | ( | doublereal | rho, | |
doublereal * | y | |||
) | [inherited] |
Set the density (kg/m^3) and mass fractions.
rho | Density (kg/m^3) | |
y | vector of species mass fractions. Length is equal to m_kk |
Definition at line 264 of file Phase.cpp.
References State::setDensity(), and State::setMassFractions().
void setState_SP | ( | doublereal | s, | |
doublereal | p, | |||
doublereal | tol = 1.e-4 | |||
) | [virtual, inherited] |
Set the specific entropy (J/kg/K) and pressure (Pa).
This function fixes the internal state of the phase so that the specific entropy and the pressure have the value of the input parameters.
s | specific entropy (J/kg/K) | |
p | specific pressure (Pa). | |
tol | Optional parameter setting the tolerance of the calculation. Defaults to 1.0E-4 |
Reimplemented in PureFluidPhase, and SingleSpeciesTP.
Definition at line 512 of file ThermoPhase.cpp.
References ThermoPhase::setState_SPorSV().
void setState_SV | ( | doublereal | s, | |
doublereal | v, | |||
doublereal | tol = 1.e-4 | |||
) | [virtual, inherited] |
Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
This function fixes the internal state of the phase so that the specific entropy and specific volume have the value of the input parameters.
s | specific entropy (J/kg/K) | |
v | specific volume (m^3/kg). | |
tol | Optional parameter setting the tolerance of the calculation. Defaults to 1.0E-4 |
Reimplemented in PureFluidPhase, and SingleSpeciesTP.
Definition at line 517 of file ThermoPhase.cpp.
References ThermoPhase::setState_SPorSV().
void setState_TNX | ( | doublereal | t, | |
doublereal | n, | |||
const doublereal * | x | |||
) | [inherited] |
Set the internally storred temperature (K), molar density (kmol/m^3), and mole fractions.
Note, the mole fractions are always set first, before the molar density
t | Temperature in kelvin | |
n | molar density (kmol/m^3) | |
x | vector of species mole fractions. Length is equal to m_kk |
Definition at line 220 of file Phase.cpp.
References State::setMolarDensity(), State::setMoleFractions(), and State::setTemperature().
void setState_TP | ( | doublereal | t, | |
doublereal | p | |||
) | [inherited] |
Set the temperature (K) and pressure (Pa).
Setting the pressure may involve the solution of a nonlinear equation.
t | Temperature (K) | |
p | Pressure (Pa) |
Reimplemented in DebyeHuckel, HMWSoln, IdealMolalSoln, and VPStandardStateTP.
Definition at line 226 of file ThermoPhase.cpp.
References ThermoPhase::setPressure(), and State::setTemperature().
Referenced by SingleSpeciesTP::setState_HP(), ThermoPhase::setState_HPorUV(), SingleSpeciesTP::setState_SP(), and ThermoPhase::setState_SPorSV().
void setState_TPX | ( | doublereal | t, | |
doublereal | p, | |||
const std::string & | x | |||
) | [inherited] |
Set the temperature (K), pressure (Pa), and mole fractions.
Note, the mole fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
t | Temperature (K) | |
p | Pressure (Pa) | |
x | String containing a composition map of the mole fractions. Species not in the composition map are assumed to have zero mole fraction |
Reimplemented in SingleSpeciesTP.
Definition at line 186 of file ThermoPhase.cpp.
References Constituents::nSpecies(), Cantera::parseCompString(), Phase::setMoleFractionsByName(), ThermoPhase::setPressure(), State::setTemperature(), and Constituents::speciesName().
void setState_TPX | ( | doublereal | t, | |
doublereal | p, | |||
compositionMap & | x | |||
) | [inherited] |
Set the temperature (K), pressure (Pa), and mole fractions.
Note, the mole fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
t | Temperature (K) | |
p | Pressure (Pa) | |
x | Composition map of mole fractions. Species not in the composition map are assumed to have zero mole fraction |
Reimplemented in SingleSpeciesTP.
Definition at line 181 of file ThermoPhase.cpp.
References Phase::setMoleFractionsByName(), ThermoPhase::setPressure(), and State::setTemperature().
void setState_TPX | ( | doublereal | t, | |
doublereal | p, | |||
const doublereal * | x | |||
) | [inherited] |
Set the temperature (K), pressure (Pa), and mole fractions.
Note, the mole fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
t | Temperature (K) | |
p | Pressure (Pa) | |
x | Vector of mole fractions. Length is equal to m_kk. |
Reimplemented in SingleSpeciesTP.
Definition at line 176 of file ThermoPhase.cpp.
References State::setMoleFractions(), ThermoPhase::setPressure(), and State::setTemperature().
Referenced by MultiPhase::setMoles(), and MultiPhase::setPhaseMoleFractions().
void setState_TPY | ( | doublereal | t, | |
doublereal | p, | |||
const std::string & | y | |||
) | [inherited] |
Set the internally storred temperature (K), pressure (Pa), and mass fractions of the phase.
Note, the mass fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
t | Temperature (K) | |
p | Pressure (Pa) | |
y | String containing a composition map of the mass fractions. Species not in the composition map are assumed to have zero mass fraction |
Reimplemented in SingleSpeciesTP.
Definition at line 211 of file ThermoPhase.cpp.
References Constituents::nSpecies(), Cantera::parseCompString(), Phase::setMassFractionsByName(), ThermoPhase::setPressure(), State::setTemperature(), and Constituents::speciesName().
void setState_TPY | ( | doublereal | t, | |
doublereal | p, | |||
compositionMap & | y | |||
) | [inherited] |
Set the internally storred temperature (K), pressure (Pa), and mass fractions of the phase.
Note, the mass fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
t | Temperature (K) | |
p | Pressure (Pa) | |
y | Composition map of mass fractions. Species not in the composition map are assumed to have zero mass fraction |
Reimplemented in SingleSpeciesTP.
Definition at line 206 of file ThermoPhase.cpp.
References Phase::setMassFractionsByName(), ThermoPhase::setPressure(), and State::setTemperature().
void setState_TPY | ( | doublereal | t, | |
doublereal | p, | |||
const doublereal * | y | |||
) | [inherited] |
Set the internally storred temperature (K), pressure (Pa), and mass fractions of the phase.
Note, the mass fractions are set first before the pressure is set. Setting the pressure may involve the solution of a nonlinear equation.
t | Temperature (K) | |
p | Pressure (Pa) | |
y | Vector of mass fractions. Length is equal to m_kk. |
Reimplemented in SingleSpeciesTP.
Definition at line 201 of file ThermoPhase.cpp.
References State::setMassFractions(), ThermoPhase::setPressure(), and State::setTemperature().
void setState_TR | ( | doublereal | t, | |
doublereal | rho | |||
) | [inherited] |
Set the internally storred temperature (K) and density (kg/m^3).
Set the temperature (K) and density (kg/m^3).
t | Temperature in kelvin | |
rho | Density (kg/m^3) |
Definition at line 244 of file Phase.cpp.
References State::setDensity(), and State::setTemperature().
void setState_TRX | ( | doublereal | t, | |
doublereal | dens, | |||
compositionMap & | x | |||
) | [inherited] |
Set the internally storred temperature (K), density, and mole fractions.
Set the temperature (K), density (kg/m^3), and mole fractions.
Note, the mole fractions are always set first, before the density
t | Temperature in kelvin | |
dens | Density (kg/m^3) | |
x | Composition Map containing the mole fractions. Species not included in the map are assumed to have a zero mole fraction. |
Definition at line 226 of file Phase.cpp.
References State::setDensity(), Phase::setMoleFractionsByName(), and State::setTemperature().
void setState_TRX | ( | doublereal | t, | |
doublereal | dens, | |||
const doublereal * | x | |||
) | [inherited] |
Set the internally storred temperature (K), density, and mole fractions.
Set the temperature (K), density (kg/m^3), and mole fractions.
Note, the mole fractions are always set first, before the density
t | Temperature in kelvin | |
dens | Density (kg/m^3) | |
x | vector of species mole fractions. Length is equal to m_kk |
Definition at line 215 of file Phase.cpp.
References State::setDensity(), State::setMoleFractions(), and State::setTemperature().
void setState_TRY | ( | doublereal | t, | |
doublereal | dens, | |||
compositionMap & | y | |||
) | [inherited] |
Set the internally storred temperature (K), density, and mass fractions.
Set the temperature (K), density (kg/m^3), and mass fractions.
Note, the mass fractions are always set first, before the density
t | Temperature in kelvin | |
dens | Density (kg/m^3) | |
y | Composition Map containing the mass fractions. Species not included in the map are assumed to have a zero mass fraction. |
Definition at line 238 of file Phase.cpp.
References State::setDensity(), Phase::setMassFractionsByName(), and State::setTemperature().
void setState_TRY | ( | doublereal | t, | |
doublereal | dens, | |||
const doublereal * | y | |||
) | [inherited] |
Set the internally storred temperature (K), density, and mass fractions.
Set the temperature (K), density (kg/m^3), and mass fractions.
Note, the mass fractions are always set first, before the density
t | Temperature in kelvin | |
dens | Density (kg/m^3) | |
y | vector of species mass fractions. Length is equal to m_kk |
Definition at line 232 of file Phase.cpp.
References State::setDensity(), State::setMassFractions(), and State::setTemperature().
virtual void setState_Tsat | ( | doublereal | t, | |
doublereal | x | |||
) | [inline, virtual, inherited] |
Set the state to a saturated system at a particular temperature.
t | Temperature (kelvin) | |
x | Fraction of vapor |
Reimplemented in DebyeHuckel, HMWSoln, PureFluidPhase, and SingleSpeciesTP.
Definition at line 1831 of file ThermoPhase.h.
References ThermoPhase::err().
void setState_TX | ( | doublereal | t, | |
doublereal * | x | |||
) | [inherited] |
Set the internally storred temperature (K) and mole fractions.
Set the temperature (K) and mole fractions.
t | Temperature in kelvin | |
x | vector of species mole fractions. Length is equal to m_kk |
Definition at line 249 of file Phase.cpp.
References State::setMoleFractions(), and State::setTemperature().
void setState_TY | ( | doublereal | t, | |
doublereal * | y | |||
) | [inherited] |
Set the internally storred temperature (K) and mass fractions.
Set the temperature (K) and mass fractions.
t | Temperature in kelvin | |
y | vector of species mass fractions. Length is equal to m_kk |
Definition at line 254 of file Phase.cpp.
References State::setMassFractions(), and State::setTemperature().
void setState_UV | ( | doublereal | u, | |
doublereal | v, | |||
doublereal | tol = 1.e-4 | |||
) | [virtual, inherited] |
Set the specific internal energy (J/kg) and specific volume (m^3/kg).
This function fixes the internal state of the phase so that the specific internal energy and specific volume have the value of the input parameters.
u | specific internal energy (J/kg) | |
v | specific volume (m^3/kg). | |
tol | Optional parameter setting the tolerance of the calculation. Defaults to 1.0E-4 |
Reimplemented in PureFluidPhase, and SingleSpeciesTP.
Definition at line 243 of file ThermoPhase.cpp.
References ThermoPhase::setState_HPorUV().
void setStateFromXML | ( | const XML_Node & | state | ) | [virtual] |
Set the initial state of the Surface Phase from an XML_Node.
State variables that can be set by this routine are the temperature and the surface site coverages.
state | XML_Node containing the state information |
An example of the XML code block is given below.
* <state> * <temperature units="K">1200.0</temperature> * <coverages>c6H*:0.1, c6HH:0.9</coverages> * </state> *
Reimplemented from ThermoPhase.
Definition at line 455 of file SurfPhase.cpp.
References ctml::getChildValue(), ctml::getOptionalFloat(), XML_Node::hasChild(), SurfPhase::setCoveragesByName(), and State::setTemperature().
virtual void setTemperature | ( | const doublereal | temp | ) | [inline, virtual, inherited] |
Set the temperature (K).
This function sets the internally storred temperature of the phase.
temp | Temperature in kelvin |
Reimplemented in DebyeHuckel, HMWSoln, VPStandardStateTP, and WaterSSTP.
Definition at line 343 of file State.h.
References State::m_temp.
Referenced by Phase::restoreState(), ThermoPhase::setState_HPorUV(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), Phase::setState_TNX(), ThermoPhase::setState_TP(), ThermoPhase::setState_TPX(), SingleSpeciesTP::setState_TPX(), ThermoPhase::setState_TPY(), SingleSpeciesTP::setState_TPY(), Phase::setState_TR(), Phase::setState_TRX(), Phase::setState_TRY(), Phase::setState_TX(), Phase::setState_TY(), SingleSpeciesTP::setState_UV(), ThermoPhase::setStateFromXML(), and SurfPhase::setStateFromXML().
virtual void setToEquilState | ( | const doublereal * | lambda_RT | ) | [inline, virtual, inherited] |
This method is used by the ChemEquil equilibrium solver.
It sets the state such that the chemical potentials satisfy
where is the element potential of element m. The temperature is unchanged. Any phase (ideal or not) that implements this method can be equilibrated by ChemEquil.
lambda_RT | Input vector of dimensionless element potentials The length is equal to nElements(). |
Reimplemented in ConstDensityThermo, DebyeHuckel, HMWSoln, IdealGasPhase, IdealMolalSoln, IdealSolidSolnPhase, IdealSolnGasVPSS, and MolalityVPSSTP.
Definition at line 1738 of file ThermoPhase.h.
References ThermoPhase::err().
doublereal siteDensity | ( | ) | [inline] |
Returns the site density.
Site density kmol m-2
Definition at line 431 of file SurfPhase.h.
References SurfPhase::m_n0.
doublereal size | ( | int | k | ) | const [inline, inherited] |
This routine returns the size of species k.
k | index of the species |
Definition at line 309 of file Constituents.h.
References Constituents::m_speciesSize.
Referenced by IdealSolidSolnPhase::constructPhaseXML(), IdealMolalSoln::constructPhaseXML(), HMWSoln::constructPhaseXML(), DebyeHuckel::constructPhaseXML(), SurfPhase::getCoverages(), SurfPhase::initThermo(), IdealMolalSoln::initThermoXML(), SurfPhase::setCoverages(), SurfPhase::setCoveragesNoNorm(), and SurfPhase::standardConcentration().
const std::vector< const XML_Node * > & speciesData | ( | ) | const [inherited] |
Return a pointer to the vector of XML nodes containing the species data for this phase.
Return a pointer to the XML tree containing the species data for this phase.
Definition at line 950 of file ThermoPhase.cpp.
References Phase::m_kk, and ThermoPhase::m_speciesData.
Referenced by MineralEQ3::initThermoXML(), HMWSoln::initThermoXML(), and DebyeHuckel::initThermoXML().
bool speciesFrozen | ( | ) | [inline, inherited] |
True if freezeSpecies has been called.
Definition at line 318 of file Constituents.h.
References Constituents::m_speciesFrozen.
int speciesIndex | ( | std::string | name | ) | const [inherited] |
Index of species named 'name'.
The first species added will have index 0, and the last one index nSpecies() - 1.
name | String name of the species |
Definition at line 414 of file Constituents.cpp.
References Constituents::m_speciesNames.
Referenced by HMWSoln::HMWSoln(), HMWSoln::initThermoXML(), DebyeHuckel::initThermoXML(), Kinetics::kineticsSpeciesIndex(), Phase::massFraction(), Phase::moleFraction(), HMWSoln::readXMLBinarySalt(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), MolalityVPSSTP::report(), and Kinetics::speciesPhase().
string speciesName | ( | int | k | ) | const [inherited] |
Name of the species with index k.
k | index of the species |
Definition at line 434 of file Constituents.cpp.
References Constituents::m_speciesNames, and Constituents::nSpecies().
Referenced by MolalityVPSSTP::findCLMIndex(), Phase::getMoleFractionsByName(), MultiPhase::init(), IdealMolalSoln::initThermoXML(), HMWSoln::initThermoXML(), DebyeHuckel::initThermoXML(), Kinetics::kineticsSpeciesName(), HMWSoln::readXMLBinarySalt(), ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), vcs_MultiPhaseEquil::reportCSV(), HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), SurfPhase::setCoveragesByName(), Phase::setMassFractionsByName(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), ThermoPhase::setState_TPX(), and ThermoPhase::setState_TPY().
const vector< string > & speciesNames | ( | ) | const [inherited] |
Return a const referernce to the vector of species names.
Definition at line 447 of file Constituents.cpp.
References Constituents::m_speciesNames.
Referenced by PDSS_SSVol::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_ConstVol::constructPDSSFile(), VPSSMgr_Water_HKFT::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_ConstVol::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), IdealMolalSoln::initThermoXML(), HMWSoln::initThermoXML(), and DebyeHuckel::initThermoXML().
SpeciesThermo& speciesThermo | ( | ) | [inline, inherited] |
Return a changeable reference to the calculation manager for species reference-state thermodynamic properties.
For internal use only.
Reimplemented in DebyeHuckel, HMWSoln, and IdealMolalSoln.
Definition at line 1899 of file ThermoPhase.h.
References ThermoPhase::m_spthermo.
Referenced by PDSS_SSVol::constructPDSSXML(), PDSS_ConstVol::constructPDSSXML(), PDSS_SSVol::initThermo(), PDSS_IdealGas::initThermo(), PDSS_ConstVol::initThermo(), VPSSMgrFactory::newVPSSMgr(), and PDSS::PDSS().
doublereal standardConcentration | ( | int | k = 0 |
) | const [virtual] |
Return the standard concentration for the kth species.
The standard concentration used to normalize the activity (i.e., generalized) concentration. For this phase, the standard concentration is species- specific
This definition implies that the activity is equal to .
k | Optional parameter indicating the species. The default is to assume this refers to species 0. |
Reimplemented from ThermoPhase.
Definition at line 236 of file SurfPhase.cpp.
References SurfPhase::m_n0, and Constituents::size().
Referenced by SurfPhase::getStandardVolumes().
int standardStateConvention | ( | ) | const [virtual, inherited] |
This method returns the convention used in specification of the standard state, of which there are currently two, temperature based, and variable pressure based.
Currently, there are two standard state conventions:
Reimplemented in VPStandardStateTP.
Definition at line 154 of file ThermoPhase.cpp.
References ThermoPhase::m_ssConvention.
void stateMFChangeCalc | ( | bool | forceChange = false |
) | [inline, inherited] |
Every time the mole fractions have changed, this routine will increment the stateMFNumber.
forceChange | If this is true then the stateMFNumber always changes. This defaults to false. |
Definition at line 31 of file State.cpp.
References State::m_stateNum.
Referenced by State::setConcentrations(), State::setMassFractions(), State::setMassFractions_NoNorm(), State::setMoleFractions(), and State::setMoleFractions_NoNorm().
int stateMFNumber | ( | ) | const [inline, inherited] |
Return the state number.
Return the State Mole Fraction Number.
Definition at line 445 of file State.h.
References State::m_stateNum.
doublereal sum_xlogQ | ( | doublereal *const | Q | ) | const [inherited] |
Evaluate .
Q | Vector of length m_kk to take the log average of |
Definition at line 188 of file State.cpp.
References State::m_mmw, and State::m_ym.
doublereal sum_xlogx | ( | ) | const [inherited] |
Evaluate .
Definition at line 184 of file State.cpp.
References State::m_mmw, and State::m_ym.
Referenced by IdealSolnGasVPSS::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), IdealGasPhase::entropy_mole(), and IdealSolidSolnPhase::gibbs_mole().
doublereal temperature | ( | ) | const [inline, inherited] |
Temperature (K).
Definition at line 309 of file State.h.
References State::m_temp.
Referenced by ThermoPhase::_RT(), VPStandardStateTP::_updateStandardStateThermo(), SurfPhase::_updateThermo(), SingleSpeciesTP::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), IdealGasPhase::_updateThermo(), HMWSoln::A_Debye_TP(), DebyeHuckel::A_Debye_TP(), MultiPhase::addPhase(), HMWSoln::ADebye_J(), HMWSoln::ADebye_L(), HMWSoln::ADebye_V(), IdealSolnGasVPSS::calcDensity(), HMWSoln::calcDensity(), LatticePhase::cp_mole(), ConstDensityThermo::cp_mole(), SingleSpeciesTP::cv_mole(), HMWSoln::d2A_DebyedT2_TP(), DebyeHuckel::d2A_DebyedT2_TP(), HMWSoln::dA_DebyedP_TP(), DebyeHuckel::dA_DebyedP_TP(), HMWSoln::dA_DebyedT_TP(), DebyeHuckel::dA_DebyedT_TP(), WaterSSTP::dthermalExpansionCoeffdT(), IdealSolnGasVPSS::enthalpy_mole(), IdealSolidSolnPhase::enthalpy_mole(), IdealGasPhase::enthalpy_mole(), SurfPhase::getChemPotentials(), IdealSolnGasVPSS::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), IdealMolalSoln::getChemPotentials(), IdealGasPhase::getChemPotentials(), HMWSoln::getChemPotentials(), DebyeHuckel::getChemPotentials(), SingleSpeciesTP::getChemPotentials_RT(), IdealSolidSolnPhase::getChemPotentials_RT(), WaterSSTP::getCp_R_ref(), ThermoPhase::getElementPotentials(), WaterSSTP::getEnthalpy_RT(), SurfPhase::getEnthalpy_RT(), StoichSubstanceSSTP::getEnthalpy_RT(), MineralEQ3::getEnthalpy_RT(), IdealSolidSolnPhase::getEnthalpy_RT(), WaterSSTP::getEnthalpy_RT_ref(), WaterSSTP::getEntropy_R_ref(), SingleSpeciesTP::getGibbs_ref(), IdealSolidSolnPhase::getGibbs_ref(), WaterSSTP::getGibbs_RT(), SurfPhase::getGibbs_RT(), WaterSSTP::getGibbs_RT_ref(), StoichSubstanceSSTP::getIntEnergy_RT(), MineralEQ3::getIntEnergy_RT(), IdealSolidSolnPhase::getIntEnergy_RT(), StoichSubstanceSSTP::getIntEnergy_RT_ref(), MineralEQ3::getIntEnergy_RT_ref(), MetalSHEelectrons::getIntEnergy_RT_ref(), IdealSolidSolnPhase::getIntEnergy_RT_ref(), HMWSoln::getPartialMolarCp(), DebyeHuckel::getPartialMolarCp(), SurfPhase::getPartialMolarEnthalpies(), SingleSpeciesTP::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), IdealSolidSolnPhase::getPartialMolarEnthalpies(), IdealGasPhase::getPartialMolarEnthalpies(), HMWSoln::getPartialMolarEnthalpies(), DebyeHuckel::getPartialMolarEnthalpies(), HMWSoln::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), SingleSpeciesTP::getPartialMolarIntEnergies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), IdealGasPhase::getPartialMolarIntEnergies(), HMWSoln::getPartialMolarVolumes(), DebyeHuckel::getPartialMolarVolumes(), SingleSpeciesTP::getPureGibbs(), WaterSSTP::getStandardChemPotentials(), StoichSubstanceSSTP::getStandardChemPotentials(), MineralEQ3::getStandardChemPotentials(), MetalSHEelectrons::getStandardChemPotentials(), IdealGasPhase::getStandardChemPotentials(), WaterSSTP::getStandardVolumes_ref(), IdealSolnGasVPSS::gibbs_mole(), IdealSolidSolnPhase::gibbs_mole(), IdealGasPhase::gibbs_mole(), IdealSolidSolnPhase::intEnergy_mole(), IdealGasPhase::intEnergy_mole(), IdealGasPhase::logStandardConc(), IdealGasPhase::pressure(), ThermoPhase::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), HMWSoln::s_updatePitzer_CoeffWRTemp(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), WaterSSTP::satPressure(), HMWSoln::satPressure(), Phase::saveState(), WaterSSTP::setDensity(), ThermoPhase::setElementPotentials(), WaterSSTP::setPressure(), VPStandardStateTP::setPressure(), IdealMolalSoln::setPressure(), IdealGasPhase::setPressure(), DebyeHuckel::setPressure(), SingleSpeciesTP::setState_HP(), ThermoPhase::setState_HPorUV(), SingleSpeciesTP::setState_SP(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), SingleSpeciesTP::setState_UV(), IdealSolnGasVPSS::standardConcentration(), IdealGasPhase::standardConcentration(), MetalSHEelectrons::thermalExpansionCoeff(), IdealGasPhase::thermalExpansionCoeff(), VPStandardStateTP::updateStandardStateThermo(), and WaterSSTP::vaporFraction().
virtual doublereal thermalExpansionCoeff | ( | ) | const [inline, virtual, inherited] |
Return the volumetric thermal expansion coefficient. Units: 1/K.
The thermal expansion coefficient is defined as
Reimplemented in DebyeHuckel, HMWSoln, IdealGasPhase, IdealMolalSoln, MetalSHEelectrons, MineralEQ3, PureFluidPhase, StoichSubstanceSSTP, and WaterSSTP.
Definition at line 966 of file ThermoPhase.h.
References ThermoPhase::err().
Referenced by SingleSpeciesTP::cv_mole().
virtual void updateDensity | ( | ) | [inline, virtual, inherited] |
virtual doublereal vaporFraction | ( | ) | const [inline, virtual, inherited] |
Return the fraction of vapor at the current conditions.
Reimplemented in DebyeHuckel, HMWSoln, PureFluidPhase, SingleSpeciesTP, and WaterSSTP.
Definition at line 1822 of file ThermoPhase.h.
References ThermoPhase::err().
XML_Node & xml | ( | ) | [inherited] |
Returns a reference to the XML_Node storred for the phase.
The XML_Node for the phase contains all of the input data used to set up the model for the phase, during its initialization.
Definition at line 112 of file Phase.cpp.
References Phase::m_xml.
Referenced by WaterSSTP::constructPhaseFile(), IdealSolidSolnPhase::constructPhaseFile(), IdealMolalSoln::constructPhaseFile(), HMWSoln::constructPhaseFile(), DebyeHuckel::constructPhaseFile(), and ThermoPhase::initThermoFile().
bool m_chargeNeutralityNecessary [protected, inherited] |
Boolean indicating whether a charge neutrality condition is a necessity.
Note, the charge neutrality condition is not a necessity for ideal gas phases. There may be a net charge in those phases, because the NASA polynomials for ionized species in Ideal gases take this condition into account. However, liquid phases usually require charge neutrality in order for their derived thermodynamics to be valid.
Definition at line 2130 of file ThermoPhase.h.
Referenced by ThermoPhase::chargeNeutralityNecessary(), MolalityVPSSTP::MolalityVPSSTP(), and ThermoPhase::operator=().
array_fp m_cp0 [mutable, protected] |
Temporary storage for the reference state heat capacities.
Definition at line 668 of file SurfPhase.h.
Referenced by SurfPhase::_updateThermo(), SurfPhase::getCp_R(), SurfPhase::initThermo(), and SurfPhase::operator=().
Elements* m_Elements [protected, inherited] |
Pointer to the element object corresponding to this phase. Normally, this will be the default Element object common to all phases.
Definition at line 366 of file Constituents.h.
Referenced by Constituents::addElement(), Constituents::addElementsFromXML(), Constituents::addUniqueElement(), Constituents::addUniqueSpecies(), Constituents::atomicNumber(), Constituents::atomicWeight(), Constituents::atomicWeights(), Constituents::Constituents(), Constituents::elementIndex(), Constituents::elementName(), Constituents::elementNames(), Constituents::elementsFrozen(), Constituents::entropyElement298(), Constituents::freezeElements(), Constituents::getAtoms(), Constituents::nAtoms(), Constituents::nElements(), Constituents::operator=(), Constituents::ready(), and Constituents::~Constituents().
array_fp m_h0 [mutable, protected] |
Temporary storage for the reference state enthalpies.
Definition at line 662 of file SurfPhase.h.
Referenced by SurfPhase::_updateThermo(), SurfPhase::enthalpy_mole(), SurfPhase::getEnthalpy_RT(), SurfPhase::initThermo(), and SurfPhase::operator=().
bool m_hasElementPotentials [protected, inherited] |
Boolean indicating whether there is a valid set of saved element potentials for this phase.
Definition at line 2120 of file ThermoPhase.h.
Referenced by ThermoPhase::getElementPotentials(), ThermoPhase::operator=(), and ThermoPhase::setElementPotentials().
int m_index [protected, inherited] |
Index number of the phase.
The Cantera interface library uses this member to set the index number to the location of the pointer to this object in the pointer array of ThermoPhase's it maintains. Using this member for any other purpose will lead to unpredictable results if used in conjunction with the interface library.
Reimplemented from Phase.
Definition at line 2106 of file ThermoPhase.h.
Referenced by ThermoPhase::index(), ThermoPhase::operator=(), and ThermoPhase::setIndex().
int m_kk [protected, inherited] |
m_kk = Number of species in the phase.
For internal use only.
m_kk is a member of both the State and Constituents classes. Therefore, to avoid multiple inheritance problems, we need to restate it in here, so that the declarations in the two base classes become hidden.
Reimplemented from Constituents.
Definition at line 504 of file Phase.h.
Referenced by DebyeHuckel::_lnactivityWaterHelgesonFixedForm(), SurfPhase::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), IdealGasPhase::_updateThermo(), IdealMolalSoln::calcDensity(), DebyeHuckel::calcDensity(), MolalityVPSSTP::calcMolalities(), ConstDensityThermo::expGibbs_RT(), IdealSolidSolnPhase::expGibbs_RT_ref(), IdealGasPhase::expGibbs_RT_ref(), MolalityVPSSTP::findCLMIndex(), Phase::freezeSpecies(), IdealMolalSoln::getActivities(), DebyeHuckel::getActivities(), ThermoPhase::getActivityCoefficients(), SingleSpeciesTP::getActivityCoefficients(), MolalityVPSSTP::getActivityCoefficients(), IdealSolnGasVPSS::getActivityCoefficients(), IdealSolidSolnPhase::getActivityCoefficients(), IdealGasPhase::getActivityCoefficients(), IdealSolnGasVPSS::getActivityConcentrations(), IdealSolidSolnPhase::getActivityConcentrations(), IdealMolalSoln::getActivityConcentrations(), DebyeHuckel::getActivityConcentrations(), SurfPhase::getChemPotentials(), IdealSolnGasVPSS::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), IdealMolalSoln::getChemPotentials(), IdealGasPhase::getChemPotentials(), DebyeHuckel::getChemPotentials(), VPStandardStateTP::getChemPotentials_RT(), IdealSolnGasVPSS::getChemPotentials_RT(), IdealSolidSolnPhase::getChemPotentials_RT(), SurfPhase::getCoverages(), IdealSolidSolnPhase::getCp_R_ref(), ThermoPhase::getElectrochemPotentials(), MolalityVPSSTP::getElectrochemPotentials(), IdealSolidSolnPhase::getEnthalpy_RT(), IdealSolidSolnPhase::getEnthalpy_RT_ref(), IdealGasPhase::getEntropy_R(), IdealSolidSolnPhase::getEntropy_R_ref(), WaterSSTP::getGibbs_ref(), IdealSolidSolnPhase::getGibbs_ref(), IdealSolidSolnPhase::getGibbs_RT(), IdealGasPhase::getGibbs_RT(), IdealSolidSolnPhase::getGibbs_RT_ref(), IdealSolidSolnPhase::getIntEnergy_RT(), IdealGasPhase::getIntEnergy_RT(), IdealSolidSolnPhase::getIntEnergy_RT_ref(), IdealGasPhase::getIntEnergy_RT_ref(), MolalityVPSSTP::getMolalities(), IdealMolalSoln::getMolalityActivityCoefficients(), DebyeHuckel::getMolalityActivityCoefficients(), SurfPhase::getPartialMolarCp(), IdealSolnGasVPSS::getPartialMolarCp(), IdealSolidSolnPhase::getPartialMolarCp(), IdealMolalSoln::getPartialMolarCp(), DebyeHuckel::getPartialMolarCp(), SurfPhase::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), IdealMolalSoln::getPartialMolarEnthalpies(), DebyeHuckel::getPartialMolarEnthalpies(), SurfPhase::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarEntropies(), IdealSolidSolnPhase::getPartialMolarEntropies(), IdealMolalSoln::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), IdealGasPhase::getPartialMolarIntEnergies(), IdealGasPhase::getPartialMolarVolumes(), DebyeHuckel::getPartialMolarVolumes(), IdealSolidSolnPhase::getPureGibbs(), IdealGasPhase::getPureGibbs(), ThermoPhase::getReferenceComposition(), VPStandardStateTP::getStandardChemPotentials(), IdealGasPhase::getStandardChemPotentials(), SurfPhase::getStandardVolumes(), IdealGasPhase::getStandardVolumes(), IdealGasPhase::getStandardVolumes_ref(), HMWSoln::HMWSoln(), VPStandardStateTP::initLengths(), MolalityVPSSTP::initLengths(), IdealSolnGasVPSS::initLengths(), IdealSolidSolnPhase::initLengths(), IdealMolalSoln::initLengths(), DebyeHuckel::initLengths(), VPStandardStateTP::initThermo(), ThermoPhase::initThermo(), SurfPhase::initThermo(), StoichSubstanceSSTP::initThermo(), SingleSpeciesTP::initThermo(), IdealGasPhase::initThermo(), VPStandardStateTP::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), IdealMolalSoln::initThermoXML(), HMWSoln::initThermoXML(), DebyeHuckel::initThermoXML(), IdealSolidSolnPhase::logStandardConc(), VPStandardStateTP::operator=(), ThermoPhase::operator=(), Phase::operator=(), MolalityVPSSTP::osmoticCoefficient(), HMWSoln::readXMLBinarySalt(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), Phase::ready(), IdealSolidSolnPhase::referenceConcentration(), DebyeHuckel::s_update_d2lnMolalityActCoeff_dT2(), DebyeHuckel::s_update_dlnMolalityActCoeff_dP(), DebyeHuckel::s_update_dlnMolalityActCoeff_dT(), DebyeHuckel::s_update_lnMolalityActCoeff(), IdealMolalSoln::s_updateIMS_lnMolalityActCoeff(), SurfPhase::setCoverages(), SurfPhase::setCoveragesNoNorm(), MolalityVPSSTP::setMolalities(), ThermoPhase::setReferenceComposition(), MolalityVPSSTP::setSolvent(), IdealSolnGasVPSS::setToEquilState(), IdealSolidSolnPhase::setToEquilState(), IdealGasPhase::setToEquilState(), ThermoPhase::speciesData(), IdealSolidSolnPhase::standardConcentration(), and ThermoPhase::~ThermoPhase().
vector_fp m_lambdaRRT [protected, inherited] |
Vector of element potentials.
-> length equal to number of elements
Definition at line 2116 of file ThermoPhase.h.
Referenced by ThermoPhase::getElementPotentials(), ThermoPhase::operator=(), and ThermoPhase::setElementPotentials().
doublereal m_logn0 [protected] |
log of the surface site density
Definition at line 639 of file SurfPhase.h.
Referenced by SurfPhase::logStandardConc(), SurfPhase::operator=(), SurfPhase::setParameters(), EdgePhase::setParametersFromXML(), SurfPhase::setParametersFromXML(), and SurfPhase::SurfPhase().
array_fp m_logsize [mutable, protected] |
vector storring the log of the size of each species.
The size of each species is defined as the number of surface sites each species occupies.
Definition at line 692 of file SurfPhase.h.
Referenced by SurfPhase::initThermo(), SurfPhase::logStandardConc(), and SurfPhase::operator=().
array_fp m_mu0 [mutable, protected] |
Temporary storage for the reference state gibbs energies.
Definition at line 671 of file SurfPhase.h.
Referenced by SurfPhase::_updateThermo(), SurfPhase::getChemPotentials(), SurfPhase::getGibbs_RT(), SurfPhase::getStandardChemPotentials(), SurfPhase::initThermo(), and SurfPhase::operator=().
doublereal m_n0 [protected] |
Surface site density (kmol m-2).
Definition at line 636 of file SurfPhase.h.
Referenced by SurfPhase::enthalpy_mole(), SurfPhase::getCoverages(), SurfPhase::operator=(), SurfPhase::setCoverages(), SurfPhase::setCoveragesNoNorm(), SurfPhase::setParameters(), EdgePhase::setParametersFromXML(), SurfPhase::setParametersFromXML(), SurfPhase::siteDensity(), and SurfPhase::standardConcentration().
int m_ndim [protected, inherited] |
m_ndim is the dimensionality of the phase.
Volumetric phases have dimensionality 3 and surface phases have dimensionality 2.
Definition at line 511 of file Phase.h.
Referenced by Phase::nDim(), Phase::operator=(), and Phase::setNDim().
array_fp m_pe [mutable, protected] |
Potential energy of each species in the surface phase.
Definition at line 685 of file SurfPhase.h.
Referenced by SurfPhase::initThermo(), SurfPhase::operator=(), SurfPhase::potentialEnergy(), and SurfPhase::setPotentialEnergy().
doublereal m_phi [protected, inherited] |
Storred value of the electric potential for this phase.
Units are Volts
Definition at line 2112 of file ThermoPhase.h.
Referenced by ThermoPhase::electricPotential(), IdealMolalSoln::electricPotential(), ThermoPhase::operator=(), ThermoPhase::setElectricPotential(), and IdealMolalSoln::setElectricPotential().
doublereal m_press [protected] |
Current value of the pressure (Pa).
Definition at line 656 of file SurfPhase.h.
Referenced by SurfPhase::operator=(), SurfPhase::pressure(), and SurfPhase::setPressure().
array_fp m_s0 [mutable, protected] |
Temporary storage for the reference state entropies.
Definition at line 665 of file SurfPhase.h.
Referenced by SurfPhase::_updateThermo(), SurfPhase::getEntropy_R(), SurfPhase::initThermo(), and SurfPhase::operator=().
vector_fp m_speciesCharge [protected, inherited] |
m_speciesCharge: Vector of species charges length = m_kk
Definition at line 383 of file Constituents.h.
Referenced by Constituents::addUniqueSpecies(), HMWSoln::applyphScale(), Constituents::charge(), HMWSoln::initThermoXML(), DebyeHuckel::initThermoXML(), Constituents::operator=(), HMWSoln::readXMLBinarySalt(), HMWSoln::readXMLLambdaNeutral(), HMWSoln::readXMLMunnnNeutral(), HMWSoln::readXMLPsiCommonAnion(), HMWSoln::readXMLPsiCommonCation(), HMWSoln::readXMLThetaAnion(), HMWSoln::readXMLThetaCation(), HMWSoln::readXMLZetaCation(), DebyeHuckel::s_update_d2lnMolalityActCoeff_dT2(), DebyeHuckel::s_update_dlnMolalityActCoeff_dP(), DebyeHuckel::s_update_dlnMolalityActCoeff_dT(), DebyeHuckel::s_update_lnMolalityActCoeff(), HMWSoln::s_updatePitzer_CoeffWRTemp(), HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), HMWSoln::s_updateScaling_pHScaling(), HMWSoln::s_updateScaling_pHScaling_dT(), and HMWSoln::s_updateScaling_pHScaling_dT2().
vector_fp m_speciesComp [protected, inherited] |
Atomic composition of the species.
the number of atoms of i in species k is equal to m_speciesComp[k * m_mm + i] The length of this vector is equal to m_kk * m_mm
Definition at line 377 of file Constituents.h.
Referenced by Constituents::addUniqueSpecies(), Constituents::getAtoms(), Constituents::nAtoms(), and Constituents::operator=().
std::vector<const XML_Node *> m_speciesData [protected, inherited] |
Vector of pointers to the species databases.
This is used to access data needed to construct the transport manager and other properties later in the initialization process. We create a copy of the XML_Node data read in here. Therefore, we own this data.
Definition at line 2096 of file ThermoPhase.h.
Referenced by ThermoPhase::operator=(), ThermoPhase::saveSpeciesData(), ThermoPhase::speciesData(), and ThermoPhase::~ThermoPhase().
bool m_speciesFrozen [protected, inherited] |
Boolean indicating whether the number of species has been frozen.
During the construction of the phase, this is false. After construction of the the phase, this is true.
Definition at line 359 of file Constituents.h.
Referenced by Constituents::freezeSpecies(), Constituents::operator=(), Constituents::ready(), and Constituents::speciesFrozen().
std::vector<std::string> m_speciesNames [protected, inherited] |
Vector of the species names.
Definition at line 369 of file Constituents.h.
Referenced by Constituents::addUniqueSpecies(), Constituents::operator=(), Constituents::speciesIndex(), Constituents::speciesName(), and Constituents::speciesNames().
vector_fp m_speciesSize [protected, inherited] |
m_speciesSize(): Vector of species sizes.
length m_kk This is used in some equations of state which employ the constant partial molar volume approximation. It's so fundamental we've put it at the Constituents class level
Definition at line 393 of file Constituents.h.
Referenced by Constituents::addUniqueSpecies(), HMWSoln::initLengths(), DebyeHuckel::initLengths(), MineralEQ3::initThermoXML(), HMWSoln::initThermoXML(), DebyeHuckel::initThermoXML(), Constituents::operator=(), Constituents::size(), and DebyeHuckel::standardConcentration().
SpeciesThermo* m_spthermo [protected, inherited] |
Pointer to the calculation manager for species reference-state thermodynamic properties.
This class is called when the reference-state thermodynamic properties of all the species in the phase needs to be evaluated.
Definition at line 2086 of file ThermoPhase.h.
Referenced by SurfPhase::_updateThermo(), SingleSpeciesTP::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), IdealGasPhase::_updateThermo(), IdealGasPhase::entropy_mole(), IdealGasPhase::getEntropy_R(), IdealGasPhase::getGibbs_RT(), IdealGasPhase::getPartialMolarEntropies(), IdealGasPhase::getPureGibbs(), IdealGasPhase::getStandardChemPotentials(), IdealSolidSolnPhase::initLengths(), StoichSubstanceSSTP::initThermo(), SingleSpeciesTP::initThermo(), IdealGasPhase::initThermo(), WaterSSTP::initThermoXML(), ThermoPhase::maxTemp(), ThermoPhase::minTemp(), VPStandardStateTP::operator=(), ThermoPhase::operator=(), ThermoPhase::refPressure(), ThermoPhase::setSpeciesThermo(), ThermoPhase::speciesThermo(), IdealMolalSoln::speciesThermo(), HMWSoln::speciesThermo(), DebyeHuckel::speciesThermo(), and ThermoPhase::~ThermoPhase().
int m_ssConvention [protected, inherited] |
Contains the standard state convention.
Definition at line 2133 of file ThermoPhase.h.
Referenced by ThermoPhase::operator=(), and ThermoPhase::standardStateConvention().
doublereal m_tlast [mutable, protected] |
Current value of the temperature (Kelvin).
Definition at line 659 of file SurfPhase.h.
Referenced by SurfPhase::_updateThermo(), and SurfPhase::operator=().
doublereal m_tmax [protected] |
Maximum temperature for valid species standard state thermo props.
This is the maximum temperature at which all species have valid standard state thermo props defined.
Definition at line 653 of file SurfPhase.h.
Referenced by SurfPhase::operator=().
doublereal m_tmin [protected] |
Minimum temperature for valid species standard state thermo props.
This is the minimum temperature at which all species have valid standard state thermo props defined.
Definition at line 646 of file SurfPhase.h.
Referenced by SurfPhase::operator=().
vector_fp m_weight [protected, inherited] |
Vector of molecular weights of the species.
This vector has length m_kk. The units of the vector are kg kmol-1.
Definition at line 352 of file Constituents.h.
Referenced by WaterSSTP::initThermoXML(), Constituents::molecularWeight(), Constituents::molecularWeights(), and Constituents::operator=().
array_fp m_work [mutable, protected] |
Temporary work array.
Definition at line 674 of file SurfPhase.h.
Referenced by SurfPhase::getChemPotentials(), SurfPhase::initThermo(), SurfPhase::operator=(), SurfPhase::setCoverages(), and SurfPhase::setCoveragesNoNorm().
std::vector<doublereal> xMol_Ref [protected, inherited] |
Reference Mole Fraction Composition.
Occasionally, the need arises to find a safe mole fraction vector to initialize the object to. This contains such a vector. The algorithm will pick up the mole fraction vector that is applied from the state xml file in the input file
Definition at line 2142 of file ThermoPhase.h.
Referenced by ThermoPhase::getReferenceComposition(), ThermoPhase::initThermo(), and ThermoPhase::setReferenceComposition().