Skip to content

Commit

Permalink
Adding some commenting to IdealSolidSolnPhase
Browse files Browse the repository at this point in the history
Removing remnant code from a different update on another branch.
  • Loading branch information
decaluwe authored and speth committed Sep 16, 2021
1 parent 8266605 commit 22bb368
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/thermo/IdealSolidSolnPhase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void IdealSolidSolnPhase::getActivityCoefficients(doublereal* ac) const

void IdealSolidSolnPhase::getChemPotentials(doublereal* mu) const
{
doublereal delta_p = m_Pcurrent - m_Pref;
double delta_p = m_Pcurrent - m_Pref;
const vector_fp& g_RT = gibbs_RT_ref();
for (size_t k = 0; k < m_kk; k++) {
double xx = std::max(SmallNumber, moleFraction(k));
Expand All @@ -205,7 +205,7 @@ void IdealSolidSolnPhase::getChemPotentials(doublereal* mu) const

void IdealSolidSolnPhase::getChemPotentials_RT(doublereal* mu) const
{
doublereal delta_pdRT = (m_Pcurrent - m_Pref) / (temperature() * GasConstant);
double delta_pdRT = (m_Pcurrent - m_Pref) / (temperature() * GasConstant);
const vector_fp& g_RT = gibbs_RT_ref();
for (size_t k = 0; k < m_kk; k++) {
double xx = std::max(SmallNumber, moleFraction(k));
Expand Down Expand Up @@ -249,7 +249,7 @@ void IdealSolidSolnPhase::getPartialMolarVolumes(doublereal* vbar) const
void IdealSolidSolnPhase::getPureGibbs(doublereal* gpure) const
{
const vector_fp& gibbsrt = gibbs_RT_ref();
doublereal delta_p = (m_Pcurrent - m_Pref);
double delta_p = (m_Pcurrent - m_Pref);
for (size_t k = 0; k < m_kk; k++) {
gpure[k] = RT() * gibbsrt[k] + delta_p * m_speciesMolarVolume[k];
}
Expand Down Expand Up @@ -494,7 +494,12 @@ void IdealSolidSolnPhase::initThermoXML(XML_Node& phaseNode, const std::string&
void IdealSolidSolnPhase::setToEquilState(const doublereal* mu_RT)
{
const vector_fp& grt = gibbs_RT_ref();


// Within the method, we protect against inf results if the exponent is too
// high.
//
// If it is too low, we set the partial pressure to zero. This capability is
// needed by the elemental potential method.
doublereal pres = 0.0;
double m_p0 = refPressure();
for (size_t k = 0; k < m_kk; k++) {
Expand Down

0 comments on commit 22bb368

Please sign in to comment.