Cantera
2.0
|
Base class for phases of matter. More...
#include <Phase.h>
Public Member Functions | |
Phase () | |
Default constructor. | |
virtual | ~Phase () |
Destructor. | |
Phase (const Phase &right) | |
Copy Constructor. | |
Phase & | operator= (const Phase &right) |
Assignment operator. | |
XML_Node & | xml () |
Returns a reference to the XML_Node stored for the phase. | |
void | saveState (vector_fp &state) const |
Save the current internal state of the phase Write to vector 'state' the current internal state. | |
void | saveState (size_t 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 (size_t lenstate, const doublereal *state) |
Restore the state of the phase from a previously saved state vector. | |
doublereal | molecularWeight (size_t k) const |
Molecular weight of species k . | |
doublereal | molarMass (size_t k) const |
Return the Molar mass of species k Alternate name for molecular weight. | |
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 vector_fp & | molecularWeights () const |
Return a const reference to the internal vector of molecular weights. | |
doublereal | size (size_t k) const |
This routine returns the size of species k. | |
doublereal | charge (size_t k) const |
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the magnitude of the electron charge. | |
doublereal | chargeDensity () const |
Charge density [C/m^3]. | |
size_t | nDim () const |
Returns the number of spatial dimensions (1, 2, or 3) | |
void | setNDim (size_t ndim) |
Set the number of spatial dimensions (1, 2, or 3). | |
virtual void | freezeSpecies () |
Call when finished adding species. | |
bool | speciesFrozen () |
True if freezeSpecies has been called. | |
virtual bool | ready () const |
int | stateMFNumber () const |
Return the State Mole Fraction Number. | |
void | stateMFChangeCalc (bool forceChange=false) |
Every time the mole fractions have changed, this routine will increment the stateMFNumber. | |
Name and ID | |
Class Phase contains two strings that identify a phase. The ID is the value of the ID attribute of the XML phase node that is used to initialize a phase when it is read. The name field is also initialized to the value of the ID attribute of the XML phase node. However, the name field may be changed to another value during the course of a calculation. For example, if a phase is located in two places, but has the same constitutive input, the ids of the two phases will be the same, but the names of the two phases may be different. It is an error to have two phases in a single problem with the same name or the same id (or the name from one phase being the same as the id of another phase). Thus, it is expected that there is a 1-1 correspondence between names and unique phases within a Cantera problem. | |
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. | |
Element and Species Information | |
std::string | elementName (size_t m) const |
Name of the element with index m. | |
size_t | elementIndex (std::string name) const |
Return the index of element named 'name'. | |
const std::vector< std::string > & | elementNames () const |
Return a read-only reference to the vector of element names. | |
doublereal | atomicWeight (size_t m) const |
Atomic weight of element m. | |
doublereal | entropyElement298 (size_t m) const |
Entropy of the element in its standard state at 298 K and 1 bar. | |
int | atomicNumber (size_t m) const |
Atomic number of element m. | |
int | elementType (size_t m) const |
Return the element constraint type Possible types include: | |
int | changeElementType (int m, int elem_type) |
Change the element type of the mth constraint Reassigns an element type. | |
const vector_fp & | atomicWeights () const |
Return a read-only reference to the vector of atomic weights. | |
size_t | nElements () const |
Number of elements. | |
void | checkElementIndex (size_t m) const |
Check that the specified element index is in range Throws an exception if m is greater than nElements()-1. | |
void | checkElementArraySize (size_t mm) const |
Check that an array size is at least nElements() Throws an exception if mm is less than nElements(). | |
doublereal | nAtoms (size_t k, size_t m) const |
Number of atoms of element m in species k . | |
void | getAtoms (size_t k, double *atomArray) const |
Get a vector containing the atomic composition of species k. | |
size_t | speciesIndex (std::string name) const |
Returns the index of a species named 'name' within the Phase object. | |
std::string | speciesName (size_t k) const |
Name of the species with index k. | |
std::string | speciesSPName (int k) const |
Returns the expanded species name of a species, including the phase name This is guaranteed to be unique within a Cantera problem. | |
const std::vector< std::string > & | speciesNames () const |
Return a const reference to the vector of species names. | |
size_t | nSpecies () const |
Returns the number of species in the phase. | |
void | checkSpeciesIndex (size_t k) const |
Check that the specified species index is in range Throws an exception if k is greater than nSpecies()-1. | |
void | checkSpeciesArraySize (size_t kk) const |
Check that an array size is at least nSpecies() Throws an exception if kk is less than nSpecies(). | |
Set thermodynamic state | |
Set the internal thermodynamic state by setting the internally stored temperature, density and species composition. Note that the composition is always set first. Temperature and density are held constant if not explicitly set. | |
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 stored temperature (K), density, and mole fractions. | |
void | setState_TRX (doublereal t, doublereal dens, compositionMap &x) |
Set the internally stored temperature (K), density, and mole fractions. | |
void | setState_TRY (doublereal t, doublereal dens, const doublereal *y) |
Set the internally stored temperature (K), density, and mass fractions. | |
void | setState_TRY (doublereal t, doublereal dens, compositionMap &y) |
Set the internally stored temperature (K), density, and mass fractions. | |
void | setState_TNX (doublereal t, doublereal n, const doublereal *x) |
Set the internally stored temperature (K), molar density (kmol/m^3), and mole fractions. | |
void | setState_TR (doublereal t, doublereal rho) |
Set the internally stored temperature (K) and density (kg/m^3) | |
void | setState_TX (doublereal t, doublereal *x) |
Set the internally stored temperature (K) and mole fractions. | |
void | setState_TY (doublereal t, doublereal *y) |
Set the internally stored 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. | |
Composition | |
void | getMoleFractionsByName (compositionMap &x) const |
Get the mole fractions by name. | |
doublereal | moleFraction (size_t 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 (size_t k) const |
Return the mass fraction of a single species. | |
doublereal | massFraction (std::string name) const |
Return the mass fraction of a single species. | |
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 There is no restriction on the sum of the mole fraction vector. | |
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. | |
const doublereal * | massFractions () const |
Return a const pointer to the mass fraction array. | |
virtual void | setMassFractions (const doublereal *const y) |
Set the mass fractions to the specified values and normalize them. | |
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 size_t 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 * | moleFractdivMMW () const |
Returns a const pointer to the start of the moleFraction/MW array. | |
Thermodynamic Properties | |
doublereal | temperature () const |
Temperature (K). | |
virtual doublereal | density () const |
Density (kg/m^3). | |
doublereal | molarDensity () const |
Molar density (kmol/m^3). | |
doublereal | molarVolume () const |
Molar volume (m^3/kmol). | |
virtual void | setDensity (const doublereal density) |
Set the internally stored density (kg/m^3) of the phase Note the density of a phase is an independent variable. | |
virtual void | setMolarDensity (const doublereal molarDensity) |
Set the internally stored molar density (kmol/m^3) of the phase. | |
virtual void | setTemperature (const doublereal temp) |
Set the internally stored temperature of the phase (K). | |
Mean Properties | |
doublereal | mean_X (const doublereal *const Q) const |
Evaluate the mole-fraction-weighted mean of an array Q. | |
doublereal | mean_Y (const doublereal *const Q) const |
Evaluate the mass-fraction-weighted mean of an array Q. | |
doublereal | meanMolecularWeight () const |
The mean molecular weight. Units: (kg/kmol) | |
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 \). | |
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=-12345.0) |
Add an element. | |
void | addElement (const XML_Node &e) |
Add an element from an XML specification. | |
void | addUniqueElement (const std::string &symbol, doublereal weight=-12345.0, int atomicNumber=0, doublereal entropy298=ENTROPY298_UNKNOWN, int elem_type=CT_ELEM_TYPE_ABSPOS) |
Add an element, checking for uniqueness The uniqueness is checked by comparing the string symbol. | |
void | addUniqueElement (const XML_Node &e) |
Add an element, checking for uniqueness The uniqueness is checked by comparing the string symbol. | |
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. | |
size_t | addUniqueElementAfterFreeze (const std::string &symbol, doublereal weight, int atomicNumber, doublereal entropy298=ENTROPY298_UNKNOWN, int elem_type=CT_ELEM_TYPE_ABSPOS) |
Add an element after elements have been frozen, checking for uniqueness The uniqueness is checked by comparing the string symbol. | |
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 This routine checks for uniqueness of the string name. | |
Protected Member Functions | |
void | init (const vector_fp &mw) |
void | setMolecularWeight (const int k, const double mw) |
Set the molecular weight of a single species to a given value. | |
Protected Attributes | |
size_t | m_kk |
Number of species in the phase. | |
size_t | m_ndim |
Dimensionality of the phase. | |
vector_fp | m_speciesComp |
Atomic composition of the species. | |
vector_fp | m_speciesSize |
Vector of species sizes. | |
vector_fp | m_speciesCharge |
Vector of species charges. length m_kk. | |
Private Attributes | |
XML_Node * | m_xml |
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. | |
doublereal | m_temp |
Temperature (K). This is an independent variable. | |
doublereal | m_dens |
Density (kg m-3). | |
doublereal | m_mmw |
mean molecular weight of the mixture (kg kmol-1) | |
vector_fp | m_ym |
m_ym[k] = mole fraction of species k divided by the mean molecular weight of mixture. | |
vector_fp | m_y |
species mass fractions | |
vector_fp | m_molwts |
species molecular weights (kg kmol-1) | |
vector_fp | m_rmolwts |
inverse of species molecular weights (kmol kg-1) | |
int | m_stateNum |
State Change variable. | |
bool | m_speciesFrozen |
Boolean indicating whether the number of species has been frozen. | |
bool | m_elementsFrozen |
If this is true, then no elements may be added to the object. | |
std::vector< std::string > | m_speciesNames |
Vector of the species names. | |
size_t | m_mm |
Number of elements. | |
vector_fp | m_atomicWeights |
element atomic weights (kg kmol-1) | |
vector_int | m_atomicNumbers |
element atomic numbers | |
std::vector< std::string > | m_elementNames |
element names | |
vector_int | m_elem_type |
Vector of element types. | |
vector_fp | m_entropy298 |
Entropy at 298.15 K and 1 bar of stable state pure elements (J kmol-1) | |
Base class for phases of matter.
Class Phase manages the species and elements in a phase, as well as the independent variables of temperature, mass density, and species mass/mole fraction that define the thermodynamic state.
Class Phase provides information about the elements and species in a phase - names, index numbers (location in arrays), atomic or molecular weights, etc. The set of elements must include all those that compose the species, but may include additional elements.
It also stores an array of species molecular weights, which are used to convert between mole and mass representations of the composition. For efficiency in mass/mole conversion, the vector of mass fractions divided by molecular weight \( Y_k/M_k \) is also stored.
Class Phase is not usually used directly. Its primary use is as a base class for class ThermoPhase. It is not generally necessary to overloaded any of class Phase's methods, with the exception of incompressible phases. In that case, the density must be replaced by the pressure as the independent variable and functions such as setMassFraction within class Phase must actually now calculate the density (at constant T and P) instead of leaving it alone as befits an independent variable. This also applies for nearly- incompressible phases or phases which utilize standard states based on a T and P, in which case they need to overload these functions too.
Class Phase contains a number 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(double t, double dens, const double* y).
Class Phase contains method for saving and restoring the full internal states of each phase. These are saveState() and restoreState(). These functions operate on a state vector, which is in general of length (2 + nSpecies()). The first two entries of the state vector are temperature and density.
A species name may be referred to via three methods:
The first two methods of naming may not yield a unique species within complicated assemblies of Cantera Phases.
|
virtual |
Copy Constructor.
right | Reference to the class to be used in the copy |
Definition at line 35 of file Phase.cpp.
References Phase::operator=().
Assignment operator.
right | Reference to the class to be used in the copy |
Definition at line 54 of file Phase.cpp.
References Phase::m_atomicNumbers, Phase::m_atomicWeights, Phase::m_dens, Phase::m_elem_type, Phase::m_elementNames, Phase::m_elementsFrozen, Phase::m_entropy298, Phase::m_id, Phase::m_kk, Phase::m_mm, Phase::m_mmw, Phase::m_molwts, Phase::m_name, Phase::m_ndim, Phase::m_rmolwts, Phase::m_speciesCharge, Phase::m_speciesComp, Phase::m_speciesFrozen, Phase::m_speciesNames, Phase::m_speciesSize, Phase::m_stateNum, Phase::m_temp, Phase::m_xml, Phase::m_y, and Phase::m_ym.
Referenced by Phase::Phase().
XML_Node & xml | ( | ) |
Returns a reference to the XML_Node stored 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 125 of file Phase.cpp.
References Phase::m_xml.
Referenced by MolarityIonicVPSSTP::constructPhaseFile(), LatticePhase::constructPhaseFile(), RedlichKisterVPSSTP::constructPhaseFile(), MargulesVPSSTP::constructPhaseFile(), MixedSolventElectrolyte::constructPhaseFile(), WaterSSTP::constructPhaseFile(), PhaseCombo_Interaction::constructPhaseFile(), IonsFromNeutralVPSSTP::constructPhaseFile(), IdealMolalSoln::constructPhaseFile(), IdealSolidSolnPhase::constructPhaseFile(), DebyeHuckel::constructPhaseFile(), Cantera::importPhase(), SimpleTransport::initLiquid(), ThermoPhase::initThermoFile(), TransportFactory::newTransport(), and TransportFactory::setupLiquidTransport().
std::string id | ( | ) | const |
Return the string id for the phase.
Definition at line 130 of file Phase.cpp.
References Phase::m_id.
Referenced by Kinetics::assignShallowPointers(), Cantera::equilibrate(), Cantera::getEfficiencies(), Cantera::importPhase(), LatticeSolidPhase::installSlavePhases(), Kinetics::kineticsSpeciesIndex(), MultiPhase::phaseIndex(), MultiPhase::phaseName(), solveProb::print_header(), RedlichKwongMFTP::RedlichKwongMFTP(), Phase::setID(), LatticeSolidPhase::setParametersFromXML(), vcs_VolPhase::transferElementsFM(), and Cantera::vcs_equilibrate().
void setID | ( | std::string | id | ) |
Set the string id for the phase.
id | String id of the phase |
Definition at line 135 of file Phase.cpp.
References Phase::id(), and Phase::m_id.
Referenced by FixedChemPotSSTP::FixedChemPotSSTP(), and Cantera::importPhase().
std::string name | ( | ) | const |
Return the name of the phase.
Definition at line 140 of file Phase.cpp.
References Phase::m_name.
Referenced by Cantera::operator<<(), PseudoBinaryVPSSTP::report(), MolarityIonicVPSSTP::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), vcs_MultiPhaseEquil::reportCSV(), MolalityVPSSTP::reportCSV(), and ThermoPhase::reportCSV().
void setName | ( | std::string | nm | ) |
Sets the string name for the phase.
nm | String name of the phase |
Definition at line 145 of file Phase.cpp.
References Phase::m_name.
Referenced by FixedChemPotSSTP::FixedChemPotSSTP(), and Cantera::importPhase().
string elementName | ( | size_t | m | ) | const |
Name of the element with index m.
m | Element index. |
Definition at line 169 of file Phase.cpp.
References Phase::checkElementIndex(), and Phase::m_elementNames.
Referenced by MultiPhase::addPhase(), Cantera::checkRxnElementBalance(), Cantera::convertDGFormation(), PDSS_HKFT::convertDGFormation(), ChemEquil::equilibrate(), ChemEquil::equilResidual(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), MolalityVPSSTP::findCLMIndex(), ChemEquil::initialize(), LatticeSolidPhase::installSlavePhases(), Cantera::installSpecies(), ChemEquil::setInitialMoles(), and vcs_VolPhase::transferElementsFM().
size_t elementIndex | ( | std::string | name | ) | const |
Return the index of element named 'name'.
The index is an integer assigned to each element in the order it was added. Returns npos if the specified element is not found.
name | Name of the element |
Definition at line 175 of file Phase.cpp.
References Phase::m_elementNames, Phase::m_mm, and Cantera::npos.
Referenced by Phase::addUniqueElementAfterFreeze(), MultiPhase::init(), WaterSSTP::initThermoXML(), LatticeSolidPhase::installSlavePhases(), Cantera::installSpecies(), Cantera::LookupGe(), and PDSS_HKFT::LookupGe().
const vector< string > & elementNames | ( | ) | const |
Return a read-only reference to the vector of element names.
Definition at line 185 of file Phase.cpp.
References Phase::m_elementNames.
Referenced by ChemEquil::equilibrate(), ChemEquil::estimateEP_Brinkley(), and IonsFromNeutralVPSSTP::initThermoXML().
doublereal atomicWeight | ( | size_t | m | ) | const |
Atomic weight of element m.
m | Element index |
Definition at line 190 of file Phase.cpp.
References Phase::m_atomicWeights.
Referenced by ChemEquil::initialize(), and WaterSSTP::initThermoXML().
doublereal entropyElement298 | ( | size_t | m | ) | const |
Entropy of the element in its standard state at 298 K and 1 bar.
m | Element index |
Definition at line 195 of file Phase.cpp.
References AssertThrowMsg, AssertTrace, ENTROPY298_UNKNOWN, Phase::m_entropy298, and Phase::m_mm.
Referenced by LatticeSolidPhase::installSlavePhases(), Cantera::LookupGe(), and PDSS_HKFT::LookupGe().
int atomicNumber | ( | size_t | m | ) | const |
Atomic number of element m.
m | Element index |
Definition at line 209 of file Phase.cpp.
References Phase::m_atomicNumbers.
Referenced by MultiPhase::addPhase(), and LatticeSolidPhase::installSlavePhases().
int elementType | ( | size_t | m | ) | const |
Return the element constraint type Possible types include:
CT_ELEM_TYPE_TURNEDOFF -1 CT_ELEM_TYPE_ABSPOS 0 CT_ELEM_TYPE_ELECTRONCHARGE 1 CT_ELEM_TYPE_CHARGENEUTRALITY 2 CT_ELEM_TYPE_LATTICERATIO 3 CT_ELEM_TYPE_KINETICFROZEN 4 CT_ELEM_TYPE_SURFACECONSTRAINT 5 CT_ELEM_TYPE_OTHERCONSTRAINT 6
The default is CT_ELEM_TYPE_ABSPOS.
m | Element index |
Definition at line 214 of file Phase.cpp.
References Phase::m_elem_type.
Referenced by LatticeSolidPhase::installSlavePhases(), and vcs_VolPhase::transferElementsFM().
int changeElementType | ( | int | m, |
int | elem_type | ||
) |
Change the element type of the mth constraint Reassigns an element type.
m | Element index |
elem_type | New elem type to be assigned |
Definition at line 219 of file Phase.cpp.
References Phase::m_elem_type.
const vector_fp & atomicWeights | ( | ) | const |
Return a read-only reference to the vector of atomic weights.
Definition at line 204 of file Phase.cpp.
References Phase::m_atomicWeights.
Referenced by LatticeSolidPhase::installSlavePhases().
size_t nElements | ( | ) | const |
Number of elements.
Definition at line 150 of file Phase.cpp.
References Phase::m_mm.
Referenced by MultiPhase::addPhase(), Cantera::checkRxnElementBalance(), Cantera::convertDGFormation(), PDSS_HKFT::convertDGFormation(), ChemEquil::equilibrate(), MolalityVPSSTP::findCLMIndex(), FixedChemPotSSTP::FixedChemPotSSTP(), ThermoPhase::getElementPotentials(), ChemEquil::initialize(), IdealSolidSolnPhase::initLengths(), ConstDensityThermo::initThermo(), LatticeSolidPhase::initThermo(), IdealGasPhase::initThermo(), LatticePhase::initThermo(), IonsFromNeutralVPSSTP::initThermoXML(), LatticeSolidPhase::installSlavePhases(), Cantera::installSpecies(), ThermoPhase::setElementPotentials(), vcs_VolPhase::setPtrThermoPhase(), and vcs_VolPhase::transferElementsFM().
void checkElementIndex | ( | size_t | m | ) | const |
Check that the specified element index is in range Throws an exception if m is greater than nElements()-1.
Definition at line 155 of file Phase.cpp.
References Phase::m_mm.
Referenced by Phase::elementName(), and Phase::nAtoms().
void checkElementArraySize | ( | size_t | mm | ) | const |
Check that an array size is at least nElements() Throws an exception if mm is less than nElements().
Used before calls which take an array pointer.
Definition at line 162 of file Phase.cpp.
References Phase::m_mm.
doublereal nAtoms | ( | size_t | k, |
size_t | m | ||
) | const |
Number of atoms of element m
in species k
.
k | species index |
m | element index |
Definition at line 226 of file Phase.cpp.
References Phase::checkElementIndex(), Phase::checkSpeciesIndex(), Phase::m_mm, and Phase::m_speciesComp.
Referenced by Cantera::checkRxnElementBalance(), Cantera::convertDGFormation(), PDSS_HKFT::convertDGFormation(), MolalityVPSSTP::findCLMIndex(), MultiPhase::init(), ChemEquil::initialize(), IonsFromNeutralVPSSTP::initThermoXML(), IdealSolidSolnPhase::setToEquilState(), and vcs_VolPhase::transferElementsFM().
void getAtoms | ( | size_t | k, |
double * | atomArray | ||
) | const |
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 233 of file Phase.cpp.
References Phase::m_mm, and Phase::m_speciesComp.
Referenced by LatticeSolidPhase::installSlavePhases().
size_t speciesIndex | ( | std::string | name | ) | const |
Returns the index of a species named 'name' within the Phase object.
The first species in the phase will have an index 0, and the last one will have an index of nSpecies() - 1.
name | String name of the species. It may also be in the form phaseName:speciesName |
Definition at line 240 of file Phase.cpp.
References Phase::m_id, Phase::m_kk, Phase::m_name, Phase::m_speciesNames, Cantera::npos, and Cantera::parseSpeciesName().
Referenced by PDSS_IonsFromNeutral::constructPDSSXML(), TransportFactory::getLiquidInteractionsTransportData(), TransportFactory::getLiquidSpeciesTransportData(), Cantera::getStick(), HMWSoln::HMWSoln(), Cantera::importSolution(), LiquidTranInteraction::init(), DebyeHuckel::initThermoXML(), FlowDevice::install(), Kinetics::kineticsSpeciesIndex(), MargulesVPSSTP::MargulesVPSSTP(), Phase::massFraction(), MixedSolventElectrolyte::MixedSolventElectrolyte(), Phase::moleFraction(), PhaseCombo_Interaction::PhaseCombo_Interaction(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), RedlichKwongMFTP::readXMLCrossFluid(), RedlichKwongMFTP::readXMLPureFluid(), RedlichKisterVPSSTP::RedlichKisterVPSSTP(), MolalityVPSSTP::report(), MolalityVPSSTP::reportCSV(), and Kinetics::speciesPhase().
string speciesName | ( | size_t | k | ) | const |
Name of the species with index k.
k | index of the species |
Definition at line 257 of file Phase.cpp.
References Phase::checkSpeciesIndex(), and Phase::m_speciesNames.
Referenced by StFlow::componentName(), ReactingSurf1D::componentName(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), MolalityVPSSTP::findCLMIndex(), TransportFactory::fitProperties(), AqueousTransport::getLiquidTransportData(), Phase::getMoleFractionsByName(), Cantera::importSolution(), MultiPhase::init(), ChemEquil::initialize(), LiquidTransport::initLiquid(), SimpleTransport::initLiquid(), IdealMolalSoln::initThermoXML(), DebyeHuckel::initThermoXML(), FlowDevice::install(), LatticeSolidPhase::installSlavePhases(), Kinetics::kineticsSpeciesName(), solveProb::print_header(), HMWSoln::printCoeffs(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), vcs_MultiPhaseEquil::reportCSV(), MolalityVPSSTP::reportCSV(), ThermoPhase::reportCSV(), HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), StFlow::save(), SurfPhase::setCoveragesByName(), ChemEquil::setInitialMoles(), Phase::setMassFractionsByName(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), ThermoPhase::setState_TPX(), ThermoPhase::setState_TPY(), Inlet1D::showSolution(), ReactingSurf1D::showSolution(), Phase::speciesSPName(), and ChemEquil::update().
std::string speciesSPName | ( | int | k | ) | const |
Returns the expanded species name of a species, including the phase name This is guaranteed to be unique within a Cantera problem.
k | Species index within the phase |
Definition at line 282 of file Phase.cpp.
References Phase::m_name, and Phase::speciesName().
const vector< string > & speciesNames | ( | ) | const |
Return a const reference to the vector of species names.
Definition at line 263 of file Phase.cpp.
References Phase::m_speciesNames.
Referenced by PDSS_ConstVol::constructPDSSFile(), PDSS_HKFT::constructPDSSFile(), PDSS_IonsFromNeutral::constructPDSSFile(), PDSS_SSVol::constructPDSSFile(), VPSSMgr_ConstVol::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_Water_HKFT::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), TransportFactory::setupLiquidTransport(), and TransportFactory::setupMM().
|
inline |
Returns the number of species in the phase.
Definition at line 252 of file Phase.h.
References Phase::m_kk.
Referenced by MultiPhase::addPhase(), InterfaceKinetics::applyButlerVolmerCorrection(), Kinetics::assignShallowPointers(), MultiPhase::calcElemAbundances(), Phase::chargeDensity(), MultiPhaseEquil::computeReactionSteps(), PDSS_IonsFromNeutral::constructPDSSXML(), RedlichKisterVPSSTP::cp_mole(), MargulesVPSSTP::cp_mole(), MixedSolventElectrolyte::cp_mole(), PhaseCombo_Interaction::cp_mole(), SolidTransport::electricalConductivity(), RedlichKisterVPSSTP::enthalpy_mole(), MargulesVPSSTP::enthalpy_mole(), MixedSolventElectrolyte::enthalpy_mole(), PhaseCombo_Interaction::enthalpy_mole(), RedlichKisterVPSSTP::entropy_mole(), MargulesVPSSTP::entropy_mole(), MixedSolventElectrolyte::entropy_mole(), PhaseCombo_Interaction::entropy_mole(), ChemEquil::equilibrate(), vcs_MultiPhaseEquil::equilibrate_TP(), ChemEquil::estimateElementPotentials(), ThermoPhase::getActivities(), MetalPhase::getActivityConcentrations(), MetalPhase::getChemPotentials(), IonsFromNeutralVPSSTP::getdlnActCoeffds(), MetalPhase::getEnthalpy_RT(), MetalPhase::getEntropy_R(), AqueousKinetics::getEquilibriumConstants(), InterfaceKinetics::getEquilibriumConstants(), MultiTransport::getMassFluxes(), LTI_Pairwise_Interaction::getMatrixTransProp(), LTI_StefanMaxwell_PPN::getMatrixTransProp(), SolidTransport::getMixDiffCoeffs(), LTI_MoleFracs::getMixTransProp(), LTI_MassFracs::getMixTransProp(), LTI_Log_MoleFracs::getMixTransProp(), LTI_Pairwise_Interaction::getMixTransProp(), LTI_StefanMaxwell_PPN::getMixTransProp(), LTI_MoleFracs_ExpT::getMixTransProp(), SolidTransport::getMobilities(), MultiTransport::getMolarFluxes(), Phase::getMoleFractionsByName(), MultiPhase::getMoles(), MetalPhase::getStandardChemPotentials(), ImplicitSurfChem::ImplicitSurfChem(), Cantera::importSolution(), LiquidTranInteraction::init(), MultiPhase::init(), AqueousKinetics::init(), GasKinetics::init(), InterfaceKinetics::init(), GasTransport::initGas(), ChemEquil::initialize(), DustyGasTransport::initialize(), PseudoBinaryVPSSTP::initLengths(), IdealSolnGasVPSS::initLengths(), MolarityIonicVPSSTP::initLengths(), GibbsExcessVPSSTP::initLengths(), VPStandardStateTP::initLengths(), IonsFromNeutralVPSSTP::initLengths(), MixtureFugacityTP::initLengths(), VPSSMgr::initLengths(), PhaseCombo_Interaction::initLengths(), RedlichKisterVPSSTP::initLengths(), MargulesVPSSTP::initLengths(), MixedSolventElectrolyte::initLengths(), MolalityVPSSTP::initLengths(), IdealMolalSoln::initLengths(), IdealSolidSolnPhase::initLengths(), DebyeHuckel::initLengths(), HMWSoln::initLengths(), LiquidTransport::initLiquid(), SimpleTransport::initLiquid(), AqueousTransport::initLiquid(), ConstDensityThermo::initThermo(), StoichSubstance::initThermo(), StoichSubstanceSSTP::initThermo(), LatticeSolidPhase::initThermo(), SingleSpeciesTP::initThermo(), LatticePhase::initThermo(), FlowDevice::install(), rxninfo::installReaction(), LatticeSolidPhase::installSlavePhases(), Kinetics::nTotalSpecies(), solveProb::print_header(), PseudoBinaryVPSSTP::report(), MolarityIonicVPSSTP::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), vcs_MultiPhaseEquil::reportCSV(), MolalityVPSSTP::reportCSV(), ThermoPhase::reportCSV(), Phase::restoreState(), IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnN(), Phase::saveState(), Kinetics::selectPhase(), ImplicitSurfChem::setConcSpecies(), SurfPhase::setCoveragesByName(), Phase::setMassFractionsByName(), MolalityVPSSTP::setMolalitiesByName(), Phase::setMoleFractionsByName(), MultiPhase::setMoles(), SolidTransport::setParameters(), MultiPhase::setPhaseMoleFractions(), vcs_VolPhase::setPtrThermoPhase(), ThermoPhase::setState_TPX(), ThermoPhase::setState_TPY(), Transport::setThermo(), ReactorBase::setThermoMgr(), TransportFactory::setupLiquidTransport(), TransportFactory::setupMM(), Inlet1D::showSolution(), solveSP::solveSP(), StFlow::StFlow(), vcs_VolPhase::transferElementsFM(), AqueousKinetics::updateKc(), InterfaceKinetics::updateKc(), ConstPressureReactor::updateState(), Reactor::updateState(), and MultiPhase::uploadMoleFractionsFromPhases().
void checkSpeciesIndex | ( | size_t | k | ) | const |
Check that the specified species index is in range Throws an exception if k is greater than nSpecies()-1.
Definition at line 268 of file Phase.cpp.
References Phase::m_kk.
Referenced by Phase::concentration(), Phase::massFraction(), Phase::molecularWeight(), Phase::moleFraction(), Phase::nAtoms(), and Phase::speciesName().
void checkSpeciesArraySize | ( | size_t | kk | ) | const |
Check that an array size is at least nSpecies() Throws an exception if kk is less than nSpecies().
Used before calls which take an array pointer.
Definition at line 275 of file Phase.cpp.
References Phase::m_kk.
void saveState | ( | vector_fp & | state | ) | const |
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. |
Definition at line 288 of file Phase.cpp.
References Phase::nSpecies().
Referenced by ChemEquil::equilibrate(), ChemEquil::estimateEP_Brinkley(), TransportFactory::newTransport(), ReactorBase::setThermoMgr(), FlowReactor::updateState(), ConstPressureReactor::updateState(), and Reactor::updateState().
void saveState | ( | size_t | lenstate, |
doublereal * | state | ||
) | const |
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 293 of file Phase.cpp.
References Phase::density(), Phase::getMassFractions(), and Phase::temperature().
void restoreState | ( | const vector_fp & | state | ) |
Restore a state saved on a previous call to saveState.
state | State vector containing the previously saved state. |
Definition at line 300 of file Phase.cpp.
Referenced by ChemEquil::equilibrate(), ChemEquil::estimateEP_Brinkley(), MultiTransport::getMassFluxes(), FlowReactor::initialize(), ConstPressureReactor::initialize(), Reactor::initialize(), and TransportFactory::newTransport().
void restoreState | ( | size_t | lenstate, |
const doublereal * | state | ||
) |
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 305 of file Phase.cpp.
References Phase::nSpecies(), Phase::setDensity(), Phase::setMassFractions_NoNorm(), and Phase::setTemperature().
void setMoleFractionsByName | ( | compositionMap & | xMap | ) |
Set the species mole fractions by name.
@param xMap map from species names to mole fraction values.
Species not listed by name in xMap
are set to zero.
Definition at line 362 of file Phase.cpp.
References Phase::nSpecies(), Phase::setMoleFractions(), and Phase::speciesName().
Referenced by Inlet1D::setMoleFractions(), OutletRes1D::setMoleFractions(), Phase::setMoleFractionsByName(), ThermoPhase::setState_TPX(), Phase::setState_TRX(), MixtureFugacityTP::setStateFromXML(), and ThermoPhase::setStateFromXML().
void setMoleFractionsByName | ( | const std::string & | x | ) |
Set the mole fractions of a group of species by name.
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 376 of file Phase.cpp.
References Phase::nSpecies(), Cantera::parseCompString(), Phase::setMoleFractionsByName(), and Phase::speciesName().
void setMassFractionsByName | ( | compositionMap & | yMap | ) |
Set the species mass fractions by name.
@param yMap map from species names to mass fraction values.
Species not listed by name in yMap
are set to zero.
Definition at line 416 of file Phase.cpp.
References Phase::nSpecies(), Phase::setMassFractions(), and Phase::speciesName().
Referenced by Phase::setMassFractionsByName(), ThermoPhase::setState_TPY(), Phase::setState_TRY(), MixtureFugacityTP::setStateFromXML(), and ThermoPhase::setStateFromXML().
void setMassFractionsByName | ( | const std::string & | x | ) |
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 430 of file Phase.cpp.
References Phase::nSpecies(), Cantera::parseCompString(), Phase::setMassFractionsByName(), and Phase::speciesName().
void setState_TRX | ( | doublereal | t, |
doublereal | dens, | ||
const doublereal * | x | ||
) |
Set the internally stored temperature (K), density, and mole fractions.
t | Temperature in kelvin |
dens | Density (kg/m^3) |
x | vector of species mole fractions, length m_kk |
Definition at line 441 of file Phase.cpp.
References Phase::setDensity(), Phase::setMoleFractions(), and Phase::setTemperature().
void setState_TRX | ( | doublereal | t, |
doublereal | dens, | ||
compositionMap & | x | ||
) |
Set the internally stored temperature (K), density, and mole fractions.
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 455 of file Phase.cpp.
References Phase::setDensity(), Phase::setMoleFractionsByName(), and Phase::setTemperature().
void setState_TRY | ( | doublereal | t, |
doublereal | dens, | ||
const doublereal * | y | ||
) |
Set the internally stored temperature (K), density, and mass fractions.
t | Temperature in kelvin |
dens | Density (kg/m^3) |
y | vector of species mass fractions, length m_kk |
Definition at line 462 of file Phase.cpp.
References Phase::setDensity(), Phase::setMassFractions(), and Phase::setTemperature().
void setState_TRY | ( | doublereal | t, |
doublereal | dens, | ||
compositionMap & | y | ||
) |
Set the internally stored temperature (K), density, and mass fractions.
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 469 of file Phase.cpp.
References Phase::setDensity(), Phase::setMassFractionsByName(), and Phase::setTemperature().
void setState_TNX | ( | doublereal | t, |
doublereal | n, | ||
const doublereal * | x | ||
) |
Set the internally stored temperature (K), molar density (kmol/m^3), and mole fractions.
t | Temperature in kelvin |
n | molar density (kmol/m^3) |
x | vector of species mole fractions, length m_kk |
Definition at line 448 of file Phase.cpp.
References Phase::setMolarDensity(), Phase::setMoleFractions(), and Phase::setTemperature().
void setState_TR | ( | doublereal | t, |
doublereal | rho | ||
) |
Set the internally stored temperature (K) and density (kg/m^3)
t | Temperature in kelvin |
rho | Density (kg/m^3) |
Definition at line 476 of file Phase.cpp.
References Phase::setDensity(), and Phase::setTemperature().
Referenced by PureFluidPhase::setState_HP(), PureFluidPhase::setState_SP(), PureFluidPhase::setState_SV(), PDSS_IonsFromNeutral::setState_TR(), and PureFluidPhase::setState_UV().
void setState_TX | ( | doublereal | t, |
doublereal * | x | ||
) |
Set the internally stored temperature (K) and mole fractions.
t | Temperature in kelvin |
x | vector of species mole fractions, length m_kk |
Definition at line 482 of file Phase.cpp.
References Phase::setMoleFractions(), and Phase::setTemperature().
void setState_TY | ( | doublereal | t, |
doublereal * | y | ||
) |
Set the internally stored temperature (K) and mass fractions.
t | Temperature in kelvin |
y | vector of species mass fractions, length m_kk |
Definition at line 488 of file Phase.cpp.
References Phase::setMassFractions(), and Phase::setTemperature().
void setState_RX | ( | doublereal | rho, |
doublereal * | x | ||
) |
Set the density (kg/m^3) and mole fractions.
rho | Density (kg/m^3) |
x | vector of species mole fractions, length m_kk |
Definition at line 494 of file Phase.cpp.
References Phase::setDensity(), and Phase::setMoleFractions().
void setState_RY | ( | doublereal | rho, |
doublereal * | y | ||
) |
Set the density (kg/m^3) and mass fractions.
rho | Density (kg/m^3) |
y | vector of species mass fractions, length m_kk |
Definition at line 500 of file Phase.cpp.
References Phase::setDensity(), and Phase::setMassFractions().
doublereal molecularWeight | ( | size_t | k | ) | const |
Molecular weight of species k
.
k | index of species k |
k
. Definition at line 506 of file Phase.cpp.
References Phase::checkSpeciesIndex(), and Phase::m_molwts.
Referenced by VPSSMgr_Water_ConstVol::_updateRefStateThermo(), VPSSMgr_Water_HKFT::_updateRefStateThermo(), VPSSMgr_Water_ConstVol::_updateStandardStateThermo(), VPSSMgr_Water_HKFT::_updateStandardStateThermo(), SingleSpeciesTP::cv_mole(), SingleSpeciesTP::getPartialMolarVolumes(), SingleSpeciesTP::getStandardVolumes(), VPSSMgr_Water_ConstVol::getStandardVolumes_ref(), PDSS::initThermo(), VPSSMgr_Water_ConstVol::initThermoXML(), VPSSMgr_Water_HKFT::initThermoXML(), PDSS_ConstVol::initThermoXML(), MineralEQ3::initThermoXML(), PDSS_SSVol::initThermoXML(), Phase::molarMass(), MolalityVPSSTP::setSolvent(), HMWSoln::speciesMolarVolume(), and LiquidTransport::stefan_maxwell_solve().
|
inline |
Return the Molar mass of species k
Alternate name for molecular weight.
@param k index for species @return Return the molar mass of species k kg/kmol.
Definition at line 388 of file Phase.h.
References Phase::molecularWeight().
void getMolecularWeights | ( | vector_fp & | weights | ) | const |
Copy the vector of molecular weights into vector weights.
weights | Output vector of molecular weights (kg/kmol) |
Definition at line 512 of file Phase.cpp.
References Phase::molecularWeights().
void getMolecularWeights | ( | int | iwt, |
doublereal * | weights | ||
) | const |
Copy the vector of molecular weights into array weights.
@param iwt Unused. @param weights Output array of molecular weights (kg/kmol)
Definition at line 521 of file Phase.cpp.
References Phase::molecularWeights().
void getMolecularWeights | ( | doublereal * | weights | ) | const |
Copy the vector of molecular weights into array weights.
weights | Output array of molecular weights (kg/kmol) |
Definition at line 527 of file Phase.cpp.
References Phase::molecularWeights().
const vector_fp & molecularWeights | ( | ) | const |
Return a const reference to the internal vector of molecular weights.
units = kg / kmol
Definition at line 533 of file Phase.cpp.
References Phase::m_molwts.
Referenced by ReactingSurf1D::eval(), Phase::freezeSpecies(), Phase::getMolecularWeights(), MixTransport::getSpeciesFluxes(), AqueousTransport::getSpeciesFluxesExt(), SimpleTransport::getSpeciesFluxesExt(), Cantera::getStick(), GasTransport::initGas(), DustyGasTransport::initialize(), LiquidTransport::initLiquid(), SimpleTransport::initLiquid(), AqueousTransport::initLiquid(), TransportFactory::setupLiquidTransport(), TransportFactory::setupMM(), AqueousTransport::stefan_maxwell_solve(), LiquidTransport::stefan_maxwell_solve(), and StFlow::StFlow().
|
inline |
This routine returns the size of species k.
k | index of the species |
Definition at line 413 of file Phase.h.
References Phase::m_speciesSize.
Referenced by MolarityIonicVPSSTP::constructPhaseXML(), RedlichKisterVPSSTP::constructPhaseXML(), MargulesVPSSTP::constructPhaseXML(), MixedSolventElectrolyte::constructPhaseXML(), PhaseCombo_Interaction::constructPhaseXML(), IonsFromNeutralVPSSTP::constructPhaseXML(), IdealMolalSoln::constructPhaseXML(), IdealSolidSolnPhase::constructPhaseXML(), DebyeHuckel::constructPhaseXML(), ReactingSurf1D::eval(), SurfPhase::getCoverages(), SurfPhase::initThermo(), IdealMolalSoln::initThermoXML(), LatticeSolidPhase::installSlavePhases(), SurfPhase::setCoverages(), SurfPhase::setCoveragesNoNorm(), and SurfPhase::standardConcentration().
void getMoleFractionsByName | ( | compositionMap & | x | ) | const |
Get the mole fractions by name.
[out] | x | composition map containing the species mole fractions. |
Definition at line 538 of file Phase.cpp.
References Phase::moleFraction(), Phase::nSpecies(), and Phase::speciesName().
doublereal moleFraction | ( | size_t | k | ) | const |
Return the mole fraction of a single species.
k | species index |
Definition at line 552 of file Phase.cpp.
References Phase::checkSpeciesIndex(), Phase::m_mmw, and Phase::m_ym.
Referenced by Phase::chargeDensity(), SolidTransport::electricalConductivity(), ChemEquil::equilibrate(), IdealMolalSoln::getActivities(), DebyeHuckel::getActivities(), HMWSoln::getActivities(), MolalityVPSSTP::getActivityCoefficients(), IdealSolnGasVPSS::getActivityConcentrations(), RedlichKwongMFTP::getActivityConcentrations(), ConstDensityThermo::getChemPotentials(), IdealSolnGasVPSS::getChemPotentials(), RedlichKwongMFTP::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), IdealMolalSoln::getChemPotentials(), IdealGasPhase::getChemPotentials(), LatticePhase::getChemPotentials(), DebyeHuckel::getChemPotentials(), HMWSoln::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials_RT(), IdealMolalSoln::getMolalityActivityCoefficients(), Phase::getMoleFractionsByName(), IdealSolnGasVPSS::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), IdealMolalSoln::getPartialMolarEntropies(), IdealSolidSolnPhase::getPartialMolarEntropies(), LatticePhase::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), HMWSoln::getPartialMolarEntropies(), Phase::moleFraction(), DebyeHuckel::s_update_d2lnMolalityActCoeff_dT2(), DebyeHuckel::s_update_dlnMolalityActCoeff_dP(), DebyeHuckel::s_update_dlnMolalityActCoeff_dT(), DebyeHuckel::s_update_lnMolalityActCoeff(), HMWSoln::s_update_lnMolalityActCoeff(), IdealMolalSoln::s_updateIMS_lnMolalityActCoeff(), HMWSoln::s_updateIMS_lnMolalityActCoeff(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), and ChemEquil::setInitialMoles().
doublereal moleFraction | ( | std::string | name | ) | const |
Return the mole fraction of a single species.
name | String name of the species |
Definition at line 558 of file Phase.cpp.
References Phase::moleFraction(), Cantera::npos, and Phase::speciesIndex().
doublereal massFraction | ( | size_t | k | ) | const |
Return the mass fraction of a single species.
k | species index |
Definition at line 573 of file Phase.cpp.
References Phase::checkSpeciesIndex(), and Phase::m_y.
doublereal massFraction | ( | std::string | name | ) | const |
Return the mass fraction of a single species.
name | String name of the species |
Definition at line 579 of file Phase.cpp.
References Phase::massFractions(), Cantera::npos, and Phase::speciesIndex().
void getMoleFractions | ( | doublereal *const | x | ) | const |
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 547 of file Phase.cpp.
References Phase::m_mmw, Phase::m_ym, and Cantera::scale().
Referenced by IdealMolalSoln::calcDensity(), DebyeHuckel::calcDensity(), HMWSoln::calcDensity(), IonsFromNeutralVPSSTP::calcIonMoleFractions(), MolalityVPSSTP::calcMolalities(), HMWSoln::calcMolalitiesCropped(), IdealMolalSoln::enthalpy_mole(), HMWSoln::enthalpy_mole(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), GibbsExcessVPSSTP::getActivities(), LatticePhase::getActivityConcentrations(), MultiTransport::getMassFluxes(), LTI_Pairwise_Interaction::getMatrixTransProp(), LTI_StefanMaxwell_PPN::getMatrixTransProp(), LTI_MoleFracs::getMixTransProp(), LTI_Log_MoleFracs::getMixTransProp(), LTI_Pairwise_Interaction::getMixTransProp(), LTI_StefanMaxwell_PPN::getMixTransProp(), LTI_MoleFracs_ExpT::getMixTransProp(), LatticeSolidPhase::getMoleFractions(), DustyGasTransport::initialize(), GibbsExcessVPSSTP::initThermo(), HMWSoln::printCoeffs(), HMWSoln::relative_molal_enthalpy(), PseudoBinaryVPSSTP::report(), MolarityIonicVPSSTP::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), MolalityVPSSTP::reportCSV(), ThermoPhase::reportCSV(), MixtureFugacityTP::setConcentrations(), GibbsExcessVPSSTP::setConcentrations(), MixtureFugacityTP::setMassFractions(), GibbsExcessVPSSTP::setMassFractions(), MixtureFugacityTP::setMassFractions_NoNorm(), GibbsExcessVPSSTP::setMassFractions_NoNorm(), MolalityVPSSTP::setMolalitiesByName(), MixtureFugacityTP::setMoleFractions(), GibbsExcessVPSSTP::setMoleFractions(), MixtureFugacityTP::setMoleFractions_NoNorm(), GibbsExcessVPSSTP::setMoleFractions_NoNorm(), MultiPhase::setMoles(), vcs_VolPhase::setPtrThermoPhase(), ThermoPhase::setReferenceComposition(), MixtureFugacityTP::setState_TP(), MixtureFugacityTP::setState_TR(), AqueousTransport::stefan_maxwell_solve(), ChemEquil::update(), MixTransport::update_C(), MultiTransport::update_C(), AqueousTransport::update_C(), SimpleTransport::update_C(), LiquidTransport::update_C(), solveSP::updateMFKinSpecies(), DustyGasTransport::updateTransport_C(), and MultiPhase::uploadMoleFractionsFromPhases().
|
virtual |
Set the mole fractions to the specified values There is no restriction on the sum of the mole fraction vector.
Internally, the Phase object will normalize this vector before storing its contents.
x | Array of unnormalized mole fraction values (input). Must have a length greater than or equal to the number of species, m_kk. |
Reimplemented in IonsFromNeutralVPSSTP, GibbsExcessVPSSTP, LatticePhase, MixtureFugacityTP, IdealSolidSolnPhase, LatticeSolidPhase, and RedlichKwongMFTP.
Definition at line 317 of file Phase.cpp.
References Phase::m_kk, Phase::m_mmw, Phase::m_molwts, Phase::m_y, Phase::m_ym, ckr::max(), and Phase::stateMFChangeCalc().
Referenced by ChemEquil::calcEmoles(), ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), PureFluidPhase::initThermo(), SingleSpeciesTP::initThermo(), WaterSSTP::initThermoXML(), IonsFromNeutralVPSSTP::setConcentrations(), IonsFromNeutralVPSSTP::setMassFractions(), IonsFromNeutralVPSSTP::setMassFractions_NoNorm(), MolalityVPSSTP::setMolalities(), MolalityVPSSTP::setMolalitiesByName(), Inlet1D::setMoleFractions(), OutletRes1D::setMoleFractions(), LatticeSolidPhase::setMoleFractions(), IdealSolidSolnPhase::setMoleFractions(), MixtureFugacityTP::setMoleFractions(), LatticePhase::setMoleFractions(), GibbsExcessVPSSTP::setMoleFractions(), IonsFromNeutralVPSSTP::setMoleFractions(), IdealSolidSolnPhase::setMoleFractions_NoNorm(), LatticePhase::setMoleFractions_NoNorm(), Phase::setMoleFractionsByName(), ThermoPhase::setState_PX(), Phase::setState_RX(), Phase::setState_TNX(), ThermoPhase::setState_TPX(), Phase::setState_TRX(), and Phase::setState_TX().
|
virtual |
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 IonsFromNeutralVPSSTP, GibbsExcessVPSSTP, LatticePhase, MixtureFugacityTP, IdealSolidSolnPhase, and RedlichKwongMFTP.
Definition at line 350 of file Phase.cpp.
References Cantera::dot(), Phase::m_kk, Phase::m_mmw, Phase::m_molwts, Phase::m_y, Phase::m_ym, and Phase::stateMFChangeCalc().
Referenced by MixtureFugacityTP::setMoleFractions_NoNorm(), GibbsExcessVPSSTP::setMoleFractions_NoNorm(), and IonsFromNeutralVPSSTP::setMoleFractions_NoNorm().
void getMassFractions | ( | doublereal *const | y | ) | const |
Get the species mass fractions.
[out] | y | Array of mass fractions, length nSpecies() |
Definition at line 589 of file Phase.cpp.
References Phase::m_y.
Referenced by LTI_MassFracs::getMixTransProp(), Cantera::importSolution(), PureFluidPhase::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), ThermoPhase::reportCSV(), Phase::saveState(), Inlet1D::setMoleFractions(), OutletRes1D::setMoleFractions(), and LiquidTransport::update_C().
|
inline |
Return a const pointer to the mass fraction array.
Definition at line 469 of file Phase.h.
References Phase::m_y.
Referenced by MultiTransport::getMassFluxes(), MultiTransport::getSpeciesFluxes(), MixTransport::getSpeciesFluxes(), AqueousTransport::getSpeciesFluxesExt(), SimpleTransport::getSpeciesFluxesExt(), SimpleTransport::getSpeciesVdiff(), SimpleTransport::getSpeciesVdiffES(), and Phase::massFraction().
|
virtual |
Set the mass fractions to the specified values and normalize them.
@param[in] y Array of unnormalized mass fraction values. Length
must be greater than or equal to the number of species. The Ptate object will normalize this vector before storing its contents.
Reimplemented in IonsFromNeutralVPSSTP, LatticePhase, GibbsExcessVPSSTP, MixtureFugacityTP, LatticeSolidPhase, IdealSolidSolnPhase, and RedlichKwongMFTP.
Definition at line 387 of file Phase.cpp.
References Phase::m_kk, Phase::m_mmw, Phase::m_rmolwts, Phase::m_y, Phase::m_ym, ckr::max(), Cantera::scale(), and Phase::stateMFChangeCalc().
Referenced by Cantera::importSolution(), IdealSolidSolnPhase::setMassFractions(), MixtureFugacityTP::setMassFractions(), GibbsExcessVPSSTP::setMassFractions(), LatticePhase::setMassFractions(), Phase::setMassFractionsByName(), ThermoPhase::setState_PY(), Phase::setState_RY(), ThermoPhase::setState_TPY(), Phase::setState_TRY(), Phase::setState_TY(), FlowReactor::updateState(), ConstPressureReactor::updateState(), and Reactor::updateState().
|
virtual |
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 IonsFromNeutralVPSSTP, LatticePhase, GibbsExcessVPSSTP, MixtureFugacityTP, LatticeSolidPhase, IdealSolidSolnPhase, and RedlichKwongMFTP.
Definition at line 403 of file Phase.cpp.
References Phase::m_kk, Phase::m_mmw, Phase::m_rmolwts, Phase::m_y, Phase::m_ym, and Phase::stateMFChangeCalc().
Referenced by Phase::restoreState(), StFlow::setGas(), StFlow::setGasAtMidpoint(), IdealSolidSolnPhase::setMassFractions_NoNorm(), MixtureFugacityTP::setMassFractions_NoNorm(), GibbsExcessVPSSTP::setMassFractions_NoNorm(), and LatticePhase::setMassFractions_NoNorm().
void getConcentrations | ( | doublereal *const | c | ) | const |
Get the species concentrations (kmol/m^3).
@param[out] c Array of species concentrations Length must be
greater than or equal to the number of species.
Definition at line 600 of file Phase.cpp.
References Phase::m_dens, Phase::m_ym, and Cantera::scale().
Referenced by ConstDensityThermo::getActivityConcentrations(), IdealSolnGasVPSS::getActivityConcentrations(), SurfPhase::getActivityConcentrations(), IdealGasPhase::getActivityConcentrations(), SurfPhase::getCoverages(), solveSP::solveSurfProb(), SimpleTransport::update_C(), and LiquidTransport::update_C().
doublereal concentration | ( | const size_t | k | ) | const |
Concentration of species k.
If k is outside the valid range, an exception will be thrown.
k | Index of species |
Definition at line 594 of file Phase.cpp.
References Phase::checkSpeciesIndex(), Phase::m_dens, Phase::m_rmolwts, and Phase::m_y.
|
virtual |
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.
[in] | conc | Array of concentrations in dimensional units. For bulk 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 numberof species in the phase. |
Reimplemented in IonsFromNeutralVPSSTP, GibbsExcessVPSSTP, LatticePhase, MixtureFugacityTP, LatticeSolidPhase, IdealSolidSolnPhase, and RedlichKwongMFTP.
Definition at line 605 of file Phase.cpp.
References Phase::m_kk, Phase::m_mmw, Phase::m_molwts, Phase::m_y, Phase::m_ym, ckr::max(), Phase::setDensity(), and Phase::stateMFChangeCalc().
Referenced by IdealSolidSolnPhase::setConcentrations(), MixtureFugacityTP::setConcentrations(), LatticePhase::setConcentrations(), GibbsExcessVPSSTP::setConcentrations(), ImplicitSurfChem::setConcSpecies(), SurfPhase::setCoverages(), and SurfPhase::setCoveragesNoNorm().
const doublereal * moleFractdivMMW | ( | ) | const |
Returns a const 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 568 of file Phase.cpp.
References Phase::m_ym.
Referenced by IdealSolnGasVPSS::calcDensity(), RedlichKwongMFTP::calcDensity(), IdealSolidSolnPhase::calcDensity(), and IdealSolidSolnPhase::getActivityConcentrations().
doublereal charge | ( | size_t | k | ) | const |
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the magnitude of the electron charge.
k | species index |
Definition at line 642 of file Phase.cpp.
References Phase::m_speciesCharge.
Referenced by InterfaceKinetics::applyButlerVolmerCorrection(), HMWSoln::calcMolalitiesCropped(), Phase::chargeDensity(), PDSS_HKFT::constructPDSSXML(), SolidTransport::electricalConductivity(), PureFluidPhase::getElectrochemPotentials(), PseudoBinaryVPSSTP::getElectrochemPotentials(), MolarityIonicVPSSTP::getElectrochemPotentials(), GibbsExcessVPSSTP::getElectrochemPotentials(), RedlichKisterVPSSTP::getElectrochemPotentials(), MargulesVPSSTP::getElectrochemPotentials(), ThermoPhase::getElectrochemPotentials(), MixedSolventElectrolyte::getElectrochemPotentials(), MolalityVPSSTP::getElectrochemPotentials(), PhaseCombo_Interaction::getElectrochemPotentials(), InterfaceKinetics::getEquilibriumConstants(), LiquidTransport::initLiquid(), SimpleTransport::initLiquid(), PDSS_HKFT::initThermo(), IonsFromNeutralVPSSTP::initThermoXML(), DebyeHuckel::initThermoXML(), LatticeSolidPhase::installSlavePhases(), HMWSoln::printCoeffs(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), HMWSoln::relative_molal_enthalpy(), HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), MolalityVPSSTP::setMolalitiesByName(), vcs_VolPhase::transferElementsFM(), and InterfaceKinetics::updateKc().
doublereal chargeDensity | ( | ) | const |
Charge density [C/m^3].
Definition at line 647 of file Phase.cpp.
References Phase::charge(), Phase::moleFraction(), and Phase::nSpecies().
|
inline |
Returns the number of spatial dimensions (1, 2, or 3)
Definition at line 523 of file Phase.h.
References Phase::m_ndim.
Referenced by Kinetics::addPhase(), EdgeKinetics::finalize(), InterfaceKinetics::finalize(), IdealSolnGasVPSS::getUnitsStandardConc(), RedlichKwongMFTP::getUnitsStandardConc(), IdealMolalSoln::getUnitsStandardConc(), MolalityVPSSTP::getUnitsStandardConc(), IdealSolidSolnPhase::getUnitsStandardConc(), ThermoPhase::getUnitsStandardConc(), DebyeHuckel::getUnitsStandardConc(), and HMWSoln::getUnitsStandardConc().
|
inline |
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 530 of file Phase.h.
References Phase::m_ndim.
Referenced by EdgePhase::EdgePhase(), FixedChemPotSSTP::FixedChemPotSSTP(), Cantera::importPhase(), EdgePhase::operator=(), and SurfPhase::SurfPhase().
|
inline |
Temperature (K).
Definition at line 539 of file Phase.h.
References Phase::m_temp.
Referenced by ThermoPhase::_RT(), InterfaceKinetics::_update_rates_T(), MixtureFugacityTP::_updateReferenceStateThermo(), VPStandardStateTP::_updateStandardStateThermo(), ConstDensityThermo::_updateThermo(), SurfPhase::_updateThermo(), LatticeSolidPhase::_updateThermo(), SingleSpeciesTP::_updateThermo(), IdealGasPhase::_updateThermo(), LatticePhase::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), DebyeHuckel::A_Debye_TP(), HMWSoln::A_Debye_TP(), MultiPhase::addPhase(), HMWSoln::ADebye_J(), HMWSoln::ADebye_L(), HMWSoln::ADebye_V(), InterfaceKinetics::applyButlerVolmerCorrection(), InterfaceKinetics::applyExchangeCurrentDensityFormulation(), IdealSolnGasVPSS::calcDensity(), MixtureFugacityTP::calculatePsat(), RedlichKwongMFTP::cp_mole(), SingleSpeciesTP::cv_mole(), HMWSoln::cv_mole(), DebyeHuckel::d2A_DebyedT2_TP(), HMWSoln::d2A_DebyedT2_TP(), DebyeHuckel::dA_DebyedP_TP(), HMWSoln::dA_DebyedP_TP(), DebyeHuckel::dA_DebyedT_TP(), HMWSoln::dA_DebyedT_TP(), WaterSSTP::dthermalExpansionCoeffdT(), IdealSolnGasVPSS::enthalpy_mole(), ConstDensityThermo::enthalpy_mole(), IdealSolidSolnPhase::enthalpy_mole(), LatticePhase::enthalpy_mole(), IdealGasPhase::enthalpy_mole(), ChemEquil::equilibrate(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), FixedChemPotSSTP::FixedChemPotSSTP(), RedlichKwongMFTP::getActivityCoefficients(), ConstDensityThermo::getChemPotentials(), SurfPhase::getChemPotentials(), MolarityIonicVPSSTP::getChemPotentials(), IdealSolnGasVPSS::getChemPotentials(), IonsFromNeutralVPSSTP::getChemPotentials(), RedlichKwongMFTP::getChemPotentials(), RedlichKisterVPSSTP::getChemPotentials(), MargulesVPSSTP::getChemPotentials(), MixedSolventElectrolyte::getChemPotentials(), PhaseCombo_Interaction::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), IdealMolalSoln::getChemPotentials(), IdealGasPhase::getChemPotentials(), LatticePhase::getChemPotentials(), DebyeHuckel::getChemPotentials(), HMWSoln::getChemPotentials(), StoichSubstance::getChemPotentials_RT(), SingleSpeciesTP::getChemPotentials_RT(), IdealSolidSolnPhase::getChemPotentials_RT(), WaterSSTP::getCp_R_ref(), AqueousKinetics::getDeltaSSEnthalpy(), GasKinetics::getDeltaSSEnthalpy(), InterfaceKinetics::getDeltaSSEnthalpy(), PhaseCombo_Interaction::getdlnActCoeffds(), MargulesVPSSTP::getdlnActCoeffds(), MixedSolventElectrolyte::getdlnActCoeffds(), ThermoPhase::getElementPotentials(), WaterSSTP::getEnthalpy_RT(), StoichSubstance::getEnthalpy_RT(), StoichSubstanceSSTP::getEnthalpy_RT(), MineralEQ3::getEnthalpy_RT(), SurfPhase::getEnthalpy_RT(), IdealSolidSolnPhase::getEnthalpy_RT(), LatticePhase::getEnthalpy_RT(), WaterSSTP::getEnthalpy_RT_ref(), PureFluidPhase::getEnthalpy_RT_ref(), WaterSSTP::getEntropy_R_ref(), PureFluidPhase::getEntropy_R_ref(), AqueousKinetics::getEquilibriumConstants(), GasKinetics::getEquilibriumConstants(), InterfaceKinetics::getEquilibriumConstants(), StoichSubstance::getGibbs_ref(), PureFluidPhase::getGibbs_ref(), SingleSpeciesTP::getGibbs_ref(), LatticeSolidPhase::getGibbs_ref(), IdealSolidSolnPhase::getGibbs_ref(), LatticePhase::getGibbs_ref(), WaterSSTP::getGibbs_RT(), StoichSubstance::getGibbs_RT(), SurfPhase::getGibbs_RT(), WaterSSTP::getGibbs_RT_ref(), PureFluidPhase::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(), LTI_Pairwise_Interaction::getMatrixTransProp(), LTI_StefanMaxwell_PPN::getMatrixTransProp(), SolidTransport::getMixDiffCoeffs(), LTI_MoleFracs::getMixTransProp(), LTI_MassFracs::getMixTransProp(), LTI_Log_MoleFracs::getMixTransProp(), LTI_MoleFracs_ExpT::getMixTransProp(), SolidTransport::getMobilities(), MolarityIonicVPSSTP::getPartialMolarCp(), RedlichKisterVPSSTP::getPartialMolarCp(), MargulesVPSSTP::getPartialMolarCp(), MixedSolventElectrolyte::getPartialMolarCp(), PhaseCombo_Interaction::getPartialMolarCp(), DebyeHuckel::getPartialMolarCp(), HMWSoln::getPartialMolarCp(), SurfPhase::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), MolarityIonicVPSSTP::getPartialMolarEnthalpies(), SingleSpeciesTP::getPartialMolarEnthalpies(), IonsFromNeutralVPSSTP::getPartialMolarEnthalpies(), RedlichKwongMFTP::getPartialMolarEnthalpies(), RedlichKisterVPSSTP::getPartialMolarEnthalpies(), MargulesVPSSTP::getPartialMolarEnthalpies(), MixedSolventElectrolyte::getPartialMolarEnthalpies(), PhaseCombo_Interaction::getPartialMolarEnthalpies(), IdealGasPhase::getPartialMolarEnthalpies(), IdealSolidSolnPhase::getPartialMolarEnthalpies(), LatticePhase::getPartialMolarEnthalpies(), DebyeHuckel::getPartialMolarEnthalpies(), HMWSoln::getPartialMolarEnthalpies(), MolarityIonicVPSSTP::getPartialMolarEntropies(), IonsFromNeutralVPSSTP::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), RedlichKisterVPSSTP::getPartialMolarEntropies(), MargulesVPSSTP::getPartialMolarEntropies(), MixedSolventElectrolyte::getPartialMolarEntropies(), PhaseCombo_Interaction::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), HMWSoln::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), SingleSpeciesTP::getPartialMolarIntEnergies(), RedlichKwongMFTP::getPartialMolarIntEnergies(), IdealGasPhase::getPartialMolarIntEnergies(), RedlichKwongMFTP::getPartialMolarVolumes(), MargulesVPSSTP::getPartialMolarVolumes(), MixedSolventElectrolyte::getPartialMolarVolumes(), PhaseCombo_Interaction::getPartialMolarVolumes(), DebyeHuckel::getPartialMolarVolumes(), HMWSoln::getPartialMolarVolumes(), SingleSpeciesTP::getPureGibbs(), LatticePhase::getPureGibbs(), LTPspecies_Arrhenius::getSpeciesTransProp(), LTPspecies_Poly::getSpeciesTransProp(), LTPspecies_ExpT::getSpeciesTransProp(), WaterSSTP::getStandardChemPotentials(), StoichSubstanceSSTP::getStandardChemPotentials(), MineralEQ3::getStandardChemPotentials(), MetalSHEelectrons::getStandardChemPotentials(), IdealGasPhase::getStandardChemPotentials(), WaterSSTP::getStandardVolumes_ref(), IdealSolnGasVPSS::gibbs_mole(), ConstDensityThermo::gibbs_mole(), StoichSubstance::gibbs_mole(), RedlichKwongMFTP::gibbs_mole(), IdealSolidSolnPhase::gibbs_mole(), ThermoPhase::gibbs_mole(), LatticePhase::gibbs_mole(), IdealGasPhase::gibbs_mole(), RedlichKwongMFTP::hresid(), ConstDensityThermo::intEnergy_mole(), StoichSubstance::intEnergy_mole(), IdealSolidSolnPhase::intEnergy_mole(), LatticePhase::intEnergy_mole(), IdealGasPhase::intEnergy_mole(), IdealGasPhase::logStandardConc(), MixtureFugacityTP::phaseState(), RedlichKwongMFTP::pressure(), IdealGasPhase::pressure(), MixTransport::pressure_ig(), RedlichKwongMFTP::pressureDerivatives(), HMWSoln::relative_enthalpy(), PseudoBinaryVPSSTP::report(), MolarityIonicVPSSTP::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), MolalityVPSSTP::reportCSV(), ThermoPhase::reportCSV(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN(), MargulesVPSSTP::s_update_dlnActCoeff_dlnN(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN_diag(), MargulesVPSSTP::s_update_dlnActCoeff_dlnN_diag(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN_diag(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnX_diag(), MargulesVPSSTP::s_update_dlnActCoeff_dlnX_diag(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnX_diag(), PhaseCombo_Interaction::s_update_dlnActCoeff_dT(), MargulesVPSSTP::s_update_dlnActCoeff_dT(), MixedSolventElectrolyte::s_update_dlnActCoeff_dT(), RedlichKisterVPSSTP::s_update_dlnActCoeff_dX_(), PhaseCombo_Interaction::s_update_lnActCoeff(), RedlichKisterVPSSTP::s_update_lnActCoeff(), MargulesVPSSTP::s_update_lnActCoeff(), MixedSolventElectrolyte::s_update_lnActCoeff(), HMWSoln::s_updatePitzer_CoeffWRTemp(), HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP(), HMWSoln::s_updatePitzer_lnMolalityActCoeff(), WaterSSTP::satPressure(), HMWSoln::satPressure(), Phase::saveState(), WaterSSTP::setDensity(), ThermoPhase::setElementPotentials(), ChemEquil::setInitialMoles(), PureFluidPhase::setPressure(), WaterSSTP::setPressure(), GibbsExcessVPSSTP::setPressure(), IdealMolalSoln::setPressure(), VPStandardStateTP::setPressure(), MixtureFugacityTP::setPressure(), IdealGasPhase::setPressure(), IonsFromNeutralVPSSTP::setPressure(), DebyeHuckel::setPressure(), HMWSoln::setPressure(), vcs_VolPhase::setPtrThermoPhase(), SingleSpeciesTP::setState_HP(), ThermoPhase::setState_HPorUV(), SingleSpeciesTP::setState_SP(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), SingleSpeciesTP::setState_UV(), MixtureFugacityTP::setStateFromXML(), MixtureFugacityTP::setTemperature(), PureFluidPhase::setTPXState(), ImplicitSurfChem::solvePseudoSteadyStateProblem(), RedlichKwongMFTP::sresid(), IdealSolnGasVPSS::standardConcentration(), IdealGasPhase::standardConcentration(), AqueousTransport::stefan_maxwell_solve(), LiquidTransport::stefan_maxwell_solve(), SolidTransport::thermalConductivity(), MetalSHEelectrons::thermalExpansionCoeff(), IdealGasPhase::thermalExpansionCoeff(), ChemEquil::update(), MixTransport::update_T(), MultiTransport::update_T(), AqueousTransport::update_T(), SimpleTransport::update_T(), LiquidTransport::update_T(), RedlichKwongMFTP::updateAB(), AqueousKinetics::updateKc(), GasKinetics::updateKc(), InterfaceKinetics::updateKc(), VPStandardStateTP::updateStandardStateThermo(), Reactor::updateState(), MultiTransport::updateThermal_T(), DustyGasTransport::updateTransport_T(), and WaterSSTP::vaporFraction().
|
inlinevirtual |
Density (kg/m^3).
Reimplemented in HMWSoln.
Definition at line 545 of file Phase.h.
References Phase::m_dens.
Referenced by MixtureFugacityTP::calculatePsat(), SingleSpeciesTP::cv_mole(), HMWSoln::density(), WaterSSTP::dthermalExpansionCoeffdT(), WaterSSTP::getCp_R_ref(), WaterSSTP::getEnthalpy_RT_ref(), WaterSSTP::getEntropy_R_ref(), WaterSSTP::getGibbs_RT_ref(), MultiTransport::getMassFluxes(), ConstDensityThermo::getParameters(), StoichSubstance::getParameters(), StoichSubstanceSSTP::getParameters(), MetalSHEelectrons::getParameters(), MineralEQ3::getParameters(), SingleSpeciesTP::getPartialMolarVolumes(), MultiTransport::getSpeciesFluxes(), SimpleTransport::getSpeciesVdiff(), SimpleTransport::getSpeciesVdiffES(), SingleSpeciesTP::getStandardVolumes(), WaterSSTP::getStandardVolumes_ref(), RedlichKwongMFTP::hresid(), Phase::molarDensity(), MixtureFugacityTP::phaseState(), RedlichKwongMFTP::pressure(), PseudoBinaryVPSSTP::report(), MolarityIonicVPSSTP::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), MolalityVPSSTP::reportCSV(), ThermoPhase::reportCSV(), WaterSSTP::satPressure(), Phase::saveState(), IdealMolalSoln::setDensity(), IdealSolidSolnPhase::setDensity(), Phase::setDensity(), DebyeHuckel::setDensity(), WaterSSTP::setPressure(), MixtureFugacityTP::setState_TP(), IonsFromNeutralVPSSTP::setState_TP(), MixtureFugacityTP::setStateFromXML(), MixtureFugacityTP::setTemperature(), WaterSSTP::setTemperature(), PureFluidPhase::setTPXState(), RedlichKwongMFTP::sresid(), ChemEquil::update(), SimpleTransport::update_C(), LiquidTransport::update_C(), ConstPressureReactor::updateState(), StFlow::updateThermo(), WaterSSTP::vaporFraction(), and MixtureFugacityTP::z().
doublereal molarDensity | ( | ) | const |
Molar density (kmol/m^3).
Definition at line 627 of file Phase.cpp.
References Phase::density(), and Phase::meanMolecularWeight().
Referenced by solveSP::calc_t(), SolidTransport::electricalConductivity(), ConstDensityThermo::enthalpy_mole(), StoichSubstance::enthalpy_mole(), IdealSolidSolnPhase::enthalpy_mole(), LatticePhase::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(), LatticePhase::getParameters(), PureFluidPhase::getPartialMolarVolumes(), StoichSubstance::getPartialMolarVolumes(), IdealGasPhase::getPartialMolarVolumes(), MixTransport::getSpeciesFluxes(), AqueousTransport::getSpeciesFluxesExt(), SimpleTransport::getSpeciesFluxesExt(), StoichSubstance::getStandardVolumes(), IdealGasPhase::getStandardVolumes(), IdealSolnGasVPSS::intEnergy_mole(), ConstDensityThermo::intEnergy_mole(), StoichSubstance::intEnergy_mole(), RedlichKwongMFTP::intEnergy_mole(), IonsFromNeutralVPSSTP::intEnergy_mole(), IdealSolidSolnPhase::intEnergy_mole(), LatticePhase::intEnergy_mole(), DebyeHuckel::intEnergy_mole(), HMWSoln::intEnergy_mole(), ConstDensityThermo::logStandardConc(), Phase::molarVolume(), IdealGasPhase::pressure(), MixTransport::pressure_ig(), IdealMolalSoln::setMolarDensity(), DebyeHuckel::setMolarDensity(), and ConstDensityThermo::standardConcentration().
doublereal molarVolume | ( | ) | const |
Molar volume (m^3/kmol).
Definition at line 637 of file Phase.cpp.
References Phase::molarDensity().
Referenced by RedlichKwongMFTP::cp_mole(), HMWSoln::cv_mole(), RedlichKwongMFTP::getActivityCoefficients(), RedlichKwongMFTP::getChemPotentials(), LTI_StefanMaxwell_PPN::getMatrixTransProp(), RedlichKwongMFTP::getPartialMolarEnthalpies(), RedlichKwongMFTP::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarVolumes(), ThermoPhase::intEnergy_mole(), RedlichKwongMFTP::pressureDerivatives(), MixtureFugacityTP::setState_TR(), and LiquidTransport::stefan_maxwell_solve().
|
inlinevirtual |
Set the internally stored density (kg/m^3) of the phase Note the density of a phase is an independent variable.
[in] | density | density (kg/m^3). |
Reimplemented in HMWSoln, DebyeHuckel, WaterSSTP, IdealSolidSolnPhase, and IdealMolalSoln.
Definition at line 560 of file Phase.h.
References Phase::density(), and Phase::m_dens.
Referenced by IdealSolnGasVPSS::calcDensity(), RedlichKwongMFTP::calcDensity(), GibbsExcessVPSSTP::calcDensity(), IdealMolalSoln::calcDensity(), IdealSolidSolnPhase::calcDensity(), LatticeSolidPhase::calcDensity(), DebyeHuckel::calcDensity(), HMWSoln::calcDensity(), StoichSubstanceSSTP::initThermoXML(), WaterSSTP::initThermoXML(), MetalSHEelectrons::initThermoXML(), MineralEQ3::initThermoXML(), electrodeElectron::initThermoXML(), Phase::restoreState(), Phase::setConcentrations(), WaterSSTP::setDensity(), ConstDensityThermo::setParameters(), StoichSubstance::setParameters(), StoichSubstanceSSTP::setParameters(), MetalSHEelectrons::setParameters(), MineralEQ3::setParameters(), electrodeElectron::setParameters(), SemiconductorPhase::setParametersFromXML(), MetalPhase::setParametersFromXML(), StoichSubstance::setParametersFromXML(), ConstDensityThermo::setParametersFromXML(), StoichSubstanceSSTP::setParametersFromXML(), MetalSHEelectrons::setParametersFromXML(), PureFluidPhase::setPressure(), IdealGasPhase::setPressure(), ThermoPhase::setState_HPorUV(), PureFluidPhase::setState_Psat(), Phase::setState_RX(), Phase::setState_RY(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), MixtureFugacityTP::setState_TP(), IonsFromNeutralVPSSTP::setState_TP(), Phase::setState_TR(), MixtureFugacityTP::setState_TR(), Phase::setState_TRX(), Phase::setState_TRY(), PureFluidPhase::setState_Tsat(), SingleSpeciesTP::setState_UV(), ThermoPhase::setStateFromXML(), and Reactor::updateState().
|
virtual |
Set the internally stored molar density (kmol/m^3) of the phase.
[in] | molarDensity | Input molar density (kmol/m^3). |
Reimplemented in HMWSoln, DebyeHuckel, IdealSolidSolnPhase, and IdealMolalSoln.
Definition at line 632 of file Phase.cpp.
References Phase::m_dens, and Phase::meanMolecularWeight().
Referenced by LatticePhase::calcDensity(), LatticePhase::setParameters(), and Phase::setState_TNX().
|
inlinevirtual |
Set the internally stored temperature of the phase (K).
temp | Temperature in Kelvin |
Reimplemented in HMWSoln, DebyeHuckel, IonsFromNeutralVPSSTP, WaterSSTP, MixtureFugacityTP, VPStandardStateTP, and RedlichKwongMFTP.
Definition at line 570 of file Phase.h.
References Phase::m_temp.
Referenced by ChemEquil::equilibrate(), ReactingSurf1D::eval(), TransportFactory::fitProperties(), WaterSSTP::initThermoXML(), Phase::restoreState(), StFlow::setGas(), StFlow::setGasAtMidpoint(), ThermoPhase::setState_HPorUV(), PureFluidPhase::setState_Psat(), ThermoPhase::setState_SPorSV(), SingleSpeciesTP::setState_SV(), Phase::setState_TNX(), VPStandardStateTP::setState_TP(), IdealMolalSoln::setState_TP(), MixtureFugacityTP::setState_TP(), GibbsExcessVPSSTP::setState_TP(), DebyeHuckel::setState_TP(), ThermoPhase::setState_TP(), HMWSoln::setState_TP(), SingleSpeciesTP::setState_TPX(), ThermoPhase::setState_TPX(), SingleSpeciesTP::setState_TPY(), ThermoPhase::setState_TPY(), Phase::setState_TR(), MixtureFugacityTP::setState_TR(), Phase::setState_TRX(), Phase::setState_TRY(), PureFluidPhase::setState_Tsat(), Phase::setState_TX(), Phase::setState_TY(), SingleSpeciesTP::setState_UV(), SurfPhase::setStateFromXML(), ThermoPhase::setStateFromXML(), RedlichKwongMFTP::setTemperature(), PDSS_IonsFromNeutral::setTemperature(), WaterSSTP::setTemperature(), ChemEquil::setToEquilState(), and Reactor::updateState().
doublereal mean_X | ( | const doublereal *const | Q | ) | const |
Evaluate the mole-fraction-weighted mean of an array Q.
\[ \sum_k X_k Q_k. \]
Q should contain pure-species molar property values.
[in] | Q | Array of length m_kk that is to be averaged. |
Definition at line 658 of file Phase.cpp.
References Phase::m_mmw, and Phase::m_ym.
Referenced by IdealSolnGasVPSS::cp_mole(), ConstDensityThermo::cp_mole(), RedlichKwongMFTP::cp_mole(), IonsFromNeutralVPSSTP::cp_mole(), IdealSolidSolnPhase::cp_mole(), IdealMolalSoln::cp_mole(), LatticePhase::cp_mole(), IdealGasPhase::cp_mole(), DebyeHuckel::cp_mole(), HMWSoln::cp_mole(), IonsFromNeutralVPSSTP::cv_mole(), IdealSolnGasVPSS::enthalpy_mole(), ConstDensityThermo::enthalpy_mole(), RedlichKwongMFTP::enthalpy_mole(), IdealSolidSolnPhase::enthalpy_mole(), IonsFromNeutralVPSSTP::enthalpy_mole(), IdealMolalSoln::enthalpy_mole(), SurfPhase::enthalpy_mole(), LatticePhase::enthalpy_mole(), IdealGasPhase::enthalpy_mole(), DebyeHuckel::enthalpy_mole(), HMWSoln::enthalpy_mole(), IdealSolnGasVPSS::entropy_mole(), ConstDensityThermo::entropy_mole(), RedlichKwongMFTP::entropy_mole(), IonsFromNeutralVPSSTP::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), IdealMolalSoln::entropy_mole(), LatticePhase::entropy_mole(), IdealGasPhase::entropy_mole(), DebyeHuckel::entropy_mole(), HMWSoln::entropy_mole(), IonsFromNeutralVPSSTP::gibbs_mole(), IdealSolidSolnPhase::gibbs_mole(), IdealMolalSoln::gibbs_mole(), DebyeHuckel::gibbs_mole(), HMWSoln::gibbs_mole(), ConstDensityThermo::intEnergy_mole(), IdealSolidSolnPhase::intEnergy_mole(), IdealMolalSoln::intEnergy_mole(), LatticePhase::intEnergy_mole(), IdealGasPhase::intEnergy_mole(), and HMWSoln::relative_enthalpy().
doublereal mean_Y | ( | const doublereal *const | Q | ) | const |
Evaluate the mass-fraction-weighted mean of an array Q.
\[ \sum_k Y_k Q_k \]
[in] | Q | Array of species property values in mass units. |
Definition at line 663 of file Phase.cpp.
References Cantera::dot(), and Phase::m_y.
|
inline |
The mean molecular weight. Units: (kg/kmol)
Definition at line 592 of file Phase.h.
References Phase::m_mmw.
Referenced by IdealSolnGasVPSS::calcDensity(), GibbsExcessVPSSTP::calcDensity(), IdealMolalSoln::calcDensity(), LatticePhase::calcDensity(), DebyeHuckel::calcDensity(), HMWSoln::calcDensity(), MixtureFugacityTP::calculatePsat(), ThermoPhase::cp_mass(), RedlichKwongMFTP::critDensity(), ThermoPhase::cv_mass(), RedlichKwongMFTP::densityCalc(), MixtureFugacityTP::densityCalc(), RedlichKwongMFTP::densSpinodalGas(), RedlichKwongMFTP::densSpinodalLiquid(), ThermoPhase::enthalpy_mass(), ThermoPhase::entropy_mass(), IdealSolidSolnPhase::getActivityConcentrations(), GasTransport::getMixDiffCoeffs(), AqueousTransport::getMixDiffCoeffs(), GasTransport::getMixDiffCoeffsMass(), MultiTransport::getMultiDiffCoeffs(), WaterSSTP::getStandardVolumes_ref(), ThermoPhase::gibbs_mass(), RedlichKwongMFTP::hresid(), ThermoPhase::intEnergy_mass(), Phase::molarDensity(), MixtureFugacityTP::phaseState(), RedlichKwongMFTP::pressure(), PseudoBinaryVPSSTP::report(), MolarityIonicVPSSTP::report(), PureFluidPhase::report(), MolalityVPSSTP::report(), ThermoPhase::report(), PureFluidPhase::reportCSV(), MolalityVPSSTP::reportCSV(), ThermoPhase::reportCSV(), Phase::setMolarDensity(), IdealGasPhase::setPressure(), RedlichKwongMFTP::sresid(), SimpleTransport::update_C(), LiquidTransport::update_C(), StFlow::updateThermo(), StFlow::updateTransport(), and MixtureFugacityTP::z().
doublereal sum_xlogx | ( | ) | const |
Evaluate \( \sum_k X_k \log X_k \).
Definition at line 668 of file Phase.cpp.
References Phase::m_mmw, Phase::m_ym, and Cantera::sum_xlogx().
Referenced by IdealSolnGasVPSS::entropy_mole(), ConstDensityThermo::entropy_mole(), RedlichKwongMFTP::entropy_mole(), IdealSolidSolnPhase::entropy_mole(), LatticePhase::entropy_mole(), IdealGasPhase::entropy_mole(), and IdealSolidSolnPhase::gibbs_mole().
doublereal sum_xlogQ | ( | doublereal *const | Q | ) | const |
Evaluate \( \sum_k X_k \log Q_k \).
Q | Vector of length m_kk to take the log average of |
Definition at line 673 of file Phase.cpp.
References Phase::m_mmw, Phase::m_ym, and Cantera::sum_xlogQ().
void addElement | ( | const std::string & | symbol, |
doublereal | weight = -12345.0 |
||
) |
Add an element.
symbol | Atomic symbol std::string. |
weight | Atomic mass in amu. |
Definition at line 678 of file Phase.cpp.
References CT_ELEM_TYPE_ABSPOS, CT_ELEM_TYPE_ELECTRONCHARGE, Cantera::LookupWtElements(), Phase::m_atomicWeights, Phase::m_elem_type, Phase::m_elementNames, Phase::m_elementsFrozen, and Phase::m_mm.
Referenced by Phase::addElement().
void addElement | ( | const XML_Node & | e | ) |
Add an element from an XML specification.
e | Reference to the XML_Node where the element is described. |
Definition at line 701 of file Phase.cpp.
References Phase::addElement().
void addUniqueElement | ( | const std::string & | symbol, |
doublereal | weight = -12345.0 , |
||
int | atomicNumber = 0 , |
||
doublereal | entropy298 = ENTROPY298_UNKNOWN , |
||
int | elem_type = CT_ELEM_TYPE_ABSPOS |
||
) |
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. |
elem_type | Specifies the type of the element constraint equation. This defaults to CT_ELEM_TYPE_ABSPOS, i.e., an element. |
Definition at line 708 of file Phase.cpp.
References CT_ELEM_TYPE_ELECTRONCHARGE, Cantera::LookupWtElements(), Phase::m_atomicNumbers, Phase::m_atomicWeights, Phase::m_elem_type, Phase::m_elementNames, Phase::m_elementsFrozen, Phase::m_entropy298, and Phase::m_mm.
Referenced by Phase::addElementsFromXML(), Phase::addUniqueElement(), Phase::addUniqueElementAfterFreeze(), and FixedChemPotSSTP::FixedChemPotSSTP().
void addUniqueElement | ( | const XML_Node & | e | ) |
Add 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 755 of file Phase.cpp.
References Phase::addUniqueElement(), Cantera::atofCheck(), XML_Node::child(), ENTROPY298_UNKNOWN, XML_Node::hasAttrib(), XML_Node::hasChild(), and Cantera::stripws().
void addElementsFromXML | ( | const XML_Node & | phase | ) |
Add all elements referenced in an XML_Node tree.
phase | Reference to the root XML_Node of a phase |
Definition at line 780 of file Phase.cpp.
References Phase::addUniqueElement(), XML_Node::child(), XML_Node::findByAttr(), Cantera::get_XML_File(), ctml::getStringArray(), XML_Node::hasAttrib(), XML_Node::hasChild(), and XML_Node::root().
Referenced by Cantera::importPhase().
void freezeElements | ( | ) |
Prohibit addition of more elements, and prepare to add species.
Definition at line 831 of file Phase.cpp.
References Phase::m_elementsFrozen.
Referenced by FixedChemPotSSTP::FixedChemPotSSTP().
bool elementsFrozen | ( | ) |
True if freezeElements has been called.
Definition at line 836 of file Phase.cpp.
References Phase::m_elementsFrozen.
size_t addUniqueElementAfterFreeze | ( | const std::string & | symbol, |
doublereal | weight, | ||
int | atomicNumber, | ||
doublereal | entropy298 = ENTROPY298_UNKNOWN , |
||
int | elem_type = CT_ELEM_TYPE_ABSPOS |
||
) |
Add an element after elements have been frozen, 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 if used will cause Cantera to throw an error. |
elem_type | Specifies the type of the element constraint equation. This defaults to CT_ELEM_TYPE_ABSPOS, i.e., an element. |
Definition at line 841 of file Phase.cpp.
References Phase::addUniqueElement(), Phase::elementIndex(), Phase::m_elementsFrozen, Phase::m_kk, Phase::m_mm, Phase::m_speciesComp, and Cantera::npos.
Referenced by LatticeSolidPhase::installSlavePhases().
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 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 | Array 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 919 of file Phase.cpp.
References Phase::m_kk, Phase::m_mm, Phase::m_speciesCharge, Phase::m_speciesComp, Phase::m_speciesNames, and Phase::m_speciesSize.
Referenced by FixedChemPotSSTP::FixedChemPotSSTP(), LatticeSolidPhase::installSlavePhases(), and Cantera::installSpecies().
|
virtual |
Call when finished adding species.
Prepare to use them for calculation of mixture properties.
Definition at line 952 of file Phase.cpp.
References Phase::init(), Phase::m_speciesFrozen, and Phase::molecularWeights().
Referenced by FixedChemPotSSTP::FixedChemPotSSTP(), and Cantera::importPhase().
|
inline |
True if freezeSpecies has been called.
Definition at line 694 of file Phase.h.
References Phase::m_speciesFrozen.
|
inline |
Return the State Mole Fraction Number.
Definition at line 701 of file Phase.h.
References Phase::m_stateNum.
Referenced by SimpleTransport::update_C(), and LiquidTransport::update_C().
|
inline |
Every time the mole fractions have changed, this routine will increment the stateMFNumber.
@param forceChange If this is true then the stateMFNumber always
changes. This defaults to false.
Definition at line 115 of file Phase.cpp.
References Phase::m_stateNum.
Referenced by Phase::setConcentrations(), Phase::setMassFractions(), Phase::setMassFractions_NoNorm(), Phase::setMoleFractions(), and Phase::setMoleFractions_NoNorm().
|
protected |
Initialize. Make a local copy of the vector of molecular weights, and resize the composition arrays to the appropriate size.
mw | Vector of molecular weights of the species. |
Definition at line 958 of file Phase.cpp.
References Cantera::int2str(), Phase::m_kk, Phase::m_mmw, Phase::m_molwts, Phase::m_rmolwts, Phase::m_y, Phase::m_ym, and Cantera::Tiny.
Referenced by Phase::freezeSpecies().
|
inlineprotected |
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 722 of file Phase.h.
References Phase::m_molwts, and Phase::m_rmolwts.
Referenced by PureFluidPhase::initThermo(), and WaterSSTP::initThermoXML().
|
protected |
Number of species in the phase.
Definition at line 727 of file Phase.h.
Referenced by DebyeHuckel::_lnactivityWaterHelgesonFixedForm(), MixtureFugacityTP::_updateReferenceStateThermo(), ConstDensityThermo::_updateThermo(), SurfPhase::_updateThermo(), IdealGasPhase::_updateThermo(), LatticePhase::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), Phase::addUniqueElementAfterFreeze(), Phase::addUniqueSpecies(), HMWSoln::applyphScale(), RedlichKwongMFTP::applyStandardMixingRules(), GibbsExcessVPSSTP::calcDensity(), IdealMolalSoln::calcDensity(), DebyeHuckel::calcDensity(), HMWSoln::calcDensity(), IonsFromNeutralVPSSTP::calcIonMoleFractions(), MolalityVPSSTP::calcMolalities(), HMWSoln::calcMolalitiesCropped(), IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions(), PseudoBinaryVPSSTP::calcPseudoBinaryMoleFractions(), MolarityIonicVPSSTP::calcPseudoBinaryMoleFractions(), RedlichKwongMFTP::calculateAB(), GibbsExcessVPSSTP::checkMFSum(), Phase::checkSpeciesArraySize(), Phase::checkSpeciesIndex(), HMWSoln::counterIJ_setup(), RedlichKwongMFTP::critDensity(), RedlichKwongMFTP::critPressure(), RedlichKwongMFTP::critTemperature(), ConstDensityThermo::expGibbs_RT(), IdealGasPhase::expGibbs_RT_ref(), IdealSolidSolnPhase::expGibbs_RT_ref(), MolalityVPSSTP::findCLMIndex(), GibbsExcessVPSSTP::getActivities(), IdealMolalSoln::getActivities(), DebyeHuckel::getActivities(), HMWSoln::getActivities(), ConstDensityThermo::getActivityCoefficients(), SingleSpeciesTP::getActivityCoefficients(), IdealSolnGasVPSS::getActivityCoefficients(), IonsFromNeutralVPSSTP::getActivityCoefficients(), GibbsExcessVPSSTP::getActivityCoefficients(), RedlichKwongMFTP::getActivityCoefficients(), LatticeSolidPhase::getActivityCoefficients(), MixedSolventElectrolyte::getActivityCoefficients(), PhaseCombo_Interaction::getActivityCoefficients(), IdealSolidSolnPhase::getActivityCoefficients(), ThermoPhase::getActivityCoefficients(), MolalityVPSSTP::getActivityCoefficients(), IdealGasPhase::getActivityCoefficients(), LatticePhase::getActivityCoefficients(), IdealSolnGasVPSS::getActivityConcentrations(), RedlichKwongMFTP::getActivityConcentrations(), IdealMolalSoln::getActivityConcentrations(), IdealSolidSolnPhase::getActivityConcentrations(), DebyeHuckel::getActivityConcentrations(), HMWSoln::getActivityConcentrations(), ConstDensityThermo::getChemPotentials(), SurfPhase::getChemPotentials(), MolarityIonicVPSSTP::getChemPotentials(), IdealSolnGasVPSS::getChemPotentials(), RedlichKwongMFTP::getChemPotentials(), RedlichKisterVPSSTP::getChemPotentials(), MargulesVPSSTP::getChemPotentials(), MixedSolventElectrolyte::getChemPotentials(), PhaseCombo_Interaction::getChemPotentials(), IdealSolidSolnPhase::getChemPotentials(), IdealMolalSoln::getChemPotentials(), IdealGasPhase::getChemPotentials(), LatticePhase::getChemPotentials(), DebyeHuckel::getChemPotentials(), HMWSoln::getChemPotentials(), VPStandardStateTP::getChemPotentials_RT(), MixtureFugacityTP::getChemPotentials_RT(), IdealSolnGasVPSS::getChemPotentials_RT(), RedlichKwongMFTP::getChemPotentials_RT(), IdealSolidSolnPhase::getChemPotentials_RT(), SurfPhase::getCoverages(), IdealSolidSolnPhase::getCp_R_ref(), RedlichKisterVPSSTP::getd2lnActCoeffdT2(), MargulesVPSSTP::getd2lnActCoeffdT2(), MixedSolventElectrolyte::getd2lnActCoeffdT2(), PhaseCombo_Interaction::getd2lnActCoeffdT2(), IonsFromNeutralVPSSTP::getdlnActCoeffdlnN(), PhaseCombo_Interaction::getdlnActCoeffdlnN(), RedlichKisterVPSSTP::getdlnActCoeffdlnN(), MargulesVPSSTP::getdlnActCoeffdlnN(), MixedSolventElectrolyte::getdlnActCoeffdlnN(), ThermoPhase::getdlnActCoeffdlnN(), IonsFromNeutralVPSSTP::getdlnActCoeffdlnN_diag(), PhaseCombo_Interaction::getdlnActCoeffdlnN_diag(), RedlichKisterVPSSTP::getdlnActCoeffdlnN_diag(), MargulesVPSSTP::getdlnActCoeffdlnN_diag(), MixedSolventElectrolyte::getdlnActCoeffdlnN_diag(), IonsFromNeutralVPSSTP::getdlnActCoeffdlnX_diag(), PhaseCombo_Interaction::getdlnActCoeffdlnX_diag(), RedlichKisterVPSSTP::getdlnActCoeffdlnX_diag(), MargulesVPSSTP::getdlnActCoeffdlnX_diag(), MixedSolventElectrolyte::getdlnActCoeffdlnX_diag(), IonsFromNeutralVPSSTP::getdlnActCoeffds(), PhaseCombo_Interaction::getdlnActCoeffds(), RedlichKisterVPSSTP::getdlnActCoeffds(), MargulesVPSSTP::getdlnActCoeffds(), MixedSolventElectrolyte::getdlnActCoeffds(), RedlichKisterVPSSTP::getdlnActCoeffdT(), MargulesVPSSTP::getdlnActCoeffdT(), MixedSolventElectrolyte::getdlnActCoeffdT(), PhaseCombo_Interaction::getdlnActCoeffdT(), PureFluidPhase::getElectrochemPotentials(), PseudoBinaryVPSSTP::getElectrochemPotentials(), MolarityIonicVPSSTP::getElectrochemPotentials(), GibbsExcessVPSSTP::getElectrochemPotentials(), RedlichKisterVPSSTP::getElectrochemPotentials(), MargulesVPSSTP::getElectrochemPotentials(), ThermoPhase::getElectrochemPotentials(), MixedSolventElectrolyte::getElectrochemPotentials(), MolalityVPSSTP::getElectrochemPotentials(), PhaseCombo_Interaction::getElectrochemPotentials(), IdealSolidSolnPhase::getEnthalpy_RT(), LatticePhase::getEnthalpy_RT(), IdealSolidSolnPhase::getEnthalpy_RT_ref(), MixtureFugacityTP::getEntropy_R(), IdealGasPhase::getEntropy_R(), IdealSolidSolnPhase::getEntropy_R_ref(), WaterSSTP::getGibbs_ref(), LatticeSolidPhase::getGibbs_ref(), IdealSolidSolnPhase::getGibbs_ref(), LatticePhase::getGibbs_ref(), MixtureFugacityTP::getGibbs_RT(), IdealGasPhase::getGibbs_RT(), IdealSolidSolnPhase::getGibbs_RT(), LatticePhase::getGibbs_RT(), IdealSolidSolnPhase::getGibbs_RT_ref(), LatticePhase::getGibbs_RT_ref(), MixtureFugacityTP::getIntEnergy_RT(), IdealGasPhase::getIntEnergy_RT(), IdealSolidSolnPhase::getIntEnergy_RT(), IdealGasPhase::getIntEnergy_RT_ref(), IdealSolidSolnPhase::getIntEnergy_RT_ref(), MolarityIonicVPSSTP::getLnActivityCoefficients(), RedlichKisterVPSSTP::getLnActivityCoefficients(), MargulesVPSSTP::getLnActivityCoefficients(), ThermoPhase::getLnActivityCoefficients(), MolalityVPSSTP::getMolalities(), IdealMolalSoln::getMolalityActivityCoefficients(), DebyeHuckel::getMolalityActivityCoefficients(), IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads(), SurfPhase::getPartialMolarCp(), IdealSolnGasVPSS::getPartialMolarCp(), MolarityIonicVPSSTP::getPartialMolarCp(), RedlichKwongMFTP::getPartialMolarCp(), RedlichKisterVPSSTP::getPartialMolarCp(), MargulesVPSSTP::getPartialMolarCp(), MixedSolventElectrolyte::getPartialMolarCp(), PhaseCombo_Interaction::getPartialMolarCp(), IdealSolidSolnPhase::getPartialMolarCp(), IdealMolalSoln::getPartialMolarCp(), LatticePhase::getPartialMolarCp(), DebyeHuckel::getPartialMolarCp(), HMWSoln::getPartialMolarCp(), SurfPhase::getPartialMolarEnthalpies(), IdealSolnGasVPSS::getPartialMolarEnthalpies(), MolarityIonicVPSSTP::getPartialMolarEnthalpies(), IonsFromNeutralVPSSTP::getPartialMolarEnthalpies(), RedlichKwongMFTP::getPartialMolarEnthalpies(), RedlichKisterVPSSTP::getPartialMolarEnthalpies(), MargulesVPSSTP::getPartialMolarEnthalpies(), MixedSolventElectrolyte::getPartialMolarEnthalpies(), PhaseCombo_Interaction::getPartialMolarEnthalpies(), IdealMolalSoln::getPartialMolarEnthalpies(), DebyeHuckel::getPartialMolarEnthalpies(), HMWSoln::getPartialMolarEnthalpies(), SurfPhase::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarEntropies(), MolarityIonicVPSSTP::getPartialMolarEntropies(), IonsFromNeutralVPSSTP::getPartialMolarEntropies(), RedlichKwongMFTP::getPartialMolarEntropies(), RedlichKisterVPSSTP::getPartialMolarEntropies(), MargulesVPSSTP::getPartialMolarEntropies(), MixedSolventElectrolyte::getPartialMolarEntropies(), PhaseCombo_Interaction::getPartialMolarEntropies(), IdealGasPhase::getPartialMolarEntropies(), IdealMolalSoln::getPartialMolarEntropies(), IdealSolidSolnPhase::getPartialMolarEntropies(), LatticePhase::getPartialMolarEntropies(), DebyeHuckel::getPartialMolarEntropies(), HMWSoln::getPartialMolarEntropies(), IdealSolnGasVPSS::getPartialMolarIntEnergies(), RedlichKwongMFTP::getPartialMolarIntEnergies(), IdealGasPhase::getPartialMolarIntEnergies(), MolarityIonicVPSSTP::getPartialMolarVolumes(), RedlichKwongMFTP::getPartialMolarVolumes(), RedlichKisterVPSSTP::getPartialMolarVolumes(), MargulesVPSSTP::getPartialMolarVolumes(), MixedSolventElectrolyte::getPartialMolarVolumes(), IdealGasPhase::getPartialMolarVolumes(), PhaseCombo_Interaction::getPartialMolarVolumes(), DebyeHuckel::getPartialMolarVolumes(), HMWSoln::getPartialMolarVolumes(), MixtureFugacityTP::getPureGibbs(), IdealGasPhase::getPureGibbs(), LatticePhase::getPureGibbs(), IdealSolidSolnPhase::getPureGibbs(), ThermoPhase::getReferenceComposition(), VPStandardStateTP::getStandardChemPotentials(), MixtureFugacityTP::getStandardChemPotentials(), IdealGasPhase::getStandardChemPotentials(), MixtureFugacityTP::getStandardVolumes(), SurfPhase::getStandardVolumes(), IdealGasPhase::getStandardVolumes(), MixtureFugacityTP::getStandardVolumes_ref(), IdealGasPhase::getStandardVolumes_ref(), HMWSoln::getUnscaledMolalityActivityCoefficients(), HMWSoln::HMWSoln(), Phase::init(), PseudoBinaryVPSSTP::initLengths(), IdealSolnGasVPSS::initLengths(), MolarityIonicVPSSTP::initLengths(), GibbsExcessVPSSTP::initLengths(), RedlichKwongMFTP::initLengths(), VPStandardStateTP::initLengths(), LatticeSolidPhase::initLengths(), IonsFromNeutralVPSSTP::initLengths(), MixtureFugacityTP::initLengths(), PhaseCombo_Interaction::initLengths(), RedlichKisterVPSSTP::initLengths(), MargulesVPSSTP::initLengths(), MixedSolventElectrolyte::initLengths(), MolalityVPSSTP::initLengths(), IdealMolalSoln::initLengths(), IdealSolidSolnPhase::initLengths(), DebyeHuckel::initLengths(), HMWSoln::initLengths(), ConstDensityThermo::initThermo(), SurfPhase::initThermo(), MolarityIonicVPSSTP::initThermo(), StoichSubstanceSSTP::initThermo(), VPStandardStateTP::initThermo(), LatticeSolidPhase::initThermo(), SingleSpeciesTP::initThermo(), IdealGasPhase::initThermo(), LatticePhase::initThermo(), ThermoPhase::initThermo(), RedlichKwongMFTP::initThermoXML(), VPStandardStateTP::initThermoXML(), IonsFromNeutralVPSSTP::initThermoXML(), IdealMolalSoln::initThermoXML(), LatticePhase::initThermoXML(), IdealSolidSolnPhase::initThermoXML(), DebyeHuckel::initThermoXML(), IdealSolidSolnPhase::logStandardConc(), Phase::nSpecies(), VPStandardStateTP::operator=(), Phase::operator=(), ThermoPhase::operator=(), MolalityVPSSTP::osmoticCoefficient(), HMWSoln::printCoeffs(), RedlichKwongMFTP::readXMLCrossFluid(), RedlichKwongMFTP::readXMLPureFluid(), IdealSolidSolnPhase::referenceConcentration(), HMWSoln::relative_enthalpy(), HMWSoln::relative_molal_enthalpy(), DebyeHuckel::s_update_d2lnMolalityActCoeff_dT2(), HMWSoln::s_update_d2lnMolalityActCoeff_dT2(), IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnN(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN(), MargulesVPSSTP::s_update_dlnActCoeff_dlnN(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN(), IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnN_diag(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnN_diag(), MargulesVPSSTP::s_update_dlnActCoeff_dlnN_diag(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN_diag(), IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnX_diag(), PhaseCombo_Interaction::s_update_dlnActCoeff_dlnX_diag(), MargulesVPSSTP::s_update_dlnActCoeff_dlnX_diag(), MixedSolventElectrolyte::s_update_dlnActCoeff_dlnX_diag(), PhaseCombo_Interaction::s_update_dlnActCoeff_dT(), RedlichKisterVPSSTP::s_update_dlnActCoeff_dT(), MargulesVPSSTP::s_update_dlnActCoeff_dT(), MixedSolventElectrolyte::s_update_dlnActCoeff_dT(), RedlichKisterVPSSTP::s_update_dlnActCoeff_dX_(), IonsFromNeutralVPSSTP::s_update_dlnActCoeffdT(), DebyeHuckel::s_update_dlnMolalityActCoeff_dP(), HMWSoln::s_update_dlnMolalityActCoeff_dP(), DebyeHuckel::s_update_dlnMolalityActCoeff_dT(), HMWSoln::s_update_dlnMolalityActCoeff_dT(), MolarityIonicVPSSTP::s_update_lnActCoeff(), IonsFromNeutralVPSSTP::s_update_lnActCoeff(), PhaseCombo_Interaction::s_update_lnActCoeff(), RedlichKisterVPSSTP::s_update_lnActCoeff(), MargulesVPSSTP::s_update_lnActCoeff(), MixedSolventElectrolyte::s_update_lnActCoeff(), DebyeHuckel::s_update_lnMolalityActCoeff(), HMWSoln::s_update_lnMolalityActCoeff(), IdealMolalSoln::s_updateIMS_lnMolalityActCoeff(), HMWSoln::s_updateIMS_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_dP(), HMWSoln::s_updateScaling_pHScaling_dT(), HMWSoln::s_updateScaling_pHScaling_dT2(), Phase::setConcentrations(), SurfPhase::setCoverages(), SurfPhase::setCoveragesNoNorm(), Phase::setMassFractions(), Phase::setMassFractions_NoNorm(), MolalityVPSSTP::setMolalities(), Phase::setMoleFractions(), Phase::setMoleFractions_NoNorm(), ThermoPhase::setReferenceComposition(), MolalityVPSSTP::setSolvent(), IdealSolnGasVPSS::setToEquilState(), RedlichKwongMFTP::setToEquilState(), IdealGasPhase::setToEquilState(), IdealSolidSolnPhase::setToEquilState(), ThermoPhase::speciesData(), Phase::speciesIndex(), IdealSolidSolnPhase::standardConcentration(), RedlichKwongMFTP::updateAB(), and ThermoPhase::~ThermoPhase().
|
protected |
Dimensionality of the phase.
Volumetric phases have dimensionality 3 and surface phases have dimensionality 2.
Definition at line 731 of file Phase.h.
Referenced by Phase::nDim(), Phase::operator=(), and Phase::setNDim().
|
protected |
Atomic composition of the species.
The number of atoms of element 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 736 of file Phase.h.
Referenced by Phase::addUniqueElementAfterFreeze(), Phase::addUniqueSpecies(), Phase::getAtoms(), LatticeSolidPhase::installSlavePhases(), Phase::nAtoms(), and Phase::operator=().
|
protected |
Vector of species sizes.
length m_kk. Used in some equations of state which employ the constant partial molar volume approximation.
Definition at line 740 of file Phase.h.
Referenced by Phase::addUniqueSpecies(), DebyeHuckel::initLengths(), HMWSoln::initLengths(), MineralEQ3::initThermoXML(), DebyeHuckel::initThermoXML(), Phase::operator=(), Phase::size(), HMWSoln::speciesMolarVolume(), and DebyeHuckel::standardConcentration().
|
protected |
Vector of species charges. length m_kk.
Definition at line 742 of file Phase.h.
Referenced by Phase::addUniqueSpecies(), HMWSoln::applyphScale(), HMWSoln::calcMolalitiesCropped(), MolarityIonicVPSSTP::calcPseudoBinaryMoleFractions(), Phase::charge(), IonsFromNeutralVPSSTP::getDissociationCoeffs(), MolarityIonicVPSSTP::initThermo(), DebyeHuckel::initThermoXML(), Phase::operator=(), HMWSoln::printCoeffs(), PhaseCombo_Interaction::readXMLBinarySpecies(), RedlichKisterVPSSTP::readXMLBinarySpecies(), MargulesVPSSTP::readXMLBinarySpecies(), MixedSolventElectrolyte::readXMLBinarySpecies(), HMWSoln::relative_molal_enthalpy(), DebyeHuckel::s_update_d2lnMolalityActCoeff_dT2(), DebyeHuckel::s_update_dlnMolalityActCoeff_dP(), DebyeHuckel::s_update_dlnMolalityActCoeff_dT(), DebyeHuckel::s_update_lnMolalityActCoeff(), HMWSoln::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_dP(), HMWSoln::s_updateScaling_pHScaling_dT(), and HMWSoln::s_updateScaling_pHScaling_dT2().
|
private |
XML node containing the XML info for this phase.
Definition at line 745 of file Phase.h.
Referenced by Phase::operator=(), Phase::xml(), and Phase::~Phase().
|
private |
ID of the phase.
This is the value of the ID attribute of the XML phase node. The field will stay that way even if the name is changed.
Definition at line 749 of file Phase.h.
Referenced by Phase::id(), Phase::operator=(), Phase::setID(), and Phase::speciesIndex().
|
private |
Name of the phase.
Initially, this is the value of the ID attribute of the XML phase node. It may be changed to another value during the course of a calculation.
Definition at line 754 of file Phase.h.
Referenced by Phase::name(), Phase::operator=(), Phase::setName(), Phase::speciesIndex(), and Phase::speciesSPName().
|
private |
Temperature (K). This is an independent variable.
Definition at line 756 of file Phase.h.
Referenced by Phase::operator=(), Phase::setTemperature(), and Phase::temperature().
|
private |
Density (kg m-3).
This is an independent variable except in the incompressible degenerate case. Thus, the pressure is determined from this variable rather than other way round.
Definition at line 761 of file Phase.h.
Referenced by Phase::concentration(), Phase::density(), Phase::getConcentrations(), Phase::operator=(), Phase::setDensity(), and Phase::setMolarDensity().
|
private |
mean molecular weight of the mixture (kg kmol-1)
Definition at line 763 of file Phase.h.
Referenced by Phase::getMoleFractions(), Phase::init(), Phase::mean_X(), Phase::meanMolecularWeight(), Phase::moleFraction(), Phase::operator=(), Phase::setConcentrations(), Phase::setMassFractions(), Phase::setMassFractions_NoNorm(), Phase::setMoleFractions(), Phase::setMoleFractions_NoNorm(), Phase::sum_xlogQ(), and Phase::sum_xlogx().
|
mutableprivate |
m_ym[k] = mole fraction of species k divided by the mean molecular weight of mixture.
Definition at line 767 of file Phase.h.
Referenced by Phase::getConcentrations(), Phase::getMoleFractions(), Phase::init(), Phase::mean_X(), Phase::moleFractdivMMW(), Phase::moleFraction(), Phase::operator=(), Phase::setConcentrations(), Phase::setMassFractions(), Phase::setMassFractions_NoNorm(), Phase::setMoleFractions(), Phase::setMoleFractions_NoNorm(), Phase::sum_xlogQ(), and Phase::sum_xlogx().
|
mutableprivate |
species mass fractions
Definition at line 769 of file Phase.h.
Referenced by Phase::concentration(), Phase::getMassFractions(), Phase::init(), Phase::massFraction(), Phase::massFractions(), Phase::mean_Y(), Phase::operator=(), Phase::setConcentrations(), Phase::setMassFractions(), Phase::setMassFractions_NoNorm(), Phase::setMoleFractions(), and Phase::setMoleFractions_NoNorm().
|
private |
species molecular weights (kg kmol-1)
Definition at line 771 of file Phase.h.
Referenced by Phase::init(), Phase::molecularWeight(), Phase::molecularWeights(), Phase::operator=(), Phase::setConcentrations(), Phase::setMolecularWeight(), Phase::setMoleFractions(), and Phase::setMoleFractions_NoNorm().
|
private |
inverse of species molecular weights (kmol kg-1)
Definition at line 773 of file Phase.h.
Referenced by Phase::concentration(), Phase::init(), Phase::operator=(), Phase::setMassFractions(), Phase::setMassFractions_NoNorm(), and Phase::setMolecularWeight().
|
private |
State Change variable.
Whenever the mole fraction vector changes, this int is incremented.
Definition at line 778 of file Phase.h.
Referenced by Phase::operator=(), Phase::stateMFChangeCalc(), and Phase::stateMFNumber().
|
private |
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 783 of file Phase.h.
Referenced by Phase::freezeSpecies(), Phase::operator=(), and Phase::speciesFrozen().
|
private |
If this is true, then no elements may be added to the object.
Definition at line 786 of file Phase.h.
Referenced by Phase::addElement(), Phase::addUniqueElement(), Phase::addUniqueElementAfterFreeze(), Phase::elementsFrozen(), Phase::freezeElements(), and Phase::operator=().
|
private |
Vector of the species names.
Definition at line 789 of file Phase.h.
Referenced by Phase::addUniqueSpecies(), Phase::operator=(), Phase::speciesIndex(), Phase::speciesName(), and Phase::speciesNames().
|
private |
Number of elements.
Definition at line 791 of file Phase.h.
Referenced by Phase::addElement(), Phase::addUniqueElement(), Phase::addUniqueElementAfterFreeze(), Phase::addUniqueSpecies(), Phase::checkElementArraySize(), Phase::checkElementIndex(), Phase::elementIndex(), Phase::entropyElement298(), Phase::getAtoms(), Phase::nAtoms(), Phase::nElements(), and Phase::operator=().
|
private |
element atomic weights (kg kmol-1)
Definition at line 792 of file Phase.h.
Referenced by Phase::addElement(), Phase::addUniqueElement(), Phase::atomicWeight(), Phase::atomicWeights(), and Phase::operator=().
|
private |
element atomic numbers
Definition at line 793 of file Phase.h.
Referenced by Phase::addUniqueElement(), Phase::atomicNumber(), and Phase::operator=().
|
private |
element names
Definition at line 794 of file Phase.h.
Referenced by Phase::addElement(), Phase::addUniqueElement(), Phase::elementIndex(), Phase::elementName(), Phase::elementNames(), and Phase::operator=().
|
private |
Vector of element types.
Definition at line 795 of file Phase.h.
Referenced by Phase::addElement(), Phase::addUniqueElement(), Phase::changeElementType(), Phase::elementType(), and Phase::operator=().
|
private |
Entropy at 298.15 K and 1 bar of stable state pure elements (J kmol-1)
Definition at line 798 of file Phase.h.
Referenced by Phase::addUniqueElement(), Phase::entropyElement298(), and Phase::operator=().