Comment on" Computing the equilibrium composition of aqueous

Comment on "Computing the equilibrium composition of aqueous systems: an iterative solution at each step in Newton-Raphson". Thomas R. Holm. Environ...
0 downloads 0 Views 226KB Size
Environ. Sci. Technol. 1989,23, 1531-1532

(10) Burkhard, L. P.; Andren, A. W.; Armstrong, D. E. Environ. Sci. Technol. 1985, 19, 500-507. (11) Gossett, J. M. Environ. Sci. Technol. 1987,21, 202-208. (12) Mackay, D.; Shiu, W. Y.; Sutherland, R. P. Environ. Sci. Technol. 1979, 13, 333-337. (13) Hassett, J. P.; Milicic, E. Environ. Sci. Technol. 1985,19, 638-643.

(14) Yin, C.; Hassett, J. P. Environ. Sci. Technol. 1988, 22, 1289-1293. (15) Fendinger, N. J.; Glotfelty, D. E. Environ. Sci. Technol. 1988,22, 1289-1293.

Received for review February 22, 1989. Revised manuscript received July 3, 1989. Accepted August 23, 1989.

CORRESPONDENCE Comment on "Computing the Equilibrium Composition of Aqueous Systems: An Iterative Solution at Each Step in Newton-Raphson" SIR: Dudley and Coray ( I ) presented an interesting problem that is sometimes encountered in chemical equilibrium modeling. A well-known equilibrium program refused to converge given what seemed like reasonable initial guesses. The Jacobian matrix for the first iteration One of the was singular (condition number (2) 2 X reasons for the badly behaved matrix was an incorrect equilibrium constant. Table I1 of ref 1 lists the common logarithm of the stability constant for FeOHDTPA as 31.37. This is the equilibrium constant for the reaction in eq 1 (3). Fe3+ DTPA5- + OH- = FeOHDTPA3(1) Equation 2 shows the intended reaction. Fe3+ + DTPA5- H 2 0 = FeOHDTPA3- + H+ (2) The equilibrium constant for reaction 2 is calculated by subtracting the logarithm of the ion product of water from 31.37. The result is 17.42. With this constant, the Jacobian becomes

+

+

1.7E+01

O.OE+OO

O.OE+OO

1.5E+18

1.6E+01

1.5E+18

7.63+06 8.73+18 8.73+18

(3)

(condition number 7 X lo1'). This matrix is more reasonable than the one presented by Dudley and Coray ( I ) . However, it may still cause problems. Ill-conditioned matrices are a common hazard in chemical equilibrium computations, especially for problems involving strong complexation. For this reason, Dudley and Coray ( I ) suggest using a singular-value decomposition (SVD)rather than Gaussian elimination to solve the system of linear equations generated in each Newton-Raphson iteration. However, Press et al. (2) state that SVD is not infallible. It would be prudent to make the Jacobian as well behaved as possible regardless of the method for solving the set of linear equations. The Newton-Raphson method can be modified to make a singular Jacobian less likely. One modification is fairly easy to carry out and improves the condition of the Jacobian significantly. The other modification involves more work, but improves the condition of the Jacobian even more than the first method. The elements of the Jacobian are computed according to eq 4 (5, 6). In equation 4, z,k is an element of the

auj

aijaikci

z,,= = Eaxk i x, 0013-936X/89/0923-1531$01.50/0

(4)

Jacobian, aijand aik are the stoichiometric coefficients of components j and k in species i, Ci is the concentration of species i , and X. is the concentration of component j . Obviously, zjk can become large if X .becomes very small. To avoid a singular (or numericalfy singular) Jacobian, Taylor et al. (7) define its elements in eq 5. By use of eq (5)

5, the Jacobian of the problem presented by Dudley and Coray ( I ) becomes 5.33-03

O.OE+OO

O.OE+OO

5.83+09 5.83+09

5.OE-03

5.OE-03 5.83+09 5.83+09

(condition number 2 X 10l2,a significant improvement over 7 X lo"). By use of the method of Taylor et al. (6) and the initial guesses and data of Dudley and Coray ( I ) a solution resulted that satisfied their convergence criterion after 55 iterations. The only difference between eq 4 and 5 is that in eq 5 there is no division by the component concentration. Therefore, modification of an existing Newton-Raphson program to reduce the likelihood of problem matrices would only involve changing two lines of code. Another effective way to improve the condition of the Jacobian matrix is by transformation of the basis species as in MINEQL (6). The elements of the Jacobian are then calculated by dividing by the species a t the highest concentration rather than at the lowest concentration. For the FeDTPA problem, substituting CaDTPA3-, FeDTPA", and FeOHDTPA3- for Ca2+,Fe3+, and DTPA", respectively, gives the Jacobian 1.11 0.00 1.05

0.00 1.oo 1.00

4.17E-10 479.71 479.71

(condition number 2 X 10"). TITRATOR (8))a program based on MINEQL (6) converged to a solution in 11 iterations with the initial guesses and data of Dudley and Coray (I). There are some other minor errors in the Dudley and Coray note. In Table I, log M should be -log M. In Table 11, DTPA should be CaDTPA. The third complex listed in Table I1 apparently has the same stoichiometry as CaDTPA, but a different stability constant. Literature Cited (1) Dudley, L. M.; Coray, C. S. Environ. Sci. Technol. 1989, 23, 245. (2) Forsythe, G. E.; Malcom, M. A.; Moler, C. B. Computer Methods for Mathematical Computations;Prentice-Hall:

0 1989 American Chemical Society

Environ. Sci. Technol., Vol. 23, No. 12, 1989 1531

(7) Taylor, P. D.; Morrison, I. E. G.; Hider, R. C. Talanta 1988, 35, 507. (8) Cabaniss, S. E. Environ. Sci. Technol. 1987,21, 209.

Englewood Cliffs, NJ, 1977; pp 41-48. Martell, A. E.; Smith, R. M. Critical Stability Constants; Plenum: New York, 1974; Vol. 1, p 283. Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; Vetterling, W. T. Numerical Recipes, The Art of Scientific Computing; Cambridge University Press: New York, 1986; pp 56-57. Morel, F.; Morgan, J. Environ. Sci. Technol. 1972, 6 , 58. Westall, J. C.; Zachary, J. L.; Morel, F. M. M. Technical Note 18, Ralph M. Parsons Lab., MIT, Cambridge, MA, 1976, MA 02139.

Thomas R. Holm Aquatic Chemistry Section IllinoisSateWater Survey 2204 Griffith Drive Champaign, Illinois 61820-7495

1989 Volume 23, Numbers 1-12 Refer to the list below to determine in which issue an entry appears. May pp. 489-618 June pp. 619-748 July pp. 749-902 August pp. 903-1024

January pp. 1-128 February pp. 129-248 March pp. 249-368 April pp. 369-488

September pp. 1025-1 170 October pp. 1171-1308 November pp. 1309-1430 December pp. 1431-1544

Front Section Index Critical Reviews

Human reproductive hazards: Evaluation and chemical etiology, 1187 (Barbara S. Shane) Features

Acid aerosols: The next criteria pollutant?, 1316 (Fred W Lipfert, S. C. Morris, and R. E. Wyzga) Acidic deposition to streams, 379 (OwenI! Bricker and Karen C. Rice)

Analytical chemistry for environmental sciences, 768 (Christopher l? D%lia, James G. Sanders, and Douglas G. Capone)

Changes in the chemistry of surface waters, 137 (Charles ?: Driscoll, Gene E. Likens, Lars 0. Hedin, John S. Eaton, and l? Herbert Bormann) Chemistry of metal retention by soils, 1046 (L.J. Evans) Combustion of refuse-derived fuel and coal, 774 (GlennA. Norton and Audrey D. Leuine)

Creosote-contaminated sites: Their potential for bioremediation, 1197 (James G. Muelles Peter J. Chapman, and I! Hap Pritchard) Drinking water additives program, The, 14 (NinaI. McClelland, David A. Gregorka, and Betsy D. Carlton) Environmental pollution: A multimedia approach to modeling human exposure, 1180 (JeffreyB. Stevens and Deborah L. Swackhamer)

Estimating cancer mortality, 925 (Michael Gough) Health effects of tropospheric ozone, 257 (BeverlyE. Tilton)

Health research at the U S . EPA, 917 (Ken Sexton and Lawrence W Reiter)

Identifying toxicants: National Effluent Toxicity Assessment Center, 1438 (Lawrence I! Burkhard and Gerald T Ankley)

Regulating at the edge [use of science in regulations], 1041 (Paul Tomboulian) 1532

Environ. Sci. Technol., Vol. 23, No. 12, 1989

Regulating toxic substances, At Risk The framework for, 386 (LesterB. Lave and Eric H. Mal&) Renewable energy development, 10 (ViePhillips and Patrick Takahashi)

Subsurface transport of contaminants, 496 (John I? McCurthy and John M. Zachara) Series

Remedial action technologies Field screening of hazardous waste sites, 504 (Wayne Chudyk),first part Groundwater contamination: Limitations of pump-andtreat remediation, 630 (Douglas M. Mackay and John A. Cherry),second part In situ biorestoration of organic contaminants in the subsurface, 760 (J. M. Thomas and C. H. Ward),third Part Cleaning up sites with on-site processing plants, 912 (Peter S. Daley),fourth part Industrial wastes reduction, 1032 (James VI? Patterson), final part Community right-to-know, 1178 (MichaelA. Kamrin), introduction Multimedia approach to modeling human exposure, 1180, (Jeffrey B. Stevens and Deborah L. Swackhamer),first Part State air toxics programs, The perils of, 1323 (Edward J. Calubrese and Elaina M. Kenyon), second part Communicating right-to-know information on chemical risks, 1444 (Vincent T Covello),third part Views

Acid deposition: A paper tiger, 25 (StanMiller) Assessing potential health risks of dioxin in paper products, 643 (Russell E. Keenan and Michael J. Sullivan)