diff --git a/Cantera/src/thermo/HMWSoln.h b/Cantera/src/thermo/HMWSoln.h
index 72489634e..6efaad8f8 100644
--- a/Cantera/src/thermo/HMWSoln.h
+++ b/Cantera/src/thermo/HMWSoln.h
@@ -449,8 +449,8 @@ namespace Cantera {
* \f[
* \ln(\gamma_M^\triangle) = -z_M^2(F) + \sum_a m_a \left( 2 B_{Ma} + Z C_{Ma} \right)
* + z_M \left( \sum_a \sum_c m_a m_c C_{ca} \right)
- * + \sum_c m_c \left[ 2 \Phi_{Mc} + \sum_a m_a \psi_{Mca} \right]
- * + \sum_{a < a'} \sum m_a m_{a'} \psi_{Ma{a'}}
+ * + \sum_c m_c \left[ 2 \Phi_{Mc} + \sum_a m_a \Psi_{Mca} \right]
+ * + \sum_{a < a'} \sum m_a m_{a'} \Psi_{Ma{a'}}
* + 2 \sum_n m_n \lambda_{nM}
* \f]
*
@@ -459,8 +459,8 @@ namespace Cantera {
* \f[
* \ln(\gamma_X^\triangle) = -z_X^2(F) + \sum_a m_c \left( 2 B_{cX} + Z C_{cX} \right)
* + \left|z_X \right| \left( \sum_a \sum_c m_a m_c C_{ca} \right)
- * + \sum_a m_a \left[ 2 \Phi_{Xa} + \sum_c m_c \psi_{cXa} \right]
- * + \sum_{c < c'} \sum m_c m_{c'} \psi_{c{c'}X}
+ * + \sum_a m_a \left[ 2 \Phi_{Xa} + \sum_c m_c \Psi_{cXa} \right]
+ * + \sum_{c < c'} \sum m_c m_{c'} \Psi_{c{c'}X}
* + 2 \sum_n m_n \lambda_{nM}
* \f]
* where the function \f$ F \f$ is given by
@@ -607,7 +607,8 @@ namespace Cantera {
*
* In later papers, Pitzer has added additional temperature dependencies
* to all of the other remaining second and third order virial coefficients.
- * Some of these dependencies are justified and motivated by theory. Therefore,
+ * Some of these dependencies are justified and motivated by theory.
+ * Therefore,
* a formalism wherein all of the coefficients in the base theory have
* temperature dependencies associated with them has been implemented
* within the %HMWSoln object. Much of the formalism, however,
@@ -720,7 +721,7 @@ namespace Cantera {
* anion1 , anion2 respectively
* to identify the interaction. No temperature or
* pressure dependence of this parameter is currently allowed.
- * An example of the block is biven below
+ * An example of the block is presented below.
*
* @code
@@ -731,9 +732,59 @@ namespace Cantera {
*
* Ternary Pitzer Parameters
*
+ * The \f$ \Psi_{c{c'}a} \f$ and \f$ \Psi_{ca{a'}} \f$ terms
+ * represent ternary interactions between two cations and
+ * an anion and two anions and a cation, respectively.
+ * In Pitzer's implementation these terms are usually small
+ * in absolute size. Currently these parameters do not have
+ * any dependence on temperature, pressure, or ionic strength.
+ *
+ * Their values are input using the XML element
+ * psiCommonCation and psiCommonAnion .
+ * The species id's are specified in attribute fields in
+ * the XML element. The fields cation,
+ * anion1, and anion2
+ * are used for psiCommonCation. The fields anion,
+ * cation1 and cation2 are used for
+ * psiCommonAnion. An example block is given below.
+ * The Theta field below is a duplicate of the
+ * thetaAnion field mentioned above. The two fields
+ * are input into the same block for convenience, and because
+ * their data are highly correlated, in practice.
+ * It is an error for the
+ * two blocks to specify different information about
+ * thetaAnion (or thetaCation) in different blocks. It's
+ * ok to specify duplicate but consistent information
+ * in multiple blocks.
+ *
+ * @code
+
+ -0.05
+ -0.006
+
+ @endcode
*
* Treatment of Neutral Species
*
+ * Binary virial-coefficient-like interactions between two neutral
+ * species may be specified in the \f$ \lambda_{mn} \f$ terms
+ * that appear in the formulas above.
+ * Currently these interactions are independent of temperature,
+ * pressure, and ionic strength. Also, currently, the neutrality
+ * of the species are not checked. Therefore, this interaction
+ * may involve charged species in the solution as well.
+ * The identity of the species is specified by the
+ * species1 and species2 attributes to the XML
+ * lambdaNeutral node. These terms are symmetrical;
+ * species1 and species2 may be reversed and
+ * the term will be the same. An example is given below.
+ *
+ * @code
+
+ 0.05
+
+ @endcode
+
*
* Example of the Specification of Parameters for the Activity
* Coefficients
@@ -2693,8 +2744,8 @@ namespace Cantera {
*/
mutable vector_fp m_d2lnActCoeffMolaldT2;
- //! Derivative of the Logarithm of the activity coefficients on the molality
- //! scale wrt P
+ //! Derivative of the Logarithm of the activity coefficients on the
+ //! molality scale wrt P
/*!
* index is the species index
*/
diff --git a/Cantera/src/thermo/HMWSoln_input.cpp b/Cantera/src/thermo/HMWSoln_input.cpp
index 584dd04f4..58b3a73a4 100644
--- a/Cantera/src/thermo/HMWSoln_input.cpp
+++ b/Cantera/src/thermo/HMWSoln_input.cpp
@@ -350,7 +350,7 @@ namespace Cantera {
}
}
- /**
+ /*
* Process an XML node called "readXMLPsiCommonCation".
* This node contains all of the parameters necessary to describe
* the binary interactions between two anions and one common cation.
@@ -403,7 +403,7 @@ namespace Cantera {
throw CanteraError("HMWSoln::readXMLPsiCommonCation",
"anion2 charge problem");
}
-
+
int n = iSpecies * m_kk + jSpecies;
int counter = m_CounterIJ[n];
int num = BinSalt.nChildren();
@@ -547,13 +547,13 @@ namespace Cantera {
}
double *charge = DATA_PTR(m_speciesCharge);
string stemp;
- string iName = BinSalt.attrib("neutral");
+ string iName = BinSalt.attrib("species1");
if (iName == "") {
- throw CanteraError("HMWSoln::readXMLLambdaNeutral", "no neutral attrib");
+ throw CanteraError("HMWSoln::readXMLLambdaNeutral", "no species1 attrib");
}
- string jName = BinSalt.attrib("speciesj");
+ string jName = BinSalt.attrib("species2");
if (jName == "") {
- throw CanteraError("HMWSoln::readXMLLambdaNeutral", "no speciesj attrib");
+ throw CanteraError("HMWSoln::readXMLLambdaNeutral", "no species2 attrib");
}
/*
* Find the index of the species in the current phase. It's not
@@ -564,7 +564,8 @@ namespace Cantera {
return;
}
if (charge[iSpecies] != 0) {
- throw CanteraError("HMWSoln::readXMLLambdaNeutral", "neutral charge problem");
+ throw CanteraError("HMWSoln::readXMLLambdaNeutral",
+ "neutral charge problem");
}
int jSpecies = speciesIndex(jName);
if (jSpecies < 0) {