Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
equil.h
Go to the documentation of this file.
1 /**
2  * @file equil.h
3  * This file contains the definition of some high level general equilibration
4  * routines.
5  * @deprecated All functions defined in this file are deprecated. To be removed
6  * after Cantera 2.2.
7  */
8 
9 // Copyright 2001 California Institute of Technology
10 
11 #ifndef CT_KERNEL_EQUIL_H
12 #define CT_KERNEL_EQUIL_H
13 
14 
15 #pragma message("cantera/equil/equil.h is deprecated")
16 #include "MultiPhase.h"
17 #include "vcs_defs.h"
18 
19 namespace Cantera
20 {
21 /*!
22  * @defgroup equilfunctions Equilibrium Solver Capability
23  *
24  * Cantera has several different equilibrium routines.
25  */
26 
27 //! Equilibrate a ThermoPhase object
28 /*!
29  * Set a single-phase chemical solution to chemical equilibrium. This is a
30  * convenience function that uses one or the other of the two chemical
31  * equilibrium solvers. The XY parameter indicates what two thermodynamic
32  * quantities, other than element composition, are to be held constant during
33  * the equilibration process.
34  *
35  * @param s ThermoPhase object that will be equilibrated.
36  * @param XY String representation of what two properties
37  * are being held constant
38  * @param solver ID of the solver to be used to equilibrate the phase.
39  * If solver = 0, the ChemEquil solver will be used,
40  * and if solver = 1, the
41  * MultiPhaseEquil solver will be used (slower than ChemEquil,
42  * but more stable). If solver < 0 (default, then ChemEquil will
43  * be tried first, and if it fails MultiPhaseEquil will be tried.
44  * @param rtol Relative tolerance
45  * @param maxsteps Maximum number of steps to take to find the solution
46  * @param maxiter For the MultiPhaseEquil solver only, this is
47  * the maximum number of outer temperature or pressure iterations
48  * to take when T and/or P is not held fixed.
49  * @param loglevel loglevel Controls amount of diagnostic output. loglevel
50  * = 0 suppresses diagnostics, and increasingly-verbose messages
51  * are written as loglevel increases.
52  *
53  * @return The number of iterations it took to equilibrate the system.
54  * @deprecated Use ThermoPhase::equilibrate instead. To be removed after Cantera 2.2.
55  * @ingroup equilfunctions
56  */
57 int equilibrate(thermo_t& s, const char* XY,
58  int solver = -1, doublereal rtol = 1.0e-9, int maxsteps = VCS_MAXSTEPS,
59  int maxiter = 100, int loglevel = -99);
60 
61 //! Equilibrate a MultiPhase object
62 /*!
63  * Equilibrate a MultiPhase object. The XY parameter indicates what two
64  * thermodynamic quantities, other than element composition, are to be held
65  * constant during the equilibration process.
66  *
67  * This is the top-level driver for multiphase equilibrium. It doesn't do
68  * much more than call the equilibrate method of class MultiPhase, except
69  * that it adds some messages to the logfile, if loglevel is set > 0.
70  *
71  * @param s MultiPhase object that will be equilibrated.
72  * @param XY String representation of what is being held constant
73  * @param rtol Relative tolerance
74  * @param maxsteps Maximum number of steps
75  * @param maxiter Maximum iterations
76  * @param loglevel loglevel
77  *
78  * @return The number of iterations it took to equilibrate the system.
79  * @deprecated Use MultiPhase::equilibrate instead. To be removed after Cantera 2.2.
80  * @ingroup equilfunctions
81  */
82 doublereal equilibrate(MultiPhase& s, const char* XY,
83  doublereal rtol = 1.0e-9, int maxsteps = 5000, int maxiter = 100,
84  int loglevel = -99);
85 
86 }
87 
88 #endif
#define VCS_MAXSTEPS
Maximum steps in the inner loop.
Definition: vcs_defs.h:89
doublereal equilibrate(MultiPhase &s, const char *XY, doublereal tol, int maxsteps, int maxiter, int loglevel)
Equilibrate a MultiPhase object.
Definition: equilibrate.cpp:11
Headers for the MultiPhase object that is used to set up multiphase equilibrium problems (see Equilib...
ThermoPhase thermo_t
typedef for the ThermoPhase class
Definition: ThermoPhase.h:1660
Defines and definitions within the vcs package.