12 doublereal tol,
int maxsteps,
int maxiter,
16 "Use MultiPhase::equilibrate instead. To be removed after Cantera 2.2.");
19 if (ixy == TP || ixy == HP || ixy == SP || ixy == TV) {
21 double err = s.
equilibrate(ixy, tol, maxsteps, maxiter, loglevel);
35 doublereal rtol,
int maxsteps,
int maxiter,
int loglevel)
38 "Use ThermoPhase::equilibrate instead. To be removed after Cantera 2.2.");
46 int printLvlSub = loglevel;
47 int estimateEquil = 0;
54 rtol, maxsteps, maxiter, loglevel-1);
65 }
else if (solver == 1) {
71 equilibrate(m, XY, rtol, maxsteps, maxiter, loglevel-1);
91 bool useThermoPhaseElementPotentials =
true;
92 retnSub = e.
equilibrate(s, XY, useThermoPhaseElementPotentials,
99 "Both equilibrium solvers failed");
Class ChemEquil implements a chemical equilibrium solver for single-phase solutions.
EquilOpt options
Options controlling how the calculation is carried out.
doublereal relTolerance
Relative tolerance.
void addPhase(ThermoPhase *p, doublereal moles)
Add a phase to the mixture.
int equilibrate(thermo_t &s, const char *XY, bool useThermoPhaseElementPotentials=false, int loglevel=0)
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
doublereal equilibrate(MultiPhase &s, const char *XY, doublereal tol, int maxsteps, int maxiter, int loglevel)
Equilibrate a MultiPhase object.
doublereal equilibrate(int XY, doublereal err=1.0e-9, int maxsteps=1000, int maxiter=200, int loglevel=-99)
Set the mixture to a state of chemical equilibrium.
Base class for a phase with thermodynamic properties.
A class for multiphase mixtures.
Base class for exceptions thrown by Cantera classes.
Interface class for the vcsnonlinear solver.
void init()
Process phases and build atomic composition array.
void setElementPotentials(const vector_fp &lambda)
Stores the element potentials in the ThermoPhase object.
int maxIterations
Maximum number of iterations.
int _equilflag(const char *xy)
map property strings to integers
int vcs_equilibrate(thermo_t &s, const char *XY, int estimateEquil, int printLvl, int solver, doublereal rtol, int maxsteps, int maxiter, int loglevel)
Set a single-phase chemical solution to chemical equilibrium.
void save()
Function to put this error onto Cantera's error stack.