14 #include "vcs_species_thermo.h"
15 #include "vcs_SpeciesProperties.h"
21 #include "cantera/thermo/mix_defs.h"
85 int estimateEquil,
int printLvl,
87 doublereal rtol,
int maxsteps,
int maxiter,
120 rtol, maxsteps, maxiter, loglevel);
124 addLogEntry(
"MultiPhaseEquil solver returned an error code: ", retn);
133 }
else if (solver == 1) {
138 (void)
equilibrate(*m, XY, rtol, maxsteps, maxiter, loglevel-1);
152 }
else if (solver == 0) {
157 bool useThermoPhaseElementPotentials =
false;
158 if (estimateEquil == 0) {
159 useThermoPhaseElementPotentials =
true;
162 useThermoPhaseElementPotentials, loglevel-1);
169 "ChemEquil equilibrium solver failed");
245 int estimateEquil,
int printLvl,
int solver,
246 doublereal tol,
int maxsteps,
int maxiter,
251 tol, maxsteps, maxiter, loglevel);
304 int estimateEquil,
int printLvl,
int solver,
305 doublereal tol,
int maxsteps,
int maxiter,
int loglevel)
307 static int counter = 0;
320 int printLvlSub =
std::max(0, printLvl-1);
327 int err = eqsolve->
equilibrate(ixy, estimateEquil, printLvlSub, tol, maxsteps, loglevel);
337 string reportFile =
"vcs_equilibrate_res.csv";
339 reportFile =
"vcs_equilibrate_res_" +
int2str(counter) +
".csv";
352 }
else if (solver == 1) {
353 if (ixy == TP || ixy == HP || ixy == SP || ixy == TV) {
355 double err = s.
equilibrate(ixy, tol, maxsteps, maxiter, loglevel);
370 addLogEntry(
"multiphase equilibrium can be done only for TP, HP, SP, or TV");
377 throw CanteraError(
"vcs_equilibrate_1",
"unknown solver");
405 double& funcStab,
int printLvl,
int loglevel)
408 static int counter = 0;
410 addLogEntry(
"multiphase phase stability function");
416 int printLvlSub =
std::max(0, printLvl-1);
430 string reportFile =
"vcs_phaseStability.csv";
432 reportFile =
"vcs_phaseStability_" +
int2str(counter) +
".csv";