Catching MargulesVPSSTP up to prior commit (nomenclature change)

This commit is contained in:
John Hewson 2009-11-15 04:49:05 +00:00
parent aae7d0b440
commit 71a740c161
2 changed files with 21 additions and 16 deletions

View file

@ -656,12 +656,12 @@ namespace Cantera {
*
* he = X_A X_B(B + C(X_A - X_B))
*/
void MargulesVPSSTP::s_update_dlnActCoeff_dlnX() const {
void MargulesVPSSTP::s_update_dlnActCoeff_dlnC() const {
int iA, iB;
doublereal XA, XB, g0 , g1;
doublereal T = temperature();
fvo_zero_dbl_1(dlnActCoeffdlnX_Scaled_, m_kk);
fvo_zero_dbl_1(dlnActCoeffdlnC_Scaled_, m_kk);
doublereal RT = GasConstant * T;
for (int i = 0; i < numBinaryInteractions_; i++) {
@ -674,17 +674,17 @@ namespace Cantera {
g0 = (m_HE_b_ij[i] - T * m_SE_b_ij[i]) / RT ;
g1 = (m_HE_c_ij[i] - T * m_SE_c_ij[i]) / RT;
dlnActCoeffdlnX_Scaled_[iA] += XA * ( ( - 2.0 + 2.0 * XA ) * g0
dlnActCoeffdlnC_Scaled_[iA] += XA * ( ( - 2.0 + 2.0 * XA ) * g0
+ ( - 4.0 + 10.0 * XA - 6.0 * XA*XA ) * g1 ) ;
dlnActCoeffdlnX_Scaled_[iB] += XB * ( ( - 2.0 + 2.0 * XB ) * g0
dlnActCoeffdlnC_Scaled_[iB] += XB * ( ( - 2.0 + 2.0 * XB ) * g0
+ ( 2.0 - 8.0 * XB + 6.0 * XB*XB ) * g1 ) ;
}
}
void MargulesVPSSTP::getdlnActCoeffdlnX(doublereal *dlnActCoeffdlnX) const {
s_update_dlnActCoeff_dlnX();
void MargulesVPSSTP::getdlnActCoeffdlnC(doublereal *dlnActCoeffdlnC) const {
s_update_dlnActCoeff_dlnC();
for (int k = 0; k < m_kk; k++) {
dlnActCoeffdlnX[k] = dlnActCoeffdlnX_Scaled_[k];
dlnActCoeffdlnC[k] = dlnActCoeffdlnC_Scaled_[k];
}
}

View file

@ -593,21 +593,26 @@ namespace Cantera {
virtual void getdlnActCoeffdT(doublereal *dlnActCoeffdT) const;
//! Get the array of derivatives of the log activity coefficients
//! with respect to the log mole fractions
//! Get the array of log concentration-like derivatives of the
//! log activity coefficients
/*!
* This function is a virtual class, but it first appears in
* GibbsExcessVPSSTP class and derived classes.
* Output vector of log(mole fraction) derivatives of the
* log Activity Coefficients.
* This function is a virtual method. For ideal mixtures
* (unity activity coefficients), this can return zero.
* Implementations should take the derivative of the
* logarithm of the activity coefficient with respect to the
* logarithm of the concentration-like variable (i.e. mole fraction,
* molality, etc.) that represents the standard state.
* This quantity is to be used in conjunction with derivatives of
* that concentration-like variable when the derivative of the chemical
* potential is taken.
*
* units = dimensionless
*
* @param dlnActCoeffdlnX Output vector of log(mole fraction)
* @param dlnActCoeffdlnC Output vector of log(mole fraction)
* derivatives of the log Activity Coefficients.
* length = m_kk
*/
virtual void getdlnActCoeffdlnX(doublereal *dlnActCoeffdlnX) const;
virtual void getdlnActCoeffdlnC(doublereal *dlnActCoeffdlnC) const;
//@}
@ -756,7 +761,7 @@ namespace Cantera {
* derivative of the natural logarithm of the activity coefficients
* wrt logarithm of the mole fractions.
*/
void s_update_dlnActCoeff_dlnX() const;
void s_update_dlnActCoeff_dlnC() const;
private: