AquaticChemistryForEngineers Volume 1 PDF

November 15, 2022 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download AquaticChemistryForEngineers Volume 1 PDF...

Description

 

 

 Aquatic Chemistry for engineers

 Volume 1

Starting with PHREEQC 3

P.J. de Moel J.C. van Dijk W.G.J. van der Meer  Meer 

 

2

 

 Aquatic Chemistry for engineers Self study course on PHREEQC for modelling water quality and water treatment

 Volume 1

Starting with PHREEQC 3 

November 2013

P.J. de Moel J.C. van Dijk W.G.J. van der Meer

3

 

4

 

Content 1.

Introduction

2.

Drinking water in PHREEQC 2.1 Basic concept of PHREEQC 2.2 Using PHREEQC Interactive for Pure water 2.3 PHREEQC input for a drinking water solution 2.4 PHREEQC output of initial solution calculations calculatio ns 2.5 Charge balance in solutions 2.6 Electron Electro n balancing for initial solutions 2.7 Calcium carbonate saturation

9 9 10 12 13 19 21 23  23 

3.

PHREEQC in Excel 3.1 Lined output from PHREEQC 3.2 Tabulated output from PHREEQC 3.3 Excel as PHREEQC container (PHREEQXCEL) 3.4 PHREEQXCEL applications applicati ons for water treatment

26 26 28 29 31

4.

Redox 4.1 4.2 4.3

33  33  33 34 35

4.4 4.5

5.

7

equilibrium in PHREEQC Redox condition in drinking water Oxidation states of nitrogen Inert species in nitrogen PHREEQC with inert nitrogen PHREEQC for water treatment with stimela.dat stimela.da t

Next steps

 ANNEXES    ANNEXES  Annex 1  Annex 2  Annex 3  Annex 4  Annex 5

37 38

40

Keywords for PHREEQC PHREEQC user inpu inputt Databases for PHREEQC PHREEQC Additional information information PHREEQXCEL Calcium carbonate carbonate saturation saturation in PHREEQXCEL PHREEQXCEL

LABS AND TESTS  TESTS 

41 41   43 45 51 52 61

73

 VOLUMES   VOLUMES 

119

5

 

6

 

1.

Introduction

PHREEQC PHREEQC has become the ‘de facto’ standard for water chemistry in geohydrol geohydrology. ogy. It is developed by the US Geological Survey (USGS), starting in 1980 with regular updates and extensions extensions to date. Major aspects contributed to its success are: freely available (USGS website) active and continuous continuous development scientific base, fully traceable adapted to newest scientific knowledge users can modify and extend the basics active interaction between developers and users (mostly scientists) large growing users group international international assessment and recognition. recognition. PHREEQC is famous in geohydrology but hardly known in water treatment. This might be caused by: requires above average skills in water chemistry high threshold for starters absence of scientific literature on water treatment with PHREEQC absence of educational material material for using PHREEQC in water treatment requires modifications modifications for practical application in water treatment (see Chapter 4). PHREEQC has a large potential for application in water treatment. In its basic form all relevant chemical equilibriums for water chemistry are incorporated, incorporated, including acid-base reactions, reactions for precipitation/dissolution, precipitation/dissolution, reactions for aeration/gas transfer, and redox reactions. reactions. This course ‘Aquatic Chemistry for engineers’ will guide students at their learning path in using PHREEQC for water treatment. The course assumes a minimum knowledge on water chemistry, as given in basic text books in water treatment (i.e. Drinking water - Principles and Practices, De Moel e.a., World Scientific 2006). The course is presented in three volumes: 1. Starting with PHREEQC 2. PHREEQC for drinking and waste water 3. Water treatment in PHREEQC.

Starting with PHREEQC This volume (‘Starting with PHREEQC’) PHREEQC’) gives the first steps for students in using PHREEQC for water chemistry. In chapter 2 the chemical composition of an example drinking water is used for showing the basic use of PHREEQC (program basics, input, output). Chapter 3 shows how to use PHREEQC within within Excel allowing for pre- and post processing of data. Chapter 4 deals with the modification of PHREEQC in order to make its use more applicable for water chemistry in water treatment for drinking water and waste water.  All these chapters chapters include Labs for PHREEQC exam examples, ples, with questions to ev evaluate aluate the gained gained skills. Chapter 5 shortly gives hints for further steps in using PHREEQC and an overview of advanced resources on PHREEQC.

7

 

The following table gives an overview of the chapters in Volume 1 and the PHREEQC keywords introduced in each chapter: Chapter Paragraph PHREEQC keyword Lab 2 2.2 Running PhreeqcI 2.1 2.3 SOLUTION 2.2 2.3 2.6 END 2.4 EQUILIBRIUM_PHASES (dummy) 2.7 EQUILIBRIUM_PHASES EQUILIBRIU M_PHASES 2.5 3 3.1 PRINT 3.1 USER_PRINT 3.2 SELECTED_OUTPUT 3.2 CALCULATE_VALUES USER_PUNCH 3.3 Introducing PHREEQXCEL 3.3 3.4 Introducing PHREEQXCEL applications 3.4 4 4.1 SOLUTION_SPREAD SOLUTION _SPREAD 4.1 4.3 SOLUTION_SPECIES SOLUTION _SPECIES 4.2 4.4 SOLUTION_MASTER_SPECIES 4.3 PHASES 4.5 Introducing stimela.dat stimela. dat 4.4 5 Further resources on PHREEQC -

Installing PHREEQC The program PHREEQC can be downloaded from: http://wwwbrr.cr.usgs.gov/project .usgs.gov/projects/GWC_coupled/phre s/GWC_coupled/phreeqc/ eqc/   http://wwwbrr.cr In this introduction course we will use the following  Version Name Platform Graphical User PhreeqcI Windows Interface Module Iphreeqc Windows COM (for Excel)

programs: Install-file name phreeqci-3.0.6-7757.msi phreeqci-3.0.6-7757.msi IPhreeqcCOM-3.0.6-7757-win3 IPhreeqcCOM-3.0.6-7757-win32.msi 2.msi IPhreeqcCOM-3.0.6-7757-x64.msi Both 32-bit and 64-bit COM versions should be installed on 64-bit versions of Windows

The install-file names might be changed in later releases.  Always use the latest release, since since this release release might include include resolved bugs, bugs, updated databases etc. The downloaded .msi files will (by default) create the following maps: - for PhreeqcI: C:\Program Files Files (x86)\USGS\ Phreeqc Interactive Interactive 3.0.6-7757 3.0.6-7757 - for Iphreeqc: C:\Program Files Files (x86)\USGS\ IPhreeqcCOM IPhreeqcCOM 3.0.6-775 3.0.6-7757 7 C:\ :\Program Files\USGS\ IPhreeqcCOM 3.0.6-7757 (on 64 bits Windows) Wi ndows) In these maps the followin following g sub maps will be created: - bin exe-, dll- and chm-files (computer codes and help) - databases 9 database files, including phreeqc.dat - doc pdf- and chm-files, release notes - examples 22 examples files for Iphreeqc, 1 example file for Excel (in ./com/excel).

8

 

2.

Drinking water in PHREEQC

2.1

Basic concept of PHREEQC

PHREEQC assumes water as the solvent for a solution s olution (Aqu (Aquatic atic chemistry). It starts with a known mass of water (in kilograms, indicated as kgw). This solution s olution (liquid) (liquid) may interact with gas phases and solid phases as shown in Figure 2.1. PHREEQC covers all equilibrium reactions in the solution, as well as all equilibrium by reactions to and from the gas and and soliddefault phases. A full mass overare these phases is maintained PHREEQC. PHREEQC keywords conditions for balance each phase also shown in Figure 2.1.

Figure 2.1 - PHREEQC with phases, their default composition and related keywords.

PHASES

gas

1 atm

(or EQUILIBRIUM_PHASES) (or GAS_PHASE) GAS_PHASE)

(optional)

liquid

SOLUTION

1 kg of H2O te mp 25 C

( or SOLUTION_SPREAD)

pH 7.0 pe 4.0 1 kg/L

PHASES

solid

10 mol pe r soli d

 (or EQUILIBRIUM_PHASES)

(optional)

For all elements the total amount of substance (moles) should be known, in all phases (gas, liquid/solution liquid/solut ion and solid). PHREEQC keeps track on the mass balances for each element over all phases. Also the mass balance of water is maintained, either by formation or by consumption in chemical reactions. Concentrationss are defined on molality basis, calculated from the amount of a specific solute (moles Concentration of solute, or element) divided by the mass of the solvent (kg water). For input and presentation of results PHREEQC uses degree Centigrade (0C) as unit for temperature. temperature. 0 Internally the Kelvin temperature temperature (K) is used (K = C + 273.15). PHREEQC uses the obsolete standard atmosphere (1 atm = 101.325 kPa) as standard pressure. In this course this is assumed to be equal to the modern standard state pressure of 1 bar (100 kPa). PHREEQC uses elements as main component indicators. These elements might have more than one oxidation state (called valence state in PHREEQC documentation) documentation) forming different species and phases. Calculations in PHREEQC are called ‘Simu ‘ Simulations’. lations’. One or more simulations simulations are done in a single ‘Run’. These simulations are defined in an input file, having the extension ‘pqi’. An input file has to be created by the user.  A single Run uses uses the chemical chemical definitions collected collected in a database. The default database database for PHREEQC is ‘phreeqc.dat’, but any other chemical definition in phreeqc-format can be used.  A single Run creates creates output, output, by default as an output file, file, having the extension extension ‘pqo’. PHREEQC Interactive is a container system for the calculator PHREEQC and the related files for Run, as shown in Figure 2.2. 9

 

Figure 2.2 - PHREEQC Interactive as container for the PHREEQC calculator and its related files

input.pqi

output.pqo

database.dat

2.2

Using PHREEQC Interactive for Pure water

The basic use of PHREEQC is demonstrated by using PHREEQC Interactive Interactive (see Figure 2.3). PHREEQC Interactive shows the content of three related files in a Run (.pqi, .dat, . dat, .pqo). Moreover the input file (.pqi) can be created using extensive input support via ‘ribbons’ of icons for PHREEQC keywords, as shown in i n the ribbon ’Initial condition’ in Figure 2.3.

Figure 2.3 - PHREEQC Interactive (initial view after start-up)

10

 

Student activity  activity  Study goals  goals 

Lab 2.1 - PHREEQC Interactive (PhreeqcI) for Pure water  water   - novice use of PhreeqcI - running PHREEQC input files (pqi) - learning PHREEQC’s default Solution (pure water) - mass concept in PHREEQC with total amount amount of substances (mol), mass of water (kgw), and concentrations concentrations (mol/kgw) as in molality - additional calculation results such as electrical electrical balance of ions, Electrical Conductivity (EC), density of solution, water vapour pressure

The default solution in PHREEQC is 1 kg of ‘Pure water’ (H2O) with a temperature temperature of 25 0C, pH = 7 and pe = 4, in which: pH = - lg{H+} with {H+} = activity of H+ = γH+ * [H+] pe = - lg{e-} with {e-} = imaginary activity of free electrons in half-reaction. half-reaction. These parameters and their representation in PHREEQC are: {H+} Activity of H+ (mol/kgw) [H+] Molality of H+ (mol/kgw) γH+  Gamma as activity coefficient for H+ (-) e-  E (as element) and e- (as species) lg Log ( = log10) Reactions in pure water Chemical reactions in pure water are: Dissociation of water: H O 2 Oxidation of water: 2 H2O Reduction of water: 2 H2O + 2 e-  or 2 H+ + 2 e- 



H+  + OH-  O2(aq) + 4 H+  + 4 e-  H2(aq) + 2 OH-  H2(aq).

From these chemical reactions PHREEQC calculates concentrations (molalities) (molalities) for this pure water solution as: [H2O] = 55.51 mol/kgw (solution is nearly ‘all water’) + -7 [H ] = 1.001 * 10   mol/kgw (extreme low concentration) concentrati on) [OH-] = 1.013 * 10-7  mol/kgw (extreme low concentration) concentration) -23 [H2(aq)] = 1.416 * 10   mol/kgw (negligible (neglig ible concentration) concentrati on) [O2(aq)] = 0 mol/kgw (absent). The calculated molality of H2O reflects the molar mass (or gram formula weight gfw in PHREEQC): 1 mol H2O = 1.008*2 + 16.0 = 18.016 g = 0.018016 kg, or 1/0.018016 = 55.506 mol H2O/kg water. Equilibrium for gases H2O, H2 and O2 are also defined as gases H 2O(g), H2(g) and O2(g) in phreeqc.dat (in PHASES) with their equilibrium reactions: Water vapour: H2O H2O(g) Henry’s law for H2: H2(aq) H2(g) Henry’s law for O2: O2(aq) O2(g). PHREEQC calculates the SI values in the solution for these three gases. For dissolved gases the saturation index (SI) is defined as: SI = lg(pa), with pa as the partial pressure of this gas in the gas phase. From the PHREEQC values for SI the partial pressure of these gases can be calculated: H2O(g): SI = -1.50 pa  = 10-1.50  = 0.031 atm H2(g): SI = -22.05 pa  = 10-22.05  = 0.000 atm (negligible) O2(g): SI = -39.19 pa  = 10-39.19 = 0.000 atm (negligible). The solution is in equilibrium with a gas phase with a partial pressure for H2O of 0.031 atm. This pressure is the vapour pressure of water at 25 0C. This concept shows that the concentration of a gas in a solution (aq) can also be expressed as a gas pressure being the equilibrium partial pressure of that gas in the gas phase (g).

11

 

2.3

PHREEQ PHREEQC C input for a drinking water solution

The chemical composition of an example drinking water is given in Table 2.1. With respect to water chemistry drinking water is much ‘simpler’ than (anaerobic) groundwater groundwater with its more complicated redox reactions, or natural seawater with its large content of dissolved solids.

Table 2.1 - Composition Parameter / Element Temperature Hydrogen ion activity Calcium Magnesium Sodium Potassium Bicarbonate Chloride Nitrate Sulphate Oxygen

of example drinking drinking water   Unit 0 C t pH 2+ mg/l as Ca Ca   2+ mg/l as Mg Mg   mg/l as Na Na+  + mg/l as K K    HCO3   mg/L as HCO3  Cl   mg/L as Cl NO3   mg/L as NO3  2SO4   mg/L as SO4  O2  mg/L as O2 

Value 10 7.3 56 5.6 7 2 149 9 10 39 11

Remark

 Assume: Alkalinity Alkalinity = [HCO3-]

The example drinking water of Table 2.1 is converted int into o a PHREEQC input file (see Lab 2.2) with the result as presented in Figure 2.4.

Student activity  activity  Study goals  goals 

Lab 2.2 - PHREEQC input with SOLUTION  SOLUTION  - solution quantities in PHREEQC (/L, /kgs, /kgw) - element qualities in PHREEQC (g, kg, mol) - specific input items (Alkalinity, N(5), S(6), O(0)) - PHREEQC comment marker (#) - simulation input delimiter (END, (end-of-file))

Figure 2.4 - PhreeqcI with input data from from Table 2.1

12

 

PHREEQC uses the keyword SOLUTION and SOLUTION_SPREAD SOLUTION_SPREAD for input of elements in the solution. PHREEQC uses chemical elements, elements, such as Ca, Mg, Na, N and S as prime input parameters. These elements might be subdivided into oxidation states of an element, such as N(+5), S(+6) and O(0). The elements, oxidation states and their definitions are obtained from the PHREEQC database. PHREEQC uses amount of substance (mole) as prime quantity for elements, and mass of water (kg, or kgw) as prima quantity for the solvent. The amount of substance for an element in solution is calculated from its molal concentration (molality in mol/kgw) and the mass of water (default 1 kg). Next to molal concentration concentration PHREEQC accepts concentrations per mass of ssolution olution (kgs) or per volume of solution (L). The latter uses the density of solution (default 1 kg/L) to convert into molality Within the SOLUTION SOLUTION block all concentrations concentrations should be in the same group (either /kgw,  /kgs, or /L). The conversion from mass concentration (g, mg) to molal concentrations (mol, mmol) is based on the molar mass (g/mol) of the element from the database. It is recommended recommended to include the chemical formula in the input for mass concentration, by example for 39 mg/L sulphate: ‘S(6) 39 mg/L as SO4’. Special attention should be given to oxygen since PHREEQC uses moles O and not moles O2, so 10 mg/L O2 should not be entered as ‘O 11 mg/L as O2’, but as ‘O 11 mg/L as O’. Some elements in the drinking water analysis are defined in phreeq.dat as a single oxidation state (Ca, Mg, Na, K and Cl), and others are defined in multiple oxidation oxidation states (C, N, S, H and O). O) . The latter elements can be specified as total concentrati concentration on for this element either or as concentration concentration of (one or more of) its oxidation states states.. TheO,elements O have asolution special,status their multiple appearances (H H+, OH-,HOand and H 2inO PHREEQC being the because solvent inofPHREEQC. Their data will always 2 2, H2) in the solution, be within the output of PHREEQC. The speciation of elements is calculated in PHREEQC based on pH and pe. The initial value for pe can be given either as input value or as the value for a specific redox couple. It is recommended to use ‘redox O(-2)/O(0)’ for drinking water solutions since drinking water always contains a minimum minimum amount of dissolved oxygen O(0), which highly determines the pe-value in water. The O(-2) oxidation state is always included in PHREEQC being the oxidation state of oxygen in H2O. Each keyword END marks the end of the input of a solution, and starts the calculation/simulation calculation/simulation.. The ‘end of the input file’ is also regarded as END marker. With the keyword SOLUTION_SPREAD concentrations concentrations of solutions can be inputted in a columnbased setup, which is useful for input of multiple solutions. solutions. This input feature is discussed in the paragraph ‘PHREEQC in Excel’.

2.4

PHREEQC output of initial solution calculation calculations s

The input file can be run in PhreeqcI, giving the output result in the main PhreeqcI panel (see Figure 2.5).

Student activity  activity  Study goals  goals 

Lab 2.3 - Phreeqc output for initial solution calculations  calculations  - learning sections in PHREEQC output - learning output parameters in each section

13

 

Figure 2.5 - PhreeqcI output for initial calculations (from Lab_2_3.pqo)

The output of PHREEQC is grouped in 5 sections, as shown in Table 2.2. Table 2.2 - PhreeqcI output sections Output section Description Solution composition Molality and moles for all elements 3  Description of solution General parameters parameters 4  Redox couples 1  pe and redox potential (Eh) for all redox couples

Main purpose Input check Calculated overall parameters Electron balance in input

Distribution of species

Molality, activity, gamma and molar Speciation volume of all species, with total molality per oxidation state of an element 3  Distribution of alkalinity 2  Contribution in alkalinity per  Acid-base buffering dissolved species, as well as molality and Alkalinity-molality ratio Saturation indices SI, IAP and K values for all phases Relation to gas and solid phases 1  Only in initial calculation, when unbalanced redox couples are present 2  Only in output if –alkalinity=true under PRINT 3  For initial calculation: calculation: values only for the oxidation state given in the input file 4  For initial calculation: including Total CO2, if Alkalinity is given in the input

Solution composition The section ‘Solution composition’ gives the molality and theconverts amount the of substance (moles) for each element, or its oxidation state. The (mol/kgw) ‘initial ‘initial calculation’ input values of each element (in mg/L) into molality (in mol/kgw) and the amount (in moles) based on the molar 14

 

mass of each element (from the database), the mass of water (from the input file) and the density of the solution (from the input file) . The input values, molar masses and calculated molarities (Excel) and molalities (PHREEQC) for the example drinking water are shown in Table 2.3. The molair mass of each element is obtained from the used database (phreeqc.dat). (Suggestion: calculate Molarity in Excel from Input values and molar masses for each element)

Table 2.3 - Input data and calculated Molarities (Excel) and Molalities (PhreeqcI) Element Input Molar mass Molarity (mg/L) as (g/mol) (mmol/L) Ca 56 Ca 40.08 1.397 Mg 5.6 Mg 24.312 0.230 Na 7 Na 22.9898 0.304 K 2 K 39.102 0.051  Alkalinity 149 HCO3 61.0191 2.442 * Cl 9 Cl 35.453 0.254 N(5) 10 NO3 62.0067 0.161 S(6) 39 SO4 96.064 0.406 O(0) 11 O 16.0 0.688 * meq/L resp. meq/kgw

Molality (mmol/kgw) 1.398 0.230 0.305 0.051 2.443 * 0.254 0.161 0.406 0.688

Molarity (mmol/L) (mmol/L) and molality (mmol/kgw) in Table 2.3 are almost equal (in 3 decimals) for all elements, as 1 L solution is nearly 1 kg of water (density 1 kg/L, very low mass of solutes). (Suggestion: repeat this example with density = 0.997 kg/L) Molality (mol/kgw) and the amount of substance (moles) are identical for the example water as the solution is defined for 1 kg of water. (Suggestion: repeat this example with water = 2 kg) The solution composition shows oxidation oxidation states of elements and Alkalinity only in the ‘Initial calculation’. Trailing simulation only includes molalities and amounts of substances for elements, elements, being the internal parameters in PHREEQC. Description of solution The section ‘Description of solution’ includes some general parameters as presented in T Table able 2.4.

Table 2.4 - Some results from Description of solution section for the example drinking water Parameter Specific Conductance Density  Volume Ionic strength Total carbon (C) Electrical balance Percent error (Cat-An / Cat+An)

µS/cmUnit (at 10 oC) g/cm3  L mmol/kgw mmol/kgw meq %

Value 246 0.99994 1.00052 5.425 2.764 -0.058 -0.83

Remark 1 µS/cm = 0.1 mS/m 1 g/cm3 = 1 kg/L

-0.058 meq/kgw (in 1 kgw)

The Specific Conductance (SC) also called Electrical Conductivity (EC) is calculated by PHREEQC from the concentrations using the diffusion coefficients for each species as given in the database (-dw in SOLUTION_SPECIES). In water analyses SC or EC is most often reported for a fixed temperature (20 or 25 0C) using either measuring devices with a fixed water temperature or using a mathematical mathematical algorithm. PHREEQC calculates SC or EC for the actual water temperature, sin since ce a change in water temperature will also change the distribution of species. (Suggestion: repeat this example with temperature = 25 0 C) 15

 

The density and volume of the water are calculated by PHREEQC using concentration concentrationss (mol/kgw) 3 and molar volumes of species (cm  /mol), as well well as temperature, temperature, pressure and ionic ionic strength. The example drinking water has a calculated density of 0.99994 kg/L. (Suggestion: repeat this example with temperature = 25 0 C) The calculated density of 0.99994 kg/L is 0.006% lower than the input value of 1 kg/L. This calculated value might be regarded as a more reliable density to be used as input density. (Suggestion: repeat this example with density = 0.99994 kg/L) Ionic strength is calculated from the concentrations concentrations (c) and charge (z) of species s pecies (as ½ ∑cz2). The ionic strength is used in models for calculating the activity of species. s pecies. The ionic strength of the example drinking water is 5.425 mmol/kgw. (Suggestion: calculate Ionic strength in Excel from Molarity and (assumed) charge of each element) Total carbon is the sum of concentrations concentrations of C-species, including C(4) and C(-4). Total CO2 only includes C(4) species. The concentrations for individual species are shown in the section Distribution of species.  An ionic solution solution is electrical electrical in balance, balance, since the equivalent equivalent charge of cations should should be equal to the equivalent charge of anions. A difference in these values indicates omissio omissions ns or inaccuracies in the water analysis. The example solution shows a percent error of 0.83% and a charge imbalance of -0.058 meq/kgw, which can be regarded in balance in view of analysis accuracy of 1 to 3%. (Suggestion: calculate electrical balance in Excel from Molarity and charge of each element) The parameter Total Dissolved Solids (TDS) is often reported in water analyses, either by measurement (drying and weighting) or by calculation. calculation. From the input values TDS can easily be calculated as 278 mg/L. TDS is not a PHREEQC output output parameter, but can be calculated in i n PHREEQC using additional program code in the user input file. (Suggestion: calculate TDS in Excel from Input values of each element)

Redox couples The section ‘Redox couples’ gives the calculated electron activity (as pe=lg{e-}) and redox potential (in volts) for all redox couples. The example water only includes the O(-2)/O(0) redox couple as O(-2) is the oxidation state of oxygen in H2O, and O(0) in dissolved O2. The related half-reaction half-reaction is: + 2 H2O O2  + 4 H   + 4 e-  PHREEQC calculates pe = lg{e-} using the equilibrium constant for this half-reaction as given in the database. In the example water pe=14.6647 which equals a redox potential of 823.4 mV (EH = pe * 2.3 * RT/F). (Suggestion: repeat this example with O2 = 1.1, 0.11 and 0.011 mg/L)

Distribution of species The largest section in the output is the Distribution of species, which gives all the ion forms (‘species’) of the elements in the solution, also known as ‘speciation’. ‘speciation’. Table 2.5 gives the number of species for each element, and its major species.

16

 

Table 2.5 - Speciation for the elements in solution Element Molality Number (Oxidation state) (mmol/kgw) of species Ca 1.398 6 Mg 0.230 5 Na 0.305 5 K 0.051 2 C (+4) 2.764 9 Cl 0.254 1 N (+5) 0.161 1 S (+6) 0.406 7 O (0) 0.688 1 3 O (-2) 55.51 10   3

Major species Ca2+  Mg2+  Na+  K +  HCO3-  Cl-  NO3-  SO42-  O2  H2O

95.3% 95.1% 99.7% 99.9% 87.1% 100.0% 100.0% 88.1% 50.0% 100.0%

Table 2.5 shows that most elements have more than one species, with one dominant dominant species (>85%). By example for Calcium the dominant species is Ca 2+, but also CaHCO3-, CaSO40 (aq), CaCO30 (aq) are found. In water analyses most often the concentration of an element is reported by its major species. Multiple species per element are ignored but the method of analysis actually measures the concentration of an element. For example the reported analysis for sulphate includes the dissolved species SO42-, CaSO4 (aq), MgSO4 (aq) etc. Discarding this phenomenon will result in overestimating the saturation state of the solid phase CaSO 4 (s), since the real or actual concentration concentrationss of Ca2+ and SO42- are lower than the reported values. Figure 2.6 gives the distribution of species for Calcium and Sulphur/Sulphate. Sulphur/Sulphate. Figure 2.6 - Distribution of species for Calcium and Sulphate

PHREEQC calculates the concentration of C (+4) from pH and Alkalinity. For the example water the molality of C(4) was calculat calculated ed as 2.764 mmol/kgw, mmol/kgw, with HCO3- and CO2  as the major species, as can been seen in Figure 2.7. The calculated concentration [CO2] = 0.325 mmol/kgw can be expressed as 0.325 * (12.0111+16.0*2) (12.0111+16.0*2) = 14.3 mg/kgw CO2 or some 14.3 mg CO2 per litre solution.

17

 

Figure 2.7 - Distribution of species for Carbon C(+4)

For the example water the molality of O(0) was calculated as 0.6877 mmol/kgw with [O2] = 0.3438 mmol/kgw. This calculated concentration concentration can be expressed as 0.3438 * (16.0*2) = 11.0 mg/L O 2  which equals the input value (see Table 2.1). The Distribution of species section also shows Log Molality, Activity, Log Activity and Log Gamma which are related as: {Activity} = γ * [ Molality] or Log Activity = Log Gamma + Log Molality  Activities are used used in all equilibrium equilibrium calculations, calculations, while while Molalitie Molalitiess are used in all all mass balance calculations. PHREEQC calculates Log Gamma Gamma values using the ‘Extended Debye-H Debye-Hückel ückel model’ and more recent extensions of Davies, WATEQF, LLNL, Pitzer and SIT. Ionic strength and charge of species are the most important factors in these models. The selected model is controlled by the values in the PHREEQC database. Table 2.6 gives the Log Gamma and Gamma values for the example water, illustrating the importance of the charge of species in the activity coefficient gamma. Table 2.6 - Alkalinity in the example water Charge of species Log Gamma 0 H2O +0.000 0 others +0.001 1 -0.034 - -0.030 2 -0.131 - -0.128

Gamma γ  1.000 1.002 0.925 - 0.933 0.740 – 0,745

Example species H2O CO2(aq) O2(aq) CaSO4(aq) Na+  HCO3-  Cl-  Ca2+  Mg2+  SO42- 

Molar volumes in the Distribution of species section are used for calculating density and pressure related parameters.

Distribution of Alkalinity The section Distribution of Alkalinity is by default not included in the PHREEQC output file. It will be included by adding the following command line line in the input code (see Chapter 3): PRINT; -alk true (Suggestion: run the example with “PRINT; -alk true” in the input code, to get the Alkalinity section)  Alkalinity is defined defined as the acid consumption consumption (in meq/kgw) for for titration to pH=4.5. Alkalinity Alkalinity can be calculated from:  Alkalinity = [HCO [HCO3-] + 2 [CO32-] + [OH-] - [H+] + [CaHCO3+] + [MgHCO3+] + 2 [CaCO3] + … Table 2.7 gives the breakdown of Alkalinity for the example water. The Alkalinity-Molality ratio is defined per element in the PHREEQC database (in the column Alk of SOLUTION_MASTER_SPECIES SOLUTION_MASTER_SPECIES)) and is determined for species from the chemical reactio reaction n in the database.

18

 

Table 2.7 - Alkalinity in the example water Species Molality  Alkalinity/ (mmol/kgw) Molality ratio HCO3   2.407 1 + CaHCO3   0.022 1 MgHCO3+  0.004 1 CO32-  0.002 2 CaCO3  0.002 2 NaHCO3   0.000 1 Others 0.001 -1 to 2 Total

 Alkalinity (meq/kgw) 2.407 0.022 0.004 0.004 0.004 0.000 0.000 2.443

98.6% 0.9% 0.2% 0.2% 0.2% 0.0% 0.0% 100%

Table 2.7 shows that the total molality of all HCO 3 species (2.407+0.022+0.004=2.43 (2.407+0.022+0.004=2.433 3 mol/kgw) is nearly equal to Alkalinity (2.443 meq/kgw). Equality was assumed in the input solution in order to get the proper Alkalinity (meq/kgw) from analysis data for HCO3- (mg/L). In laboratory practices the result of an Alkalinity measurement measurement is often reported as HCO3-  concentration.

Saturation indices The section Saturation indices gives the relation of the solution to solids and gases, defined under PHASES in the database. Saturation indices are calculated from: - solids, gases: SI = lg(IAP/K s) with IAP as Ion Acti Activity vity Product and K s as Solubility Product - gases:

SI = lg(pa)

with pa as partial pressure in the gas phase (in equilibrium). equilibrium).

The section gives the name and the chemical formula (last column column)) for solids and gases gas es defined in the database under PHASES. This section presents calculated values for SI, lg(IAP) and lg(K s) having the relation: SI = LOG IAP - LOG K The calculated Saturation indices for the example water are shown in Table 2.8. Table 2.8 - Saturation indices for phases, with equivalent partial pressure for gases Phase Name Formula SI pa  (-) (atm) Solid Calcite CaCO3  -0.43  Aragonite CaCO3  -0.59 Dolomite CaCO3.MgCO3  -1.75

Gas

Gypsum  Anhydrite Halite Sylvite O2(g) H2O(g) CO2(g) H2(g)

CaSO4 .2H2O CaSO 4 NaCl KCl O2  H2O CO2  H2 

-1.99 -2.46 -8.74 -8.69 -0.70 -1.91 -2.22 -43.95

Total

0.200 0.012 0.006 0.000 0.218

The solution is undersaturated to all solids, since all values for SI are negative.  A supersaturated solution solution contains contains ions for which the Activity Product Product IAP is is larger than the the Solubility Solubility Product K s of a solid phase (IAP > K s  or SI > 0.0). An undersaturated undersaturated solution solution will dissolve dissolve a solid in case this solid is in contact with the solution. The SI value indicates the driving force to dissolution or precipitation of solids. The negative SI value for Calcite marks this solution solution as aggressive to constructions constructions and pipe materials with CaCO3 like concrete, asbestos cement, cement linings etc. 19

 

It should be noticed that Table 2.8 shows two different SI values for the solid phase of CaCO3, related to the crystalline forms Calcite and Aragonite. The lower SI for Calcite indicates that Calcite is the dominant scaling deposit in water over Aragonite, at this temperature temperature and pressure. Other crystalline forms of CaCO 3 such as Vaterite, Monohydrocalcite Monohydrocalcite (CaCO3.H2O) and Ikaite (CaCO3.6H2O) are not included in the database phreeqc.dat and therefore not included in the output. The large negative SI values for Halite and Sylvite reflect the high solubility of Na, K and Cl in water. The solution is supersaturated for gases, if the total gas pressure is larger than the solution pressure. Assuming a solution pressure of 1.000 atm in the example water all dissolved gases will stay in solution, without any gas bubble formation, since the total equivalent gas pressure is only 0.218 atm. It should be noticed that the equivalent O 2 pressure is equal to the partial pressure of O2 in the atmosphere. It might be assumed that the water analysis lacks a value for dissolved N2 for which a equivalent partial pressure of 0.78 atm looks an appropriate guess, corresponding to SI=lg(0.78)=0,108. (Suggestion: repeat this example with N 2  2  = 20 mg/L, in code: N(0) 20 as N) (Suggestion: repeat this example with p(N 2  2 )      = 0.78 atm, in code: N(0) N2(g) -0.108) The molality of CO2 is almost equal to the molality of O2 (0.325 versus versus 0.344 mmol/kgw). mmol/kgw). However the equivalent partial pressure of CO2(g) is only 0.006 atm versus 0.200 atm for O2(g). This reflexes the far better solubility in water of CO 2 compared to O2. The SI values and equivalent partial pressures of H 2O (vapour pressure) and H2 have been discussed in Chapter 2.2 for pure water with temperature temperature 25 0C.

2.5

Charge balance in solutions solutions  

 A solution with with ionic species species should always always be in ‘charge ‘charge balance’, i.e. the total total charge of tthe he cations should be in balance with the anions. Checking the charge balance is the first step in checking the reliability and accuracy of a water analysis. In general practice of water techno technology logy this is done by assuming that a dissolved element is present in the water as only one species. By example Calcium is assumed to be present as Ca2+ only. Such classic charge balance calculation is presented in Table 2.9 for the example water, based on Molarity in Table 2.3. (Suggestion: calculate in Excel all values in the last column of Table 2.9)

Table 2.9 - Classic charge balance calculation with one assumed species per element Element Ca Mg Na K Total cations  Alkalinity Cl N(+5) S(+6) Total anions Electrical balance Percent error

Assumed species

Molarity

Electrical charge

Ca   Mg2+  Na+  K + 

(mmol/L) 1.397 0.230 0.304 0.051

+2 +2 +1 +1

HCO3-  Cl-  NO3-  SO42- 

2.442 0.254 0.161 0.406

-1 -1 -1 -2

2+

20

Molar equivalent (meq/L) 2.794 0.461 0.304 0.051 3.611 2.442 0.254 0.161 0.812 3.669 -0.058 -0.80%

 

The Electrical balance of -0.058 meq/L is equal to the value calculated by PHREEQC (in meq/kgw, see Table 2.3). Percent error of -0.80% is lower (PHREEQC -0.83%) since the concentrations of anions and cations is lower in PHREEQC than in Table 2.6 due to ion-pairs such as CaSO4 (aq).

Charge balancing in PHREEQC Charge balancing is not automaticall automatically y done by PHREEQC. PHREEQC accepts unbalanced charge in a solution, assuming that the unbalance is caused by not-modelled ions. The charge balance is reported in PHREEQC under Description Description of solution as Electrical balance, and Percent error. The Electrical balance shows the total equivalents needed for charge balancing, which means needed for the total mass of water. The Percent error is reported as the charge difference divided by the sum of the charges. It should be noticed that in many other publication publicationss charge unbalance is reported as percentage of the mean value of cations and anions, which gives doubled values compared to PHREEQC. Omitting solution data in not recommended in using PHREEQC since this lacks proper calculation of ionic strength, species (ion pairs), conductivity etc. Charge balancing is not recommended recommended for solution with only a small charge error. Standard Methods 1030E might be used as a reference for acceptable charge errors (error < 0.2 meq/kgw for total anion content < 3 meq/kgw, or error < 2% for total anion content between 3 and 10 meq/kgw).

Charge option in SOLUTION PHREEQC can perform charge balancing by adding the keyword ‘charge’ to the input code of only one element in the solution, solution, by example ‘Ca ‘Ca 56 as Ca charge’. In this case the init initial ial Molality of 1.398 mmol/kgw is modified to a Molality of 1.427 mmol/kgw with a perfect charge balance (Percent error = 0.00%). Table 2.10 gives the results of charge balancing for all elements of the example water. (Suggestion: run the example with ‘charge’ added to the input code for one element) (Suggestion: repeat this for all elements to get the results of Table 2.10)

Table 2.10 - Charge balancing for all elements in the example water Element Molality Balanced Molality Difference (Oxidation state) (mmol/kgw) (mmol/kgw) (mmol/kgw) Ca 1.398 1.427 +0.029 Mg 0.230 0.259 +0.029 Na 0.305 0.363 +0.058 K 0.051 0.109 +0.058  Alkalinity 2.443 not in PHREEQC PHREEQC * Cl 0.254 0.196 -0.058 N (+5) 0.161 0.103 -0.058 S (+6) 0.406 0.377 -0.029 * charge balancing is not allowed in PHREEQC for Alkalinity

102.1% 112.6% 119.0% 213.7% 77.2% 64.0% 92.9%

Table 2.10 shows that the Electrical balance error of -0.058 meq/kgw can be compensated by either increasing the content of a cation 0.058 meq/kgw or by decreasing the content of an anion with 0.058 meq/kgw. In water treatment practices an accuracy of 5 to 10 % per element can be achieved in sampling plus analyzing. The calculated Electrical balance might be caused by a relative small error in the reported value for either Calcium or Sulphate. Other elements in Table 2.10 would need a deviation of more than 10% to achieve full charge balance. (Suggestion: explain the different values of 0.029 versus 0.058 in Table 2.10)

21

 

Charge balancing in PHREEQC can also be forced for pH, as iin n ‘pH 7.3 charge’. In most cases this option is not recommended since it might seriously ‘alter’ the composition of the solution. Charge balancing with pH is not allowed in PHREEQC for solutions with Alkalinity used as input parameter for the solution. solution.

2.6

Electron balancing for initial solutions solutions  

Solutions have not only a neutral charge but also a neutral Solutions neutral electron balance. Free electrons as assumed in half-reactions for oxidation/reduction should should always be in balance with free electrons of related reduction/oxidation reduction/oxidation reactions. The total of all redox reaction in a solution should be in balance so the nett {e-} = 0. The example water contains dissolved oxygen (oxidation (oxidation state O(0)) with forms a redox couple with the water itself (oxidation state O(-2)). The related half-reaction is (see Chapter 2.2): 2 H2O O2  + 4 H+  + 4 e-  This half-reaction should be balanced with another reaction. In PHREEQC this electron balancing is done direct after the ‘initial solution calculation calculation’’ in the trailing simulation. To enforce this electron balancing it is recommended recommended to make a dummy calculation in PHREEQC. Changes in the composition of the solution caused by electron balancing can then be reviewed. A relevant change indicates improper input of the ‘initial solution’, most often caused by omitting an element with multiple oxidation states.

Student activity  activity  Study goals  goals 

Lab 2.4 - Electron balancing (pe calculation) calculation)   - learning electron balancing in PHREEQC - creating a proper PHREEQC solution (only Elements, pH and pe) - understanding the concept of multiple redox reactions

PHREEQC uses two calculation steps to determine the composition of a solution: step 1: initial solution calculation calculatio n (Simulation 1) step 2: final solution calculation, calculation, including including electron balancing balancing (Simulation 2). The initial solution calculation calculation is focussed on the calculation of activities of all species. Most often the outcome shows a partial redox disequilibriu disequilibrium, m, i.e electrons electrons are not balanced over the redox reactions, which is fundamental impossible, as free electrons cannot exist. In the initial solution calculation the activity of each species is calculated from the input pe-value (default pe 4), the given general redox couple (with -redox) or the redox couple specified for that element (in overruling order). In the final solution calculation calculation redox reactions are allowed to proceed until an electron balance is achieved, for which a single value for pe can be reported. The redox reactions involved in electron balancing for the example water are shown in Table 2.11.  All these reactions reactions consume consume electrons, which which can be balanced balanced with the the electron producing producing half+ reaction 2 H2O --> O2  + 4 H   + 4 e . This half reaction also produces H+ which counteracts with reactions in Table 2.11 which all consume H+. The net effect will be visible in the change of pH (difference between Simulation 1 and Simulation 2).

22

 

Table 2.11 - Redox reactions involved in electron balancing (from phreeqc.dat) and their molality after electron balancing for the example water Other Reaction * Final Element / oxidation Molality Oxidation state state (mmol/kgw)   % (mmol/kgw) 22+ C(+4) - CO3   C(-4) – CH4  CO3  + 10 H  + 8 e  --> CH4(aq) + 3 H2O 0.000 0.0% + N(+5) - NO3   N(+3) - NO2   NO3  + 2 H  + 2 e  --> NO2   + H2O 0.000 0.0% + N(0) - N2  2 NO3  + 12 H  + 10 e  --> N2(aq) + 6 H2O 0.000 0.0% + + + N(-3) - NH   NO  + 10 H  + 8 e  --> NH   + 3 H O 0.000 0.0% 43 242 2+ S(+6) - SO4   S(-2) – HS   SO4  + 9 H  + 8 e  --> HS  + 4 H2O 0.000 0.0% S(-2) – H2S HS  + H+ --> H2S(aq) 0.000 0.0% * dissolved species CH4(aq), N2(aq) and H2S(aq) have related gas phases CH4(g), N2(g) and H2S(g) Table 2.11 shows that electron balancing for the example water has no visible effect on the Molality of the original elements/oxidation states, since all formed oxidation states have negligible Molalities.  At the calculated calculated pe of 14.663 only the oxidation oxidation states C(+4), N(+5), and S(+6) S(+6) are relevan relevant. t. This + corresponds with the general knowledge that CH4, NH4 , NO2  and H2S are (or should s hould be) absent in aerobic drinking water. These species are normally found in anaerobic groundwater. The main differences between Simulation 1 and 2 are: Alkalinity, under Solid composition composition in Simulation 1, is replaced by data for the Element C in Simulation 2 all oxidation states under Solution composition in Simulation 1, are changed to Elements in Simulation 2 pH is recalculated in Simulation Simulation 2 (‘Charge balance’ by redox reactions) pe is calculated in Simulat Simulation ion 2 (‘Adjusted to redox equilibrium’) equilibrium’) the ‘Redox couples’ section is absent in Simulation Simulation 2 (not relevant) all oxidation states per Element are included in the Distribution Distribution of species in Simulat Simulation ion 2, with additional new species new Saturation indices are included in Simulation Simulation 2, related to the additional new species.  After specifying a solution solution PHREEQC PHREEQC makes only the initial initial solution solution calculation (Simulation (Simulation 1). The final calculation (Simulation 2) is part of the consecutive simulation (includin (including g MIX, REACTION, EQUILIBRIUM_PHASES EQUILIBRIUM_PH ASES and such). It is recomm recommended ended to check the change in pH and Molalities by electron balancing. Proper initial input results in a negligible effect on these parameters. For the example water the pH was not changed (7.300 before, 7.300 after), and Molalities Molalities were not changed significantly (see Table 2.11). PHREEQC output for Simulation Simulation 2 added calculated values for all other related species, but with negligible low values, as well as extreme low SI values for other related phases (solids and gases). (Suggestion: recreate Table 2.8 for all 16 phases after Simulation 2, and compare both results) Simulation 2 creates a ‘real’ PHREEQC solution, which is only characterized by its mass of water, Simulation total amount per Element (moles), pH, pe, temperature and pressure. All further changes in the solution are reflected in values val ues for these parameters. parameters. PHREEQC calculates the speciation of species using only these basis parameters, and their chemical definitions in the database.

2.7

Calcium carbonate saturation saturation  

Calcium carbonate (CaCO3) is the most relevant solid phase related to drinking water. It is known to the general public as Limescale, the hard, off-white, chalky deposit (precipitat (precipitated ed solid) found in cooking pots, kettles, washing machines, dishwashers and hot-water boilers. Calcium carbonate is also a major component in concrete and cement. Water with a dissolution potential tor CaCO3 will corrode concrete water reservoirs, concrete water treatment units, cement lined steel pipes, asbestos-cement pipes etc. Drinking water regulations regulations require water in equilibrium equilibrium to CaCO 3 to avoid such scaling and corrosion. 23

 

The chemical reaction for precipitation/dissolution precipitation/dissolution is: Dissociation CaCO3: CaCO3(s) Ca2+  + CO32-  The corresponding solubility product (solubility (solubility equilibrium) equilibrium) is: K s  = {Ca2+} * {CO32-} K s = 10-8.48  (calcite, 25 0C) Starting with carbonate (CO32-) the following formation formation reactions are defined in phreeqc.dat: 2Formation HCO3 : CO3   + H+  HCO3-  Formation CO2:  CO32-  + 2 H+  CO2(aq) + H2O Or combined: HCO3-  + H+  CO2(aq) + H2O The corresponding corresponding chemical equilibrium constants are: K 2  = {HCO3-} / ( {CO32-} * {H+} ) K 2 = 1010.329  (25 0C) 2+ 2 K 12 = ( {CO2(aq)} * {H2O} ) / ( {CO3 } * {H }  ) K 1122 = 1016.681  (25 0C) 12  + K 1  = ( {CO2(aq)} * {H2O} ) / ( {HCO3 } * {H } ) K 1 = 1016.681-10.329 = 106.352 It should be noted that in most textbooks the reactions are written as dissociation reaction from CO 2  with consequently inverse equilibrium constants ( K 1-1 and K 2-1 ). PHREEQC calculates calculates for solids: solids: SI = lg(IAP/K  lg(IAP/K s) with IAP as Ion Activity Product and K s as Solubilit Solubility y + Product. With pH = -lg{H }, SI can be written as: SI = lg{Ca2+} + lg{CO32-} - lgK s  = lg{Ca2+} + lg{HCO3-} - lgK 2  + pH - lgK s  In natural waters the concentrations or activities of Ca 2+ and HCO3- are often related. In most cases their origin in natural water is mainly from the dissolution of limestone, being a reaction between CO2(aq) and CaCO3: Limestone dissolving: CO2(aq) + CaCO3(s) + H2O Ca2+  + 2 HCO3-  Giving the relation: [HCO3-] = 2 [Ca2+] or approximately approximately {HCO3-} = 2 {Ca2+}. The equilibrium-pH (pHs) for CaCO3 equilibrium (SI = 0)2+can then be written as: 2+ pHs  = lgK s  + lgK 2  - (lg2 + 2 * lg{Ca }) = 1.548 - 2 * lg{Ca } (25 0C) This Calcium carbonate equilibrium is shown in Figure 2.8, assuming {Ca2+}=[Ca2+]. The equilibrium equilibrium pHs is higher for water with lower calcium content, i.e. for softer water. Drinking water in the Netherlands is softened to [Ca] between 0.5 and 1.0 mmol/kgw to supply water in equilibrium to calcite at a pH between 7.7 and 8.2. At lower pH more metal corrosion would occur with its higher uptake of lead, copper, cadmium, zinc, nickel etc in drinking water plumping. Moreover softer water gives less scaling in warm and hot water systems, and reduces detergent consumption in washing. -  2+  Figure 2.8 - Calcite Cal cite (CaCO 3  equilibrium (SI = 0, at 25 25 o C and [HCO 3  3 )   equilibrium 3 ]   = 2 [Ca   ])

[Ca2+] (mmol/kgw)

24

 

 A practical parameter parameter that is associated with with the calcium calcium carbonate saturation and and generally used is is the Calcium Carbonate Precipitation Potential (CCPP) (Standard Methods 2330, 2010), being the amount of calcium carbonate which theoretically can precipitate until equilibrium equilibrium.. SI and CCPP are positive for oversaturated water, zero for saturated water, and negative for undersaturated undersaturat ed water. Negative CCPP values are also reported as Calcium Carbonate Dissolution Dissolution Potential, Calcite Dissolution Capacity or Aggressive Carbon dioxide. Calcium Carbonate Precipitation Potential Potential (CCPP) can be calculated by PHREEQC.

Student activity  activity  Study goals  goals 

Lab 2.5 – Calcium carbonate saturation  saturation  - learning to add a solid phase in PHREEQC in contact with a solution - introducing section for Phase assemblage in PHREEQC output - understanding mass balance between solid and solution

The example water changes by dissolution of CaCO3 from the solid phase calcite, as shown in Table 2.12. Table 2.12 - Changes in solution and solid phase due to solution-calcite equilibrium reaction   Phase Parameter Unit Before reaction  After reaction reaction Change by with calcite to calcitereaction with equilibrium calcite Solution SI calcite -0.43 0.00 +0.43

Solid

SI aragonite pH Ca C  Alkalinity CO2  Calcite

mmol/kgw mmol/kgw meq/kgw mmol/kgw mmoles

-0.59 7.30 1.398 2.764 2.443 0.325 10,000

-0.16 7.65 1.562 2.928 2.772 0.167 10,000

+0.43 +0.35 +0.164 +0.164 +0.329 -0.158 -0.164

Table 2.12 shows that an equilibrium reaction between the example solution and the solid phase calcite increases both the content of Ca as well as C by 0.164 mmol/kgw. Apparently calcite (CaCO3) is dissolved from to solid into the example water. This increases also the Alkalinity and decreases the CO2-content. The Calcium Carbonate Precipitation Potential Potential (CCPP) of the sample water equals -0.164 mmol/kgw. The solid phase aragonite would allow for dissolution of more CaCO . However here calcite is the 3 most stable solid phase, reflected by its higher SI value (-0.43 versus -0.59) meaning lower solubility. Therefore CCPP should be referred to calcite for this example water. (Suggestion: run the example with ‘aragonite’ as solid equilibrium phase)

25

 

3.

PHREEQC in Excel

The output of PHREEQC is a huge dump of calculated values, as shown in previous chapter, which lacks easy access for user specific information information.. PHREEQC has 2 basis routes for creating user controlled controlled output: lined output included in the output file (such as Lab_2_5.pqo) tabulated output in a separate user defined output file (such as selected.out). Tabulated output can is beused usedinfor further data processing. This tabulated output PHREEQXCEL, based on the PHREEQC-COM module which writes PHREEQC output direct into Excel. This enables extended post processing of data, like graphs, tables, etc. Figure 3.1 gives an overview of the 2 output flows of PHREEQC: lined output is controlled with keywords PRINT and USER_PRINT tabulate tabulated d output is controlled with keywords SELECTED_OUTPUT SELECTED_OUT PUT and USER_PUNCH.

Figure 3.1 - PHREEQC in- and output flows (files), (files), in PHREEQC Interactive and PHREEQXCEL

In this chapter the output options of PHREEQC will be discussed. In paragraph 3.1 the possibilities of lined output will be presented. The options for tabulated output will be explained in paragraph 3.2. Paragraph 3.3 deals with PHREEQXCEL, in which Excel is used as container for PHREEQC (like PhreeqcI), dealing with its output data, both lined as tabulated, its input file, and its database. PHREEQXCEL is further discussed in paragraph 3.4 as framework for water treatment applications.

3.1

Lined output from PHREEQC PHREEQC  

Lined output of PHREEQC is controlled with keywords PRINT and U USER_PRI SER_PRINT. NT.

26

 

PRINT Settings following the PRINT keyword controls whether or not complete blocks such as ‘Distribution of species’ are printed in the output file (.pgo). Table 3.1 gives an overview of some settings of PRINT. The setting -censor_species controls whether species with small amount fractions are printed within the output sections ‘Distribution of species’ and ‘Distribution ‘Distribution of alkalinity’. PHREEQC user manual gives further details of these and others settings.

Table 3.1 - Some settings of keyword PRINT PRINT Setting Output Section Options -totals Solution composition Not printed if -totals false Description of solution -eh Redox couples 1  Not printed if -eh false -species Distribution of species Not printed if -species false -alkalinity Distribution of alkalinity Not printed if -alkalinit -alkalinity y false -saturation_indices -saturation_ indices Saturation indices Not printed if -saturation -saturation_indices _indices false -echo Reading input data Not printed if -echo false -censor_species Distribution of species Species not printed if amount < fraction Distribution of alkalinity 1  Only in initial calculation, when unbalanced redox couples are present

Student activity activity    Study goals goals   

3.1 –to Lined output PHREEQC -Lab learning control outputfrom sections in .pqo file (PRINT) - learning to create lined output in .pqo file (USER_PRINT)

USER_PRINT The USER_PRINT keyword marks a -start/-end block in which BASIC statements statements can be used for printing to the output file. This T his allows for printin printing g of additional text, user-defined quantities as well as user defined functions (via CALCULATE_VALUES). Figure 3.2 shows the PHREEQC program code for PRINT and USER_PRINT in Lab 3.1.

Figure 3.2 - PHREEQC program code for PRINT and USER_PRINT in Lab 3.1, with its results for the Section User print

In PHREEQC the values are printed in scientific s cientific format (xEy). Reformat Reformatting ting might be done by converting to a text string, but can better be done in post-processing tools like Excel. 27

 

PRINT and USER_PRINT controls the output starting with the simulation in which they are declared.

3.2

Tabulated output from PHREEQC PHREEQC  

The default output file from PHREEQC (.pqo-file) gives each output item at a new line. PHREEQC also allows for tabulated output into a separate file (default file name: selected.out). This file gives output as TAB T AB separated items, with a new line for consecutive simulations simulations and/or simulation steps. The filename keyword SELECTED_OUTPUT. SELECTED_O UTPUT. and general output can be set in the PHREEQC input file under the PHREEQC allows for creating user defined functions under the keyword CALCULATE_VALUES CALCULATE_VALUES..  All output items, items, including including calculated values, can be specified specified under the the keyword USER_PUNCH, USER_PUNCH, which gives more flexibility in defining tabulated output.

SELECTED_OUTPUT Settings following the SELECTED_OUTPUT SELECTED_OUTPUT keyword controls whether or not specific items should be printed, such as simulation number, number, solution number, pH, temperature and charge balance. Moreover specific items can be indicated as output such as the total concentration of specified elements, the concentration of specified species and the saturation indexes of sspecified pecified phases. By default SELECTED_OUTPUT is written to the file ‘selected.out’ unless specified differently after the setting -file.

Student activity  activity  Study goals  goals 

Lab 3.2 – Tabulated output from PHREEQC - learning to create tabulated output (SELECTED_OUTPUT) (SELECTED_OUTPUT) - learning to create user defined functions (CALCULAT (CALCULATE_VALUES) E_VALUES) - learning to create tabulated output (USER_PUNCH)

CALCULATE_VALUES PHREEQC allows for creation of user defined functions, collected under the keyword CALCULATE_VALUES. CALCULATE_VAL UES. PHREEQC Basic statements are used to calculate additional parameters. parameters. By example the Total Anion molality of a solution can be calculated from the PHREEQC parameters TOT(“charge”), giving the Molality of the electrical charge (= [Cation]-[Anion]), and Percent_error (=100*[CATION]-[ANION]/[CATI (=100*[CATION][ANION]/[CATION]+[ANION]). ON]+[ANION]). The Total Cation Molality can further be calculated by [CATION] = [ANION] + TOT(“charge”). Lab 3.2 shows the creating of this user defined function.

USER_PUNCH The USER_PUNCH keyword marks a -start/-end block in which BASIC statements can be used for printing to the selected_outpu s elected_outputt file. This allows for printing user-defined quantities as well as user defined functions (via CALCULATE_VALUES). CALCULATE_VALUES). This keyword resembles the USER_PRINT keyword but now the output items are printed in successive columns and not in successive lines (or rows). In the output file the items of SELECTED_ SELECTED_OUTPUT OUTPUT always precede the items of USER_PUNCH U SER_PUNCH.. Items from the SELECTED_OUTPUT SELECTED_OUTPUT section are printed by PHREEQC iin n a fixed order, regardless their order in the section. List items such as Totals, Molalities, Molalities, and Saturation indexes are printed in their order within these lists. Items from the USER_PUNCH sections are printed in their order iin n the Basic statements.

28

 

3.3

Excel as PHREEQC container (PHREEQXCEL) (PHREEQXCEL)  

PHREEQC vs 3 is also available as a COM-module (Iphreeqc). This module allows for two distinctive options for reading the PHREEQC user data: external .pqi input file (COM method: RunFile) internal input lines in Excel (COM methods: RunString, RunString, RunAccumulated). RunAccumulated). The output of the COM-module can be streamed into two separate files (selected.out and phreeqc.out). The output of the COM-module can also be streamed into Excel allowing for extend post-processing post-processing such as advanced tabulation, extended calculations and graphical presentation of the results. This concept allows for using Excel as a container system for PHREEQC, includin including g all related data in a single Excel-file (PHREEQXCEL), as shown in Figure 3.3. Further details of this concept are given in  Annex 4.

Figure 3.3 - PHREEQXCEL as container for the PHREEQC-COM calculator and its related files

PHREEQXCEL  App selected.out phreeqc.out input.pqi

phreeqc.log

Run..

database.dat

Figure 3.4 gives an example of a PHREEQXCEL application. PHREEQXCEL applications applications are further demonstrated in Lab 3.3 and 3.4.

29

 

Figure 3.4 - Example of a PHREEQXCEL application

Input code and database PHREEQXCEL uses the PHREEQC code from its sheet Input, and the database from its sheet Database.  Alternatively an external input input file (.pqi) might might be used, as well as an external external database (.dat). (.dat). These alternative options can be set in the sheet s heet Run_Control, Run_Control, as shown in Figure 3.5. The content of these external files is written in related sheets, which result in a single file for the complete PHREEQC Run.

Figure 3.5 - Run_Control allows for using an external input file or an external database

Output The output of PHREEQXCEL is written in Excel. No external files are created. Tabulated output is written in the sheet Output, lined output is written in sheet phreeqc.out. The tabulated output in sheet s heet Output might use format formatting ting of Excel Ex cel (Numbers, Scientific, Decimal places, Width per Column, etc.) making the values more readable. 30

 

The tabulated output is available in Excel for all kind of post-processing calculations, calculations, alternative presentation of output, graphical presentations etc. by using standard Excel functionality. Student activity  activity  Study goals  goals 

Lab 3.3 – PHREEQC in Excel (with external input file) - introduction introducti on to the concept of PHREEQXCEL - observing tabulated output in Excel (sheet Output) - observing PHREEQC code in Excel (sheet Input) - learning to import PHREEQC code in Excel (sheet Input)

3.4

PHREEQXCEL applic applications ations

The concept of PHREEQXCEL PHREEQXCEL allows for: pre-processing of PHREEQC code post-processing of PHREEQC output. Pre-processing is required for converting water quality data, from all kinds of analysis reports. All data should be converted into PHREEQC code. This might require unit conversion from nonPHREEQC units as concentrations in grams per gallon, hardness in French degree, temperature in Fahrenheit etc. Excel provides an very good platform for such data gathering and manipulation. manipulation. Post-processing is required to convert the PHREEQC outpu outputt into data which is understood by people who are not familiar with the concept, units and parameters of PHREEQC. Figure 3.5 and Figure 3.6 show s how an example of a PHREEQXCEL application as used in Lab 3.4. Further information information is given in Annex 4 and Annex 5.

Figure 3.6 - PHREEQXCEL application makes PHREEQC PHREEQC available to non-PHREEQC-experts

Student activity  activity  Study goals  goals 

Lab 3.4 – PHREEQXCEL applications - introduction introducti on to PHREEQXCEL applications

Users can create their own PHREEQXEL application, either by modifying an existing application, application, or by starting from ‘scratch’.

31

 

The minimum content a PHREEQXCEL PHREEQXCEL application is a valid PHREEQC database in the sheet Database (or an external Database specified in sheet Run_Con Run_Control), trol), and the minimal input code in the sheet Input: SELECTED_OUTPUT SOLUTION Running this input results in a simulation for Pure water, as described in Lab 2.1 and Chapter 2.2. (Suggestion: run Lab_3.3.xlsm with this minimum input code)

32

 

4.

Redox equilibrium in PHREEQC

 After calculating calculating the ‘initial ‘initial solution’ solution’ (state=i_soln) (state=i_soln) PHREEQC performs performs electron electron balancing balancing in the trailing simulation simulation (see Chapter 2.4). As a result the balanced pe v value alue of the solution is calculated. In further simulations PHREEQC will assume a redox equilibrium in the solution in order to keep the electrons in balance. This behaviour means that PHREEQC simulations will change the composition of solutions based on this electron balancing to overall redox equilibrium (i.e. a single pe value) without considering the kinetics for these redox reactions. For high reaction rates or for long residence times this assumption seems acceptable as under such conditions reactions will be completed up till equilibrium. However the nitrogen redox reactions in water treatment treatment never reach their thermodynamic equilibrium,, because of kinetic limitations. Therefore nearly all oxidation states of nitrogen are equilibrium normally encountered in solutions (NO3-, NO2-, N2 and NH4+). This is in contradiction with results obtained from PHREEQC. Therefore the databases of PHREEQC cannot be applied for water treatment without modific modifications ations for nitrogen. This limitation of PHREEQC seems for most students and researchers in water treatment the major motivation of not using PHREEQC for water treatment modelling. In this chapter the nitrogen oxidation states are discussed and the required modifications for PHREEQC will be given to define inert reactions (by changing the equilibrium equilibrium constant) or to define  ‘redox-uncoupled’ elements. elements. These m modifications odifications can be done with the keywords SOLUTION_MASTER_SPECIES, SOLUTION_SPECIES and PHASES in either user input files or in the applied database. Starting with PHREEQC version 3, phreeqc.dat includes also ‘redox-uncoupled’ ‘redox-uncoupled’ gases, for H2, O2, CH4, H2S and N2. Water W ater treatment simulations simulations additionally require ‘‘redox-un redox-uncoupled coupled elements’ for + 2+ 2+ the species NH4 , NO2 , Fe  and Mn , in order to model chemical reactions in water treatment processes. These redox-uncoupled elements are included in the database stimela.dat, which is introduced in this chapter.

4.1

Redox condition in drinking water

The redox condition in drinking water is largely determined by the oxygen content in the water. This content is determined by contact between water and ambient air, either as natural condition (surface water) or as artificial in aeration processes (groundwater). (groundwater). The Dutch drinking water regulations require a minimum minimum oxygen content of 2 mg/L. The maximum oxygen content of drinking water is achieved by intensive contact between water and ambient air. The normal oxygen content of ambient air is 21% by volume, or 0.21 bar. In Lab 4.1 PHREEQC calculates calculates the equilibrium content for oxygen in the water as 11.5 mg/kgw (0.36 mmol/kgw, at 10 0C and 0.21 bar). For such calculations the oxygen content under SOLU SOLUTION TION or SOLUTION_SPREAD can be given as “O(0) 1 O2(g) ” indicating that the oxygen content in the water has a given SI (Saturation Index) to the oxygen in the gas phase. For gases the SI is defined as SI=lg(partial pressure). This equilibrium between between gas content in water and gas content in the gas phase is known as ‘Henry’s law’. The database phreeqc.dat includes the constants for Henry’s law for the gases CO2, H2O, O2, H2, N2, H2S, CH4 and NH3,

Student activity  activity  Study goals  goals 

Lab 4.1 – Oxygen in air and water - introducing tabulated input of solutions (SOLUTION_SPREAD) (SOLUTION_SPRE AD) - introducing gas pressure as solution input parameter - introducing Henry’s law in PHREEQC - using tabulated output for graphical presentation in Excel

33

 

Figure 4.1 shows the relation between oxygen content and pe value (from ( from Lab 4.1) for water at 0 pH=7.3 and temperature 10 C, conform the example water. With oxygen content between 2.0 and 11.5 mg/kgw the pe value varies between 13.8 and 14.7. In drinking water the pe value is always above 12, depending on temperature and pH. Figure 4.1 - Oxygen content and pe, at pH=7.3 and 10 0 C (from Lab_4_1.xlsm)

4.2

Oxidation states of nitrogen nitrogen  

The PHREEQC database phreeqc.dat defines four oxidation states for nitrogen: N(5), N(3), N(0) and N(-3). Major species for these states are respectively NO3-, NO2-, N2 and NH4+. Figure 4.2 shows that N2 is the dominant phase (>90%) at pe values between -3.6 and 12.9. NH 4+ is dominant at pe < -3.6. At this pH of 7.3 some 0.4% of N(-3) is present as NH 3. NO3- is dominant at pe > 12.9. NO 2- is never significant. Figure 4.2 - Distribution of nitrogen species, at pH=7.3 and 10 0 C (from Lab_4_2.xlsm)

Under drinking water and water treatment conditions PHREEQC will convert all nitrogen species (NH4+, N2 and NO2-) into NO3- being the thermodynamic thermodynamic stable species for water containing dissolved oxygen. 34

 

Moreover PHREEQC will calculate an enormous amount of NO3- at equilibrium equilibrium for these conditions, conditions, since O2 and N2 are dissolved from outside air, and will be converted into NO 3 , which will enable more O2 and N2 to dissolve in the water. It can be calculated that this will result in pH=0.71 and NO3- = 225 mmol/kgw. To prevent this from happening many researchers do not put N2 into their model and entirely leave out the equilibrium with ambient air. For groundwater being the normal ‘habitat’ of PHREEQC this seams logically, but for water treatment this is unrealistic. The PHREEQC approach of using the real thermodynamic thermodynamic equilibriums equilibriums seems to be more a fundamental rather than a practical approach. Consequently for all reactions under the keyword fundamental SOLUTION_SPECIES SOLUTION_SPECI ES priority is given to the real thermodynamic thermodynamic equilibriums regardless the kinetics. For kinetics PHREEQC offers very ve ry powerful opportunities opportunities under the keyword RATES but this subject s ubject is only limited implemented within the databases supplied with PHREEQC. These options are regarded to be implemented by the users themselve themselves, s, since only limited data is internationally accepted as kinetic facts.

4.3

Inert species in nitrogen nitrogen  

To prevent the ‘uncontrolled’ conversion of nitrogen either the equilibrium constants for the conversion of N2 and NH4+ from other nitrogen species need to be altered, or inert (or redoxuncoupled) forms of N2 and NH4+ should be introduced. Modification of equilibrium constants for NO2- is not presented here since NO2- is under normal water treatment conditions converted into NO3- in accordance with the equilibrium conditions. conditions. However similar methods might be applied for NO 2- to prevent its conversion. Redox-inert N2  The conversion from N2 into NO3- can be prevented in PHREEQC by altering the equilibrium equilibrium constant. + Changing the log_k value for the reaction 2 NO 3  + 12 H  + 10 e  = N2 + 6 H2O into 0 makes that the formation of N2 from NO3- can be neglected. The effect of this change is shown in Figure 4.3. Now NH4+ is dominant at pe < 6.3, and NO3- at pe > 7.8. NO2- is dominant at pe between 6.3 and 7.8. N2 is never formed. Figure 4.3 - Distribution of nitrogen species, at pH=7.3 and 10 0 C, assuming redox-inert N 2  2  (from Lab_4_2.xlsm)

35

 

By setting the log_k value to 0 NO3- will no longer be converted into N2, but N2 will still be converted into NO3-. Preventing this requires the introduction of a new redox-inert species for N2. In PHREEQC version 3 the redox-uncoupled element Ntg has been introduced for this purpose. This can be seen in phreeqc.dat under SOLUTION_MASTER_SPECIES SOLUTION_MASTER_SPECIES (defining Ntg with master species Ntg), SOLUTION_SPECIES SOLUTION_SPECIES (defining species Ntg = dissolved N2) and PHASES (defining Ntg(g) in equilibrium with dissolved Ntg). Redox-inert NH4+ / NH3  The conversion from NH4+ into NO3- can be prevented in PHREEQC by altering the equilibrium constant. Changing the log_k value for the reaction NO3- + 10 H+ + 8 e- = NH4+ + 3 H2O into 0 makes that NH4+ will be negligible. The effect of this change is shown in Figure 4.4. Now NO2- is dominant at pe < 7.8 and NO3- is dominant at pe > 7.8. N2 and NH4+ are never formed. +  Figure 4.4 - Distribution of nitrogen species, at pH=7.3 and 10 0 C, assuming redox-inert N 2  2  an NH  4  4    (from Lab_4_2.xlsm)

By setting the log_k value to 0 nitrogen species will no longer be converted into NH4+, but NH4+ will still be converted. Preventing this requires the introduction introduction of a new redox-inert species for N(-3) , + i.e. NH4  and NH3. In the PHREEQC database phreeqc.dat this option is sshown hown under SOLUTION_MAS SOLUTION_MASTER_SPECIES TER_SPECIES in the (not implemented) element Amm (with master species AmmH+), with SOLUTION_SPECIES Amm equilibrium with dissolved (as NH3) and AmmH+ (as NH4+) and with PHASES Amm(g) (as NH 3(g) in equilibrium NH3).

Student activity  activity  Study goals  goals 

Lab 4.2 – Distribution of nitrogen species - introducing equilibrium constants (SOLUTION_SPECIES) (SOLUTION_SPECIES) - learning effect of redox equilibrium reactions reactions (electron balance) - learning different oxidation states of nitrogen

36

 

4.4

PHREEQC with inert nitrogen nitrogen  

Inert nitrogen species can be incorporated in PHREEQC by two alternative approaches: user input files specifying redox-inert species use of an alternative database with redox-inert redox-inert species (see par. 4.5). Redox-inert species for nitrogen can be incorporated into PHREEQC by adding the data for these species into the user data input file. The information in this file is added and even superseded over data in the chemical database itself. Inert (or redox-uncoupled gases) are included in phreeqc.dat since PHREEQC version 3 (Feb. 2013). The inert form of N2 is introduced as element Ntg, in addition to the redox-coupled element N(0). By specifying the related element under SOLUTION the user can select the most appropriate form for a particular simulation: simulation: - for redox-coupled N2: N(0) 1 N2(g) -0.1079 - for inert or redox-uncoupled N2: Ntg 1 Ntg(g) -0.1079 + The inert form of NH4  is included in phreeqc.dat but only as comment (with #). Its specification might be included in the user input file as: SOLUTI SOLUTI ON_ MASTER ASTER_ _ SPECI ES Amm AmmH+

0. 0

AmmH

SOLUTI LUTI ON_ SPEC SPECII ES AmmH+ = A Am mmH+ - gamma 2. 5 0. 0 - dw 1. 98 98ee- 9 - Vm 4. 83 837 7 2. 34 345 5 5. 52 522 2 mod odii f i ed AmmH+ = A Am mm + H+ - l og og_k _k - 9. 252 - del t a_h 12. 48 - an anal al yti c 0. 6322

- 2. 88 1. 09 096 6

kcal kcal - 0. 0012 01225

- dw 2. 28 28ee- 9 - Vm 5. 09 2. 8 8. 62

17. 0

- 2. 88

3

- 1. 45 456 6

75 75.. 0

7. 17 17ee- 3

1 # supcr supcr t

- 283 2835. 76 - 0. 05 # sup supcr cr t

AmmH+ + SO4- 2 = AmmHS HSO4O4- l og_k 1. 1. 11 PHASES Amm( g) Amm = Amm - l og og_k _k 1. 1. 7966 966 - an anal al yt i c - 18 18.. 75 758 8 3. 3. 36 3670 70ee- 4 2. 2. 51 5113 13e3 e3 4. 86 8619 19 39 39.. 19 192 2 - T_c 4 405 05.. 6 - P_c 1 11 11. 3 - Omega 0. 25

Lab 4.3 uses this approach with the specification of inert NH4+ as AmmH+. Conversion of NH4+  + The redox equilibrium half-reaction for NO3 /NH 4  (redox couple N(5)/N(-3)) is given in phreeqc.dat as: NO3- + 10 H+ + 8 e-  NH4+ + 3 H2O The related redox equilibrium equilibrium half-reaction (redox couple O(-2)/O(0)) for aerobic water is: 2 H2O O2 + 4 H+ + 4 e-  The resulting overall reaction, with electron balance is: NO3- + 10 H+ + 4 H2O NH4+ + 3 H2O + 2 O2 + 8 H+  -

or:

+

NO3  + 2 H  + H2O

+



NH4  + 2 O2 

37

 

 As seen in par. 2.4 the the thermod thermodynamic ynamic dominant dominant species for aerobic water is is NO3-, so PHREEQC converts all NH4+ to NO3-, with related O2 consumption and H+ production. For a large NH4+ content the conversion might be limited by oxygen. At an oxygen content of 0.34 mmol/kgw (11 mg O 2 /L) only 0.17 mmol mmol NH4+ /kgw can be converted (around 3.1 mg NH4+ /L). In water treatment practices this conversio conversion n of NH4+ is never observed in clear water. The conversion requires bacteria (Nitrosomonas  (Nitrosomonas   /Nitrobacter   /Nitrobacter ) with their specific kinetic limitations.

Conversion of N2  The redox equilibrium half-reaction for NO3 /N 2 (redox couple N(5)/N(0)) is given in phreeqc.dat as: 2 NO3- + 12 H+ + 10 e-  N2 + 6 H2O The related redox equilibrium equilibrium half-reaction (redox couple O(-2)/O(0)) for aerobic water is: 2 H2O O2 + 4 H+ + 4 e-  The resulting overall reaction, with electron balance is: 2 NO3- + 12 H+ + 5 H2O N2 + 6 H2O + 2.5 O2 + 10 H+  2 NO3- + 2 H+  N2 + H2O + 2.5 O 2   As seen in par. 2.4 the the thermod thermodynamic ynamic dominant dominant species for aerobic water is NO3-, so PHREEQC converts all N2 to NO3-, with related O2 consumption and H+ production. For a large N2 content the conversion might be limited by oxygen. At an oxygen content of 0.34 mmol/kgw (11 mg O 2 /L) only 0.136 mmol mmol N2 /kgw can be converted (around 3.8 mg N2 /L). Water in equilibrium with ambient air (p a-N2=0.78 atm) contains around 0.66 mmol N 2 /kgw (18.5 mg N2 /L). In this case the oxygen content is always the limiting factor. In water treatment practices this conversion of N 2 is never observed. Dissolved N 2 looks more like an inert species within the time frame of water treatment processes, water transport systems and surface water bodies.

Student activity  activity  Study goals  goals 

4.5

Lab 4.3 – Redox-inert nitrogen in PHREEQC - introducing inert elements (SOLUTION_MASTER_SPECIES) (SOLUTION_ MASTER_SPECIES) - introducing inert species (SOLUTION_SPECIES - introducing inert gases (PHASES)

PHREEQC for water treatment with stimela.dat stimela.dat  

Previous paragraph showed that the database phreeqc.dat is not suitable for application in water treatment because of the assumed equilibrium of all redox reactions. These reactions hardly reach their thermodynamic equilibrium in water treatment processes. Proper modelling requires inert elements for all relevant parameters such as: non N(+5) oxidation states of nitrogen, with species NH4+, N2. NO2-  typical anaerobic groundwater species, such as Fe2+, Mn2+, NH4+  all anaerobic gases such as CH4, H2S, NH3 (already implemented in PHREEQC version 3) These modifications are implemented in the PHREEQC database stimela.dat. This database is part of the Stimela water treatment modelling modelling platform as under development at Delft Technical University, RHDHV, Waternet and Omnisys. This database will be kept in line with modifications modifications within phreeqc.dat, modern scientific developments, and research results of Delft Technical University. This research is focussed on the development of kinetic models to be applied in the PHREEQC framework.

38

 

The inert elements might be converted into ‘normal’ elemen elements ts by means of PHREEQC keywords REACTION and/or RATES. The inert elements are regarded as ‘placeholders’, while keeping the charge balance of the solution.

Student activity  activity  Study goals  goals 

Lab 4.4 – PHREEQC with stimela.dat - introducing inert elements (SOLUTION_MASTER_SPECIES) (SOLUTION_ MASTER_SPECIES) - introducing inert species (SOLUTION_SPECIES - introducing inert gases (PHASES) - introducin i ntroducing g stimela.dat

39

 

5.

Next steps

 After studying studying the previous previous chapters chapters and finalizing finalizing the labs labs and tests tests the ba basic sic principles principles of using using PHREEQC for water chemistry modelling will be understood. Lab 5.1 and Lab 5.2 are presented without any further description, to be used as start-ups for personal model development. More advanced modelling is discussed in the trailing volumes of the series ‘Aquatic Chemistry for engineers’: Volume 2: PHREEQC for drinking and waste water Volume 3: Water treatment in PHREEQC  Volume 2 deals deals with with the equilibrium equilibrium and mass mass balance balance of most most chemical chemical reactions reactions found found in drinking drinking water. Volume 3 is focussed on the kinetics in water chemistry, as found in water treatment processes. More detailed information on these volumes is given as last section of this Volume.

Further and actual information on ‘Aquatic Chemistry for engineers’ can be found on the TU Delft OpenCourseWare website for this course:  course:  http://drinkwater.citg.tudelft.nl/AquaticChemistry .  Further information on the background of PHREEQC and additional literature is given in Annex 3.

40

 

 ANNEXES

 Annex 1

Keywords Keywords for PHREEQC PHREEQC user input

 Annex 2

Databases for PHREEQC PHREEQC

 Annex 3

Additional Additional information information

 Annex 4

PHREEQXCEL

 Annex 5

Calcium carbonate carbonate saturation in PHREEQXCEL PHREEQXCEL

41

 

42

 

 Annex 1

Keywords for PHREEQC us user er input

(adapted from PhreeqcI and  and PhreeqcI Fact Sheet) Sheet)  Data for PHREEQC are entered through a series of keyword data blocks, each of which provides a specific type of information. For example, the SOLUTION keyword data block defines the chemical composition of a solution. PhreeqcI provides tabbed dialog boxes for each PHREEQC keyword. in PhreeqcI -Data entry initial conditionsis grouped within in the following blocks (Toolbars): forward and inverse modelling modelling printing and numerical method stoichiome stoichiometry try and thermodynamic data

Initial conditions SOLUTION

Define the chemical composition of a solution

SOLUTION_SPREAD SOLUTION _SPREAD

Define the chemical composition of multiple solutions in a spreadsheet format An assemblage of minerals and gases that react to equilibrium (or until exhausted) A finite reservoir of gas that reacts with a solution

EQUILIBRIUM_PHASES EQUILIBRIUM_PH ASES GAS_PHASE SOLID_SOLUTIONS SOLID_SOLUTI ONS

DELETE

Solids that precipitate as mixtures of minerals, an important reaction for radio nuclides and other trace metals One or more sets of reaction sites for exchangeable ions, an important reaction for major cations One or more sets of sites that react by surface complexation, a major reaction for phosphorus, arsenic, and other trace elements Use the composit composition ion of previously previously defined or saved data block Allows a data entity to be copied from one index to a new index or to a range of indices Delete reactants, including solutions, solutions, phases etc.

RUN_CELLS

For running simulations simulations in a specified set of cells

END

Ends the data input for a simulation step, starts the

EXCHANGE SURFACE

USE COPY

calculation for the preceding input, and prints the results

Forward and inverse modelling REACTION_TEMPERATURE REACTION_TE MPERATURE

Changing the temperature of the reaction system

REACTION_PRESSURE REACTION_PRESSURE MIX

Changing the pressure of the reaction system Mixing together specified fractions of solutions solutions

REACTION

Addition and removal of specified elements from solution

INCREMENTAL_REACTIONS INCREMENTA L_REACTIONS

Setting whether or not reaction steps for REACTION and time steps for KINETICS data blocks are incremental incremental added to previous reactions steps BASIC language statements define rate expression expressionss for

RATES KINETICS

kinetic reactions Any non-equilibrium non-equili brium reaction, for which a rate expression express ion can be formulated 43

 

TRANSPORT  ADVECTION INVERSE_MODELING INVERSE_MOD ELING SAVE

1D advection, dispersion, dispersion, and reaction modelling 1D advection and reaction m modelling odelling Deduce mixing, mineral, and gas reactions that account for the chemical evolution of waters Save the compositio composition n following the batch reaction reactio n for use in subsequent reactions

Printing and numerical method TITLE

To include a comment for a simulation in the output file

PRINT SELECTED_OUTPUT SELECTED_OUTP UT

DUMP

To select which results are written to the output file To produce a selected-output selected-output file that is suitable for processing by spreadsheets and other data-management data-management software To define Basic programs that print user-defined quantities to the output file To define Basic programs that print user-defined quantities to the selected-output file To write complete definitions of reactants to a specific file

KNOBS

To redefine parameters that affect convergence of the

USER_GRAPH

numerical method during speciation, batch-reaction, and transport calculations To create charts of simulation results

USER_PRINT USER_PUNCH

Stoichiometry and thermodynamic data SOLUTION_MASTER_SPECIES SOLUTION_MAS TER_SPECIES

SOLUTION_SPECIES SOLUTION_SPECI ES PHASES EXCHANGE_MASTER_SPECI EXCHANGE_MAS TER_SPECIES ES

EXCHANGE_SPECIES EXCHANGE_SPECI ES SURFACE_MASTER_SPECIES SURFACE_MAST ER_SPECIES SURFACE_SPECIES SURFACE_SPEC IES PITZER SIT

To define the corresponden correspondence ce between element names and aqueous primary and secondary master species, including including the alkalinity contribution of the master species, the gram formula weight used to convert mass units, and the element gram formula weight To define aqueous species with its chemical reaction, log K, and activity-coefficient parameters To define a name, chemical reaction, log K gas , and temperature dependenc dependence e of log K for each component component and mineral To def define ine the corresponden correspondence ce between the name of an exchange site and an exchange species that is used as the master species in calculations To define a half-reaction half-reaction and relative log K for each exchange species To define the corresponden correspondence ce between surface binding-site names and surface master species To define a reaction and log K for each surface species, including surface master species Invokes the Pitzer activity coefficient model Invokes the Specific ion Interaction Theory (SIT) activity coefficient model

44

 

 Annex 2

Databases for PHREEQC

The basis chemical data for PHREEQC is collected in a database (.dat) file, in which data are entered through a series of keyword data blocks, similar si milar to the user input file.  All input files files for PHREEQC PHREEQC are white-space white-space delimited (tabs (tabs and/or spaces) ASCII ASCII text files.

 Available databases databas es9 databases: PHREEQC comes with Database phreeqc.dat

Short description *) Derived from PHREEQE (Parkhurst (Parkhurst and others, 1980), which is consistent with wateq4f.dat, but has a smaller set of elements and aqueous species s pecies The same as phreeqc.dat, except that ammonia oxidation state has been uncoupled from the rest of the nitrogen system; that is, ammonia has been defined as a separate component Derived from WATEQ4F (Ball and Nordstrom, Nordstrom, 1991) Derived from databases for EQ3/6 and Geochemist’s Workbench that uses thermodynamic data compiled by the Lawrence Livermore National Laboratory

Remark Default databases for Phreeqc.

minteq.dat

Derived fromothers, the databases MINTEQA2 (Allison and 1990) for the program MINTEQA2

minteq.v4.dat

Derived from MINTEQA2 version 4 (U.S. Environmental Environmental Protection Agency, 1998) Database for the specific-ion-in specific-ion-interaction teraction model of Pitzer (Pitzer, 1973) as implemented in PHRQPITZ (Plummer and others, 1988)

No supported U.S.longer Environmental Environm ental by Protection Agency Since vs. 2.11 (2005)

amm.dat

wateq4f.dat llnl.dat

pitzer.dat

sit.dat

Database implementing implementing the Specific ion Interaction Theory (SIT) as described by Grenthe and others (1997) iso.dat Partial implementation implementation of the individual component approach to isotope calculations as described by Thorstenson and Parkhurst (2002, 2004) *) Source: Parkhurst and Appelo (2013), p. 27

Database

Called phreeqc.dat as distributed with PHREEQC for Windows (Vincent Post) Since vs. 2.3 (2001)

Since vs 2.12 (2005) For modelling highly saline, SO42--rich solutions Since vs 2.17 (2010) Since vs 2.7 (2003)

Responsible File ID *) source phreeqc.dat USGS amm.dat USGS wateq4f.dat USGS # $Id: wateq4f.dat 6895 2012-08-21 18:10:05Z dlpark $ llnl.dat Lawrence Livermore # $Id: llnl.dat 4023 2010-02-09 21:02:42Z 21:02:42Z dlpark $ National Lab minteq.dat EPA # $Id: minteq.dat 3568 2009-07-13 16:15:14Z dlpark $ minteq.v4.dat EPA E PA # $Id: minteq.v4.dat 794 2006-02-27 2006-02-27 21:06:22Z dlpark $ pitzer.dat USGS sit.dat Amphos 21 /ANDRA # Update note: ThermoChim ThermoChimie ie v.8.0 September 2011. iso.dat USGS *) as supplied with PHREEQC vs 3.0.6 (all .dat files with Date modified: 03-June-2013 00:00:00) 00:00:00)

45

 

Databases used at TU Delft The general rule of thumb at TU Delft is: always use stimela.dat (see Chapter 4). This database includes inert elements for NH4+, Fe2+ and Mn2+ and is maintained at TU Delft, as an inherited and updated version of phreeqc.dat. Moreover, it includes additional RATES for typical water treatment processes (under development). Only if more elements and/or species are required it is recommended to use other databases, while realizing the consequences of the implicit redox reactions in PHREEQC to the redox equilibrium state (see Chapter 4). Moreover is recommended notinput to change oneadditional of the distributed databases with own data, but includeit adjustments in user files (via elementsphreeqc and definitions).

Content of PHREEQC databases Items in a PHREEQC database are: Keyword SOLUTION_MASTER_SPECIES SOLUTION_SPECIES PHASES EXCHANGE_MASTER_SPECIES EXCHANGE_SPECIES SURFACE_MASTER_SPECIES SURFACE_SPECIES

Description Defines elements, oxidation states, species, as well as chemical reactions of formation and redox reactions Defines minerals (solids) and gases, and their dissolut dissolution ion reaction Defines exchange sites, sites, exchange species an and d their ex exchange change reaction Defines surface sites, sites, surface species and ttheir heir surface surface reaction

RATES

Defines kinetics for reactions

END

Delimiter for simulations, simulations, starts the calculation calculation of a simulation

SOLUTION_MASTER_SPECIES SOLUTION_MASTER_SPECIES SOLUTION_MAS TER_SPECIES is used to define element names and oxidation states, atomic weights and the master species in a solution. Master species are the ones primarily primarily used in the calculations. calculations. They function as basis species s pecies for defining other ones in reactions with keyword SOLUTION_SPECIES. SOLUTION_SPECIES. Example lines: #1 2

3

4

5

O O( 0) O( - 2) Ca Mg Fe Fe( +2) Fe( +3) Cl C C( +4) C( - 4) Al kal kal i ni t y S S( 6) S( - 2)

0. 0. 0 0 0. 0 0. 0 0. 0 0. 0 0. 0 - 2. 0 0. 0 2. 0 2. 0 0. 0 1. 0 0. 0 0. 0 1. 0

O O 0. 0 Ca Mg Fe Fe Fe Cl HCO3 HCO3 CH4 Ca0 a0.. 5( CO3)0. 5 SO4 SO4 S

16. 0

H O2O 2 H2O Ca+2 Mg+2 Fe+2 Fe+2 Fe+3 Cl CO3- 2 CO3- 2 CH4 CO3- 2 SO4- 2 SO4- 2 HS-

40. 08 24. 312 55. 847 35. 453 12. 0111 50. 05 32. 064

46

 

# 1

Item Element name

2 3

Master species Contribution Contributio n to

Description Elements with various oxidation states must be given as element followed by all related oxidation states. Element names must start with a capital letter, followed by lower case letters or underscores (no numbers numbers,, except for defining oxidation state) Must be repeated with an identity reaction under SOLUTION_SPECIES SOLUTION_SPECIES Master species' contribution to the alkalinity alkalinity when titrating down to pH =

alkalinity Mass-mole conversion Atomic weight

4.5 Chemical formula or gram formula weight for converting mass units in SOLUTION to mol Atomic weight of the element in column 1

4 5

Each master species should be repeated under SOLUTION_SPECIES SOLUTION_SPECIES to specify its parameters parameters for the activity coefficient, the diffusion coefficient, and the molar volume.

SOLUTION_SPECIES SOLUTION_SPECIES SOLUTION_SPECI ES is used to define: the chemical (association) reaction log K and reaction enthalpy (or analytical expression for log K versus T) activity-coefficient activity-coefficient parameters parameters (-gamma) tracer diffusion coefficient (-dw) for aqueous species parameters for calculating the density of the solution (-Millero, -Vm) enrichment in the diffuse double layer (-erm_ddl) parameters for isotopic species. The SOLUTION_SPECIES section starts starts with the identity reaction for master species, as in H+ = H+. Example lines: SOLUTI LUTI ON_ SPEC SPECII ES H+ = H+ - gamma 9. 0 0. 0 - dw 9. 31 31ee- 9 e- = eH2O H2 O = H2O H2O Ca+2 = Ca+2 - gamma 5. 0 0. 1650 - dw 0. 79 793e 3e-- 9 - Vm - 0. 345 3456 - 7. 252 6. 6. 149 149

- 2. 479 479

1 1.. 239

5

1. 1. 60

- 57. 57. 1

- 6. 12e2e- 3

1

# aqueou aqueous s s peci es H2O H2 O = OH- + H+ - anal anal yt i c 29 293. 3. 29 2922 227 7 0. 13 1360 6083 833 3 - 10 1057 576. 6. 91 913 3 - 12 123. 3. 73 7315 158 8 0 - 6. 99 9964 6455 55ee- 5 - gamma 3. 5 0. 0 - dw 5. 27 27ee- 9 - Vm - 9. 66 28 28.. 5 80 80.. 0 - 22 22.. 9 1. 89 0 1. 09 0 0 1 # supcr supcr t mod odii f i ed 2 H2O H2O = O2 + 4 H+ + 4 e e-- l og_k og_k - 86. 08 - del t a_h 1 13 34. 79 kcal kcal - dw 2. 35 35ee- 9 - Vm 5. 78 7889 89 6. 35 3536 36 3. 25 2528 28 - 3. 04 0417 17 - 0. 39 3943 43 # sup supcr cr t

PHREEQC can calculate the temperature dependence of log K with: Van 't Hoff's equation: log KT = log K298 + ΔHr / (2.303 * 8.314e-3) * (1 / 298 - 1 / T) where log KT is log K at temperature T (Kelvin), log K298 is log K at 298 K (= 25 oC),  ΔHr is the reaction enthalpy (kJ/mol), entered after -delta_h. -

a polynomial, polynomial, with coefficients following following -analytical_expression. -analytical_expression.

PHREEQC adds the pressure term to log_k: -= delta_v * (P - 1) / (2.3RT). 47

 

Gas-pressures and fugacity coefficients are calculated with Peng-Robinson Peng-Robinson's 's equation of state (EOS). For definition of the activity coefficients coefficients see Parkhurst and Appelo (2013) and Parkhurst and Appelo (1999) . If gamma is not entered, the Davies equation will be used. To make the activity coefficient equal to 1, write: -gamma 1e5 0 coefficient is used forofcalculating: -The diffusion multicomponent diffusion individual solutes with keyword TRANSPORT the specific conductance (electrical conductivity) conductivity) of the solution. The density of the solution s olution is calculated using the mola molarr volumes of species, or alternatively alternatively using functions developed by Millero (2001). Temperature- and pressure-dependent volumina volumina of aqueous species are calculated with a Redlichtype equation (cf. Redlich and Meyer, Chem. Rev. 64, 221), from parameters entered with: -Vm a1 a2 a3 a4 W a0 i1 i2 i3 i4 . The Millero function V(i) V(i) = a + b * tC + c * tC^2 + s(I) * I^0.5 + (d + e * tC + f * tC^2) * I for calculating the molar volume of species i, is entered with -millero a b c d e f, where a - f are the 6 parameters in the input file, tC is the temperature in oC, s(I) is the DebyeHueckel limiting slope, and I is the ionic strength. Identifiers no_check and mole_balance are used for a reaction that needs coefficients in the law of mass action which differ from the ones required by mass- and charge-balance.

PHASES PHASES is used to defines the name, the dissolution reaction reaction,, log K, and temperature temperature dependence of log K for minerals minerals and gases, as well as the molar volume. volume. Example lines: PHASES Cal c i t e CaCO3 = CO3CO3- 2 + Ca+2 - l og_k - 8. 48 - del t a_h - 2. 297 kcal kcal - an anal al yt i c - 17 171. 1. 90 9065 65 - 0. 07 0779 7993 93 28 2839 39.. 31 319 9 - Vm 36 36.. 9 cm3/ mol # MW ( 10 100. 0. 09 g/ mol ) / r ho ( 2. 71 g/ cm3)

71 71.. 59 595 5

CO2( g) CO2 = CO2 - l og_k - 1. 468 - del t a_h - 4. 776 kcal kcal

 

-- an anal al yt3i0c 109. 534 1. 1.l 99 9913 6986 86.. 04 T_c 4. 210 #9.cr53 i4 t i ca cal T13e, eK 2 - 69 - P_c 72. 86 # cr i t i ca call P P,, a att m - Omeg ega a 0. 22 225 5 # ace acentr ntr i c f act or

- 40 40.. 83

66 6693 9370 70

PHREEQC can calculate the temperature dependence of log K with: Van 't Hoff's equation: log KT = log K298 + ΔHr / (2.303 * 8.314e-3) * (1 / 298 - 1 / T) where log KT is log K at temperature T (Kelvin), log K298 is log K at 298 K (= 25 oC),  ΔHr is the reaction enthalpy (kJ/mol), entered after -delta_h. a polynomial, with coefficients coefficie nts following -analytical_express -analytica l_expression ion The molar volume of solids is derived from the density of the solid and its molair mass. mass. The molar volume of a gas is used to calculate the pressure dependence of log_k, using the critical temperature (-T_c), critical pressure (-P_c) and the acentric factor (-omega) in the Peng-Robinson's equation of state (EOS).

48

 

Elements, oxidation states and species in stimela.dat The elements, oxidation states and species in stimela.dat are: Element

Molar mass (g/mol)

Elements with single oxidation state : Ca 40.08

Master species

Major species

Ca2+ 

Ca+2

2+

Mg Na K Cl P F Si

24.312 22.9898 39.102 35.453 30.9738 18.9984 28.0843

Elements with multi oxidation states: C 12.0111 C(+4) = C(4)  Alkalinity C(-4) Fe 55.847 Fe(+2) = Fe(2) Fe(+3) = Fe(3) Mn 54.938 Mn(+2) = Mn(2) Mn(+3) = Mn(3) S 32.064 S(6) S(-2) N 14.0067 N(+5) = N(5) N(+3) = N(3) N(0) N(-3) H 1.008 H(0) H(1) O 16.0 O(0) O(-2)

Mg+2 Na+ K+ ClPO4-3 F-  H4SiO4

Mg+    Na K +  Cl-  PO43-  F-  H4SiO4 

CO3-2 CO3-2 CO3-2 CH4 Fe+2 Fe+2 Fe+3 Mn+2 Mn+2 Mn+3 SO4-2 SO4-2 HSNO3NO3NO2N2 NH4+ H+ H2 H+ H2O

CO2  CO2(g) HCO3-  CO32- CH4  CO2  CO2(g) HCO3-  CO32-  HCO3-  CO32-  CH4  Fe2+  Fe3+  Fe2+  Fe3+  Mn2+  Mn3+  Mn2+  Mn3+  SO42-  H2S H2S(g) SO42-  H2S H2S(g) NO3-  NO2- N2  N2(g) NH4+  NO3-  NO2-  N2  N2(g) NH4+  NH3  NH3(g) H2O H2  H+ OH-  H2  H+ OH-  H2O H2O(g) O2O   O2(g) H 2

O2 H2O

Elements with inert (redox-uncoupled) states: 2.016 Hdg H2  H2(g) (inert) Hdg 32 Oxg Oxg O2  O2(g) (inert) 28.0134 Ntg Ntg N2  N2(g) (inert) 12.0111 [C-4] [C-4]H4 CH4  CH4(g) (inert) 55.847 [Fe+2] [Fe+2]+2 Fe+2 (inert) [Mn+2] 54.938 [Mn+2]+2 Mn+2 (inert) [S-2] 32.064 H2[S-2] H2S H2S(g) (inert) [N-3] 14.0067 [N-3]H4+ NH4+ NH3  NH3(g) (inert) Not included single oxidation state elements (with master master species): E (e-), Al (Al+3), Ba (Ba+2), Sr (Sr+2), B (H3BO3), Li (Li+), Br (Br-), Zn (Zn+2), Cd (Cd+2), Pb (Pb+2) Not included multi oxidation state elements elements (with master species) : Cu (Cu+2), Cu(+2) (Cu+2), Cu(+1) (Cu+1) Not included redox-uncoupled gases Mtg (Methane, (Methane, CH 4) and Sg (Hydrogen sulfide, H2S), specified as single element species. 49

 

 All elements and and element oxidation states states can be found in the first column column of the the SOLUTION_MASTER_SPECIES. SOLUTION_MAS TER_SPECIES. The related master species are given in the second column.  All solute species (master species and and other species) species) can be found found following the ‘=’ ‘=’ sign in each reaction line of SOLUTION_SPECIES.

50

 

 Annex 3

Addition Additional al information

Further and actual information information on ‘Aquatic Chemistry for engineers’ can be found on the TU Delft OpenCourseWare website for this course:  course: http://drin http://drinkwater.citg.tude kwater.citg.tudelft.nl/AquaticC lft.nl/AquaticChemistry hemistry..  Further information on PHREEQC can be found in the following sources: Websites: USGS – PHREEQC: (http://wwwbrr.cr.usgs.gov/projects http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/ /GWC_coupled/phreeqc/))  This website also includes FAQs, edited by David Parkhurst. Tony Appelo: (http://www.hydrochemistry.eu/ )  Books: User's Guide to PHREEQC (Version 3) (Parkhurst & Appelo, 2013)  Available as ‘PHREEQC ‘PHREEQC version 3 Documentation Documentation (4.2 M)’ M)’ at the PHREEQC PHREEQC website  Available as Help file file in PhreeqcI (phreeqci.chm) (phreeqci.chm) User's Guide to PHREEQC (Version 2) (Parkhurst & Appelo, 1999)  Available as ‘PHREEQC ‘PHREEQC version 2 Documentati Documentation on (2.3 M)’ at the the PHREEQC website Still relevant for Version 3: pages 9-63 Hydrogeo Hydrogeochemical chemical modeling with PHREEQC (Appelo & Parkhurst, 2011)  Available as updated Help file at webs website ite of Tony Appelo Appelo (phreeqc.chm) (phreeqc.chm) Groundwate Groundwaterr Geochemistry (Merkel, Planer-Friedrich Planer-Fried rich & Nordstrom, Nordstro m, 2005) e Geochemistry, Groundwater and Pollution, Pollution, 2  ed (Appelo & Postma, 2005) Papers (peer reviewed): Assessment of calculation methods for calcium carbonate saturation in drinking water for DIN 38404-10 compliance (de Moel et al., 2013) Drinking Water Eng. Science, 6, 115-124, 2013 (doi:10.5194/dwes-6-115-2013) (doi:10.5194/dwes-6-115-2013) (http://www.drink-w http://www.drink-water-eng-sci.net/6 ater-eng-sci.net/6/115/2013/ /115/2013/))  Courses: USGS course Geochemistry for Groundwater Systems 2011 Presentations, examples, exercises and literature of a 5-days course (USGS website) Tony Appelo uses an adapted version of Notepad++ for writing, editing and running PHREEQC3 input files. This Notepad+ version is available as free download at his website. The book Geochemistry, Groundwater and Pollution, 2e ed (Appelo & Postma, 2005) uses the obsolete PHREEQC version ‘PHREEQC for Windows’ (Vincent Post 2010:  2010: http://pfw.antipodes.nl/) http://pfw.antipodes.nl/).  Additional information information on Iphreeqc (COM (COM modules) can be found in the the documentation documentation supplied with with the Iphreeqc download: -

Modules Based on the Geochemical Model PHREEQC for Use in Scripting and Programming Languages (Charlton & Parkhurst, 2011) IPhreeqcCOM reference (supplied as Help file IPhreeqcCOM.chm). IPhreeqcCOM.chm).

51

 

52

 

 Annex 4

PHREEQXCEL

PHREEQXCEL has been developed as a PHREEQC framework framework for all types of chemical simulation simulationss within the online MSc course Aquatic Chemistry for Engineers, given at Delft U University niversity of Technology (The Netherlands). The generic approach allows for all kinds of tailor made simulations and calculations making the power of PHREEQC available to engineers, students, laboratory personnel and many others who lack the programming skills previously required for PHREEQC. PHREEQXCEL applications applications are freely available at the website of the course. The public availability availability of this framework allows for the developmen developmentt of similar applications applications by experienced PHREEQC users for their own research and using their findings and modelli modelling ng for all kind of engineering applications.

1.

Introduction

PHREEQC has become the ‘de facto’ standard for geochemical calculations. calculations. It has been developed by the US Geological Survey (USGS), who started in 1980, with regular updates and extensions extensions to date. The program is freely available for users, and can be downloaded from the USGS website (USGS, 2013). Since April 2011 PHREEQC is also available as a COM-module, which allows running PHREEQC within Windows programs such as Excel and MATLAB (Charlton, S.R. and Parkhurst, Parkhurst, D.L., 2011). This makes the power of PHREEQCskill available to engineers, laboratory laboratory personnel and many others who lack the programming skills s previously requiredstudents, for PHREEQC. This article describes the Visual Basis code for Excel (VBA) for using Excel as a one-stop application (PHREEQXCEL) unleashing the powerful chemistry of PHREEQC within the widely known flexible and a nd user friendly environment of Excel with all its powerful graphical and tabular features. PHREEQXCEL applications applications can be created by an experienced PHREEQC user and used by all kind of professionals, such as researchers, students, treatment plant operators, laboratory staff etc. PHREEQXCEL applications applications can also be used by external Windows Windows applications such as Web servers, s ervers, allowing for online applications (‘in the cloud’) without install installing ing PHREEQC at the user-PC. The all-inone setup creates an Excel file containing all relevant data, which can easily be downloaded or emailed to the online user, as an add-on to the summary results shown in the browser itself. PHREEQXCEL applications applications have been developed for the MSc course Aquatic Chemistry at Delft University of Technology, in both Excel versions as well as online versions (TU Delft, 2013). Since February 2013 PHREEQC version 3 is available, with an updated COM-module. This updated version is used in PHREEQXCEL.

2.

Basic setup

The PHREEQC COM-module (IPHREEQC, version 3) can be downloaded from the USGS website (USGS, 2013) and should be installed on a Windows PC. Excel files showing the setup as described in this article can be downloaded from the TU Delft site for the online course Aquatic Chemistry for Engineers (TU Delft, 2013). PHREEQXCEL contains contains 7 sheets and 2 VBA subroutines, as shown in Table 1. In this setup all related files are contained in a single Excel file, including the in- and output files, the chemical database file and eventually error messages. The novice user will only use the front sheet (AquaticChemistry). (AquaticChemistry). This is a tailor made sheet for a specific application, such as calculation of the Electrical Conductivity (EC) or Calcium Carbonate Saturation (SI and CCPP) in drinking water (Standard Methods, 2010). The output in this sheet might be tabular and/or graphical.

53

 

This novice user can fill in the specific data within a self explaining Excel sheet, start the PHREEQC calculation by clicking the ‘Run PHREEQC’ button, and overview the results, all within the same front-end sheet. Experienced PHREEQC users can modify the specific PHREEQXCEL application, or draft a complete new application without modifying the VBA code in PHREEQXCEL Only ‘normal’ Excel skills are required to create or modify modify the application to the specific requirements in a company, department, or project.

Table 1. Sheets 1. Sheets and VBA components in PHREEQXCEL Item Function Sheets  AquaticChemistry  AquaticChem istry User input/output input/output Run_Control Run_Cont rol Program input/output input/output Input PHREEQC input code Output Tabulated output phreeqc.out PHREEQC print output Messages PHREEQC warnings and errors Database Chemical database Code modules Sub RunPhreeqc(Boolean) RunPhreeqc(Boolean) VBA program code Sub StartCalc_Click() VBA Event code / Macro name

3.

Remarks Tailor made per application External .pqi and .dat files (option) Used input code (.pqi format) Same as ‘Selected output’ file Same as ‘Print’ file GetErrorString() GetErrorString() and such Used database (.dat format) Starts PHREEQC run Starts RunPhreeqc

VBA code and data flow

The heart of PHREEQXCEL is the universal VBA subroutine called RunPhreeqc(), which is called by clicking the ‘Run PHREEQC’ button. This code can be divided into five steps: 1. Initialize Initialize application application,, including COM-object 2. Loading database in COM-object (from sheet Database or from external file) 3. Running PHREEQC with user input i nput (from sheet Input or from external file) 4. Saving output (to sheet Output, sheet Messages and sheet phreeqc.out) 5. Viewing front-end sheet AquaticChemistry. The subroutine code also includes i ncludes Error handling. The optional items are controlled controlled by settings in the sheet Run_Cont Run_Control, rol, which allows for selecting sel ecting the chemical database, and user input. These might be read from sheets in the Excel file either or from external files. The data flow in PHREEQXCEL is shown in Fig. 1. The user input in the front-end sheet (yellow cells) is directly related to the input code in the sheet Input.  After running running PHREEQC the (updated) (updated) output data in tthe he sheet Output Output is directly shown in th the e frontend sheet (non-yellow cells) underneath the ‘Run PHREEQC’ button.

54

 

Figure 1. Data 1. Data flow in PHREEQXCEL applications, with an example application.

The Input sheet contains the full input code for PHREEQC PHREEQC simulations, as in ‘normal’ .pqi or .phr files. This input sheet is converted into an input string, which can be used in the COM-method Phreeqc.RunString(). Phreeqc.RunS tring(). The conversion into a string allows for putting part of a PHREEQC statement into separate Excel cells. Such cells can be references to cells on the front-end sheet. The Output sheet is filled by writing the result array from the COM-method COM-method Phreeqc.GetSelectedOutputArray() Phreeqc.GetSelectedOut putArray() into the Output sheet. Its tabulated output can be used as references in cells on the front-end sheet. The content of the tabulated Output sheet is determined determined by the PHREEQC keywords SELECTED_OUTPUT SELECTED_OUT PUT and USER_PUNCH. The VBA code is started by its macro-call RunPhreeqc(). With Boolean=TRUE all internal screen messages are ignored allowing for use by external programs with without out user dialogs. The full VBA code can be seen in PHREEQXCEL applications, applications, as available at the TU Delft Aquatic Chemistry website (TU Delft, 2013). All PHREEQXCEL PHREEQXCEL applications have the same VBA code.

4.

Details of PHREEQXCEL applic applications ations

Details of PHREEQXCEL application will be discussed here for four aspects: - typical Excel functions - typical PHREEQC simulations - dynamic simulations with PHREEQC - running PHREEQXCEL applications in the Cloud.

Typical Excel functions PHREEQXCEL applications applications can be customized by ‘normal’ Excel routines and formulas. Excel functions should give direct modifications from the front-end sheet into the Input sheet, as well as from the Output sheet into the front-end sheet.

55

 

The main object is to ‘translate’ the user input on the front-end sheet into proper PHREEQC code on the Input sheet. This requires some typical conversions to change numeric data types into proper strings, with points as decimal separator and without thousands separators. separators. The Excel function FIXED(;3;TRUE) gives text showing the number with 3 decimals with no_commas.. The Excel function SUBSTITUTE(;",";".") changes all decimal commas into points, in case the international setting of the user creates decimal commas. Combinin Combining g these 2 functions gives a generic number conversion into proper PHREEQC code. Using the # symbol, the comment indicator in PHREEQC code, as initial line cell allows for conditional statements statements in the code. The PHREEQC output in the Output sheet can often be shown s hown directly into the front-end sheet. For showing results in mmol/kgw instead of the mol/kgw (as PHREEQC default) requires a *1000 formula. formula. Similar unit conversions can be made in Excel iinto nto operating units such as mg/L, µS/cm etc. SI values of gases can be converted into partial pressure in Excel with the formula p a=10SI.

Typical PHREEQC simulations Some water quality parameters require two PHREEQC simulations, as the difference in results gives the requested parameter. Typical examples are Calcium Carbonate Precipitation Poten Potential tial (CCPP) and Buffer capacity. Calcium Carbonate Precipitation Potential Potential can be calculated from the difference in Calcium concentration before and after a simulation with EQUILIBRIUM_PHASES EQUILIBRIUM_PHASES;; Calcite. Buffer capacity can be calculated using REACTION for adding a very small amount of HCl (0.01 mmol/kgw) and by subtracting the pH before and after. Some water quality parameters are not directly calculated calculated by PHREEQC but require additional formulas or functions (CALCULATE_VALUES) (CALCULATE_VALUES) to get their values. Typical examples are total Cation and Anion concentration, which can be calculated from Charge Balance difference (CHARGE_BALANCE=Cation-Ani (CHARGE_BALANC E=Cation-Anion) on) and Percentage error (PERCENT_ERROR=(Cation(PERCENT_ERROR=(Cation Anion)/(Cation+Anion)).  Anion)/(Cation +Anion)). Kinetic and transport simulations simulations in PHREEQC often give a huge amount of data in the Output sheet. In this case the presentation in the front-end front-end sheet is preferably given as a graph, either directly from the output sheet or via an intermediate transformation calculation calculation in Excel.

Dynamic simulations with PHREEQC The VBA code in RunPhreeqc includes includes a one-time-run one-time-run of PHREEQC, in which the full output array is written into the Excel file, only after ending the full code in the input sheet. Multiple runs are required if calculation results are required for sequential runs. Solutions Solutions with input i nput concentrationss in mg/L require the density of the solution as input value. This density can be concentration calculated by PHREEQC, and used in a re-run of the calculation. Such double-run double-runss can be achieved by calling twice the VBA function/procedure RunPhreeq in StartCalc_Cl StartCalc_Click(). ick(). This approach is applicable for simulations which require a known number of runs. More dynamic simulations simulations can be made by using the PHREEQC option INCLUDE$ in the input file/code. This option allows for writing input code ‘on the run’, which can be used in trailing simulations,, based on the results of previous simulations. simulations simulations.

Running PHREEQXCEL applications in the Cloud Modern web server can use other applications applications for external external processes. This makes PHREEQXCEL applications available for web applications without installation of PHREEQC, the IPREEQC-C IPREEQC-COM OM module or even Excel on the electronic device of the user. Data in a web application can be put on the web server into a PHREEQXCEL application, the VBA macro RunPhreeqc(true) RunPhreeqc(true) can be called and the (summary of) results from the Excel file can be

56

 

shown in the browser. Eventually the whole Excel file including all data can be forwarded to the client, as download and/or email attachment. attachment. For experienced web designers this is a ‘standard procedure’ procedure’ which is not described here in more detail.

5.

Example: Calcium carbona carbonate te saturatio saturation n in drinking water

Calcium carbonate saturation in drinking water is presented here as an example of a practical application of PHREEQXCEL. PHREEQXCEL. This application is shown in Fig. 1 (right) and attached to this paper as Supplementary Supplementar y Material. The application deals with the calcium carbonate saturation according to the German standard DIN 38404-10 (2012). The purpose of this standard is to calculate the Saturation Index for calcite (SI) and the Calcium Carbonate Precipitation Potential (CCPP) or its counterpart Calcitlösekapazität (DC). The user can fill in the yellow data fields in the front-end sheet and click on the Run PHREEQC button below the input fields to start the PHREEQC calculation. calculation. The main results are also presented on the front-end sheet, as ‘refreshed ‘ refreshed values’.

Input parameters DIN 38404-10 (2012) requires the validation of computer programs on 10 water samples, s amples, with given water temperature, pH, and the concentrations concentrations of Calcium, Calcium, Magnesium, Sodium, Potassium, Potassium, Inorganic carbon, Chloride, Nitrate, Sulphate and Phosphate. Inorganic carbon is used in this example instead of Alkalinity. Alkalinity. In order to use these samples in PHREEQC the Oxygen content (as pO2) and Density (in kg/L) are added. Moreover the validation values for SI and CCPP are included.

Simulations The input parameters are transferred to the PHREEQC input code in the Excel sheet Input, under SOLUTION_SPREAD, SOLUTION_SPR EAD, in which the 10 ‘initial solutions’ solutions’ are calculated.  After these ‘Initial ‘Initial calculations’ calculations’ all samples samples are recalculated recalculated by dummy calculations calculations for electron balancing (to redox equilibrium including calculation of pe). In these 10 simulations simulations the Saturation Index (SI) SI of all samples is determined determined (as SI for Calcite). SI is a standard output parameter of each simulation in PHREEQC. For CCPP additional simulations simulations are required including EQUILIBRIUM_PHASES EQUILIBRIUM_PHASES to Calcite.

Post processing The calculation results are presented on the front-end sheet, showing the differences between calculated values and validation v alidation values. The example application shows several additional post-processing calculations.

6.

Conclusions

PHREEQXCEL makes the power of PHREEQC available to engineers, students, laboratory personnel and many others who lack the programming skills previously required for PHREEQC. PHREEQXCEL applications applications can be created by an experienced PHREEQC user and used by all kind of professionals, such as researchers, students, treatment plant operators, laboratory staff etc. PHREEQXCEL applications applications unleash the powerful chemistry chemistry of PHREEQC within the widely known flexible and user friendly environment environment of Ex Excel cel with all its powerful graphical and tabular features. PHREEQXCEL applications applications can be used on a Windows PC with Excel and installed IPHREEQC-COM module, but in also on all electronic as laptops, tablet PCs, iPads, smart phones, etc. as online applications a web browser (‘in devices the cloud’).

57

 

References Charlton, S.R. and Parkhurst, D.L.: Modules based on the geochemical model PHREEQC for use in scripting and programming programming languages, Computers & Geosciences, 37, 1653–1663, 2011. De Moel, P.J., Van der Helm, A.W.C., Van Rijn, M., Van Dijk, J.C. and Van der Meer, W.G.J.:  Assessment of calculation calculation m methods ethods for calcium calcium carbonate carbonate saturation in drinking water water for DIN 38404-10 compliance, Drinking Water Eng. Science, 6, 115-124, 2013 (doi:10.5194/dwes-6-115(doi:10.5194/dwes-6-1152013), available at  at http://www http://www.drink-water-en .drink-water-eng-sci.net/6/115/ g-sci.net/6/115/2013/ 2013/..  DIN 38404-10: German standard methods for the examination of water, waste water and sludge Physical and physico-chemical parameters (group C) - Part 10: Calculation Calculation of the calcit saturation of water (C 10), DIN Deutsches Institut für Normung, 2012. PHREEQXCEL application: AquaticChemistry_CalciumCarbonateSaturation_v20130617.xlsm Standard Methods 1030E: Checking Analyses' Correctness, in: Standard Methods for the Examination Examination of Water and Wastewater, 22nd Edition, APHA/AWWA/WEF, 2012, SM1030E: 2011. Standard Methods 2330: Calcium carbonate saturation, in: Standard Methods for the Examination Examination of Water and Wastewater, 22nd Edition, APHA/AWWA/WEF, APHA/AWWA/WEF, 2012, SM2330: 2010. TU Delft: Aquatic Chemistry for Engineers (Online MSc-PhD course in Watermanagement), available at: at:  http://drinkwater/citg.tudelft http://drinkwater/citg.tudelft.nl/AquaticCh .nl/AquaticChemistry emistry..  GWC_coupled/phreeqc/ ed/phreeqc/..  USGS:  http://wwwbrr.cr.usgs.gov/projects/ USGS: http://wwwbrr.cr.usgs.gov/projects/GWC_coupl

58

 

Generic VBA code in PHREEQXCEL Sub RunPhreeqc(Optional Server As Boolean) ' Call examples: RunPhreeqc or RunPhreeqc False or Call RunPhreeqc() or Call RunPhreeqc(False) ' ' ' ' ' ' ' '

Requirements (installed items): - PHREEQC COM-module (version 3, latest download from USGS website) - MS Forms library (part of Windows OS) MS-Windows clipboard is used for fast copy/paste actions This requires (MSForms.)DataObject from the MS Forms Library For loading this library: include Forms in the VBA project, and select MS Forms library in References under menu option Tools included Form might be removed afterwards

' Initialize application, including COM-object On Error GoTo ErrHandler: ' set Error handler ChDrive Left(ActiveWorkbook.Path, 1) ' set drive of Excel file as default drive ChDir ActiveWorkbook.Path ' set path of Excel file as default directory Set phreeqc = CreateObject("IPhreeqcCOM.Object") phreeqc.OutputStringOn phreeqc.OutputSt ringOn = True ' default = False phreeqc.OutputFileOn phreeqc.OutputF ileOn = False ' default value phreeqc.SelectedOutputFileOn phreeqc.SelectedOutp utFileOn = False ' default value Worksheets("Messages").Activate  ActiveSheet.Cel  ActiveSh eet.Cells.ClearC ls.ClearContents ontents ' clear clear (old) M Messages essages ' Define input file and database file (might be empty) File_In = Worksheets("Run_Control").Range("InputFile").Value ' Iphreeqc generates an error if File_In can not be read DatabaseFile = Worksheets("Run_Control").Range("DatabaseFile").Value ' Iphreeqc generates an error if DatabaseFile can not be read ' Include full path name if not in default directory (= location of Excel file)

' Load database in COM-object If DatabaseFile "" Then 'use DatabaseFile if filled phreeqc.LoadDatabase phreeqc.LoadDatab ase (DatabaseFile) 'method loads database (returns number of errors) ' database dump to sheet Database (with switch True/False for users preference) If True Then ' Import database file in Excel-sheet (fast version, requires MS Forms Library) ' Fast copy/paste from database file via Clipboard (with TAB = next column, new rows etc) Worksheets("Database").Activate  ActiveSheet.Cells.ClearCo  ActiveSheet.Cells. ClearContents ntents Open DatabaseFile For Input As #2 Dim MyData2 As MSForms.DataObject 'from MS Forms Library Set MyData2 = New MSForms.DataObject MyData2.SetText Input(LOF(2), #2) MyData2.PutInClipboard Close #2  ActiveSheet.Paste  ActiveShe et.Paste Destination:=W Destination:=Worksheets orksheets("Databa ("Database").Ran se").Range("A1") ge("A1") End If Else ' use DatabaseSheet ' From sheet Database into string for COM-module ' Copy content sheet Database to Clipboard Sheets("Database").Select Cells.Select Selection.Copy ' Copy Clipboard to String Dim IstringDB As String DimMyData1 MyData1=AsNew MSForms.DataObject 'from MS Forms Library Set MSForms.DataObject MyData1.GetFromClipboard IstringDB = MyData1.GetText 'or GetText(1)

59

 

' use string in COM-module phreeqc.LoadDatabaseString phreeqc.LoadDatab aseString (IstringDB) 'method loads database (returns num number ber of errors) End If ' Iphreeqc generates an error if Database is not loaded in COM-object ' Iphreeqc generates an error if file Db cannot be opened or read (as proper PHREEQC database) ' Iphreeqc ignores the database file specified with DATABASE in the input file (.pqi) ' This is also shown in the warning in phreeqc.out: ' DATABASE ' WARNING: DATABASE keyword is ignored by IPhreeqc.

' Run PHREEQC If File_In "" Then 'use File_In if filled phreeqc.RunFile phreeqc.RunFil e (File_In) 'method runs P PHREEQC HREEQC (returns num number ber of errors) ' input file dump to sheet Input (with switch True/False for users preference) If True Then ' Import input file in Excel-sheet (fast version, requires MS Forms Library) ' Fast copy/paste from database file via Clipboard (with TAB = next column, new rows etc) Worksheets("Input").Activate  ActiveSheet.Cells.  ActiveShe et.Cells.ClearCo ClearContents ntents Open File_In For Input As #3 Dim MyData3 As As MSForms.DataObject 'from MS Forms Library Set MyData3 = New MSForms.DataObject MyData3.SetText Input(LOF(3), #3) MyData3.PutInClipboard Close #3 et.Paste D  ActiveShe  ActiveSheet.Paste Destination estination:=Wo :=Worksheets(" rksheets("Input"). Input").Range("A Range("A1") 1") End If Else ' use InputSheet as String Dim Istring As String ' Content from from InputSheet into Clipboard Worksheets("Input").Activate Cells.Select Selection.Copy ' Copy Clipboard to String Dim MyData4 As MSForms.DataObject 'from MS Forms Library Set MyData4 = New MSForms.DataObject MyData4.GetFromClipboard Istring = MyData4.GetText 'or GetText(1) phreeqc.RunString (Istring) 'method runs PHREEQC (returns number of errors) End If

' Save Selected_Output and User_Punch to output sheet arr = phreeqc.GetSelectedOutputArray() Worksheets("Output").Activate Range(Cells(1, 1), Cells(phreeqc.RowCount, phreeqc.ColumnCount)) = arr ' Messages If Server = False Then 'no messageboxes in server If phreeqc.OutputFileOn = True Then MsgBox ("Phreeqc ran successfully." + Chr$(13) + "See phreeqc.out - for full output") Else MsgBox ("Phreeqc ran successfully.") End If End If If phreeqc.GetWarningString() "" Then Worksheets("Messages").Activate Cells(1, 1) = "Phreeqc errors: " & phreeqc.GetWarningString() If Server = False Then 'no messageboxes in server MsgBox phreeqc.GetWarningString() 'PHREEQC warnings (from COM-object) End If

60

 

End If ' Save output string in phreeqc.out sheet (fast version, requires MS Forms Library) ' Fast copy/paste from outputstring via Clipboard (with TAB = next column, new rows etc) Worksheets("phreeqc.out").Activate  ActiveSheet.Cel  ActiveSh eet.Cells.ClearC ls.ClearContents ontents Dim MyData As MSForms.DataObject 'from MS Forms library Set MyData = New MSForms.DataObject MyData.SetText phreeqc.GetOutputString() MyData.PutInClipboard  ActiveSh  ActiveSheet.Paste eet.Paste Destination:=Wo Destination:=Workshee rksheets("phreeq ts("phreeqc.out"). c.out").Range("A1" Range("A1"))

' Show Excel result sheet Worksheets("AquaticChemistry").Activate Exit Sub

ErrHandler: If Server = False Then 'no messageboxes in server If phreeqc.GetErrorString() = "" Then MsgBox ("Iphreeqc error:" + Chr$(13) + "No selected_output or no valid input or output sheet") Else MsgBox "Phreeqc errors: " & phreeqc.GetErrorString() End If End If Worksheets("Messages").Activate If phreeqc.GetErrorString() = "" Then Cells(3, 1) = "Iphreeqc error:" + Chr$(13) + "No selected_output or no valid input or output sheet" Else Cells(3, 1) = "Phreeqc errors: " & phreeqc.GetErrorString() End If End Sub

61

 

 Annex 5

Calcium carbonate saturation in PH PHREEQXCEL REEQXCEL

PHREEQXCEL has been used for the assessment of calculation methods methods for calcium carbonate saturation in drinking water for DIN 38404-10 compliance. This research has been published as discussion paper on 1 August 2013 in Drinking Water Engineering and Science, an interactive Open Access Journal. After a public peer-review process, the manuscript has been revised and accepted for publication. publication. The research is published on 18 November 2013 (http://ww http://www.drink-water w.drink-water-eng-sci.net/6/115 -eng-sci.net/6/115/2013/ /2013/)). The supplementary material of this online paper contains the applied PHREEQXCEL application (CalciumCarbonateSaturat (CalciumCarbon ateSaturation_v2013 ion_v20131020.xlsm), 1020.xlsm), as well as the developed PHREEQC-databases: PHREEQC-databases: din38404-10_2012.dat sm2330_2010.dat nen6533_1990.dat stimela.dat and applied PHREEQC input code (DIN38404-10_compl (DIN38404-10_compliance.pqi). iance.pqi). CalciumCarbonateSaturation_v20131020.xlsm:

62

 

Drinking Water  Water 

Drink. Water Eng. Sci., 6, 115– 124, 124, 2013 www.drink-water-eng-sci.net/6/115/2013/  doi:10.5194/dwes-6-115-2013 © Author(s) 2013. CC Attribution 3.0 License.

Engineering and Science Open Access

Assessment of calculation methods for calcium carbonate saturation in drinking water for DIN 38404-10 compliance P. J. de Moel1,2 , A. W. C. van der Helm 2,3 , M. van Rijn4 , J. C. van Dijk2,5 , and W. G. J. van der Meer2,6 1

2

Omnisys, Eiberlaan 23, 3871 TG, Hoevelaken, the Netherlands Delft University of Technology, Faculty of Civil Engineering and Geosciences, Department of Water Management, P.O. Box 5048, 2600 GA, Delft, the Netherlands 3 Waternet, P.O. Box 94370, 1090 GJ, Amsterdam, the Netherlands 4 Vitens, P.O. Box 1205, 8001 BE Zwolle, the Netherlands 5 VanDijkConsulting, Rossenberglaan 9, 3833 BN, Leusden, the Netherlands 6 Oasen, P.O. Box 122, 2800 AC, Gouda, the Netherlands Correspondence Corre spondence to: P. J. de Moel ([email protected]) Received: 11 July 2013 – Published in Drink. Water Eng. Sci. Discuss.: 1 August 2013 Revised: 25 October 2013 – Accepted: 29 October 2013 – Published: 18 November 2013

Abstract.   The new German standard on the calculation of calcite saturation in drinking water, DIN 3840410, 2012 (DIN), marks a change in drinking water standardization from using simplified equations applicable for nomographs and simple calculators to using extensive chemical modeling requiring computer programs. The standard outlines the chemical modeling and presents a dataset with 10 water samples for validating used computer programs. The DIN standard, as well as the Standard Methods 2330 (SM) and NEN 6533 (NEN) for calculation of calcium carbonate saturation in drinking water were translated into chemical databases for use in PHREEQC (USGS, 2013). This novel approach gave the possibility to compare the calculations as defined in the standards with calculations using widely used chemical databases provided with PHREEQC. From this research it is concluded that the computer program PHREEQC with the developed chemical database din38404-10_2012.dat complies with the DIN standard for calculating Saturation Index (SI) and Calcite Dissolution Capacity (Calcitlösekapazität) or Calcium Carbonate Precipitation Potential (CCPP). This compliance is achi achieeve ved d by as assu sumi ming ng equa equall va valu lues es for for mo mola lari rity ty as us used ed in DIN DIN (obs (obsol olet ete) e) and and mo mola lali lity ty as used used in PHRE PHREEQ EQC. C. From comparison with widely used chemical databases it is concluded that the use of molarity limits the use of DIN to a maximum temperature of 45 ◦ C. For current practical applications in water treatment and drinking waterr appli wate applicatio cations, ns, the PHREEQC PHREEQC database database stimela. stimela.dat dat was developed developed within the Stimela Stimela platfo platform rm of Delft University of Technology. This database is an extension of the chemical database phreeqc.dat and thus in compliance with SM. The database stimela.dat is also applicable for hot and boiling water, which is important in drinking water supply with regard to scaling of calcium carbonate in in-house drinking water practices. SM and NEN proved to be not accurate enough to comply with DIN, because of their simplifications. The diff erences erences in calculation results for DIN, SM and NEN illustrate the need for international unification of the standard for calcium carbonate saturation in drinking water.

1

Intro Int roduc ductio tion n

In gene general, ral, calculati calculation on of calcium calcium carbo carbonate nate saturati saturation on in drinki drinking ng wa water ter is perfor performed med wit with h a sim simpli plifica ficatio tion n of the processes as shown in Table 1, in which ion pairs are neglected and calcite is assumed to be the determining crys-

talline phase. The equations for equilibrium constants in Table 1 do not apply to the concentrations of diluted species, but to their (relative) activities which are smaller than the concentrations because of their interaction with each other and with the surrounding water molecules (dipoles).

Published by Copernicus Publications on behalf of the Delft University of Technology.

 

116

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

Table 1. Processes 1.  Processes generally used for description of calcium carbonate (CaCO3 ) saturation in drinking water. Part

Reaction equations

Dissolution / precipitation precipitation of CaCO3   CaCO3  (s)



Equilibrium constants

Ca2+ + CO23   Ks  = {Ca2+ } · {CO23   } −



Dissociation of carbon dioxide CO2  + H2 O = H2 CO3

CO2  + H2 O ↔ HCO3   + H+ HCO3   ↔ CO23   + H+

{CO2 } K1  = {HCO3 } · {H+ } / {CO {HCO3 } K2  = {CO23   } · {H+ } / {HCO

Ionisation of water

H2 O (l) ↔ OH + H+

Kw  = {H+ } · {OH } lg {H+ } = −pH

















{X}= relative activity of dissolved species / ion ion X.

The Saturation Index (SI) is a measure of the thermodynamic driving force to the equilibrium state. The definition of SI for precipitation / dissolution dissolution reactions with the equilibrium constants of Table 1 gives:

  2+   2  Ca CO3 SI   =   lg  KS  2+  



=   lg Ca

  



+ lg HCO− 3 + lg K2 − lg KS + pH

(1)

Langelier combined the first four terms in the last part of  Eq. (1) into the parameter   −pHs   (Langelier, 1936). Therefore SI for calcium carbonate is often called Langelier Index (LI) or Langelier Saturation Index (LSI). The parameter SI is dimensionless, because the activities in Eq. (1) are relative dimensionless values compared to standard conditions (standard molality molality,, 1 mol kgw−1 ). This is also the case for pH and the  K  values in Table 1 (Buck et al., 2002; Gamsjäger et al., 2008). A practical parameter that is associated with the calcium carbonate saturation is the Calcium Carbonate Precipitation Potential (CCPP) (Standard Methods 2330, 2010), which is a generally used measure for the amount of calcium carbonate which theoretically can precipitate. SI and CCPP are positive for oversaturated water, zero for saturated water, and negative for undersaturated water. Negative CCPP values are also reported as Calcium Carbonate Dissolution Potential, Calcite Dissolution Capacity or Aggressive Carbon dioxide. Calcium carbonate equilibrium or saturation in Fig. assuming {HCO−3according } = 2 {Ca2+to}.Eq. The(1) pHisatshown equilibrium is 1, higher for water with lower calcium content, i.e. for softer water. In December 2012, a new German standard for the calculation of calcium carbonate saturation in drinking water was released (DIN 38404-10, 2012, hereafter referred to as DIN). According to the DIN, it is no longer allowed to calculate the SI and CCPP with the simplifications described above. The DIN requires these parameters to be calculated with all specified aqueous species, including complexes with sulphate and phosphate. In order to do so, the DIN standard describes the calculation method with the chemical principles and a data set containing 10 water samples for validation of the calculation method or computer program used. Drink. Water Eng. Sci., 6, 115– 124, 124, 2013

1.  Calcium carbonate equilibrium or saturation (SI = 0, at Figure 1. Calcium ◦



=

2+

{HCO3 }

2 {Ca }) and withdissolution. over- and under-saturation i.e. 25 C and calcium carbonate precipitation

The objective of this research is to determine the best calculation method for SI and CCPP in drinking water by testing the calculation methods described in the recent German standard (DIN 38404-10, 2012), the equivalent US standard (Standard Methods 2330, 2010, hereafter referred to as SM), the Dutch standard (NEN 6533, 1990, hereafter referred to as NEN) and a number of widely used databases for calculating chemical equilibria in water, with a validation set given in the DIN standard.

2 2.1

Materi Mat erials als and met method hods s Calculation Calcu lation method DIN 38404 38404-10 -10

Table 2 gives an overview of all elements, phases and dissolved species in DIN. For both calcium and magnesium this standard distinguishes eight diff erent erent dissolved species. The standard covers only calcite as the least soluble crystalline form of CaCO3 , and applies only to “water for distribution as drinking water”. The standard requires that the concentrations of all the elements mentioned are known, as well as pH and temperature. Because of its complexity DIN requires an extensive iterative computer calculation for both SI and CCPP determination, the latter reported in DIN as Calcitlösekapazität (Calcite Dissolution Capacity). www.drink-water-eng-sci.net/6/115/2013/  

 

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

117

Table 2. Chemical 2.  Chemical elements, phases and dissolved species in DIN 38404 10 (2012). Eleme lement nt

Phas hase

Di Disssolv solved ed speci pecies es

Ca Mg Na K

CaCO3   (s)

Ca2+ , CaCO03 , CaHCO+3 , CaOH+ , CaSO04 , CaH2 PO+4 , CaHPO04 , CaPO4 Mg2+ , MgCO03 , MgHCO+3 , MgOH+ , MgSO04 , MgH2 PO+4 , MgHPO04 , MgPO4 Na+ K+

C* Cl N S*

CaCO3   (s)





H2 CO3  ( = CO2 .aq), HCO3 , CO 23 Cl NO3 HSO4 , SO 24 −









P* H ∗

H2 O (l)





The dissolved dissolved species already specifie specified d for the cations Ca and Mg are not repeated for the anions.

Table 3. Chemical 3.  Chemical elements, phases and dissolved species in Standard Methods 2330 (2010).

Calculation Calcu lation metho method d Standard Standard Metho Methods ds 2330 2330

SM gives a set of equations for calculating the value for SI. For CCPP no analytical equation is available and the value can only be obtained by iterative computer calculations. SM distinguishes three crystalline forms of CaCO3  (calcite, vaterite and aragonite) and further only two aqueous species (Ca2+ and HCO−3 ), with the assumption that either all other species can be neglected or the reduction to these two aqueous species can be estimated. The influence of other ions is accounted for through the ionic strength and successively in the activity coefficients of Ca2+ and HCO−3 . The standards DIN, SM and NEN have slightly diff erent erent defined parameters for alkalinity. Therefore, Total Inorganic Carbon (CT , or TIC) or Dissolved Inorganic Carbon (DIC) is used, which requires calculation of the concentrations of CO 2  and CO23− (via K1  and K2 ). Standard Methods gives K2  as published by Plummer and Busenberg (1982). This study uses K1  from the same publication. In Table 3 the chemical elements used in SM are shown. 2.3



H3 PO4 , H 2 PO4 , HPO42   , PO 43 H+ , OH

Chemistry in DIN is based on molarity (molL Chemistry (mol L−1 solution) instead inste ad of molality (mol kg−1 solvent i.e. water) as used in chemical thermodynamics (Gamsjäger et al., 2008). The values expressed as molarity and molality are equal for a solutio tion n with a density density of 1 kg L−1 while assuming that the mass of the solution equals the mass of water. 2.2





Calculation Calcu lation metho method d NEN 6533

Just as SM, NEN gives a set of equations for calculating the va value lue for SI. For For CCPP CCPP no ana analyt lytica icall equ equati ation on is av avail ailabl ablee and the value can only be obtained by iterative computer calculatio tions. ns. NEN consid considers ers onl only y Ca2+ , HC HCO O−3  and  and H+ an and d us uses es only only one crystalline form of CaCO3  (calcite), but adjusts the solubility product of CaCO3 , in order to take into account the soluble species of CaCO03  and CaHCO+3 , by decreasing the pKS value with 0.037 (at 0 ◦ C) ranging to 0.057 (at 30 ◦ C) based on a combination of Ks  values from Plummer and Busenberg

Element

Phase

Di Disssolved species

Ca C H

CaCO3  (s) a CaCO3  (s) a H2 O (l)

Ca2+ b HCO3 , CO 23 H+ , OH c





c



a

three crystalline forms of CaCO 3 : calcite, aragonite and vaterite b ion pairs CaHCO + , CaSO04  and CaOH+ by assumption 3 only, for estimation of [Ca 2+ ]

c

2−



+

CO3 −  ,] OH , and H only in Alkalinity, for estimation of  [HCO 3

(1982) and Jacobson and Langmuir (1974). Recent literature assesses the approach for Ks  used by Jacobson and Langmuir (1974) as incorrect (de Visscher et al., 2012). NEN uses the term aggressiveness for calcium carbonate expressed as aggressive carbon dioxide. 2.4

Calculation Calcu lation softw software are PHREE PHREEQC QC

The computer program PHREEQC, developed by the United States Sta tes Geo Geolog logica icall Sur Surve vey y (US (USGS, GS, 201 2013) 3) is the de fac facto to internatio inter national nal stan standard dard for calculating calculating chem chemical ical equilibria equilibria in groundwater. This program (PHREEQC.exe) solves the mathematical equations that are generated from a chemical database (.dat) and an input file (.pqi), both adjustable by the user (Parkhurst and Appelo, 2013). PHREEQC version 3.0.3 was used to assess the diff erent erent calculation methods for SI and CCPP according to DIN, SM, NEN and the chemical databases from Table 4. All databases in the upper part of Table 4 are distributed with PHREEQC version 3.0.3 in which “phreeqc.dat” is the default database.

www.drink-water-eng-sci.net/6/115/2013/

Drink. Water Eng. Sci., 6, 115–124 124,   , 2013

 

118

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

Table 4. Databases 4.  Databases in the PHREEQC data format for calculating chemical equilibria in water. Database

Institution

Program

phreeqc.dat wateq4f.dat

US-USGS US-USGS

PHREEQC WATEQ4F

2.5

minteq.v4.dat llnl.dat sit.dat pitzer.dat

US-EPA US-LLNL FR-ANDRA US-USGS

MINTEQA2, VISUAL MINTEQ and MINEQL+ EQ3 / 6 and Geochemist’s Workbench (GWB) PHREEQC PHRQPITZ

stimela.dat din38404-10 din38 404-10_2012. _2012.dat dat sm sm23 2330 30_2 _201 010. 0.da datt

NL-Omnisys / D Delf elftt UT NL-Om NL-Omnisys nisys / D Delf elftt UT NL NL-O -Omn mnis isys ys /  Del Delft ft UT

PHRE PHREEQ EQC C / Stimela Stimela PHRE PHREEQ EQC C / Stimela Stimela PHRE PHREEQ EQC C / Stimela Stimela

nen6 nen653 533_ 3_19 1990 90.d .dat at

NL NL-O -Omn mnis isys ys /  Del Delft ft UT

PHRE PHREEQ EQC C / Stimela Stimela

Calculation metho Calculation method d with widely used chemical chemical databases

Seve Several ral widely widely used used comput computer er pro progra grams ms for cal calcul culati ating ng chemic che mical al equili equilibri briaa in wa water ter have have been been devel develope oped d by diff erent erent institutions for diff erent erent purposes. These programs include their own chemical database, all in their own specific data format. The most prominent databases are also available in the data format for the computer program PHREEQC. The upper part in Table 4 shows a number of databases available in the PHREEQC data format that are able to calculate SI and CCPP, with their institution of origin and the computer program for which they were originally developed. The com comput puter er pro progra gram m PHREEQ PHREEQC C and its rel relate ated d dat databa abase se phreeqc.d phreeq c.dat at is widely widely used used and also is lis listed ted in Sta Standa ndard rd Methods for use of calculation of calcium carbonate saturation indices. The phreeqc.dat database was developed for the calculation of chemical equilibria in groundwater. The calcium carbonate chemistry in the database phreeqc.dat is based on Nordstrom et al. (1990), which is the most recent update of the much-cited publications of Jacobson and Langmuir (1974), Truesdell and Jones (1974) and Plummer and Busenberg (1982). Nordstrom et al. (1990) give equilibrium constants for natural water for a temperature range from 0 to 100 ◦ C, at a pres pressure sure of 1 bar bar.. Their dataset is also adopted adopted by Stumm and Morgan (1996). In phreeqc.dat more ion pairs are included than in DIN, such as ion pairs of sodium with sulphate, phosphate, bicarbonate, carbonate and hydroxide. The database wateq4f.dat is also based on Nordstrom et al. (1990) and therefore almost identical to phreeqc.dat for SI and CCPP calculation. The minteq.v4.dat database has been developed by US EPA, for version 4 of MINTEQA2. The llnl.dat database, compiled by the Lawrence Livermore National Laboratory (Daveler and Wolery, 1992), is by far the most extensive database with respect to thermodynamic equili equ ilibri brium um con consta stants nts.. The databa databases ses sit sit.da .datt and pitzer pitzer.da .datt are in accordance with the specific ion interaction theory (SIT) of Grenthe et al. (1997) respectively the specific ion interaction model of Pitzer (1973). They were designed to extend the calculation methods for natural water with a high con-

tent of dissolved salts (ionic strength > 500 500 mm mmol ol kgw kgw−1 ) and they were calibrated on, for instance, seawater and brine. In pitzer.dat, oxygen (dissolved and as gas phase) and all compounds with N and P are not included. 2.6

Calculation Calcu lation metho method d with specifi specific c chemical chemical databas databases es

The specifically developed chemical databases are summarized in the lower part of Table 4. The stimela.dat database is dev develope eloped d spec specifical ifically ly for wate waterr treatm treatment ent by Omnis Omnisys ys and Delft University of Technology as part of the Stimela modeling environment (van der Helm and Rietveld, 2002). The databa database se is bas based ed on phr phreeq eeqc.d c.dat at wit with h extra extra specie speciess and and phas phases es to co comp mply ly to SM an and d DIN, DIN, an and d wi with th ad addi di-tional redox-uncoupled elements (de Moel et al., 2013). The stimela.dat database will be used in further calculations instead of phreeqc.dat. The chemical specifications of DIN were converted into a newly developed database for PHREEQC (referred to as “din38404-10_2012.dat”). Starting with phreeqc.dat as a basis, all elements, species and phases were removed which are not mentioned in DIN. An exception was made for the parts of the database that PHREEQC needs in order to run, such as the elements H and O, the gases O 2  and CO2 , and H2 O, alkalinity and the oxidation state ( E ). ). Subsequently the numerical values for the equilibrium constants of the reactions (log_k in PHREEQC; lg(K0 ) in DIN), the change in enthalpy of the reactions (delta_h in PHREEQC;  ∆ H in DIN) and the activity coeparameter fficients (gamma in PHREEQC; f (i)values in DINgiven with its ion size  g(i)) were adjusted to  the in DIN. The last step for building din38404-10_2012.dat was the determination of  A  A1  to  A6  in the analytical expressions for the equilibrium constants (log_k) in PHREEQC for the reactions with a heat capacity (C  p  p  in DIN):

Drink. Water Eng. Sci., 6, 115– 124, 124, 2013

www.drink-water-eng-sci.net/6/115/2013/  

 

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

119

Table 5. Water 5.  Water quality validation data set from DIN consisting of 10 di ff erent erent drinking water samples. Parameter

Unit  

Temperature pH Calcium Magnesium Sodium Potassium Total otal Inor Inorga gani nicc Ca Carb rbon on



Ca Mg Na K C

C – mmol L mmol L mmol L mmol L mmolL mmolL

1



1



1



1



1



1



S1

S2

S3

S4

S5

S6

S7

S8

S9

S1 S 10

10.0 7.34 1.40 0.23 0.30 0.05 2.737

15.0 7.80 0.75 0.10 0.40 0.10 1.630

10.0 7.00 3.50 0.70 2.30 0.30 6.724

10.0 5.60 0.15 0.05 0.30 0.10 1.375

10.0 7.37 1.40 0.25 0.40 0.07 2.662

15.0 7.86 0.78 0.10 0.45 0.05 1.584

12.0 7.59 1.30 0.25 1.60 0.15 1.159

10.0 7.47 1.00 0.25 0.20 0.06 2.094

15.0 7.30 2.65 0.20 0.30 0.06 4.672

61.0 7.30 1.00 0.18 0.20 0.05 2.057

Chloride Nitrate Sulphate Phosphate

Cl N S P

mmol L mmol L mmol L mmol L

1



1



1



By DIN calculated validation results: SI –   CCPP mmol L

 A1  = lg (K0 ) +

T 0

0.402 −0.145



1



∆H

0.25 0.15 0.38 0.00

0.30 0.03 0.15 0.00

   

0.279 −0.032



2.70 0.50 1.20 0.00

   

0.121 −0.163



 A4  =

   

4.155 −1.111



0.55 0.20 0.25 0.07

0.381 −0.140

 



 

0.28 0.00 0.15 0.07

   

0.221 −0.030



0.85 0.10 1.40 0.00

   

0.553 −0.055



   

0.35 0.05 0.20 0.03

0.75 0.05 0.55 0.00

0.49 0.497 7 −0.11 0.115 5

0.09 0.095 5 0.07 0.071 1



0.10 0.05 0.25 0.03

   

0.009 −0.003



wa ways ys 100 % satur saturate ated d at 1.0 atm in dry air with an oxyge oxygen n content conte nt of 20.8 %. −

C P (1 + ln (T 0 ))

2.7

 R ln (10 10))

 A2  =  A5  =  A6  = 0  A3  =

0.34 0.18 0.05 0.00

 C P T 0 − ∆H  R ln (10 10))  C P

(2)

 R

The temperature related DIN parameters  A  (constant),  B  (ion size coefficient), and   DK  (dielectric constant) in the calculation of the activity coefficients are included in PHREEQC in an equivalent way. DIN assumes no e ff ect ect of uncharged ions, therefore   b   in the Debye-Hückel equation as used in WATEQ (Truesdell and Jones, 1974) is set to 0 in din3840410_2012.dat (the default value used in PHREEQC is 0.1). Simi Simila larr to th thee deve develo lopm pmen entt of the the DIN DIN data databa base se for for PHREEQC, also databases were newly developed for Standard dar d Met Method hodss 233 2330 0 (sm233 (sm2330_2 0_2010 010.da .dat) t) and NEN 6533 6533 (nen6533_1990.dat) and therefore a number of issues was resolved. In order for PHREEQC to run, log_k values for ion pairs pairs need need to be defined. defined. Howe Howeve ver, r, in SM and NEN ion pairs are not included, see Table 3, therefore the log_k  va value luess of all rea reacti ction on equati equations ons of the these se spe specie ciess was set to   −100 in “sm2 “sm2330_2 330_2010.d 010.dat” at” and “nen “nen6533_ 6533_1990. 1990.dat” dat”.. SM uses uses th thee Da Davi vies es equa equati tion on for for the the influ influen ence ce of the the ionic ion ic str streng ength th for charg charged ed ion ionss acc accord ording ing to the def defaul aultt method met hod in PHREEQ PHREEQC, C, the theref refore ore,, the gamma gamma option option in sm2330 sm2 330_20 _2010. 10.dat dat has been been omitte omitted. d. NEN uses uses the WATEQ Deb Debyeye-Hüc Hücke kell equ equati ation on for charg charged ed ion ions, s, thu thuss the gamma gam ma opt option ion is use used d in nen653 nen6533_1 3_1990 990.da .dat. t. Fo Forr spe specie ciess without charge (including H2 O and CO2 ) an activity coefficient of 1.0 has been assumed in both sm2330_2010.dat and nen6533_1990.dat (b = 0 in gamma). For all calculations with PHREEQC it is assumed that the oxygen content is alwww.drink-water-eng-sci.net/6/115/2013/

Drinking Drinki ng water water vali validatio dation n data data set set

For validation of the calculation methods, the data set of 10 water quality validation samples given in DIN was used. The validation data set in DIN contains the measured water quality parameters of the 10 samples. Part of the data is summarized in Table 5, including DIN calculated SI and CCPP values. Actually, in the DIN the Calcitlösekapazität ( DC ) in mg L−1 is gi give ven n fr from om whic which h th thee CC CCPP PP in Tab able le 5 in mmolL mmolL −1 is calculated with: CCPP =

 

 DC



MWCaCO3

(3)

The water quality dataset in Table 5 ranges from very soft water (sample 4) to hard water with high sulphate content (sample 3). The water temperature of the samples is between 10 and 15◦ C (sample 1–9), and 61 ◦ C (sample 10); pH is between 7.00 and 7.86 (sample 1–3 and 5–10), and 5.60 (sample 4). Sample 4 and sample 10 are outside the scope of DIN (“water for distribution as drinking water”) because of pH respectively spectiv ely temperature. The validation set lacks samples with pH above 7.86, that is typical for soft and softe softened ned drinking water. Acco Accord rdin ing g to DIN DIN mo most st wate waterr samp sample less in th thee val al-idat idatio ion n set set ar aree sl slig ight htly ly ca calc lciu ium m carb carbon onat atee di diss ssol olvi ving ng (−0.2 < CCPP < 0. 0.0 0 mmol mmol L−1 ), except for sample 4, which is highly calcium carbonate dissolving, and sample 9, which has a small calcium carbonate precipitation potential. The parameter alkalinity is not included in Table 5, because for proper comparison of the DIN, SM and NEN standard the sum of inorganic carbon species in a solution is used. The density of the diff erent e rent samples is not given in DIN, as it is base based d on mola molarity rity.. Molar Molarity ity is con convert verted ed into molality for PHREEQ PHREEQC C by assumi assuming ng a den densit sity y of 1.0 kg L−1 for all Drink. Water Eng. Sci., 6, 115–124 124,   , 2013

 

120

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

Figure 2. Deviations 2.  Deviations of the SIs calculated in PHREEQC according

Figure Figure 3.   Deviati Deviations ons of the SIs cal calcul culated ated in PHR PHREEQ EEQC C wit with h

to the DIN, SM and NEN standards, from the SIs given in the DIN validation data set for the 10 water quality samples S1 to S10 (see Table 5).

widely used chemical databases, from the SIs given in the DIN validation data set for the 10 water quality samples S1 to S10 (see Table 5).

samples, regardless of water temperature. The assumption of a dens densit ity y of 1.0 1.0 kg L−1 is only used for the calculations with DIN, SM and NEN. For the calculations with the other databases from Table 4, the solution density for conversion from concent concentration rationss in mmol L−1 into into mmo mmoll kgw−1 is calculated by PHREEQC itself.

database. This is remarkable since the reason for decreasing pKs  value in NEN is to take into account the e ff ect e ct of ion 0 + 0 pairs CaCO3  and CaHCO3 , and not CaSO4  ion pair. Even though the calculation methods of SM and NEN are similar, the lower pKs   value leads to an almost equal di ff erence erence of  around 0.045 between the two methods. It should be noted that pKw  in NEN is only validated for a temperature range of  0 to 30 ◦ C; therefore, the calculated SI value for sample 10 with a temperature of 61 ◦ C is only illustrative. In Fig. 3 the deviations are shown between the SIs calculated in PHREEQC according to the widely used chemical

3 3.1

Resu Re sult lts s SI for calciu calcium m carbon carbonate ate

In Fig. 2 the deviations are shown between the SIs calculated in PHREEQC according to the DIN, SM and NEN standards and the SIs according to the DIN validation data set, see Table 5. Also the tolerance for calculated SI values of 0.01 given in the DIN standard is shown in Fig. 2. From the data shown in Fig. 2, it is observed that the SI values calculated with din38404-10_2012.dat in PHREEQC have a maximal deviation of 0.0011. The calculation method with din38404-10_2012.dat complies with the DIN standard in which a tolerance of   ±0.01 SI is specified specified for the calcula calcula-tion results. SI values calculated with the SM database are on average 0.030 higher than the SIs according to DIN. This is mainly caused by neglecting ion pairs in SM; more specifically, the ion pair CaSO04 , which leads to an overestimation of the Ca 2+ concentration. The overestimation is smaller for sample 4 becausee of the low concentration caus concentration of ions in the samp sample le and the overestimation is larger for the samples 3, 7 and 9 with high sulphate concentrations. Almost all calculated SI values are out of the DIN tolerance range. For most samples, the NEN database provides SI values that are more than 0.01 lower than the DIN database because of the higher Ks  value used in NEN, except for the samples 3, 7 and 10. The NEN database gives better results for the samples 3 and 7 with higher sulphate concentrations than the SM Drink. Water Eng. Sci., 6, 115– 124, 124, 2013

equilibrium databases and the SIs according to the DIN validation data set, see Table 5. Also the tolerance for calculated SI va valu lues es of 0. 0.01 01 gi give ven n in th thee DIN DIN st stan anda dard rd is show shown n in Fig. Fig. 3. Diff eeren rence cess be betw twee een n th thee ca calc lcul ulat ated ed SI valu values es with with stimela.dat and the values according to the DIN validation data are on average 0.012. The diff erences erences are caused by small diff erences erences in the values of equilibrium constants and activity coefficients, and not by the ion pairs that are present in stimela.dat, but are not present in the DIN standard. For 5 of the 10 samples stimela.dat calculates SI within the tolerance of 0.01 SI as specified in the DIN standard. The larger error observed for sample 10 is caused partly by the fact that DIN neglects the change in density due to the higher temperature. The SI values calculated with stimela.dat and wateq4f.dat are almost almost the same for all sampl samples. es. The SI value valuess wit with h minteq.v4.dat and llnl.dat are, with sample 10 left out, on average 0.022 higher than the SI values according to DIN. This is mainly due to a slight di ff erence erence in the values of lgK2 -lgKs for both databases at a temperature between 10 and 15 ◦ C. At 61 ◦ C (sample 10), the diff erence erence in SI for these databases is large due to the large di ff erences erences in Ks . The large diff erence erence in sample 4 for minteq.v4.dat is the overall e ff ect ect of many small diff erences erences that reinfo reinforce rce each other other,, from which half  is caused by a diff erence erence in lg{HCO−3 }. www.drink-water-eng-sci.net/6/115/2013/  

 

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

121

Figure 4.  Deviations of the CCPPs calculated in PHREEQC according to the DIN, SM and NEN standards, from the CCPPs given

5. Deviations  Deviations of the CCPPs calculated in PHREEQC with Figure 5. the widely used chemical databases, from the CCPPs given in the

in the DIN validation data set for the 10 water quality samples S1 to S10 (see Table 5).

DIN validation data set for the 10 water quality samples S1 to S10 (see Table 5).

The database sit.dat gives for most samples a di ff erence erence of  less than 0.01. The diff erences erences are mainly caused by small diff erences erences in Ks  and K2 . The database pitzer.dat gives large diff erences erences up to 0.065. The diff erences erences between stimela.dat and pitzer.dat are entirely due to the diff erence erence in the activity 2+ − of Ca and HCO3 , since K2  and Ks  are the same. It can be observed that the Pitzer model is less suitable for the “low salt” samples given in the DIN standard. The bandwidth of the calculation results with the comprehensive databases in Fig. 3 is smaller than the bandwidth for the results with the simple calculations according to SM and NEN shown in Fig. 2. 3.2

Calcium Calci um carbonat carbonate e precipita precipitation tion potent potential ial

In Fig. 4 the deviations are shown between the CCPPs calculated in PHREEQC according to the DIN, SM and NEN standards and the CCPPs according to the DIN validation data set, see Table 5. Also the tolerance for calculated CCPP val values ues of of 0.00 0.001 1 mmol L−1 given in the DIN standard is shown in Fig. 4. Fr From om th thee da data ta sh sho own in Fi Fig. g. 4, it is obse observ rved ed that that the CCPPs calculated with the DIN database comply with the validation values. The maximum deviation observed is +0.0 0.0011 011 mmol mmol L−1 (sample 3), which is not significantly outof-tolerance. CCPPs calculated with the SM database give values which are on avera average ge 0.018 0.018 mmol L−1 higher than CCPPs according to DIN, with with a peak of of 0.062 mmol L−1 for sample 3. This is due to neglecting ion pairs in SM. The CCPP calculated with the NEN database always gives lower values than calculated with SM due to diff erence erence in pKs   as described for SI. The fixed diff erence erence in the pKs  gives variable diff erences erences for the CCPP, because of the di ff erences erences in calcium, carbonate and bicarbonate concentrations in the ten samples. It is noted that pKw  in NEN is only validated for a temperature range of 0 www.drink-water-eng-sci.net/6/115/2013/

to 30 ◦ C, therefore the calculated CCPP for sample 10 with a temperature of 61 ◦ C is only illustrative. In Fig. 5 the deviations are shown between the CCPPs calculated in PHREEQC according to the widely used chemical equilibrium equil ibrium databases databases and the CCPPs acco according rding to the DIN validation data set, see Table 5. Also the tolerance for calculated CCPPs CCPPs of 0 0.001 .001 mmol L−1 given in the DIN standard is shown in Fig. 5. From From th thee da data ta in Fig. Fig. 5 it is obse observ rved ed that for mo most st samples samp les the CCPP CCPPss calc calculate ulated d with stimela. stimela.dat dat are 0.000 −1 −1 to 0.005 0.005 mm mmol ol L (0.0 (0.0 to 0. 0.5 5 mg Ca CaCO CO3 L ) lar larger ger than the the va valu lues es in th thee DI DIN N va vali lida dati tion on data data set. set. This This me mean anss that for calcium dissolving water, according to stimela.dat, less CaCO3   might be dissolved than according to the DIN standard. The diff erences erences are slightly larger for samples 9 and 10, and for sample 3 the diff eerence rence is 0.021 0.021 mmo mmoll L−1 (2.1 (2.1 mg Ca CaCO CO3 L−1 ). This diff erence erence is caused by accumulation of several small diff erences, erences, and not by ion pairs which are in stimela.dat but not in din38404-10_2012.dat. For only 2 of the 10 samples stimela.dat calculates CCPP within the tolera tolerance nce of 0.0 0.001 01 mmo mmoll L−1 as specified in the DIN standard. From Fro m the cal calcul culati ation on with with sti stimel mela.d a.dat at it is observ observed ed tha thatt the free ion Ca2+ forms 90–99 90–99 % of the total calc calcium ium conte content nt in 0 all ten samples, the remainder is present as CaSO4 , CaHCO+3 , CaCO03   and CaHP CaHPO O04   (in order of importance). These ion pairs cause the large deviation as mentioned for sample 3 calculated with sm2330_2010.dat. Other ion pairs for Ca are negligibl neg ligible. e. From the calcu calculation lation with stimela.d stimela.dat at it can also be observed that the carbon ion pairs are of less importance since since all car carbon bon in the 10 sam sample pless is 98–100 98–100 % pre presen sentt as 2− − CO2 , HCO3  or CO3  . The CCPP values calculated with wateq4f.dat are almost the same as for stimela.dat for all 10 samples. It can be observed that the di ff erences erences between the CCPPs from from the DIN valid validati ation on data data and the CC CCPPs PPs cal calcul culate ated d Drink. Water Eng. Sci., 6, 115–124 124,   , 2013

 

122

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

with minteq.v4.dat, llnl.dat, sit.dat and pitzer.dat are generally larger than the diff erences erences calculated with stimela.dat and watq4f.d watq4f.dat, at, and that all value valuess are generall generally y in the −1 range of   ±0.01 0.01 mm mmol ol L . The causes for the diff erences erences of  minteq.v4.dat, llnl.dat, sit.dat and pitzer.dat are the same as for the diff erences erences observed in SI values. The largest di ff eerrences occur for samples 3 and 9 due to a large influence of  the ion pair CaSO04 . In addition, a large diff erence erence occurs for sample 10, which is mainly caused by the di ff erences erences in Ks and K2 . 4

Disc Di scus ussi sion on

4.1 SI ve versu rsus s CCP CCPP P SI indicates thermodynamical driving force, while CCPP is 3  reacted to obtain equilibrium. The paramtotal mass CaCO eters are not quantitatively related, as shown in Fig. 6, only qualitati quali tatively vely;; SI and CCPP are posit positive ive for ove oversatu rsaturated rated water, zero for saturated water, and negative for undersaturated water. In 2003 the German drinking water regulations were changed from SI as the guideline parameter to CCPP (“Calcitlösekapazität”). This approach focuses better on the water quality issue, which is precipitation and dissolution of 

Figure 6. 6. CCPP  CCPP values plotted against the SI (data from the DIN validation data set, see Table 5).

0.01 defined in DIN. The DIN specifies a minimal accuracy for the ionic balance balance of 5 % (ionic stren strength gth > 4mmolL−1 ) to 1 10 % (ionic stre strength ngth < 4mmolL− ) which can be adopt adopted ed as minimal accurary levels for calcium and alkalinity. Depending on the ionic strength, natural soft water with a calcium concentra conc entration tion of 1.0 1.0 mmol L−1 would allow for a deviation of  −

1



1

calcite. 4.2

Tolera olerance nce and accur accuracy acy

For natural water the DIN tolerance range for SI (0.01) and for CCPP CCPP (0.00 (0.001 1 mmol mmol L−1 ) are not equivalent. This can be demonstrated by assuming the allowed deviation in pH for sample 5 (7.38 instead of 7.37) which results in an unac-

(1.0 × 5 % =)0.05mmolL to (1.0 × 10 % =)0.1mmolL , which is 50 to 100 times larger than the DIN tolerance range for calculation of CCPP. Figures 2 to 5 show that almost all presented models for the calculation of SI and CCPP comply with with a to tole lera ranc ncee ra rang ngee of 0. 0.05 05 fo forr SI an and d 0. 0.05 05 to 0. 0.1 1 mmolL mmolL −1 for CCPP. It would be preferable to introduce tolerances for SI and CCPP which are consistent with each other and based on practical accuracy of the measurements of at least pH (including the DIN accuracy check) and calcium.



cepted deviation cepted deviation in CCPP of 0.005 0.005 mmol L 1 (five times to high). An error of 0.01 in the log-concentration parameter SI corres cor respon ponds ds to err errors ors of 2.3 % (= 100.01 ) in concentrati concentration on of monovalent monovalent ions and and 1.2 % ( = 100.01/2 ) for bivalent ions, at equal equal equ equili ilibri brium um consta constant. nt. Nat Natura urall sof softt wa water ter wit with h a −1 cal calciu cium m concen concentra tratio tion n of 1.0 mmol mmol L would allow for a de devia viatio tion n of (1.0 × 1.2 % =) 0.01 0.012 2 mm mmolL olL −1 , which hich is 12 times larger than the tolerance range for CCPP. The tolerances for SI and CCPP are equivalent at a calcium concentration cent ration of (0.001 (0.001 / 1.2% 1 .2% =) 0.08 0.083 3 mm mmolL olL −1 (3.3mgL−1 ). The DIN dataset has an average calcium concentration of  1. 1.38 38 mm mmol ol L−1 and a lowest lowest concentratio concentration n of 0.15 mmol L−1 . This shows that in DIN the restrictions for CCPP are by far more stringent than for SI (or pH). The allowable tolerance for SI and CCPP as defined in DIN is smaller than the deviations caused by the inaccuracy of the measurements of the chemical parameters, which form the input of the calculations. The DIN specifies for pH a tolerance of 0.05 based on determination of   p  value (acidity), m   value (alkalinity), measured pH and calculated pH. Consequently, 0.05 is also the minimal accuracy for SI, which is 5 times larger than the tolerance of the SI calculation of 

4.3

Molarity Molari ty vers versus us molal molality ity

The equations for equilibrium in DIN are based on the obsolete molarity molarity syste system m (mol L−1 ). Modern chemistry uses mo−1 lality lalit y (mol kgw ). For drinking water with its low salt content and its temperature between 0 and 25 ◦ C the diff erence erence is very small. However at higher temperatures, the diff erence erence ◦ in density is no longer negligible. Above 45 C the density is bel below ow 0.99 0.99 kg L−1 giving diff erences erences in concentration above 1 %. The densit density y of sampl samplee 10 in the DIN vali validat dation ion set is −1 0.983kgL , as calculated by PHREEQC with stimela.dat. The diff erences erences in SI and CCPP calculated according to DIN due to neglecting changes in density are respectively 0.013 and 0.0 0.004 04 mmo mmoll L−1 . This makes the applicability of DIN for water with a temperature higher than 45 ◦ C unjustified and sample 10 should therefore be omitted from the DIN validation database. 4.4

Warm,, hot Warm hot and boili boiling ng water

DIN and NEN are only applicable in lower temperature water. NEN gives as temperature range 0 to 30 ◦ C, while DIN

Drink. Water Eng. Sci., 6, 115– 124, 124, 2013

www.drink-water-eng-sci.net/6/115/2013/  

 

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

123

does not give temperature limits but from the calculations performed in this research it is found that it is valid up to a

5

range of 40 to 50 ◦ C. Standard Methods gives a temperature range for Ks  and K2  of 0 to 90 ◦ C, according to Plummer and Busenberg (1982). For drinking water practice the temperature range should be extended up to 100 ◦ C since customers heat up and boil water and scaling of calcium carbonate is a critical factor for in-house drinking water practices. This requires that equilibrium constants and activity coe fficients used for calculation of SI and CCPP should be valid in the temperature range of 0 to 100 ◦ C. In addition, the vapor pressure of water is important, in combinatio comb ination n with the concentrati concentrations ons of dissolved dissolved gases. At a higher vapor pressure the gas partial pressure of N 2 , O2 , CO2  might result in degassing and therefore in a reduction of CO2   content. This process occurs during gas bubble formation when heating water, which already occurs below the

The computer program PHREEQC (USGS, 2013) with the develope dev eloped d chemi chemical cal datab database ase din38 din38404-1 404-10_201 0_2012.dat 2.dat complies with the new German standard DIN 38404-10 (2012) for calculating SI and CCPP. This standard covers water that is intended for distribution as drinking water with its specific limitations on concentrations and temperature. This compliance is achieved by assuming equal values for molarity as used in DIN (obsolete) and molality as used in PHREEQC. From comparison with widely used chemical databases it is concluded that the use of molarity limits the use of DIN to a maximum temperature of 45 ◦ C. Alternative international standards stan dards (Standa (Standard rd Metho Methods ds and NEN) are not accu accurate rate enough to comply with DIN, because of their simplifications. It should be noted that the DIN tolerance range is more stringent than the accuracy of the chemical analyses which serve as input for the computer calculations. On the other hand, the diff erences erences in calculation results for DIN, SM and NEN illustrate the need for international unification of these standards. Running extensive chemical models i.e. databases on the DIN validation data set results in deviations outside the DIN tolerance range. None of these widely used models fully complies with the DIN standard. However, it must be noted that all models, including DIN, lack proper scientific justification and / or or scientific acceptance. This might be achieved in the near future within the framework of the “IUPAC-NIST Solubility Data Series” of the International Union for Pure

boiling point The 0.20 partial pressure of oxygen tact with wet of airwater. is around atm for water samp samples lesin1conto 9 from the DIN validation set with water temperatures from 10 to 15 ◦ C, and 0.16 atm for sample 10 with a temperature of  61 ◦ C. The current standards do not fulfil the need from drinking water practice to include calculation of calcium carbonate scaling at high temperatures. In future research, the e ff ect ect of higher temperatures up to 100 ◦ C on calcium carbonate saturation in drinking water will be assessed. In this research stimela.dat, which is based on phreeqc.dat, will be used since

Conclu Con clusio sions ns

values for equilibrium constants and activity coefficients are valid up to 100 ◦ C and eff ects ects of degassing can be taken into account. 4.5

Scientific Scien tific justi justificatio fication n

The chemical databases and standards appear to have significant diff erences erences in the values of the equilibrium constants. The influence of the diff erence erence in activity coefficients is less significant, with the exception of the unsuitable models (SIT and Pitzer) which have not been calibrated for potable water with a low ionic strength. An international standardization of  this basic chemistry is performed within the “IUPAC-NIST Solubility Data Series” of the International Union for Pure and Applied Chemistry (IUPAC) and the National Institute of Standards and Technology (NIST). A volume on alkaline earth carbonates has been published recently (de Visscher et al., 2012; de Visscher and Vanderdeelen, 2012). The values of Ks , K1 , K2  and Kw  in phreeqc.dat and thus in stimela.dat appear to be well in accordance with the presented results. It is expected that the results will be considered by USGS for future versions of phreeqc.dat and will consequently be adopted in stimela.dat. Pending this scientific justification, the  K  values in stimela.dat will be used in further research, according to Nordstrom et al. (1990), mainly because of the wide temperature range. This approach is in compliance with Standard Methods 2330 D. www.drink-water-eng-sci.net/6/115/2013/

and Applied Applied Chemistry Chemistry (IUPAC (IUPAC)) and the Natio National nal Insti Institute tute of  Standards and Technology (NIST). For application of drinking wat water er supply supply it is conclu concluded ded tha thatt the sta standa ndards rds should should als also o be applicable for hot and boiling water, since scaling of calcium carbonate is a critical factor for in-house drinking water practices. For current practical applications the PHREEQC database stimela.dat was developed within the Stimela platform of Delft Unive University rsity of Technology echnology.. This database is an extension of phreeqc.dat focused on water treatment and drinking water applications. This approach is in compliance with Standard Methods 2330 D. 6

Supplement Suppl ementary ary mater material ial

For For us usee of th thee Su Supp pple leme ment nt th thee fre freee soft softwa ware re phre phreeq eqcc3.0.6-7757.msi and IPhreeqcCOM-3.0.6-7757-win32.msi or a higher version should be installed. List of files: –   CalciumCarbonateSatura CalciumCarbonateSaturation_v20131020.xlsm tion_v20131020.xlsm containing din38404-10_2012.dat and the DIN validation data set –   din38404-10_2012.dat –   sm2330_2010.dat –   nen6533_1990.dat –   stimela.dat

Drink. Water Eng. Sci., 6, 115–124 124,   , 2013

 

124

P. J. de Moel et al.: Assessment of calculation methods for calcium carbonate saturation

–  DIN38404-10_compliance.pqi

Jacobson, R. L. and Langmuir, D.: Dissociation constants of calcite and CaHCO+3  from 0 to 50 C, Geochim. Cosmochim. Ac., 38, 301–318, 1974. ◦

Supplementary material related to this article is available online at http: at  http: // www.drink-water-eng-sci.net www.drink-water-eng-sci.net /  6 / 115 115 / 2013 2013 / dwes-6-115-2013-supplement.zip dwes-6-115-2013-supplement.zip .

Edited by: P. Le-Clech

References Buck, R. P., Ron Buck, Rondin dinini ini,, S., Covin Covingto gton, n, A. K., Bau Bauke, ke, F. G. K., Bre Bretts tts,, C. M. A., Camõus, M. F., Milton, M. J. T., Mussini, T., Naumann, R., Pratt, K. W., Spitzer, P., and Wilson, G. S.: Measurement of  pH. Definition, standards and procedures (IUPAC Recommendations 2002), Pure Appl. Chem., 74, 2169–2200, 2002. Daveler, S. A. and Wolery, T. J.: EQPT, A data file preprocessor for the EQ3 / 6 software package: User’s guide and related documentation (Version 7.0), Lawrence Livermore National Laboratory, Livermore, USA, UCRL-MA-110662 PT II, 1992. de Moel, P. J., van Dijk, J. C., and van der Meer, W. G. J.: Aquatic chemistry for engineers – Volume 1 – Starting with PHREEQC 3, Delft University of Technology, Delft, the Netherlands, 2013. de Visscher, A. and Vanderdeelen, J.: IUPAC-NIST Solubility Data Series. 95. Alkaline earth carbonates in aqueous systems. Part 2. Ca, J. Phys. Chem. Ref. Data, 41, 023105-1–023105-137, 2012. de Visscher, A., Vanderdeelen, J., Königsberger, E., Churagulov, B. R., Ichikuni, M., and Tsurumi, M.: IUPAC-NIST Solubility Data Series. 95. Alkaline earth carbonates in aqueous systems. Part 1. Introduction, Be and Mg, J. Phys. Chem. Ref. Data, 41, 0131051–013105-67, 2012. DIN 38404-10: German standard methods for the examination of  water, waste water and sludge – Physical and physico-chemical parameters (group C) – Part 10: Calculation of the calcit sat-

Langelier,, W. F.: The analyt Langelier analytical ical control control of anti-c anti-corros orrosion ion water treatment, J. Am. Water Works Assoc., 28, 1500–1521, 1936. NEN 6533: 6533: Wate aterr – Bep Bepali aling ng van de agress agressiv ivite iteit it ten opzich opzichte te van calciumcarbonaat en berekening van de verzadigingsindex (Water (Water – Determ Determinatio ination n of the agressiv agressivity ity to calcium carbonate and the cal calcul culati ation on of the sat satura uratio tion n ind index) ex),, Ned Nederl erlands ands Normalisatie-insituut, Delft, the Netherlands, 1990. Nordstrom, D. K., Plummer, L. N., Langmuir, D., Busenberg, E., May, H. M., Jones, B. F., and Parkhurst, D. L.: Revised chemical equilibrium data for major water-mineral reactions and their limitations, in: Chemical modeling in aqueous systems II (Symposium Series 416), edited by: Bassett, D. and Melchior, R. L., American Chemical Society, Washington D.C., USA, 1990. Parkhurst, D. L. and Appelo, C. A. J.: Description of input and examples for PHREEQC version 3 – A computer program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical calculations, US Geological Survey, Denver, USA, 2013. Pitzer, K. S.: Thermodynamics of electrolytes. I. Theoretical basis and general equations, J. Phys. Chem., 77, 268–277, 1973. Plummer, L. N. and Busenberg, E.: The solubilities of calcite, aragonite and vaterite in CO2 -H2 O solutions between 0 and 90 C, and an evaluation of the aqueous model for the system CaCO3 CO2 -H2 O, Geochim. Cosmochim. Ac., 46, 1011–1040, 1982. Standard Stand ard Metho Methods ds 2330: Calcium carbon carbonate ate satura saturation tion (2330), American Public Health Association / American American Water Works Association / Water Environment Federation, Baltimore, USA, 2010. Stumm, W. and Morgan, J. J.: Aquatic chemistry – Chemical equilibria and rates in natural waters (3rd Edn.), John Wiley & sons, New York, USA, 1996. Truesdell, A. H. and Jones, B. F.: WATEQ, A computer program for calculating calculating chemical equilibri equilibriaa of natural waters, J. Res. US Geol. Survey, 2, 233–248, 1974. ◦

uration of water (C 10), DIN Deutsches Institut für Normung, Berlin, Germany, 2012. Gamsjäger, H., Lorimer, J. W., Scharlin, P., and Shaw, D. G.: Glossary of terms related to solub solubility ility (IUP (IUPAC AC Recommend Recommendations ations 2008), J. Pure Appl. Chem., 80, 233–276, 2008. Grenth Gre nthe, e, I., Ply Plyasu asunov nov,, A. V., and Spa Spahiu hiu,, K.: Estima Estimatio tions ns of  medium eff ects ects on thermodynamic data, Modelling in aquatic chemistry, edited by: Grenthe, I. and Puigdomenech, I., OECD Nuclear Energy Agency, Paris, France, 1997.

USGS: USG S:

phreeq phreeqc-3 c-3.0. .0.6-7 6-7757 757.ms .msi, i,   http: // wwwbrr.cr.usgs.gov wwwbrr.cr.usgs.gov / 

projects / GWC_coupled GWC_coupled / phreeqc phreeqc / ,  last access: 23 October 2013. van der Helm, A. W. C. and Rietveld, L. C.: Modelling of drinking water treatment processes within the Stimela environment, Wa. Sci. Technol., 2, 87–93, 2002.

124, 2013 Drink. Water Eng. Sci., 6, 115– 124,

www.drink-water-eng-sci.net/6/115/2013/  

 

LABS AND TESTS

Drinking water in PHREEQC Lab 2.1

PHREEQC Interactive Interactive (PhreeqcI) for Pure water

Lab 2.2

PHREEQC input with SOLUTION

with Test

Lab 2.3

PHREEQC output for initial solution calculation calculatio n

with Test

Lab 2.4

Electron balancing (pe calculation)

with Test

Lab 2.5

Calcium carbonate saturation (CCPP calculation) calculation)

with Test

PHREEQC in Excel Lab 3.1

User controlled controlled output

with Test

Lab 3.2

Tabulated output from PHREEQC

with Test

Lab 3.3

PHREEQC in Excel (with external input file)

with Test

Lab 3.4

PHREEQXCEL applications applications

Redox equilibrium in PHREEQC Lab 4.1

Oxygen in air and water

with Test

Lab 4.2

Nitrogen Nitroge n in PHREEQC

with Test

Lab 4.3

Redox-inert Redox-i nert nitrogen in PHREEQC

Lab 4.4

PHREEQC for water treatment with stimela.dat stimela.da t

 Answer sheets for for Labs Sheets without answers Sheets with answers

73

 

with Test

74

 

Lab 2.1

Phreeqc Interactive (PhreeqcI) for Pure water

Run Phreeqc Interactive (phreeqci.exe) in Windows, from shortcut, menu-item or exe-file (default "C:\Program Files (x86)\USGS\Phreeqc (x86)\USGS\Phreeqc Interactive 3.0.6-7757\bin\phreeqci.exe"). 3.0.6-7757\bin\phreeqci.exe"). PhreeqcI opens, including a “Tip of the day” message. Click on Close in this message box. Click on Run to start a PHREEQC calculation: calculation:

PhreeqcI gives a warning message which is accepted by clicking the OK button:

The warning message disappears, and the Save As message pops up. Save the input file in an empty folder “Lab 2.1” (at Save in:) giving it the file name “Lab_2_1.pqi” (at File name:), and initiate this by clicking on Save:

75

 

The Run control window shows up. Click on Start to actually start the Phreeqc calculation/simulation:

The Run control window is extended showing the progress in the simulations. Click on Dismiss to remove this window:

The PhreeqcI window is shown, opening in the additional tab “Output”.

Select the different Tabs en view its content:

76

 

These tabs show the content of external PHREEQC files and internal program content: Tab File Remark Input Lab_2_1.pqi Excluding the first line DATABASE ... Output Lab_2_1.pqo Database phreeqc.dat Or actual database used in the simulat simulation ion Error phreeqc.log phreeqc. log Includes the simulation progress report PfW PHREEQC keywords for reference and Input help in program mode (double click the keyword, when Input tab is active)

Compare the content of these Tabs with the actual files in order to get familiar with this concept. The left upper part in is used for interactive programming using the different PHREEQC keywords. Click at the Initial condition ribbon on the icon for SOLUTION (a lab bottle, see Annex 1).

Click on OK, in order to accept all default values:

77

 

The keyword SOLUTION and its default values are included i ncluded in the Input file:

The default parameters, values and PHREEQC code lines for a solution are: Item PHREEQC code Remark Mass of water in solution -water 1 in kg Temperature Temperat ure of solution temp 25 in degrees Celcius pH of solution pH 7 no dimension pe of solution pe 4 no dimension Initial calculation pe redox pe value or redox couple for initial calculation calculation Initial unit of concentrations units mmol/kgw used if not specified specifie d others for a component Initial density of solution density 1 in kg per Litre solution The parameters density, units and redox are only used in the ‘Initial calculation’ calculation’ for the composition composition of the solution. The density is only used for calculatin calculating g initial concentrations given by volume (per L, m3 etc) into concentrationss by mass (per kgs). Internally PHREEQC uses elements, species and phases by its concentration

total amount of substance (as mol) and calculates concentrations in dividing this amount by the total mass of water (concentrations (concentrations as mol/kgw, as in molality). molality). Therefore the parameter setting of units is not used in the output of simulations/calculations. simulations/calculations. In trailing simulations simulations the values for pe/redox and density are taken from the result of the prior simulation/calculation. Click on Run to start the PHREEQC simulation/calculation. The Run control window shows up. Click on Start to actually start the Phreeqc calculation/simulation. PhreeqcI gives a warning warning message on overwriting the existing output file (Lab_2_1.pqo) which is accepted by clicking the Yes button:

:

78

 

Then PhreeqcI gives a warning message on overwrit overwriting ing the existing input file (Lab_2_1.pqi) which is accepted by clicking the Yes button:

Then the Run control window is extended showing the progress in the simulations. simulations. Click on Dismiss to remove this window. Thereafter the PhreeqcI window is shown, opening in the renewed tab ‘Output’. Select the different Tabs en view its content. The output file shows s hows under ‘Solution composition’ composition’ that PHREEQC has done a simulation for ‘Pure water’ (no dissolved elements):

Description of solutions shows: Temperature of 25 0C Specific Conductan Conductance ce 0 µS/cm, at the actual water temperature temperature (now 25 0C) Specific Conductance is also known as Electrical conductivity (EC) Density of 0.99704 g/cm3 (or kg/L) Volume of the solution of 1.00297 L  Volume is related related to density, amount amount of substances substances and mass of water water (1 kg) -7 Ionic strength of 1.007 * 10  mol/kgw Very low Alkalinity, Alkalinity, caused by H+ and OH-  Nearly perfect Electrical balance, with low values for Equivalent (eq) and Percent error (%). Distribution of species shows: Values for Molality, Molality, Activity and Molar volume (mole V) per species, and log-values for Molality, Activity and Activity coefficient (Gamma). Substantial value for H2O molality: [H2O] = 55.51 mol/kgw (1 kg of water) Very low concentrations concentrations for H+ and OH-, related to the dissociation of water: [H+] = 1.001 * 10 -7 mol/kgw, and [OH-] = 1.013 * 10-7 mol/kgw Nearly absence of dissolved O2 and H2, from the natural redox reaction of water

79

 

Saturation indices show: Values for Saturation Saturation Index (SI), Ion Activity Product (lg IAP) and Equilibrium Equilibrium constant (lg K) for each phase (by phase name), and the chemical formula of that phase -

Saturation Index for H2O(g) of -1.50 Vapour pressure of water (pa - H2O) from pa = 10SI = 10-1.50 = 0.0316 atm Negligible gas pressures for dissolved O2 and H2 (from its SI values).

The output file further shows that End of Run was reached after less than 1 second (for modern computers). In- and output files (and log file) have been updated by PHREEQC, as can be seen in specified folder.

80

 

Lab 2.2

Phreeqc input with SOLUTION

The composition of the example drinking water for this Lab is: Parameter / Element Temperature Hydrogen ion activity Calcium Magnesium Sodium Potassium Bicarbonate Chloride Nitrate Sulphate Oxygen

t pH Ca2+  Mg2+  Na+  K +  HCO3-  Cl-  NO3-  SO42-  O2 

Unit 0 C mg/l as Ca mg/l as Mg mg/l as Na mg/l as K mg/L as HCO3  mg/L as Cl mg/L as NO3  mg/L as SO4  mg/L as O2 

Value 10 7.3 56 5.6 7 2 149 9 10 39 11

Remark

 Assume: [HCO3-] = Alkalinity Alkalinity

Start Phreeqc Interactive (PhreeqcI) (look for its shortcut, menu-item or exe-file). Use the the Save icon ( ) to save the (empty) input file as Lab_2_2.pqi in Folder Lab 2.2. Click at the Initial condition condition ribbon on the icon for SOLUTION (a lab bottle, see Annex 1) to get into the SOLUTION input window. In the tab [General]: - modify Description (to Lab 2.2), pH (to 7.3), Temperature (to 10) and Redox (to O(-2)/O2 ). ). In the tab [Individual elements input]: - upper part: modify Default units to [mg/L] - middle part: part: mark all elements with with input input values (select (select Alkalinity Alkalinity for HCO3-) - lower part: modify the [Conc.] values modify the [As/GFW] values (used for converting mg to moles).

81

 

Notice the extended ‘Description of input’ in PhreeqcI at every single input item. Notice that PhreeqcI marks the elements N and S as related ‘Elements’ (in gray, in the middle part) after NO3- and SO4-2 has been selected. Notice that PHREEQC identifies the ion SO42- as SO4-2, since sub- and superscripts are not applicable in programming code, while the electrical charge (2-) is written as -2 to separate the number of O atoms (4) with the electrical charge of SO 4 (-2). Click the OK-button to return to the main window, which shows the results of previous actions in program code for a PHREEQC input file:

Read the program code, and relate this to your previous input actions. Notice the ‘elements’ N, S and O which are included as their respective oxidation states nitrogen(+5), sulphate(+6) sulphate(+6) and oxygen(0). In phreeqc.dat these elements el ements are defined with multi

oxidation states. s tates. The elements Ca, Mg, Na, K, and Cl are defined as single oxidation state elements. Alkalinity is defined as a special form of the element Carbon (C). Double click at SOLUTION 1 Lab 2.2 in the left pane. The SOLUTION input window is shown again.

82

 

Test  Answer the following following questions questions using the the SOLUTION input # Questions 1 What is de PHREEQC keyword for the  A input of the composition of the water? B (select 1 ) C D 2 All units in the input should be in the  A same group. What are the 3 groups of B concentration units in PHREEQC input? C (select 3 ) D 3 The input sets Units as mg/L.  A What are valid v alid element quantity units? B (select 1 or more ) C D 4 Units are set as mg/L.  A What are valid v alid input units for solutions? (select 1 or more ) 5

6

7

Oxygen in PHREEQC is mol O / kgw. The mean oxygen content is 11 mg/L. How should the oxygen content of 11 mg/L be coded in PHREEQC, with units set as mg/L? (select 1 ) How is HCO3 – given in this PHREEQC input? (select 1 or more ) What is the PHREEQC comment marker? (select 1 or more )

B C D  A B C D

window window and the PHREEQC PHREEQC code: Answers WATER SOLIDS COMPONENTS SOLUTION per litre (/L) per kg solution (/kgs) per m3 (/m3) per kg water (/kgw) g, mg, µg kg, g, mg, µg mol, mmol, µmol kmol, mol, mmol, µmol µg/L mg/kgw ppm (used as m/m m/m in mg/kgs) ppm (used as m/v in mg/L) O2 11 O2 11 mg/L O(0) 11 as O O(0) 11 as O2

 A B C D  A B

C(4) HCO3  Alkalinity C # Rem

C D

 ‘Comment

8

What is de PHREEQC keyword for the end  A of the simulation s imulation input, which starts the B C calculation/simulation? D (select 1 or more )

CALCULATE END (end of input file) END_SOLUTION

83

 

Lab 2.3

Phreeqc output for initial solution calculation

Open the input file Lab_2_2.pqi in the Folder Lab 2.2 (created in Lab 2.2). Change in the code into . Save the input file with filename Lab_2_3.pqi (using Save As .. in PhreeqcI) in the Folder Lab 2.3. Run the input file by clicking Run... in PhreeqcI. Scroll through the output in PhreeqcI (also saved in the file Lab_2_2.pqo), and click all lines in the unfolded tree in the Workspace (left column) column) to jump to the different sections in the output file.

84

 

Test  Answer the following following questions questions using data data in PhreeqcI: PhreeqcI: # Questions 1 In the Solution composition section sectio n all  A input concentrations are recalculated to B which quantities? C (select 1 ) D 2 What is the unit of Molality?  A (select 1 ) B C D 3 How many elements are given in the  A Solution composition section? B C (select 1 ) D 4 Which calculated (not input) parameters  A are includes in the Description of the B solution section? C 5

6

7

8

(select 1 or more ) This section also includes calculated values for Total Carbon and Total CO2. Which statement is true? (select 1 or more ) The Redox couples section gives combinations of oxidation states for elements as defined in SOLUTION_SPECIES SOLUTION_SPECIES in phreeqc.dat, for elements given in the input. Which redox couples are given? (select 1 or more ) In the Distribution of species section the calculation is based on which pe-value? (select 1 ) Whichoxidation input elements distributed ted into more states?are distribu

D  A B C D  A B C D

 A B C D  A B

Answers quantities conform input values and units molality + moles mg/L + g molarity + moles mol/kgw mol/L g/kgw g/L 16 14 10 9 Density (g/cm3) Specific Conductance (µS/cm) Ionic strength (mol/kgw) Electrical balance (eq) Different terms for the same s ame parameter Total CO2 is CO 2 content in solution Total CO2 includes CH4  Total CO2 is Total Inorganic Carbon N(0)/N(5) N(-3)/N(5) O(-2)/O(0) S(-2)/S(6)

4.000 0.8238 14.6627  Average value of Redox couples C Ca

(select 1 or more ) 9

Which element has the most species? (select 1 )

10

How many phases are presented in the Saturation indices section? (select 1 )

11

What kind of components components are in the Saturation indices section? (select 1 or more )

12

Which solids are supersaturated in the solution? (select 1 or more )

13

Which gas has the highest partial pressure? (pa = 10SI) (select 1 )

C D  A B C D  A B C D  A B C D  A B C D  A B C D

S O Ca S C Na 11 2 7 4 Dissolved gases Ion pairs Gases in gas phase Components with defined solid phases Calcite (CaCO3)  Aragonite (CaCO (CaCO3) none Halite (NaCl) CO2  H2  O2  H2O

85

 

Lab 2.4

Electron balancing (pe calculation)

Open the input file Lab_2_3.pqi in the Folder Lab 2.3 (created in Lab 2.3). Change in the code into . Save the input file with filename Lab_2_4.pqi (using Save As .. in PhreeqcI) in the Folder Lab 2.4. Terminate Simulation 1 (‘Initial solution calculation’) by clicking at the Initial condition ribbon on the icon for END ( , see Annex 1), which puts ‘END’ in the the code lines lines and creates ‘Simulation 2’ as shown in the left pane of IphreecI. Select [Simulation 2] by clicking on it (turns blue). Click at the In Initial itial condition condition ribbon on the the icon for USE ( , see Annex Annex 1) to get into the USE input input window. In the tab [General]: - type in [solution]: 1

Click the OK-button to return to the main window. Click at the Initial condition ribbon on the the icon for EQUILIBRIUM_PHASES EQUILIBRIUM_PHASES ( into the EQUILIBRIUM_PHASES input window. In the tab [General]:

, see Annex 1) to get

- type in [Description]: Electron balancing

86

 

Click the OK-button to return to the main window, which shows the results of previous actions in program code for a PHREEQC input file:

Select Lab_2_4.pqi in the left pane (turns blue) to enable the Run... option. Run the input file by clicking Run... .  After completion PhreeqcI opens opens in the output output window.

87

 

Test  Answer the following following questions questions using data data in PhreeqcI: PhreeqcI: # Questions 1 How many simulations are included in the  A input file? B (select 1 ) C D 2 Which keyword triggers the electron  A balancing in Simulation 2? B (select 1 ) C D 3 Which elements are included in the  A  ‘Solution composition composition’’ of the initial initial B C solution calculation of Simulation 1 which D are not included in Simulation 2? (select 1 or more )  A 4 Which values under Description of B solution are unchanged by Simulation 2?

5

6

7

8

Answers 1 2 3 4 USE END EQUILIBRIUM_PHASES SOLUTION  Alkalinity S(6) Ca O(0) Percent error pe

(select 1 or more )

C D Which equations for the concentrati concentration on of  A B Sulphur (S) are true? C (by definition, not by value) D (select 1 or more ) How many oxidation states are included in  A the ‘Solution composition’ of Simulation 2? B C (select 1 ) D  A Which oxidation states of element N are B included in Simulation 2? C (select 1 or more ) D Which species has the largest visual  A

Specific Conductance pH S(6) initial = S(6) Sim2 S(6) initial = S Sim2 S(6) initial = S(6) Sim2 + S(-2) Sim2 S(-2) initial = S(-2) Sim2 3 2 1 0 N(-3) N(0) N(+3) N(+5) NO2-

change in molar Simulation 2? concentration by

SO4 -   NO 3

2-

B C

9

(select 1 ) D + What is the effect on H  of the N  A conversion in Simulation Simulation 2, based on the B chemical reactions of NO3  in phreeqc.dat? C (select 1 or more ) D

N2  H+ not relevant H+ produced H+ consumed H+ unchanged

88

 

Lab 2.5

Calcium carbonate saturation (CCPP calculation)

Open the input file Lab_2_4.pqi in the Folder Lab 2.4 (created in Lab 2.4). Change in the code into . Save the input file with filename Lab_2_5.pqi (using Save As .. in PhreeqcI) in the Folder Lab 2.5. Select [Simulation 2] by clicking on it (turns blue). Terminate Simulation 2 (‘Electron balancing’) by clicking at the Initial condition ribbon on the icon for END ( , see Annex 1), which which puts ‘END’ in the code lin lines es and creates ‘Simulation 3’ as shown shown in the left pane of IphreecI. Select [Simulation 3] by clicking on it (turns blue). Click at the In Initial itial condition condition ribbon on the the icon for USE ( , see Annex 1) to get into into the USE input input window. In the tab [General]: - type in [solution]: 1

Click the OK-button to return to the main window. Click at the Initial condition ribbon on the the ic icon on for for EQUILIBRIUM_PH EQUILIBRIUM_PHASES ASES ( into the EQUILIBRIUM_PHASES input window. In the tab [General]: - type in [Description]: CCPP calculation

, see Annex 1) to get

mark in [Defined phases]: Calcite, Calcite, to get Calcite in tthe he input table - keep the default values for Calcite: Calcite: Sat. index = 0.0, Amount [moles] = 10.0 10.0

89

 

Click the OK-button to return to the main window, which shows the results of previous actions in program code for a PHREEQC input file:

Select Lab_2_5.pqi in the left pane (turns ( turns blue) to enable the Run... option. Run the input file by clicking Run... .  After completion PhreeqcI opens opens in the output output window. window. Double click in the left pane on [Reading input data for simulation 3] to jump to the output of Simulation 3 (Simulation (Simulation 1 and 2 have been discussed in Lab 2.3 respectively Lab 2.4).

90

 

Test  Answer the following following questions questions using data data in PhreeqcI: PhreeqcI: # Questions 1 How many simulations are included in the  A input file? B (select 1 ) C D 2 Which keyword triggers the calculation of  A Calcium Carbonate Precipitation Potential B (CCPP) in Simulation 3 ? C (select 1 ) D 3 Which solid phase has been selected as  A equilibrium phase in Simulation 3? B C (select 1 or more ) D 4 What is the change in the amount of  A calcite by the reaction in Simulation Simulation 3 B (under Phase assemblage)? C 5

6

7

8

Answers 1 2 3 4 USE END EQUILIBRIUM_PHASES SOLUTION Calcite  Aragonite Calcite and Aragonite Other -8.41 moles 1.000e+001 moles -0.164 mmoles

(select 1 or more ) D  A Which elements in the Solution composition are changed in Simulation 3? B C (compare values in Simulation Simulation 2) (select 1 or more ) D What is the increase in Calcium molality in  A Simulation 3? B (select 1 ) C D What is the Calcium Carbonate  A Precipitation Potential (CCPP) of the B example water? C (select 1 ) D Which values are changed in Simulat Simulation ion 3  A under Description of solution? B

+0.164 mmoles C Ca Mg Na -0.164 mmol/kgw -0.164 mmoles +0.164 mmol/kgw +0.164 mmoles -0.164 mmol/kgw -0.164 mmoles +0.164 mmol/kgw +0.164 mmoles pH pe

(select 1 or more )

Specific ElectricalConductance balance (eq)

C D

9

What is the change in CO2 molality in Simulation 3? (select 1 )

 A B C D

-0.164 mmol/kgw +0.164 mmol/kgw -0.158 mmol/kgw +0.158 mmol/kgw

91

 

Lab 3.1

Lined output from PHREEQC

Open the input file Lab_2_5.pqi in the Folder Lab 2.5 (created in Lab 2.5). Change in the code into . Save the input file with filename Lab_3_1.pqi (using Save As .. in PhreeqcI) in the Folder Lab 3.1. If the Printing and numerical method ribbon is not visible: turn it on under: View – Toolbars. T oolbars. Select [Simulation 1] in the left pane by clicking on it (turns blue). Click at the Pr Printing inting and nu numerical merical method ribbon on the the icon for PRINT PRINT ( , see Annex 1) to to get into the PRINT input window. In the tab [General] under Print options: options: - select [-alkalinity]: True

Click the OK-button to return to the main window, which shows the results of previous actions in program code for a PHREEQC input file:

92

 

Select Lab_3_1.pqi in the left pane (turns ( turns blue) to enable the Run... option. Run the input file by clicking Run... .  After completion PhreeqcI opens opens in the output output window. Check whether the section Distribution of alkalinity alkalinity is added to the output of all 3 simulations. simulations. Select [Simulation 1] in the Input pane by clicking on it (turns blue). Click at the Printin Printing g and numerical method ribbon on the the icon for USER_PRINT USER_PRINT ( , see Annex 1) to get into i nto the USER_PRINT input window. In the tab [General] under Basic statements: statements: - type in [10]: PRINT PRINT "Specific Conductance Conductance (mS/m) (mS/m) ", SC/10 - type in [20]: PRINT "Electrical balance error (%) ", percent_error - type in [30]: PRINT "Calcium (mmol/kgw) ", TOT("Ca")*1000 TOT("Ca")*1000 - type in [40]: PRINT "CO2 (mmol/kgw) ", MOL("CO2")*1000 MOL("CO2")*1000 - type in [50]: PRINT "SI Calcite ", SI("Calcite") SI("Calcite") - type in [60]: PRINT "CCPP-Calcite "CCPP-Calcite (mmol/kgw) ", equi_delta("Calci equi_delta("Calcite")*1000/TOT(“ te")*1000/TOT(“water”) water”)

Click the OK-button to return to the main window, which shows the results of previous actions in program code for a PHREEQC input file:

93

 

Select Lab_3_1.pqi in the left pane (turns blue) to enable the Run... option. Run the input file by clicking Run... .  After completion PhreeqcI opens opens in the output output window. Check whether the section User print is added to the output of all 3 simulations. Select [Simulation 1] in the Input pane by clicking on it (turns blue). Unfold Simulation 1. Double click on PRINT to get into the PRINT input window. In the tab [General] under Print options: options: - select [-alkalinity]: False - select [-eh]: False - select [-equilibrium_phases]: [-equilibrium_phases]: False - select [-saturation_indices]: [-saturation_indices]: False - select [-species]: False - select [-totals]: False Select Lab_3_1.pqi in the Input pane (turns blue) to enable the Run... option. Run the input file by clicking Run... .  After completion PhreeqcI opens opens in the output output window. window. Check whether the section User print is the only output of all 3 simulations. Select the Input tab in the lower left corner, to get the PHREEQC code. Select in the code for PRINT and USER_PRINT (up to –end) by clicking and dragging over the code lines (selected code turns blue). Drag the selected code to the end of the input code. in the the lines PRINT up to Select Lab_3_1.pqi in the Input pane (turns blue) to enable the Run... option. Run the input file by clicking Run... .  After completion PhreeqcI opens opens in the output output window. window. Check whether the section User print only appears in Simulation 3.

94

 

Test  Answer the following following questions questions using data data in PhreeqcI: PhreeqcI: # Questions  A 1 Which keyword controls the printing of B complete sections to the output file C (.pqo)? D (select 1 ) 2 Which setting controls the printing of the  A section Description of solution to the B output file (.pqo)? C (select 1 ) D  A 3 What marks the begin and end of BASIC statements in the USER_PRINT block? B (select 1 ) C D 4 Which expression gives the calculated SI?  A (select 1 ) B C 5

Which function should be multiplied multiplied by 1000 to get mmol/kgw? (select 1 or more )

D  A B C D

Answers USER_OUTPUT PRINT USER_PRINT SELECTED_OUTPUT -totals -eh -species -saturation_indices begin / end - begin / -end start / end -start / -end SI SI(CaCO3) SI(“Calcite”) CALC_VALUE(“SI”) SC MOL TOT SI

95

 

Lab 3.2

Tabulated output from PHREEQC

Open the input file Lab_2_5.pqi in the Folder Lab 2.5 (created in Lab 2.5). Change in the code into
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF