last modified: 13-JUN-1990 | catalog | categories | new | search |

NESC9674 PHREEQE.

PHREEQE, Modelling of Geochemical Reaction, Calculation of P-H, Redox Potential

top ]
1. NAME OR DESIGNATION OF PROGRAM:  PHREEQE.
top ]
2. COMPUTERS
To submit a request, click below on the link of the version you wish to order. Only liaison officers are authorised to submit online requests. Rules for requesters are available here.
Program name Package id Status Status date
PHREEQE NESC9674/02 Tested 24-MAY-1985
PHREEQE NESC9674/06 Tested 13-JUN-1990

Machines used:

Package ID Orig. computer Test computer
NESC9674/02 CDC 7600 DEC VAX 11/780
NESC9674/06 IBM PC IBM PC
top ]
3. DESCRIPTION OF PROBLEM OR FUNCTION

PHREEQE is a program designed to model geochemical reactions. Based on an ion pairing aqueous model, PHREEQE can calculate pH, redox potential, and mass transfer  as a function of reaction progress. It can be used to describe geochemical processes for both far-field and near-field performance  assessment and to evaluate data acquisition needs and test data. The composition of solutions in equilibrium with multiple phases can be  calculated. The aqueous model, including elements, aqueous species,  and mineral phases, is exterior to the computer code and is completely user definable.
top ]
4. METHOD OF SOLUTION

The code solves a reduced set of simultaneous non-linear equations.The conceptual model embodied in PHREEQE is the ion-association model of Pearson and Noronha to obtain values for a  set of key independent variables. These results are then used to solve for all other unknowns sought. The key independent variables are:
1) aH+, the activity of hydrogen ion in solution
2) ae-, the activity of electrons in solution
3) the activity of a single aqueous species (called the master    species) for each element
4) the amount of mass transferred between each mineral phase and    solution to achieve equilibrium.
From these data, the code calculates the dependent variables, including activities of all other aqueous species specified, activity coefficients of these species, molal concentrations of these species at equilibrium, and the activity of water. The equations used to solve for the key independent variables are:
1) Electrical neutrality
2) Electron balance (one equation)
3) Mass balance
4) Mineral equilibrium
PHREEQE solves the equations for the set of key independent variables using two iterative methods to approximate the solutions:
1) a continued fraction approach for the mass balance equations and  2) a modified Newton-Raphson approach for the remaining equations.
The activity coefficient expressions in PHREEQE include the extended Debye-Huckel, WATEQ Debye-Huckel, and Davies equations from the original United State Geological Survey version of the program.   The molal concentrations of all secondary species can be calculated from the equilibrium concentration of the master species  thus obtained. This is done by evaluating the reactions in the data  base of the code.
top ]
5. RESTRICTIONS ON THE COMPLEXITY OF THE PROBLEM

PHREEQE is an extremely general geochemical model and is applicable to most hydro- chemical environments. There are, however, several conceptual and numerical limitations which must be considered.


A. Water (Masses of H and O)

The single most important set of limitations results from the fact that PHREEQE deals with masses of elements in terms of their concentrations in the aqueous phase and uses electrical neutrality and electron balance relations to complete the set of equations needed to solve a given problem. A consequence of this is that the masses of H and O are not considered in the numerical solution to the set of simultaneous equations. Although this does not pose a significant problem in the vast majority of systems to which PHREEQE will be applied, there are certain artifacts of the computations that can, under certain circumstances, be misleading. These are discussed below.


(1) Formation of O2 and/or H2

A potential problem stemming from the lack of mass balance on O and H lies in working with redox systems involving chemical reac- tions that produce or consume H2 or O2. Because the only constraints on H2 and O2 in the calculations are equilibrium and electron balance constraints, there are no numerical limits on the amounts of H2 or O2 that can be made or destroyed (mathematically) to satisfy the constraint in a given simulation. If the masses of H2 and O2 in- volved in chemical reactions become significant relative to 1 kg of  water, then the simulations may begin to deviate significantly from  reality.


(2) Hydrated minerals

A generally more significant problem occurs if PHREEQE is used to model systems in which large amounts of water are involved in mineral precipitation or dissolution. The most obvious examples are  reactions occurring in brines; for example, equilibrium phase- boundary precipitation of 1 mole of natron (Na2CO3 . 10H2O) from 1 liter of solution would remove 1 0 moles of H2O from aqueous phase with a resulting increase in concentration of constituents other than Na and C of about 20 per cent (independent of other reactions). This increase in concentration would not be taken into account in PHREEQE's present computation system.


B. Convergence Problems

Due to the non-linear nature of the equations involved, on some problems the program may not converge. This is much more likely to occur in problems involving redox because of the fact that equili- brium concentrations of some species can vary by more than 100 orders of magnitude from a fully oxidizing to a fully reducing en- vironment. In general the less the redox potential of the solution has to change during a simulation the better the convergence possi-  bilities. If problems arise, alternative paths to the same final solution should be tried if possible. If some idea of the final solution characteristics is available, simply start the calculations with the same concentrations but at a pH and pe close to the final anticipated composition. Also make sure that the problem is truly a  redox problem. If one is modelling an (NH4)+ solution and there is no need to consider (NO3)- or other valences of nitrogen, then the data base can be rewritten with (NH4)+ as the master species, eliminating all other valences of N, and the problem is considerably simpler for the program to solve.


C. Ion Exchange

There are limitations in the way PHREEQE deals with ion exchange. The user should explore these limitations in detail before actually  trying to run such calculation.



D. Water Stability Limits

Although in principle PHREEQE's calculations are not limited to the water stability field, it should be pointed out that because O2, H2, and H2O are coupled via mass-action equations, the only way the  program can deal with solutions outside of the normal thermodynamic  stability limits of water (1 atmosphere total pressure) is to invoke partial pressures of O2 and H2 greater than 1 atm. As these partial  pressures vary exponentially with the departure of pe from the water stability boundary, calculated solution properties rapidly become physically meaningless for comparison with natural environments.


E. Titration and Mixing

The problem lies in the fact that the titration equations are valid for volume and molarity or normality, but not for volume and molality. The errors introduced in these calculations will be pro- portional to one minus the density of the solutions involved in the  titration.


F. Activity of Water

The activity of water function used by PHREEQE is the same as that used in WATEQ (Truesdell and Jones, 1974), taken originally from Garrels and Christ (1965).


G. Uniqueness of Solutions

A final precaution should be discussed at this point. This is really a general commentary on chemical modelling, and not unique to the program PHREEQE.


Experience acquired to date in using PHREEQE to simulate natural water systems has shown that in many cases a reaction, or reaction path, that models a given set of observed chemical changes is not mathematically unique. That is, the observed changes in water chemistry can often be modelled exactly by two or (in most cases) more distinct reactions or reaction paths. Thus, the PHREEQE user really faces two distinct questions: (1) can a model be found that simulates the desired chemical system (natural or laboratory), and (2) if a satisfactory model is found, is it the only model that simulates the system in question. The second question is often as difficult to answer, and as important, as the first.
top ]
6. TYPICAL RUNNING TIME

Although the length of this for each run depends on the number of elements, the number of phases, and largely on the size of the change of redox potential, times for routine runs average of the order of 1 second execution time.
NEA-DB executed the test cases included in the package on a VAX-11/780. The following CPU times were found:
                    PHREEQE  PHRQINPT
                    -------  --------
test case 1          16.4     1.8     seconds
test case 2          19.4     2.2     seconds
(original test case  72.1             seconds)
top ]
7. UNUSUAL FEATURES OF THE PROGRAM

It is important to note that PHREEQE is not simply a speciation code, but is a true reaction path tracking model which can also model kinetic effects and adsorption phenomena.
top ]
8. RELATED AND AUXILIARY PROGRAMS

The auxiliary preprocessor program  PHTL, which is derived from EQTL, converts EQ3/6 (NESC 886) thermodynamic data to PHREEQE format so that the two programs can be compared. PHREEQE can be used to determine solubility limits on the  radionuclides present in the waste form. These solubility constraints may be input to the WAPPA (NESC 9673) leach model.
top ]
9. STATUS
Package ID Status date Status
NESC9674/02 24-MAY-1985 Tested at NEADB
NESC9674/06 13-JUN-1990 Tested at NEADB
top ]
10. REFERENCES

- Parkhurst, D.L., D.C., Thorstenson and L.N. Plummer,
  PHREEQE: A Computer Program for Geochemical Calculations,
  Water-Resources Investigation 80-96,
  US Geological Survey, 1980, 210p.
- INTERA Environmental Consultants, Inc.,
  PHREEQE: A Geochemical Speciation and Mass Transfer Code Suitable
  for Nuclear Wastw Performance Assessment,
  ONWI-435, April 1983.
NESC9674/02, included references:
- D.L.Parkhurst, D.C. Thorstenson and L.N. Plummer:
  PHREEQE - A Computer Program for Geochemical Calculations.
  USGS/WRI-80-96  (Rev. January 1985)
- G.W. Fleming and L.N. Plummer:
  PHRQINPT - An Interactive Computer Program for Constructing Input
  Data Sets to the Geochemical Simulation Program PHREEQE
  USGS/WRI-83-4236  (1983)
- K. Ollila:
  Dissolution of UO2 at various parametric conditions: a comparison
  between calculated and   experimental results
  Reprint from Materials Research Society Symp. Proc. Vol. 127,
  pp. 337-342 (1989)
NESC9674/06, included references:
- J.W. Ball and D.K. Nordstrom :
  WATEQ4F--: A Personal Computer Fortran Translation of the
  Geochemical Model WATEQ2 with Revised Data Base
  US Geological Survey Open-File Report 87-50 (1987)
- J.W. Ball :
  Erata and Revision Sheet for Open-File 87-50 WATEQ4F
  (March 7, 1988)
- D.L. Parkhurst, L.N. Plummer and D.C. Thorstenson:
  BALANCE - A Computer Program for Calculating Mass Transfer for
  Geochemical Reactions in Ground Water
  US Geological Survey Report 82-14 (1982)
- D.L. Parkhurst, D.C. Thorstenson and L.N. Plummer:
  PHREEQE - A Computer Program for Geochemical Calculations.
  USGS/WRI-80-96  (Rev. January 1985)
- G.W. Fleming and L.N. Plummer:
  PHRQINPT - An Interactive Computer Program for Constructing Input
  Data Sets to the Geochemical Simulation Program PHREEQE
  USGS/WRI-83-4236  (1983)
- K. Ollila:
  Dissolution of UO2 at various parametric conditions: a comparison
  between calculated and experimental results
  Reprint from Materials Research Society Symp. Proc. Vol. 127,
  pp. 337-342 (1989)
top ]
11. MACHINE REQUIREMENTS

143,300 octal words of main storage on CDC CYBER 170/740.
VAX-11/780 version: 510K bytes (PHREEQE) and 430K bytes (PHRQINPT) of main storage.
top ]
12. PROGRAMMING LANGUAGE(S) USED
Package ID Computer language
NESC9674/02 FORTRAN-IV
NESC9674/06 FORTRAN-77
top ]
13. OPERATING SYSTEM UNDER WHICH PROGRAM IS EXECUTED:
NOS 1.4-531 (CDC CYBER 170/740).
VMS (DEC VAX-11/780).
NESC9674/06
All five test cases included in this package have been  compiled and executed on an IBM PC/AT microcomputer running under MSDOS 3.2 using the following compilers:
- Profession FORTRAN
- Microsoft Optimizing Compiler version 4.01
- Ryan-McFarland RM/FORTRAN version 2.4.2
top ]
14. OTHER PROGRAMMING OR OPERATING INFORMATION OR RESTRICTIONS

PHREEQE uses several non-standard IBM FORTRAN H extended enhancements to FORTRAN IV in an effort to conserve memory and shorten the card deck. If the source code is to be used on another computer, the non- standard features may have to be modified. This section only points  out known problem areas and so is not necessarily complete. No attempt is made to give complete statement by statement modifica- tions which might be necessary if problems occur.

FORTRAN H allows various word lengths for variables and PHREEQE uses the shortest word lengths which give the necessary precision for the numerical method. All integers are implicitly declared as 2  byte words, all variables beginning with the letter "D" are declared as double precision, "REAL*8" (17-18 decimal digits), and all other  real numbers are implicitly single precision, "REAL*4" (7 decimal digits). Other "REAL*8" variables are declared explicitly at the beginning of each subroutine. Some computers may not allow the INTEGER*2 or the REAL*8 statements. Care should be taken to ensure there is no loss of precision when redefining the word length for REAL*8 variables. Function names for REAL*8 variables, absolute value (DABS) and minimum of two numbers (DMIN1) are not standard.

Another possible problem in compiling the code on another machine is the ENTRY statement. Two of PHREEQE's subroutines, PTOT and THORIT, are really collections of subroutines which use ENTRY in- common blocks and declaration statements do not have to be repeated  for each subroutine. Each computer handles entry points differently  and some do not allow argument lists in the ENTRY statement. Im most cases, making each entry point a separate subroutine with all the common blocks and declarations will eliminate any problems. In making each entry point into a subroutine, a call to SPUM must be inserted at the end of PSPEC. ENTRY RDATA, however, cannot beeasily separated from subroutine READ. The logic of the entry point must be maintained in re-writing this entry point (perhaps with a call to READ instead of RDATA and a jump to the point where the ENTRY state- ment is in the code).

Subroutine CHECK returns to three different points in subroutine MODEL by using a RETURN n statement. This statement may have a different form or may be illegal on another computer.

The program assumes there is a file, labeled in the Fortran Code as 10, from which it will read the basic thermodynamic data. If no file exists then the call to entry RDATA must be removed from the main program and all data must be read with the rest of the input data stream (file 5, or the card reader).
top ]
15. NAME AND ESTABLISHMENT OF AUTHOR

D.L. Parkhurst, D.C. Thorstenson, L.N. Plummer, G.W. Fleming:
US Geological Survey
Water Resources Division
12201 Sunrise Valley Dr.
Reston, VA 22092, U.S.A.
top ]
16. MATERIAL AVAILABLE
NESC9674/02
File name File description Records
NESC9674_02.003 INFORMATION FILE 166
NESC9674_02.004 PHREEQE SOURCE PROGRAM 2684
NESC9674_02.005 COMMAND PROCEDURE 121
NESC9674_02.006 PHREEQE TEST CASE 1 INPUT DATA 20
NESC9674_02.007 PHREEQE TEST CASE 2 INPUT DATA 20
NESC9674_02.008 PHREEQE ORIGINAL TEST CASE INPUT DATA 504
NESC9674_02.009 PHREEQE TEST CASE 1 PRINTED OUTPUT 586
NESC9674_02.010 PHREEQE TEST CASE 2 PRINTED OUTPUT 790
NESC9674_02.011 PHREEQE ORIGINAL TEST CASE PRINTED OUTPUT 6912
NESC9674_02.012 PHRQINPT SOURCE PROGRAM 2621
NESC9674_02.013 DATA LIBRARY 1 (PHREEQE DATA BASE) 579
NESC9674_02.014 DATA LIBRARY 2 (USED FOR PHRQINPT) 81
NESC9674/06
File name File description Records
NESC9674_06.001 Information file. 238
NESC9674_06.002 Batch file, compile and link Microsoft vers. 3
NESC9674_06.003 Batch file, compile Ryan-McFarland version. 21
NESC9674_06.004 Batch file, link Ryan-McFarland version. 4
NESC9674_06.005 PLINK86 input file, used by LINKRM.BAT. 3
NESC9674_06.006 Batch file to execute test cases,Prof. FORT. 6
NESC9674_06.007 Batch file to execute test cases,Microsoft. 6
NESC9674_06.008 Batch file to execute test cases,Ryan-McFarl 6
NESC9674_06.009 FORTRAN source file. 102
NESC9674_06.010 FORTRAN source file. 119
NESC9674_06.011 FORTRAN source file. 107
NESC9674_06.012 FORTRAN source file. 110
NESC9674_06.013 FORTRAN source file. 94
NESC9674_06.014 FORTRAN source file. 95
NESC9674_06.015 FORTRAN source file. 59
NESC9674_06.016 FORTRAN source file. 128
NESC9674_06.017 FORTRAN source file. 218
NESC9674_06.018 FORTRAN source file. 292
NESC9674_06.019 FORTRAN source file. 15
NESC9674_06.020 FORTRAN source file. 469
NESC9674_06.021 FORTRAN source file. 145
NESC9674_06.022 FORTRAN source file. 79
NESC9674_06.023 FORTRAN source file. 114
NESC9674_06.024 FORTRAN source file. 124
NESC9674_06.025 FORTRAN source file. 52
NESC9674_06.026 FORTRAN source file. 126
NESC9674_06.027 FORTRAN source file. 212
NESC9674_06.028 FORTRAN source file. 10
NESC9674_06.029 FORTRAN source file. 54
NESC9674_06.030 Executable file, Professional FORTRAN vers. 1802
NESC9674_06.031 Executable file, Microsoft version. 905
NESC9674_06.032 Executable file, Ryan-McFarland version. 770
NESC9674_06.033 Thermodynamic library. 579
NESC9674_06.034 Minerals library. (Used by PHRQINPT only.) 82
NESC9674_06.035 Input data, test case 1. 84
NESC9674_06.036 Input data, test case 2. 48
NESC9674_06.037 Input data, test case 3. 19
NESC9674_06.038 Input data, test case 4. 82
NESC9674_06.039 Input data, test case 5. 271
NESC9674_06.040 Output from test case no. 1,Ryan-McFarland. 243
NESC9674_06.041 Output from test case no. 2,Ryan-McFarland. 633
NESC9674_06.042 Output from test case no. 3,Ryan-McFarland. 589
NESC9674_06.043 Output from test case no. 4, Ryan-McFarland. 1921
NESC9674_06.044 Output from test case no. 4,Microsoft vers. 1943
NESC9674_06.045 Output from test case no. 4, Prof. FORT. v. 1921
NESC9674_06.046 Output from test case 4, CDC version. 1905
NESC9674_06.047 Output from test case no. 5, Ryan-McFarland. 3520
NESC9674_06.048 DOS file-names 47
top ]
17. CATEGORIES
  • R. Environmental and Earth Sciences

Keywords: chemical reactions, geochemistry, radioactive effluents, radionuclide migration.