PHREEQE A COMPUTER PROGRAM FOR GEOCHEMICAL CALCULATIONS U.S. GEOLOGICAL SURVEY Water-Resources Investigations Report 80-96 PHREEQE - A COMPUTER PROGRAM FOR GEOCHEMICAL CALCULATIONS By David L. Parkhurst, Donald C. Thorstenson, and L. Niel Plummer U.S. GEOLOGICAL SURVEY. Water-Resources Investigations 80-96 November 1980 Revised and reprinted - May 1982 Revised and reprinted - January 1985 Reprinted - February 1987 Revised and reprinted - August 1990 U.S. DEPARTMENT OF THE INTERIOR MANUEL LUJAN, JR., Secretary U.S. GEOLOGICAL SURVEY Dallas L. Peck, Director For additional information Copies of this report write to: can be purchased from: U.S. Geological Survey U.S. Geological Survey National Center Books and Open-File Reports Section Office of Regional Research Hydrologist, Box 25425 Mail Stop 432 Federal Center Reston, Virginia 22092 Denver, Colorado 80225-0425 CONTENTS Page Introduction 1 Equilibrium equations 3 Total masses of each element in the system 3 Mass action equations for ion pairs 4 Electrical neutrality 5 Phase equilibria 5 Conservation of electrons 6 Comment 8 liquations " ' ' ' >' " " « Q Numerical method 12 Description of input 19 Title and option cards 22 IxGjTwO IT CIS « » « « « « « « «».»«_»»»«» MM.M,^ »»»_»».___*MH_M*W ________MM_ ^ ^ ELEMENTS 25 otri-j v>J_ Ju o *~ " « « « « «- »»« _,«« «» * »»* « « M»_«»»»« « «.«.« « MM..* ^ ^ DULiU 1 J_UiN .1 M.i»i»i»»i»»M.»»M.»»M.M.»«M.«M« »M.»«M«M,iM,MM.,iM»»M»»»»»»»M.M.«. J U MINERALS 33 LOOK MIN 36 JL i-iMJr " i « «- « -« «« «» ««a«^«^«,.«« « * « « - . ...... ... ..^..^ ^ ^ ^IM««. « j ^ QTO 1. WHi PJT QO _ _ «W _«W _ « n.M««M>M>«MM>M_ __ _B «««»«««« _ __M»«««»«««a««««M>««««««««M ____-.,-,_B ll.M««rt ,-,_BM*«««»««M ,_ B_«W J*17 ^ REACTION 38 NEUTRAL 40 O (JiMO " ""^ * " « ««««««.«»« MB..M « ««««»««.« «~M>M»««M>«W «« «« « « <» « « »« « « ««««« ««««««««« .. « ^ ^J KNOBS 41 IL JNU *"* " « « « « « « « « « « « « « ^^».«« « ««« ««««rtB««««««««^»««^« *4 X Thermo dynamic data base 42 Organization rules 42 Changing the data base 43 Program limitations 47 Water (masses of H and 0) 47 Convergence problems 49 Ion exchange 49 Water stability limits 51 Titration and mixing 51 Activity of water 52 Uniqueness of solutions 52 .LG s t pro ox6ms « " * " ^ ^-«» ««« « « « »««..M«aiM««.M-H*«««a«» ^ ^ Test problem 1 54 Test problem 2 72 Tecf-LcoU pLtJUJ-Cillr»T*r»Kl am j^ _ _ ^ ._«._____.____ _ ____ _..__,1^,1^, _.___ _. _____. _ _~.___.___ ____ 7Q^ Q Test problem 4 83 Test problem 5 108 How to run PHREEQE on the USGS Amdahl computer 125 -iii- Continued Page Adaptation of Fortran code for computers other than the Amdahl computer 129 Description of subroutines 130 Re f e ce nee s 144 Attachment A - Preliminary thermodynamic data base for PHREEQE 147 Attachment B - Program listing of PHREEQE 160 ILLUSTRATIONS Page Figure 1. Selected results from test problem 4 (parts B-E) as a function of CaSO^ dissolution 88 2. Equilibrium diagram for gibbsite, kaolinite, muscovite, and microcline at 25°C. Constructed from the thermo­ dynamic data of Robie and others (1978). Stable phase boundary intersections (test problem 5, part A) and reaction paths across stability fields (test problem 5, part B) are shown 118 TABLES Page Table 1. Elements data 44 2. Seawater composition 55 3. Existing nitrogen data base 56 4. Reconstructed nitrogen data base 57 5. Preliminary aqueous data for uranium 58 6. Card images of input data set for test problem 1 61 7. Printout from test problem 1 65 8. Card images of input data set for test problem 2 73 9. Selected results from test problem 2 77 10. Card images of input data set for test problem 3 79 -iv- Continued Page 11. Selected results from test problem 3 82 12. Reactions included in test problem 4 84 13. Card images of input data set for test problem 4 85 14. Card images of input data set for test problem 4 (parts A and E) 92 15. Printout from test problem 4 (parts A and E) 94 16. Selected thermodynamic data in the system K20-Al 20 3-Si02-H 20 109 17. Card images of input data set for test problem 5, part A 111 18. Location of phase boundary and reaction path intersections in test problem 5, part A 116 19. Card images of input data set for test problem 5, part B 122 20. Job statistics for test problems 126 21. List of major variables 137 -v- PREFACE This revision marks several changes to the PHREEQE Source Code and Data Base. The current version is written in Fortran 77 and runs on a Prime, Inc. Model 850 minicomputer. Attachment B lists the current Fortran 77 Source Code. The convergence criteria used in the Newton-Raphson iteration scheme have been improved. Convergence is still not assured, but fewer problems have been encountered in testing. A new keyword, KNOBS, has been added which gives the user capability to adjust the convergence criteria. KNOBS input is described under "Description of Input". A new unit of input concentration, mmol/kg of solution, is now accepted (IUNITS=4). The form of the analytical expression for Log K under MINERALS and LOOK MIN input has been changed to log K = A + BT + C/T + D log T -I- E/T2 and corresponding changes to the data base have been made. Attachment A lists the current PHREEQE data base. Changes have been made to the equilibrium constant expressions for calcite, aragonite, strontianite, celestite, gypsum, anhydrite, siderite, and barite. Aqueous species affected include CaHCOj, CaCOs , C02 (aq), HCO"i , C0$~, SrHCOj. SrCO§ , and SrSol . Most of these revisions reflect two recent publications (Plummer and Busenberg, 1982; and Busenberg, Plummer, and Parker, 1984). But, in general, the data base remains little changed, undocumented and should not be used without careful checking. A companion program to PHREEQE (PHRQINPT) is now available for interactive construction of PHREEQE input data sets (Fleming and Plummer, 1983). With this revision, only Test Problem 1 has been updated to the current version and data base. The test results of Test Problems 2-5 given in the section "Test Problems" have not been updated. Because of the changes mentioned above, similar, but not identical, results can be expected for Test Problems 2-5. Plummer, L.N., and Busenberg, E., 1982, The solubilities of calcite aragonite and vaterite in C02-H20 solutions between 0 and 90 C, and an evaluation of the aqueous model for the system CaC03-C02-H20: Geochimica et Cosmochimica Acta, v. 46, p. 1011-1040. Fleming, G.W., and Plummer, L.N., 1983, PHRQINPT - An interactive computer program for constructing input data sets to the geochemical simulation program PHREEQE: U.S. Geological Survey Water-Resources Investigations Report 83-4236, 108 p. -VI- Busenberg, E., Plummer, L.N., and Parker, V.B., 1984, The solubility of strontianite (SrC03 ) in C02-H20 solutions between 2 and 91°C, the association constants of SrHCO^(aq) and SrCOa (aq) between 5 and 80°C, and an evaluation of the thermodynamic properties of Sr2+ (aq) and SrC03 (cr) at 25°C and 1 atm total pressure: Geochimica et Cosmochimica Acta, v. 48, p. 2021-2035. DLP, DCT, LNP January 14, 1985 PREFACE FOR AUGUST 1990 REVISION A new data base is included with this revision of PHREEQE. The data listed in Attachment A are consistent with the data published by Nordstrom and others, 1990. The new listing of source code is found in Attachment B. Only minor revisions have been made to the numerical method of the program. However, changes have been made (1) to streamline the linear equation solver, (2) to enable the aqueous model to be enlarged, and (3) to simplify the definition of file unit numbers. The linear equation solver, subroutine SLNQ, has been streamlined to perform only Gaussian elimination (eliminating the determinant option that was not used) and to increase execution speed. Changes have been made in the source code to facilitate the use of PHREEQE for problems that require larger numbers of elements and (or) species than were previously allowed. The sizes of the data arrays for ELEMENTS, SPECIES, LOOK MIN, MINERALS, and SUMS are now set at compile time by one Fortran PARAMETER statement located in the COMMON.BLOCKS file. The following parameters define the sizes of arrays: MAXT - the maximum number of ELEMENTS and master species. Default is 30. MAXS - the maximum number of aqueous SPECIES. Default is 250. MAXM - the maximum number of MINERALS. Default is 20. MAXLK - the maximum number of LOOK MIN minerals. Default is 200. MAXSUM - the maximum number of SUMS. Default is 10. MXINSM - the maximum number of species that can be included in any one of the SUMS. Default is 50. -vii- The default sizes are the same as previous versions of PHREEQE except that the number of LOOK MIN minerals has been increased from 40 to 200. Enlarging the array sizes should cause no problems with the execution of the program, except for the case of MAXT. Enlarging MAXT has important consequences to the rest of the data base. The current data base begins numbering complexes (non-master species) at 31 (that is, greater than the default MAXT of 30). If MAXT is made, larger, then the numbering of complexes must be changed so that all numbers of complexes are greater than the new MAXT. A further consequence is that some MINERAL and LOOK MIN minerals can contain complexes in their dissociation reactions. Care must be taken to ensure that any changes to the numbering of complexes are also applied to mineral formulas. Another change to the source code was made to facilitate the handling of file unit numbers by PC's and other computers.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages213 Page
-
File Size-