Phase Class Reference
[Models of Phases of Matter]

Base class for phases of mater. More...

#include <Phase.h>

Inheritance diagram for Phase:
Inheritance graph
[legend]
Collaboration diagram for Phase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Phase ()
 Default constructor.
virtual ~Phase ()
 Destructor.
 Phase (const Phase &right)
 Copy Constructor.
Phaseoperator= (const Phase &right)
 Assignment operator.
XML_Nodexml ()
 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.
int index () const
 Returns the index of the phase.
void setIndex (int m)
 Sets the index of 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.
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

These methods are used to add new elements or species.

These are not usually called by user programs.

Since species are checked to insure that they are only composed of declared elements, it is necessary to first add all elements before adding any 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

These methods are used to add new species.

They are not usually called by user programs.

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:

\[ \sum_k X_k Q_k. \]

Array Q should contain pure-species molar property values.

doublereal mean_Y (const doublereal *const Q) const
 Evaluate the mass-fraction-weighted mean of Q:

\[ \sum_k Y_k Q_k \]

.

doublereal meanMolecularWeight () const
 The mean molecular weight.
doublereal sum_xlogx () const
 Evaluate $ \sum_k X_k \log X_k $.
doublereal sum_xlogQ (doublereal *const Q) const
 Evaluate $ \sum_k X_k \log Q_k $.
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

int m_kk
 m_kk = Number of species in the phase.
int m_ndim
 m_ndim is the dimensionality of the phase.
int m_index
 m_index is the index 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.
Elementsm_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 Attributes

vector_fp m_data
 This stores the initial state of the system.
XML_Nodem_xml
 Pointer to the XML node containing the XML info for this phase.
std::string m_id
 ID of the phase.
std::string m_name
 Name of the phase.

Detailed Description

Base class for phases of mater.

Base class for phases of matter. Class Phase derives from both Constituents and State. In addition to the methods of those two classes, it implements methods that allow referencing a species by name.

Class Phase derives from both clases Constituents and State. In addition to the methods of those two classes, it implements methods that allow referencing a species by name. And, it contains a lot of utility functions that will set the State of the phase in its entirety, by first setting the composition, then the temperature and then the density. An example of this is the function, Phase::setState_TRY(doublereal t, doublereal dens, const doublereal* y).

Class Phase contains method for saving and restoring the full internal states of each phase. These are called Phase::saveState() and Phase::restoreState(). These functions operate on a state vector, which is in general of length (2 + nSpecies()). The first two entries of the state vector is temperature and density.

Todo:
Make the concept of saving state vectors more general, so that it can handle other cases where there are additional internal state variables, such as the voltage, a potential energy, or a strain field.

Definition at line 149 of file Phase.h.


Constructor & Destructor Documentation

Phase (  ) 

Default constructor.

Definition at line 24 of file Phase.cpp.

~Phase (  )  [virtual]

Destructor.

Definition at line 105 of file Phase.cpp.

References Phase::m_xml.

Phase ( const Phase right  ) 

Copy Constructor.

Parameters:
right Reference to the class to be used in the copy

Definition at line 42 of file Phase.cpp.

References Phase::operator=().


Member Function Documentation

void addElement ( const XML_Node e  )  [inherited]

Add an element from an XML specification.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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]
doublereal chargeDensity (  )  const

Charge density [C/m^3].

Definition at line 334 of file Phase.cpp.

References Constituents::charge(), Phase::moleFraction(), and Constituents::nSpecies().

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.

Parameters:
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.

virtual doublereal density (  )  const [inline, virtual, inherited]
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.

Parameters:
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.

Parameters:
m Element index.
Exceptions:
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 entropyElement298 ( int  m  )  const [inherited]

Entropy of the element in its standard state at 298 K and 1 bar.

Parameters:
m Element index

Definition at line 100 of file Constituents.cpp.

References Elements::entropyElement298(), and Constituents::m_Elements.

Referenced by PDSS_HKFT::LookupGe().

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]

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 getAtoms ( int  k,
double *  atomArray 
) const [inherited]

Get a vector containing the atomic composition of species k.

Parameters:
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 getConcentrations ( doublereal *const   c  )  const [inherited]

Get the species concentrations (kmol/m^3).

Parameters:
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 getMassFractions ( doublereal *const   y  )  const [inherited]

Get the species mass fractions.

Parameters:
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

Copy the vector of molecular weights into array weights.

Parameters:
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

Copy the vector of molecular weights into array weights.

Parameters:
iwt Unused.
weights Output array of molecular weights (kg/kmol)
Deprecated:

Definition at line 281 of file Phase.cpp.

References Phase::molecularWeights().

void getMolecularWeights ( vector_fp &  weights  )  const

Copy the vector of molecular weights into vector weights.

Parameters:
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]
void getMoleFractionsByName ( compositionMap x  )  const

Get the mole fractions by name.

Parameters:
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().

std::string id (  )  const

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

Returns the index of the phase.

The index is used in the Python and matlab interfaces to index into a list of ThermoPhase objects

Reimplemented in ThermoPhase.

Definition at line 132 of file Phase.cpp.

References Phase::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.

Parameters:
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().

doublereal massFraction ( std::string  name  )  const

Return the mass fraction of a single species.

Parameters:
name String name of the species
Returns:
Mass Fraction of the species

Definition at line 328 of file Phase.cpp.

References State::massFractions(), and Constituents::speciesIndex().

doublereal massFraction ( int  k  )  const

Return the mass fraction of a single species.

Parameters:
k String name of the species
Returns:
Mass Fraction of the species

Reimplemented from State.

Definition at line 324 of file Phase.cpp.

const doublereal* massFractions (  )  const [inline, inherited]

Returns a read-only pointer to the start of the massFraction array.

The pointer returned is readonly

Returns:
returns a pointer to a vector of doubles of length m_kk.

Definition at line 242 of file State.h.

References State::m_y.

Referenced by Phase::massFraction().

doublereal mean_X ( const doublereal *const   Q  )  const [inherited]
doublereal mean_Y ( const doublereal *const   Q  )  const [inherited]

Evaluate the mass-fraction-weighted mean of Q:

\[ \sum_k Y_k Q_k \]

.

Parameters:
Q Array Q contains a vector of species property values in mass units.
Returns:
Return value containing the mass-fraction-weighted mean of Q.

Definition at line 227 of file State.cpp.

References Cantera::dot(), and State::m_y.

doublereal meanMolecularWeight (  )  const [inline, inherited]
doublereal molarDensity (  )  const [inherited]
doublereal molarMass ( int  k  )  const [inline, inherited]

Return the Molar mass of species k.

Preferred name for molecular weight.

Parameters:
k index for species
Returns:
Return the molar mass of species k kg/kmol.

Definition at line 240 of file Constituents.h.

References Constituents::molecularWeight().

doublereal molecularWeight ( int  k  )  const [inherited]
const array_fp & molecularWeights (  )  const

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

Return the mole fraction of a single species.

Parameters:
name String name of the species
Returns:
Mole fraction of the species

Definition at line 318 of file Phase.cpp.

References Phase::moleFraction(), and Constituents::speciesIndex().

doublereal moleFraction ( int  k  )  const
std::string name (  )  const

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]
int nDim (  )  const [inline]
int nElements (  )  const [inherited]
int nSpecies (  )  const [inline, inherited]
Phase & operator= ( const Phase right  ) 

Assignment operator.

Parameters:
right Reference to the class to be used in the copy

Definition at line 67 of file Phase.cpp.

References Phase::m_data, Phase::m_id, Phase::m_index, Phase::m_kk, Phase::m_name, Phase::m_ndim, and Phase::m_xml.

Referenced by Phase::Phase().

bool ready (  )  const [virtual]

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().

void restoreState ( int  lenstate,
const doublereal *  state 
)

Restore the state of the phase from a previously saved state vector.

Parameters:
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  ) 

Restore a state saved on a previous call to saveState.

Parameters:
state State vector containing the previously saved state.

Definition at line 150 of file Phase.cpp.

void saveState ( int  lenstate,
doublereal *  state 
) const

Write to array 'state' the current internal state.

Parameters:
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

Save the current internal state of the phase.

Write to vector 'state' the current internal state.

Parameters:
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.

Parameters:
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().

virtual void setDensity ( const doublereal  density  )  [inline, virtual, inherited]
void setID ( std::string  id  ) 

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.

Parameters:
id String id of the phase

Definition at line 120 of file Phase.cpp.

References Phase::m_id.

void setIndex ( int  m  ) 

Sets the index of the phase.

The index is used in the Python and matlab interfaces to index into a list of ThermoPhase objects

Parameters:
m Integer index of the phase

Reimplemented in ThermoPhase.

Definition at line 136 of file Phase.cpp.

References Phase::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.

Parameters:
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.

Parameters:
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  ) 

Set the species mass fractions by name.

Species not listed by name in x are set to zero.

Parameters:
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  ) 

Set the species mass fractions by name.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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  ) 

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.

Parameters:
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  ) 

Set the species mole fractions by name.

Parameters:
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  ) 

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.

Parameters:
nm String name of the phase

Definition at line 128 of file Phase.cpp.

References Phase::m_name.

void setNDim ( int  ndim  )  [inline]

Set the number of spatial dimensions (1, 2, or 3).

The number of spatial dimensions is used for vector involving directions.

Parameters:
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 setState_RX ( doublereal  rho,
doublereal *  x 
)

Set the density (kg/m^3) and mole fractions.

Parameters:
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 
)

Set the density (kg/m^3) and mass fractions.

Parameters:
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_TNX ( doublereal  t,
doublereal  n,
const doublereal *  x 
)

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

Parameters:
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_TR ( doublereal  t,
doublereal  rho 
)

Set the internally storred temperature (K) and density (kg/m^3).

Set the temperature (K) and density (kg/m^3).

Parameters:
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 
)

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

Parameters:
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 
)

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

Parameters:
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 
)

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

Parameters:
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 
)

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

Parameters:
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().

void setState_TX ( doublereal  t,
doublereal *  x 
)

Set the internally storred temperature (K) and mole fractions.

Set the temperature (K) and mole fractions.

Parameters:
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 
)

Set the internally storred temperature (K) and mass fractions.

Set the temperature (K) and mass fractions.

Parameters:
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().

virtual void setTemperature ( const doublereal  temp  )  [inline, virtual, inherited]
doublereal size ( int  k  )  const [inline, inherited]
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]
string speciesName ( int  k  )  const [inherited]
const vector< string > & speciesNames (  )  const [inherited]
void stateMFChangeCalc ( bool  forceChange = false  )  [inline, inherited]

Every time the mole fractions have changed, this routine will increment the stateMFNumber.

Parameters:
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 $ \sum_k X_k \log Q_k $.

Parameters:
Q Vector of length m_kk to take the log average of
Returns:
Returns the indicated sum.

Definition at line 188 of file State.cpp.

References State::m_mmw, and State::m_ym.

doublereal sum_xlogx (  )  const [inherited]

Evaluate $ \sum_k X_k \log X_k $.

Returns:
returns the indicated sum. units are dimensionless.

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().

XML_Node & xml (  ) 

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().


Member Data Documentation

vector_fp m_data [private]

This stores the initial state of the system.

Deprecated:
This doesn't seem to be used much anymore.

Definition at line 525 of file Phase.h.

Referenced by Phase::freezeSpecies(), and Phase::operator=().

Elements* m_Elements [protected, inherited]
std::string m_id [private]

ID of the phase.

This is the value of the ID attribute of the XML phase node.

Definition at line 534 of file Phase.h.

Referenced by Phase::id(), Phase::operator=(), and Phase::setID().

int m_index [protected]

m_index is the index of the phase

Reimplemented in ThermoPhase.

Definition at line 516 of file Phase.h.

Referenced by Phase::index(), Phase::operator=(), and Phase::setIndex().

int m_kk [protected]

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().

std::string m_name [private]

Name of the phase.

Initially, this is the value of the ID attribute of the XML phase node.

Definition at line 540 of file Phase.h.

Referenced by Phase::name(), Phase::operator=(), and Phase::setName().

int m_ndim [protected]

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().

vector_fp m_speciesCharge [protected, inherited]
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=().

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_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().

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=().

XML_Node* m_xml [private]

Pointer to the XML node containing the XML info for this phase.

Definition at line 528 of file Phase.h.

Referenced by Phase::operator=(), Phase::xml(), and Phase::~Phase().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3