12
PHREEQC! A Graphical User Interface for the Geochemical Computer Program PHREEQC By SCOTT R. CHARLTON, CLIFFORD L. MACKLIN, and DAVID L. PARKHURST U.S. GEOLOGICAL SURVEY Water-Resources Investigations Report 97-4222 Lakewood, CO 1997

PHREEQC! A Graphical User Interface for the Geochemical

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PHREEQC! A Graphical User Interface for the Geochemical

PHREEQC! A Graphical User Interface for the Geochemical Computer Program PHREEQC

By SCOTT R. CHARLTON, CLIFFORD L. MACKLIN, and DAVID L. PARKHURST

U.S. GEOLOGICAL SURVEY

Water-Resources Investigations Report 97-4222

Lakewood, CO 1997

Page 2: PHREEQC! A Graphical User Interface for the Geochemical

U.S. DEPARTMENT OF THE INTERIOR

BRUCE BABBITT, Secretary

U.S. GEOLOGICAL SURVEY

Gordon P. Eaton, Director

The use of trade, product, industry, or firm names is for descriptive purposes only and does not imply endorsement by the U.S. Government.

For additional information write to: Copies of this report can be purchased from:

Chief, Branch of Regional Research U.S. Geological SurveyU.S. Geological Survey Branch of Information ServicesBox 25046, MS 418 Box 25286Denver Federal Center Denver Federal CenterDenver, CO 80225 Denver, CO 80225-0286

Page 3: PHREEQC! A Graphical User Interface for the Geochemical

CONTENTS

Abstract................................................................................................................................................................................. 1Introduction....................................................................................................._^ 1

Speciation modeling.................................................................................................................................................... 1Inverse modeling......................................................................................................................................................... 1Reaction-path modeling.............................................................................................................................................. 1ID advective reaction-transport modeling.................................................................................................................. 2Printing options........................................................................................................................................................... 2Database files: elements, aqueous species, exchange species, surface species, and pure phases............................... 3

The interface ......................................................................................................................................................................... 3Pull-down menus on the main screen ......................................................................................................................... 3

File .................................................................................................................................................................... 3New keyword.................................................................................................................................................... 5Options.................................................................................................................~^ 5Help................................................................................................................................................................... 5

Keyword screens......................................................................................................................................................... 5Field editor..............................................................................................................................................................^ 7Line editor................................................................................................................................................................... 7Run current file............................................................................................................................................................ 7

Files....................................................................................................................................................................................... 8Input file...................................................................................................................................................................... 8Output file ................................................................................................................................................................... 8Selected-output file..................................................................................................................................................... 8Database file................................................................................................................................................................ 8

How to obtain and install PHREEQCI..................................................................................................................................... 8Downloading and installation ..................................................................................................................................... 9

Directory installation......................................................................................................................................... 9Floppy diskette installation............................................................................................................................... 9

WIN32S ...................................................................................................................................................................... 9References cited..............................................................................................................................................................^ 9

FIGURES

1. Main screen of PHREEQCI...................................................................................................................................... 42. Keyword screen for SOLUTION keyword data block.................................................................................. 6

CONTENTS III

Page 4: PHREEQC! A Graphical User Interface for the Geochemical

PHREEQC! A Graphical User Interface for the Geochemical Computer Program PHREEQC

by Scott R. Charlton, Clifford L. Macklin, and David L. Parkhurst

Abstract

PHREEQC! is a Windows-based graphical user interface for the geochemical computer program PHRE­ EQC. PHREEQC! provides the capability to generate and edit input data files, run simulations, and view text files containing simulation results, all within the framework of a single interface. PHREEQC is a multipurpose geochemical program that can perform speciation, inverse, reaction-path, and ID advective reaction- transport modeling. Interactive access to all of the capabilities of PHREEQC is available with PHREEQCI. The interface is written in Visual Basic and will run on personal computers under the Windows(3.1), Windows95, and WindowsNT operating systems.

INTRODUCTION

PHREEQC (Parkhurst, 1995) is a computer pro­ gram that can perform several types of geochemical modeling including speciation, inverse, reaction-path, and ID advective reaction-transport modeling. PHRE­ EQCI is a Windows-based interface that provides access to all the capabilities of PHREEQC. Data for PHREEQC are entered through a series of keyword data blocks; each data block contains a specific type of information. For example, the SOLUTION keyword data block contains all the information to define the composition of an aqueous solution; EQUILIBRIUM_PHASES keyword data block defines the identity and amount of each mineral in a phase assemblage. The keyword data blocks are used to define the data needed for each type of modeling. Additional keyword data blocks are used to define output options and to define and modify the chemical database. The following sections of the Intro­ duction give an overview of the use of the keyword data blocks for PHREEQC.

Speciation Modeling

Speciation modeling uses a chemical analysis of a water to calculate the distribution of aqueous species using an ion-association aqueous model. The most important results of speciation calculations are satura­ tion indices for minerals, which indicate the saturation state of each mineral relative to the water. Normally, speciation modeling requires only a SOLUTION key­ word data block for each water analysis for which sat­ uration indices are to be calculated.

Inverse Modeling

Inverse modeling is used to deduce geochemical reactions that account for the change in chemical com­ position of water along a flow path. At least two chem­ ical analyses of water are needed at different points along the flow path as well as a set of phases that are potentially reactive along the flow path. From the anal­ yses and phases, mole balance models are calculated. A mole balance model is a set of mole transfers of phases that accounts for the change in composition along the flow path. Normally, only SOLUTION keyword data blocks and an INVERSE_MODELING keyword data block are needed for inverse modeling calculations. However, additional reactant phases may need to be defined with PHASES or EXCHANGE_SPECIES keyword data blocks.

Reaction-Path Modeling

Reaction-path modeling can be used to simulate a wide range of geochemical reactions. In general, these reactions can be divided into equilibrium (or reversible) reactions and irreversible reactions. Revers­ ible reactions include equilibration of a solution (SOLUTION keyword) with one or more of the fol­ lowing entities: a phase assemblage (EQUILIBRIUM_PHASES keyword), a set of ion

Abstract

Page 5: PHREEQC! A Graphical User Interface for the Geochemical

exchangers (EXCHANGE keyword), a set of surface complexers (SURFACE keyword), and (or) a fixed- pressure gas phase (GAS_PHASE keyword).

Irreversible reactions include mixing of solu­ tions (MIX keyword), addition (or removal) of fixed amounts of specified reactants (REACTION key­ word), and changing temperature (REACTION_TEMPERATURE keyword).

The same keyword may be used several times to define reactants; an integer number is used to identify each keyword data block. Thus, the user can define three different solutions and assign, for example, the integers 1, 10, and 20 to identify them SOLUTION 1, SOLUTION 10, and SOLUTION 20. Integer iden­ tifiers also are used with EQUILffiRIUM_PHASES, EXCHANGE, SURFACE, GAS_PHASE, MIX, REACTION, and REACTION_TEMPERATURE data blocks.

Reaction-path modeling is used to simulate reac­ tions that can be thought of as occurring in a beaker. A solution, or mixture of solutions, is placed in the beaker along with any other equilibrium reactants (phase assemblage, exchange assemblage, surface assem­ blage, or gas phase), irreversible reactions are applied (REACTION and REACTIONJTEMPERATURE), and the new equilibrium state is calculated.

A key concept for PHREEQC reaction-path calcu­ lations is a "simulation." A simulation is defined to be a set of keyword data blocks terminated by the END keyword. Reversible and irreversible reactants are defined within a simulation either by keyword data blocks (first occurrence within a simulation of SOLU­ TION, EQUILffiRIUM_PHASES, REACTION, and other types of keyword data blocks) or by the USE keyword, which specifies the use of a reactant that has been defined in a previous simulation. New composi­ tions of the solution, phase assemblage, exchange assemblage, surface assemblage, and gas phase that are calculated by a reaction simulation can be saved for use in subsequent simulations with the SAVE keyword.

Reaction-path modeling may include the use of any of the following keyword data blocks: SOLU­ TION, EQUILffiRIUM_PHASES, EXCHANGE, SURFACE, GAS_PHASE, MIX, REACTION, REACTIONJTEMPERATURE, SAVE, and USE.

1D Advective Reaction-Transport Modeling

Reaction-transport modeling simulates advec- tion and chemical reactions as water moves through a one dimensional column. The column is divided into a number of cells, n, which is defined by the user. The cells are numbered 1 through n, and these cells initially contain solutions with identifying numbers 1 through n. A solution composition for each of these integers must have been defined by SOLUTION data blocks (note that data for a range of numbers can be defined simultaneously, for example SOLUTION 1-15) or the SAVE keyword (for example, SAVE solution 1-15). The cells may also contain other reversible or irrevers­ ible reactants. For a given cell number, i, if a phase assemblage, exchange assemblage, surface assem­ blage, gas phase, mixture, reaction, or reaction temper­ ature with identifying number i has been defined, then it is automatically present in cell i during the transport calculation. Thus, the initial conditions and the set of reactants of each cell can be defined individually, which allows the flexibility to simulate a variety of chemical conditions throughout the column.

Advection is simulated by moving the solution in each cell to the next higher numbered cell; SOLU­ TION 0 must be defined and it is moved into cell 1; the solution from cell 1 is moved to cell 2, and so on, until the solution from cell n-\ is moved to cell n. At this point, the solution in cell n is discarded. All reversible and irreversible reactants except the solution remain in their original cells. After each cell has received its new solution, irreversible reactions are applied within the cell, the solution is equilibrated with the reversible reactants, and the equilibrium compositions of the solution and reversible reactants are saved.

Advective reaction-transport modeling uses the TRANSPORT keyword data block. Usually, one or more simulations precede the TRANSPORT simula­ tion. These preceding simulations often use many of the keywords described in reaction-path modeling to define the initial solutions and reactants of the column and to define the infilling solution (SOLUTION 0).

Printing Options

A large amount of information is produced by speciation, reaction-path, and reaction-transport calcu­ lations. By default, all results are written to a single output file, which may become very large, especially

2 Phreeqcl A Graphical User Interface for the Geochemical Computer Program PHREEQC

Page 6: PHREEQC! A Graphical User Interface for the Geochemical

for reaction-transport calculations. The data written to the output file can be limited by use of the PRINT key­ word data block and by options within the TRANS­ PORT keyword data block. In addition, a "selected- output file" that contains selected results can be speci­ fied. This file contains columns of data for user-speci­ fied items. For example, the total concentration of iron and the saturation index of calcite could be specified to be written to the selected-output file for each cell and time step of a transport calculation. The name of the file and the data items to be written are defined with the SELECTED_OUTPUT keyword data block. The selected-output file consists of columns of data and can be easily imported into a spreadsheet program for anal­ ysis and graphing.

Database Files: Elements, Aqueous Species, Exchange Species, Surface Species, and Pure Phases

PHREEQC uses a database file to define the set of elements and element redox states, ion exchangers, sur­ face complexers, and pure phases that are used in cal­ culations. The database file contains all of the stoichiometry and thermodynamic data for aqueous species, exchange species, surface species, and pure phases. These data are defined through the following keyword data blocks: SOLUTION_MASTER_SPECIES, SOLUTION_SPECIES, EXCHANGE_MASTER_SPECIES, EXCHANGE_SPECIES, SURFACE_MASTER_SPECIES, SURFACE_SPECIES, and PHASES. Custom data­ base files can be written using these keywords. In addi­ tion, database files can be modified at run time through the use of these keywords in the input file.

Three database files are distributed with PHRE­ EQC and PHREEQCl, phreeqc.dat, \vateq4f.dat, and minteq.dat. The file phreeqc.dat is derived from the database file for the geochemical program PHREEQE (Parkhurst and others, 1980), but the data are consistent with \vateq4f.dat for the minerals and species that are common to both. The file phreeqc.dat contains data for the elements Al, B, Ba, Br, C, Ca, Cd, Cl, Cu, F, Fe, K, Li, Mg, Mn, N, Na, P, Pb, S, Sr, Si, and Zn. The file \vateq4f.dat is derived from the database file for WATEQ4F (Ball and Nordstrom, 1991) and contains all of the elements from phreeqc.dat plus As, Cs, I, Ni, Rb,

Se, and U. In addition, \vateq4f.dat has data for organic ligands labeled Fulvate and Humate. The file minteq.dat is translated from the data files of MINTEQA2 (Allison and others, 1990).

THE INTERFACE

When PHREEQCl is installed on a computer, a new icon is created in the Windows environment (see How to Obtain and Install PHREEQCl below). The inter­ face can be invoked by double clicking on the icon. PHREEQCl is installed in a directory of the user's choice. For this manual, it is assumed that the program is installed in the directory c:\phreeqci. The program that is executed by double clicking the icon is c:\phre- eqcbphreeqci.exe. After invoking the program, the main screen for PHREEQCl appears (fig. 1).

The main screen for PHREEQCl has a button for each keyword (fig. 1) that produces an input screen for the keyword data block. After data have been entered in the screen for a keyword data block, the data are stored in a temporary copy of the input data file and the main screen reappears. END keywords can be added with the "End of Simulation" button that spans the main screen at the bottom (fig. 1). Individual keyword data blocks may be retrieved and edited through the "Field Editor" button on the main screen (fig. 1). The entire input data set may be edited with a user-specified editor (see Options below) through the "Line Editor" button (fig. 1). Once all of the keywords for all the sim­ ulations are entered, PHREEQC can be run with the "Run Current File" button. The top border of the main screen lists the name of the current input file and lists the num­ ber of simulations in the file (see Reaction-Path Mod­ eling above).

Any item on a screen that has an underlined letter can be invoked through the keyboard by pressing the "Alt" key and the letter key simultaneously.

Pull-Down Menus on the Main Screen

Four pull-down menus are located at the top of the main screen: "File", "New Keyword", "Options", and "Help" (fig. 1).

File

The "File" pull-down menu on the main screen (fig. 1) allows the selection of a new ("New") or exist-

THE INTERFACE 3

Page 7: PHREEQC! A Graphical User Interface for the Geochemical

X

,

;

'

J^-

xjVt

.2

01

o

2

ox2:1

Lui

JDil

13uc

cc

D0£rJE" 5J l»

1 11 2 rs

o o ^iB. - Q10 UJ

: ii :

j||: :!»[l**j :

! 1: :

IJ

Jll tO . f,j* ^^ ' |.| i t i3 ^ > ^^ j J|

JC iil DL( to P

[t \

Jl: :-:. ':

"S uj D CC( 3 >

____ II H-

5

UJ

15!« §

LL

JU CD 5 £2 ^ ujV 1 Q.

Pr *9 1? LU o o or<0 iii Vi * i UJ SI.1 111t ^Iz *v "'' L ***t ^U*1! "**-CII ;gy UJ UJ <( CC3 ~". HEI CCI ^~ CO H *

LU

* 1

1: 1-,

CO LU

uLUa.COJu<LuccZl CO

CO LU tO

g DOL JJ-1co CL

1 to CC to lUJ LU CCi- D nJ2K§ s,^i2: 2 rj o o a i- i < r> r> g-J 1 CC

0 0 0 ZJ*S CO CO tOflj G

.O

COUJ CO

T*

* ?Fc c * *-

;0 .0 <**?" ""m *ii ^ . UJ

c C DC ^3 <C S>iLUy» S ^T TJ" ~r« t^K''!'^! « ~I^J uQ ^" i ~y w^ iito o i <£ n K -^X ^ == n: i ID LL- S <o ^> cj to j cc ujS! *JB o XI <C O ID to 5 '5 uji uj LSI col co ZD| o

g-

<0 CO

o ujE °- £ co

41 CC CO** LU UJ

C tO uj

=S S tO5 1 1^f LU UJ 1 03 03 5 2 Z co .2 < < uj JE X DC to,w u u <'5 x x DC LU LU Q.to

e

1

J%* o

9

P

mum.

Figure 1. Main screen of PHREEQC!.

4 Phreeqcl A Graphical User Interface for the Geochemical Computer Program PHREEQC

Page 8: PHREEQC! A Graphical User Interface for the Geochemical

ing ("Open") file as the input data file. It also allows the current input data file to be saved ("Save") or renamed ("Save As"). The "Exit" item in the menu closes the program PHREEQCl and returns to Windows.

New Keyword

The "New Keyword" pull-down menu on the main screen (fig. 1) allows a selection of any keyword screen using only keystrokes that is, without the use of the mouse.

Options

The "Options" pull-down menu is used to set preferences for a browser, text editors, and default database file.

The browser is used by the help facility to view the help files. Commonly, Netscape, Internet Explorer, or Mosaic are available to use as browsers. If no browser is available, then the help facility will not function, but the rest of the interface will function nor­ mally. Two boxes are used to define the browser in the "Options" window: (1) The box labeled "HTML Browser" is used to define the browser; on some sys­ tems it may be necessary to give the entire path to the browser program, for example c:/mosaic/mosaic.exe, and (2) The box labeled "HTML Browser Options" allows any special options needed to invoke the browser to be defined; for example to invoke Mosaic in stand-alone mode, "-s" should be entered in this box.

The user's preference for text editors for input and output files can be specified in entry boxes within the box labeled "Text Editors" of the "Options" win­ dow. The box labeled "Input" is used to define the text editor that is used to edit the input file. Two radio but­ tons allow the selection of the default Visual Basic edi­ tor ("Built-in") or another editor ("User Defined") that is available on the computer. If "User Defined" is selected, the name, or possibly the pathname to the exe­ cutable file, of the editor, must be entered. A browser is available to locate the pathname to the executable file if the desired editor can not be located through the default "PATH". The box labeled "Output" allows the selection of an editor to use with output files. The default text editor is Notepad. With the Windows(S.l) and Windows95 operating systems, this text editor allows only a limited-size file to be opened and cannot handle long output files. Selection of a more versatile text editor is desirable. As with the user-defined editor

for the input file, a browser is available to locate the pathname to the executable file if the desired editor can not be located through the default PATH.

Finally, the chemical database file for calcula­ tions is selected through the "Default Database File" box of the "Options" window. The three database files distributed with PHREEQCl, phreeqc.dat, \vateq4f.dat, and minteq.dat, are stored in the top level directory of the PHREEQCl installation and may be used by typing the selected name in the entry box. If the user has developed a custom database file, it can be selected with the "browse" button next to the entry box.

Help

The "Help" pull-down menus on all screens use the HTML browser (see Options above) to read on-line documentation. The "Help" pull-down menu on the main screen (fig. 1) has three items: "PHREEQCl" dis­ plays the first page of this manual; "User's Guide to PHREEQC" displays the first page of the user's manual for PHREEQC (Parkhurst, 1995); and "About PHREEQC Interactive" displays the version number of PHREEQCl.

Keyword Screens

Each keyword of PHREEQC is listed on the main screen of PHREEQCl. Clicking on a keyword, or if the keyword has an underlined letter, pressing the Alt key and the letter key simultaneously will produce a new screen for entry of that keyword data block. The key­ word data block will be inserted into the simulation number given in the "Current Simulation #" box shown in the upper left of the main screen. Clicking "End of Simulation" places an END keyword in the input file and advances the current simulation number, but does not produce a new screen.

An example keyword screen for the SOLU­ TION keyword is shown in figure 2. The "Help" menu at the top of a keyword screen (fig. 2) invokes the HTML browser (see Options above) and displays the description of data input for the keyword from the PHREEQC manual (Parkhurst, 1995).

All keyword screens have the three buttons "Done", "Cancel", and "Clear All" in the upper right- hand corner (fig. 2). The "Done" button is used when all data have been entered for the keyword data block. After the button is pushed, the data are written to a tem­ porary copy of the input file and control is returned to

THE INTERFACE

Page 9: PHREEQC! A Graphical User Interface for the Geochemical

tt oo;

oJ0)o to

V

«*

oC

en

mm

asBo

e<o**

^ « w ^ = <D§ £ o JJ*> u

9Co

O1 0}0}

ents

15 tnjj US

0) mCM o

Figure 2. Keyword screen for SOLUTION keyword data block.

6 Phreeqcl A Graphical User Interface for the Geochemical Computer Program PHREEQC

Page 10: PHREEQC! A Graphical User Interface for the Geochemical

the main screen. The "Cancel" button removes the key­ word screen and no data are stored to the input file. The "Clear All" button deletes all information in all boxes of the keyword screen and reinitializes any default val­ ues.

Entry boxes can be selected by a mouse click, a tab, or a "shift tab". The tab key cycles the cursor through the entry boxes in sequential order. The shift and tab keys pressed simultaneously move the cursor to entry boxes in reverse sequential order.

Data for any entry boxes can be entered directly from the keyboard after being selected by a mouse click, a tab, or a shift tab. Many entry boxes have adjoining list boxes, which are buttons with down­ ward-pointing arrows. A mouse click on a list box or pressing the Alt and the down arrow key simulta­ neously while the entry box is selected will display a list of possible entries for the adjoining entry box. Pointing the mouse cursor to an entry and clicking puts the selected entry in the entry box. Alternatively, while the list of possible entries is displayed, pressing a sequence of letters on the keyboard will advance the selection to an entry that begins with that sequence of letters; pressing the enter key will put the selected entry in the entry box.

Many keyword screens define lists of informa­ tion. For example, in the SOLUTION keyword screen, a list of elements and concentrations must be entered (fig. 2). The list of the SOLUTION screen will be described here, but all lists are entered and edited with the same logic. The data for one element are entered in the "Individual element input" boxes (for example the "Element/State" and "Concentration" boxes in fig. 2). The "Enter" button is clicked to add the new entry to the "List of elements" (fig. 2). Any entry in the "List of elements" may be deleted by selecting it with a single mouse click followed by a click on the "Delete Selected Entry" button (fig. 2). Any entry from the "List of elements" may be selected and edited by dou­ ble clicking with the mouse. After selecting an item from the "List of elements" by double clicking, the entry boxes of "Individual element input" ("Element/ State", "Concentration", "Units", and others, fig. 2) are populated with the selected item and the data in the entry boxes can be edited. Another click of the "Enter" button replaces the selected item in the "List of ele­ ments" with the edited data.

Field Editor

Any keyword data block that is in the input data file can be edited with the appropriate keyword screen by using the "Field Editor" button on the main screen. A new screen with two entry boxes appears. First, the correct simulation must be selected with the "Simula­ tions" entry box, and then the desired keyword can be selected with the "Keyword" entry box.

Line Editor

The entire input file can be edited at any time with a user-defined editor by using the "Line Editor" button on the main screen. (The editor for the "Line Editor" button is specified in the Options menu, see Options above.) After exiting the line editor, control returns to the main screen.

Input to PHREEQC is free format and fields are delimited by spaces or tabs. In general, the order of keywords within a simulation and, in most cases, the order of lines within a keyword are irrelevant, so the input file can be edited relatively easily. However, it is possible to introduce input errors that cause the data blocks not to be interpretable by PHREEQC and PHRE- EQCl. In this case, the user has to correct the errors in the line editor, or remove the erroneous keyword data block with the line editor and reenter the data through the keyword screen.

The line editor is the only way to delete an entire keyword data block, to add an END keyword between previously defined keywords, or to move keyword data blocks between simulations.

After familiarization with PHREEQCl, the line editor can be used for simple modifications of an input file or even for much of the data entry.

Run Current File

Once all of the keywords for all the simulations are entered, PHREEQC can be run with the "Run Current File" button. At this point, a window labeled "Save As" appears and is used to select the directory and name of the file in which to store all the keyword data that have been entered. Next a window labeled "Save Output As" appears and is used to select the directory and name of the output file that is generated by PHREEQC. PHREEQC is then run and the output file is displayed to the screen

THE INTERFACE

Page 11: PHREEQC! A Graphical User Interface for the Geochemical

in the text editor specified with the Options menu (see Options above). After viewing results, exiting from the text editor returns control to the main screen of PHRE- EQCl.

FILES

The user has control over four files that are used or produced by a PHREEQCl run: (1) input file, (2) out­ put file, (3) selected-output file, and (4) database file.

Input File

The input file contains a set of keywords and associated data that define the set of geochemical cal­ culations to be done. An input file is required for all cal­ culations. The name of the input file is selected either with the "File" menu on the main screen of the pro­ gram, or at the time the "Run Current File" button on the main screen is selected. All information that has been read from an existing input file or input through keyword screens or the line editor is written to the input file. The "File" menu on the main screen allows saving, changing, and renaming the input file.

Output File

The output file contains all results of PHREEQC calculations and is required for all calculations. The name of the file is selected after the "Run Current File" button on the main screen is selected. By default, the output file name is the input file name with ".out" appended. The results that are written to the output file can be changed by options in the PRINT and TRANS­ PORT keyword data blocks.

Selected-Output File

A file suitable for importing into a spreadsheet program can be defined through the SELECTED_OUTPUT keyword data block. The name of the file can be defined (default is selected.out) and the data items to be included in the file can be selected. When SELECTED_OUTPUT keyword data block is used, a set of data items, including the numbers of reactants, pH, temperature, ionic strength, and other items, is printed to the selected-output file. In addition, the following items can be written to the selected-out­

put file for every PHREEQC calculation: (1) the total molality of any element or element redox state, (2) the molality of any aqueous, exchange, or surface species, (3) the log of the activity of any aqueous, exchange, or surface species, (4) the amount and mole transfer of any mineral in the reaction phase assemblage, (5) the saturation index for any mineral, and (6) the amount of any gas in the gas phase.

Database File

The definitions of the elements and element redox states, ion exchangers, and surface complexers are normally included in the database file. In addition, the stoichiometry and thermodynamic data for aque­ ous, exchange, and surface species and for pure phases are normally defined in the database file.

Three database files are distributed with PHRE­ EQCl, phreeqc.dat, wateq4f.dat, and minteq.dat (see Database Files: Elements, Aqueous Species, Exchange Species, Surface Species, and Pure Phases above). One of these database files or a custom database file can be selected through the Options menu on the main screen.

HOW TO OBTAIN AND INSTALL PHREEQCl

The latest version of the software described in this report and a Postscript file of this manual can be obtained from the web site http://water.usgs.gov/soft- ware/. Many other hydrologic computer programs are also available at this site.

The latest version of PHREEQCl may also be obtained by anonymous ftp from the Internet address: brrcrftp.cr.usgs.gov (136.177.112.5). The files reside in the directory /geochem/pc/phreeqci. A typical anony­ mous ftp session follows:

% ftp brrcrftp.cr.usgs.gov Name: anonymous Password: e-mail address

ftp> cd geochem/pc/phreeqciftp> Is pcix-xx.exe

ftp> type binary

ftp> get pcix-xx.exe ftp> quit

(replaced with e-mail address)(change directory) (list files in directory) ("x-xx" represents the version number) (eliminate translation for binary files) (transfer the file) (quit ftp)

8 Phreeqcl A Graphical User Interface for the Geochemical Computer Program PHREEQC

Page 12: PHREEQC! A Graphical User Interface for the Geochemical

Alternatively, the documentation and current version of the software can be ordered from the follow­ ing address:

U.S. Geological Survey NWIS Program Office 437 National Center Reston, VA 22192 (703) 648-5695

Additional copies of this report are available from:

U.S. Geological Survey Branch of Information Services Box 25286 Denver, CO 80225-0286

For additional information, write to the address on page ii of this report.

Downloading and Installation

Two methods for downloading and installing PHREEQC! are available. The first method downloads a single self-extracting file, which is extracted in a tem­ porary directory on the hard disk, and PHREEQCl is then installed from this temporary directory. The second method downloads three self-extracting files, which are then extracted onto three 1.44MB floppy diskettes, and PHREEQCl is installed from the floppy diskettes.

Directory Installation

1. Create a temporary directory on the hard drive.2. Download pcix-xx.exe into the temporary

directory, where x-xx is the version number. (Note: Be sure to use binary transfer if using FTP.)

3. Extract the installation files into the temporary directory by executing pcix-xx.exe.

4. Run setup.exe.5. Remove the temporary directory from the hard

drive.

Floppy Diskette Installation

1. Create a temporary directory on the hard drive.2. Download diskl.exe, disk2.exe, and disk3.exe.

(Note: Be sure to use binary mode if using FTP.)

3. Create the installation diskettes by extracting the three files onto three blank formatted (1.44MB) floppy diskettes.

For example:

c:\tmp\diskl a: c:\tmp\disk2 a: c:\tmp\disk3 a:

4. Run setup.exe from the first floppy diskette.5. Remove the temporary directory from the hard

drive.

WIN32S

PHREEQCl contains a 32-bit component that runs directly with Windows95 and WindowsNT operating systems. However, if the operating system is Win- dows(3.1), Win32s is required and Win32s must be installed before installing PHREEQCl. Win32s is avail­ able from the server brrcrftp.cr.usgs.gov in the direc­ tory /geochem/pc/phreeqci/win32s. See the readme.txt file in that directory for downloading and installation instructions. For more information on Win32s, please see the following URL: http://www.ncsa.uiuc.edu/ SDG/Software/mosaic-w/faq/win32.html.

REFERENCES CITED

Allison, J.D., Brown, D.S., and Novo-Gradac, K.J., 1990, MINTEQA2/PRODEFA2 A geochemical assessment model for environmental systems version 3.0 user's manual: Environmental Research Laboratory, Office of Research and Development, U.S. Environmental Pro­ tection Agency, Athens, Georgia, 106 p.

Ball, J.W. and Nordstrom, O.K., 1991, WATEQ4F User's manual with revised thermodynamic database and test cases for calculating speciation of major, trace and redox elements in natural waters: U.S. Geological Sur­ vey Open-File Report 90-129, 185 p.

Parkhurst, D.L., Thorstenson, D.C., and Plummer, L.N., 1980, PHREEQE A computer program for geochemical calculations: U.S. Geological Survey Water-Resources Investigations Report 80-96, p. 195. (Revised and reprinted August, 1990.)

Parkhurst, D.L., 1995, User's guide to PHREEQC A com­ puter program for speciation, reaction-path, advective transport, and inverse geochemical calculations: U.S. Geological Survey Water-Resources Investigations Report 95-4227, 143 p.

REFERENCES CITED