Added another interface function

This commit is contained in:
Harry Moffat 2009-02-18 22:31:32 +00:00
parent 48526118f2
commit ec0276ab64
2 changed files with 11 additions and 0 deletions

View file

@ -145,6 +145,13 @@ namespace Cantera {
for (k = 0; k < nsp; k++) a[k] /= standardConcentration(k);
}
void ThermoPhase::getLNActivityCoefficients(doublereal *const lnac) const {
getActivityCoefficients(lnac);
for (int k = 0; k < m_kk; k++) {
lnac[k] = std::log(lnac[k]);
}
}
void ThermoPhase::setState_TPX(doublereal t, doublereal p,
const doublereal* x) {
setMoleFractions(x); setTemperature(t); setPressure(p);

View file

@ -1076,6 +1076,8 @@ namespace Cantera {
//! Get the array of non-dimensional activities at
//! the current solution temperature, pressure, and solution concentration.
/*!
* Note, for molality based formulations, this returns the
* molality based activities.
*
* We resolve this function at this level by calling
* on the activityConcentration function. However,
@ -1098,6 +1100,8 @@ namespace Cantera {
err("getActivityCoefficients");
}
}
virtual void getLNActivityCoefficients(doublereal * const lnac) const;
//@}
/// @name Partial Molar Properties of the Solution