When the program PHREEQC is invoked, two files are used to define the thermodynamic model and the types of calculations that will be done, the database file and the input file. The database file is read once (to the end of the file or until an END keyword is encountered) at the beginning of the program. The input file is then read and processed simulation by simulation (as defined by END keywords) until the end of the file. The formats for the keyword data blocks are the same for either the input file or the database file.
The database file is used to define static data for the thermodynamic model. Although any keyword data block can occur in the database file, normally, it contains the keyword data blocks: EXCHANGE_MASTER_SPECIES, EXCHANGE_SPECIES, PHASES, RATES, SOLUTION_MASTER_SPECIES, SOLUTION_SPECIES, SURFACE_MASTER_SPECIES, and SURFACE_SPECIES. These keyword data blocks define rate expressions; master species; and the stoichiometric and thermodynamic properties of all of the aqueous phase species, exchange species, surface species, and pure phases. Three database files are provided with the program: (1) a database file derived from PHREEQE (Parkhurst and others, 1980), (2) a database file derived from WATEQ4F (Ball and Nordstrom, 1991), and (3) a database file derived from MINTEQA2 (Allison and others, 1990). These files are described in more detail in Attachment B and the PHREEQE-derived database file ( phreeqc.dat ) is listed. The elements and element valence states that are included in phreeqc.dat are listed in table 4 along with the PHREEQC notation and the default formula used to convert mass concentration units to mole concentration units.
The input data file is used (1) to define the types of calculations that are to be done, and (2) if necessary, to modify the data read from the database file. If new elements and aqueous species, exchange species, surface species, or phases need to be included in addition to those defined in the database file, or if the stoichiometry, log K , or activity coefficient information from the database file needs to be modified for a given run, then the keywords mentioned in the previous paragraph can be included in the input file. The data read for these keyword data blocks in the input file will augment or supersede the data read from the database file. In many cases, the thermodynamic model defined in the database will not be modified, and the above keywords will not be used in the input data file.
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 saturation indices for minerals, which indicate the saturation state of each mineral relative to the water. Normally, speciation modeling requires only a SOLUTION (or SOLUTION_SPREAD) data block for each water analysis for which saturation indices are to be calculated. Example 1 demonstrates speciation calculations.
Batch-reaction calculations simulate reactions occurring in a beaker and can involve equilibrium and irreversible reactions. Equilibrium reactions are defined by specifying a solution or mixture of solutions to be put in the beaker along with a pure-phase assemblage, an exchange assemblage, a multicomponent gas phase, a solid-solution assemblage, or a surface assemblage. The solution or mixture is brought to equilibrium with the reactants. Furthermore, irreversible reactions can be specified, including addition or removal of specified reactants, temperature changes, and (or) kinetic reactions--for which the reaction rate depends on solution composition. Conceptually, the irreversible reactions are added and equilibrium is calculated for the system (see examples 2, 3, 4, 5, 6, 7, 8, and 10 in "Examples"). Kinetic reactions are integrated for a specified time step by calculating equilibrium following each of a series of irreversible reactions that depend on the evolving composition of the solution (see examples 6 and 9 in "Examples").
Initial conditions for batch reactions are defined with SOLUTION, SOLUTION_SPREAD, EQUILIBRIUM_PHASES, EXCHANGE, GAS_PHASE, SOLID_SOLUTIONS, and SURFACE data blocks. Irreversible reactions are defined with the data blocks MIX, for mixing of solutions; REACTION, for adding or removing fixed amounts of specified reactants; KINETICS and RATES, for defining kinetic reactions; and REACTION_TEMPERATURE, for changing the temperature at which the batch reaction occurs.
Different sets of keyword data blocks can be defined within one simulation, each set being identified by the number or range of numbers which follow the keyword. In the subsequent batch reaction, a set may be included either implicitly or explicitly. For an implicit calculation, a solution or mixture ( SOLUTION or MIX keywords) must be defined within the simulation, and the first of each keyword set (defined before the END) will be included in the calculation. That is, the first solution (or mixture) will be used along with the first of each of the data blocks EQUILIBRIUM_PHASES, EXCHANGE, GAS_PHASE, SOLID_SOLUTIONS, SURFACE, KINETICS, REACTION, and REACTION_TEMPERATURE. For an explicit calculation, " USE keyword number " defines a set that is to be used regardless of position within the input lines (see examples 3, 6, 7, 8, and 9 in "Examples"). " USE keyword none" eliminates a set that was implicitly defined (see example 8 in "Examples"). If the composition of the solution, pure-phase assemblage, exchange assemblage, gas phase, solid-solution assemblage, or surface assemblage has changed after the batch-reaction calculation, it can be saved with the SAVE keyword.
Advective-transport calculations are used to simulate advection and chemical reactions as water moves through a one dimensional column ( ADVECTION data block). 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 or the SAVE keyword. The cells may also contain other reversible or irreversible reactants. For a given cell number, i , if a phase assemblage, exchange assemblage, solid-solution assemblage, surface assemblage, gas phase, mixture, reaction, or reaction-temperature data block with identifying number i has been defined, then it is present in cell i during the advective-transport calculation. Thus, the initial conditions and the set of reactants can be defined individually for each cell, which provides flexibility to simulate a variety of chemical conditions throughout the column (see examples 11 and 14 in "Examples").
The infilling solution for the column is always solution number 0. Advection is modeled by "shifting" solution 0 to cell 1, the solution in cell 1 to cell 2, and so on. At each shift, kinetic reactions are integrated in each cell, while maintaining equilibrium with any gas phase or solid-phase assemblages that are present in each cell. To facilitate definition of the initial conditions the keywords EQUILIBRIUM_PHASES, EXCHANGE, GAS_PHASE, KINETICS, MIX, REACTION, REACTION_TEMPERATURE, SOLID_SOLUTIONS, SOLUTION, and SURFACE allow simultaneous definition of a range of cell numbers. The SAVE keyword also permits a range of solution, gas phase, or assemblage numbers to be saved simultaneously.
Analogous to purely advective transport, advective-dispersive or diffusive 1D transport can be modeled with the TRANSPORT data block. A single dispersion or diffusion coefficient is used for all chemical species, and, therefore, dispersion and diffusion have the same mathematical formulation for all species. For this document, the terms "dispersion" and "dispersive transport" are used to describe both dispersion and diffusion restricted to a single dispersion/diffusion coefficient. Like for purely advective transport, a column of n cells is defined, but also dispersion/diffusion parameters, boundary conditions, direction of flow, cell lengths, and advective time step can be provided. It is also possible to model double porosity by including the relevant information. The infilling solution depends on the direction of flow and may be solution number 0 or n+1 . For each shift (advection step), a number of dispersion/diffusion mixing steps are performed. For each shift and dispersion step, kinetic reactions are integrated for each cell while maintaining equilibrium with any gas phase or assemblages that are present in the cell (see examples 11, 12, 13, and 15, in "Examples").
Inverse modeling is used to deduce the geochemical reactions that account for the change in chemical composition of water along a flow path. At least two chemical analyses of water at different points along the flow path are needed, as well as a set of phases that are potentially reactive along the flow path. From the analyses and phases, mole-balance models are calculated. A mole-balance model is a set of mole transfers of phases and reactants that accounts for the change in composition along the flow path. Normally, only SOLUTION or SOLUTION_SPREAD 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 data blocks (see examples 16, 17, and 18, in "Examples").
| Next|| Previous || Top |