Fixed an interface error with invoking ChemEquil.
This commit is contained in:
parent
dd4151b6b0
commit
3aa28fe8d7
3 changed files with 10 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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.");
|
||||
|
|
|
|||
|
|
@ -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.");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue