R. G. AA-TIIONYAND D. M. HIMMELBLAU
1080
Vol. 67
CALCULATIOK OF COMPLEX CHENICAL EQUILIBRIA BY SEARCH TECHNIQUES BY R. G. AKTHONY AND D. M. HIMMELBLAU Department of Chemical Engineering, The University of Texas, Austin i2, Tezas Received November 12, 1962 A new technique for solving problems involving complex equilibria is proposed, one which is substantially different from the iterative techniques of Brinkley, Huff, and White. The new procedure employs the method of “direct search” and must be carried out on a large size computer. The search procedure has the potential to handle more difficult classes of problems than the classical techniques. Application of the procedure t o a simple problem gave the same results as the classical methods; application to a more complex problem previously reported by Brinkley brings out some of the paradoxes involved in solving sets of non-linear equations.
Introduction The application of thermodynamics to complex equilibria calculations has been the subject of a number of arti~1esl-l~in the last twenty years. Excluding graphical methods, the basic three approaches to the calculation of complex compositions at equilibrium are those of Brinkley, Huff, and White. These are all iterative methods and of about the same degree of effectiveness from the viewpoint of convergence and time required. I n order to compare the methods, they should all start with the same initial guesses for parameters. However, the technique used by Brinkley requires the guesses t o satisfy the equilibrium coiiditions while White’s technique requires them to satisfy the mass balances. Zeleznik and Gordon16 have modified the two methods to avoid these restrictions, and shown that all three in essence are equivalent computationally. We propose another iterative method of solution of the problem, but one which is quite different in procedure from those mentioned above, namely the use of the search technique. Search Technique Hooke and JeeveP have proposed a procedure called “Direct Search” for use in optimization which seems to be well suited for use in equilibrium computations. Consider the following completely determined set of non-linear equations fV(x1, xz, , . ., x m ) = O
(1) These can be solved for xl,ZZ,. . . , xm by solving the following problem: Determine the values of x i which minimize a, where (1) (2) (3) (4)
H. Kiihl, Forsehungsheft, 6,373 (1935).
G. Damkbhler, and R. Edse, Z. Elektrochem., 49, 178 (1943). S. Traustel, 2. Ber. deut. Ing., 88, 688 (1944). S. R. Brinkley, Jr., J . Chcm. Phys., 14, 563 (1946). ( 5 ) S. R. Brinkley, Jr., abid., 16, 107 (1947). (6) F. J. Krieger and W. B. White, ibid., 16,358 (1948). (7)H. J. Kandiner and S. R. Brinkley. Jr., I d . Eng. Chem., 42, 850 (1950). (8) V. N. Huff, S. Gordon, and V. E. Morrell, NACA Report 1037, 1951. (9) W. B. White, S. M. Johnson, and G. B. Dantzig, J . Chem. Phys., 28, 751 (1958). (10) S. Gordon, F. J. Zeleanik, and V. S. Huff, NASA T N D-132, 1959. (11) D. S. Villars, J . Phus. Chem., 63, 521 (1959). (12) 9. R. Goldwasser, Ind. Eng. Chem., 51, 595 (1959). (13) R. L. Potter and W. Vanderkulk, J . Chem. Phys., 32, 1304 (1960). (14) B. R. Kubert and S . E. Stephanou in “Kinetics, Equilibria and Performance of High Temperature Systems,” ed. by G. 8. Bahn and E. E. Zukoski, Butterworths, London, 1960. (15) F. P. Boynton, J . Chem. Phys., 32, 1880 (1960). (16) F. J. Zeleznik and S.Gordon, NASA TK D-473, 1960. (17) R. H. Boll, J . Chsm. Phllr., 34, 1108 (1961). (18) R. C. Oliver, S. E. Stephanou, and R. W . Baier, Chem. Eng., 121 (February 19, 1962). (19) R. Hooke and T. A. Jeeves, J . Assn. Comp. iMQch., 8, 212 (1961).
c P
4, =
f”(ZI, x2,
v=1
. . ., x m ) 2
(2)
Direct search calls for assuming some initial values of the parameters x,, finding the value of CP, changing each of the values of x, in rotation by a small amount Ax, in a so-called “exploratory movelJ’ and checking the value of 4, each time to ascertain whether the change Ax, has improved CP (made it lower). On each trial, if 4, is lower, then a new value of x, is adopted; if not, the sign of Ax, is changed and the trial repeated. After one or more exploratory moves, a “pattern move’’ is made in which the distance moved in each coordiiiate x, is proportional t o the total number of successful exploratory moves previously made. In this way large steps in one or more coordinate directions can be taken to reduce the time of computation. After taking repeated pattern moves, one finds a value of 4, which is a minimum. One can then (or earlier) cut down the step size of Ax, so as to further refine the values of x,,and repeat the whole procedure. The step sizes can be reduced until finally the change in 4, or x1is small enough to warrant stopping. In essence, the search technique proposed by Hooke and Jeeves is a clever logical scheme of search which can be modified in the details to suit one’s personal fancies as to the best way to proceed. Requirements for Complex Equilibria Calculations To avoid confusion, let us define the following notation (all terms are presumed to be on the same basis, ie., per unit mass or mole of initial mixture) a,, = Stoichiometric coefficient giving the gram atoms of the ith element in the jth compound or species b,O = Initial gram atoms of the ith element of the mixture b, = Gram atoms of the ith element of the mixture a t any n
a,,n,, i
intermediate composition; b, =
5
1
5
1
3-1
G
Gibbs free energy for the jth compound or species, or for the ith element as indicated by the appropriate subscript. The superscript zero means standard state. n, = Moles of the jth species in the mixture, 1 5 j 5 n =
Four essential physical statements are needed to completely define the calculation of the composition a t equilibrium. These are : (a) First, the mass balances for the individual elements b, - 6,” = 0
l