Added missing partial molar functions.
This commit is contained in:
parent
dafd2ad411
commit
86a6070392
2 changed files with 82 additions and 13 deletions
|
|
@ -1,8 +1,9 @@
|
|||
/**
|
||||
* @file SurfPhase.cpp
|
||||
* Definitions for a simple thermoydnamics model of a surface phase derived from ThermoPhase,
|
||||
* assuming an ideal solution model
|
||||
* (see \ref thermoprops and class \link Cantera::SurfPhase SurfPhase\endlink).
|
||||
* Definitions for a simple thermoydnamics model of a surface phase
|
||||
* derived from ThermoPhase, assuming an ideal solution model
|
||||
* (see \ref thermoprops and class
|
||||
* \link Cantera::SurfPhase SurfPhase\endlink).
|
||||
*/
|
||||
|
||||
// Copyright 2002 California Institute of Technology
|
||||
|
|
@ -75,6 +76,45 @@ namespace Cantera {
|
|||
doublereal SurfPhase::
|
||||
intEnergy_mole() const { return enthalpy_mole(); }
|
||||
|
||||
/*
|
||||
* Get the array of partial molar enthalpies of the species
|
||||
* units = J / kmol
|
||||
*/
|
||||
void SurfPhase::getPartialMolarEnthalpies(doublereal* hbar) const {
|
||||
getEnthalpy_RT(hbar);
|
||||
doublereal rt = GasConstant * temperature();
|
||||
for (int k = 0; k < m_kk; k++) {
|
||||
hbar[k] *= rt;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns an array of partial molar entropies of the species in the
|
||||
// solution. Units: J/kmol/K.
|
||||
/*
|
||||
* @param sbar Output vector of species partial molar entropies.
|
||||
* Length = m_kk. units are J/kmol/K.
|
||||
*/
|
||||
void SurfPhase::getPartialMolarEntropies(doublereal* sbar) const {
|
||||
getEntropy_R(sbar);
|
||||
for (int k = 0; k < m_kk; k++) {
|
||||
sbar[k] *= GasConstant;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns an array of partial molar heat capacities of the species in the
|
||||
// solution. Units: J/kmol/K.
|
||||
/*
|
||||
* @param sbar Output vector of species partial molar entropies.
|
||||
* Length = m_kk. units are J/kmol/K.
|
||||
*/
|
||||
void SurfPhase::getPartialMolarCp(doublereal* cpbar) const {
|
||||
getCp_R(cpbar);
|
||||
for (int k = 0; k < m_kk; k++) {
|
||||
cpbar[k] *= GasConstant;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SurfPhase::getPartialMolarVolumes(doublereal* vbar) const {
|
||||
getStandardVolumes(vbar);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,44 @@ namespace Cantera {
|
|||
*/
|
||||
virtual doublereal intEnergy_mole() const;
|
||||
|
||||
//! Get the species chemical potentials. Units: J/kmol.
|
||||
/*!
|
||||
* This function returns a vector of chemical potentials of the
|
||||
* species in solution at the current temperature, pressure
|
||||
* and mole fraction of the solution.
|
||||
*
|
||||
* @param mu Output vector of species chemical
|
||||
* potentials. Length: m_kk. Units: J/kmol
|
||||
*/
|
||||
virtual void getChemPotentials(doublereal* mu) const;
|
||||
|
||||
//! Returns an array of partial molar enthalpies for the species
|
||||
//! in the mixture. Units (J/kmol)
|
||||
/*!
|
||||
* @param hbar Output vector of species partial molar enthalpies.
|
||||
* Length: m_kk. units are J/kmol.
|
||||
*/
|
||||
virtual void getPartialMolarEnthalpies(doublereal* hbar) const;
|
||||
|
||||
//! Returns an array of partial molar entropies of the species in the
|
||||
//! solution. Units: J/kmol/K.
|
||||
/*!
|
||||
* @param sbar Output vector of species partial molar entropies.
|
||||
* Length = m_kk. units are J/kmol/K.
|
||||
*/
|
||||
virtual void getPartialMolarEntropies(doublereal* sbar) const;
|
||||
|
||||
|
||||
|
||||
//! Return an array of partial molar heat capacities for the
|
||||
//! species in the mixture. Units: J/kmol/K
|
||||
/*!
|
||||
* @param cpbar Output vector of species partial molar heat
|
||||
* capacities at constant pressure.
|
||||
* Length = m_kk. units are J/kmol/K.
|
||||
*/
|
||||
virtual void getPartialMolarCp(doublereal* cpbar) const;
|
||||
|
||||
//! Return an array of partial molar volumes for the
|
||||
//! species in the mixture. Units: m^3/kmol.
|
||||
/*!
|
||||
|
|
@ -222,16 +260,7 @@ namespace Cantera {
|
|||
*/
|
||||
virtual void getStandardChemPotentials(doublereal* mu0) const;
|
||||
|
||||
//! Get the species chemical potentials. Units: J/kmol.
|
||||
/*!
|
||||
* This function returns a vector of chemical potentials of the
|
||||
* species in solution at the current temperature, pressure
|
||||
* and mole fraction of the solution.
|
||||
*
|
||||
* @param mu Output vector of species chemical
|
||||
* potentials. Length: m_kk. Units: J/kmol
|
||||
*/
|
||||
virtual void getChemPotentials(doublereal* mu) const;
|
||||
|
||||
|
||||
//! Return a vector of activity concentrations for each species
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue