WMC Short Course

121 downloads 0 Views 2MB Size Report
The first class is the Lithophiles, which are concentrated in the crust (Li, Be, B, Si, Na, Al, Ca, ..... Moles in assemblage. Phase. SI log IAP log KT Initial Final Delta ...
PHREEQC MODELING SHORT COURSE

October, 2007

Instructor – Dr. Geoffrey Thyne Science Based Solutions LLC Laramie, Wyoming 307-745-8766

This text is intended to familiarize the student with portions of the geochemical computer code PHREEQC. We will briefly review a number of concepts related to the chemical thermodynamics that are relevant to using geochemical models, however this review is very brief and students are encouraged to refer to the textbooks listed for a through treatment of the subject. Students are also encouraged to visit the PHREEQC website for additional resources such as the one hundred most asked questions list (with answers), updates and contact information for the code developer, Dr. David Parkhurst, USGS, Denver Colorado.

Recommended Background Texts Appelo and Postma, 1993, Geochemistry, Groundwater and Pollution Bethke, C. M., 1996, Geochemical Reaction Modeling – Concepts and Applications, Domenico and Schwartz, 1998, Physical and Chemical Hydrogeology Drever J. I., 1999, Geochemistry of Natural Waters Faure, G., 1993, Principles and Applications of Inorganic Geochemistry Merkel, B.J., Planer-Friedrich, B. and D. K. Nordstrom, 2005, Groundwater Geochemistry Parkhurst and Appelo, 1999, USER’S Guide to PHREEQC (VERSION 2)—A Computer Program for Speciation, Batch-Reaction, One-dimensional Transport and Inverse Geochemical Calculations,Water-Resources Investigations Report 99-4259 Zhu, C. and G. Anderson, 2002, Environmental Applications of Geochemical Modeling

2 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

TABLE OF CONTENTS Computer Models Review of the Geochemical Principles Units of concentration – wt./wt., wt./vol., moles Review of Basic Thermodynamics Mass action equations Saturation index The PHREEQC Model Getting Started Equilibrium of water and calcite Concepts of Aqueous Speciation and Solubility of Solids and Gases Acid-base reactions PHREEQC examples of solubility of calcite and atmospheric CO2 REACTION command (a reaction path) SELECTED_OUTPUT command – first use INCREMENTAL_REACTIONS command Alkalinity Fixed pH The pH Sweep Titration of AMD – Acidity Introduction to KINETICS and the linked RATE commands Activity and Concentration Salt example Databases Mt. Edna Solicchiata example – how to use the other databases Adding new species - Ground water with benzene Metal database example Managing the Input and Output SOLUTION_SPREAD command SELECTED OUTPUT example

5 10 10 11 12 14 15 16 17 20 21 21 23 25 26 29 31

34 36 29 38 39 41 42 42 42

Introduction to Redox Basic Principles Principles of AMD generation Oxidation of AMD solution Oxidation of organic matter Specifying Redox - uranium and speciation of seawater Example of passive treatment Fixed Eh Surface Reactions Implicit Surfaces Kd partitioning formulation (isotherms) Sorption with Frendlich and Langmuir isotherms Explicit Surfaces SURFACE command Specifying the surface Organic surfaces Reaction Path Models Mixing

32 65 35 36 36 38 44 44 44 46 48 51 52 57

The command and examples

Water Compatibility Mixing, Redox and Surfaces Combined-AMD mixing with stream water

3 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

55

Evaporation Inverse Modeling Concepts of Inverse Modeling-Sierra springs example Complex AMD Example Transport –1-D Advection and Dispersion Simulation of continuous landfill leachate leak Simulation of continuous landfill leachate leak with sorption Simulation of pulse landfill leachate leak with sorption Simulation of AMD in a carbonate column Uncertainty in Models References Appendix of Input Files

4 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

60 60 65 73 75 79 80

84 85

Computer Models Capabilities and Methods The computer codes require initial input constraints that generally consist of water chemistry analyses, units of the measurement, temperature, dissolved gas content, pH and redox potential (Eh). The models work by converting the chemical concentrations, usually reported in wt./wt. or wt./volume terms such as mg/kg or mg/L, to moles, and then solving a series of simultaneous non-linear algebraic equations (chemical reaction, charge balance and mass balance equations) to determine the activity-concentration relationship for all the chemical species in the specified system. The models usually require electrical balance, and will force charge balance with one of the components (that can be designated), as they solve the matrix of non-linear equations. The capabilities of modern codes include calculation of pH and Eh, speciation of aqueous species, equilibrium with gases and minerals, oxidation and reduction reactions (redox), kinetic reactions and reactions with surfaces. The non-linear algebraic equations are solved using an iterative approach by the NewtonRaphson method (Bethke, 1996). The equations to be solved are drawn from a database that contains equations in the standard chemical mass action form. In theory, any reaction such as sorption of solute to surface that can be represented in this form can be incorporated into the model. These equations represent chemical interactions with reactants on the right and products on the left. Reactions are assumed to reach equilibrium (the point of lowest free energy in the system) when there is no change in concentration on either side. CaCO3 ↔ Ca2+ + CO32Note that the arrow in the calcite dissolution example above goes in both ways, that is the reaction as written is reversible. Once a mineral reaches equilibrium with a solution, adding more mineral will not increase the dissolved concentration since we have already saturated the solution. But removing ions from the right side (e.g. lowering the concentration by dilution with distilled water), will cause more solid to dissolve. We express this in a mathematical form where, at equilibrium, the ratio of the concentration of reactants (on the bottom) and products (on the top) is equal to K, known as the proportionality constant or distribution coefficient or equilibrium constant. Kcalcite = [Ca2+] [CO32-] [CaCO3] Kinetic reactions, those involving time, are included by assuming that the chemical reaction will proceed to equilibrium, but at a specified rate. The available kinetic reactions include mineral dissolution and precipitation, redox reactions and microbial growth and metabolism of solutes. The rate laws used in the codes vary, but all codes with kinetic capabilities include simple first order rate laws, and may include more 5 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

complex rate formulations such as cross-affinity, Michaelis-Menten and Monod formulations (Bethke, 2002). Geochemical computer models are divided into two basic types, speciation models and reaction-path models. In both cases, the models are fundamentally static, that is there is no explicit transport function, however some forms of transport can be simulated by manipulation of the models. More complex reaction-transport models that explicitly incorporate transport are briefly described below. All the equilibrium models are speciation models in that they can calculate the speciation (distribution) of aqueous species for any element or compound included in the database. Speciation models calculate activities (chemically reactive concentration), species distribution for elements in the database, mineral saturation indices, gas fugacities and ion ratios at the specified conditions of pH and redox potential (ORP or Eh). Most of the models allow selection of method of activity calculation (Davies, Debye-Huckel, extended Debye-Huckel, Pitzer). Some models incorporate surface reactions such as adsorption and multiple kinetic formulations. Only one model, PHREEQC, has the inverse modeling option. This feature uses mass balance constraints to calculate the mass transfer of minerals and gases that would produce an ending water composition given a specified starting water composition (Garrels and Mackenzie, 1967). This method does not model mass transport, only calculates and provides statistical measures of fit for possible solutions to the mass balance between starting and ending water compositions. All computer models simplify the computational matrix of equations by solving a minimum numbers of master equations, sometimes referred to as basis species or in PHREEQC, SOLUTION_MASTER_SPECIES. These species define the “system” that will be brought to thermodynamic equilibrium by calculation. You can view the SOLUTION_MASTER_SPECIES by clicking on the Database tab at the top of the program. This is probably a good time to begin to use PHREEQC. You will notice that there is PHREEQC icon on your desktop. Double click on the icon and open PHREEQC. A window will open that looks like the picture below. If you click on the Database tab you will see a listing of all the species in the database. The SOLUTION_MASTER_SPECIES are the fundamental components that PHREEQC uses when making calculations. All other solutes, gases and solids are defined in terms of these components. The other species are listed in the database under the appropriate headings such as SOLUTION_SPECIES, PHASES, SURFACE_SPECIES, etc. You can scroll down the file to see the contents. Since the file is a text document, you can edit the file to change the values for the mass action equations, delete unwanted species or add new species. Changing the database will be dealt with in more detail later.

6 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

To add components to the system, you use the Input tab. The components added to define the system must be defined as SOLUTION_MASTER SPECIES. This can be a little difficult at first when you are entering data from a water analysis that lists HCO3 for inorganic carbon, while the PHREEQC input requires the inorganic carbon to be entered as Alkalinity. However, the program can automatically convert the chemical analysis parameter to the basis species if correctly input. By default, there is 1 kg of water in the system automatically. All the programs work that way. The reason for using 1 kg is that all the programs use concentrations in units of molal (moles/kg) even if you enter the concentrations in other units. This brings us to the subject of how the program actually works. Instead of calculating the solution to a matrix with ninety species (90x90), the strategy is to calculate the smallest possible matrix and then distribute the total amount of each basis species among 7 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

all possible related species. So Ca (really the total calcium in this system) is distributed among Ca++, CaHCO3+, CaOH+ and CaCO3 after the interactions among the basis species are accounted for. This strategy simplifies the calculations, but does confuse many new users who struggle with the concept of a basis. The figure below is taken from Bethke (1996), an excellent reference for the interested reader.

The next step in complexity is the reaction path (mass transfer) models. The reaction path models use speciation calculation as starting point and then make forward predictions of changes along the specified reaction path (specified change in T, P, pH, addition of new reactants such as another fluid or solid). The program makes small incremental steps with step-wise addition or removal of mass (dissolution or precipitation), and can include changes in temperature or pressure along the reaction path. Besides the theoretical problems with using models such as the assumption of equilibrium in complex natural systems, there are practical limitations with employing any of the models. The field input data may be corrupt with bad analysis, missing parameter, or electrical imbalance. The databases are also a source of uncertainty. They do not always contain all the elements or species of interest, the data has some uncertainty, and some data may be inaccurate data (Drever, 1997). Some of the available codes try and minimize this problem by including several of the most popular databases such as the MINTEQ database (EPA-approved database specializing in metals), WATEQ (USGS database specializing in minerals), and the LLNL database (the most complete and internally consistent database available which is compiled and maintained by Lawrence Livermore National Laboratory). For environmental applications, the limited data for organic compounds remains a concern.

8 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Other limitations include the redox reactions that are of particular importance in metal transport. These reactions are difficult to model correctly since redox reactions may have different rates producing natural systems that are not in redox equilibrium (Lindberg and Runnels, 1984). This problem can be addressed by modeling redox reactions as ratelimited (kinetic) formulations if the data is available. The most complex models explicitly incorporate transport and reaction. The codes couple and solve both the partial differential equations of flow using the advectivedispersion equation and the non-linear algebraic equations of chemical equilibrium. The general approach is to solve for the reaction term in each cell using the chemical module of the code, then separately solve for the effects of transport (split-operator approach). The effects of adsorption are solved in the transport module using the retardation portion of the equation (Appelo and Postma, 1993, Parkhurst and Appelo, 1999, Zhu and Anderson, 2002). These models are much more complex than the reaction path models. Presently there are only three commonly used models that have transport capabilities, HYDROGEOCHEM2, PHREEQC (1D) and the related PHAST (3D) code, and Geochemist’s Workbench® Professional. The following table lists the most commonly used programs, their sources and some of the most useful capabilities. The list is not meant to be exhaustive rather it offers an overview to serve as a starting point for further investigation. Details of the capabilities of each program can be found on the listed websites or in the manuals. More detailed comparison of these and other models are available in related publications (Nordstrom et al. 1979, Engesgaard and Christensen, 1988, Mangold and Tsang, 1991). Table 1. Comparison of selected geochemical codes capabilities and features. Program

Source

Speciation

Tabular output yes yes yes

Graphic output no yes no

Surface Rxns. no yes yes

Kin.

Transp

yes yes yes

Reaction Path yes yes yes

yes yes yes

no yes yes

Multiple database no yes no

EQ3/6 GWB HYDROGE OCHEM2 MINTEQ MINEQL+ PHREEQC

LLNL Rockware* SSG* EPA ERS* USGS

yes yes yes

no no yes

yes yes yes

no some no

yes no yes

no no yes

no no yes

no no yes

* - Commercial programs, others are freeware. EQ3/6 – http://www.earthsci.unibe.ch/tutorial/eq36.htm GWB - Rockware - http://www.rockware.com HYDROGEOCHEM -http://www.scisoftware.com/environmental_software/software.php MINEQL+ - http://www.mineql.com/ MINTEQ - http://soils.stanford.edu/classes/GES166_266items%5Cminteq.htm PHREEQC - http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/

9 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Review of the Geochemical Principles The earth is composed of numerous elements of which only a few are present in significant amounts. In order, Si, Mg, Fe, Al, Ca, Na, Cr, Mn, P, K, Ti and Ni as oxides form 98.8+% of the earth’s mantle, and is the source of surface rocks. These elements are referred to as the major elements because of their abundance. The situation is different in natural waters where the major elements are usually Na, Ca, K, Mg, C as HCO3, S as SO4, Si, and Cl. These elements are the most soluble, where the more common elements such as Si, Fe and Al have low solubility. Minor elements have, by definition, concentrations below 5 ppm and may include Fe, B, F, P and N, while trace elements are present in amounts less than 1 ppm ( Mn, Ni, Co, As, St, Li, etc.). The elements are segregated in the earth’s crust by tectonic processes (heat and pressure) into three general classes. The first class is the Lithophiles, which are concentrated in the crust (Li, Be, B, Si, Na, Al, Ca, Sc, Ti, V, and Mn, and the large ion lithophiles (rockloving) or incompatibles that include K, Rb, Cs, Sr, Ba, Y, REE’s, Zr, Hf, Nb, Ta, W, Th and U. These elements are concentrated in granites, and some basaltic to intermediate rocks. The second class is the siderophiles (iron-loving) that include Fe, Co, Ni, Au and Pt group elements and are found concentrated in ultramafic rocks. The third class is the chalcophile (copper-loving) that include Cu, Zn, Ga, Ag, Cd, S As and Sb) and are concentrated in basaltic and intermediate rocks. These classes are general and there are notable deviations. This situation is complicated during weathering when the different solubility of minerals produces a fractionation, with the more mobile elements being separated from the less mobile. Certain sedimentary rocks concentrate mobile elements as they form. For instance, limestone concentrates Ca, Mg and Sr. Units of concentration – wt./wt., wt./vol., moles In geochemistry, we use many units of concentration. They include weight/weight units such as ppm and ppb, weight/volume units such as mg/l or g/L (where l or L is liter). But in chemical calculations we use moles, where one mole is 6.023 x 10 23 atoms or molecules. This convention normalizes the amounts and lets us use a balanced chemical reaction. To convert between moles and weight, we use the molecular or formula weight of an element, molecule or compound. Example One mole of H2O is (2 x 1g) for the two hydrogen atoms, and (1 x 16g) for the one oxygen atom for a total of 18g/mole. One liter of water has about 55.8 moles of water. If there is one mole of an element (Ca) dissolved in one liter of water, then the solution is one molar Ca (1 mole/L) or 40.08g/L Ca. In some applications we are interested in the amount of charge of an element, molecule or compound. In that case we calculate the equivalents or moles x charge.

10 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Example One mole of CaCl2 is equal to (40.08 g/mole x 1) for Ca and (35.45 g/mole x 2) for Cl for a total of 110.98 g/mole. However, if 110.98 g of CaCl2 is dissolved in one liter of water (40.08 g/l and 70.9g/l Cl), there are two equivalents of Ca (1 mole x 2 charges) and two equivalents of Cl (2 moles x 1 charge) in solution.

Review of Basic Thermodynamics The formalism that allows us to relate mass actions equations (balanced chemical reactions) to actual solutions is called chemical thermodynamics or more precisely, equilibrium thermodynamics. The concept was developed over the last 100 years and is constantly being refined. Thermodynamics is the study of heat transfer. The linkage between heat transfer and chemical mass balance equations is not intuitive and, in fact, cannot be derived from either physical or chemical first principles. Rather it is a functional approach that has value because it often works well, particularly at higher temperatures (>100°C). The basic idea is that elements, molecules and compounds all contain some internal energy and that all systems try to reach a state where that energy is minimized (equilibrium). Natural systems, particularly low temperature systems, do not always reach equilibrium, but they do move in that direction. The internal energy of an element, molecule or compound is expressed as its enthalpy or internal heat. The “free energy of an element is an element, molecule or compound is the sum of its internal heat and its internal tendency toward disorder (entropy). G = H – TS Assuming constant T and P we get ΔG = ΔH – T ΔS The total free energy of a component in the system is dependent on this inherent energy of an element, molecule or compound and the amount (concentration). When two or more elements, molecules and compounds are combined, the result is a reaction that minimizes the energy of the new system, lowering the ΔG. The free energy of a reaction is calculated by: ΔG0 rxn. = ∑ΔG0 products - ∑ΔG0 reactants The ΔG0 values (standard free energy) for many compounds can be found in the back of textbooks such as Drever. This way we can calculate a ΔG value for any reaction that for which we can write a balanced chemical equation. The minimum energy state (equilibrium) between the reactants and products is related to the ΔG value by: log Krxn. =

-ΔG0rxn. 2.303 RT

11 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

where:

R is the universal gas constant in kJ/mole T is the temperature in Kelvin And K is the equilibrium constant for the reaction

Mass Action Equations These equations are the conceptual basis for modern chemistry. Chemical interactions are represented as equations with reactants on the right and products on the left. Reactions are assumed to reach equilibrium (the point of lowest free energy in the system) when there is no change in concentration on either side. A set of equations is combined to represent a complex natural system where multiple elements in various combinations of pure elements and molecules and/or compounds of those elements coexist in a system. The system of equations is the simplest possible description that includes all the elements, compounds and phases (gas, liquid, solid). CaCO3 ↔ Ca2+ + CO32Note that the arrow in the calcite dissolution example goes in both ways, the reaction as written is reversible. Once a mineral reaches equilibrium with a solution, adding more mineral will not increase the dissolved concentration since we have already saturated the solution. But removing ions from the right side (e.g. lowering the concentration by dilution with distilled water), will cause more mineral to dissolve. If we add more ions to solution, more calcite will precipitate until the balance between ions and solid is restored. This is referred to as Le Châtelier’s Principle. The reaction above is for one mole of calcite dissolving to form one mole of calcium cation and one mole of carbonate anion. The reaction must be balanced with the same number of moles of each element and the same moles of charge on each side of the equation. The dissolved calcium and carbonate are often referred to as dissolved species. This reaction is the dissolution of calcite (reactant(s) to product(s), left to right). We express this in a mathematical form where, at equilibrium, the ratio of the concentration of reactants (on the bottom) and products (on the top) is equal to K, known as the proportionality constant or distribution coefficient or equilibrium constant.

Kcal = [Ca2+] [CO32-] [CaCO3] The value for Kcal at 25°C is 10-8.48 in most books (Table 3.1 in Drever). We know that the K values are dependent on temperature and pressure. For instance, as temperature increases, calcite becomes less soluble (retrograde solubility) and the K value is smaller.

12 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Example of temperature-dependent equilibrium constants, modified from Drever, 1999. The typical range of values for equilibrium constants, concentrations, etc. used in geochemistry is very large (10+ orders of magnitude), so we often use the log of a value and since many values are very small (10-5), we use the convention of p, where p = -log. For example: pH = -log a H+ pe = -log a epK = -log K In the case where the reaction is written as the dissolution of a solid (mineral), the K is called the solubility product or Ksp.

Mineral Halite K-feldspar Hematite Calcite K-mica Pyrite Dolomite Gypsum

Table 2. Common mineral Ksp values. Formula Kdissolution 1.58 NaCl 10 KAlSi3O8 10-3.98 Fe2O3 10-20.57 CaCO3 10-4.01 KAl3Si3O10(OH)2 10-59.38 FeS2 10-18.45 CaMg(CO3)2 10-16.54 CaSO4 10-4.58

13 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

pK -1.58 3.98 20.57 4.01 59.38 18.45 16.45 4.58

Saturation Index One advantage of the mass action formalism is that we can express the degree of solution saturation relative to the saturated condition as an index. In order to calculate the degree of saturation, PHREEQC calculates the ion activity product (IAP) of the actual solution (the numerator of the dissolution reaction expression) and uses that quantity and the solubility constant (Ksp) to compute the SI. Saturation Index (SI) =

IAP Ksp

For instance, in the case of calcite solubility we can see that if the activity of Ca 2+ x CO32in a solution is less than 10-8.48 at 25°C (see table above), then the solution is undersaturated with respect to calcite. In PHREEQC the SI is reported in units of log SI, so SI = 0 is saturated and SI >0 is super-saturated and SIatmospheric value) pH 7 temp 25 EQUILIBRIUM_PHASES Calcite 0.0 1 CO2(g) -1.5 END

PHREEQC output file --------------Description of solution---------------------------pH

=

6.971

Charge balance

22 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

pe

=

-0.660 Adjusted to redox equilibrium Activity of water = 1.000 Ionic strength = 7.282e-03 Mass of water (kg) = 1.000e+00 Total alkalinity (eq/kg) = 5.004e-03 Total CO2 (mol/kg) = 6.071e-03

Temperature (deg C) = 25.000 Electrical balance (eq) = -1.075e-10 Percent error, 100*(Cat-|An|)/(Cat+|An|) = -0.00 Iterations = 16 Total H = 1.110124e+02 Total O = 5.552086e+01

------------Distribution of species---------------------------Species Molality

Log Molality

Activity

Log Activity

H+ OHH2O

1.159e-07 1.070e-07 -6.936 -6.971 1.025e-07 9.358e-08 -6.989 -7.029 5.551e+01 9.999e-01 -0.000 -0.000 C(-4) 8.606e-30 CH4 8.606e-30 8.620e-30 -29.065 -29.064 C(4) 6.071e-03 HCO3- 4.883e-03 4.476e-03 -2.311 -2.349 CO2 1.075e-03 1.077e-03 -2.969 -2.968 CaHCO3+1.052e-04 9.640e-05 -3.978 -4.016 CaCO3 5.556e-06 5.565e-06 -5.255 -5.255 CO3-2 2.778e-06 1.962e-06 -5.556 -5.707 Ca 2.502e-03 Ca+2 2.391e-03 1.688e-03 -2.621 -2.773 CaHCO3+ 1.052e-04 9.640e-05 -3.978 -4.016 CaCO3 5.556e-06 5.565e-06 -5.255 -5.255 CaOH+ 2.864e-09 2.619e-09 -8.543 -8.582 H(0) 3.377e-16 H2 1.689e-16 1.691e-16 -15.772 -15.772 O(0) 0.000e+00 O2 0.000e+00 0.000e+00 -60.837 -60.837

Log Gamma -0.035 -0.040 0.000 0.001 -0.038 0.001 -0.038 0.001 -0.151 -0.151 -0.038 0.001 -0.039 0.001 0.001

----------------Saturation indices------------------------------Phase Aragonite Calcite CH4(g) CO2(g) H2(g) O2(g)

SI log IAP -0.14 0.00 -26.22 -1.50 -12.58 -57.94

-8.48 -8.48 -70.14 -19.65 -12.62 25.24

log KT -8.34 -8.48 -43.91 -18.15 -0.04 83.19

CaCO3 CaCO3 CH4 CO2 H2 O2

We can also add calcite in a series of steps to the solution and see the changes for each step. For this we use the REACTION command (input file 1e). This is the first example of a simple reaction path calculation. A reaction path model uses speciation calculations to make forward predictions of changes in water and rock (dissolution/precipitation) along reaction path (specified change in T, P, pH, new reactants). 23 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

The figure below shows a conceptual diagram where the system can be altered by adding or subtracting mass of heat, or composition or controlled by contact with another reservoir that buffers change. Reaction path models operate by first calculating the equilibrium condition of the specified system, then the program changes the condition (e.g. temperature, composition) by a small increment and calculates the new equilibrium condition. Then the next step uses the last step as the starting point until the end of the path is reached. In the example below, the increments along the reaction path are specified. A good way to visualize this is the addition of base to a solution (titration) to change the initial acidic pH of 2 to a value of 12 with a calculation made for each drop of acid added. During the process, the solution may have minerals precipitate or dissolve, gas content increase or decrease, etc. This method is used to model many real world processes of interest such as mixing of fluids, dissolution of minerals, changes in temperature, Eh, pH, fugacity or concentration of a particular species. PHREEQC differs from other reaction path models such as Geochemist’s Workbench and EQ6 in that does not automatically allow mineral precipitation and dissolution along the reaction path unless specified and then only those minerals specified by the user.

Conceptual diagram of the reaction path model from Bethke (1996).

24 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

TITLE pH example SOLUTION 1 pure water & calcite pH 7 temp 25 REACTION

Calcite 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 SELECTED_OUTPUT -file N1dout.csv -molalities Ca+2 HCO3- CO3-2 END

Note we have added another new command, SELECTED_OUTPUT to the input file above (input file 1e). This writes user-selected portions of the regular output file to a comma-delimited text file. In this example we have named the output file ‘N1dout.csv’; the suffix means comma-separated-values. This command allows us to manage the large amount of data that is generated by multiple simulations. The output file still contains the complete output of each simulation. The command is discussed in more detail below. We can also start to use the grid function in PHREEQC. This function allows us to view and plot the data in the selected output file from within the PHREEQC shell. This command crates a comma separated value (CSV) file named N1dout.csv that can be opened using the Grid tab. The gird output file should have been written to the default folder that you set. Opening the file under the Grid tab will create a window that looks like this:

The columns on the far right will contain the parameters you listed, in this case the molalities for Ca+2, HCO3- and CO3-2. This feature can be very useful for exporting to a spreadsheet program for plotting and analysis of the calculated values. You can also use the Chart tab in PHREEQC to plot values and export the chart to another text or graphic program. To plot the values from the Grid tab on the Chart tab, select the desired values and use the right hand button to select Plot in Chart. The left hand column will be the x25 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

axis and the other parameters will be plotted on the y-axis. The chart format can be edited to suit your taste and the entire chart exported by choosing Edit » Copy chart » Copy as Bitmap or Copy as Metafile. Metafiles are vector based files that can be scaled without loss of resolution. This last simulation added calcite to pure water and reached saturation in the first step; the addition of 0.1 moles to the 1 kg of solution completely saturates the solution. The second step adds 0.2 moles of calcite (20 g) to a different 1 kg of solution and so on, in effect making 10 different simulations. Sometimes you want to add increments of a reactant to the same solution. In that case, use the INCREMENTAL_REACTIONS command rather than REACTION. An example is considered below. First, graph the results of the REACTION simulation after you add the subcommand saturation_indices line to the SELECTED_OUTPUT command block. Use the input menu to add the command by clicking on the plus by the SELECTED_OUTPUT command on the right hand side of the window and by double-clicking on the term. This will insert the term into the input file wherever the cursor is located. We can see that we have reached saturation with respect to Calcite very quickly. Suppose you want to approach saturation more slowly simulating a titration and watch the change in pH as you add Calcite in increments to a single solution. You can first reduce the amount of calcite added by changing the numbers specifying the amounts added or by changing the units. For instance, we can and reduce the amount of calcite by making the input mmoles rather than moles (the default). Then change to input file by adding a new line “INCREMENTAL_REACTIONS true” to the input file. The modification should look like this (input file incremental): TITLE pH example SOLUTION 1 pure water & calcite pH 7 temp 25 INCREMENTAL_REACTIONS true REACTION Calcite 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 mmoles SELECTED_OUTPUT -file N1dout.csv -molalities Ca+2 HCO3- CO3-2 -saturation_indices Calcite END

This simulation adds 1 mmole of calcite to a single kg of water in 0.1 mmole steps. We can look at the grid file and see that the incremental simulation does not reach equilibrium until the third step. That’s still pretty fast, so we could change the INCREMENTAL_REACTIONS line back to false (the default) and give up or change the amount again to a smaller value to make the change slower.

26 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

This brings up an important point about PHREEQC input files. If something is not explicitly written, the program assumes that function is set to default. The INCREMENTAL_REACTIONS command in is only meaningful when the command is set to not be the default term (false). Another words, you can either remove the INCREMENTAL_REACTIONS line or set it to false for the same effect. Sometimes if your input file is not doing what you expected, you may have a default issue. All the commands and sub-commands are defined in the PHREEQC manual under the Description of Data Input chapter in the Keywords section. You can open the manual from your input window under the help menu. It should look like the picture below. The PDF manual is an essential resource for using this program. All the keywords are described, the default conditions listed and examples of their use given.

At this point you can run the simulation and plot the output. The plot should look something like the one below.

27 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Calcite and pure water 2

Calcite log SI

si_Calcite

1

0

-1

-2 9

10

11

pH

Next we will use an alternative formulation of the REACTION command to add the reactant to the system in smaller steps (input file 1f). TITLE pH example SOLUTION 1 pure water & calcite pH 7 temp 25 REACTION Calcite 1.0 moles in 50 steps SELECTED_OUTPUT -file reaction1out.csv -molalities Ca+2 HCO3- CO3-2 END

Finally we can add both calcite and CO2 gas to the system at the same time (input file 1g). TITLE pH example SOLUTION 1 pure water & calcite & CO2 gas pH 7 temp 25 REACTION Calcite CO2(g) 1.0 moles in 50 steps SELECTED_OUTPUT -file reaction2out.csv -molalities Ca+2 HCO3- CO3-2 END

We have now calculated the concentration of Ca and CO3 in a solution in equilibrium with calcite at 25°C. This is a real world example where there is likely to be atmospheric gases in contact with the solution. To represent this situation, we needed to add another component, CO2 gas. Note that in our simulations we have calculated a value for the dissolved CO2, CO2(aq) and the theoretical pressure of CO2 gas in an atmosphere that 28 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

would in equilibrium with the aqueous system. Those quantities are listed under Aqueous Species and Gases, respectively. The gas value is in units of fugacity (partial pressure). The value of 0.88 means the atmosphere would have to be 88% CO2 to be equilibrium with our solution, not a likely condition. In fact, the fugacity or partial pressure of CO2 in the atmosphere is about 10-3.4. The interactions between water (H2O) and dissolved calcite produced several other aqueous forms of Ca and CO3 (species). The CO32- is related to HCO3- and H2CO3 by a series of equilibrium equations. The total of dissolved carbonate species is referred to as “carbonate alkalinity”. A complete description of the system requires us to include additional chemical equations: CO2(g) ↔ CO2(aq) CO2(aq) + H2O ↔ H2CO3 H2CO3 ↔ H+ + HCO3HCO3- ↔

H+ + CO32-

The equilibrium constants for these reactions are usually labeled KCO2, K1, and K2, respectively. The reaction of CO2 (aq) to form H2CO3 is usually combined with the CO2(g) to form CO2(aq) reaction and the sum of the reactions has the constant KCO2. These equations, together with the dissolution of calcite equation if calcite is present, can be used to describe the carbonate system. Alkalinity It is worthwhile to briefly discuss the concepts of alkalinity and pH at this point. The alkalinity value reported for water samples is determined from a titration of the water sample with H2SO4, and is reported as meq/l or eq/l CO3, meq/l or eq/l HCO3 or meq/l or eq/l CaCO3. Alkalinity is actually equal to total HCO3- +CO32- + any other weak acids that are negatively charged at natural water pH values of 7 to 10 (usually boron and organic acids). This value is calculated by measuring the number of equivalents of acid needed to change the water sample (of known volume) from its starting pH to a pH of 4. So eq/l of H+ used = eq/l of alkalinity in the water. Sometimes this data is further converted to eq/l or mg/l of HCO3 and /or CO3 using the pH of the water and assuming that the ratio of HCO3/CO3 is a function of pH (10-10.3 = CO32- * H+/HCO3-). It’s probably easier to use PHREEQC to simulate an alkalinity titration to help understand than read complicated explanations. Use the following input file to simulate the alkalinity titration (input file titration 1). The plot shows the change in pH with addition of H2SO4. The pH of the solution does decrease, but there are two flat areas where the buffering effect of the conversion of 1) CO3-2 to HCO3- and 2) HCO3- to H2CO3 (CO2) in the standard PHREEQC database consume protons supplied by the sulfuric acid. This simple simulation shows the concept of pH buffers as well as the alkalinity titration. 29 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

SOLUTION 1 Simplified Mt. Edna Solicchiata units mg/l pH 9.90 pe -0.2 density 1.00 temp 17.2 C(4) 1180 as HCO3 Ca 28.1 Cl 238 charge Fe 0.150 K 30.1 Mg 214 Mn 0.0277 Na 250 S(6) 20 Si 79.4 as SiO2 Sr 0.673 REACTION H2SO4 0.02 moles in 50 steps SELECTED_OUTPUT -file titration1.csv -reaction true END

Alkalinity Titration 10 pH

8.4

pH

6.8

5.2

3.6

2 0

0.004

0.008

0.012

0.016

0.02

moles H2SO4 added

30 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Fixed pH Sometimes it is useful to specific a fixed pH during a batch reaction simulation. Normally, PHREEQC does not fix pH during a reaction step since the concentration (or more correctly, the activity) of the hydrogen ion will vary with reaction. However, we can fix the pH by adding another component to the system as a pH buffer “phase”. First you need to add a new “phase” that will serve as a pH buffer. PHASES Fix_H+ H+ = H+ log_k 0.0

The EQUILIBRIUM_PHASES command below add the new “phase” to system where it will reach a saturation index for H+ of 10-4.5 using HCl to achieve that saturation index by adding up to 10 moles of HCl. This is a somewhat roundabout way to achieve the desired result. Other programs such as MINTEQ and GWB allow the user to specify fixed pH directly. SOLUTION the solution composition follows EQUILIBRIUM_PHASES 1 Fix_H+ -4.5 HCl 10.0 END

The pH Sweep In order to try out the pH sweep concept let’s make a plot of inorgainc carbonate speciation with pH. This is also known as the Bjerrum plot. You can start with the input file below (input file pH sweep). TITLE pH Sweep example SURFACE_SPECIES SOLUTION 1 -units mmol/kgw pH 8.0 Zn 0.0001 Na 1500 charge Cl 2500 C(4) 250 as HCO3 # # Model definitions # PHASES Fix_H+ H+ = H+ log_k 0.0 END SELECTED_OUTPUT -file pHsweep -molalities Zn+2 HCO3- CO3-2

31 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.0 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.25 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.5 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.75 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -6.00 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -6.25 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -6.50 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -6.75 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.00 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.25 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.50 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.75 NaOH 10.0 END USE solution 1 EQUILIBRIUM_PHASES 1 Fix_H+ 8.00 NaOH 10.0 END

32 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

After running the file make the plot below. This is going to take a few tries so take your time and ask questions of those instructors. Hint: check the speciation of the inorganic carbon species.

Molarity

Inorganic Carbon Speciation 10.00000001 9.00000001 8.00000001 7.00000001 6.00000001 5.00000001 4.00000001 3.00000001 2.00000001 1.00000001 0.90000001 0.80000001 0.70000001 0.60000001 0.50000001 0.40000001 0.30000001 0.20000001 0.10000001 0.09000001 0.08000001 0.07000001 0.06000001 0.05000001 0.04000001 0.03000001 0.02000001 0.01000001 0.00900001 0.00800001 0.00700001 0.00600001 0.00500001 0.00400001 0.00300001 0.00200001 0.00100001 0.00090001 0.00080001 0.00070001 0.00060001 0.00050001 0.00040001 0.00030001 0.00020001 0.00010001 9.001E-5 8.001E-5 7.001E-5 6.001E-5 5.001E-5 4.001E-5 3.001E-5 2.001E-5 1.001E-5 9.01E-6 8.01E-6 7.01E-6 6.01E-6 5.01E-6 4.01E-6 3.01E-6 2.01E-6 1.01E-6 9.1E-7 8.1E-7 7.1E-7 6.1E-7 5.1E-7 4.1E-7 3.1E-7 2.1E-7 1.1E-7 1E-7 9E-8 8E-8 7E-8 6E-8 5E-8 4E-8 3E-8 2E-8 1E-8 9E-9 8E-9 7E-9 6E-9 5E-9 4E-9 3E-9 2E-9 1E-9

m_CO2 m_HCO3m_CO3-2

4

5

6

7

8

9

10

11

12

pH

Titration of AMD This example covers the simulation of a standard cold titration for acidity when the solution has low initial pH. An important feature to note is that a solution with a pH value below 5 will not have little or no alkalinity as determined by the standard titration. That is because the standard alkalinity titration measures HCO 3+CO3 and at pH 5 there is almost no HCO3. That does not mean there is no inorganic carbon, but that the form (species) is predominantly H2CO3 as we saw above. In the case of AMD or other acidic solutions we are trying to measure acidity. The titration is usually done with a standard basic solution such as 5N NaOH. The following input file will simulate the titration of an acidic solution (input file AMD titration 1): TITLE example of titration of AMD solution SOLUTION 1 units ppm pH 3.499 density 1.00 temp 25.0 Al 1.237 As 3.25 C(4) 5.87 as HCO3

33 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Ba 0.054 Ca 5.16 Cl 0.994 Cu 0.041 F 0.142 Fe 23.19 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 S(6) 82.65 charge Zn 0.501 REACTION NaOH 0.001 mole in 50 steps SELECTED_OUTPUT -file AMDtitration.csv -reaction true END

You can plot the change in pH with addition of the NaOH solution. There are many options you can add to this simulation such as opening the system to the atmosphere, letting mineral surfaces precipitate that will sorb solutes from solution, etc.

AMD Titration 10

8.6

pH

7.2

5.8

4.4

3 0

0.0002

0.0004

0.0006

0.0008

moles NaOH added pH

34 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

0.001

Introduction to Kinetics All the batch reactions can be given a kinetic rate. This feature allows a forward model that has an outcome depend on time. Kinetic models require two commands, KINETICS and the linked RATE commands. The following example PHREEQC input file (Kin1) shows the kinetically controlled dissolution of calcite. In this case we approach saturation with respect to calcite in about ten days. TITLE Kinetic example SOLUTION 1 pure water & calcite pH 7 temp 25 KINETICS 1 Calcite dissolution

Calcite -m 7.e-4 -m0 7.e-4 -parms 5.0 0.3 -tol 1.e-8 -steps 10000 25000 50000 100000 200000 500000 750000 # seconds -step_divide 100 RATES Calcite -start 1 rem M = current number of moles of calcite 2 rem M0 = number of moles of calcite initially present 3 rem PARM(1) = A/V, cm^2/L 4 rem PARM(2) = exponent for M/M0 10 si_cc = SI(“Calcite”) 20 if (M 0 then t = M/M0 90 if t = 0 then t = 1 100 area = PARM(1) * (t)^PARM(2) 110 rf = k1*ACT(“H+”)+k2*ACT(“CO2”)+k3*ACT(“H2O”) 120 rem 1e-3 converts mmol to mol 130 rate = area * 1e-3 * rf * (1 - 10^(2/3*si_cc)) 140 moles = rate * TIME 200 SAVE moles  end SELECTED_OUTPUT -file Kin1out.csv -molalities Ca+2 HCO3- CO3-2 -saturation_indices Calcite END

35 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

The KINETICS command specifies what reaction will be time dependent, the amount of reactant, the total time and the number of steps that the model takes during that total time. The m is the current number of moles of reactant, m0 is the initial number of moles. M is usually equal to m0 by default. The steps subcommand refers to the time (in seconds) over which the rate is integrated. In this example the first integration takes place over 10,000 seconds, then as an independent reaction, the next step takes place over 25,000 seconds. You can choose to make the time steps incremental by using the INCREMENTAL_REACTION keyword. In the example that would make the reaction run for 10,000 seconds and produce results and then more results after 25,000 seconds and so on. The time step subcommand means that the first step of 10,000 seconds will be divided into 100 smaller sections (100 seconds each) and the results integrated to produce the result at 10,000 seconds. The RATE command is the BASIC code block that enables the kinetic simulation. This command block is taken from the examples at in the standard database. The example BASIC rate command blocks can be found at the end of the database files. While this is somewhat clunky, it does have the advantage of being almost infinitely flexible. The kinetic values for the dissolution and precipitation reactions of common minerals are the subject of extensive literature. In general, most experimental work produces rates that are much faster than field-derived rates by a factor of as much as two orders of magnitude. Therefore, the reality is that the kinetic rate is a major source of uncertainty in modeling. A more complete discussion with some relevant examples will be covered later in the manual.

Table 3. Rates of dissolution , surface area, effective surface area and surface area modified values used in kinetic modeling. Effective surface area is relative measure. Andesite

Literature values

Adjusted for Field

Minerals Qtz Smectite-high-Fe-Mg Pyrite Hematite Biotite K-Feldspar Chlorite-ss Plagioclase

mol/cm2-s 4.10E-18 2.3E-19 3.05E-14 3.05E-14 7.90E-15 1.67E-16 6.70E-13 5.60E-13

mol/cm2-s 4.1E-21 2.3E-22 3.05E-17 3.05E-17 7.9E-18 1.67E-19 6.7E-16 5.6E-16

36 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

effective SA 0.03 0.03 0.03 0.03 50 50 50 50

All the reactions we have considered have assumed equilibrium. As discussed earlier, many reactions rates are fast enough that this assumption is sufficient. However, some near surface processes involve physical transport rates that are as fast, or faster than the chemical reactions. When we reach this condition we need to describe the chemical processes using kinetics, that is give the reaction a rate and fix the time period of the simulation. PHREQC can incorporate several types of kinetic reactions including dissolution/precipitation of minerals, redox reactions and microbial metabolism. You access the kinetic functions through the KINETICS and RATE commands. The kinetic option is also able to model multiple simultaneous reactions. Thus far we have been expressing the rates using the built-in rate expressions. The most typical formulation is written as, r

=

As k+ [1-Q/K]

In this case, r is the reaction rate (mol/sec), As is the surface area in cm2, k+ is the rate constant (mol/cm2 sec), Q is activity product and K is the equilibrium constant. This formulation will work for dissolution or precipitation with rate linked to saturation state (Q/K). This formulation is not temperature dependent. Alternatively, the user can supply the activation energy and pre-exponential factor to create a temperature-dependent rate based on the Arrhenius formulation. rate (k)

=

Ao e-Ea/RT)

where: Ao is the pre-exponential factor (time-1) Ea is the activation energy (KJ/mole) T is temperature in kelvins R is the universal gas constant

Even this treatment of pyrite kinetics can be very simplistic. In fact, the reaction is pH dependent as are rates for other common minerals such as calcite (see figure below). Measured rates for most mineral reactions have reported rates that vary 10-50-fold depending on a number of variables such as solution composition, pH and grain size. In addition, mineral reaction rates measured in the field are usually several orders of magnitude slower than laboratory rates. The figure below shows some experimental data that can be used to formulate pH dependent rate expressions.

37 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Figure 9.1 Pyrite rate experiment figure modified from Singer and Stuum (1970), Calcite rate experiment figure modified from Plummer and others (1978) showing the rate dependence on pH. More complex treatments for calcite dissolution include using rates fitted to the empirical expression: r

k (A/V) (1 – Q/K)n

=

where A is surface area, V is solution volume, and n and k are coefficients dependent on solution composition. The coefficients are obtained by fitting experimental data. Mechanistic models such as those of Plummer and others (1978) are more complex. Their model used the expression: r (mmol/cm2 sec) =

k1[H+] + k2[H2CO3*] + k3[H2O] - k4[Ca2+][HCO3-]

where the first three terms are the forward rate and the last is the backward rate to explain the experimental data with values (Appelo and Postma, 1993). The reaction is also temperature dependent. Evaluation of the expression has shown that the first term is dominant at pH values below 5. If we were interested in the rates of acidic solutions only, we might implement the more complex formulation to more accurately model the process. Using the input file below (input file pyr_kin 1Y), the rate of reaction is a function of pH, O2, etc. You can run this file and examine the grid file created. The file has a starting pH of 7.3. Based on what we have seen about pH dependency, we expect little change over the time. Alternatively, you can change the starting pH to 3.3. Running the acidic simulation will produce essentially no change over the same time period. This brings up 38 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

the whole problem with kinetic values determined in laboratory conditions. In the case of pyrite oxidation, the rapid process that is observed in the field is controlled by microbial reactions that increase the rate of reaction several orders of magnitude. You can test the sensitivity of rate by changing the value in line 20 from -10.19 to -6.19, a 10,000 fold increase. Now there is a difference between the acidic and alkaline simulations, however since the microbes in question are acidophiles (acid-loving), how can you justify using the pH dependent rate law if the higher rate is only applicable in acidic environments. This leads to yet more complex rate laws where rates are dependent on external variables such as pH that are themselves a function of the reactions we want to model. One approach to dealing with this is to examine the system to be modeled to determine if the kinetic approach is necessary. For instance, we can need to decide if 1) the rate of flow through a system is so fast that little reaction can occur. This rate of reaction versus rate of transport can be quantified using the Damköhler and Peclet numbers. The Damköhler number is the ratio of the rate of reaction versus the rate of transport and is defined as:

Da

=

x S anH+ L/ ceq

And the Peclet number is a measure of the importance of advection versus dispersion + diffusive transport and is defined as:

Pe where

aH+  S L ceq Deff D n x

=

 L/ Deff + D

is the activity of the hydrogen ion is the Darcy velocity is the specific surface (in m2/m3 fluid) is the characteristic length is the equilibrium concentration the effective diffusion coefficient the dispersion coeeficient is the exponent for the hydrogen activity in the reaction is the stoichiometric coefficient for the component in the phase under consideration (e.g. 1 for SiO2 in quartz)

39 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

40 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

TITLE reaction of pyrite SOLUTION 1 units ppm pe 5 temp 10 pH 7.3 S(6) 50 as SO4 Cl 450 charge N(5) 100 as NO3 Fe 6 Zn 10 ppb C(4) 100 as HCO3 Na 500 K 4 Mg 50 Ca 400 EQUILIBRIUM_PHASES O2(g) -0.7 KINETICS 1 Pyrite -tol 1e-8 -m0 0.01 -m 0.01 -parms -5.0 0.1 .5 -steps 31536000 in 100 steps -step_divide 100000 INCREMENTAL_REACTIONS true RATES Pyrite -start 1 rem parm(1) = log10(A/V, 1/dm) 2 rem parm(3) = exp for O2

-0.11 # 1 year

parm(2) = exp for (m/m0) parm(4) = exp for H+

10 if (m = 0) then goto 200 20 rate = -10.19 + parm(1) + parm(3)*lm("O2") + parm(4)*lm("H+") + parm(2)*log10(m/m0) 30 moles = 10^rate * time 40 if (moles > m) then moles = m 50 if (moles >= (mol("O2")/3.5)) then moles = mol("O2")/3.5 200 save moles -end SELECTED_OUTPUT -file pyrite1_1y.csv -totals S Fe -kinetic_reactants Pyrite -equilibrium_phases Pyrite END

41 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Activity and Concentration Now it is time to take up the concept of activity. In the next exercise will modify the system by adding other solutes to the solution (input file 2). In this case we will add salt (NaCl) as the mineral halite by using the same formulation as we did for calcite. TITLE salt example SOLUTION 1 pure water & calcite & 1 mole of salt pH 7 temp 25 units g/l EQUILIBRIUM_PHASES Calcite 0.0 1 SELECTED_OUTPUT -file saltex.csv -molalities Ca+2 HCO3- CO3-2 -saturation_indices Calcite Halite REACTION Halite 1 mole in 20 steps END

Look at the output fie. The addition of salt to the system has increased the apparent solubility of calcite (there is more Ca and total carbonate in solution than the first example), but calcite is still exactly saturated (SI = 0). The result in the model can be duplicated in the lab. To allow for the effect of other ions in a solution in equilibrium with calcite, we employ a concept called activity. The activity is defined as the chemically reactive concentration and is related to the mass concentration by the activity coefficient (see equation below). Modified PHREEQC output file m_Na+ 0.0000e+00 4.9967e-02 9.9935e-02 1.4991e-01 1.9988e-01 2.4985e-01 2.9983e-01 3.4981e-01 3.9978e-01 4.4976e-01 4.9975e-01 5.4973e-01 5.9971e-01 6.4970e-01 6.9968e-01 7.4967e-01 7.9965e-01 8.4964e-01 8.9963e-01 9.4962e-01 9.9961e-01

m_Ca+2 0.0000e+00 2.0747e-04 2.5625e-04 2.9553e-04 3.2926e-04 3.5908e-04 3.8588e-04 4.1021e-04 4.3247e-04 4.5293e-04 4.7181e-04 4.8927e-04 5.0546e-04 5.2050e-04 5.3447e-04 5.4746e-04 5.5955e-04 5.7079e-04 5.8125e-04 5.9097e-04 6.0000e-04

m_HCO30.0000e+00 1.0208e-04 1.0522e-04 1.0612e-04 1.0605e-04 1.0547e-04 1.0458e-04 1.0350e-04 1.0229e-04 1.0099e-04 9.9645e-05 9.8262e-05 9.6857e-05 9.5442e-05 9.4024e-05 9.2608e-05 9.1198e-05 8.9799e-05 8.8413e-05 8.7041e-05 8.5686e-05

m_CO3-2 0.0000e+00 7.2017e-05 8.5882e-05 9.4736e-05 1.0103e-04 1.0573e-04 1.0934e-04 1.1217e-04 1.1441e-04 1.1618e-04 1.1758e-04 1.1869e-04 1.1954e-04 1.2020e-04 1.2068e-04 1.2101e-04 1.2121e-04 1.2131e-04 1.2132e-04 1.2124e-04 1.2109e-04

si_Calcite -999.9990 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

42 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

si_Halite -999.9990 -4.3593 -3.8058 -3.4843 -3.2565 -3.0796 -2.9347 -2.8118 -2.7048 -2.6100 -2.5249 -2.4474 -2.3763 -2.3106 -2.2494 -2.1921 -2.1382 -2.0873 -2.0390 -1.9931 -1.9493

The activity replaces the mass in the chemical equations. This concept allows the equilibrium constants for each reaction to have the same value regardless of interactions with the rest of the system by changing the activity as the other portions of the system change. For instance, the effective (chemically-reactive) concentration of Ca and CO3 is lowered as the Na+ and Cl- concentrations are increased allowing K to remain constant by reducing the activity coefficient. The relationship between mass and activity is: Concentration (in moles) x activity coefficient = activity, or [Ca2+] γ = aCa2+ Activity coefficients are usually less than one and get smaller with increasing ionic strength (total ions in solution). The activity coefficient (γ) is dependent on the ionic strength of a solution, where the ionic strength (IS) is the sum of all the charges in that solution. There are several different equations that relate the activity coefficient, and thus the activity of each species, to ionic strength such as Davies, Debye-Huckel, etc. Several are available in PHREEQC. These formulations are relatively accurate until the ionic strength of the solution exceeds about 100 molar (seawater is 10-0.22 M). At higher ionic strengths, the measured solubility of many minerals can only be explained if the activity coefficient is greater than 1. Higher ionic strength solutions are usually modeled using a different activity concept such as the Pitzer method. PHREEQC has a Pitzer option. Solid phases are generally given an activity of one (by definition) and gas concentrations are expressed as fugacity, which are equal to the partial pressure of the gas. For example, oxygen gas (O2) is 20% of the total atmosphere, thus PO2 = 0.2 or 10-0.7. The activity of water is usually close to one, but there are exceptions. The equilibrium constant equation for calcite dissolution using the full thermodynamic formalism is:

Kcal =

aCa2+ aCO32aCaCO3

These approximations allow us to calculate the aqueous speciation of ions, ions pairs, and aqueous complexes for which we have equilibrium constants. Equilibrium constant data has been gathered over the last 100 years and new data is constantly being added. There are limitations to the overall approach. One significant problem is that the approach works best for pure solid phases. For instance, quartz is SiO2 in the model, but quartz in nature always contains minor amounts of Al in the crystal lattice. The amount of Al in the SiO2 lattice will alter the solubility of the quartz. In fact, almost all minerals contain some small amount of additional elements. This complicates our calculations since we don’t know exactly how much of the extra elements there are and we don’t know precisely how much effect these minor or trace elements have on the solubility of the minerals. The problem has several approaches that employ some assumptions or fudge 43 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

factors. PHREEQC has a solid solution option that allows us to approximate the effect of including one additional element in a pure mineral (e. g. Zn in FeS2, pyrite).

Databases The PHREEQC program solves a set of simultaneous non-linear equations. These equations are in the form of the mass action reactions. The set of equations available for the program to use is compiled in the database (files under the calculation menu). If the element that you want to model is not in the database, the program cannot model that reaction (input file 4). SOLUTION 1 Mt. Edna Solicchiata units mg/l pH 6.90 pe -0.2 density 1.00 temp 17.2 Al 0.01 C(4) 1180 as HCO3 As 0.0019 Ba 0.0296 Ca 28.1 Cd 0.00026 Cl 238 charge Cr 0.0066 Cu 0.0018 Fe 0.150 K 30.1 Li 0.180 Mg 214 Mn 0.0277 Mo 0.0153 Na 250 Ni 0.0012 Pb 0.017 S(6) 128 Sb 0.00013 Se 0.0054 Si 79.4 as SiO2 Sr 0.673 U 0.0027 V 0.0283 Zn 0.0604 END

The equilibrium constants in the database for specific reactions are a source of potential error in any computer model. The constants for a reaction are determined by laboratory experiments or by calculation. The PHREEQC program allows the user to choose from four databases when using the activity concept or a separate database for the Pitzer activity model (used in high salinity problems). The four databases normally used are PHREEQC, WATEQ4f, LLNL and MINTEQ. The database can be modified by changing the constant value for a reaction, or by adding a new element and the reactions 44 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

for that element. The database file can be edited directly with a text editor. However, PHREEQC has the useful ability to accept database input as part of the input file. This way the syntax and the effect of the inclusion of new components can be evaluated without changing the database. An example is seen in the example PHREEQC file Ex1, which adds nitrate and ammonia, uranium and its dissolved species and the solid phase uraninite (which are missing from the database) to the calculation in the input file. TITLE Example 1.—Add uranium and speciate seawater. SOLUTION_MASTER_SPECIES N(-3) NH4+ 0.0 N SOLUTION_SPECIES NH4+ = NH3 + H+ log_k -9.252 delta_h 12.48 kcal  analytic 0.6322 -0.001225 -2835.76 NO3- + 10 H+ + 8 e- = NH4+ + 3 H2O log_k 119.077 delta_h -187.055 kcal  gamma 2.5000 0.0000 SOLUTION 1 SEAWATER FROM NORDSTROM ET AL. (1979) units ppm pH 8.22 pe 8.451 density 1.023 temp 25.0 redox O(0)/O(-2) Ca 412.3 Mg 1291.8 Na 10768.0 K 399.1 Fe 0.002 Mn 0.0002 pe Si 4.28 Cl 19353.0 Alkalinity 141.682 as HCO3 S(6) 2712.0 N(5) 0.29 as NO3 N(-3) 0.03 as NH4 U 3.3 ppb N(5)/N(-3) O(0) 1.0 O2(g) -0.7 SOLUTION_MASTER_SPECIES U U+4 0.0 238.0290 238.0290 U(4) U+4 0.0 238.0290 U(5) UO2+ 0.0 238.0290 U(6) UO2+2 0.0 238.0290 SOLUTION_SPECIES #primary master species for U #secondary master species for U+4 U+4 = U+4 log_k 0.0 U+4 + 4 H2O = U(OH)4 + 4 H+ log_k -8.538 delta_h 24.760 kcal

45 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

U+4 + 5 H2O = U(OH)5- + 5 H+ log_k -13.147 delta_h 27.580 kcal #secondary master species for U(5) U+4 + 2 H2O = UO2+ + 4 H+ + elog_k -6.432 delta_h 31.130 kcal #secondary master species for U(6) U+4 + 2 H2O = UO2+2 + 4 H+ + 2 elog_k -9.217 delta_h 34.430 kcal UO2+2 + H2O = UO2OH+ + H+ log_k -5.782 delta_h 11.015 kcal 2UO2+2 + 2H2O = (UO2)2(OH)2+2 + 2H+ log_k -5.626 delta_h -36.04 kcal 3UO2+2 + 5H2O = (UO2)3(OH)5+ + 5H+ log_k -15.641 delta_h -44.27 kcal UO2+2 + CO3-2 = UO2CO3 log_k 10.064 delta_h 0.84 kcal UO2+2 + 2CO3-2 = UO2(CO3)2-2 log_k 16.977 delta_h 3.48 kcal UO2+2 + 3CO3-2 = UO2(CO3)3-4 log_k 21.397 delta_h -8.78 kcal PHASES Uraninite UO2 + 4 H+ = U+4 + 2 H2O log_k -3.490 delta_h -18.630 kcal END

Using the rules specified in the PHREEQC manual, you can add any compound or element. For instance, PHREEQC databases do not presently include NAPL’s such as benzene. The following input will include benzene as a dissolved species (input file 4a). You need to look up or calculate and include the correct log k for the dissolution reaction based on the reported solubility. SOLUTION 1 ground water with benzene units ppm pH 8.1 density 1.00 temp 25.0 As 0.010 Cu 0.010 Pb 0.0002 Zn 0.050 Fe 0.010 Na 22.92 C(4) 67.0 as HCO3 Cl 3.6

46 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

S(6) 40 charge Ca 20.0 Mg 8.4 F 2.8 SOLUTION_MASTER_SPECIES Benzene Benzene 0.0 SOLUTION_SPECIES Benzene = Benzene log_k 0 delta_h 0 kcal PHASES Benzene Benzene = Benzene log_k -1.64 delta_h 0 kcal EQUILIBRIUM_PHASES CO2(g) -3.50 O2(g) -2.0 Calcite 0.0 1.0 Benzene 0.0 1.0 END

78.0

78.0

You should notice that the benzene specified in this modified database is an “element” in the sense that it is a basis species (SOLUTION_MASTER_SPECIES). It is not C 6H6. This formulation is decoupled carbon; the benzene does not have any relationship to the inorganic carbon or hydrogen in the model. This is the standard method to add organic compounds into PHREEEQC. The other option is to explicitly couple the benzene by giving it a chemical formula of C6H6. This is a non-trivial exercise, but can be important if you are trying to calculate the effect of benzene degradation on alkalinity. In the case of mining activities and related environmental problems the major limitations of the standard PHREEQC database and most of the other databases are lacking in the species of interest. In this case you can use the MINTEQ databases or add to your database of choice in order to create a custom database. For instance, you want to model a problem that involves cyanide. Try and run the input file below using the default database to investigate the speciation of a metal-rich solution in the presence of cyanide (CN-) (input file AMD solution). You can see that in the file below there is no cyanide so you will have to add it to the input file. The first thing you should do is see if the database includes cyanide either as a separate “element” or explicitly as CN-. If you cannot find cyanide in the default database then check other databases. Remember you can change databases using the Files command under the Calculations menu. In fact, the only database that contains cyanide is the MINTEQ database. In this case the cyanide is listed as an “element”, in effect it’s own basis species. This means that all reactions between cyanide and other elements must have a reaction in the database that has the formulation: Ag+ + cyanide- = Agcyanide

47 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Or obeying the rules for writing reactions for the standard PHREEQC compatible database: AgCyanate AgCyanate = Cyanate- + Ag+ log_k -6.6159 delta_h 13.175 kcal This reaction has a log K (equilibrium constant) and a temperature dependency (delta_h) term. Note it has to be charge balanced. If you look in the first set of datablocks in the database you will find the basis species and see that the element silver is defined as Ag+. This means that any reaction that includes silver has to be written using Ag + since the program forms a computational matrix of basis species to solve the equilibrium condition for the specified system. This is relevant when we are taking data for a reaction of interest from one database and putting it into our custom database. For instance, try and run the file below after adding 10 ppm cyanide using the default database. You will get the message: WARNING: Could not find element in database, Ag. Concentration is set to zero. WARNING: Could not find element in database, As. Concentration is set to zero. WARNING: Could not find element in database, Cyanide. Concentration is set to zero. Now switch to the MINTEQ database and run the simulation. Now the program can’t find Fe(OH)3, aka ferrihydrite. This problem is overcome by changing the name in the SELECTED_OUTPUT block to ferrihydrite. Checking the output file you see that you now have the speciation of cyanide and that the predominant species are hydrogen and silver cyanide. However, when you show this triumph to the boss, he says “I wanted to know about Moly as well”. Checking the database we see there is no Mo in the database. Checking the other databases you find Mo is included in the llnl database, but that the basis species for the electron is in terms of O2 not the e- that is in your custom database. This means that the reaction you want: Mo + 4H2O = MoO4-2 + 8H+ + + 6eEnds up looking like this in the llnl database: Mo +1.5000 O2 +1.0000 H2O = + 1.0000 MoO4-- + 2.0000 H+ log_k 109.3230 -delta_H -693.845 kJ/mol The log K for the reaction from the llnl database is not the correct value for the reaction you want although both describe the dissolution of the metal. This illustrates the difficultly in taking data from one database and putting it into another. The solution is to calculate the K for the reaction you want from the thermodynamic expressions as described earlier. 48 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

TITLE example of AMD solution SOLUTION 1 units ppm pH 3.499 density 1.00 temp 25.0 Al 1.237 Ag 2.56 As 3.25 C(4) 5.87 as HCO3 Ba 0.054 Ca 5.16 Cl 0.994 Cu 0.041 F 0.142 Fe 23.19 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(5) 0.02 Pb 0.0012 S(6) 82.65 charge Sr 0.052 Zn 0.501 SELECTED_OUTPUT -file cyanide.csv -molalities Fe+2 Fe+3 -saturation_indices Fe(OH)3(a) END

Managing the input and output PHREEQC has several useful features including one that allows you to read in large datasets from column and row text files. The input command for large datasets is SOLUTION_SPREAD. This command allows you to input a tab delimited file of rows and columns such as can be created from spreadsheet programs. The parameters are columns and the individual sample’s parameter values are rows. The first column must be sequential numbers identifying each sample, while the order of the other parameters (temp, pH, Ca, etc.) can be in any order. The column headers must be identical to the MASTER_SOLUTION_SPECIES just as in the normal input file. The last column is labeled description and contains an alphanumeric designation for each sample. This value will appear at the top of each output file. The output file will contain each sample in order. The example file (input file 4b) contains data from over 145 samples that were originally in worksheet format and then saved as a text file. Coupled with the SOLUTION_SPREAD command, users can rapidly input large sample sets and create comma-separated output files of specified results for plotting and analysis. 49 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Output from PHREEQC calculations can also be modified using the USER_PUNCH and USER_PRINT commands. The USER_PUNCH command allows further modification of any value written to the SELECTED_OUPUT file using BASIC code. For instance, molalities for solutes (e.g. Ca+2) can be converted to ppm and written to the output file, or printed using the USER_PRINT command.

The following file (input file 4c) shows an example of changing the parameters written to the selected output file. This is the same file that we used before (number 1g), but now the selected output file will be different. Run both files and examine the grid files produced to see that some parameters such as simulation, solution, etc., are no longer written to the file, while temperature is written. TITLE selected output example SOLUTION 1 pure water & calcite & CO2 gas (>atmospheric value) pH 7 temp 25 REACTION Calcite CO2(g) 1.0 moles in 50 steps SELECTED_OUTPUT file selout.csv reset true simulation false solution false temperature true time false reaction false END

50 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Introduction to Redox Basic Principles The example with O2 gas in the system caused a change in the pe value, which is a measure of the system redox state. The word redox refers to reduction-oxidation reactions. These are reactions that involve the transfer of electrons. One common example is:

Fe2+ ↔ Fe3+ + eThe formalism is the same, an equilibrium constant:

K = aFe3+ aeaFe2+ The thermodynamic formalism for the elements that can have more than one valence state under surface conditions (Fe, Mn, Cu, V, Se, As, etc.) is slightly different; using the Nerst equation: Eh = E0 + RT ln K nF where E0 is the standard potential of the reaction (found in the same tables as ΔG0 values). F is Faraday’s constant and n is the number of electrons in the reaction. Eh is the oxidation potential, which can be measured with an electrode. Thus, the oxidation /reduction potential (ORP) or Eh measurement has units of millivolts or volts. Positive values are termed oxidizing and negative are reducing. Negative values indicate an abundance of electrons, which can react to reduce oxidized compounds such as hematite (Fe2O3). Fe2O3 + 6H+ + 2e- ↔ 2Fe2+ + 3H2O And

K = a(Fe2+)2 a(H2O)3 a(H+)6 a(e-)2 aFe2O3 Assuming fixed pH, the reaction at equilibrium can be reduced to:

a(e-)2 =

a(Fe2+)2 K

where the activity of the electron ( or pe) is a function of the activity (concentration) of Fe2+ in equilibrium with hematite (Fe2O3). Analogous reactions can be written for other redox-sensitive elements. In PHREEQC, we use the pe value to express the Eh of a solution. PHREEQC converts a pe value to an Eh value using the formula: Eh = 2.303RT pe F

51 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Generally, the most significant components in the control of redox are (the presence or absence) oxygen and organic matter. Oxygen is the major electron acceptor in most natural systems, that is dissolved oxygen gas (valence state of 0) is reduced by addition of electrons, while another dissolved species is oxidized by giving up those electrons (e.g. ferrous iron Fe2+ going to ferric iron, Fe3+ and precipitating as Fe(OH)3). The most common manifestation of this coupled redox reaction is probably the oxidation of organic matter to carbon dioxide where organic carbon (valence of 0) is oxidized to CO 2 (valence of +4 for carbon) during aerobic decay. The presence of dissolved oxygen produces positive valued of pe or an oxidizing environment, while environments that can exclude or consume oxygen fasterthan it can be replaced have reducing conditions. The figure shows common terrestrial environments in pe-pH space.

Figure modified from Domenico and Schwartz, 1999. The formalism involving redox reactions is analogous to acid-base reactions. A reducing solution is one with a low pe value indicating a high concentration of electrons, and might be thought of as similar to an acidic solution with a high concentration of protons. We can carry the analogy farther and say the Eh of a solution is the sum of all reactions that consume or produce electrons. However, the analogy breaks down as acid-base reactions are generally very fast (seconds) and often reach equilibrium in natural systems, whereas redox reactions are often much slower, mediated by living organisms or organic compounds and often do not reach equilibrium in the natural system. Therefore the redox potential of a natural system is often a result of several competing reactions (mixed potential) that are not in equilibrium with each other and are trying to reach equilibrium at different rates. This means the Eh measured with a platinum 52 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

electrode will not reflect a single redox pair’s equilibrium, but the sum of all the redox reactions in solution. The figure below shows measured Eh versus that calculated from the relative abundance of various redox pairs that are present in solution. Note the measured Eh is usually not equal to the value calculated from a single pair. PHREEQC allows the user to set the pe value and thus, control the speciation of the redox-sensitive elements (RSE). Another option allows the speciation of RSE to be set by using known values for a redox pair such as nitrate and ammonia that we assume is dominant (controlling the other redox pairs). In most natural systems, the dominant redox element is oxygen. The strength of the oxygen reaction is much greater than other reactions, and until oxygen is removed from the system, other redox reactions are not very effective.

Figure from Lindberg and Runnels, 1984, Science, 225, p 925-927. The redox state of the system is particularly important in the behavior of metals. Many metals have more than one oxidation state (e.g. iron, manganese, arsenic, selenium, Zinc, etc.) and have very different solubility for the different oxidation states. A general rule is that the reduced from is more soluble and thus, more mobile. Examples other than iron include Mn, Pb, Zn, Cu, Co. However, sometimes the more oxidized form is more soluble (mobile). Examples of elements that are more mobile in the oxidized form include U, Mo, Se and As. Iron redox behavior is also important because iron forms solid precipitates such as Fe(OH)3, often called ferrihydrite or amorphous ferric hydroxide, when a reduced 53 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

solution is oxidized (usually by contact with the atmosphere). Ferrihydrite is a good adsorption surface and will remove many metals from solution. Ferrihydrite is gradually converted by de-hydration to limonite, goethite and finally, hematite. Principles of AMD Generation Acid mine drainage (AMD) is the result of surface weathering of sulfide mineral deposits. The sulfur in sulfide minerals such as chalcopyrite, sphalerite, galena, cinnabar, pyrite etc. is reduced (-1), and can be oxidized to sulfate (+6) by atmospheric oxygen. Reaction of sulfides, primarily pyrite, will generate an acidic solution: FeS2 + 15/4O2 + 7/2H2O ↔ Fe(OH)3 + 2SO42- + 4H+ The reaction can be described as follows: 1) Ferrous iron is converted to ferric iron (oxidation), 2) Insoluble Fe(OH)3 converts to limonite, etc., which forms a iron oxide cap (gossan), 3) S is converted from the reduced form (-1) to the oxidized form SO4 (+6) and oxygen is reduced (from 0 to -2), 4) The reaction produces H+ (AMD), associated metals that are highly soluble at low pH until the acid is consumed by weathering reactions with the surrounding rocks. The oxidation reaction of iron is slow enough (1000 days) and ferrous iron soluble enough that the iron may be fairly mobile. There are additional reactions involved such as: FeS2 + 14Fe3+ + 8H2O ↔ 15Fe2+ + 2SO42- + 16H+ which is fast or biologically-mediated oxidation of iron that may be even faster. AMD produces iron oxide/hydroxide deposits (rust coatings) and jarosite (MFe 3(OH)6(SO4)2, where M = K, Na, NH4, Ag and Pb), which is a yellow to brown colored mineral. Naturally occurring examples are found near hot springs and fumaroles. One consequence of commercial value is the supergene enrichment where the local acidic environment of pyrite oxidation can mobilize associated chalcophile elements such as Cu and Ag. The metals in solution will be carried downward by rain toward the water table and re-precipitate in un-weathered sulfide ore by replacement of Fe in pyrite with Cu and Ag. The results is a redistribution of the Fe-Cu-Pb-Zn sulfide into a Fe-rich gossan cap and with Cu, Ag, Pb and Zn concentrated under the gossan cap below the water table (Pb and Zn form insoluble carbonate and sulfate salts). Oxidation of AMD Solution In order to test the effect of oxygen on redox, we will use a reduced fluid, acid mine drainage and react the fluid with oxygen gas. This exercise will simulate adding O 2 gas to acid mine drainage (AMD), (input file 3). We do not specify an initial pe value for the solution, so PHREEQC uses the default value of 4. 54 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

TITLE example of oxidation of AMD solution SOLUTION 1 units ppm pH 3.499 density 1.00 temp 25.0 Al 1.237 As 3.25 C(4) 5.87 as HCO3 Ba 0.054 Ca 5.16 Cl 0.994 Cu 0.041 F 0.142 Fe 23.19 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(5) 0.02 Pb 0.0012 S(6) 82.65 charge Sr 0.052 Zn 0.501 REACTION O2(g) 0.001 mole in 50 steps SELECTED_OUTPUT -file oxexample.csv -molalities Fe+2 Fe+3 -saturation_indices O2(g) Fe(OH)3(a) END

Oxidation of Organic Matter Inclusion of organic matter into the system can be accomplished by adding organic matter as a phase that can be used in inverse modeling reactions. In this approach organic matter is represented by the simple formula CH2O. Note this reaction formulation explicitly links organic matter degradation to production of protons and electrons. PHASES CH2O CH2O + H2O = CO2 + 4H+ + 4elog_k 0.0

Using this formulation we can evaluate the control of solution redox by organic matter. In the formulation above, the organic C has a valance state of 0, while the carbon valance in CO2 is +4. In this case the equilibrium constant of the reaction is set to 1 (log 1 = 0). The input file (org deg example) specifies that the solution is first speciated, then two phases, CO2 gas and organic matter are added to the system and equilibrated. We can examine the effect of redox by noting the pe of the first solution, then the pe after the reaction step or the distribution of the dissolved redox sensitive elements such as Fe or S 55 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

in both solutions and the effect on the saturation indices of minerals such as Fe(OH) 3 (a), FeS (ppt) and pyrite. SOLUTION 1 Organic matter degradation units mg/l pH 6.90 density 1.00 temp 17.2 Al 0.01 C(4) 1180 as HCO3 Ba 0.0296 Ca 28.1 Cd 0.00026 Cl 238 charge Cu 0.0018 Fe 0.150 K 30.1 Li 0.180 Mg 214 Mn 0.0277 Na 250 Pb 0.017 S(6) 128 Si 79.4 as SiO2 Sr 0.673 Zn 0.0604 PHASES CH2O CH2O + H2O = CO2 + 4H+ + 4elog_k 0.0 EQUILIBRIUM_PHASES CO2(g) -3.5 CH2O 0.0 END

Specifying Redox Note that PHREEQC has the ability to calculate the Eh (pe) value if the concentrations for both members of a redox pair such as Fe3+/Fe2+ are specified (using the redox subcommand, see example below). The calculated pe value can be used to speciate any or all the other redox sensitive elements. This can become very complex as seen in Ex1 from the input files supplied with PHREEQC. TITLE Example 1.—Add uranium and speciate seawater. SOLUTION_MASTER_SPECIES N(-3) NH4+ 0.0 N SOLUTION_SPECIES NH4+ = NH3 + H+ log_k -9.252 delta_h 12.48 kcal  analytic 0.6322 -0.001225 -2835.76 NO3- + 10 H+ + 8 e- = NH4+ + 3 H2O

56 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

log_k 119.077 delta_h -187.055 kcal  gamma 2.5000 0.0000 SOLUTION 1 SEAWATER FROM NORDSTROM ET AL. (1979) units ppm pH 8.22 pe 8.451 density 1.023 temp 25.0 redox O(0)/O(-2) Ca 412.3 Mg 1291.8 Na 10768.0 K 399.1 Fe 0.002 Mn 0.0002 pe Si 4.28 Cl 19353.0 Alkalinity 141.682 as HCO3 S(6) 2712.0 N(5) 0.29 as NO3 N(-3) 0.03 as NH4 U 3.3 ppb N(5)/N(-3) O(0) 1.0 O2(g) -0.7 SOLUTION_MASTER_SPECIES U U+4 0.0 238.0290 238.0290 U(4) U+4 0.0 238.0290 U(5) UO2+ 0.0 238.0290 U(6) UO2+2 0.0 238.0290 SOLUTION_SPECIES #primary master species for U #secondary master species for U+4 U+4 = U+4 log_k 0.0 U+4 + 4 H2O = U(OH)4 + 4 H+ log_k -8.538 delta_h 24.760 kcal U+4 + 5 H2O = U(OH)5- + 5 H+ log_k -13.147 delta_h 27.580 kcal #secondary master species for U(5) U+4 + 2 H2O = UO2+ + 4 H+ + elog_k -6.432 delta_h 31.130 kcal #secondary master species for U(6) U+4 + 2 H2O = UO2+2 + 4 H+ + 2 elog_k -9.217 delta_h 34.430 kcal UO2+2 + H2O = UO2OH+ + H+ log_k -5.782 delta_h 11.015 kcal 2UO2+2 + 2H2O = (UO2)2(OH)2+2 + 2H+ log_k -5.626 delta_h -36.04 kcal 3UO2+2 + 5H2O = (UO2)3(OH)5+ + 5H+ log_k -15.641

57 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

delta_h -44.27 kcal UO2+2 + CO3-2 = UO2CO3 log_k 10.064 delta_h 0.84 kcal UO2+2 + 2CO3-2 = UO2(CO3)2-2 log_k 16.977 delta_h 3.48 kcal UO2+2 + 3CO3-2 = UO2(CO3)3-4 log_k 21.397 delta_h -8.78 kcal PHASES Uraninite UO2 + 4 H+ = U+4 + 2 H2O log_k -3.490 delta_h -18.630 kcal END

In the input file, the pe value is specified in the first portion of the input. This input pe is the default entry position. If no pe value is specified in this entry, then a default value of 4 is applied. Using the redox specifier overrides the input pe. The specified redox value will now be used to distribute the other redox species (e.g. Fe). In the example the redox is set to the dissolved oxygen/water couple. The concentration of dissolved oxygen can be used to calculate a pe value based on the equation discussed above. This value is further overridden by placing pe after the Mn entry. This will distribute the Mn species based on the initial pe value (8.451) rather than the value calculated from the dissolved oxygen concentration. Finally, the uranium redox species will be distributed based on the redox value calculated from nitrate/ammonia ratio. Example of Passive Treatment There are cases where the best treatment for alteration of water quality is to allow reactions between the water to be treated and natural components. One such case is the passive treatment strategy where acidic mine water is allowed to react with an aquifer or wetland containing organic matter, pyrite and carbonate. These are typical mineral found in a wetland where oxygen is generally consumed near the atmospheric-water interface. In this case we have made the judgment that the rates of reaction versus transport are similar and that there will be time-dependent reactions during transit. Therefore a kinetic model is appropriate. This judgment can be based on a strict quantitative analysis using the Damköhler and Peclet numbers or can be based on our experience. That is we know from observation that there is some degree of treatment in a wetland, but we may wish to develop a more rigorous estimate for regulatory review. We expect that the oxidation of organic matter by microbes will lower the oxygen content of the water and cause the oxidizing solution to become reducing. This will change the redox state of the metals and probably cause precipitation, hence treatment. The reaction with the carbonate (calcite) will change pH, which will also cause metals to precipitate as hydroxides. We are making assumptions about the flow rates by using 1 kg of solution, 0.01 moles of calcite, and 1 mole of pyrite and organic matter. In effect we are saying 58 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

that 1 liter of water flows through a matrix in 600 days composed of equal parts organic matter and pyrite with trace calcite. These types of constraints are usually based on knowledge of aquifer composition and porosity, flow rates calculated from Darcy’s Law, and composition of the fluid. The input file (input file passive treat) is an example of a complicated kinetic simulation will take some time to run on the average computer (a few minutes). We can take some time to examine the output and modify the simulation to investigate the factors that control the process. TITLE Degradation of organic matter and reduction of redox sensitive elements (600 days) SOLUTION 1 Leaching solution units ppm pe 4 O2(g) -0.7 temp 10 pH 2.3 S(6) 5000 as SO4 charge Cl 450 F 1 N(5) 100 as NO3 U 40 Fe 600 Zn 100 As 2 Mn 20 Pb 0.2 Ni 5 Cu 3 C 1 # added for calcite since there is no carbon otherwise Cd 1 Li 0.1 Na 500 K 4 Mg 50 Ca 400 Al 200 Si 50 SAVE solution 1 END USE solution 1 KINETICS 1 Calcite -tol 1e-8 -m0 1e-2 -m 1e-2 -parms 50 0.6 Organic_C -formula CH2O -tol 1e-8 -m0 1 -m 1 -steps 51840000 in 100 steps -step_divide 1000000

# mol/kgw # 600 days

59 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Pyrite -tol 1e-8 -m0 1 -m 1 -parms -5.0

0.1

.5

-0.11

RATES

# #

Calcite -start 1 rem parm(1) = A/V, 1/dm parm(2) = exponent for m/m0 5 if time > 8640000 then goto 200 10 si_cc = si("Calcite") 20 if (m 0 then t = m/m0 90 if t = 0 then t = 1 100 moles = parm(1) * 0.1 * (t)^parm(2) 110 moles = moles * (k1 * act("H+") + k2 * act("CO2") + k3 * act("H2O")) 120 moles = moles * (1 - 10^(2/3*si_cc)) 130 moles = moles * time 140 if (moles > m) then moles = m 150 if (moles >= 0) then goto 200 160 temp = tot("Ca") 170 mc = tot("C(4)") 180 if mc < temp then temp = mc 190 if -moles > temp then moles = -temp 200 save moles -end Organic_C -start 10 if (m m) then moles = m 200 save moles -end Pyrite -start 1 rem 2 rem

parm(1) = log10(A/V, 1/dm) parm(3) = exp for O2

parm(2) = exp for (m/m0) parm(4) = exp for H+

10 if (m = 0) then goto 200 20 rate = -10.19 + parm(1) + parm(3)*lm("O2") + parm(4)*lm("H+") + parm(2)*log10(m/m0) 30 moles = 10^rate * time 40 if (moles > m) then moles = m

60 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

50 if (moles >= (mol("O2")/3.5)) then moles = mol("O2")/3.5 200 save moles -end EQUILIBRIUM_PHASES Al(OH)3(a) Calcite Coffinite Jurbanite Kaolinite Pyrite Uraninite(c) 0 0

0 0 0 0 0 0

0 0 0 0 0 0

SELECTED_OUTPUT -file 3_degradation_organic_600days.csv -totals Fe(2) Fe(3) U(6) As(3) As(5) Cu(1) Cu(2) Mn(2) Mn(3) Mn(6) Mn(7) -molalities SO4-2 CaSO4 UO2+2 UO2SO4 CuCl2- Cu+ CuCl3-2 CuHCO3+ Cu+2 CuSO4 CuCO3 -saturation_indices Al(OH)3(a) Calcite Coffinite Jurbanite Kaolinite Pyrite Uraninite(c) -kinetic_reactants Organic_C Pyrite Calcite END

61 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Surface Reactions Sorption reactions, which include adsorption, desorption, chemisorption, etc. are a surface effect that can be modeled as electrostatic attraction of ions in solution onto charged surfaces, primarily clays and oxides. In clays, the surface charge is caused by structural conditions where the substitution of Al for Si in the crystal lattice creates a negative charge deficient on the surface. This charge deficient is thus intrinsic and independent of solution chemistry. In contrast, oxides of Si, Al and Fe have ionized surfaces depending on the pH of the solution.

OH

Neutral

OH2+ Acidic O-

Basic

The neutral or isoelectric point is different for different oxide surfaces. Thus, some of the surfaces in detrital sediment can be positively charged, while others are negatively charged at the same solution pH. Implicit Surfaces There are two basic approaches to describing surface properties depending on the material in question. The first is to use an empirical approach that describes the interaction between solute and all the various surfaces in a sample, but does not explicitly describe the electrical properties of the surface. This is the isotherm approach. We describe the sorption reaction as: Kd = [solid] [water] where Kd is the distribution or partitioning coefficient with units of L/kg and the concentration in the solid (Cs) is in units of mg/kg and the concentration in the solution (Cw) is in units of mg/L. Note this formulation is very similar to that of the equilibrium constant and like that formulation we assume that sorption reactions reach equilibrium in natural systems. In 62 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

general, this is true as sorption reactions are relatively fast (hours to days). The formulation is employed to provide an empirical description of the interaction of all the surfaces in a sample and a single solute. The formulation is employed for both organic and inorganic solutes. Strictly speaking the formulation does not accommodate multiple solutes found in a natural system since the experiments are conducted for single solutes only. The relationship is measured by mixing a known solution with a known volume of solid, and measuring the solution composition after equilibrium is reached (usually 12 to 48 hours). The simplest relationship between the amount of an element on the surface and that in the solution is linear. The plot of Cs versus Cw is called an isotherm. The value of Kd is temperature dependent. The slope of the plotted line is the Kd value. An example of formulating a linear Kd and pH-dependent sorption reaction is shown (taken from the PHREEQC website). To write PHREEQC code that will adsorb HAsO4-2 dependent on the pH of the cell solution and use a linear equation for Kd and pH with following form: Kd = .175*log(H+)+1.925 try the following. The key is defining the right mass-action equation for your Kd. Assuming you are sorbing HAsO4-2 and you want: Kd = [HAsO4-2sorbed]/[HAsO4-2], Use reactions HAsO4-2 + Sor = SorHAsO4-2 + .175 H+ The mass-action equation is as follows: K = ([SorHAsO4-2][H+]^.175)/([Sor][HAsO4-2]) or LogK = log[SorHAsO4-2] + .175log[H+] - log[Sor] - log[HAsO4-2] rearranging gives the following: (LogK + log[Sor]) - .175log[H+] = log[SorH2AsO4-] - log[HAsO4-2] If you define Sor = 1e100, and you want log Kd = log (1.925), then the log K for the reaction should be log(K) = -100 + log(1.925) = -99.72 Here are the surface data blocks that define the the pH dependent Kd reactions: SURFACE_MASTER_SPECIES Sor Sor SURFACE_SPECIES Sor = Sor log_k 0.0 Sor + HAsO4-2 = SorHAsO4-2 + 0.175H+ log_k -99.72 • no_check 63 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

• mole_balance SorHAsO4 SURFACE 1-15 linear arsenic adsoprtion Sor 1e100 1.0 1e100 There are more complex formulations for isotherms including the Freundlich isotherm, which has the form: Kd = [solid] [water]n where n is a fitted parameter. Usually the n value ranges between 0.7 and 1.1. While these formulations are good within the range of the data used to calculate the Kd, they are difficult to extrapolate to higher values. Both the linear and Freundlich isotherms assume that there are an infinite number of sorption sites, not the case natural surfaces. A more realistic formulation is the Langmuir isotherm that assumes a finite number of sorption sites. [solid] = αβ[water] 1 + α [water] where α is the sorption constant (L/mg) and β is the maximum amount of solute that can be sorped by the solid (mg/kg), called the cation exchange capacity (CEC). Again from the PHREEQC website: SORPTION WITH FREUNDLICH AND LANGMUIR ISOTHERMS: The following surface complexation reaction generates the correct mass-action equation for the Freundlich equation: Sites + n * C = SitesC

(2)

The mass-action equation for reaction (2) is: K = [SitesC] / ([Sites] * [C]^n)

(3)

The brackets indicate activity, which for a sorbed species is the fraction of sites the sorbed species occupies. Now q = m(SitesC), where m(SitesC) is the number of moles of C that is sorbed. [SitesC] = m(SitesC)/TOT(Sites), [Sites] = m(Sites)/TOT(Sites), m(Sites) is the number of moles of unoccupied sites, and TOT(Sites) is the total number of sorption sites. Substituting into equation (3) gives the following equation: K = {q/TOT(Sites)} / ({m(Sites)/TOT(Sites)} * [C]^n)

(4)

Canceling TOT(Sites) and rearranging 4 gives: q = (K * m(Sites)) * C^n.

(5)

Equation (1) and (5) are identical when K = Kf / m(Sites). The trick is to keep m(Sites) (the number of unoccupied sites) constant throughout the calculations. This can be arranged by making TOT(Sites) large relative to the amount of C that sorbs. In that case, the unoccupied sites, m(Sites), will stay nearly equal to the total number of sites, TOT(Sites). The value for the association constant of the SURFACE_SPECIES is then K = Kf / TOT(Sites). 64 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Note in equation 2 that the mass-action coefficient for C is n, but for SitesC it is 1. This equation is not balanced in C. PHREEQC-2 allows unbalanced equations by defining SURFACE_SPECIES with the option -no_check, which disables the element- and chargebalance checking of an equation. However, when an unbalanced equation is used for mass-action, it is necessary to define the explicit stoichiometry of the product with the option -mole_balance. In this case, the option should be used as follows: •

mole_balance SitesC

The Langmuir equation is: q = Smax * C / (Kl + C).

(7)

The equation can written as: q = (Smax - q) * C / Kl.

(8)

This is the mass action equation for: S + C = q;

K,

since S = (Smax - q), and when K = 1/Kl. (Notice that mole fractions are used for the activities of the surface species in PHREEQC-2). The following input set for PHREEQC version 2 has two pollutants: Polf sorbs according to a Freundlich isotherm and Poll sorbs according to a Langmuir isotherm. The parameters for the Freundlich isotherm are Kf = 10, n = 0.8, and the parameters for the Langmuir isotherm are Smax = 30 and Kl = 2. The input file prints a selected output file with 6 columns. Column 1 is the dissolved concentration of Polf; 2 the sorbed concentration of Polf; 3 the amount of Polf sorbed as calculated from the dissolved concentration and the Freundlich isotherm; 4 is the dissolved concentration of Poll; 2 the sorbed concentration of Poll; 3 the amount of Poll sorbed as calculated from the dissolved concentration and the Langmuir isotherm. Columns 2 and 3 are equal and columns 5 and 6 are equal, which indicates the Freundlich and Langmuir isotherms are being calculated correctly. SOLUTION_MASTER_SPECIES Polf Polf 0.0 Polf 1.0 Poll Poll 0.0 Poll 1.0 SOLUTION_SPECIES Polf = Polf; log_k 0.0 Poll = Poll; log_k 0.0 SURFACE_MASTER_SPECIES Sites Sites Smax Smax SURFACE_SPECIES Sites = Sites log_k 0.0 Smax = Smax log_k 0.0 # Freundlich: SitesPolf = Kf * Polf^0.8 Sites + 0.8Polf = SitesPolf • no_check • mole_balance SitesPolf log_k -99.0 # log ((Kf = 10) / TOT(Sites))

65 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

# Langmuir: SmaxPoll = (tot_Smax - SmaxPoll) * Poll / Kl Smax + Poll = SmaxPoll log_k -0.30103 # log (1 / (Kl = 2)) END SOLUTION 1 • units mmol/kgw Polf 1e3 # All concentrations 1 mol/l Poll 1e3 SURFACE 1 Sites 1e100 1.0 1e100 Smax 30 1.0 30 • equil 1 • no_edl true REACTION 1 Removes 11 moles of Polf and Poll in 5 steps Polf -1.0 Poll -1.0 11 in 5 steps SELECTED_OUTPUT • file freundl.sel • reset false USER_PUNCH • heading diss_Polf_ sorb_Polf_ _q_Freund_ diss_Poll_ sorb_Poll_ _q_Lang___ 10 Kf = 10 20 n = 0.8 30 punch mol(“Polf”), mol(“SitesPolf”), Kf*mol(“Polf”)^n 40 Kl = 2 50 Smax = 30 60 punch mol(“Poll”), mol(“SmaxPoll”), Smax*mol(“Poll”)/(Kl + mol(“Poll”)) END

Cation exchange can be thought of as a special case of sorption. Cation exchange is generally applied to the interaction of clay surfaces, which have a negative charge independent of solution composition and solutes. In natural systems, clay surfaces have sorbed cations to balance the intrinsic charge deficient. Introduction of a solution with a different chemistry will cause the redistribution of cations on the surface, hence cation exchange. PHREEQC will perform sorption and/or cation exchange calculations (SURFACE and EXCHANGE commands). Explicit Surfaces The second approach is to surface reactions is to explicitly describe the surface and its electrical properties, usually as a double layer (see Drever, 1999). Traditionally, quantitative descriptions of adsorption are accomplished using empirical adsorption models. Distribution coefficients, Kd, are often used to model sorption due to the experimental simplicity (batch and column studies) and the ease of incorporation into transport models. However, factors such as solute composition, pH, PCO2 and solid characteristics may significantly impact Kd values (USEPA, 1999). Langmuir and Freundlich isotherm constants will generally describe sorption over a wider concentration range than Kd values but the constants are also system dependent (Koretsky, 2000). Therefore, Kd values and isotherms derived from a specific set of conditions may not be applicable to natural systems with different geochemical conditions. Thermodynamicbased surface complexation models (SCMs) are considered an improvement over 66 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

empirical models due to the reduced system dependence of the intrinsic equilibrium constants, Kint. The fundamental difference between the isotherm and surface models is the explicit description of the surface, and theoretically, the ability to model multi-solute interactions with that surface. There are two main approaches used in surface complexation models capable of describing sorption to heterogeneous sediments and soils. They are the component additivity (CA) and generalized composite (GC) approaches (Kent et al., 2000; Waite et al., 2000; Sanpawanitchakit, 2002; Davis et al., 2004). The CA approach assumes that sorption to a complex material can be described by surface reactions obtained from studies of component minerals (Honeyman, 1984). CA models require molecular level information about the mineral phases involved in sorption. By allowing optimization of some fitting parameters, such as surface equilibrium constants and site densities, CA models are able to better fit the experimental data. The semi-empirical GC approach requires minimal information compared to the CA approach, allowing for its practical incorporation within transport models (Davis et al., 1998). The main assumption behind the GC model is that the solid surface composition is too complex to be quantified by summing the contributions of individual phases. Consequently, sorption is described using the fewest possible chemically feasible surface reactions consisting of generic surface sites with distinct sorption affinities. However, the less mechanistic GC approach, which involves parameter fitting to specific experimental data, makes model predictions outside the calibration range difficult. Table 4

Comparison of the Component Additivity and the Generalized Composite surface complexation models (adapted from Davis et al., 1998)

Component Additivity Approach

Generalized Composite Approach

Predict adsorption Each contributing mineral phase has unique surface sites Quantify surface site density using characterization of natural solid surface

Simulate adsorption Generic surface sites

Equilibrium constants and reaction stoichiometries are obtained from studies of the individual contributing phases

Equilibrium constants and reaction stoichiometries are obtained by experimental data fitting for the natural solid

Adsorption is predicted by summing of individual sorbent phases

Adjust the number of site types and chemical reactions to achieve modeling goals

Quantify surface site density using surface area measurements and fitting of experimental data

Taken from Moran, 2007

Although there are a number of formulations to describe sorption reactions, the most widely used is that of Dzombak and Morel (1990). The authors compiled an extensive literature search of adsorption constants for “Hydrous Ferric Oxide” (HFO) and fit the data to a generalized double layer model with two binding sites (weak and strong). The 67 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

experiments in their compilation determined the sorption constants using a background, non-sorbing electrolyte, one sorbing ion, and temperatures from 20-30ºC. These singlesolute sorption constants have been incorporated in the most commonly available computer codes including Geochemist’s Workbench (Bethke, 1992), MINTEQA2 (Allison et al., 1991), and PHREEQC (Parkhurst and Appelo, 1999). The codes predict the distribution of sorbed and dissolved species by solving a set of simultaneous nonlinear equations, however, the applicability of these constants in modeling multicomponent and lower temperature systems has never been rigorously tested. When using either approach, the equilibrium constants should be calibrated with field data from the site being modeled. Dzombak and Morel (1990) used the Generalized Two Layer Model, which is a modification of the Diffuse Double Layer Model by adding surface precipitation and two types of binding sites, strong and weak for sorption of cations. This basic approach can be modified to add multiple surfaces with different properties to the model.

OH

Na+

OSurface

OH2

+

Na+

Na+

OH OH OZn

Cl-

+

Cl-

Cl-

SO4OH Diffuse Layer

Potential

Surface Plane

Distance, x Schematic diagram of double layer model surface and ions in solution. 68 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

The surface of the iron solid contains reactive surface sites that can be represented as ≡ FeOHº. On the surface of the bulk solid are sites that are protonated according to Equations 6.1 and 6.2. ≡ FeOHº + H+ ↔ ≡ FeOH2+

K1

(6.1)

≡ FeOHº ↔ ≡ FeO- + H+

K2

(6.2)

All protonated sites may also sorb cations or anions. Equations 6.3 and 6.4 provide examples, using ≡ FeOHº although the reactions can occur on the other two site types as well. ≡ FeOHº + Zn2+ ↔ ≡ FeOZn+ + H+

KZn

(6.3)

≡ FeOHº + SO42- ↔ ≡ FeSO4- + OH-

KSO4

(6.4)

Therefore, the compilation of K values usually includes two values for each cation, one K for sorption to the strong sites and one K for sorption to the weak sites. Equations 6.5 and 6.6 show sorption of Zn to the strong and weak sites as in the GTLM. ≡ FesOHº + Zn2+  ≡ FesOZn+ + H+

K1int

(6.5)

≡ FewOHº + Zn2+  ≡ FewOZn+ + H+

K2int

(6.6)

The GTLM as well as the DDLM represents the surface of the reactive solid as having a surface potential that is constant through a finite width of the surface plane. Beyond the boundary of the plane, the surface potential gradually decreases in the bulk solution. In this first plane, the protonation and deprotonation reactions occur, as well as the specific sorption of cations and anions (inner sphere). Beyond the boundary of the first plane, and in what is called the diffuse layer, non-specific sorption of cations and anions occur through long range interactions with the surface sites (outer sphere). In the remaining bulk solution, the background electrolytes have no specific orientation with respect to the surface. The figure above shows the relationship of specifically (Zn 2+) and nonspecifically (SO42-) sorbed solutes to the reactive surface as well as the potential relationships. The PHREEQC model contains a pre-loaded ferrihydrite surface and additional surfaces can be added as the user desires using either type of formulation (isotherm or electrical 69 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

surface). The more complex double layer model of Dzoback and Morel can be configured with and without an explicitly calculated diffusion layer. The standard PHREEQC manual is not very clear on using the SURFACE command. The SURFACE command can be configured in one of two modes. The first is termed the explicit mode in the standard manual (closed system). In this mode, the surface can be used within a reaction step where the system includes the surface (surf_in _output1). This creates and reports the composition of the surface in equilibrium with the solution by redistributing the initial species specified in the solution between aqueous and solid phases and corresponds to a closed system (effectively fixed water–solid ratio). The amount of solid is set by the third number in Hfo_sOH line (89) which means 89 grams of ferrihydrite are in the system. SOLUTION 1 AMD units ppm pH 5 density 1.00 temp 25.0 Al 1.237 As 4.210 C(4) 5.87 as HCO3 Br 0.054 Ca 5.16 Cl 0.994 Cd 0.23 Cu 0.041 F 0.142 Fe(+3) 23.19 Fe(+2) 1.2 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(+5) 0.02 N(+3) 0.001 P 2.1 Pb 0.0012 S(6) 82.65 charge Si 12 Zn 0.501 O(0) 4.1 SURFACE 1 Hfo_sOH 0.005 600 89 Hfo_wOH 0.2 END

The other mode, termed implicit in the standard manual, is to first create a system (e. g. solution) and then react that system with the surface, creating a new system that represents equilibrium between the solution and surface without changing the solution composition, effectively an open system where the water-solid ratio is very large. The example below (surf_in _output2) will produce an output file that lists the surface composition that is in equilibrium with the initial solution, but will not redistribute the 70 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

components in that solution when creating the surface. In this case the SURFACE command is preceeded by the subcommand, equilibrate.

SOLUTION 1 AMD units ppm pH 3.499 density 1.00 temp 25.0 Al 1.237 As 4.210 C(4) 5.87 as HCO3 Br 0.054 Ca 5.16 Cl 0.994 Cd 0.23 Cu 0.041 F 0.142 Fe(+3) 23.19 Fe(+2) 1.2 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(+5) 0.02 N(+3) 0.001 P 2.1 Pb 0.0012 S(6) 82.65 charge Si 12 Sr 0.052 Zn 0.501 O(0) 4.1 SURFACE 1 -equilibrate with solution 1 Hfo_sOH 0.005 600 89 Hfo_wOH 0.2 END

The amount of surface can be specified or taken from a previous batch reaction step in which the surface is gerneated. For instance, the AMD solution in the prior examples is supersaturated with respect to ferrihydrite. If we allow the solution to equilibrate with ferrihydrite, we can use that surface for a later step. The following input file (input file surf_in_ouput 3) will again simulate an apparent open system, but use the ferrihydite created in the prior batch reaction step (EQUILIBRIUM_PHASES command) as the surface in the SURFACE command step. In this simulation the amount of ferrihydrite is only 3.5e-4 moles. However, this input formulation will not produce an open system result since any solution created by a batch reaction calculation (the EQUILIBRIUM_PHASES command followed by the SURFACE command is considered a single batch reaction caculation) will equilibrate with the surface changing the composition of both (in effect negating the equilibrate subcommand). In order to have the open system calculation for surf_in_output 3 input file you must separate the batch 71 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

reaction calculation into two parts by placing the END command between EQUILIBRIUM_PHASES and SURFACE commands (input file surf_in_output 4). SOLUTION 1 AMD_surface open system pick up surface from eq-phases units ppm pH 5 density 1.00 temp 25.0 Al 1.237 As 4.210 C(4) 5.87 as HCO3 Br 0.054 Ca 5.16 Cl 0.994 Cd 0.23 Cu 0.041 F 0.142 Fe(+3) 23.19 Fe(+2) 1.2 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(+5) 0.02 N(+3) 0.001 P 2.1 Pb 0.0012 S(6) 82.65 charge Si 12 Sr 0.052 Zn 0.501 O(0) 4.1 EQUILIBRIUM_PHASES 1 Ferrihydrite 0.0 0.0 SURFACE 1 -equilibrate with solution 1 Hfo_sOH Ferrihydrite equilibrium_phases 0.005 5.3e4 Hfo_wOH Ferrihydrite equilibrium_phases 0.2 END

Specifying the Surface The amount of surface used to equilibrate with the standard 1 liter of solution can be specified a number of ways. In the case of the ferrihydrite surface, Hfo, the specific amount of surface can be specified exactly by using the three values after the surface name (e.g. Hfo_s for the strong site) as below. The three values that follow the surface name are total sites in moles, specific area in m2 per gram, and grams, respectively. Note in this input mode the mass in grams (89) is used to calculate the surface area, but not the number of moles of sites. In this mode you must provide both specific surface and mass values to calculate the surface area, which together with the number of sites defines the surface charge. This data can be entered after either binding site, the strong site in this example. The surface site density and mass is now fixed. In this example, there are 89 grams of ferrihydrite (89 g Hfo/mole Fe or one mole of Fe), and 0.2 and 0.005 moles of 72 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

weak and strong sites per mole of Fe, respectively, conforming to Dzomback and Morel’s formulation. The relative abundance of weak versus strong sites (40:1) should remain constant to be consistent with their model as should the specific surface area value,either 600 m2/g or 5.34e4 m2/mole Fe. This formulation means you have to change the number of sites if the grams of ferrihydrite are input manually. SURFACE 1 Hfo_sOH Hfo_wOH END

0.005 600 89 0.2

Remember that if the grams of ferrihydrite are reduced to 0.089 (1000X), the number of sites must be reduced proportionally to maintain the applicability of the Dzomback and Morel model. The specific surface value remains the same. SURFACE 1 Hfo_sOH Hfo_wOH

0.000005 600 0.089 0.0002

An alternative mode is to allow the amount of surface to vary as the ferrihydrite precipitates or dissolves along the reaction path. In this mode the surface is defined as an equilibrium phase and values for sites per mole of phase and the specific surface in m2/mole are included in the input line. The first value is the sites per mole and the second the specific area (this time in m2/mole Fe). SURFACE 1 Hfo_sOH Hfo_wOH

Ferrihydrite equilibrium_phases 0.005 Ferrihydrite equilibrium_phases 0.2

5.3e4

In the example above (surf_in _output3), the solution was equilibrated with ferrihydrite created using the EQUILIBRIUM_PHASES command (there was no initial ferrihydrite in the system). In that example, the ferrihydrite precipitates and is saved for use in the second batch-reaction, equilibration with the surface. The pH Sweep with Sorption There are times when it is useful to examine the behavior of dissolved metals with pH in the presence of a reactive surface. The most common type of exploratory simulation is the plot of speciation over a relevant pH range. To make this type of simulation we employ the pH sweep technique described above with suitable modifications, specifically we have to include the surface. The following example (input file pH sweep surface) is from the standard PHREEQC example problems. TITLE pH Sweep example SURFACE_SPECIES Hfo_sOH + H+ = Hfo_sOH2+ log_k 7.18 Hfo_sOH = Hfo_sO- + H+ log_k -8.82 Hfo_sOH + Zn+2 = Hfo_sOZn+ + H+

73 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

log_k 0.66 Hfo_wOH + H+ = Hfo_wOH2+ log_k 7.18 Hfo_wOH = Hfo_wO- + H+ log_k -8.82 Hfo_wOH + Zn+2 = Hfo_wOZn+ + H+ log_k -2.32 SURFACE 1 Hfo_sOH 5e-6 600. 0.09 Hfo_wOH 2e-4 SOLUTION 1 -units mmol/kgw pH 8.0 Zn 0.0001 Na 100. charge N(5) 100. SOLUTION 2 -units mmol/kgw pH 8.0 Zn 0.1 Na 100. charge N(5) 100. USE solution none # # Model definitions # PHASES Fix_H+ H+ = H+ log_k 0.0 END SELECTED_OUTPUT -file pHsweepsurf.csv -molalities Zn+2 Hfo_wOZn+ Hfo_sOZn+ USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.0 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.25 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.5 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -5.75 NaOH 10.0 END USE solution 1 USE surface 1

74 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

EQUILIBRIUM_PHASES 1 Fix_H+ -6.0 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -6.25 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -6.5 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -6.75 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.0 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.25 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.5 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -7.75 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -8.0 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -8.25 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -8.5 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1

75 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Fix_H+ -8.75 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -9.0 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -9.25 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -9.5 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -9.75 NaOH 10.0 END USE solution 1 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H+ -10.0 NaOH 10.0 END

The following figure shows the results of the simulation. You can see that most of the Zn in the system is in solution at pH values less than 6. At more alkaline values the Zn starts to be strongly sorped to the surfaces.

Zn distribution 1E-7 m_Zn+2 m_Hfo_wOZn+

moles

8.000001E-8

m_Hfo_sOZn+

6.000002E-8

4.000003E-8

2.000004E-8

5E-14 5

6

7

8

9

10

pH

76 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

More Reaction Path Models As discussed earlier, the reaction path concept is simply a model that uses speciation calculations to make forward predictions of changes in water and rock (dissolution/precipitation) along reaction path (specified change in T, P, pH, new reactants). As the figure below shows, the system can be altered by adding or subtracting mass of heat, or composition or controlled by contact with another reservoir that buffers change. The model operates by first calculating the equilibrium condition of the specified initial system. The program then changes the condition (e.g. temperature, composition) by a small increment and calculates the new equilibrium condition. Then the next step uses the last step as the starting point until the end of the path is reached. A good way to visualize this is the addition of base to a solution (titration) to change the initial acidic pH of 2 to a value of 12 with a calculation made for each drop of acid added. During the process, the solution may have minerals precipitate or dissolve, gas content increase or decrease, etc. This method is used to model many real world processes of interest such as mixing of fluids, dissolution of minerals, changes in temperature, Eh, pH, fugacity or concentration of a particular species.

Conceptual diagram of the reaction path model from Bethke (1996).

77 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

MIXING Water Compatibility Often the question of the compatibility of the formation water with potential sources of water flood brines needs to be addressed. In this example we will use the formation water from the example above and mix it with injection water. The injection water has a lower salinity and may cause dissolution or precipitation of reservoir minerals. The injection water chemistry is listed below (input file injection water). SOLUTION 2 -units mg/l -pH 7.25 -temp 40 -pe -6 Na 1200 K 70 Ca 600 Mg 120 Cl 200 charge C(4) 750 S(6) 40 Fe 1.4 F 0.6 Ba 0.02 Si 50 as SiO2 END

In PHREEQC you can use the MIX command to mix any number of solutions together in specified proportions. The example input below mixes solution 1, the formation water with 100 volumes of the injection water. The first number in the lines under the MIX command specifies the solution and the second that mixing fraction. So the same result could have been achieved using mixing fractions of 0.1 and 100, or 0.01 and 10. In this case we might be interested in the potential for mineral precipitation or dissolution. In that case it would be most useful to have a output file that tracked the saturation index of the reservoir minerals. Let’s assume that the reservoir is composed of quartz, calcite, albite (feldspar), illite and kaolinite (clay minerals). In order to track the feldspar and clay minerals we must include all the elemental components of the minerals in the water chemistry (the system). This means we have to add aluminum to the water chemistry. This brings up an important point for most engineering applications, that the water analyses we commonly use to not include mineral components such as Al and Si. In those cases we need to measure these parameters or make assumptions about the dissolved concentrations. The usual assumption in the case of petroleum reservoirs is that the Si is controlled by equilibrium with quartz and Al is controlled by equilibrium with a feldspar or clay mineral. Therefore, the dissolved Si and Al concentrations can be calculated by specifying mineral equilibrium as described above.

78 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

In practical terms we need some knowledge of the reservoir minerals. Let us specify that the injection water source has quartz, kaolinite and calcite in the formation. The file below sets equilibrium with those minerals (input file water compatibility). The initial Al value is just a guess to start. We can also add a SELECTED_OUTPUT command to make the output data easier to handle. From the output we can see that Calcite and Kaolinite may precipitate. SOLUTION 1 SS formation water restored -units mg/l -pH 8.33 -temp 100 -pe -6 Na 11035 K 397 Ca 480 Mg 1300 Cl 19868 charge C(4) 50 S(6) 2770 Fe 1.28 F 0.254 Ba 0.001 Si 41 as SiO2 Al 0.040 EQUILIBRIUM_PHASES Calcite 0.0 CO2(g) 0.78 SAVE solution 2 END SOLUTION 2 -units mg/l -pH 7.25 -temp 40 -pe -6 Na 1200 K 70 Ca 600 Mg 120 Cl 200 charge C(4) 750 S(6) 40 Fe 1.4 F 0.6 Ba 0.02 Si 50 as SiO2 Al 0.001 EQUILIBRIUM_PHASES Calcite 0.0 Kaolinite 0.0 Albite 0.0 END SELECTED_OUTPUT -file output1.csv -saturation_indices Calcite Quartz Kaolinite Illite Albite

79 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

MIX 1 2

1.0 100

END

Mixing, Redox and Surfaces Combined An example of a much more complex simulation is shown next (acid_stream_mixing). It is the case of the oxidation of acid drainage by mixing that solution with stream water (in equilibrium with the atmosphere), creating a solution that is a 1000:1 mixture (mixing in equilibrium with the atmosphere), which is then equilibrated with 10 moles of ferrihydrite. The simulation represents the case where there is ferrihydrite present in the system (streambed) and the mixture of acidic drainage and stream water sets the composition of the solid phase (very large water/rock ratio). The inclusion of the intermediate mixtures is not required, but in this case might be used to track the dilution of elevated As levels in the acidic drainage as it mixes with the stream water. SOLUTION 1 AMD mixing with stream water units ppm pH 3.499 density 1.00 temp 25.0 Al 1.237 As 4.210 C(4) 5.87 as HCO3 Ba 0.054 Ca 5.16 Cl 0.994 Cu 0.041 F 0.142 Fe 23.19 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(5) 0.02 Pb 0.0012 S(6) 82.65 charge Sr 0.052 Zn 0.501 END SOLUTION 2 stream water units ppm pH 8.1 density 1.00 temp 25.0 As 0.010 Cu 0.010 Pb 0.0002 Zn 0.050 Fe 0.010 Na 22.92 C(4) 67.0 as HCO3

80 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Cl 3.6 S(6) 40 charge Ca 20.0 Mg 8.4 F 2.8 EQUILIBRIUM_PHASES CO2(g) -3.5 O2(g) -0.1 MIX 1 mixing AMD and stream water #this simulates mixing of stream and AMD 1 1.0 2 1000.0 EQUILIBRIUM_PHASES O2(g) -0.10 Ferrihydrite 0.0 SAVE solution 3 #this is mixture 1 END SURFACE 1 -equilibrate with solution 3 Hfo_sOH Ferrihydrite equilibrium_phase 0.1 Hfo_wOH Ferrihydrite equilibrium_phase 0.001 END

1e5

An alternative approach would be to equilibrate any ferrihydrite precipitated during the mixing step. This is accomplished by specifying that there is no ferrihydrite initially present in the system (add 0.0 after the first 0.0 in the ferrihydrite line in the EQUILIBRIUM_PHASES command line. The example below shows this configuration (acid_stream_mixing2). SOLUTION 1 AMD mixing with stream water units ppm pH 3.499 density 1.00 temp 25.0 Al 1.237 As 4.210 C(4) 5.87 as HCO3 Ba 0.054 Ca 5.16 Cl 0.994 Cu 0.041 F 0.142 Fe 23.19 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(5) 0.02 Pb 0.0012 S(6) 82.65 charge Sr 0.052 Zn 0.501 END SOLUTION 2 stream water units ppm

81 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

pH 8.1 density 1.00 temp 25.0 As 0.010 Cu 0.010 Pb 0.0002 Zn 0.050 Fe 0.010 Na 22.92 C(4) 67.0 as HCO3 Cl 3.6 S(6) 40 charge Ca 20.0 Mg 8.4 F 2.8 EQUILIBRIUM_PHASES CO2(g) -3.5 O2(g) -0.1 MIX 1 mixing AMD and stream water #this simulates mixing of stream and AMD 1 1.0 2 1000.0 EQUILIBRIUM_PHASES O2(g) -0.10 Ferrihydrite 0.0 0.0 SAVE solution 3 #this is mixture 1 SAVE equilibrium_phases # this command keeps the ferrihydrite created by mixing for later use END SURFACE 1 -equilibrate with solution 3 Hfo_sOH Ferrihydrite equilibrium_phase 0.1 1e5 Hfo_wOH Ferrihydrite equilibrium_phase 0.001 END

Evaporation Evaporation is the removal of water from the initial system. During this process a typical reaction path will involve the increases in concentration of solutes, ionic strength, and if the process continues, some solid phases may become supersaturated and precipitate. In order to simulate this process we can use the following input file (evap1). This is also example 4a from the PHREEQC example files

. TITLE Example 4a.--Rain water evaporation SOLUTION 1 Precipitation from Central Oklahoma units mg/L pH 4.5 # estimated temp 25.0 Ca .384 Mg .043 Na .141 K .036 Cl .236 C .1 CO2(g) -3.5 S(6) 1.3 N(-3) .208

82 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

N(5) .237 REACTION 1 H2O -1.0 52.73 moles END

In this case the simulation is for the evaporation of rain water by a factor of approximately 95% (52.73/55.5) since 1 kg of water is 55.5 moles. Note the “reactant” is negative water, or the reaction path is the removal of 52.73 moles of water from the initial system of 1 mole and solutes. Note that this simulation did not allow precipitation of minerals. Examination of the output shows that in fact no minerals did become supersaturated, so precipitation is not likely. A more complex simulation would be the case where the water undergoing evaporation has more solutes to begin. Let us use the AMD from the mixing with a stream example (input file evap AMD). SOLUTION 1 AMD mixing with stream water units ppm pH 3.499 density 1.00 temp 25.0 Al 1.237 As 4.210 C(4) 5.87 as HCO3 Ba 0.054 Ca 5.16 Cl 0.994 Cu 0.041 F 0.142 Fe 23.19 K 0.624 Mg 1.227 Mn(2) 0.0098 Na 0.539 N(5) 0.02 Pb 0.0012 S(6) 82.65 charge Sr 0.052 Zn 0.501 REACTION 1 H2O -1.0 52.73 moles END

In this case the results are very different. For instance, Barite starts out slightly supersaturated but becomes over two orders of magnitude more super-saturated with evaporation. Of course the model does not let any phases precipitate without an EQUILIBRIUM_PHASES command. So we can continue to modify our simulation to make it increasingly realistic by allowing phases to precipitate, perhaps specifying equilibrium with the atmosphere as well. 83 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Inverse Modeling This function in PHREEQC is unique among the available models. The user specifies the initial and final solution chemistry (e.g. samples from upstream and downstream) and the solid phases that are available to react with the initial solution to create the final solution. The program calculates all the possible mass balance models that can create the final solution from the initial solution and all possible combinations of available reactants. This is particularly useful when modeling a well-constrained system such as a column experiment where the initial and final solution chemistry is well known and the solid phase can be well characterized. The classic application is the modeling of water-rock interaction in the Sierra Nevada mountains in the PHREEQC examples (Ex16). TITLE Example 16.—Inverse modeling of Sierra springs SOLUTION_SPREAD Number pH Si Ca Mg Na K 1 6.2 0.273 0.078 0.029 0.134 0.028 2 6.8 0.41 0.26 0.071 0.259 0.04

Alkalinity 0.328 0.895 0.025

S(6) 0.01 0.03

Cl 0.014

INVERSE_MODELING 1  solutions 1 2  uncertainty 0.025  range  phases Halite Gypsum Kaolinite precip Ca-montmorillonite precip CO2(g) Calcite Chalcedony precip Biotite dissolve Plagioclase dissolve  balance Ca 0.05 0.025 PHASES Halite NaCl = Na+ + Cllog_k 0.0 Biotite KMg3AlSi3O10(OH)2 + 6H+ + 4H2O = K+ + 3Mg+2 + Al(OH)4- + 3H4SiO4 log_k 0.0 Plagioclase Na0.62Ca0.38Al1.38Si2.62O8 + 5.52 H+ + 2.48H2O = \ 0.62Na+ + 0.38Ca+2 + 1.38Al+3 + 2.62H4SiO4 log_k 0.0 END

There are several interesting features in this input file. The example uses the SOLUTION_SPREAD command to define the two solutions. Additional solid phases (Halite, Biotite and Plagioclase) are added to the system in the input. Note that the log K 84 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

for the reactions is zero. The INVERSE_MODELING feature does not use the equilibrium constant of the mass balance equation, only the mole balance (stoichiometry) of the reaction. Some of the phases are constrained to either precipitate or dissolve. If unspecified, then the phases can either dissolve or precipitate (e.g. halite and gypsum). Beginning of inverse modeling calculations. Solution 1: pH Al Alkalinity C(-4) C(4) Ca Cl H(0) K Mg Na O(0) S(-2) S(6) Si

Input 6.200e+00 0.000e+00 3.280e-04 0.000e+00 7.825e-04 7.800e-05 1.400e-05 0.000e+00 2.800e-05 2.900e-05 1.340e-04 0.000e+00 0.000e+00 1.000e-05 2.730e-04

+ + + + + + + + + + + + + + +

Delta 1.246e-02 0.000e+00 5.500e-06 0.000e+00 0.000e+00 -3.900e-06 0.000e+00 0.000e+00 -7.000e-07 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00

= = = = = = = = = = = = = = =

Input+Delta 6.212e+00 0.000e+00 3.335e-04 0.000e+00 7.825e-04 7.410e-05 1.400e-05 0.000e+00 2.730e-05 2.900e-05 1.340e-04 0.000e+00 0.000e+00 1.000e-05 2.730e-04

Input 6.800e+00 0.000e+00 8.950e-04 0.000e+00 1.199e-03 2.600e-04 3.000e-05 0.000e+00 4.000e-05 7.100e-05 2.590e-04 0.000e+00 0.000e+00 2.500e-05 4.100e-04

+ + + + + + + + + + + + + + +

Delta -3.417e-03 0.000e+00 -1.801e-06 0.000e+00 0.000e+00 6.500e-06 0.000e+00 0.000e+00 1.000e-06 -9.005e-07 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00

= = = = = = = = = = = = = = =

Input+Delta 6.797e+00 0.000e+00 8.932e-04 0.000e+00 1.199e-03 2.665e-04 3.000e-05 0.000e+00 4.100e-05 7.010e-05 2.590e-04 0.000e+00 0.000e+00 2.500e-05 4.100e-04

Solution 2: pH Al Alkalinity C(-4) C(4) Ca Cl H(0) K Mg Na O(0) S(-2) S(6) Si Solution fractions: Solution 1 Solution 2

1.000e+00 1.000e+00

Phase mole transfers: Halite 1.600e-05 Gypsum 1.500e-05 Kaolinite -3.391e-05 Ca-Montmorillon -8.090e-05 Ca0.165Al2.33Si3.67O10(OH)2 CO2(g) 2.927e-04 Calcite 1.239e-04 Biotite 1.370e-05 Plagioclase 1.758e-04 Na0.62Ca0.38Al1.38Si2.62O8

Minimum 1.000e+00 1.000e+00

Maximum 1.000e+00 1.000e+00

Minimum 1.490e-05 1.412e-05 -5.585e-05 -1.099e-04

Maximum 1.710e-05 1.587e-05 -1.223e-05 -5.154e-05

2.362e-04 1.007e-04 1.317e-05 1.582e-04

3.563e-04 1.309e-04 1.370e-05 1.934e-04

Redox mole transfers:

85 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

NaCl CaSO4:2H2O Al2Si2O5(OH)4 CO2 CaCO3 KMg3AlSi3O10(OH)2

Sum of residuals (epsilons in documentation): Sum of delta/uncertainty limit: Maximum fractional error in element concentration:

5.576e+00 5.576e+00 5.000e-02

Model contains minimum number of phases. Solution 1: pH Al Alkalinity C(-4) C(4) Ca Cl H(0) K Mg Na O(0) S(-2) S(6) Si

Input 6.200e+00 0.000e+00 3.280e-04 0.000e+00 7.825e-04 7.800e-05 1.400e-05 0.000e+00 2.800e-05 2.900e-05 1.340e-04 0.000e+00 0.000e+00 1.000e-05 2.730e-04

+ + + + + + + + + + + + + + +

Delta 1.246e-02 0.000e+00 5.500e-06 0.000e+00 0.000e+00 -3.900e-06 0.000e+00 0.000e+00 -7.000e-07 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00

= = = = = = = = = = = = = = =

Input+Delta 6.212e+00 0.000e+00 3.335e-04 0.000e+00 7.825e-04 7.410e-05 1.400e-05 0.000e+00 2.730e-05 2.900e-05 1.340e-04 0.000e+00 0.000e+00 1.000e-05 2.730e-04

Input 6.800e+00 0.000e+00 8.950e-04 0.000e+00 1.199e-03 2.600e-04 3.000e-05 0.000e+00 4.000e-05 7.100e-05 2.590e-04 0.000e+00 0.000e+00 2.500e-05 4.100e-04

+ + + + + + + + + + + + + + +

Delta -3.417e-03 0.000e+00 -1.801e-06 0.000e+00 0.000e+00 6.500e-06 0.000e+00 0.000e+00 1.000e-06 -9.006e-07 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00

= = = = = = = = = = = = = = =

Input+Delta 6.797e+00 0.000e+00 8.932e-04 0.000e+00 1.199e-03 2.665e-04 3.000e-05 0.000e+00 4.100e-05 7.010e-05 2.590e-04 0.000e+00 0.000e+00 2.500e-05 4.100e-04

Solution 2: pH Al Alkalinity C(-4) C(4) Ca Cl H(0) K Mg Na O(0) S(-2) S(6) Si Solution fractions: Solution 1 Solution 2

1.000e+00 1.000e+00

Phase mole transfers: Halite 1.600e-05 Gypsum 1.500e-05 Kaolinite -1.282e-04 CO2(g) 3.061e-04 Calcite 1.106e-04 Chalcedony -1.084e-04 Biotite 1.370e-05 Plagioclase 1.758e-04 Na0.62Ca0.38Al1.38Si2.62O8

Minimum 1.000e+00 1.000e+00

Maximum 1.000e+00 1.000e+00

Minimum 1.490e-05 1.412e-05 -1.403e-04 2.490e-04 8.680e-05 -1.473e-04 1.317e-05 1.582e-04

Maximum 1.710e-05 1.587e-05 -1.159e-04 3.702e-04 1.182e-04 -6.906e-05 1.370e-05 1.934e-04

Redox mole transfers: Sum of residuals (epsilons in documentation): Sum of delta/uncertainty limit: Maximum fractional error in element concentration:

5.576e+00 5.576e+00 5.000e-02

86 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

NaCl CaSO4:2H2O Al2Si2O5(OH)4 CO2 CaCO3 SiO2 KMg3AlSi3O10(OH)2

Model contains minimum number of phases. Summary of inverse modeling: Number of models found: 2 Number of minimal models found: 2 Number of infeasible sets of phases saved: 20 Number of calls to cl1: 62

End of simulation. The output is somewhat complicated with many parameters that are not always used. The important point is the mole phase transfer values. Positive values indicate that the phase was added and negative values show the phases precipitated. Adding the SELECTED_OUTPUT command will create a table for the grid function in PHREEQC or to be opened as an external spreadsheet. This is useful to evaluate which possible models are geologically reasonable and which should be ignored. Insert the following after the last solution and before END, and re-run the model. SELECTED_OUTPUT -file inverse1.csv -inverse_modeling

Complex AMD Example – Inverse Modeling This example will give you a taste of modeling a real world problem. We want to model the stream chemistry of some creeks in northwest Alaska. The steams flow through an area that has outcrops of shale-hosted Zn-Pb deposits with accessory Fe, Ag, and Ba. The prospect was formed when deep mineralizing fluids were expelled upward into a reduced, anoxic, submarine environment where they formed sphalerite, galena, pyrite, marcasite, and several possible sulfosalts as trace constituents. Shale, barite and silica are present as host rocks and alteration minerals. Shale-hosted deposits have a relatively simple ore-mineral assemblage with the sulfides sphalerite, galena, pyrite and marcasite. Gangue may include forms of silica, barite, carbonates and several different clays. The problem is to see if you can formulate a predictive model for the changes in stream water chemistry due to contact with the mineralized rocks, a natural acid drainage. We have the background concentration (stream water upgradient of mineralized areas), two samples from locations downstream from the mineralized areas and the mineral assemblage including the secondary minerals of the deposits to help formulate and constrain the model. Three samples will be used for modeling. Sample DW002 was collected upgradient of the mineralization, sample DW007 was collected downgradient of an area with minimal mineralization, and sample DW010 was collected downgradient of an area of extensive mineralization. We will use the PHREEQC commands INVERSE MODELING, REACTION, EQUILIBRIUM PHASES, and SURFACE. First, we speciate the water samples with the solution command. This is input file 7. TITLE Background Speciation

87 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

SOLUTION 1 DW002 units ppm pH 7.2 pe 12 temp 6 F 0.035 Cl 0.07 S(6) 12 N(5) 0.14 Al 0.07 Ca 9 Fe 0.042 K 0.1 Mg 1 Mn 0.014 Na 0.4 Si 0.7 Ba 0.039 Cd 0.0014 Cu 0.00063 Pb 0.00021 Sr 0.027 Zn 0.012 Alkalinity 12.7 as HCO3 O(0) 1.0 O2(g) -0.7 SOLUTION 2 DW007 units ppm pH 7.0 pe 12 temp 9 F 0.09 Cl 0.11 S(6) 24 N(5) 0.14 Al 0.07 Ca 10 Fe 0.3 K 0.2 Mg 2 Mn 0.065 Na 0.4 Si 1 Ba 0.039 Cd 0.0014 Cu 0.002 Pb 0.00021 Sr 0.034 Zn 0.073 Alkalinity 10.5 as HCO3 O(0) 1.0 O2(g) -0.7 SOLUTION 3 DW0010 units ppm pH 4.3 pe 12 temp 3 F 0.18

88 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Cl S(6) N(5) Al Ca Fe K Mg Mn

11

0.11 49 0.14 1 charge 3 0.3

1 0.48

Na 0.1 Si 0.7 Ba 0.032 Cd 0.006 Cu 0.007 Pb 0.005 Sr 0.013 Zn 1.4 Alkalinity 7 as HCO3 O(0) 1.0 O2(g) -0.7 END

The following minerals should be supersaturated in your samples. Supersaturated minerals for water samples 1 Ca-Montmorillonite, Ferrihydrite, Gibbsite, Goethite, Hematite, K-Mica, Kaolinite, Manganite, and Pyrolusite 2 Alunite, Ca-Montmorillonite, Ferrihydrite, Gibbsite, Goethite, Hematite, Illite, K-Mica, Kaolinite, Manganite, and Pyrolusite 3 Barite, Ferrihydrite, Goethite, Hematite, and Jarosite-K The command INVERSE MODELING is used to determine if it is mathematically possible, considering only mass balance, to work backwards from the downgradient samples to the upgradient sample using the minerals suspected to be present in the stream bed. These are input file 7a and 7b. TITLE Inverse Model for DW002 and DW007 SOLUTION 1 DW002 units ppm pH 7.2 pe 12 temp 6 S(6) 12 Al 0.07 Ca 9 charge Fe 0.042 K 0.1 Mg 1 Si 0.7 Zn 0.012 Alkalinity 12.7 as HCO3 O(0) 1.0 O2(g) -0.7 SOLUTION 2 DW007 units ppm pH 7.0

89 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

pe 12 temp 9 S(6) 24 Al 0.07 Ca 10 charge Fe 0.3 K 0.2 Mg 2 Si 1 Zn 0.073 Alkalinity 10.5 as HCO3 O(0) 1.0 O2(g) -0.7 INVERSE_MODELING 1 DW002 and DW007 using py and sph  solutions 12  uncertainty 0.05 0.05  phases Quartz dissolve Pyrite dissolve Sphalerite dissolve CH4(g) Calcite dissolve Chlorite(14A) dissolve Illite Ca-Montmorillonite Fe(OH)3(a) precipitate END

TITLE Inverse Model for DW002 and DW010 SOLUTION 1 DW002 units ppm pH 7.2 pe 12 temp 6 S(6) 12 Al 0.07 Ca 9 charge Fe 0.042 K 0.1 Mg 1 Si 0.7 Pb 0.00021 Zn 0.012 Alkalinity 12.7 as HCO3 O(0) 1.0 O2(g) -0.7 SOLUTION 2 DW0010 units ppm pH 4.3 pe 12 temp 3 S(6) 49 Al 1 Ca 11 charge Fe 3 K 0.3 Mg 1

90 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Si

0.7 Pb 0.005 Zn 1.4 Alkalinity 7 as HCO3 O(0) 1.0 O2(g) -0.7 INVERSE_MODELING 1 DW002 and DW010 using py, sph and gln  solutions 12  uncertainty 0.05 0.05  phases Pyrite dissolve Sphalerite dissolve Galena dissolve CH4(g) CO2(g) Calcite dissolve Illite #Ca-Montmorillonite Kaolinite Quartz Fe(OH)3(a) precipitate END

For both models, F, Cl, NO3, Na, Mn, Ba, Cd, Cu, and Sr were removed from the solution inputs. The addition elements require a solid phase containing these elements in the PHASES list. This constraint makes model convergence very difficult since these elements are not major components in the water chemistry. Lead (Pb) was removed from the first model because it was reported as non-detect in both samples and there was no basis to specify a value. A lead value was included in the second model. As seen in the input files, the phases quartz, pyrite, sphalerite, CH4(g), calcite, and illite are included in both models. Illite was required to satisfy K, calcite for Ca, pyrite for Fe, sphalerite for Zn, and quartz for Si. Methane, CH4(g) was required for the C(-4), to force the pe to match the reported value. This may seem strange as there is not likely to be any methane in the stream. However, attempts to decouple all reactions involving CH4 and completely remove it from the database, including as a master species produced an inequality error in the output. This may be because CH4 is coupled to pe in the code of the program, and it may not be possible to completely remove it. This situation points out how difficult it is to model Eh in real world systems. Chlorite and Ca-montmorillonite were added as phases in the first model to provide Mg and Ca, respectively. The CO2, kaolinite, and galena were added in the second model for C, Al, and Pb respectively. The data for galena was obtained from the Wateq4f database. The second model was run with Chlorite and Ca-Montmorillonite. Examination of your output shows there are 10 possible models. Phases were sequentially removed to attempt to decrease the possible models and reach the simplest set of models. Removing chlorite reduced the possible models to six, removing Camontmorillonite reduced the models to 1. The inverse modeling shows that with the 91 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

correct set of reactions, it may be possible to explain the change in water chemistry from background to downstream. After successful completion of inverse modeling, forward modeling was attempted with the REACTION command. This is a reaction path model that could be used to predict the affects of mineralized deposits on stream chemistry. We know that the reaction of stream water with the sulfide minerals should locally decrease the pH and Eh of water. But in order to better match the actual data, we added calcite to increase the pH and oxygen to adjust the pe. This is not an unreasonable situation, but we are now modeling and should not forget that we have not verified these assumptions. This is input file 7c. TITLE React DW002 Background with py and sph SOLUTION 1 DW002 units ppm pH 7.2 pe 12 temp 6 S(6) 12 Al 0.07 Ca 9 charge Fe 0.042 K 0.1 Mg 1 Si 0.7 Pb 0.00021 Zn 0.012 O(0) 1.0 O2(g) -0.7 REACTION 1 DW002 to DW007 Pyrite 4.62 Sphalerite 0.94 Calcite 12.28 O2(g) 0.045 1.0e-06 moles END

Calculated S is only about half of what was measured in the water samples. Therefore, further modification to each model is necessary. Based on the supersaturated phases for each water sample, and the kinetics involved in precipitating the species in natural systems, the most likely phase to precipitate is ferrihydrite. Allowing precipitation of ferrihydrite will remove Fe from the system. This will stimulate the dissolution of more pyrite, which will increase sulfate. This is input file 7d on your disk. TITLE React and precip DW002 Background to DW010 with py, sph and gln SOLUTION 1 DW002 units ppm pH 7.2 pe 12 temp 6 S(6) 12 Al 0.07 Ca 9 charge Fe 0.042

92 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

K Mg

0.1 1

Si

0.7 Pb 0.00021 Zn 0.012 O(0) 1.0 O2(g) -0.7 REACTION 1 DW002 to DW010 Pyrite 6.5 Sphalerite 2.125 Galena 0.00231 O2(g) 0.43 1.0e-05 moles EQUILIBRIUM PHASES 1 Fe(OH)3(a) 0.0 0.0 END

In this model more pyrite was dissolved to reach the higher measured concentration, but the pe dropped to negative values. At low pe, ferrihydrite was not supersaturated. Therefore, it was necessary to add O2(g) in the REACTION datablock. Adding oxygen raises the pe closer to the known value and allowed ferrihydrite to precipitate. In effect, we are simulating a stream with active atmospheric exchange. However, now the calculated pH is slightly lower than the measured value (3.9 vs 4.3). Note that the SURFACE command was used to allow absorption to ferrihydrite. The amount of ferrihydrite that precipitated from the EQUILIBRIUM_PHASES command can be used as input for the datablock. The known Fe concentrations, recommended number of moles of absorption sites per mole of Fe and default value of surface area are used. Both strong and weak surface sites are modeled. This is input file 7e. TITLE React, precip, and sorb DW002 to DW010 SOLUTION 1 DW002 units ppm pH 7.2 pe 12 temp 6 S(6) 12 Al 0.07 Ca 9 charge Fe 0.042 K 0.1 Mg 1 Si 0.7 Pb 0.00021 Zn 0.012 O(0) 1.0 O2(g) -0.7 REACTION 1 DW002 to DW010 Pyrite 6.5 Sphalerite 2.125 Galena 0.00231 O2(g) 0.43 1.0e-05 moles EQUILIBRIUM_PHASES 1 Fe(OH)3(a) 0.0 0.0

93 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

SURFACE 1 Hfo_sOH Hfo_wOH END

2.7e-07 600 1.1e-05 600

1.3e-03 1.3e-03

The final model sorbed mainly OH to the strong and weak sites. This increased the pH by 0.003 units. Sulfate was also sorbed to the surface, which decreased the sulfate in the resulting solution. While Fe and Zn were sorbed as well, the amount was so small it was insignificant. The small change in pH caused ferrihydrite to precipitate, removing Fe. The concentrations of S and Pb also decreased. Since more sulfate than Fe was removed, including sorption in the overall model made the difference between the calculated and measured water chemistries greater. However, since even a small change in pH changes the Fe speciation, properly modeling the pH may resolve the remaining differences in the water chemistries. This exercise shows just how difficult it is to generate a forward model. Reaction path modeling can be difficult and time consuming. The best rule is start simple and gradually increase complexity until you reach a reasonable solution that captures the essential portions of the system you are trying to model.

Transport The code can model one dimensional transport processes such as diffusion, advection, advection and dispersion, advection and diffusion with diffusion into stagnant zones (dual porosity). These options cover most simple systems in the environmental field. The transport processes can be combined with equilibrium and kinetic chemical reactions producing the capacity to emulate the simpler reactive-transport codes. The PHREEQC code solves the advective-transport equation:

C C  2C q  v  DL 2  t x x t where v = advective velocity in the pores, q/porosity (m/sec), t = time (s), C = concentration (mol/Kgw), DL = hydrodynamic dispersion coefficient (m2/sec) and q = concentration in the solid phase (mol/kgw in pore space of the 1 kg of water). This formulation is equivalent to a 1-D column experiment. “For each time step, advective transport is calculated, then all equilibrium and kinetically controlled chemical reactions, followed by dispersive transport, which is followed again by calculation of all equilibrium and kinetically controlled chemical reactions. The scheme differs from the majority of other hydrogeochemical transport models (Yeh and Tripathi, 1989) in that kinetic and equilibrium chemical reactions are calculated both after the advection step and after the dispersion step. This reduces numerical dispersion and the need to iterate between chemistry and transport” – Parkhurst and Appelo, 1999.

94 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

The model can be envisioned as a series of cups (cells) filled with an initial fluid, which then is shifted (transported) from the first cell into the adjacent cell and so forth down the line of cells. In transport simulations the three most important variables are the time step, shifts and cells. “The time step is the amount of time it takes for water to travel from one cell to the next; the “shifts” define how many times water travels (shifts) from one cell to the next; and the length(s) define the length of the cells. For each cell, the velocity is the cell length divided by the time step. It takes the same length of time to traverse any of the cells, but the cells may have different lengths; therefore the velocities may change as you move through the column. It is easier to use a constant cell length and consequently a constant velocity through the system. You need to run at least as many shifts as you havecells for the front to move through the entire column”- Parkhurst, 2002. The following example is a simulation of a continuous leak of synthetic landfill leachate containing benzene into a partially consolidated silty sand aquifer. The leachate plume displaces and mixes with synthetic groundwater as it moves down the flowpath (potentiometric gradient). The number of cells and their length (meters) as defined (six cells each 11 m long) define the spatial model. This example has a very coarse spatial grid making the calculation quick. Generally, we begin at coarse spatial resolution to ensure the basic model is working and then make the spatial resolution (grid) finer to increase the detail. In order to simulate the movement of groundwater (and solutes) we define the number of shifts and the time steps. Shifts are the number of times that that the solution in cell one is moved into the adjacent cells. In the example, six shifts will move the solution in cell one all the way down the line to cell six (66 meters). The velocity is dependent on the length of the “column” (six cells x 11m = 66m), and the time step, which is the time in seconds for each shift (6 x 1.05e8 seconds = 6.3 x 10e8 seconds = 20 years) for a velocity of 3.3m/year. Porosity is not specified explicitly, but is rather implicit in the velocity in the model. The dispersion and diffusion coefficients are specified (usually derived from literature values or adjusted to fit the data). For this exercise an arbitray value of 0.1 is used. Note that the dispersivity value entered is in length (m) and is the α term in the equation DL = αv + D* where v is advective velocity and D* is the diffusion coefficient (m2/sec). For this example we are using an alpha value of 0.1 m. This value is a value for each cell. The value for dispersivity is often expressed as a fraction of path length, such as longitudinal dispersivity, L = 0.1L where L is the length of the flowpath. However, in PHREEQC the cell length is used to estimate the value not the total path length since the value will be applied to each cell. This also allows the user to assign different values to each cell to represent heterogenities. The summary figure below tabulates so of the dispersivity relationships that have been proposed and shows the scale dependency of the value.

95 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Since the calculation is made for each cell and each time step, the amount of output can be rather large. The output of transport models is managed with the SELECTED_OUTPUT, and integral subcommands print and punch.

The example specifies that the results for the sixth cell will be written to the output file after each shift, and the simulation will create a selected output file named grid.csv that contains the amounts of Na, Cl and benzene for each step. This is input file 8a. Note you will encounter a problem running this input file with the available databases. These databases do not include benzene. You will have to add the benzene solute species to the input file as per our prior example. SOLUTION_MASTER_SPECIES Benzene Benzene 0.0 SOLUTION_SPECIES Benzene = Benzene log_k 0 delta_h 0 kcal PHASES Benzene

78.0

78.0

96 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Benzene = Benzene log_k -1.64 delta_h 0 kcal Benzene(g) Benzene = Benzene log_k -0.9894 SOLUTION 0 Pulse solution leachate #solution injected Units ppb pH 7.0 density 1.00 temp 10.0 Na 39320 Cl 60660 Benzene 13.4 SOLUTION 1-6 Background solution initially filling column Units ppb pH 7.0 density 1.00 temp 25 Na 1966000 Cl 3033000 SELECTED_OUTPUT -file grid.csv -selected_out true -high_precision false # set value for all indentifiers to follow (lines 1 - 6) -reset true -simulation true -state true -solution true -distance true -time true -step true -percent_error true -totals Cl Na Benzene TRANSPORT Pulsing of Solution 0 -cells 6 -shifts 6 -time_step 1.05E8 -flow_direction forward -boundary_conditions flux flux -lengths 11.0 -dispersivities 0.1 -correct_disp true -diffusion_coefficient 0.3e-9 -stagnant 0 -thermal_diffusion 1 -initial_time 0 -print_cells 6 -print_frequency 1 -punch_cells 123456 -punch_frequency 1 END

97 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

The output file can be fairly long even for this simple simulation. A better overview of the simulation results is found in the grid.csv file that can be opened using the grid tab in the PHREEQC window. The data was copied and pasted into MS Excel to create the plot below. The figure below shows the results from input file 8a. You can see that the water containing benzene is successively moved through the cells with the water advancing one cell per shift until the benzene contaminated water reaches the last cell by twenty years. 2.5E-07

2.0E-07

0y

3.3 y

6.6y

10 y

13.2 y

16.7 y

Benzene (M)

20 y 1.5E-07

1.0E-07

5.0E-08

0.0E+00 0

10

20

30 40 distance (m)

50

60

70

Results from input file 8a showing progression of 1-D leachate plume. If we want to look in greater spatial detail, we can increase the number of cells and reduce the dimensions of each cell. We will need to increase the number of shifts accordingly. The next input file increases the number of cells to 12 and reduces the length of each cell by half (to 5.5 meters). Note that the number of shifts is increased so the leachate reaches the end of the “column” and the time step is shortened (we have more steps, if we left the time step unchanged, we would transport for 40 years not 20) and the print parameters changed so all results for all the cells are printed. We also had to change the initial solution modifer from 1-6 to 1-12 to fill all the cells with the initial solution. This is input file 8b. SOLUTION_MASTER_SPECIES Benzene Benzene 0.0 SOLUTION_SPECIES Benzene = Benzene log_k 0 delta_h 0 kcal PHASES Benzene Benzene = Benzene log_k -1.64 delta_h 0 kcal Benzene(g) Benzene = Benzene

78.0

78.0

98 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

log_k -0.9894 SOLUTION 0 Pulse solution leachate #solution injected units ppb pH 7.0 density 1.00 temp 10.0 Na 3932000 Cl 6066000 Benzene 13.4 END SOLUTION 1-12 Background solution initially filling column units ppb pH 7.0 density 1.00 temp 25 Na 1966000 Cl 3033000 END SELECTED_OUTPUT -file grid2.csv -selected_out true -high_precision false # set value for all indentifiers to follow (lines 1 - 6) -reset true -simulation true -state true -solution true -distance true -time true -distance true -step true -percent_error true -totals Cl Na Benzene TRANSPORT Pulsing of Solution 0 -cells 12 -shifts 12 -time_step 0.525E8 -flow_direction forward -boundary_conditions flux flux -length 5.5 -dispersivities 0.1 -correct_disp true -diffusion_coefficient 0.3e-9 -stagnant 0 -thermal_diffusion 1 -initial_time 0 -print_cells 12 -print_frequency 1 -punch_cells 1 2 3 4 5 6 7 8 9 10 11 12 -punch_frequency 1 END

The figure below shows the results of the new simulation with increased spatial resolution. Again the water containing benzene has successively moved through the cells with the water advancing one cell per shift. 99 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

2.5E-07

0y 4.95 y 9.9 y 14.8 y 20 y

Benzene (M)

2.0E-07

1.65 y 6.6 y 11.5 y 16.7 y

3.3 y 8.3 y 13.2 y 18.2 y

1.5E-07

1.0E-07

5.0E-08

0.0E+00 0

10

20

30 40 distance (m)

50

60

70

Results from input file 8b showing progression of 1-D leachate plume with greater spatial and temporal resolution. In most subsurface environments there is some organic component to the surfaces so we know that benzene is likely to be adsorbed to the organic surfaces during transport, which will retard its transport compared to the groundwater. In order to simulate the process the system is modified by adding a surface in each cell that can react with benzene in solution (input file 8c). This is accomplished by adding the following blocks between the SELECTED_OUTPUT and TRANSPORT blocks. The first creates the surface and characterizes the surface interactions with benzene solute. SURFACE_MASTER_SPECIES Surfa_s Surfa_sH2O SURFACE_SPECIES Surfa_sH2O = Surfa_sH2O log_k 0.0 Surfa_sH2O + Benzene = Surfa_sBenzene + H2O log_k 1.31

The second block places the surface in each cell. SURFACE 1-12 Surfa_sH2O END

1

600

0.33

The leachate in the has higher chloride concentration than the groundwater (see input file). We can use chloride as a conservative tracer and compare the chloride profile to that of benzene.

100 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

1.E+00

6

0 y Cl 9.9 y - Cl 20 y - Cl 20 y Benzene

5

1.E-01

3

Benzene ppb

Chloride (M)

4

2

1

Initial benzene = 13.4 ppb 1.E-02

0 0

10

20

30 40 distance (m)

50

60

70

The plot shows that after 20 years of transport all the cells have been flushed with leachate as indicated by the higher chloride profile, but that benzene has been retarded by sorption on the organic matter in the aquifer, which has lowered aqueous concentrations and limited travel to about 15 meters. The input file could be further modified to account for the biodegradation of benzene using the KINETIC/RATE commands, which would further reduce the concentration and could be used to evaluate the potential for natural attenuation. Another likely scenario is a spill where the contaminate addition is single event after which fresh groundwater pushes the contaminated groundwater along. In order to simulate this situation we can modify the input file as follows. First, we begin by making sure that benzene the solute and an organic surface to sorb benzene is added to the model. Then we will modify the spatial setting by making 20 cells 5 meters each for a total flow path of 100 meters. Then we will assume that the groundwater velocity is 5 meters. The first TRANSPORT block will move one slug of contaminated water 1 shift. This is followed by 19 shifts using the original pore water for a total of 20 shifts for 20 cells, a flowpath of 100 meters (input file 8d). SOLUTION_MASTER_SPECIES Benzene Benzene 0.0 78.0 78.0 SOLUTION_SPECIES Benzene = Benzene log_k 0 delta_h 0 kcal PHASES Benzene Benzene = Benzene log_k -1.64 delta_h 0 kcal SURFACE_MASTER_SPECIES

101 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

Surfa_s Surfa_sH2O SURFACE_SPECIES Surfa_sH2O = Surfa_sH2O log_k 0.0 Surfa_sH2O + Benzene = Surfa_sBenzene + H2O log_k 1.31 SOLUTION 0 Pulse solution leachate #solution injected units ppb pH 7.0 density 1.00 temp 10.0 Na 3932000 Cl 6066000 Benzene 13.4 SOLUTION 1-20 Background solution initially filling column units ppb pH 7.0 density 1.00 temp 25 Na 1966000 Cl 3033000 SELECTED_OUTPUT -file grid4.csv -molalities Surfa_sBenzene -selected_out true -high_precision false # set value for all indentifiers to follow (lines 1 - 6) -reset true -simulation true -state true -solution true -distance true -time true -distance true -step true -percent_error true -totals Cl Na Benzene SURFACE 1-20 Surfa_sH2O 1 600 0.33 #the surface binding site name, sites in moles, specific area of surface # in m2/g and the mass of surface in grams (per kilogram of solution) END TRANSPORT Pulsing of Solution 0 # simulation of 100 meter flowpath, cell length times cells -cells 20 -shifts 1 -time_step 0.31536E8 # default in seconds #shifts times time step gives total time of simulation # velocity is total length/time, uniform cell length gives constant velocity #for this example of 100 meters in 20 years, velocity is 5 m/y -flow_direction forward -boundary_conditions flux flux -lengths 5 -dispersivities 0.1 -correct_disp true -diffusion_coefficient 0.3e-9

102 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

-stagnant 0 -thermal_diffusion 1 -initial_time 0 -print_cells 20 -print_frequency 1 -punch_cells 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -punch_frequency 1 END SOLUTION 0 Background solution initially filling column units ppb pH 7.0 density 1.00 temp 25 Na 1966000 Cl 3033000 TRANSPORT Pulsing of Solution 0 -cells 20 -shifts 19 -time_step 0.31536E8 -flow_direction forward -boundary_conditions flux flux -length 5 -dispersivities 0.1 -correct_disp true -diffusion_coefficient 0.3e-9 -stagnant 0 -thermal_diffusion 1 -initial_time 0 -print_cells 20 -print_frequency 1 -punch_cells 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -punch_frequency 1 END

By setting the number of surface sites to zero in the SURFACE command block, we can simulate the movement of benzene without the retardation caused by sorption. Then we can reset the number of moles of surface sites back to 1 moles and re-run the simulation. The result of the simulation shows that the initial introduction of the benzene creates a slug in which the center of mass travels 100 meters in 20 years with spreading of solute controlled by the dispersivity value and the groundwater velocity.

103 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

14 1 year 12

5 years 10 years 15 years

Benzene (ppm)

10

20 years 8

6

4

2

0 0

20

40

60

80

100

Distance (meters)

Results from simulation without retardation of benzene. The simulation where benzene is retarded by sorption to the organic surface shows that the dissolved benzene transport is very small since most of the organic solute is partitioned onto the surface in the first cell lowering the dissolved content. The continuous flushing of the first cell by more clean water gradually removes the sorbed benzene (pump and treat), but even after 20 years the benzene on the surface has only decreased by about half and the majority of the benzene has been moved into the surfaces in the adjacent cells.

Benzene (ppm)

14 12

cell 1 solution cell 1 surface

10

cell 2 surface cell 3 surface

8 6 4 2 0 0

5

10

15

20

Time (years)

Results from simulation with retardation of benzene. 104 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

We can use the transport feature in PHREEQC to model treatment trains for acid drainage as well. The following simulation is for the movement of acid drainage through a channel lined with calcite. Since we know the reaction of calcite to neutralize the low pH water is likely to be rapid, we will need a kinetic expression for calcite dissolution. Examine the input file (input file treatment 1). You can see first the acid drainage composition of solution 0, the “injected water”. Note that the amount of calcite to react is set to 1 mole. This is simply set to a value that is sufficient and not meant to actually represent the amount in the channel. That is, we assume calcite is in excess. We use the KINETICS and RATE commands to make the calcite dissolution time-dependent and the EQUILIBRIUM_PHASES command to make sure that any gypsum and ferrihydrite that precipitates is quantified. Note that the initial amount of potential mineral precipitates is set to zero meaning there is none initially. The precipitation is not time-dependent. This may or may not be reasonable. Finally, the SELECTED_OUTPUT command is used to track a number of factors of interest including the changes in water chemistry, how much mineral precipitates and how much calcite reacts. Finally, the PRINT command is set to false to prevent printing of all the results. You can try changing the command to true to get an idea of how much can be printed out in a TRANSPORT simulation. The printing out of all the information for each step will also tend to slow the simulation time. Your task is to start to analyze this data and tell the optimum length for the channel to achieve the best treatment. TITLE The pH increase of an acid mine water SOLUTION 0 acid mine water units mol/l pe 6.08 temp 10 pH 1.61 Al 1.13e-04 As 5.47e-07 C 3.18e-03 Ca 9.19e-04 Cd 2.27e-07 Cl 6.07e-05 Cu 8.06e-07 F 2.69e-05 Fe 2.73e-02 K 3.93e-05 Li 2.95e-06 Mg 1.47e-04 Mn 1.30e-06 N 2.47e-04 Na 2.58e-04 Ni 8.72e-07 Pb 2.47e-07 S 5.41e-02 Si 6.20e-05 U 2.15e-07 Zn 1.09e-05

105 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

SOLUTION 1-20 surface water in carbonate channel units ppm pe 6.0 temp 10 pH 8 S(6) 14.3 as SO4 Cl 2.1 N(5) 0.5 as NO3 Fe 0.06 Na 5.8 K 1.5 Mg 3.5 Ca 36.6 charge Si 3.64 C 130 as HCO3 CO2(g) -2.0 KINETICS 1-20 Calcite -tol 1e-8 -m0 1 -m 1 -parms 50

0.6

RATES Calcite -start 1 rem parm(1) = A/V, 1/dm parm(2) = exponent for m/m0 10 si_cc = si("Calcite") 20 if (m 0 then t = m/m0 90 if t = 0 then t = 1 100 moles = parm(1) * 0.1 * (t)^parm(2) 110 moles = moles * (k1 * act("H+") + k2 * act("CO2") + k3 * act("H2O")) 120 moles = moles * (1 - 10^(2/3*si_cc)) 130 moles = moles * time 140 if (moles > m) then moles = m 150 if (moles >= 0) then goto 200 160 temp = tot("Ca") 170 mc = tot("C(4)") 180 if mc < temp then temp = mc 190 if -moles > temp then moles = -temp 200 save moles -end TRANSPORT 1-20 -cells -shifts -time_step -length -dispersivities -punch_cells

20 20 25 25 0.1 1-20

# 500m total length # 20 shifts means one pore volume # time in seconds per shift [1.0 m/s] # length per cell in m # dispersivity in m # Output: all cells

106 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

-punch_frequency

1

PRINT -reset

# Output: last time step

true

EQUILIBRIUM_PHASES 1-20 Gypsum 0 0 CO2(g) -2.0 O2(g) -0.7 Fe(OH)3(a) 0 0

# gypsum precipitation without kinetics # 0.03 Vol% CO2 # 21 Vol% O2 # precipitate ironhydroxide

SELECTED_OUTPUT -file treatment_1.csv -totals Ca C Fe -molalities SO4-2 CaSO4 -saturation_indices Gypsum Calcite Fe(OH)3(a) -kinetic_reactants Calcite # how much calcite dissolves? -equilibrium_phases Gypsum Fe(OH)3(a) # how much gypsum and Fe(OH)3 precipitates? END

107 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.

List of References Allison, J. D., D. S. Brown, and K. J. Novac-Gradac, 1991, MINTEQA2/PRODEFA2, a geochemical assessment model for environmental systems: version 3.0 user's manual U.S. EPA, Athens, GA, 104 p. Appelo, C. A. J. and D. Postma, 1993, Geochemistry, groundwater and pollution. A. A. Balkema, Rotterdam. 536 p. Bethke, C. M., 1996, Geochemical Reaction Modeling – Concepts and Applications, New York, Oxford University Press, 397p. Drever, J. I., 1997, The Geochemistry of Natural Waters (3rd ed), New Jersey, Prentice-Hall Inc. 436p. Dzomback, D. A., and Morel, F. M., 1990, Surface complexation modeling: New York, John Wiley & Sons, 393 p. Engesgaard, P., and T. H. Christensen, 1988, A review of chemical solute transport models. Nordic Hydrology 19, (3): 183-216. Garrels, R.M. and F. T. Mackenzie, 1967, Origin of the chemical compositions of some springs and lakes in Equilibrium Concepts in Natural Waters, American Cancer Society, Washington D. C. p. 222-242. Glynn, P. D., P. Engesgaard, K. L. Kipp, G. E. Mallard, and D. A. Aronson, 1991, Two geochemical mass transport codes; PHREEQM and MST1D, their use and limitations at the Pinal creek toxic-waste site; U.S. geological survey toxic substances hydrology program; abstracts of the technical meeting, Monterey, California, March 11-15, 1991. Open-File Report - U.S. Geological Survey OF 91-0088, (1991): 79p. Greaser, K. K., 2004, Modeling Solid-Water Interactions in Mineralized Areas- An Example from Red Dog, Alaska: Ph.D. Thesis, Colorado School of Mines, Golden, CO, 175 p. Grove, D. B., and K. G. Stollenwerk, 1987, Chemical reactions simulated by ground-waterquality models. Water Resources Bulletin 23, (4) (Aug): 601-615. Güler C. and Thyne, G.D., 2004, Hydrologic and geologic factors controlling surface and ground water chemistry in Indian Wells-Owens Valley area and surrounding ranges, California, U.S.A. J. Hydrology 285, 177-198. Lindberg, R. D, and D. D. Runnels, 1984, Ground water redox reactions: an analysis of equilibrium state applied to Eh measurements and geochemical modeling: Science 225: 925927. Mangold, D. C., and C-F. Tsang, 1991, A summary of subsurface hydrological and hydrochemical models. Reviews of Geophysics 29, (1) (Feb): 51-79. Nordstrom, D. K., L. N. Plummer, T. M. L. Wigley, T. J. Wolery, J. W. Ball, E. A. Jenne, and R. L. Bassett, et al. 1979. Comparison of computerized chemical models for equilibrium calculations in aqueous systems; chemical modeling in aqueous systems; speciation, sorption, solubility, and kinetics. ACS Symposium Series 93: 857-892. Parkhurst, D. and C.A.J. Appelo, 1999, USER’S Guide to PHREEQC (VERSION 2)—A Computer Program for Speciation, Batch-Reaction, One-dimensional Transport and Inverse Geochemical Calculations, Water-Resources Investigations Report 99-4259. Zhu, C. and G. Anderson, 2002, Environmental Applications of Geochemical Modeling, Cambridge University Press, 284p.

108 Prepared by Science Based Solutions LLC 2007. All Rights Reserved.