diff --git a/Cantera/src/equil/ChemEquil.cpp b/Cantera/src/equil/ChemEquil.cpp index 8ec384626..32c2416c6 100755 --- a/Cantera/src/equil/ChemEquil.cpp +++ b/Cantera/src/equil/ChemEquil.cpp @@ -460,7 +460,7 @@ namespace Cantera { * ThermoPhase object. The properties must be already contained * within the current thermodynamic state of the system. */ - int ChemEquil::equilibrate(thermo_t& s, const char* XY, + int ChemEquil::equilibrate(thermo_t& s, const char* XY, bool useThermoPhaseElementPotentials, int loglevel) { vector_fp elMolesGoal(s.nElements()); initialize(s); diff --git a/Cantera/src/equil/equilibrate.cpp b/Cantera/src/equil/equilibrate.cpp index f91dedf88..d3ae15d9b 100644 --- a/Cantera/src/equil/equilibrate.cpp +++ b/Cantera/src/equil/equilibrate.cpp @@ -198,7 +198,9 @@ namespace Cantera { e->options.maxIterations = maxsteps; e->options.relTolerance = rtol; nAttempts++; - retnSub = e->equilibrate(s,XY,loglevel-1); + bool useThermoPhaseElementPotentials = true; + retnSub = e->equilibrate(s,XY, + useThermoPhaseElementPotentials, loglevel-1); if (retnSub < 0) { if (loglevel > 0) addLogEntry("ChemEquil solver failed."); diff --git a/Cantera/src/equil/vcs_equilibrate.cpp b/Cantera/src/equil/vcs_equilibrate.cpp index f0c7072fe..a72178f81 100644 --- a/Cantera/src/equil/vcs_equilibrate.cpp +++ b/Cantera/src/equil/vcs_equilibrate.cpp @@ -160,7 +160,12 @@ namespace Cantera { try { e->options.maxIterations = maxsteps; e->options.relTolerance = rtol; - retnSub = e->equilibrate(s,XY,loglevel-1); + bool useThermoPhaseElementPotentials = false; + if (estimateEquil == 0) { + useThermoPhaseElementPotentials = true; + } + retnSub = e->equilibrate(s, XY, + useThermoPhaseElementPotentials, loglevel-1); if (retnSub < 0) { if (loglevel > 0) { addLogEntry("ChemEquil solver failed.");