Home
USER'S GUIDE TO PHREEQC (VERSION 2)— A
Contents
1. 1010 END 1500 REM subroutine to store data 1510 if GET i gt M THEN RETURN 1520 PUT M i 1530 PUT TOTAL TIME i 1 1540 PUT LA K LA H i 2 1550 PUT LA H4Si04 i 3 1560 RETURN end USER PRINT 10 DATA A Gibbsite B Gibbsite gt Kaolinite C Gibbsite gt Kaolinite D Kaolinite gt K mica N E Kaolinite gt K mica MES K mica gt K feldspar 20 PRINT Transition Time K feldspar LA K H LA H4Si04 30 PRINT reacted 40 PRINT moles 50 FOR i 2 TO 7 60 READ s 70 IF EXISTS i THEN PRINT s GET i 1 GET 1 GET i GET i 2 GET i 3 80 NEXT i SELECTED_OUTPUT fil x6C sel reset false USER_PUNCH head pH log K log H4Si04 10 PUNCH LA K LA H LA H4Si04 GI zal E Z J 216 User s Guide to PHREEOcC Version 2 The input data set table 21 first defines pure water with SOLUTION input and the thermodynamic data for the phases with PHASES input Some of the minerals are defined in the database file phreegc dat but inclusion in the input data set replaces any previous definitions for the duration of the run the database file is not altered SELECTED_OUTPUT is used to produce a file of all the data that appear in table 22 and that were used to construct figure 6 SELECTED_OUTPUT specifies that the log of the activities of potassium ion hydrogen ion and sil
2. 0 7 Z O 1 Er O E 25 LL sa o Ar gt O o r df 5 o z O E 1F 4 O lt E w 2 2 Ca e sr 3 SN M 9 B 4 2 a 2l it Er me O A gt A ae O l Caco SICO c 10 2 s 3 N a L a Tx N O N S 4 I SOLID 1 0 0048 MOL FRACTION SrCO 7 S l SOLID 2 0 8579 MOL FRACTION SrCO l 5 D l 6 1e 5 1e 4 1e 3 0 01 0 1 1 0 10 0 SrCO ADDED IN MOLES Figure 10 A Mole fraction of strontianite and aragonite in solid solution B mole fraction of calcium and strontium in aqueous phase C moles of strontianite and aragonite in solid solution and D moles of miscibility gap end members in solid solution as a function of the amount of strontium carbonate added Dashed lines indicate compositions within the miscibility gap EXAMPLES 235 In the next simulation solution 1 is brought together with the solid solution USE keywords and 5 millimoles of strontium carbonate are added in 500 steps REACTION data block The PRINT keyword data block excludes all default printing to the output file and includes only the printing defined in the USER_PRINT data block The USER_PRINT data block specifies that the following information about the solid solution be printed to the output file after each reaction step the simulation number reaction step number amount of strontium carbonate added log ym mole fractions
3. Na J 0 8 E c E an lt Ses K 4 0 6 E Ca lt 04 L Za 02 ean nna dit 4 ao E J O L O 0 0 y i 1 x oc N ni E N rele ADVECTION ONLY a 1 D E i A E N o 10r i 4 E My J 3 ogh Ma 1 E S L OI J 065 K n Ca 0 4 E 0 2 Peena antaneet SENS AN 4 E f S j 0 1 1 0 1 2 3 PORE VOLUME Figure 11 Results of transport simulation of the replacement of sodium and potassium on a cation exchanger by infilling calcium chloride solution Lines display concentrations at the outlet of the column as calculated with PHREEQC with advection only ADVECTION keyword and with advection and dispersion TRANSPORT keyword The results for example 11 using ADVECTION and TRANSPORT keywords are shown by the curves in figure 11 The concentrations in cell 40 the end cell are plotted against pore volumes The main features of the calculations are the same between the two transport simulations Chloride is a conservative solute and arrives in the effluent at about one pore volume The sodium initially present in the column exchanges with the incoming calcium and is eluted as long as the exchanger contains sodium The midpoint of the breakthrough curve for sodium occurs at about 1 5 pore volumes Because potassium exchanges more strongly than sodium larger log K in the exchange EXAMPLES 241 reaction potassium is released after sodium Finally when all of the potassium
4. PHREEQC is a general geochemical program and is applicable to many hydrogeochemical environments However several limitations need to be considered Aqueous Model PHREEQC uses ion association and Debye Hiickel expressions to account for the non ideality of aqueous solutions This type of aqueous model is adequate at low ionic strength but may break down at higher ionic strengths in the range of seawater and above An attempt has been made to extend the range of applicability of the aqueous model through the use of an ionic strength term in the Debye Hiickel expressions These terms have been fit for the major ions using chloride mean salt activity coefficient data Truesdell and Jones 1974 Thus in sodium chloride dominated systems the model may be reliable at higher ionic strengths For high ionic strength waters the specific interaction approach to thermodynamic properties of aqueous solutions should be used for example Pitzer 1979 Harvie and Weare 1980 Harvie and others 1984 Plummer and others 1988 but this approach is not incorporated in PHREEQC The other limitation of the aqueous model is lack of internal consistency in the data in the databases Two of the databases distributed with the code phreeqc dat and wateg4f dat are consistent with the aqueous model of WATEQ4F Ball and Nordstrom 1991 and the compilation of Nordstrom and others 1990 the other database 4 User s Guide to PHREEQC Version 2 minteg dat is tak
5. a t 0 31 5 1 Ju or the extended or WATEO Debye Hickel eguation Az Ju logy byw 6 where z is the ionic charge of agueous species i and A and B are constants dependent only on temperature Egua tion 6 is the extended Debye Hiickel equation if b is zero or the WATEO Debye Hiickel equation see Truesdell and Jones 1974 if b is not equal to zero In the extended Debye Hiickel equation a is the ion size parameter whereas in the WATEO Debye Hiickel equation a and D are ion specific parameters fitted from mean salt activ ity coefficient data Unless otherwise specified in the database file or the input data set the Davies equation is used for charged species For uncharged species the first term of the activity coefficient equation is zero and the WATEQ Debye Hiickel equation reduces to the Setchenow equation Iny b u see Langmuir 1997 for discussion Unless otherwise specified b is assumed to be 0 1 for all uncharged species The partial derivatives of these activity coefficient equations with respect to ionic strength are EQUATIONS FOR SPECIATION AND FORWARD MODELING 11 apy maofa reee 03 7 for the Davies equation and E mto 4 8 op 2Mu Bae f for the extended or WATEQ Debye Hiickel equation For data input to PHREEQC the chemical equation for the mole balance and mass action expressions the log K and its temperature dependence and the activity coefficient parameter
6. attachment but are included with the program distribution Table 55 Attachment B phreegc dat Database file derived from PHREEQE SOLUTION MASTER SPECIES element species alk gfw_formula element_gfw H H S12 H 1 008 H 0 H2 0 0 H H 1 H Ly 0 0 E e 0 0 0 0 0 0 o H20 0 0 o 16 00 O 0 02 0 0 o 0 2 H20 0 0 0 0 Ca Cat2 0 0 Ca 40 08 Mg Mg 2 0 0 Mg 24 312 Na Na 0 0 Na 22 9898 K K 0 0 K 39 102 Fe Fe 2 0 0 Fe 55 847 Fe 2 Fe 2 0 0 Fe Fe 3 Fe 3 2 0 Fe Mn Mn 2 0 0 Mn 54 938 Mn 2 Mn 2 0 0 Mn Mn 3 Mn 3 0 0 Mn Al A1 3 0 0 Al 26 9815 Ba Ba 2 0 0 Ba 137 34 Sr Sr 2 0 0 Sr 87 62 Si H4Si04 0 0 sio2 28 0843 el cl 0 0 el 35 453 G CO3 2 2 0 HCO3 12 0111 C 4 C03 2 2 0 HCO3 C 4 CH4 0 0 CH4 Alkalinity C03 2 tu Ca0 5 C03 0 5 50 05 S s04 2 0 0 So4 32 064 S 6 s04 2 0 0 So4 S 2 HS 1 0 s N NO3 0 0 N 14 0067 N 5 NO3 0 0 N N 3 NO2 0 0 N N 0 N2 0 0 N N 3 NH4 0 0 N B H3B03 0 0 B 10 81 P P04 3 2 0 P 30 9738 F F 0 0 F 18 9984 Li Li 0 0 Li 6 939 Br Br 0 0 Br 79 904 Zn Zn 2 0 0 Zn 65 37 Cd Cd 2 0 0 cd 112 4 Pb Pb 2 0 0 Pb 207 19 Cu Cu 2 0 0 Cu 63 546 Cu 2 Cu 2 0 0 Cu Cu 1 Cu 1 0 0 Cu SOLUTION_SPECIES H H log_k 0 000 gamma 9 0000 0 0000 e e log_k 0 000 Attachment B Description of Database Files and Listing 293 H20 H20 log_k Ca 2 Ca 2 log_k gamma Mg 2 Mg 2 log_k gamma Na Na log k gamma K K log k gamma Fet2 Fet2 log_k gamma Mn
7. calcite P CO CO CO Thus for a calcite water system the rate for calcite can be approximated as NUMERICAL METHOD AND RATE EXPRESSIONS FOR CHEMICAL KINETICS 43 N IAP_ Y Pealcite FYf 1 106 K alata where rrcontains the first three terms given in equation 101 EQUATIONS AND NUMERICAL METHOD FOR TRANSPORT MODELING PHREEQC has the capability to model several one dimensional transport processes including 1 diffusion 2 advection 3 advection and dispersion and 4 advection and dispersion with diffusion into stagnant zones which is referred to as dual porosity All of these processes can be combined with equilibrium and kinetic chemical reactions The Advection Reaction Dispersion Equation Conservation of mass for a chemical that is transported fig 1 yields the advection reaction dispersion ARD equation 2 _ ap IC dg ac _ ac Ot dx La ot 107 where C is concentration in water mol kgw t is time s vis pore water flow velocity m s x is distance m D is the hydrodynamic dispersion coefficient m s D D 0 v with D the effective diffusion coefficient and a the dispersivity m and g is concentration in the solid phase expressed as mol kgw in the pores The 2 d term a represents advective transport D i represents dispersive transport and ea dx ot centration in the solid phase due to reactions q in the same units as C The usual assumption is that
8. e log_k 6 432 delta_h 31 130 kcal U 4 2 H20 UO2 2 4 H 2 e log_k 211 delta_h 34 430 kcal UO2 2 H20 UO20H H log_k 5 782 delta h 11 015 kcal 2U02 2 2H20 U02 2 0H 2 2 2H log k 5 626 delta_h 36 04 kcal 3U02 2 5H20 U02 3 0H 5 5H log_k 15 641 delta_h 44 27 kcal UO2 2 CO3 2 UO2CO3 log_k 10 064 delta_h 0 84 kcal UO2 2 2C03 2 UO2 C03 2 2 log_k 16 977 delta_h 3 48 kcal UO2 2 3C03 2 UO2 C03 3 4 log_k pa RES e delta_h 8 78 kcal PHASES Uraninite UO2 4 H U 4 2 H20 log_k 3 490 delta_h 18 630 kcal END Initial solution 1 SEAWATER FROM NORDSTROM ET AL 1979 Elements Molality Moles Alkalinity 2 406e 03 2 406e 03 Ca 1 066e 02 1 066e 02 cl 5 657e 01 5 657e 01 Fe 3 711e 08 3 711e 08 K 1 058e 02 1 058e 02 Mg 5 507e 02 5 507e 02 Mn 3 773e 09 3 773e 09 N 3 1 724e 06 1 724e 06 N 5 4 847e 06 4 847e 06 Na 4 854e 01 4 854e 01 0 0 3 746e 04 3 746e 04 Equilibrium with 02 g S 6 2 926e 02 2 926e 02 si 7 382e 05 7 382e 05 U 1 437e 08 1 437e 08 pH 8 220 pe 8 451 Activity of water 0 981 Ionic strength 6 748e 01 Mass of water kg 1 000e 00 Total carbon mol kg 2 180e 03 Total CO2 mol kg 2 180e 03 Temperature deg C 25 000 Electrical balance eq 7 936e 04 Percent error 100 Cat An Cat An 0 07 Iterations 7 Total H 1 110147e 02 Total O 5 563047e 01 Redox couple pe Eh volts N 3 N 5 4 6750 0 2766 0 2 0 0 12 3893 0 732
9. log_k delta_h Zn OH 2 e Zn OH 2 log_k Smithsonite ZnCO3 log_k delta_h Sphalerite ZnS H log k delta h Willemite Zn2Si04 log_k delta_h Cd OH 2 Cd OH 2 log_k Otavite Cdco3 log_k delta_h Cdsio3 CdSio3 log_k delta_h Cdso4 Cdsod log_k delta_h Cerrusite PbCO3 log_k delta_h Anglesite PbSO4 log_k delta_h Pb OH 2 Pb OH 2 log_k delta_h EXCHANGE_MASTER_ X EXCHANGE_SPECIES X X log_k Na X log k gamma Li X log k gamma delta h gamma delta h Ca 2 2 log k gamma delta h Mg 2 2 log_k gamma delta h Sr 2 2 log_k gamma delta h Ba 2 2 log_k gamma 304 User s Guide 9 210 31 280 kcal 2 H Zn 2 2 H20 11 50 Zn 2 CO3 2 10 000 4 36 kcal Zn 2 HS 11 618 8 250 kcal 289 4H 2Zn 2 H4Si04 15 33 33 37 kcal 2 H Cd 2 2 H20 13 650 315 Cd 2 CO3 2 D oI 0 019 kcal 328 H20 2H Cd 2 H4Si04 9 06 16 63 kcal 329 Cd 2 s04 2 0 1 14 74 kcal 365 Pb 2 CO3 2 13 13 4 86 kcal 384 Pb 2 s04 2 Heh 2515 kcal 389 2H Pb 2 2H20 8 15 13 99 kcal SPECIES X 0 0 NaX 0 0 4 0 0 075 KX 0 7 325 0 015 4 3 Jardine amp Sparks 1984 Lix 0 08 6 0 0 0 1 4 Merriam Thomas 1956 NH4X 0 6 2 5 0 0 2 4 Laudelout et al 1968 X CaX2 0 8 5 0 0 165 Tn 2 Van Bladel amp Gheyl 1980 X MgX2 0 6 5 5 0 2 7 4 Laudelout et al 1968
10. 0 5 10 pk_w 10 pk_OH ACT OH 0 3 71 rate rate 107 pk C02 10 SI CO2 g 0 6 72 rate rate 10 pk_org TOT Doc 0 4 80 moles parm 1 parm 2 rate 1 SR K feldspar time 81 rem decrease rate on precipitation 90 if SR K feldspar gt 1 then moles moles 0 1 100 save moles end EEEE AEE EEEH Albite HHEEHREE HEE Sverdrup H U 1990 The kinetics of base cation release due to chemical weathering Lund University Press Lund 246 p Example of KINETICS data block for Albite rate KINETICS 1 Albite m0 0 43 2 Albite 0 1 mm cubes parms 2 72e3 0 1 Albite start 1 rem specific rate from Sverdrup 1990 in kmol m2 s 2 rem parm 1 10 A V 1 dm recalc s sp rate to mol kgw 3 rem parm 2 corrects for field rate relative to lab rate 4 rem temp corr from p 162 E kJ mol R 2 303 H in H 1 T 1 298 10 dif_temp 1 TK 1 298 20 pk_H 12 5 3359 dif_temp 30 pk_w 14 8 2648 dif_temp 40 pk_OH 13 7 3359 dif_temp 41 rem 12 9 in Sverdrup but larger than for oligoclase 50 pk_C02 14 0 1677 dif temp 60 pk_org 12 5 1254 dif_temp rate increase for DOC 70 rate 10 pk_H ACT H 0 5 10 pk_w 10 pk_OH ACT O0OH 0 3 71 rate rate 10 pk_CO2 10 SI CO2 g 0 6 72 rate rate 10 pk_org TOT Doc 0 4 80 moles parm 1 parm 2 rate 1 SR Albite time 8
11. 10 MOLAL MOLALITY 10 MOLAL we Fe OZn 10 5 0 6 0 7 0 8 0 pH Figure 8 Distribution of zinc among the aqueous phase and strong and weak surface sites of hydrous iron oxide as a function of pH for total zinc concentrations of 107 and 10 molal is used in the model to obtain the surface area the individual numbers are not used separately Surface area may be entered with the data for any of the binding sites for a surface in this example the surface area is entered with Hfo s To complete the definition of the initial conditions for the simulations two sodium nitrate solutions are defined with differing concentrations of zinc SOLUTION 1 and 2 data blocks A pseudo phase Fix H is defined with the PHASES data block This phase is not real but is used in each of the batch reaction simulations to adjust pH to fixed values Finally the line USE surface none eliminates an implicitly defined batch reaction calculation for the first simulation By default if a SOLUTION and SURFACE data block are defined in a simulation then the first solution defined in the simulation SOLUTION 1 in this example and the first surface defined in the simulation are put together possibly with other assemblages and a gas phase and allowed to equilibrate The USE keyword with EXAMPLES 229 solution none removes the solution from the system for the batch reaction calculation with the e
12. CoNta 20cels y s HNta 20 cells O 2e 06 pH x e 6 2 gt 1e 06 6 0 5 8 0e 00 trees 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 Figure 15 Aqueous concentrations and pH values at the outlet of the column for Nta and cobalt transport simulations with 10 and 20 cells In figure 16 solid phase concentrations are plotted against time for concentrations in the last cell of the column The sorbed CoNta concentration peaks between 30 and 40 hours and slightly lags behind the peak in the dissolved concentration of the CoNta complex Initially no Nta is present in the column and the biomass decreases slightly over the first 10 hours because of the first order decay rate for the biomass As the Nta moves through the cell the biomass increases as the Nta substrate becomes available After the peak in Nta has moved through the column biomass concentrations level off and then begin to decrease because of decay The K for cobalt sorption relates to a greater retardation coefficient than the K for CoNta sorption and the sorbed concentration of Co appears to be still increasing at the end of the experiment Both the 10 cell and the 20 cell models give similar results which indicates that the numerical errors in the advective dispersive transport simulation are relatively small and the results are very similar to results given by Tebes Steven and Valocchi 1997 1998 However Tebes Steven and Valocchi 1997
13. EOUILIBRIUM PHASES number description phase name saturation index alternative formula or alternative phase amount EXCHANGE EXCHANGE number description exchange formula amount exchange formula name eguilibrium phase or kinetic reactant exchange per mole eguilibrate number EXCHANGE MASTER SPECIES EXCHANGE MASTER SPECIES exchange name exchange master species EXCHANGE SPECIES EXCHANGE SPECIES Association reaction log k log K delta h enthalpy units analytical expression A A gt Az Ay A5 gamma Debye Hiickel a Debye Hiickel b davies no check SUMMARY OF DATA INPUT 187 mole_balance formula GAS_PHASE Fixed pressure gas phase GAS_PHASE number description fixed_pressure pressure pressure volume volume temperature temp phase name partial pressure Fixed volume gas phase Define initial moles of components with partial pressures GAS_PHASE number description fixed_volume volume volume temperature temp phase name partial pressure Fixed volume gas phase Define initial moles of components by equilibrium with a solution GAS_PHASE number description fixed_volume equilibrium number volume volume phase name INCREMENTAL_REACTIONS INCREMENTAL_REACTIONS True or False INVERSE_MODELING INVERSE_MODELING number description solutions list of solution numbers uncertainty list of uncertainty limits phases phase name force disso
14. H20 78 Hfo wOH S04 2 Hfo wOHSO4 2 log k 0 79 Derived constants table 10 10 ae Hfo_wOH F H Hfo_wF H20 log_k 8 7 Hfo wOH F Hfo wOHF log_k 1 6 Carbonate Van Geen et al 1994 reoptimized for HFO 0 15 g HFO L has 0 344 mM sites 2 g of Van Geen s Goethite L Hfo wOH CO3 2 H Hfo_wCO3 H20 log_k 12 56 Hfo wOH CO3 2 2H Hfo_wHCO3 H20 log_k 20 62 9 19 96 Added analytical expression for H2S NH3 KSO4 Added species CaHSO4 Added delta H for Goethite SRR SER SESE HE SE e e e e H RATES Had K feldspar HHEEHRREE REE Sverdrup H U 1990 The kinetics of base cation release due to chemical weathering Lund University Press Lund 246 p 306 User s Guide to PHREEOcC Version 2 Example of KINETICS data block for K feldspar rate KINETICS 1 K feldspar m0 2 16 10 K fsp 0 1 mm cubes m 1 94 parms 1 36e4 0 1 K feldspar start 1 rem specific rate from Sverdrup 1990 in kmol m2 s 2 rem parm 1 10 A V 1 dm recalc s sp rate to mol kgw 3 rem parm 2 corrects for field rate relative to lab rate 4 rem temp corr from p 162 E kJ mol R 2 303 H in H 1 T 1 298 10 dif temp 1 TK 1 298 20 pk H 12 5 3134 dif temp 30 pk w 15 3 1838 dif temp 40 pk OH 14 2 3134 dif temp 50 pk_co2 14 6 1677 dif temp 60 pk org 13 9 1254 dif_temp rate increase with DOC 70 rate 10 pk_H ACT H
15. HF log k 3 18 delta h 3 18 kcal Attachment B Description of Database Files and Listing 295 analytic H 2 F HF2 log k delta h 4 550 Ca 2 H20 CaOH H log k Ca 2 C03 2 Caco3 log_k delta_h 3 545 analytic 2 033 0 012645 429 01 3 760 kcal 12 780 3 224 kcal 1228 732 0 299440 35512 75 Ca 2 CO3 2 H CaHCO3 log k delta h 0 871 analytic gamma 5 4000 Ca 2 S04 2 Caso4 log_k delta_h 1 650 Ca 2 HSO4 CaHSO4 log_k Ca 2 PO4 3 CaP04 log_k delta_h 3 100 Ca 2 HPO4 2 CaHPO4 log_k delta_h 3 3 kcal Ca 2 H2P04 CaH2PO4 log k delta h 3 4 kcal Ca 2 F CaF log k delta h 4 120 Mg 2 H20 MgOH H log_k 11 435 kcal 1317 0071 0 0000 0 34546894 39916 84 2 300 kcal 1 08 6 459 kcal 2139 1 408 0 940 kcal 11 440 delta_h 15 952 kcal Mg 2 CO3 2 MgCO3 log_k delta_h 2 713 analytic 2 98 kcal 0 9910 0 00667 Mg 2 H C03 2 MgHCO3 log k delta h 2 771 analytic Mg 2 SO4 2 MgS04 log k delta h 4 550 Mg 2 PO4 3 MgP04 log k delta h 3 100 Mg 2 HPO4 2 MgHPO4 log_k delta_h 3 3 kcal Mg 2 H2P04 MgH2PO4 log_k delta_h 3 4 kcal Mg 2 F MgF log k delta h 3 200 Na H20 NaOH H log_k Na CO3 2 Naco3 log k delta h 8 910 Na HCO3 NaHCO3 log k Na S04 2 NaSso4 log k delta h 1 120 Na HPO4 2 NaHPO4 log_
16. No retardation for heat PRINT reset false END SOLUTION O Fixed temp 24C and NaCl conc first type boundary cond at inlet units mol kgw temp 24 pH 7 0 pe 12 0 02 g 0 67 Na 24 e 3 Cl 24 e 3 SOLUTION 20 Same as soln 0 in cell 20 at closed column end second type boundary cond units mol kgw temp 24 pH 7 0 pe 12 0 02 g 0 67 Na 24 e 3 Cl 24 e 3 EXCHANGE 20 Nax 0 048 TRANSPORT Diffuse 24C NaCl solution from column end EXAMPLES 243 shifts 1 flow d diffusion bcon constant closed thermal diffusion 3 0 heat is retarded egual to Na diffc 0 3e 9 m 2 s timest 1 0e 10 317 years 19 substeps will be used SELECTED_OUTPUT fil x12 sel high precision true reset false dist true temp true USER_PUNCH head Na_mmol K_mmol Cl_mmol 10 PUNCH TOT Na 1000 TOT K 1000 TOT C1 1000 END The input data set for example 12 is shown in table 31 The EXCHANGE_SPECIES data block is used 1 to make the exchange constant for KX equal to NaX log_k 0 0 2 to effectively remove the possibility of hydrogen ion exchange and 3 to set activity coefficients for exchange species equal to their aqueous counterparts gamma identifier so that the exchange between Na and K is linear and the retardation is constant The infilling solution for transport SOLUTION 0 is defined with temperature 0 C and 24 mmol kgw KNO3 To stabilize the pe the concentration of oxygen is defined
17. Standard Basic statements and functions Character variables in Basic have as the final character of the variable name Basic Statements and Functions Explanation string string2 ab lt gt lt gt lt gt AND OR XOR NOT ABS a ARCTAN a ASC character CHRS number COS a DIM a n Add subtract multiply and divide String concatenation Ba de b Exponentiation a Relational and Boolean operators Absolute value Arctangent function Ascii value for character Convert Ascii value to character Cosine function Dimension an array 128 User s Guide to PHREEOc Version 2 Table 9 Standard Basic statements and functions Character variables in Basic have as the final character of the variable name Basic Statements and Functions DATA list EXP a FOR i n TO m STEP k NEXT i GOTO Iine GOSUB line IF expr THEN statement ELSE statement LEN string LOG a LOG10 a MIDS string n MIDS string n m a MOD b ON expr GOTO linel line2 ON expr GOSUB linel line2 READ REM RESTORE line RETURN SGN a SIN a SQR a SQRT a STR a TAN a VAL string WHILE expression WEND Explanation List of data a e For loop Go to line number Go to subroutine If then else statement on one line a V may be used to concatenate lines Number of characters in string Natural logarithm Base 10 logar
18. face site are included in the formula then the surface site must be uncharged If elements are included in the formula then these elements must be present in the pure phase or kinetic reac tant name Name of the pure phase or kinetic reactant that has this kind of surface site If name is the name of a phase the moles of the phase in the EQUILIBRIUM_PHASES data block with the same number as this surface number 3 in the example data block will be used to determine the num ber of moles of surface sites moles of phase times sites_per_mole equals moles of surface sites If name is the rate name for a kinetic reactant the moles of the reactant in the KINETICS data block with the same number as this surface number 3 in the example data block will be used to determine the number of surface sites moles of kinetic reactant times sites_per_mole equals moles of surface sites Note the stoichiometry of the phase or reactant must contain sufficient amounts of the elements in the surface complexes defined in Line 3 In the example data block there must be at least 0 101 mol of oxygen and hydrogen per mole of Fe OH 3 a equilibrium_phase or kinetic_reactant If equilibrium_phase is used the name on the line is a phase defined in an EQUILIBRIUM_PHASES data block If kinetic_reactant is used the name on the line is the rate name for a kinetic reactant defined in a KINETICS data block Default is equilibrium_phase Optionally e or k only the fir
19. ferrous iron TDIC total dissolved inorganic carbon 5 13C is carbon 13 composition of TDIC in permil relative to PDB Pee Dee Belemnite standard 3456 is sulfur 34 composition of sulfate in permil relative to CDT Ca on Diablo Troilite standard amp 345 2 is sulfur 34 composition of total sulfide in permil relative to CDT 14C is carbon 14 composition in percent modern carbon indicates the uncertainty limit assigned in inverse modeling Uncertainty limit for pH was 0 1 uncertainty limit for all other data was 5 percent of value except iron which was 100 percent not measured Analyte Solution 1 Solution 2 Temperature C 9 9 63 0 pH 7 55 6 61 Ca 1 20 11 28 Mg 1 01 4 54 Na 02 31 89 K 02 2 54 Fe 2 001 0004 TDIC 4 30 6 87 SO 16 19 86 HS 0 26 Cl 02 17 85 s Be 7 0 1 4 2 3 0 2 8 345 6 9 7 0 9 16 3 1 5 834s 2 22 1 7 0 14c 52 3 8 Charge balance 0 11 3 24 that is on the same flow path as the final water and for the final water because 1t was near the minimum uncertainty limit necessary to obtain charge balance Iron was assigned an uncertainty limit of 100 percent because of the small concentrations An uncertainty limit of 0 1 unit was assigned to pH which is a conservative estimate because of the potential for CO degassing at this sampling site L N Plummer U S Geological Survey written commun 1996 5 3C values increase from the initial water to the final water 7 0 permil to 2 3 permil as do
20. i j It is necessary that 0 lt mixf lt 1 to prevent numerical oscillations If any mixfis outside the range the grid of mobile and stagnant cells must be adapted Generally this requires a reduction of At which can be achieved by increasing the number of mobile cells An example calculation is given in example 13 where the stagnant zone consists of spheres 52 User s Guide to PHREEQC Version 2 Table 1 Shape factors for diffusive first order exchange between cells with mobile and immobile water Shape of Dimensions First order Comments stagnant region xX y Z or 2r z equivalent f 1 Sphere 2a 0 210 2a diameter Plane sheet 2a 0 00 0 533 2a thickness Rectangular prism 2a 2a co 0 312 rectangle 2a 2a 16a 0 298 2a 2a 8a 0 285 2a 2a 6a 0 277 2a 2a 4a 0 261 2a 2a 3a 0 246 2a 2a 2a 0 220 cube 2axX2ax2a 2a 2a 4a 3 0 187 2a 2a a 0 162 2a 2a 2a 3 0 126 2a 2a 2a 4 0 103 2a 2a 2a 6 0 0748 2a 2a 2a 8 0 0586 Solid cylinder 2a co 0 302 2a diameter 2a 16a 0 289 2a 8a 0 277 2a 6a 0 270 2a 4a 0 255 2a 3a 0 241 2a 2a 0 216 2a 4a 3 0 185 2a a 0 161 2a 2a 3 0 126 2a 2al4 0 103 2a 2a 6 0 0747 2a 2a 8 0 0585 Pipe wall 2r 2r 0 2r pore diameter surrounds the 2a 4a 0 657 2r outer diameter mobile pore 2a 10a 0 838 of pipe Enter wall thickness r r ain 2a 20a 0 976 Equation 125 2a 40a 1 11 2a 100a 1 28 2a 200a 1 40 2a 400a 1 51
21. log k log K delta h enthalpy units analytical expression A A gt Az Ay As no check mole balance formula TITLE TITLE comment comment TRANSPORT TRANSPORT cells cells shifts shifts 194 User s Guide to PHREEQC Version 2 USE time_step time step flow_direction forward back or diffusion_only boundary_conditions first last lengths list of lengths dispersivities list of dispersivities correct_disp True or False diffusion_coefficient diffusion coefficient stagnant stagnant cells exchange factor 0 8 thermal diffusion temperature retardation factor thermal diffusion coefficient initial time initial time print cells list of cell numbers print freguency print modulus punch cells list of cell numbers punch freguency punch modulus dump dump file dump freguency dump modulus dump restart shift number warnings True or False USE keyword number or none USER PRINT USER PRINT start numbered Basic statements end USER PUNCH USER PUNCH headings list of column headings start numbered Basic statements end SUMMARY OF DATA INPUT 195 EXAMPLES In this section of the report example calculations using PHREEQC are presented that demonstrate most of the capabilities of the program Several of the examples are derived from examples in the PHREEQE manual Parkhurst and others 1980 The input files for all examples are included in tables
22. m p ONIL Gye Gy kN NONA 2057 1087 FO 3 4 3 ES P Concentration in mobile water mol kgw Concentration of aqueous species i mol m Stoichiometric coefficient of species i in the kinetic reaction k Stoichiometric coefficient of master species m in the dissolution reaction for gas component g Stoichiometric coefficient of master species m in the association reaction for agueous species i Stoichiometric coefficient of master species m in the association reaction for exchange species i Stoichiometric coefficient of master species m in the association reaction for surface species i Stoichiometric coefficient of master species m in the dissolution reaction for phase p Stoichiometric coefficient of secondary master species m in redox reaction r Uncertainty term for the moles of an element or element valence state m in solution g calculated in inverse modeling mol Uncertainty term for the isotopic ratio of isotope i for a valence state m in the agueous solution g calculated in inverse modeling Uncertainty term for the isotopic ratio of isotope i for element e in the phase p calculated in inverse modeling Effective diffusion coefficient m s Hydrodynamic dispersion coefficient m s Number of exchangers Index number for exchangers dielectric constant for water 78 5 unitless dielectric permittivity of a vacuum 8 854x10 2 CV mt Faraday constant 96 485 Coulomb mol Alkalinity balance eguatio
23. nitrogen N3 and ammonia NH3 1 0 I A n 0 0 ES 1 0 2 0 3 0 4 0 5 0 6 0 1 0 0 0 1 0 2 0 3 0 4 0 BUBBLE 2 A FIXED PRESSURE 1 1 ATMOSPHERES 5 0 FORMS N 4 6 0 N Je te roi rot 0 001 0 01 0 1 1 0 ORGANIC DECOMPOSITION IN MOLES Figure 7 Composition of the gas phase during decomposition of organic matter with a composition of CH gt O NH3 9 97 in pure water under conditions of fixed volume and fixed pressure for the gas phase Partial pressure of ammonia gas is less than 10 atmospheres throughout not shown LOG PARTIAL PRESSURE IN ATMOSPHERES In the first simulation the initial water is defined to be a ground water in equilibrium with calcite at a partial pressure of carbon dioxide of 10 15 Pure water is defined with the SOLUTION data block by using defaults for all values pH 7 pe 4 temperature 25 C calcite and carbon dioxide are defined with EQUILIBRIUM_PHASES and SAVE is used to save the equilibrated solution table 26 SELECTED_OUTPUT is used to define a file ex7 sel to which specified data are written for each calculation All default printing to the file is suspended with the identifier reset false The additional identifiers cause specific data items to be written to the selected output file for each calculation in each simulation simulation the simulation number state the type of calculation initial solution reaction transport and others
24. reaction the amount of the reaction added for each calculation as defined in the REACTION data block si the saturation index of each mineral or log partial pressure of each gas that is specified and gas the moles in the gas phase of each gas component that is specified In the second simulation the organic decomposition reaction with a carbon to nitrogen ratio of approximately 15 1 is added irreversibly to the solution in increments ranging from to 1000 mmol REACTION 222 User s Guide to PHREEQC Version 2 keyword A gas phase which initially has no moles of gas components present is allowed to form if the sum of the partial pressures exceeds 1 1 atm only CO CH4 Ny and NH are allowed in the gas phase GAS_PHASE data block In the third simulation the same initial solution and reaction are used as in the second simulation The gas phase initially has no moles of gas components present but is defined to have a fixed volume of 22 5 L which is the volume of the fixed pressure gas phase after reaction of 1 0 mol of organic matter After 1 0 mol of reaction both the fixed pressure and fixed volume gas phases will have the same pressure volume and composition at all other reaction increments the pressure volume and composition will differ between the two gas phases Table 26 Input data set for example 7 TITLE Example 7 Organic decomposition with fixed pressure and fixed volume gas phases SOLUTIO
25. temperature 25 0 Line 4a CH4 g 0 0 92 User s Guide to PHREEQC Version 2 Line 4b CO2 g 0 000316 Line 4c 02 g 0 2 Line 4d N2 g 0 78 Explanation 2 Line 0 GAS_PHASE number description GAS PHASE is the keyword for the data block number positive number to designate the following gas phase and its composition A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the gas phase Line 1 fixed_volume fixed_volume Identifier defining the gas phase to be one that has a fixed volume not a gas bubble A fixed pressure gas phase is the default if neither the fixed_pressure nor the fixed_volume identifier is used Optionally fixed volume or fixed v olume Line 2 volume volume volume Identifier defining the volume of the fixed volume gas phase which applies for all batch reac tion or transport calculations Optionally volume or v olume volume The volume of the fixed volume gas phase in liters Default is 1 0 liter Line 3 temperature temp temperature Identifier defining the initial temperature of the gas phase Optionally temperature or t emperature temp The initial temperature of the gas phase in Celsius Default is 25 0 Line 4 phase name partial pressure phase name Name of a gas component A phase
26. 2 mmol arsenic on the surface which is consistent with the seguential extraction data The database wateg4f dat which includes the element arsenic and surface complexation constants from Dzombak and Morel 1990 was used for all thermodynamic data except for two surface reactions After initial runs it was determined that better results were obtained for arsenic concentrations in case the calcium and magnesium surface complexation reactions were removed The SURFACE SPECIES data block was used to decrease the eguilibrium constant for each of these two reactions by about 10 orders of magnitude This effectively eliminated surface complexation reactions for calcium and magnesium Alternatively these reactions could be removed from the default database This is justified if cations and anions do not compete for the same sites in general competitive sorption between cations and anions is not well known Recharge Water The water entering the saturated zone of the aguifer was assumed to be in eguilibrium with calcite and dolomite at a vadose zone P o of 10 gt The fourth simulation in the input set the simulation following the third END statement generates this water composition and stores it as solution O using SAVE table 37 Advective Transport Calculations The ADVECTION data block table 37 provides the necessary information to advect the recharge water into the cell representing the saturated zone A total of 200 shifts is specifie
27. 20055 caia ria 148 Related key Words cisma iaa 148 SOLUTION a A sh RR Nee Soke ae AS 149 Example data bl OK ise ces rr ie io iii 149 Explanations ssiseussee sess asin vantaa a am ae ay L Mime am EEEa 149 NOES anerer ieee a asin A MENTIIN PA Meee Sth est As een a t n eden es odd Ab aaa RIAs 152 Example problemis 22 25 54 O 153 Related key Words ii a a eR nc or RY 153 SOLUTION MASTER SPECIES conidios 154 Example data block aa 154 A A NN 154 A hp haneininn Sess eis Kutu rane aR aes mea beatae ee RIS 155 Example problems nanne chen canine Medien dix ir Mateus Ssh ds 155 Related Key Words cessce desc ssseo piel skrev 155 SOLUTION SPECIES ita pa 156 Example data block iia 156 A UN 156 Notes tao a 158 Example problems ieissar ro aeee aeaee E a EEE EEEE T Oeae EPEE eE E ETE EE Eesi 158 Related key words AEE tive Rhee Ni a ASHER AS AIS ERE SE 158 SOLUTION SPREAD tai ii eiii 159 Example data block A Se AO Nay 159 vil Notes omita int 161 Example problems iii BI eG te aitoi a oes 162 Related Key Words cit tiesa 162 SURFACE A OO 163 Example data block Luisiana dad lis ias 163 Explanation i MSE E ES E EE TTE 163 Notes Duma a E aa 165 Example data block Zurita ira 167 ExXplMA TOM AA 167 Notes AE E E E ii js 167 Example problems reie mussa aus esaea pae E Sa sub E EEEO SE EEEE AET EEE R EEEE EEEE E SS 168 Related key Words 00h iii es ans lia e cds 168 SURFACE MASTER SPECIES e aE sleep et ams sms E e ee O OAE diste Nh EA PEES
28. 53 54 55 56 Kinetic rate parameters used in example 15 oo ce onnen n ae e a a ea a aa a na naa ne aa n eaa UK aa aa Ta naan naeen 262 Sorption coefficients for Oo and COON tas s sia A ahaa Kaas 263 Input data set for example 15 cuina arena 264 Revised TRANSPORT data block for example 15 for grid refinement to a 20 cell model 0 eee eeeeeteeeeeeeees 267 Analytical data for spring waters in example 16 00 00 cece soon ea aa a naa a naa a aa na aa na aa aa naene enaa 270 Reactant compositions and mole transfers given by Garrels and Mackenzie 1967 oooococcnicnonccocconnncnnnannanonnnonnnono 270 Input data set for example 16 22 55 ccscc ssa ssscests ck csssesladsssupacsdedsstesdettesvastvaietavasdeapsesebesobesdegsssyocd vase EEAS dni 271 Selected output for example linia A anita 274 Input data set for example liar aba 276 Selected output for example l Tico aii titi as 277 Analytical data for solutions used in example 18 0 0 cece eee eeeeeceeeeeceseeeeecaeeeaecaeesaecsacsaecaecsaeseseeseeeseaeeneseseeeeeas 279 NS AAA AN 280 Mole balance results for the Madison aquifer example uoouosossss ceseeeeceeeeeeceeeeseeeeeeeeesaeeseecaeesaecaecaeeseeeseeseeneees 283 Attachment B phreegc dat Database file derived from PHREEQE sssssssssccsseseeseeseceseseeseesecaeeaeeseeaeceseecaeeaeneees 293 Input data set for example 12 demonstrating second order accuracy of the numerical method eee 309 ABBREVIATIONS OF UNITS The
29. 6 797e 00 Al 0 000e 00 0 000e 00 0 000e 00 Alkalinity 8 951e 04 1 796e 06 8 933e 04 C 4 0 000e 00 0 000e 00 0 000e 00 C 4 1 199e 03 0 000e 00 1 199e 03 Ca 2 600e 04 6 501e 06 2 665e 04 Cr 3 000e 05 0 000e 00 3 000e 05 H 0 0 000e 00 0 000e 00 0 000e 00 K 4 000e 05 1 000e 06 4 100e 05 Mg 7 101e 05 8 979e 07 7 011e 05 Na 2 590e 04 0 000e 00 2 590e 04 0 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 2 500e 05 0 000e 00 2 500e 05 Si 4 100e 04 0 000e 00 4 100e 04 Solution fractions Minimum Maximum Solution I 1 000e 00 1 000e 00 1 000e 00 Solution 2 1 000e 00 1 000e 00 1 000e 00 Phase mole transfers Minimum Maximum 274 User s Guide to PHREEQC Version 2 Halite 1 600e 05 1 490e 05 1 710e 05 NaCl Gypsum 1 500e 05 1 413e 05 1 588e 05 CaSso4 2H20 Kaolinite 3 392e 05 5 587e 05 1 224e 05 A12Si205 OH 4 Ca Montmorillon 8 090e 05 1 100e 04 5 154e 05 Ca0 165A12 33Si3 67010 OH 2 CO2 9 2 928e 04 2 363e 04 3 563e 04 co2 Calcite 1 240e 04 1 007e 04 1 309e 04 Caco3 Biotite 1 370e 05 1 317e 05 1 370e 05 KMg3A1Si3010 0H 2 Plagioclase 1 758e 04 1 582e 04 1 935e 04 Na0 62Ca0 38A11 38Si2 6208 Redox mole transfers Sum of residuals epsilons in documentation 5 574e 00 Sum of delta uncertainty limit 5 574e 00 Maximum fractional error in element concentration 5 000e 02 Model contains minimum number of phases Solution 1 Input Delta Input Delta
30. Cl 24 e 3 SOLUTION 1 19 24 0 mM KNO3 units mol kgw temp 0 Incoming solution OC pH LO Attachment C Input File To Investigate the Order of the Numerical Method For Example 12 309 pe 12 0 O2 g 0 67 K 24 e 3 N 5 24 e 3 EXCHANGE 1 19 KX 0 048 SOLUTION 20 Same as soln 0 in cell 20 at closed column end second type boundary cond units mol kgw temp 24 pH 7 0 pe 12 0 O2 g 0 67 Na 24 e 3 Cl 24 e 3 EXCHANGE 20 Nax 0 048 PRINT reset false END 20 cell model transport TRANSPORT Diffuse 24C NaCl solution from column end cells 20 shifts 1 flow_d diffusion bcon constant closed length 1 0 thermal diffusion 3 0 Heat is retarded egual to Na disp 0 0 No dispersion diffc 0 3e 9 m 2 s timest 1 0e 10 317 years 19 substeps will be used SELECTED_OUTPUT file exl2a sel high precision true reset false dist true temp true USER_PUNCH head Na mmol K mmol Cl_mmol Cl analytic Na analytic 10 PUNCH TOT Na 1000 TOT K 1000 TOT C1 1000 Calculate deviation from analytical solution for Cl and Na 20 DATA 0 254829592 0 284496736 1 421413741 1 453152027 1 061405429 30 x DIST 40 if x gt 8 5 OR SIM_TIME lt 0 THEN END 50 IF ABS x MOD 0 5 gt le 3 OR TC lt 0 THEN END 60 READ al a2 a3 a4 a5 70 REM calculate error in Cl 80 Arg x 2 SQRT 3e 10 SIM_TIME 1 0 90 e 1
31. Concentration data for species are sorted so that species are printed in descending order by concentration The blocks of output that are written are selected with the keywords PRINT SELECTED_OUTPUT 62 User s Guide to PHREEOcC Version 2 USER_PRINT and USER_PUNCH If no data are to be printed to the output file the species sort is not needed and is not performed If the aqueous solution exchange assemblage gas phase pure phase assemblage solid solution assemblage or surface assemblage is saved following a calculation the routines that perform these tasks are found in mainsubs c The subroutines in step c are used to accumulate the moles of each element before batch reaction and transport calculations Total concentrations of elements are calculated from the amounts in solution on exchangers in the gas phase and on surfaces A check is made to ensure that all of the elements in the pure phases and solid solutions are included in the list of elements with positive concentrations If an element is in a pure phase or solid solution but not in the aqueous solution a small amount of the pure phase is added to the aqueous solution If the moles of the pure phase or solid solution are zero and one of its constituent elements is not present that pure phase or solid solution is ignored in the calculations If kinetic calculations are defined for batch reaction or transport calculations the reactions are integrated by routines in kinetics c and t
32. INCREMENTAL_REACTIONS has a n 0 n 0 similar effect for steps in the REACTION data block Example data block Line 0 INCREMENTAL REACTIONS True Explanation Line 0 INCREMENTAL_REACTIONS True or False INCREMENTAL_REACTIONS is the keyword for the data block If value is true reaction steps for REACTION and time steps for KINETICS data blocks are incremental amounts of reaction and time that add to previous reactions steps If value is false reaction steps and time steps are total amounts of reaction and time independent of previous reaction steps Default if neither true nor false is entered is true Initial setting at beginning of run is false Notes Frequently kinetic reactions are faster at early times and slower at later times The integration of kinetic reactions for the early times is CPU intensive because the rates must be evaluated at many time subintervals to achieve an accurate integration of the rate equations when reactions are fast If the time steps in the KINETICS data block are 0 1 1 10 and 100 s and the time steps are not incremental default at initialization of a run then the kinetic reactions will be integrated from 0 to 0 1 0 to 1 0 to 10 and O to 100 s the early part of the reactions 0 to 0 1 s must be integrated for each specified time By using incremental time steps the kinetic reactions will be integrated from 0 to 0 1 0 1 to 1 1 1 1 to 11 1 and 11 1 to 111 1 the results from the previous ti
33. J 1975 The mathematics of diffusion 2nd ed Oxford Press 414 p Davis J A and Kent D B 1990 Surface complexation modeling in aqueous geochemistry in Hochella M F and White A F eds Mineral Water Interface Geochemistry Washington D C Mineralogical Society of America Reviews in Mineral ogy v 23 Chapt 5 p 177 260 Delany J M Puigdomenech I and Wolery T J 1986 Precipitation kinetics option for the EQ6 geochemical reaction path code Lawrence Livermore National Laboratory University of California Livermore 44 p De Marsily G 1986 Quantitative hydrogeology Orlando Academic Press 440 p Dzombak D A and Morel F M M 1990 Surface complexation modeling Hydrous ferric oxide New York John Wiley 393 p Fehlberg E 1969 Klassische Runge Kutta Formeln fiinfter und siebenter Ordnung mit Schrittweiten Kontrolle Computing v 4 p 93 106 Gaines G L and Thomas H C 1953 Adsorption studies on clay minerals II A formulation of the thermodynamics of exchange adsorption Journal of Chemical Physics v 21 p 714 718 Garrels R M and Christ C L 1965 Solutions minerals and equilibria New York Harper and Row 450 p Garrels R M and Mackenzie F T 1967 Origin of the chemical composition of springs and lakes in Equilibrium concepts in natural water systems American Chemical Society Advances in Chemistry Series no 67 p 222 242 Glynn P D 1990 Modeling solid solution reactions
34. Na 100 charge N 5 100 SOLUTION 2 units mmol kgw pH 8 0 Zn 0 1 Na 100 charge N 5 TOQ USE solution none Model definitions PHASES Fix_H H H log_k 0 0 END Zn le 7 EXAMPLES 225 LECTED OUTPUT file ex8 sel molalities E solution 1 E surface 1 UILIBRIUM PHASES 1 Fix H 5 0 T solution 1 surface 1 ILIBRIUM_PHASES 1 Fix_H TAS solution 1 surface 1 ILIBRIUM_PHASES 1 Fix_H 29105 solution 1 surface 1 ILIBRIUM PHASES 1 Fix H D 15 solution 1 surface 1 ILIBRIUM PHASES 1 Fix H 6 0 solution 1 surface 1 ILIBRIUM_PHASES 1 Fix H 6 25 G m 19 O solution 1 surface 1 ILIBRIUM PHASES 1 Fix H 6 45 G m o solution 1 surface 1 ILIBRIUM PHASES 1 Fix H 6 15 G H 19 O solution 1 surface 1 ILIBRIUM PHASES 1 Fix H 7 0 solution 1 surface 1 ILIBRIUM_PHASES 1 Fix_H 74 25 Zn 2 NaOH NaOH NaOH NaOH NaOH NaOH NaOH NaOH NaOH NaOH 226 User s Guide to PHREEQC Version 2 Hfo_wOZn Hfo_sOZnt 10 0 10 0 10 0 10 0 10 0 10 0 10 0 10 0 10 0 10 0 solution 1 surface 1 ILIBRIUM_PHASES 1 Fix_H TD NaOH TOSO C H E solution 1 surface 1 ILIBRIUM_PHASES 1 Fix_H 7 75 NaOH 1 00 solution 1 surface 1 ILIBRIUM PHASES 1 Fix H 8 0 NaOH 10 0 lt 33 13 O Zn le 4 solution 2 surface 1 ILIBRIUM PHASES 1
35. The moles of each entity in the system are represented by n for phases in the pure phase assemblage n Pis for components in a solid solution n for aqueous species n for the exchange species of exchange site e n for e sp surface species for surface site type s n for the gas components and n for aqueous species in the diffuse layer of surface s The moles of element m per mole of each entity are represented by b with an additional subscript to define the relevant entity b is usually but not always equal to c the coefficient of the master species for m in m the mass action equation To avoid solving for small differences between large numbers the quantity in parenthesis in equation 57 is not explicitly included in the solution algorithm and the value of T is never actually calculated Instead the quantity N SSN ss s ue T Tn Ya a y y its used in the function f Initially 7 is calculated from the total p SS Pes moles of m in the aqueous phase the exchange assemblage the surface assemblage the gas phase and the surface diffuse layers EQUATIONS FOR SPECIATION AND FORWARD MODELING 25 s K Ns N ag N Ln i 0 EE i n DD m iy isp ay m g n EL ba EES 58 i g s k isp During the iterative solution to the equations yn is updated by the mole transfers of the pure phases and com ponents of the solid solutions SSN m Ras Yh pany YY Papo 59 SS Pss wh
36. Thus the values of all master unknowns related to the aqueous phase are known and are used as initial estimates for the initial gas phase composition calculation For data input to PHREEQC definition of the initial gas phase composition calculation is made with the GAS_PHASE data block see Description of Data Input Batch Reaction and Transport Calculations Batch reaction and transport calculations require calculating equilibrium between the aqueous phase and any equilibrium phase assemblage surface assemblage exchanger assemblage solid solution assemblage and gas phase that is defined to be present in a chemical system Irreversible reactions that occur prior to equilibration include mixing specified stoichiometric reactions kinetic reactions and temperature change The complete set of Newton Raphson equations that can be included in batch reaction and transport calculations contains f f y Puomit st dd A tan Equations for mole balance on hydrogen f y activity of water f H 0 mole balance on oxygen fy charge balance f and ionic strength f u are always included and are associated with the master unknowns Ina Ina H 0 W dj mass of water Ina and u which are always included as master unknowns Mole balance equations f are included for total concentrations of elements not individual valence states or combinations of individual valence states A mole balance equation for alkalinity can not be included it is used only
37. X SrX2 0 91 5 26 0 121 5 45 Laudelout et al 1968 X BaX2 0 91 5 0 0 0 to PHREEQC Version 2 delta_h 4 5 Laudelout et al 1968 Mn 2 2X MnX2 log_k 0 52 gamma 6 0 0 0 Fe 2 2X FeX2 log_k 0 44 gamma 6 0 0 0 Cu 2 2X CuX2 log_k 0 6 gamma 6 0 0 0 Zn 2 2X ZnX2 log_k 0 8 gamma 5 0 0 0 Cd 2 2X CdX2 log_k 0 8 Pb 2 2X PbX2 log_k 1 05 Al 3 3X A1X3 log_k 0 41 gamma 9 0 0 0 AlOH 2 2X log_k 0 89 gamma 0 0 0 0 SURFACE_MASTER_SPECIES Hfo_s Hfo sOH Hfo w Hfo wOH SURFACE SPECIES All surface data from Dzombak and Morel 1990 A1OHX2 Acid base data from table 5 7 strong binding site Hfo s Hfo sOH Hfo sOH log k 0 0 Hfo sOH H Hfo sOH2 log k 7 29 pKal int Hfo_sOH Hfo_sO H log k 8 93 pKa2 int weak binding site Hfo w Hfo wOH Hfo wOH log k 0 0 Hfo wOH H Hfo wOH2 log k 7 29 pKal int Hfo_wOH Hfo_wO H log k 8 93 pKa2 int Ha RAE aE aE AE aE AE AE ARE AE A AE aE HEE a aR EE AIE EH EE a EH EN Ea CATIONS Aa aA aE a aE a ARE AE a A aE aE EH a a aE A a aA A a EH E te Cations from table 10 1 or 10 5 Calcium Hfo_sOH Ca 2 log_k 4 97 Hfo sOHCa 2 Hfo wOH Ca 2 Hfo wOCa H log k 5 85 Strontium Hfo SOH Sr 2 Hfo sOHSr 2 log k 5 01 Hfo wOH Sr 2 Hfo wOSr H log k 6 58 Hfo wOH Sr 2 H20 Hfo wOSrOH 2H log k 17 60 Barium Hfo sOH B
38. Xa 0 5 DESCRIPTION OF DATA INPUT 83 Line 2 CaY2 Ca Montmorillonite equilibrium_phase 0 165 Line 3 eguilibrate with solution 1 Explanation 2 Line 0 EXCHANGE number description Same as example data block 1 Line 1 exchange site amount exchange site Only the name of the exchange site needs to be entered amount Ouantity of exchange site in moles Line 2 exchange formula name eguilibrium phase or kinetic_reactant exchange per mole same as example data block 1 Line 3 eguilibrate number eguilibrate This string at the beginning of the line indicates that the exchange assemblage is defined to be in eguilibrium with a given solution composition Optionally eguil eguilibrate or e guilibrate number Solution number with which the exchange assemblage is to be in eguilibrium Any alphabetic characters following the identifier and preceding an integer with solution in line 1 are ignored Notes 2 The order of lines 1 2 and 3 is not important Line 3 should occur only once within the data block Lines 1 and 2 may be repeated to define the amounts of other exchangers if more than one exchanger is present in the assemblage Example data block 2 requires the program to make a calculation to determine the composition of the exchange assemblage The calculation will be performed before any batch reaction calculations to determine the concentrations of each exchange component such as CaX MgX or Na
39. Y Boy i dni VA is dn where c c SpP P Sp P is the moles of surface sites per mole of phase p If the phase dissolves then dn 6 is positive and the number of If the total number of sites is proportional to the moles of a pure phase then AT a A surface sites decreases If the total number of sites is proportional to the moles of a kinetic reactant AT 0 in the total derivative equation The change in the number of sites is included as part of the reaction that is integrated with the rate equations and no term is included in the Jacobian matrix As the kinetic reaction increases or decreases the moles of reactant the number of surface sites is adjusted proportionately If the number of surface sites is fixed AT a 0 For data input to PHREEQC the number of moles of each type of surface site is defined with the SURFACE data block and may be a fixed quantity or it may be related to the moles of a pure phase or a kinetic reactant Surface site types are defined with the SURFACE_MASTER_SPECIES data block and surface species are defined with the SURFACE_SPECIES data block see Description of Data Input Mole Balance for Exchange Sites Mole balance for an exchange site is a special case of the general mole balance equation The total number of moles of an exchange site is specified by input to be one of the following 1 fixed 2 proportional to the moles of a pure phase or 3 proportional to the moles of a kinetic reactant The su
40. a EXAMPLES 211 Gypsum 0 0 0 0 REACTION 1 02 10 Nacl 0 5 0 0 0 001 0 005 O02 0 09 SELECTED_OUTPUT fil x5 sel total Cl si Gypsum eguilibrium phases pyrite goethite calcite C02 g gypsum END Table 20 Selected results for example 5 Mole transfer is relative to the moles in the phase assemblage positive numbers indicate an increase in the amount of the phase present that is precipitation negative numbers indicate a decrease in the amount of the phase present that is dissolution Reactants added millimoles Mole transfer millimoles Saturation pH pe index of O NaCI Pyrite Goethite Calcite CO2 g Gypsum gypsum 0 0 0 0 8 28 4 94 0 000032 0 000011 0 49 0 49 0 0 6 13 1 0 0 5 8 17 4 29 27 27 93 14 0 2 02 5 0 2 5 7 98 3 97 1 33 1 33 2 94 2 40 0 1 06 10 0 5 0 7 88 3 82 2 67 2 67 5 56 5 11 0 0 65 50 0 25 0 7 72 3 57 13 33 13 33 26 84 26 49 9 00 0 Pure water is defined with SOLUTION input table 19 and the pure phase assemblage is defined with EOUILIBRIUM PHASES input By default 10 mol of pyrite goethite calcite and carbon dioxide are present in the pure phase assemblage gypsum is defined to have 0 0 mol in the pure phase assemblage Gypsum can only precipitate if it becomes supersaturated it can not dissolve because no moles are initially present The REACTION data block defines the irreversible reaction that is to be modeled In this example oxygen O2 w
41. description SOLUTION is the keyword for the data block number Positive number to designate the following solution composition A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the solution Line 1 temp temperature temp Indicates temperature is entered on this line Optionally temperature or t emperature temperature Temperature in degrees Celsius Default 25 C Line 2 pH pH charge or phase name saturation index pH Indicates pH is entered on this line Optionally ph pH pH value negative log of the activity of hydrogen ion charge Indicates pH is to be adjusted to achieve charge balance If charge is specified for pH it may not be specified for any other element phase name pH will be adjusted to achieve specified saturation index with the specified phase DESCRIPTION OF DATA INPUT 149 saturation index pH will be adjusted to achieve this saturation index for the specified phase Default is 0 0 If line 2 is not entered the default pH is 7 0 Specifying both charge and a phase name is not allowed Be sure that specifying a phase is reasonable it may not be possible to adjust the pH to achieve the specified saturation index Line 3 pe pe charge or phase name saturation index pe Indicates pe is entered on this line Optiona
42. equivalent to Fe 3 with a stoichiometric coefficient of 1 0 Note that the formula only contains the elements for which the mass changes in the system Thus the overall kinetic reaction of the example is F et 4H 025 O F e 0 5H 20 but the reaction of protons and oxygen to form water does not change the total mass of hydrogen or oxygen in the system Hydrogen and oxygen are therefore not included in the formula In the example oxygen is replenished by equilibrium with atmospheric O2 g and a mole transfer of oxygen does occur from the phase O2 g in EOUILIBRIUM PHASES into the solution In a system closed to oxygen the dissolved oxygen would be partly consumed The identifier steps in the KINETICS data block gives the time step s over which the kinetic reactions must be integrated When INCREMENTAL_REACTIONS true is used each time step increments the total time to be simulated and the results from the previous time step are used as the starting point for the current time step The SELECTED_OUTPUT data block specifies the file name of the selected output file and eliminates all default printing to that file reset false The only output to the selected output file in this example is defined with the USER_PUNCH data block The Basic program in USER_PUNCH specifies that the following be printed after each kinetic time step steps defines 11 kinetic time steps the cumulative time of the simulation in days the total ferrous and ferric
43. lt 0 1 then goto 200 10 if sr pl gt 1 0 then goto 100 20 rem initially 1 mol Fe 2 0 5 mol pyrolusite k A V 1 time 3 cells 22 rem time 3 cells 1 432e4 1 time 6 98e 5 30 Fet tot Fe 2 32 if Fe_t lt 1 e 8 then goto 200 40 moles 6 98e 5 Fet m m0 0 67 time 1 sr pl 50 if moles gt Fe_t 2 then moles Fe_t 2 70 if moles gt m then moles m 90 goto 200 100 Mn_t tot Mn 110 moles 2e 3 6 98e 5 1 sr pl time 120 if moles lt Mn_t then moles Mn_t 200 save moles end END 308 User s Guide to PHREEQC Version 2 Attachment C Input File To Investigate the Order of the Numerical Method For Example 12 The following input data file performs calculations for example 12 which models the diffusion of heat and solute from a constant boundary condition at one end and a closed boundary condition at the other The input file is simplified from that given in example 12 by eliminating one of the transport calculations and setting up the initial conditions directly with SOLUTION data blocks For the constant boundary condition an analytical solution exists for the temperature and concentration as a function of time and distance To test the accuracy of the numerical method the TRANSPORT calculation is performed with two discretizations a 20 cell model and a 60 cell model For a second order method decreasing the cell size by a factor of three should decrease the discrepancy with the anal
44. subset of phases and solutions could be found The minimal identifier minimizes the number of calculations that will be performed and produces the models that contain the most essential geochemical reactions However models that are not minimal may also be of interest so the use of this option is left to the discretion of the user In the interest of expediency it is suggested that models are first identified using the minimal identifier checked for plausibility and geochem ical consistency and then rerun without the minimal identifier Optionally minimal mini mum m inimal or m inimum Line 11 tolerance tol tolerance Identifier that indicates a tolerance for the optimizing solver is to be given Optionally tol erance or t olerance tol Tolerance used by the optimizing solver The value of tol should be greater than the greatest cal culated mole transfer or solution fraction multiplied by 1e 15 The default value is adeguate unless very large mole transfers greater than 1000 moles or solution fractions greater than 1000 fold evaporative concentration occur In these cases a larger value of tol may be needed Essentially a value less than fol is treated as zero Thus the value of to should not be too large or significantly different concentrations will be treated as equal Uncertainty limits less than tol are assumed to be zero Default is approximately 1e 10 for default compilation but may be smaller if the program is
45. the database file are listed under the heading Reading data base Next the input data excluding comments and empty lines is echoed under the heading Reading input data for simulation 1 The simulation is defined by all input data up to and including the END keyword Any comment entered within the simulation with the TITLE keyword is printed next The title is followed by the heading Beginning of initial solution calculations below which are the results of the speciation calculation for seawater The concentration data converted to molality are given under the subheading Solution composition For initial solution calculations the number of moles in solution is numerically equal to molality because kg of water is assumed The water identifier can be used to define a different mass of water for a 202 User s Guide to PHREEQC Version 2 solution During batch reaction calculations the mass of water may change and the moles in the aqueous phase will not exactly equal the molality of a constituent Note that the molality of dissolved oxygen that produces a log partial pressure of 0 7 has been calculated and is annotated in the output After the subheading Description of solution some of the properties listed in the first block of output are equal to their input values and some are calculated In this example pH pe and temperature are equal to the input values The ionic strength total carbon alkalinity was the
46. 00 log H4Si04 1 25235E 01 8 42120E 00 7 37985E 00N 6 37631E 00V 5 38178E 00W GE Gt set EV KT KG Gt EE uct EV KT ES 4 13600E 00 t 4 60047E 001t 5 26137E 00 t 3 71874E 00 t 5 48836E 00 t 3 55363E 001t Example 7 Gas Phase Calculations This example demonstrates the capabilities of PHREEOC to model the evolution of gas compositions in eguilibrium with an agueous phase under the conditions of either fixed pressure or fixed volume of the gas phase For a fixed pressure gas phase when the sum of the partial pressures of the component gases exceeds the specified pressure of the gas phase a gas bubble forms Once the bubble forms the volume and composition of the gas bubble vary with extent of reactions For a fixed volume gas phase the agueous solution is in contact with a head space of fixed volume The gas phase always exists in this head space and the pressure and composition of the gas phase vary with extent of reactions Gas liquid reactions can be modeled in three ways with PHREEQC 1 a gas can react to maintain a fixed partial pressure using EOUILIBRIUM PHASES data block 2 a fixed pressure multicomponent gas phase can be modeled using the GAS PHASE data block with the fixed pressure identifier default or 3 a fixed volume multicomponent gas phase can be modeled using the GAS PHASE data block with the fixed volume identifier Conceptually an infinite gas reservoir is assumed for the f
47. 03 1 034e 04 5 063e 03 Mg 2 806e 02 7 016e 04 2 736e 02 Na 2 544e 01 0 000e 00 2 544e 01 0 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 1 527e 02 7 768e 05 1 535e 02 Solution 2 Composition during halite precipitation Input Delta Input Delta pH 5 000e 00 2 148e 13 5 000e 00 Alkalinity 9 195e 06 0 000e 00 9 195e 06 Br 3 785e 02 9 440e 04 3 880e 02 C 4 0 000e 00 0 000e 00 0 000e 00 C 4 7 019e 06 0 000e 00 7 019e 06 Ca 0 000e 00 0 000e 00 0 000e 00 cl 6 004e 00 1 501e 01 6 154e 00 EXAMPLES 277 H 0 0 000e 00 0 000e 00 0 000e 00 K 4 578e 01 1 144e 02 4 463e 01 Mg 2 353e 00 5 883e 02 2 412e 00 Na 2 720e 00 4 500e 02 2 675e 00 0 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 8 986e 01 2 247e 02 8 761e 01 Solution fractions Minimum Maximum Solution T 8 815e 01 8 780e 01 8 815e 01 Solution 2 1 000e 00 1 000e 00 1 000e 00 Phase mole transfers Minimum Maximum H20 g 4 837e 03 4 817e 03 4 817e 03 H20 Calcite 3 802e 02 3 897e 02 3 692e 02 Caco3 CO2 g 3 500e 02 3 615e 02 3 371e 02 C02 Gypsum 4 769e 01 4 907e 01 4 612e 01 Casod 2H20 Halite 1 975e 01 2 033e 01 1 901e 01 NaCl Redox mole transfers Sum of residuals epsilons in documentation 1 947e 02 Sum of delta uncertainty limit 7 804e 00 Maximum fractional error in element concentration 2 500e 02 Model contains minimu
48. 04 1 403e 04 1 15 e 04 A12Si205 OH 4 coz tg 3 061e 04 2 490e 04 3 703e 04 co2 Calcite 1 106e 04 8 680e 05 1 182e 04 Caco3 Chalcedony 1 084e 04 1 473e 04 6 906e 05 sio2 Biotite 1 370e 05 1 317e 05 1 370e 05 KMg3A1Si3010 OH 2 Plagioclase 1 758e 04 1 582e 04 1 935e 04 Na0 62Ca0 38A11 38Si2 6208 Redox mole transfers Sum of residuals epsilons in documentation 5 574e 00 Sum of delta uncertainty limit 5 574e 00 Maximum fractional error in element concentration 5 000e 02 Model contains minimum number of phases Summary of inverse modeling Number of models found 2 Number of minimal models found 2 Number of infeasible sets of phases saved 20 Number of calls to cll 62 Example 17 Inverse Modeling with Evaporation Evaporation is handled in the same manner as other heterogeneous reactions for inverse modeling To model evaporation or dilution it is necessary to include a phase with the composition H O The important concept in modeling evaporation is the water mole balance equation that is included in every inverse problem formulation see EXAMPLES 275 Equations and Numerical Method for Inverse Modeling The moles of water in the initial solutions times their mixing fractions plus water gained or lost by dissolution or precipitation of phases plus water gained or lost through redox reactions must equal the moles of water in the final solution The equation is approximate because it does not include the moles
49. 1 0 3275911 Arg 100 erfc_Cl e al e a2 e a3 e a4 e a5 EXP Arg Arg 110 REM calculate error in Na 120 Arg x 2 SQRT 3e 10 SIM_TIME 3 0 130 e 1 1 0 3275911 Arg 310 User s Guide to PHREEQC Version 2 140 erfc_Na e al e a2 e a3 e a4 e a5 EXP Arg Arg 150 REM punch results 160 error Cl 0 024 erfc_Cl TOT C1 170 error Na 0 024 erfc Na TOT Na 180 PUNCH error_Cl error_Na 190 REM store results 200 j x 0 5 210 PUT error_Cl SIM_NO j 1 220 PUT error Na SIM NO j 2 500 END 60 cell model initial conditions O e e e ELECTED_OUTPUT user punch false SOLUTION 0 Fixed temp 24C and NaCl conc first type boundary cond at inlet units mol kgw temp 24 pH 7 0 pe 12 0 02 g 0 67 Na 24 e 3 Cl 24 e 3 SOLUTION 1 59 24 0 mM KNO3 units mol kgw temp 0 Incoming solution OC pH 7 0 pe 12 0 O02 g 0 67 K 24 e 3 N 5 24 e 3 EXCHANGE 1 59 KX 0 048 SOLUTION 60 Same as soln 0 in cell 60 at closed column end second type boundary cond units mol kgw temp 24 pH 7 0 pe 12 0 02 g 0 67 Na 24 e 3 Cl 24 e 3 EXCHANGE 60 Nax 0 048 ND 60 cell model transport Se Se Se TRANSPORT Diffuse 24C NaCl solution from column end cells 60 shifts 1 flow d diffusion bcon constant closed thermal diffusion 3 0 disp 0 0 diffc 0 3e 9 length 3333333333333333 Heat is reta
50. 129 REA GT TON a ada tang hasan de Uso oa 130 Example data BIOCK Tienda 130 Explamation NR 130 Example data block Biar ir bd 131 EXpl nation 2o O 131 Not miii A A eR a oe 131 Example problems ist dt eo edita vasen 132 Related Key Words cui A Ri 132 User s Guide to PHREEQC Version 2 REACTION TEMPERATURE cocinas tri 133 Example data DIOCK Vita aia 133 Explanation lucia A eae Ns ES 133 Example data block Zu tacto ip E a tesis 133 Explanation 2 eserse a cities dcir EES 133 A teie rrasa eE E E mei es Ta Aste Eee EEE EE RER Gi OEE DEEE ge 134 Example problems 2 scsssississseicdsvassscevtseystvapsctpecsuoasacesssys cdutacvsaves ieesvsscveavesdhssvoetbapuesysetoaises oE RESSE SETE 134 Related key Words ci a ty ee 134 SAVE aii 135 Example data block AE 135 Explain ias A EES 135 Notes arica sHseuastishs st ies Husain stb aster og ear thie paride eee ibou area aetna 135 Example problems osc isd ss 050 id dl aid it 136 Related Key Words iio toilet 136 SELECTED OUTPUT A a Sa TOO ed M 137 Example data block iii iia 137 A A ROT 138 NOTES uri is ias 142 Example problems sssssaissea cs ss droits eones hear A aE E EEEa eiee meer NSS 143 Related key Words ici iii 143 SOLID SOLUTIONS vocacion dle E iras deis 144 ANA AA AN 144 Explain ts A ta dit 144 NoteS sceiocintocnenicdinsipccncainn kanaa ean SA shades aal sensa ma tedsst sedutidvcasves ieassasckaavesvhssvonseapeesuonsediaet sobahedvsessseieeas 147 Example problems
51. 1973 Soil conditions and plant growth Longman London 849 p Schecher W D and McAvoy D C 1991 MINEQL A chemical equilibrium program for personal computers User s manual version 2 1 Edgewater Maryland Environmental research Software Singer P C and Stumm W 1970 Acid mine drainage the rate limiting step Science v 167 p 1121 1123 Sverdrup H U 1990 The kinetics of base cation release due to chemical weathering Lund University Press Lund 246 p Tebes Steven Caroline and Valocchi A J 1997 Reactive transport simulation with equilibrium speciation and kinetic bio degradation and adsorption desorption reactions A Workshop on Subsurface Reactive Transport Modeling Pacific Northwest National Laboratory Richland Washington October 29 November 1 1997 http ter rassa pnl gov 2080 kash workshop bmark htm Tebes Stevens C Valocchi A J VanBriesen J M Rittmann B E 1998 Multicomponent transport with coupled geochemical and microbiological reactions model description and example simulations Journal of Hydrology v 209 p 8 26 Toride N Leij F J and Van Genuchten M T 1993 A comprehensive set of analytical solutions for non equilibrium solute transport with first order decay and zero order production Water Resources Research v 29 p 2167 2182 286 User s Guide to PHREEQC Version 2 Toride N Leij F J and Van Genuchten M T 1995 The CXTFIT code for estimating transport parameters fr
52. 204e 08 1 001e 08 CaHSO4 3 166e 09 2 633e 09 H 0 4 383e 39 H2 2 192e 39 2 213e 39 0 0 1 685e 15 02 8 424e 16 8 505e 16 S 2 0 000e 00 HS 0 000e 00 0 000e 00 H2S 0 000e 00 0 000e 00 s 2 0 000e 00 0 000e 00 S 6 1 564e 02 504 2 1 045e 02 5 075e 03 Casod 5 191e 03 5 242e 03 HS04 5 088e 08 4 231e 08 CaHSO4 3 166e 09 2 633e 09 SS SERS Sass Sa eS ea Saturation indices Phase SI log IAP log KT Anhydrite 0 22 4 58 4 36 Gypsum 0 00 4 58 4 58 H2 9 35 51 35 51 0 00 H20 9 1 51 0 00 1 51 H2S g 116 86 158 45 41 59 02 g 12 11 71 01 83 12 Sulfur 87 23 122 94 35 71 Example 3 Mixing This example demonstrates the capabilities of PHREEQC to perform a series of geochemical simulations with the final simulations relying on results from previous simulations within the same run The example investigates diagenetic reactions that may occur in zones where seawater mixes with carbonate ground water The example is divided into five simulations labeled A through E in table 15 A Carbonate ground water is defined by equilibrating pure water with calcite at a P o o of 102 atm B Seawater is defined using the major ion data given in table 10 C The two solutions are mixed together in the proportions 70 percent ground water and 30 206 User s Guide to PHREEQC Version 2 Log Log Log Molality Activity Gamma 6 849 6 933 0 084 7 002 7 067 0 065 0 000 0 000 0 000 1 981 2 286 0 305 2 285 2 281 0 004 7 919 7 9
53. 4 years for two chemicals one with R 1 Cl and the other with R 2 5 Na Two boundary conditions can be considered for this problem One entails a flux or third type boundary condition at x 0 D OC x t C 0 t Cpe v dx This boundary condition is appropriate for laboratory columns with inlet tubing much smaller than the column 111 cross section The solution for the ARD eguation is then Lindstrom and others 1967 1 C x t C 5 Co C A 112 where with D av 2 A erfc AVR exp x v1 R al Z a ME oxp E Jerte X vt R 113 4a vt R TO 4a vt R 2 ar OA Az 40 vt R Figure 2 shows the comparison for three simulations with different grid spacings Ax 15 5 and 1 67 m which correspond with At A 1 1 3 and 1 9 years respectively For Cl which has R 1 the fronts of the three simulations are indistinguishable and in excellent agreement with the analytical solution For the retarded ion Nat which has R 2 5 the average location of the breakthrough curve for all grid spacings is correct and is in agreement with the analytical solution However the simulations with coarser grids show a more spread out breakthrough that is due to numerical dispersion The finest grid gives the closest agreement with the analytical solution but requires the most computer time Computer time is primarily dependent on the number of calls to the geochemical subroutines of PHREEQC and in the absence of kin
54. 4d are included to allow ion exchange reactions in the inverse model exchange species with the names CaX and NaX are among the exchange species defined in the default database and are thus available for use in inverse modeling In the example data block and in the examples problems 16 17 and 18 the composition of the phases is assumed to be relatively simple In real systems the composition of reactive phases for example pyroxenes amphiboles or alumino silicate glasses may be complex Application of inverse modeling in these systems will require knowledge of specific mineral compositions or appropriate simplification of the mineral stoichiometries By default mole balance equations for every element that occurs in the phases listed in phases input are included in the inverse modeling formulation If an element is redox active then mole balance equations for all valence states of that element are included The balances identifier is necessary to define 1 uncertainty limits for pH elements or element valence states that are different from the default uncertainty limits or 2 mole balance equations for elements not included in the phases Mole balance equations for alkalinity and electrons are always included in the inverse model In some solutions such as pure water or pure sodium chloride solutions the alkalinity may be small less than 1e 7 in both initial and final solutions In this case it may be necessary to use large relative
55. 58 p 5443 5454 Example of KINETICS data block for pyrite rate KINETICS 1 Pyrite tol le 8 m0 5 e 4 m 5 e 4 parms 2 0 0 67 25 0 711 Pyrite start 1 rem Williamson and Rimstidt 1994 2 rem parm 1 logl10 A V 1 dm parm 2 exp for m m0 3 rem parm 3 exp for 02 parm 4 exp for H 10 if m lt 0 then goto 200 20 if si Pyrite gt 0 then goto 200 20 rate 10 19 parm 1 parm 3 l1m 02 parm 4 lm H parm 2 10g10 m m0 30 moles 10 rate time 40 if moles gt m then moles m 200 save moles end EEEE Organic_C HHEHHREEHE Example of KINETICS data block for Organic_C rate KINETICS 1 Organic_C tol le 8 m in mol kgw m0 5e 3 m 5e 3 Organic_C sstart 1 rem Additive Monod kinetics 2 rem Electron acceptors 02 NO3 and S04 10 if m lt 0 then goto 200 20 m02 mol 02 30 mNO3 tot N 5 40 mSO4 tot S 6 50 rate 1 57e 9 m02 2 94e 4 m02 1 67e 11 mNO3 1 55e 4 mNO3 60 rate rate 1 e 13 mS04 1 e 4 mS04 70 moles rate m m m0 time 80 if moles gt m then moles m 200 save moles end HHEEHREH HEE Pyrolusite HHEEHRREE REE Postma D and Appelo C A J 2000 GCA 64 in press Example of KINETICS data block for Pyrolusite KINETICS 1 12 Pyrolusite tol l e 7 m0 0 1 m 051 Pyrolusite start 5 if m lt 0 0 then goto 200 7 sr pl sr Pyrolusite 9 if abs 1 sr pl
56. 6 345 values 9 7 permil to 16 3 permil Uncertainty limits for isotopic values of the initial solution were set to one half the range in isotopic composition in the four recharge waters from flow paths 3 and 4 Plummer and others 1990 table 52 Similarly uncertainty limits for isotopic values of the final water were set to one half the range in isotopic composition in the samples from the distal end of flowpath 3 Plummer and others 1990 table 52 Reactants considered by Plummer and others 1990 were dolomite calcite anhydrite organic matter CH O goethite pyrite Ca Na cation exchange halite sylvite and CO gas In their sensitivity calculations Mg Na cation exchange and methane were considered as potential reactants The aquifer was considered to be a EXAMPLES 279 closed system with respect to CO that is no CO is expected to be gained from or lost to a gas phase and methane gain or loss was considered to be unlikely Plummer and others 1990 Therefore CO gas and methane were not included as reactants in the PHREEOC mole balance modeling CO gas was included in the NETPATH modeling but mole transfers were reduced to zero by adjusting the 5 348 of anhydrite The uncertainty limits for the isotopic compositions of dissolving phases were taken from data presented in Plummer and others 1990 with slight modifications as follows 5 5C of dolomite 1 to 5 permil 6 13C of organic carbon 30 to 20 permil 348 of an
57. 67 m cell x Gl 1 67 m cell Na analytical solution SE CI analytical solution MILLIMOLES PER LITER e 0 0 20 0 40 0 60 0 80 0 100 0 120 0 140 0 DISTANCE IN METERS Figure 2 Analytical solution for 1D transport with ion exchange reactions and flux boundary condition compared with PHREEGC calculations at various grid spacings to numerical dispersion In many cases of geochemical interest the chemical reactions help to counteract numerical dispersion because the reactions tend to sharpen fronts for example with precipitation dissolution reactions and displacement chromatography In other cases exchange with a less favored ion may give a real chemical dispersion that exceeds the effects of numerical dispersion Another boundary condition is the Dirichlet or first type boundary condition which involves a constant concentration C 0 t at x O COM Co 114 This boundary condition is valid for water infiltrating from a large reservoir in full contact with the underlying soil for example infiltration from a pond or diffusion of seawater into underlying sediment The solution for the ARD equation is in this case Lapidus and Amundson 1952 C x t C 5 C C B 115 where vt R x x vt R B erfc A exp Jerte 116 Az 401 vt R EQUATIONS AND NUMERICAL METHOD FOR TRANSPORT MODELING 47 Figure 3 shows the results of three simulations with the same discretization
58. END Notes USER PUNCH allows the user to write a Basic program to make calculations and print selected results to the selected output file as the program is running Results of PUNCH Basic statements are written directly to the selected output file after each calculation The Basic program is useful for writing results in the correct form so that they can be plotted directly All of the functions defined in tables 8 and 9 are available in USER PRINT Basic programs More information on the Basic interpreter is available in the description of the RATES keyword DESCRIPTION OF DATA INPUT 185 USER_PUNCH has no effect unless a SELECTED_OUTPUT data block has been defined Writing results of USER_PUNCH can be enabled or suspended with the user_punch identifier in the SELECTED_OUTPUT data block If the selected_output identifier in the PRINT data block is false then all selected output including USER_PUNCH is disabled Example problems The keyword USER_PUNCH is used in example problems 6C 9 10 11 12 13 14 and 15 Related keywords PRINT RATES SELECTED_OUTPUT and USER_PRINT 186 User s Guide to PHREEQC Version 2 SUMMARY OF DATA INPUT ADVECTION ADVECTION cells cells shifts shifts time_step time step initial_time initial_time print_cells list of cell numbers print_frequency print_modulus punch cells list of cell numbers punch_frequency punch_modulus warnings True or False END EOUILIBRIUM PHASES
59. ERE ERESSE 169 Example data DO E ST ea 169 Explica Wee E mei K k E E E EOE 169 AN 169 Example Problems cats ro iii 169 Related Key words cuicos eestaas alka E R ase akin espeb ens 169 SURFACE SPECIES E gti te neal ad ei Seiad a ee testers as Rao A as ses 170 Example data BI KO e OERE ARENE SE td pon tt irte ai 170 Explanatio e e ae ea Sr e Eae AN N AAE T eer I ee eoa EEE a A N 170 Notesy maini msn Ks sok aE E EER Atos ass ches E S EAE KE E betis EE ia 170 Example problems enei aa a Ein REA DAEA ee nad 171 Related keywords a a ship s cece EA ia 171 TTE ori aia ia 172 Example data block ss nt a a e een 172 BX planation td ride ti kenet sev 172 A O 172 Example problems ic is A dd Kohan ii a 172 TRANSPORT 5i0siass ossis N assa pet akusta sust apecesdeshassedasesssacuoabesesacssnes seuss onnsasanacna di guesbes sscebassba sveadaseaa Sages sous 173 Example data Dlotkiiiici a eh eae A ei ateal 173 EEX PL aM ATOM RS NS 173 Note sit hs A ig Rae ai AS ees 177 Example problems 0 20 ss cicescossnecies kasa voa tence sadas aikaa sa coped vaes ost Eee eee CESKE coves saves SEINS eases ga utee died esas 180 Related Key words cuicos conil an EE E EEE EE EE nastasta 180 A ONO 181 Example data Dlock sesos td pitt teatro Asua 181 Explanation saisimme vapana a a A E E A E ERN 181 Notes besonnen E E E E E E E E E S E E 181 Example problems cesos pass pistan en dad svhesconsessanesaivescyscusacssebasnbediaspachasdoadesbapasadeesoasssadinsesetesaedv
60. FeS ppt FeS H Fe 2 HS log_k 3 QS Mackinawite FeS H Fe 2 HS log_k 4 648 Sulfur S 2H 2e H2S log_k 4 882 delta_h 9 5 kcal Vivianite Fe3 P04 2 8H20 3 Fe 2 2 PO4 3 8 H20 log_k 36 000 Pyrolusite Mn02 4 H 2 e Mn 2 2 H20 log_k 41 380 delta_h 65 110 kcal Hausmannite Mn304 8 H 2 e 3 Mn 2 4 H20 log_k 61 030 delta_h 100 640 kcal Manganite MnOOH 3 H e Mn 2 2 H20 log_k 25 340 Pyrochroite Mn 0H 2 2 H Mn 2 2 H20 log_k 15 200 Halite NaCl Na Cl log_k 1 582 delta_h 0 918 kcal CO2 g C02 C02 log_k 1 468 delta_h 4 776 kcal analytic 108 3865 0 01985076 6919 53 40 45154 669365 0 02 9 02 02 log_k 2 960 delta_h 1 844 kcal H2 9 H2 H2 log_k 3 150 delta_h 1 759 kcal H20 g H20 H20 log_k 1 31 delta_h 44 03 kJ Stumm and Morgan from NBS and Robie Hemmingway and Fischer 1978 N2 9 N2 N2 log_k 3 260 delta_h 1 358 kcal H2S 9 H2S H2S log_k 0 997 delta_h 4 570 kcal CH4 9 CH4 CH4 log_k 2 860 delta_h 3 373 kcal NH3 9 NH3 NH3 log_k 1 770 delta_h 8 170 kcal Melanterite FeS04 7H20 7 H20 Fe 2 SO4 2 log_k 2 209 delta_h 4 910 kcal analytic 1 447 0 004153 0 0 0 0 214949 0 Alunite KA13 SO4 2 OH 6 6 H K 3 Al 3 2 s04 2 6H20 log_k 1 400 delta_h 50 250 kcal Jarosite K KFe3 S04 2 0H 6 6 H 3 Fe 3 6 H20 K 2 s04 2 Attachment B Description of Database Files and Listing 303
61. G W and Dunkle S A 1988 A computer program incorporating Pitzer s equa tions for calculation of geochemical reactions in brines U S Geological Survey Water Resources Investigations Report 88 4153 310 p Plummer L N Parkhurst D L and Thorstenson D C 1983 Development of reaction models for groundwater systems Geochimica et Cosmochimica Acta v 47 p 665 685 Plummer L N Prestemon E C and Parkhurst D L 1991 An interactive code NETPATH for modeling net geochemical reactions along a flow path U S Geological Survey Water Resources Investigations Report 91 4087 227 p Plummer L N Prestemon E C and Parkhurst D L 1994 An interactive code NETPATH for modeling net geochemical reactions along a flow path version 2 0 U S Geological Survey Water Resources Investigations Report 94 4169 130 p Plummer L N Wigley T M L and Parkhurst D L 1978 The kinetics of calcite dissolution in CO water systems at 5 to 60 C and 0 0 to 1 0 atm CO2 American Journal of Science v 278 p 179 216 Press W H Teukolsky S A Vetterling W T and Flannery B P 1992 Numerical Recipes in C The Art of Scientific Com puting second edition Cambridge University Press 994 p Robie R A Hemingway B S and Fisher J R 1978 Thermodynamic properties of minerals and related substances at 298 15 K and 1 bar 10 pascals pressure and at higher temperatures U S Geological Survey Bulletin 1452 456 p Russell E W
62. MICA 6 0 5 0 K FELDSPAR Jol GIBBSITE Log a a 2 0 F KAOLINITE 1 0 8 0 7 0 6 0 5 0 4 0 3 0 2 0 1 0 0 0 Log Ay sio Figure 6 Phase diagram for the dissolution of K feldspar microcline in pure water at 25 C showing stable phase boundary intersections example 6A and reaction paths across stability fields example 6B Diagram was constructed using thermodynamic data for gibbsite kaolinite K mica muscovite and microcline from Robie and others 1978 but are not calculated by the modeling in these simulations At point B gibbsite starts to be transformed into kaolinite a reaction which consumes Si The reaction path must follow the gibbsite kaolinite phase boundary to some intermediate point C until all gibbsite is converted and then the path crosses the kaolinite field to point D Similarly there is a point E on the kaolinite K mica phase boundary where the reaction path starts crossing the K mica field to point F Simulations 6A5 and 6A6 table 21 solve for these two points In simulation 6A5 point C is calculated by allowing K feldspar to dissolve to a point where kaolinite is at saturation and is present in the phase assemblage while gibbsite is at saturation but not present in the phase assemblage Likewise simulation 6A6 solves for the point where K mica is at saturation and present in the phase assemblage while kaolinite is at saturation but is not present in
63. NG 99 9 11 T W 2 9410 mo 1 55x10 m 2 NO Rss C E E 3 where the factor 6 derives from recalculating the concentration of sc from mol kg soil to mol kg pore water A further aspect of organic matter decomposition is that a part appears to be refractory and particularly 42 User s Guide to PHREEOc Version 2 resistant to degradation Some models have been proposed to account for the tendency of part of the sedimentary s organic carbon to survive tentatively a factor may be assumed which makes the overall rate second order s 0 This factor implies that a decrease to 1 10 of the original concentration results in a decrease of 1 100 in the rate of further breakdown It must be noted that this simple factor is used to approximate a very complicated process and a more thorough treatment of the process is needed but is also possible given the flexibility of defining rates in PHRE EQC Still other rate expressions are based on detailed measurements in solutions with varying concentrations of the aqueous species that influence the rate For example Williamson and Rimstidt 1994 give a rate expression for oxidation of pyrite 10 19 0 5 0 11 e 10 Mo M gt 100 which shows a square root dependence on the molality of oxygen and a small increase of the rate with increase in pH This rate is applicable for the dissolution reaction only and only when the solution contains oxygen It is prob ably inadequate
64. The information includes number of iterations in revising the initial estimates of the master unknowns the number of Newton Raphson iterations and the iteration at which any infeasible solution was encountered while solving the system of nonlinear equations An infeasible solu tion occurs if no solution to the equality and inequality constraints can be found At each iter ation the identity of any species that exceeds 30 mol an unreasonably large number is written to the log file and noted as an overflow Any basis switches are noted in the log file The infor mation about infeasible solutions and overflows can be useful for altering other parameters defined through the KNOBS data block as described below Notes Convergence problems are less frequent with PHREEQC than with PHREEQE however they may still occur The main causes of nonconvergence appear to be 1 calculation of very large molalities in intermediate iterations 2 accumulation of roundoff errors in simulations involving very small concentrations of elements in solution and 3 loss of precision in problems with no redox buffering The first cause can be identified by overflow messages at iteration 1 or greater that appear in the file phreegc log see logfile above This problem can usually be eliminated by decreasing the maximum allowable step sizes from the default values The second and third causes of nonconvergence can be identified by messages in phreeqc log th
65. USER PRINT or USER_PUNCH Basic programs to store a value The value may be retrieved by any of these Basic programs The value persists until overwritten using a PUT statement with the same set of subscripts or until the end of the run For a KINETICS data block the Basic programs for the rate expressions are evaluated in the order in which they are defined in the input file Amount of reaction moles as defined in steps in REACTION data block for a batch reaction calculation otherwise zero Last statement of Basic program that returns the moles of kinetic reactant counted positive when the solution concentration of the reactant increases Saturation index of a phase Log 107 Simulation number equals one more than the number of END statements before current simulation DESCRIPTION OF DATA INPUT 127 Table 8 Special Basic statements and functions for PHREEQC Special PHREEQC Statement or Function SIM_TIME SR Calcite STEP NO S S MgCO3 TC TK TIME TOT Fe 2 TOTAL_TIME Explanation Time s from the beginning of a kinetic batch reaction or transport calculation i IAP Saturation ratio of a phase a Step number in batch reaction calculations or shift number in ADVECTION and TRANSPORT calculations Current moles of a solid solution component Temperature in Celsius Temperature in Kelvin Time interval for which moles of reaction are calculated in rate programs automatically set in the time
66. USER_PRINT start 10 sum S S Strontianite S S Aragonite 20 if sum 0 THEN GOTO 110 30 xb S S Strontianite sum 40 xc S S Aragonite sum 50 PRINT Simulation number SIM NO 60 PRINT Reaction step number STEP NO 70 PRINT SrC03 added RXN 80 PRINT Log Sigma pi LOG10 ACT CO3 2 ACT Ca 2 ACT Sr 2 90 PRINT XAragonite Tia KS 100 PRINT XStrontianite xb 110 PRINT XCa n TOT Ga TOT Ca TOTO Sry 120 PRINT XSr o TOT ESLI BOT T Ca TOT TSE 130 PRINT Misc 1 MISC1 Ca x Sr 1 x CO3 140 PRINT Misc 2 MISC2 Ca x Sr 1 x CO3 end SELECTED OUTPUT fil x10 sel reset false reaction true USER PUNCH head lg SigmaPi X Arag X Stront X Ca ag X Sr ag mol Misc1l mol Misc2 mol Arag mol Stront star 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 250 260 270 t S i um S S Strontianite S S f sum O THEN GOTO 60 Aragonite xb S S Strontianite s S Strontianite S S Aragonite xc S S Aragonite S S Strontianite S S Aragonite R P P P P EM Sigma Pi UNCH LOG10 ACT CO3 2 ACT UNCH xc UNCH xb UNCH TOT Ca TOT Ca TOT PUNCH TOT Sr TOT Ca TO x1 MISC1 Ca x Sr 1 x C03 x2 MISC2 Ca x Sr 1 x CO3 if xb lt xl OR xb gt x2 THEN GO nc S_S Aragonit
67. Zacapa 203 Selected output for example Zeen e ona aa nan a naa a naa a naa aa Unnan a nn eaa naa aan an aa a aa aa Le LLA an ISR 205 Input data set for example 3 saita its 207 Selected results for example 3 s sisssss oss ai e orara E cb po e EE R aE aaae eS 208 Inputdata set for example 4 iii a AES SI SO NG Rive enti el Kaan di 209 Selected results fOr example dario tect nico it lianas sooth dopey co ii 211 Input dataset for example S ecu EN 211 Selected results for example ui o ra pics 212 Input data set for example Ges ciss ccschsbeschsasesciscksaeesbatsessecusess woussebssssstscsasscusessabasenscepgcesvonsaovssuyastaadisasssessdecdbsseassanassos 213 Selected results forrexample Acuna a lis 217 Description of Basic program for K feldspar dissolution kinetics and identification of phase transitions 220 Phase transitions identified by the RATES Basic program and printed to the output file by the USER PRINT Basic program in example 6C which simulates the kinetic dissolution of K feldspar 220 Results written to the selected output file by the USER PUNCH Basic program in example 6C which simulates the kinetic dissolution of K feldspar eceeccescecssseenceceneecseceecceesecesceceseecsaeeeneeceeeecseceeaeceeeeesaeeeaees 221 Input data set for example7 si ssse stan aseman ssi hekin aoas DESEE oa Ea SEEE pra E REPES EEEE escsstedveassesiieas 223 Input data set forexample uri is patera 225 Partialimput da
68. a simulation USE can also specify previously defined kinetically controlled reactions KINETICS data block reaction parameters REACTION data block reaction temperature parameters REACTION_TEMPERATURE data block and mixing parameters MIX data block to be used in a batch reaction calculation Example data block Line Oa USE equilibrium_phases none Line Ob USE exchange 2 Line Oc USE gas_phase 3 Line Od USE kinetics 1 Line Oe USE mix 1 Line Of USE reaction 2 Line 0g USE reaction temperature 1 Line Oh USE solid_solution 6 Line 0i USE solution 1 Line 03 USE surface 1 Explanation Line 0 USE keyword number or none USE is the keyword for the data block keyword One of ten keywords equilibrium_phases exchange gas_phase kinetics mix reaction reaction_temperature solid_solutions solution or surface number Positive integer associated with previously defined composition or reaction parameters none No data of the type of the specified keyword will be used in the batch reaction calculation Notes Batch reactions are defined by allowing a solution or mixture of solutions to come to equilibrium with one or more of the following entities an exchange assemblage a pure phase assemblage a solid solution assemblage a surface assemblage or a gas phase In addition kinetically controlled reactions fixed stoichiometry reactions and reaction temperatures can be specified for batch reaction calculation
69. activity coefficient expression for each exchange species are defined through the EXCHANGE SPECIES data block Exchange master species are defined with the EXCHANGE MASTER SPECIES data block The number of exchange sites and exchanger composition are defined with the EXCHANGE data block see Description of Data Input Surface Species Surface complexation processes are included in the model through heterogeneous mass action equations mole balance equations for surface sites and charge potential relations for each surface PHREEQC allows multiple surfaces and surface site types termed a surface assemblage to exist in equilibrium with the aqueous phase Two formulations of the mass action equations for surface species are available in PHREEQC 1 one that includes electrostatic potential terms and 2 another that excludes all electrostatic potential terms If the Dzombak and Morel 1990 model which includes electrostatic potential terms is used additional equations and mass action terms become operational because of surface charge and surface electrostatic potential EQUATIONS FOR SPECIATION AND FORWARD MODELING 13 The two principle differences between the formulation of exchange reactions and surface reactions are that exchange reactions are formulated as half reactions which causes the master species not to appear in any mole balance equations and the exchange species are expected to be neutral Surface reactions are not half
70. an ideal solid solution Pss IAP Pss Xp gt 50 the summation determines if the sum of the mole fractions is greater than 1 0 If the eguations Des SS for a solid solution are not included in the matrix then all coefficients for the unknowns dn Ds in the matrix are set to zero For nonideal binary solid solutions the following procedure to determine whether to include solid solution equations is developed from the equations of Glynn and Reardon 1990 equations 37 through 48 If the moles of any of the solid solution components are greater than a small number 1x 107 then all the equations for the solid solution are included Otherwise the aqueous activity fractions of the components are calculated from IAP IAP Sa ad lie DON 89 laq JAP IAP 72 09 IAP 1AP S where JAP is the ion activity product for the pure component Next the mole fractions of the solids that would be in equilibrium with those aqueous activity fractions are determined by solving the following equation for x and x 1 x1 1 X1 aq X2 ag MK NK X AG K XJ Ko 90 where x and x are the mole fractions in the solid phase Kj and K gt are the equilibrium constants for the pure com ponents A and X are the activity coefficients of the components as calculated from the Guggenheim parameters for the excess free energy This equation is highly nonlinear and is solved by first testing subintervals between 0 and 1 to find one that c
71. are calculated from the partial pressures in solution and the temperature is equal to the solution temperature The equilibrate identifier cannot be used with a fixed pressure gas phase A gas component may have an initial partial pressure of zero because the solution with which the gas phase is in equilibrium does not contain that gas component In this case no moles of that component will be present initially but the component may enter the gas phase when the gas is in contact with another solution that does contain that component Example problems The keyword GAS_PHASE is used in example problem 7 Related keywords EQUILIBRIUM_PHASES PHASES SAVE gas_phase and USE gas_phase DESCRIPTION OF DATA INPUT 95 INCREMENTAL_REACTIONS This keyword data block is included mainly to speed up batch reaction calculations that include kinetic reactions KINETICS keyword The keyword has no effect on transport calculations By default INCREMENTAL_REACTIONS false for each time t given by steps in the KINETICS keyword data block rates of kinetic reactions are integrated from time O to This default repeats the integration over early times for each reaction step even though the early times may be the most CPU intensive part If INCREMENTAL_REACTIONS is set to true the values of t are the incremental times for which to integrate the rates each kinetic calculation i 1 i denoted by i integrates over the time interval from y 1 to y t
72. assumed It is possible to define a solution with a different mass of water by using the water identifier In that case the moles of solutes are scaled to produce the molality as converted from the input data A 1 mol kgw solution of NaCl with water 0 5 has 0 5 moles of Na and Cl and 0 5 kilograms of water Batch reaction calculations may also cause the mass of water in a solution to deviate from 1 kilogram Isotope values are used only in conjunction with the INVERSE_MODELING data block Uncertainty limits for isotopes in mole balance modeling may be defined in three ways default uncertainty limits may be used 152 User s Guide to PHREEOc Version 2 uncertainty limits may be defined in the SOLUTION data block or uncertainty limits may be defined in the INVERSE_MODELING data block Uncertainty limits defined in the INVERSE_MODELING data block take precedence over the SOLUTION data block which in turn take precedence over the defaults given in table 5 After a batch reaction has been simulated it is possible to save the resulting solution composition with the SAVE keyword If the new batch reaction composition is not saved the solution composition will remain the same as it was before the batch reaction After it has been defined or saved a solution may be used in subsequent simulations through the USE keyword Solution compositions for a cell are automatically saved after each shift in transport calculations Example problems The
73. assuming ideality However the assumption of ideality is usually an oversimplification except possibly for isotopes of the same element INTRODUCTION 5 Transport Modeling An explicit finite difference algorithm is included for calculations of 1D advective dispersive transport and optionally diffusion in stagnant zones The algorithm may show numerical dispersion when the grid is coarse The magnitude of numerical dispersion also depends on the nature of the modeled reactions numerical dispersion may be large in the many cases linear exchange surface complexation diffusion into stagnant zones among others but may be small when chemical reactions counteract the effects of dispersion It is recommended that modeling be performed stepwise starting with a coarse grid to obtain results rapidly and to investigate the hydrochemical reactions and finishing with a finer grid to assess the effects of numerical dispersion on both reactive and conservative species Convergence Problems PHREEQC tries to identify input errors but it is not capable of detecting some physical impossibilities in the chemical system that is modeled For example PHREEQC allows a solution to be charge balanced by addition or removal of an element If this element has no charged species or if charge imbalance remains even after the concentration of the element has been reduced to zero then the numerical method will fail to converge Other physical impossibilities that have
74. balance equation In this case all of the mass action expressions involving the current master unknown including aqueous exchange gas and surface species and pure phases are rewritten in terms of the new master species that has the larger activity An example of this process is if nitrogen is present in a system that becomes reducing the master unknown for nitrogen would switch from nitrate which would be present in negligible amounts under reducing conditions to ammonium which would be the dominant species Basis switching does not affect the ultimate equilibrium distribution of species but it does speed calculations and avoid numerical problems in dealing with small concentrations Initial values for the master unknowns are estimated and then revised according to the strategy described in the previous section For initial solution calculations the input values for pH and pe are used as initial estimates The mass of water is 1 0 kg unless otherwise specified and the activity of water is estimated to be 1 0 Ionic strength is estimated assuming the master species are the only species present and their concentrations are equal to the input concentrations converted to units of molality The activity of the master species of elements except hydrogen and oxygen and element valence states are set equal to the input concentration converted to molality If the charge balance equation or a phase equilibrium equation is used in place of the mole ba
75. be used as for all subsequent solutions in the data block if no column has the same name directly followed by a column headed uncertainty or if the entry for the uncer tainty column is empty for a solution Isotopes and isotope uncertainty limits are used only in inverse modeling Optionally uncertainty unc ertainty uncertainties unc ertainties isotope_uncertainty or isotope_ uncertainty name Name of the isotope beginning with mass number uncertainty_limit Uncertainty limit for the isotope to be used in inverse modeling Line 10 column headings column headings Column headings are element names element valence state names element chemi cal symbol followed by valence state in parentheses isotope names element chemical symbol preceded by the mass number one of the identifiers in Lines 1 7 without the hyphen number description or uncertainty Most often the headings are equivalent to the first data item of line 7 of the SOLUTION data block A column heading number is used to specify solution num bers or range of solution numbers that are specified following the keyword in the SOLUTION data block Similarly a column heading description allows the entry of the descriptive infor mation that is entered following the keyword and solution number in the SOLUTION data block A column headed uncertainty may be entered adjacent to the right of any isotope column to define uncertainty limits for isotope data in inver
76. been encountered are 1 when a base is added to attain a fixed pH but in fact an acid is needed or vice versa and 2 when noncarbonate alkalinity exceeds the total alkalinity given on input At present the numerical method has proved to be relatively robust All known convergence problems cases when the numerical method fails to find a solution to the non linear algebraic equations have been resolved Occasionally it has been necessary to use the scaling features of the KNOBS keyword The scaling features appear to be necessary when total dissolved concentrations fall below approximately to mol kgw moles per kilogram of water Inverse Modeling Inclusion of uncertainties in the process of identifying inverse models is a major advance over previous inverse modeling programs However the numerical method has shown some inconsistencies in results due to the way the solver handles small numbers The option to change the tolerance used by the solver tol in INVERSE_MODELING data block is an attempt to remedy this problem In addition the inability to make Rayleigh fractionation calculations for isotopes in precipitating minerals is a limitation How to Obtain the Software and Manual Win32 and Unix versions of the software described in this report including this manual in Postscript and PDF formats can be obtained from the web site http water usgs gov software The most current version and additional bibliographies and information fi
77. calcium component for which a model could be found was about Cay 75Mgg 25 Na PHREEQC C This exchange reaction was then used in NETPATH to find NETPATH C NETPATH C was calculated by using the charge balance option of NETPATH with all phases and constraints the same as in NETPATH C One consistent difference between the NETPATH models without the charge balance option NETPATH A B and C and the PHREEQC models is that the amount of organic matter oxidation and the mole transfers of goethite and pyrite are larger in the PHREEQC models These differences are attributed to the effects of charge balance on the mole transfers It has been noted that charge balance errors frequently manifest themselves as erroneous mole transfers of single component reactants such as carbon dioxide or organic matter Plummer and others 1994 Except for differences in mole transfers in organic matter goethite and pyrite the Mg Na models are similar NETPATH B and PHREEQC B However both models imply a negative carbon 14 age which is impossible as noted by Plummer and others 1990 The PHREEOC model most similar to the pure Ca Na exchange model NETPATH A is the Cag 75Mgo 25 Na gt model PHREEQC C This model has larger mole transfers of carbonate minerals and organic matter than the Ca Na model which decreases the reaction adjusted carbon 14 activity and produces a younger ground water 282 User s Guide to PHREEQC Version 2 Table 54 Mole balance r
78. composition involves a computer intensive integration and an additional set of iterations The diffuse layer identifier causes calculations to be 5 to 10 times slower than calculations with the default approach A third alternative for modeling surface complexation reactions in addition to the default and diffuse layer is to ignore the surface potential entirely The no edl identifier eliminates the potential term from mass action expressions for surface species eliminates any charge balance eguations for surfaces and eliminates 166 User s Guide to PHREEOc Version 2 any charge potential relationships The charge on the surface is calculated and saved with the surface composition and an equal and opposite charge is stored with the aqueous phase All of the cautions about separation of charge mentioned in the previous paragraphs apply to the calculation using no edl For transport calculations it is much faster in terms of cpu time to use either the default no explicit diffuse layer calculation or no_edl However diffuse_layer can be used to test the sensitivity of the results to diffuse layer effects All solutions should be charge balanced for transport calculations Example data block 2 Line Od SURFACE 1 Neutral surface composition Line 7a Surf_wOH 0 3 660 0 25 Line 7b Surf_sOH 0 003 Line 3a Surfc_sOH Fe OH 3 a equilibrium phase 0 001 Line 3b Surfd_sOH A1 0H 3 a kinetic 0 001 Explanation 2 Line 0d
79. conflict with the key word GAS_PHASE Line 6 headings True or False headings Prints title and headings that identify the beginning of each type of calculation if value is true excludes print if value is false Default is true Optionally heading headings or h ead ings Line 7 inverse_modeling True or False inverse_modeling Prints results of inverse modeling if value is true excludes print if value is false Default is true Optionally inverse or ilnverse modeling Note the hyphen is required to avoid a conflict with the keyword INVERSE_MODELING Line 8 kinetics True or False kinetics Prints information about kinetic reactants if value is true excludes print if value is false Default is true Optionally k inetics Note the hyphen is required to avoid a conflict with the keyword KINETICS Line 9 other True or False other Controls all printing to the output file not controlled by any of the other identifiers including lines that identify the solution or mixture exchange assemblage solid solution assemblage sur face assemblage pure phase assemblage kinetic reaction and gas phase to be used in each cal culation and description of the stoichiometric reaction Default is true Optionally other o ther use or u se Line 10 saturation_indices True or False saturation_indices Prints saturation indices for each phase for which a saturation index can be cal culated if value is tru
80. directory to the examples directory in a DOS window Note that example 14 requires the database file wateg4f dat which is in the installation directory and example 15 requires the database file ex 5 dat which is in the examples subdirectory All other examples can be run with the database file phreegc dat Invoke PHREEOC with any of the following commands INTRODUCTION 7 phreegc The program will guery for each of the needed files phreegc input The input file is named input the output file will be named input out and the default database file will be used phreegc input output The input file is named input the output file is named output and the default database file will be used phreegc input output database All file names are specified explicitly phreegc input output database screen output All file names are specified explicitly and screen output is directed to the file screen output The environmental variable PHREEOC DATABASE can be used to specify the default database for a DOS window session This environmental variable can be set with the command set PHREEQC_DATABASE c nydirectory nyproject nydata dat If the environmental variable is not set the default database file is phreegc dat in the installation directory If PHREEQC is invoked with at least three arguments the third argument is the database file and it supersedes any of the default databases When specifying the database file it may be necessary to giv
81. dual character with regard to flow part of the water is mobile and flows along the conduits continuous joints fractures connected porosity while another part remains immobile or stagnant within the structural units Exchange of water and solutes between the two parts may occur through diffusion Dual porosity media can be simulated in PHREEQC either with the first order exchange approximation or with finite differences for diffusion in the stagnant zone First Order Exchange Approximation Diffusive exchange between mobile and immobile water can be formulated in terms of a mixing process between mobile and stagnant cells In the following derivation one stagnant cell is associated with one mobile cell The first order rate expression for diffusive exchange is EQUATIONS AND NUMERICAL METHOD FOR TRANSPORT MODELING 49 dM im dC in di On Rim Jr Cn Ci gt 119 where subscript m indicates mobile and im indicates immobile M are moles of chemical in the immobile zone O is porosity of the stagnant immobile zone a fraction of total volume unitless R is retardation in the stag nant zone unitless Ci is the concentration in stagnant water mol kgw t is time s C is the concentration in mobile water mol kgw and amp is the exchange factor s The retardation is equal to R 1 dq dC which is calculated implicitly by PHREEQC through the geochemical reactions The retardation contains the change dq in concentra
82. each time step of transport simulations with the equation N Yurin a i where Eo 1s the charge imbalance for the exchanger and z A is the charge on the exchange species i of exchanger e The charge imbalance for the system is defined at the beginning of each batch reaction step and for each cell at the beginning of each time step in transport simulations to be Q S E yc o Kee 64 q KY e where T is the charge imbalance for the system O is the number of aqueous phases that are mixed in the batch reaction step or in the cell for a transport step amp 7 is the mixing fraction for aqueous phase q S is the number of surfaces and E is the number of exchangers The charge balance function is EQUATIONS FOR SPECIATION AND FORWARD MODELING 27 N ag S K Ns T 2 n PIDIN Eens Es Hips 65 s k isp where f is zero when charge balance has been achieved If the diffuse layer composition is explicitly calculated a separate charge balance equation is included for each surface and the sum of the terms in the parentheses will be zero when surface charge balance is achieved If the diffuse layer composition is not calculated the second term inside the parentheses is zero The total derivative of f is gt Sedo LEDS th WEES in 6 s k isp where the triple summation for surfaces is present only if the diffuse layer composition is not explicitly calcu lated For data input to PHREEQC charge imbalance is defined by data
83. equation will be used to calculate an activity coefficient If gamma or davies is not input for an exchange species the activity of the species is equal to its equivalent fraction If davies is entered then an activity coefficient of the form of the Davies equation logy Az AH 0 3 k is multiplied times the equivalent fraction to obtain activity for 1 tall the exchange species In this equation y is the activity coefficient u is ionic strength A is a con stant at a given temperature and z is the number of equivalents of exchanger in the exchange species Optionally davies or d avies Notes Lines 1 and 2 may be repeated as necessary to define all of the exchange reactions with line 1 preceding line 2 for each exchange species One identity reaction that defines the exchange master species in example data block lines la and 2a 1d and 2d and one reference half reaction are needed for each exchanger The identity reaction has a log K of 0 0 The reference half reaction for each exchanger also will have a log K of 0 0 in example data block lines 1b and 2b le and 2e in the default database file the reference half reaction is Na X NaX Multiple exchangers may be defined simply by defining multiple exchange master species and additional half reactions involving these master species as in this example data block The theory for activities of exchange species is not well developed In PHREEQC the activity of an exch
84. expediency it is suggested that models are first identified without using the range identifier and the mole transfers checked for plausibility and geochemical consistency with any additional information such as saturation indices isotopic compositions and mineral textures then the calculation is rerun with the range identifier Any phase with the force option will be included for each range calculation even if the inverse model does not contain this phase Optionally range ranges or r anges maximum The maximum value for the range is calculated by minimizing the difference between the value of maximum and the calculated mole transfer of the phase or the solution fraction The min imum value of the range is calculated by minimizing the difference between the negative of the value of maximum and the calculated mole transfer of the phase or the solution fraction In some evaporation problems the solution fraction could be greater than 1000 over 1000 fold evapora tive concentration In these problems the default value is not large enough and a larger value of maximum should be entered Default is 1000 Line 10 minimal DESCRIPTION OF DATA INPUT 101 minimal Identifier that specifies that models be reduced to the minimum number of phases that can satisfy all of the constraints within the specified uncertainty limits Note that two minimal mod els may have different numbers of phases minimal models imply that no model with any proper
85. fail because a very low pH can not be reached even by removing all of the sodium in solution The results of the simulation are plotted in figure 8 and are consistent with the results shown in Dzombak and Morel 1990 figure 8 9 Zinc is more strongly sorbed at high pH values than at low pH values In addition at low concentrations of zinc the strong binding sites outcompete the weak binding sites for zinc over the entire pH range and at high pH most of the zinc resides at the strong binding sites At larger zinc concentrations the strong binding sites predominate only at low pH Because all the strong binding sites become filled at higher pH most of the zinc resides at the more numerous weak binding sites at high pH and large zinc concentrations Example 9 Kinetic Oxidation of Dissolved Ferrous Iron with Oxygen Kinetic rate expressions can be defined in a completely general way in PHREEQC using Basic statements in the RATES data block The rate expressions can be used in batch reaction or transport calculations by using the KINETICS data block For transport calculations ADVECTION or TRANSPORT kinetic reactions can be defined cell by cell by the number range following the KINETICS keyword KINETICS m n The rate expressions are integrated with an embedded 4th and 5th order Runge Kutta Fehlberg algorithm Equilibrium is calculated before a kinetic calculation is initiated and again when a kinetic reaction increment is added Equilibrium
86. following abbreviations are used in this report atmosphere atm calorie cal Coulomb C degree Celsius C equivalent eq gram g Joule J degree Kelvin K kilocalorie kcal kilogram kg kilogram of water kgw kilojoule kJ liter L meter m milliequivalent meq millimole mmol micromole umol mole mol parts per million ppm parts per billion ppb square meter m Volt V Degree Celsius C may be converted to degree Fahrenheit F by using the following equation F 9 5 C 32 Degree Fahrenheit F may be converted to degree Celsius C by using the following equation XII C 5 9 F 32 User s Guide to PHREEQC Version 2 Other conversions Absolute temperature K 273 15 C 1 joule 0 239 calorie Some constants Avogadro s comstant N Faraday F Gas constant R Molar volume ideal gas 1 atm 25 C 6 022e23 mol 96 485 C mol 8 314 J mol K 24 465 dm3 mol XIII XIV User s Guide to PHREEQC Version 2 User s Guide to PHREEQC Version 2 A Computer Program for Speciation Batch Reaction One Dimensional Transport and Inverse Geochemical Calculations By David L Parkhurst and C A J Appelo Abstract PHREEQC version 2 is a computer program written in the C programming language that is designed to perform a wide variety of low temperature aqueous geochemical calculations PHREEQC is based on an ion association aqueous model and has capabilities for 1 speciation and saturatio
87. for component p in solid solution ss The values of c may be pos m Pss itive or negative For PHREEQC terms on the left hand side of a phase dissolution reaction are assigned negative coefficients and terms on the right hand side are assigned positive coefficients The solubility quotient for a compo nent of the solid solution is defined to be Q 44 Pss E i lp where Q is equal to 1 and InQ p is equal to 0 at equilibrium The functions used in the numerical method for each component of a nonideal binary solid solution are Mag n 1 t Jala ar N and 45 m M ag fa ao m 46 m EOUATIONS FOR SPECIATION AND FORWARD MODELING 21 The total derivative with respect to the master unknowns is M 2 3 a Xz 249X 0A X 12a x gt m 2 2 3 2d Xx 244X 64 x 18a x gt 12a x gt 1 dn 47 ny N 2 j and M 3 2 2a x 2a x 6a x 18a x2 12a x 1 2 071 071 171 171 171 df n 2dlna y s An 1 2 x 2apx 6a x 120 27 OA 1 1 TA lai 48 n nj n The function used in the numerical method for each component of an ideal solid solution is Mag Cm Pp y am p f InQ h 2 h 49 Pss Pss Ko N o tal Ns where N otal yin ie and j ranges over all the components in solid solution ss The total derivative with J ss respect to the master unknowns is M ag 1 N I n Ns Iss Pss 1 tota Pss o 2 Em p Ana T H N Jo i x N dn i 50 m dss total total
88. for the species which is defined in the SOLUTION_SPECIES data block and the alkalinity contributions of the master species which are defined with the SOLUTION_MASTER_SPECIES data block Total alkalinity is part of the solution composition defined with the SOLUTION or SOLUTION_SPREAD data block see Description of Data Input Mole Balance for Elements The total moles of an element in the system are the sum of the moles initially present in the pure phase and solid solution assemblages aqueous phase exchange assemblage surface assemblage gas phase and diffuse layers of the surfaces The following function is the general mole balance equation N SSN N ag E N m Tm LP mm pp 2 Pm pp Dm Mi L Vm iti p SS Pys i e i 57 S K Na N S N ag EEEn ii OI s k isp g s i where the value of the function f is zero when mole balance is achieved T is the total moles of the element in the system N is the number of phases in the pure phase assemblage SS is the number of solid solutions in the solid solution assemblage N is the number of components in solid solution ss Nag is the number of aqueous spe cies E is the number of exchangers in the exchange assemblage N is the number of exchange species for exchange site e S is the number of surfaces in the surface assemblage K is the number of surface types for sur face s N N is the number of surface species for surface type s and N is the number of gas phase components
89. g kJ mol by the equations ag nent 2 delimiting the miscibility gap the mole fractions of component 2 delimiting the spinodal gap the mole frac tion of component 2 at the critical point and the critical temperature Thompson and Waldbaum parameters Margules parameters mole fraction of component 2 and the log of the total solubility product of an alyotropic point solid phase activity coefficients for trace concentrations of component 1 and component 2 or two distribu tion coefficients for component 2 Glynn 1991 The new function corresponding to each of the new unknowns is a mass action expression for each component in each solid solution PHREEQC uses dissolution reactions in the sense that the solid solution component is on the left hand side of the chemical equation For aragonite in an aragonite strontianite solid solution the dissolution reaction may be written as 2 2 CaCO Ca CO 41 and using log K of 1083 and activity coefficient for the solid the resulting mass action expression is a do a nd 2 8 34 Cae 00 Ca CO 10 42 Arag N N Arag Arag N Arag N stront Karag In general solid solution phase equilibria can be represented with the following equation for each component Maq i m Pss Mo m Dss a Pss K 43 where K is the equilibrium constant of component p in pure form and c 1s the stoichiometric coefficient of FSS master species m in the dissolution reaction
90. gap No default x2 Mole fraction of component 2 at the other end of the miscibility gap No default Line 12 spinodal gap x x2 spinodal gap The mole fractions of component 2 that delimit the spinodal gap are used to calculate dimensional Guggenheim parameters Optionally spinodal gap or s pinodal gap x Mole fraction of component 2 at one end of the spinodal gap No default x2 Mole fraction of component 2 at the other end of the spinodal gap No default Line 13 critical point Xep tep critical_point The mole fraction of component 2 at the critical point and the critical temperature Kelvin are used to calculate dimensional Guggenheim parameters Optionally critical_point or cr itical_point Xcp Mole fraction of component 2 at the critical point No default top Critical temperature in Kelvin No default Line 14 alyotropic_point x log 21D alyotropic_point The mole fraction of component 2 at the alyotropic point and the total solubility product at that point are used to calculate dimensional Guggenheim parameters Optionally alyotropic point or al yotropic_point Xqly Mole fraction of component 2 at the alyotropic point No default 146 User s Guide to PHREEOc Version 2 log lt IT Total solubility product at the alyotropic point where LIT a a a No default common ion Line 15 Thompson wg wg Thompson Thompson and Waldbaum parameters wg and wg are used to calculat
91. given by the variable TIME examples calcite line 140 pyrite line 50 TIME is a fraction of the time step that is defined in the KINETICS for batch reactions ADVECTION or TRANSPORT data blocks The total moles of reaction must be returned to the main program with a SAVE command line 200 in each example Note that not the rate but the moles of reaction are returned counted positive when the solution concentration of the reactant increases The first example estimates the rate of calcite dissolution or precipitation on the basis of a rate expression from Plummer and others 1978 as derived in equations 101 and 106 The forward rate is given by Ry k LH ky CO ag k31H 01 155 2 aq where brackets indicate activity and ki N k and ka are functions of temperature Plummer and others 1978 In a pure calcite water system with fixed P 0 the overall rate for calcite forward rate minus backward rate is approximated by DESCRIPTION OF DATA INPUT 125 Table 6 Description of Basic program for calcite kinetics given in example for RATES data block Line number Function 1 4 Comments 10 Calculate calcite saturation index 20 If undersaturated and no moles of calcite exit moles 0 by default 30 60 Calculate temperature dependence of constants k1 k2 and k3 70 90 Calculate ratio of current moles of calcite to initial moles of calcite set ratio to 1 if no moles of calcite are present 100 Calculate surface
92. greater than the number of lengths entered the final value read will be used for the remaining cells Multiple lines may be used Repeat factors can be used to input multiple data with the same value in the example data block 4 1 0 is interpreted as 4 values of 1 0 Default is 1 Line 7 dispersivities list of dispersivities dispersivities Defines dispersivity of each cell for advective dispersive transport simulations m Optionally disp dispersivity dispersivities dis persivity or dis persivities list of dispersivities Dispersivity assigned to each cell m Any number of dispersivities up to the total number of cells cells may be entered If cells is greater than the number of dispersivities 174 User s Guide to PHREEOcC Version 2 entered the final value read will be used for the remaining cells Multiple lines may be used Repeat factors can be used to input multiple data with the same value in the example data block 4 0 1 is interpreted as 4 values of 0 1 Default is 0 Line 8 correct_disp True or False When true dispersivity is multiplied with 1 1 cells for column ends with flux boundary conditions This correction is recommended when modeling effluent composition from column experiments Optionally correct_disp or co rrect_disp Default is True value at beginning of run is False Line 9 diffusion_coefficient diffusion coefficient diffusion_coefficient Defines diffusion coefficient for all aqueous s
93. has been released the concentration of calcium increases to a steady state value equal to the concentration in the infilling solution The concentration changes of sodium and potassium in the effluent form a chromatographic pattern which often can be calculated by simple means Appelo 1994b The number of pore volumes needed for the arrival of the sodium decrease front can be calculated with the formula P 1 V where V Aq Ac Ag indicates the change in sorbed concentration mol kgw and Ac the change in solute concentration over the front The sodium concentration in the solution that initially fills the column is 1 0 mmol kgw and the initial sorbed concentration of sodium is 0 55 the concentration of sodium in the infilling solution is zero which must eventually result in O sorbed sodium Thus m5 Aq Ac 0 55 0 1 0 0 55 and P 1 55 which indicates that the midpoint of the sodium front should arrive at the end of the column after 1 55 pore volumes Next potassium is displaced from the exchanger The concentration in solution increases to 1 2 mmol kgw to balance the CI concentration and then falls to O when the exchanger is exhausted When potassium is the only cation in solution it will also be the only cation on the exchanger For potassium Vh Aq Ac 1 1 0 1 2 0 0 917 and P 1 917 pore volumes It can be seen that the front locations for V and V are closely matched by the midpoints of the concentr
94. in initial solution calculations The equation f Pics is included if a fixed pressure gas phase is specified and is present at equilibrium The equations f are included if an exchange assemblage is specified The equations f s are included if a surface assemblage is specified In addition fy is included for each surface for which an implicit diffuse layer 38 User s Guide to PHREEQC Version 2 calculation is specified or f is included for each surface for which an explicit diffuse layer calculation is specified An equation f D is included for each pure phase that is present at equilibrium An equation f pi is included for each component of each solid solution that is present at eguilibrium It is not known at the beginning of the calculation whether a pure phase solid solution or fixed pressure gas phase will be present at eguilibrium Thus at each iteration the following logic is used to determine which of the eguations should be included in the eguilibrium calculations The eguation for a phase is included if it has a positive moles n Pig 0 or if the saturation index is calculated to be greater than the target saturation index If the equation is not included in the matrix then all coefficients for the unknown dn p in the matrix are set to zero For an ideal solid solution the equations f p are included if the moles of any of the components are IAP greater than a small number ao or 1f the sum y is greater than 1 0 For
95. input datum total inorganic carbon Total CO2 electrical balance and percent error have been calculated by the model Under the subheading Redox couples the pe and Eh are printed for each redox couple for which data were available in this case ammonium nitrate and water dissolved oxygen Under the subheading Distribution of species the molalities activities and activity coefficients of all species of each element and element valence state are listed The lists are alphabetical by element name and descending in terms of molality within each element or element valence state Beside the name of each element or element valence state the total molality is given Finally under the subheading Saturation indices saturation indices for all minerals that are appropriate for the given analytical data are listed alphabetically by phase name near the end of the output The saturation index is given in the column headed SI followed by the columns for the log of the ion activity product log IAP and the log of the solubility constant log KT The chemical formulas for each of the phases is printed in the right hand column Note for example that no aluminum bearing minerals are included because aluminum was not included in the analytical data Also note that mackinawite FeS and other sulfide minerals are not included in the output because no analytical data were specified for S 2 If a concentration for S inste
96. input file It contains a main subroutine that calls subroutines that read each data block All subroutines to read data blocks are found in read c except the subroutines for TRANSPORT which are found in readtr c and SOLUTION_SPREAD which are found in spread c In the process of reading memory is allocated to store the information for each keyword Thus the memory used by the program grows depending on the number and type of keywords that are included in the input file The only restriction on the size of the program is the available memory and swap space that is physically present in the computer that is used Chemical equations that are read from the input files are interpreted and checked for charge and mole balance by the subroutines in parse c Subroutines in the file tidy c check and organize the data read through read c These subroutines sort the lists of species solutions phases pure phase assemblages and others so that the order of these entities is known They ensure that any elements used in mass action equations are defined to the program and that all necessary primary and secondary master species exist In addition they rewrite all mass action equations so that they contain only primary and secondary master species Other consistency checks and data organization for exchangers gas phases pure phase assemblages surfaces solid solutions and inverse modeling are performed by the subroutines in this file Also the selected output fi
97. ion calcium from Line 2 is removed from solution and the sodium and calcium from the exchanger is added to solution the net effect is dissolution of Na Ca montmorillonite Note that equilibrium for Ca montmorillonite always uses the same 84 User s Guide to PHREEQC Version 2 mass action equation which includes only calcium even though the composition of the phase is changing Note also that this formulation implies that a pure Na montmorillonite can never be attained because calcium must always be present to attain equilibrium with Ca montmorillonite It is possible to realize a complete exchange of sodium and calcium by defining Y without cations under EXCHANGE and a new equilibrium with only the structural ions of montmorillonite under PHASES The combined reaction of exchanger and equilibrium phase must be electrically neutral In the example data block the montmorillonite would be defined with a positive charge deficit of 0 165 When montmorillonite forms the exchange sites Y increase in proportion and take cations from solution to exactly balance the charge deficit Note that log k for montmorillonite is adjusted by log y 0 001 to account for an estimated contribution of 1 mmol kgw Ca in solution Yet another possibility is to use the capabilities of the SOLID_SOLUTIONS data block to define a variable composition solid solution between calcium and sodium montmorillonite end members EXCHANGE 1 Exchanger in equilibrium
98. iron in 1 mol kgw the pH and the saturation index of goethite When the input file is run two warning messages are generated during the integration If the integration time interval is too large it is possible that the initial estimates of kinetic reaction increments produce negative solution concentrations When this happens the program prints a warning message decreases the size of the time interval and restarts the integration The messages are warnings not errors and the program successfully completes the calculation It is possible to eliminate the warning messages by reducing the initial integration interval No warning messages are printed if the identifier step_divide 100 is used KINETICS which divides the initial overall time step by 100 Likewise no warning messages are printed if the identifier step_divide le 7 is used which causes the reaction increment to be less than 1e 7 mol The former approach with step divide 100 is usually preferable because although initial reaction increments are compelled to be small later on in the integration large reaction increments are possible Using step divide 1e 7 forces reaction increments to remain small throughout the entire integration and in this example the run time is about 5 times longer than using step_divide 100 and about 10 times longer than when step_divide is not used at all Figure 9 shows the concentration of total Fe 2 total Fe 3 and pH in the reaction vessel
99. is for cell centered concentrations which has consequences for data interpretation Thus the composition in a boundary cell is a half cell distance away from the column outlet and needs a half time step to arrive at or from the column end The half time step must be added to the total residence time in the column when effluent from a column is simulated use TOTAL_TIME time step 2 for time see example 15 or STEP_NO 0 5 cells for pore volumes see example 11 The kinetics time for advective transport into the boundary cell is the advective time step divided by 2 Also the cell centered scheme does not account for dispersion in the border half cell in case of a flux boundary condition The identifier correct_disp provides an option to correct the ignored dispersion by increasing the dispersivity for all cells in the column by the appropriate amount The correction will improve the comparison with analytical solutions for conservative elements when the number of cells is small It has been shown in the section Transport in Dual Porosity Media that a dual porosity model in which part of the porosity allows advective flow and part of the porosity is accessible only by diffusion can be developed with a first order exchange model and with finite differences and both approaches can be defined in terms of a mixing among cells With the TRANSPORT data block one column of mobile cells is used to represent the part of the flow system
100. is specific w w heat kJ Clg and subscripts w and s indicate water and solid respectively The thermal dif K aquifer including pore water and solid kJ C m s The value of e may be 100 1500 times fusion coefficient can be estimated using K Where K is the heat conductivity of the larger than the aqueous diffusion coefficient or about 1e 6 m s A temperature change during transport is reduced by the temperature retardation factor to account for the heat capacity of the matrix Optionally th erma diffusion retardation factor Temperature retardation factor unitless Default is 2 0 thermal diffusion coefficient Thermal diffusion coefficient Default is the aqueous diffusion coeffi cient Line 12 initial_time initial_time initial_time Identifier to set the time at the beginning of a transport simulation The identifier sets the initial value of the variable controlled by time in the SELECTED_OUTPUT data block Optionally initial_time or i nitial_time initial_time Time seconds at the beginning of the transport simulation Default is the cumulative time including all preceding ADVECTION simulations for which time_step has been defined and all preceding TRANSPORT simulations Line 13 print_cells list of cell numbers print_cells Identifier to select cells for which results will be written to the output file Optionally print print_cells or pr int_cells Note the hyphen is required to avoid a co
101. keyword SOLUTION is used in all example problems 1 through 18 Related keywords INVERSE_MODELING SAVE solution SOLUTION SPECIES SOLUTION MASTER SPECIES and USE solution DESCRIPTION OF DATA INPUT 153 SOLUTION_MASTER_SPECIES This keyword is used to define the correspondence between element names and aqueous primary and secondary master species The alkalinity contribution of the master species the gram formula weight used to convert mass units and the element gram formula weight also are defined in this data block Normally this data block is included in the database file and only additions and modifications are included in the input file Example data block e 0 SOLUTION MASTER SPECIES e la H H 1 0 1 008 1 008 e lb H 0 H2 0 0 1 008 e le S s04 2 0 0 SO4 32 06 e ld S 6 s04 2 0 0 SO4 e le S 2 HS s0 S e lf Alkalinity CO3 2 0 Ca0 5 C03 0 5 50 04 Explanation Line 0 SOLUTION_MASTER_SPECIES Keyword for the data block No other data are input on the keyword line Line 1 element name master species alkalinity gram formula weight or formula gram formula weight of element element name An element name or an element name followed by a valence state in parentheses The element name must begin with a capital letter followed by zero or more lower case letters or underscores master species Formula for the master species including its charge If the element name d
102. linear equations subject to equality and inequality constraints The general problem can be posed with the following matrix equations AX B CX D 85 EX lt F NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING 33 I J The first matrix eguation is minimized in the sense that y b Y a Pj is a minimum where y is the number i j of equations to be optimized subject to the equality constraints of the second matrix equation and the inequality constraints of the third matrix equation The approach of PHREEQC is to include some of the Newton Raphson equations in the optimization equations AX B rather than include all of the Newton Raphson equations as equalities CX D Equations that are included in the A matrix may not be solved for exact equality at a given iteration but will be optimized in the sense given above Thus at a given iteration an approximate mathematical solution to the set of Newton Raphson equations can be found even if no exact equality solution exists for example when forcing equality for all equations would result in an unsolvable singular matrix The equations for alkalinity total moles of gas in the gas phase pure phases and solid solution components are included in the A matrix All mole balance charge balance and surface potential equations are included in the B matrix Inequalities that limit the dissolution of pure phases solid solution components and gas components to the amounts present in the system ar
103. lists The number of models that are formulated and solved by the optimization methods are relatively few Also the process has the useful feature that if no feasible models exist this is determined immediately when the optimization procedure is invoked the first time For PHREEQC during all of the testing whenever a feasible model is found it is printed to the output device or optionally only the minimal models are printed to the output device An alternative formulation of the objective functions can be used to determine the range of mole transfer for each aqueous solution and each phase that is consistent with the specified uncertainty limits For the range calculation range in INVERSE_MODELING data block the equations for a given model are solved twice for each aqueous solution and phase in the model once to determine the maximum value of the mixing fraction or mole transfer and once to determine the minimum value of the mixing fraction or mole transfer In these calculations the E s are not minimized but instead the single objective function for maximization is u a M 153 and in the minimization case a M 154 where refers to either a q FO and M is a large number By default the value of M is 1000 The optimization method will try to minimize the difference between a and 1000 for maximization and between amp and 1000 for minimization It is possible that the mixing fraction for a solution a g could exceed 1
104. mobile and immobile water cesses 53 List of keyword data blocks and their FUNCTION eee eeeeeeecneesessecseceeesessecessecsscsesseesecneeseeseaecseeaeaeeaecaseeeeaesaesetets 64 Summary of special characters for input data files 2 eee eee su esse ceeceseesecseesecesceseceeeseseaeeseseaeesaecaecsaecaeenaeeaes 67 Elements and element valence states included in default database phreegc dat including phreegc notation and default formula for gram formula Weight 00 0 elec ceeeseceeeecesceseceseeseseeeeeseaeeseecsecssecaecsaecnecsseeseeeeees 70 Default uncertainty limits for iSOtOPeS aisect eesse eee o ooet sE ess EENE Er EEKE ERE EEE EAE SE EE eE ei 105 Description of Basic program for calcite kinetics given in example for RATES data block onocoioninnonnocnncc 126 Description of Basic program for pyrite dissolution kinetics given in example for RATES data block 126 Special Basic statements and functions for PHREEOC sessesesseesseesesssteesterrsteetstesrerteertsseetrsrertsreeteresesesserrsrertstt 127 Standard Basic statements and functions issos seriinin soonest an aa an a aan aa aa nan a KaU ae UL a naa Aeneaan 128 Seawater COTIDosSIttOn sssssss iisi assa id anat Th sa Ais as doit AGW tees desa hits 196 Input data set for example leona socias vaksi scetss cs aari kai iske kelks nk KTS i n tested KEE ooi sense aE RENSA deh ETEek 197 Output for example Tiro e a 199 Input data set Lor example
105. mole transfers Line 2 uncertainty list of uncertainty limits uncertainty Identifier that indicates a list of default uncertainty limits for each solution follows on the same line The uncertainty limits defined with uncertainty do not apply to pH default for pH is 0 05 pH units and may be changed with the balances identifier If uncertainty is not entered the program uses 0 05 The default uncertainty limits can be overridden for individual elements or element valence states using balances identifier Optionally uncertainty uncertainties u ncertainty or u ncertainties list of uncertainty limits List of default uncertainty limits that are applied to each solution in the order given by solutions The first uncertainty limit in the list is applied to all the element and element valence states in the first solution listed in solutions The second uncertainty limit in the list is applied to all the element and element valence states in the second solution listed in solutions and so on If fewer uncertainty limits are entered than the number of solutions the final uncer tainty limit in the list is used for the remaining solutions Thus if only one uncertainty limit is entered it is applied to all solutions The uncertainty limit may have two forms 1 if the uncer tainty limit is positive it is interpreted as a fraction to be used to calculate the uncertainty limit for each element or element valence state a value of 0 02 indicates
106. must be a legitimate chemical formula composed of elements defined to the program Line Ic indicates that the stoichiometry given by alternative for mula KA1Si30g potassium feldspar will be added or removed from the aqueous phase until DESCRIPTION OF DATA INPUT 79 gibbsite equilibrium is attained The alternative formula and alternative phase are mutually exclusive fields alternative phase The chemical formula defined for alternative phase is added or removed to attain the target saturation index or log partial pressure By default the mineral defined by phase name dissolves or precipitates to attain the target saturation index If alternative phase is entered phase name does not react the stoichiometry of the alternative phase is added or removed from the aqueous phase to attain the target saturation index Alternative phase must be defined through PHASES input either in the database file or in the present or previous simula tions Line 1d indicates that the phase gypsum will be added to or removed from the aqueous phase until calcite equilibrium is attained The alternative formula and alternative phase are mutually exclusive fields amount Moles of the phase in the phase assemblage or moles of the alternative reaction This number of moles defines the maximum amount of the mineral or gas that can dissolve It may be possible to dissolve the entire amount without reaching the target saturation index in which case the solu
107. nondefective calcite log K 8 48 and dolomite expressed as Cay 5Mgg 5CO3 log K 8 545 note that a phase for dolomite with the given name composition and log K would have to be defined in a PHASES data block because it differs from the standard stoichiometry for dolomite in the databases In the example data block lines 7 through 16 except Line 14 alyotropic point define the same dimensional Guggenheim parameters Internally the program converts any one of these forms of input into dimensional Guggenheim parameters When a batch reaction or transport calculation is performed the temperature of the calculation as defined by mixing of solutions REACTION_TEMPERATURE data block or heat transport in TRANSPORT simulations is used to convert the dimensional Guggenheim parameters to nondimensional Guggenheim parameters which are then used in the calculation The identifiers gugg_nondim activity_coefficients distribution_coefficients miscibility_gap spinodal gap alyotropic_point or margules define parameters for a particular temperature which are converted to dimensional Guggenheim parameters using the default temperature of 25 C or the temperature specified in line 5 or 6 If more than one line 5 and or 6 is defined the last definition will take precedence If alyotropic_point or distribution_coefficients identifiers are used to define excess free energy parameters the dimensional Guggenheim parameter are dependent on 1 the v
108. not present in the calcu lation its concentration will be printed as 0 Line 22 molalities species list molalities Identifier allows definition of a list of species for which concentrations will be written to the selected output file Optionally molalities mol or m olalities species list List of aqueous exchange or surface species for which concentrations will be written to the selected output file The list may continue on subsequent line s Species must have been defined by SOLUTION_SPECIES EXCHANGE_SPECIES or SURFACE_SPECIES input After each calculation the concentration mol kgw of each species in the list will be writ ten to the selected output file If a species is not defined or is not present in the calculation its concentration will be printed as 0 140 User s Guide to PHREEOc Version 2 Line 23 activities species list activities Identifier allows definition of a list of species for which log of activity will be written to the selected output file Optionally activities or a ctivities species list List of aqueous exchange or surface species for which log of activity will be written to the selected output file The list may continue on subsequent line s Species must have been defined by SOLUTION_SPECIES EXCHANGE_SPECIES or SURFACE_SPECIES input After each calculation the log base 10 of the activity of each of the species will be written to the selected output file If a species is not defined
109. of strontianite and aragonite agueous mole fractions of calcium and strontium and the composition of the two solids that exist within the miscibility gap The SELECTED OUTPUT data block defines the selected output file to be ex 0 sel cancels any default printing to the selected output file reset false and reguests that the amount of reaction added at each step as defined in the REACTION data block be written to the selected output file reaction true Tne USER PUNCH data block prints additional columns of information to the selected output file including all of the information needed to make figure 10 Two additional simulations add successively larger amounts of strontium carbonate to the system up to a total addition of 10 moles Table 29 Input data set for example 10 TITLE Example 10 Solid solution of strontianite and aragonite PHASES Strontianite SrC03 C03 2 Sr 2 log_k S927 Aragonite CaCO3 CO3 2 Ca 2 log_k 8 336 END SOLID_SOLUTIONS 1 Ca x Sr 1 x CO3 compl Aragonite 0 comp2 Strontianite 0 Gugg nondim 3 43 1 82 END SOLUTION 1 units mmol kgw pH 5 93 charge Ca 32932 G 7 864 EQUILIBRIUM_PHASES 1 CO2 g 0 01265 10 Aragonite SAVE solution 1 END Total of 0 00001 to 0 005 moles of SrC03 added USE solution 1 USE solid_solution 1 REACTION 1 Srco3 1 0 005 in 500 steps PRINT reset false user print true 236 User s Guide to PHREEOc Version 2
110. of the phases can be removed Three lists are kept during this process each feasible model is kept in one list each infeasible model is kept in another list and each minimal model is kept in a third list Next each combination of P phases is tested for feasible models in the following way If a trial model with O aqueous solutions and P phases is a subset of a model in the infeasible or minimal model list the trial model is skipped because it must be either infeasible or a previously identified minimal model If only minimal models are to be found minimal in INVERSE_MODELING data block the trial model is skipped if it is a superset of a model in the minimal model list Otherwise the inverse problem is formulated for the trial model and solved using the set of aqueous solutions and the P phases in the same way as described above maintaining the three lists during the process Once all sets of P phases have been tested the process continues with sets of P 2 phases and so on until the set containing no phases is tested or until for the given number of phases every trial model is either a subset of a model in the infeasible or minimal model list At this point the entire process is repeated using each possible combination of one or more of the Q aqueous solutions Although the process at first appears extremely computer intensive most sets of phases are rapidly eliminated by subset and superset comparisons with models in the three
111. or False equilibrium_phases True or False exchange True or False gas_phase True or False headings True or False inverse modeling True or False kinetics True or False other True or False saturation indices True or False solid solutions True or False species True or False surface True or False totals True or False User print True or False selected output True or False status True or False RATES RATES name of rate expression start numbered Basic statements end 190 User s Guide to PHREEQC Version 2 REACTION Explicit definition of steps REACTION number description phase name or formula relative stoichiometry list of reaction amounts units Equal increment definition of steps reaction amount units in steps REACTION_TEMPERATURE Explicit definition of steps REACTION_TEMPERATURE number description list of temperatures Equal increment definition of steps temp temp in steps SAVE SAVE keyword number SELECTED_OUTPUT SELECTED_OUTPUT file file name selected_out True or False user_punch True or False high precision True or False reset True or False simulation True or False state True or False solution True or False distance True or False time True or False step True or False pH True or False pe True or False reaction True or False t
112. or gfw options in the SOLUTION or SOLUTION_SPREAD data block If nitrate is reported as mg L as N then gram formula weight should be set to 14 0 or formula should be set to N as is the case in the default databases These variables gram formula weight and formula are only used if the concentration units are in terms of mass if the data are reported in moles then the variables are not used The value of gram formula weight for element is required for primary master species and its value is used to calculate the gram formula weight when a formula is given either in SOLUTION_MASTER_SPECIES SOLUTION or SOLUTION_SPREAD data block Example problems The keyword SOLUTION_MASTER_SPECIES is used in example problems 1 9 and 15 See also the listing of the default database file in Attachment B Related keywords SOLUTION SOLUTION_SPREAD and SOLUTION_SPECIES DESCRIPTION OF DATA INPUT 155 SOLUTION_SPECIES This keyword data block is used to define chemical reaction log K and activity coefficient parameters for each aqueous species Normally this data block is included in the database file and only additions and modifications are included in the input file Example data block Line 0 SOLUTION_SPECIES Line la SO4 2 SO4 2 Line 2a log_k 0 0 Line 5a gamma 90 0 04 Line lb SO4 2 9H 8 HS t 4H20 Line 2b log_k 33 652 Line 3b delta_h 40 14 Line 5b gamma S J 0 0 Line lc H20 OH H Li
113. or simply a fitted parameter for WATEQ Debye Hiickel equation Activity of aqueous species i Activity of exchange species 1 Activity of surface species i Activity of an aqueous master species but excluding a yz Qtr do and a H 0 Activity of a master species including all aqueous exchange and surface master species Activity of solid solution component p Activity of the master species for surface s FY IRT Temperature dependent constant in the activity coefficient equ amp tion Master unknown for the surface potential of surface s ay Number of equivalents of alkalinity per mole of aqueous species i Number of exchange sites of exchanger e occupied by exchange species i Debye Hiickel fitting parameter for aqueous species i Stoichiometry of element m in gas component g Stoichiometry of element m in aqueous species i Stoichiometry of element m in aqueous species i Stoichiometry of element m in exchange species i Stoichiometry of element m in surface species i s Stoichiometry of element m in phase p Stoichiometry of element m in solid solution component p Number of sites of surface type s occupied by surface species i s Surface excess of agueous species i for surface s mol m Activity coefficient of agueous species i kg H O mol Concentration in water mol kgw Concentration in stagnant water mol kgw 288 User s Guide to PHREEQC Version 2 on m g 5 m i s
114. pH 6 200e 00 1 246e 02 6 212e 00 Al 0 000e 00 0 000e 00 0 000e 00 Alkalinity 3 280e 04 5 500e 06 3 335e 04 Cc 4 0 000e 00 0 000e 00 0 000e 00 C 4 7 825e 04 0 000e 00 7 825e 04 Ca 7 800e 05 3 900e 06 7 410e 05 cl 1 400e 05 0 000e 00 1 400e 05 H 0 0 000e 00 0 000e 00 0 000e 00 K 2 800e 05 7 000e 07 2 730e 05 Mg 2 900e 05 0 000e 00 2 900e 05 Na 1 340e 04 0 000e 00 1 340e 04 0 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 1 000e 05 0 000e 00 1 000e 05 si 2 730e 04 0 000e 00 2 730e 04 Solution 2 Input Delta Input Delta pH 6 800e 00 3 407e 03 6 797e 00 Al 0 000e 00 0 000e 00 0 000e 00 Alkalinity 8 951e 04 1 796e 06 8 933e 04 C 4 0 000e 00 0 000e 00 0 000e 00 c 4 1 199e 03 0 000e 00 1 199e 03 Ca 2 600e 04 6 50le 06 2 665e 04 cl 3 000e 05 0 000e 00 3 000e 05 H 0 0 000e 00 0 000e 00 0 000e 00 K 4 000e 05 1 000e 06 4 100e 05 Mg 7 101e 05 8 980e 07 7 011e 05 Na 2 590e 04 0 000e 00 2 590e 04 0 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 2 500e 05 0 000e 00 2 500e 05 si 4 100e 04 0 000e 00 4 100e 04 Solution fractions Minimum Maximum Solution 1 1 000e 00 1 000e 00 1 000e 00 Solution 2 1 000e 00 1 000e 00 1 000e 00 Phase mole transfers Minimum Maximum Halite 1 600e 05 1 490e 05 1 710e 05 NaCl Gypsum 1 500e 05 1 413e 05 1 588e 05 Cas04 2H20 Kaolinite 1 282e
115. pair of samples was selected because it was modeled in detail in Plummer and others 1990 to determine the sensitivity of mole balance results to various model assumptions and because it was used as an example in the NETPATH manual Plummer and others 1994 Example 6 Results of PHREEQC calculations are compared to NETPATH calculations This example is also discussed in Parkhurst 1997 Water Compositions and Reactants The initial water for mole balance modeling solution 1 table 52 is the water identified as the recharge water for flow path 3 Plummer and others 1990 This calcium magnesium bicarbonate water is typical of recharge water in a terrain containing calcite and dolomite The final water solution 2 table 52 is a sodium calcium sulfate water with significant chloride concentration Plummer and others 1990 Mysse Flowing Well This water has a charge imbalance of 3 24 meq kgw The final water also contains measurable sulfide An uncertainty limit of 5 percent was assigned to all chemical data except iron for the initial water and final water The 5 percent uncertainty limit was chosen for the initial water because of spatial uncertainty in the location of a recharge water 278 User s Guide to PHREEQC Version 2 Table 52 Analytical data for solutions used in example 18 Charge balance is milliequivalents per kilogram of water All other data are in millimoles per kilogram of water except pH 5 Be 45 and 4c Fe 2
116. per mole of the reactant kinetic_clay equilibrium_phase or kinetic_reactant If equilibrium_phase is used the name on the line is a phase defined in an EQUILIBRIUM_PHASES data block If kinetic_reactant is used the name on the line is the rate name for a kinetic reactant defined in a KINETICS data block Optionally e or k only the first letter is checked Default is equilibrium_phase exchange_per_mole Number of moles of the exchange species per mole of phase or kinetic reactant unitless mol mol Notes 1 Line 1 may be repeated to define the entire composition of each exchanger This example data block defines the amount and composition of three exchangers X Y and Z Line 2 should be entered only once for each type of exchange site The total number of exchange sites of X is 1 5 mol and the total concentrations of calcium magnesium and sodium on exchanger X are 0 3 0 2 and 0 5 mol respectively When the composition of the exchanger is defined explicitly such as in this example data block the exchanger will almost certainly not be in equilibrium with any of the solutions that have been defined Any batch reaction that includes an explicitly defined exchanger will produce a reaction that causes change in solution and exchange composition Exchanger Y is related to the amount of Ca Montmorillonite in EQUILIBRIUM_PHASES 10 where 10 is the same number as the exchange assemblage number If m represents the moles of Ca Montmorillon
117. phase L ay Mass of water in the aqueous phase excluding any water in diffuse layer of surfaces kg W puy Total mass of water in the system includes aqueous phase and water in the diffuse layer of surfaces kg W Mass of water in the diffuse layer of surface s kg x Distance m Z j Charge imbalance in solution q in inverse modeling eq Zi Charge on aqueous species i Zi Charge on exchange species i Normally equal to zero Zi Charge on surface species i z Charge on aqueous master species minus alkalinity assigned to the master species Attachment B Description of Database Files and Listing Three database files are distributed with the program phreeqc dat wateq4f dat and minteq dat Each of these database files contains SOLUTION_MASTER_SPECIES SOLUTION_SPECIES PHASES SURFACE_MASTER_SPECIES and SURFACE_SPECIES data blocks Phreeqc dat and wateq4f dat also have EXCHANGE_MASTER_SPECIES EXCHANGE_SPECIES and RATES data blocks The file named phreegc dat contains the thermodynamic data for aqueous species and gas and mineral phases that are essentially the same as those found in the latest release of the program PHREEQE Parkhurst and others 1980 Only minor modifications have been made to make the data consistent with the tabulations in Nordstrom and others 1990 and WATEQ4F Ball and Nordstrom 1991 The database file contains data for the following elements aluminum barium boron bromide cadmium calcium carbon chloride co
118. pressure gas phase eile cecesecesceseeeeeeeeeeeceseeeseeseeesecsaecaecaeeaeesaeesees 91 Explanation i M ET seks vonseapeesyseducsse skutta datasta 91 Notes 1 92 Example data block 2 Fixed volume gas phase Define initial moles of components with partial presidio SS A GS Beet in eee aie 92 Explanation Znote ia abies Sa 93 Notes Dumont maataistelukone iii 93 Example data block 3 Fixed volume gas phase Define initial moles of components by eguilibrium NA conssciachesces iad ssbssseaieasbasvoavevsnss AE 94 Explanation 3 scsi ithe ea At 94 Notes iris A A 95 Example problems inicia gd a feste eae ig Mansteinin ent 95 Related Keywords suosista sans coved vesovsvnsubes ipe eseve deepen kassa pakarat sznvt SPEKIN OSESE KE ETEEN ENE EROE ESSE ecards 95 INCREMENTAL REACTIONS sennen aa aeea E E E A EEE E E ae EEE ES 96 Example data block ccoo Motives Ais iei Ashes Kas aa Eee ates dicas E is RE Sey 96 Explanation E E E E EEE ss 96 Notes inci a eeu Reet 96 Example problems ansiada ad 97 Related Key Words is scsssdssuesssicessassscestvehsteapsotpuesabasededsstsctetiavsassesiegavascvaavesobsssouscapeasyoetoaises sodladveasseaingas 97 INVERSE MODELING r aene sir A 98 Example data block s ssssicsesssasseuecsses elena E E a EE E aere E EEEE PE ES 98 EXPIDA E SESE 98 O NN 103 VI Related Key words seii eaa leneeeelescdenbsncdnebosacscubeadvinghoneds boned vas ands E EE E EEEE ESE 105 KINE TICS ua int 106 Example data block Vii BI eG are A
119. program the default value is false If this option is set to true a large amount of information about the New ton Raphson eguations is printed The program will print some or all of the following at each iter ation the array that is solved the solution vector calculated by the solver the residuals of the linear eguations and ineguality constraints the values of all of the master unknowns and their change the moles of each pure phase and phase mole transfers the moles of each element in the system minus the amount in pure phases and the change in this guantity The printout is very long and very tedious If the numerical method does not converge in iterations 1 iterations default is after 99 iterations this printout is automatically begun and sent to the log file phreegc log Line 10 debug_prep True or False debug_prep Includes debugging prints for subroutine prep Optionally debug_prep or debug_p rep True or False A value of true optionally t rue indicates the debugging information will be included in the output file false optionally f alse indicates debugging information will not be printed If neither true nor false is entered a value of true is assumed At the start of the program the default value is false If this option is set to true the chemical equation and log K for each species and phase as rewritten for the current calculation are written to the output file The print out is long and tedious Line 1
120. reaction calculations PHREEQC is oriented toward system equilibrium rather than just aqueous equilibrium For a purely equilibrium calculation all of the moles of each element in the system are distributed among the aqueous phase pure phases solid solutions gas phase exchange sites and surface sites to attain system equilibrium Non equilibrium reactions can also be modeled including aqueous phase mixing user specified changes in the elemental totals of the system kinetically controlled solid liquid heterogeneous reactions and to a limited extent kinetically controlled aqueous homogeneous reactions Mole balances on hydrogen and oxygen allow the calculation of pe and the mass of water in the aqueous phase which allows water producing or consuming reactions to be modeled correctly The generalized two layer model of Dzombak and Morel 1990 a model with an explicitly calculated diffuse layer Borkovec and Westall 1983 and a non electrostatic model Davis and Kent 1990 have been incorporated for modeling surface complexation reactions Surface complexation constants for two of the databases distributed with the program phreegc dat and wateq4f dat are taken from Dzombak and Morel 1990 surface complexation constants for the other database distributed with the program minteq dat are taken from MINTEQA2 Allison and others 1990 Ion exchange reactions are modeled with the Gaines Thomas convention and equilibrium constants derived from App
121. reactions so the master species is a physically real species and appears in mole balance equations and surface species may be anionic cationic or neutral The basic theory for surface complexation reactions including electrostatic potentials is presented in Dzombak and Morel 1990 The theory assumes that the number of active sites T eg the specific area A m g and the mass S g of the surface are known The two additional master unknowns are 1 the quantity FY 2RT FY Inay Infe E where F is the Faraday constant 96493 5 J v eg W is the potential at sur faces volts R is the gas constant 8 3147 J mol K and T is temperature Kelvin and 2 the natural log of the activity of the master surface species Note that the quantity Inay is defined with a 2 in the denominator of the term on the right hand side This is a different master unknown than that used in Dzombak and Morel 1990 but produces the same results as their model because all eguations are written to be consistent with this master unknown The activity of a surface species is assumed to be egual to the mole fraction of a given surface site type that is occupied In other words a surface species is in the standard state has activity of 1 when it completely covers a given kind of surface site This convention differs from Dzombak and Morel 1990 who assumed that activity of a surface species conceptually in the solid phase is numerically egual
122. removal of elements from solution termed net stoichiometric reaction variation in temperature equilibration with assemblages of pure phases exchangers surfaces and or solid solutions and equilibration with a gas phase at a fixed total pressure or fixed volume 6 advective reactive transport or 7 advective dispersive reactive transport through a series of cells in combination with any of the available chemical processes The combination of capabilities allows the modeling of very complex geochemical reactions and transport processes during one or more simulations In addition to speciation batch reaction and transport calculations the code may be used for inverse modeling by which net chemical reactions are deduced that account for differences between an initial water composition or a mixture of initial water compositions and a final water composition Conventions for Data Input PHREEQC was designed to eliminate some of the input errors due to complicated data formatting Data for the program are free format spaces or tabs may be used to delimit input fields except SOLUTION_SPREAD which is delimited only with tabs blank lines are ignored Keyword data blocks within a simulation may be entered in any order However data elements entered on a single line are order specific As much as possible the program is case insensitive However chemical formulas are case sensitive The following conventions are used for data input t
123. selectively suspend and resume writing results to the selected output file In transport 142 User s Guide to PHREEQC Version 2 simulations the frequency at which results are written to the selected output file can be controlled by the punch_cells and punch_frequency identifiers in ADVECTION and TRANSPORT data blocks Several data items are included by default at the beginning of each line in the selected output file to identify the type of calculation that has been performed These data are described in lines 14 through 21 Data described in lines 22 through 28 may also be included in the output file All of the data described by lines 14 through 28 may be simultaneously included or excluded from the selected output file with the reset identifier Unlike most of PHREEQC input the order in which the identifiers are entered is important when using the reset identifier Any identifier set before the reset in the data block will be reset when reset is encountered Thus reset should be specified before any of the identifiers described in lines 14 through 28 The first line of the selected output file contains a description of each data column The columns of data are written in the following order items described by lines 14 through 28 totals molalities log activities pure phases two columns for each phase total amount of phase and mole transfer for current calculation saturation indices gas phase data multiple columns kinetically con
124. sites can be related to the moles of a phase that are present in an EQUILIBRIUM_PHASES phase assemblage see EXCHANGE As the moles of the phase increase or decrease the number of exchange sites will increase or decrease Likewise the number of surface sites can be related to the moles of a phase that are present in an EQUILIBRIUM_PHASES phase assemblage see SURFACE For batch reactions after a pure phase assemblage has reacted with the solution it is possible to save the resulting assemblage composition that is the identity target saturation index and moles of each phase with the SAVE keyword If the new composition is not saved the assemblage composition will remain the same as it was before the batch reaction After it has been defined or saved the assemblage may be used in subsequent simulations 80 User s Guide to PHREEQC Version 2 by the USE keyword TRANSPORT and ADVECTION calculations automatically update the pure phase assemblage and SAVE has no effect during these calculations Example problems The keyword EOUILIBRIUM PHASES is used in example problems 2 3 5 6 7 8 9 10 and 14 Related keywords ADVECTION EXCHANGE PHASES SAVE equilibrium_phases SURFACE TRANSPORT and USE equilibrium_phases DESCRIPTION OF DATA INPUT 81 EXCHANGE This keyword data block is used to define the amount and composition of an assemblage of exchangers The initial composition of the exchange assemblage can be defined in tw
125. solid solutions may have two or more components The additional master unknowns for solid solutions are the moles of each component in each solid solution n J where ss refers to solid solution ss Terms representing the changes in the moles of each component occur in the Jacobian matrix of the mole balance eguations for elements Unlike pure phases the activity of a component in a solid solution is not identically 1 0 The activity of a component is defined tobe a A x where x Doe is the mole fraction of component p in the solid solution Ps ss Pss Pss ss and N _ is the activity coefficient The mole fraction of a component in a solid solution is defined as x Pss where N is the number of components in solid solution ss For ideal solid solutions the Pss N En activity coefficient is 1 0 for nonideal binary solid solutions the activity coefficients for the components are defined with the Guggenheim expressions Ay exp ay a 4x 1 x13 and 39 hy exp ay aj 4x 1 x 40 where A and A are the activity coefficients of components 1 and 2 and a and a are nondimensional Guggenheim parameters The nondimensional parameters are calculated from dimensional parameters for the 20 User s Guide to PHREEQC Version 2 g a and a T The parameters ag and a for the excess free energy may be defined directly or by a variety of means including the mole fractions of compo excess free energy g and
126. species and pure phases Three database files are provided with the program 1 a database file derived from PHREEQE Parkhurst and others 1980 2 a database file derived from WATEQ4F Ball and Nordstrom 1991 and 3 a database file derived from MINTEQA2 Allison and others 1990 These files are described in more detail in Attachment B and the PHREEQE derived database file phreeqc dat is listed The elements and element valence states that are included in phreegc dat are listed in table 4 along with the PHREEQC notation and the default formula used to convert mass concentration units to mole concentration units The input data file is used 1 to define the types of calculations that are to be done and 2 if necessary to modify the data read from the database file If new elements and aqueous species exchange species surface species or phases need to be included in addition to those defined in the database file or if the stoichiometry log K or activity coefficient information from the database file needs to be modified for a given run then the keywords mentioned in the previous paragraph can be included in the input file The data read for these keyword data blocks in the input file will augment or supersede the data read from the database file In many cases the thermodynamic model defined in the database will not be modified and the above keywords will not be used in the input data file Speciation Calculations Speciation modeli
127. step algorithm of the numerical integration method Total molality of element or element redox state TOT water is total mass of water kg Cumulative time s including all advective for which time_step is defined and advective dispersive transport simulations from the beginning of the run or from last initial_time identifier applicable only for dissolution in the presence of oxygen and will be incorrect near equilibrium when oxygen is depleted Explanations of the Basic lines for this rate expression are given in table 7 Some special statements and functions have been added to the Basic interpreter to allow access to quantities that may be needed in rate expressions These functions are listed table 8 and the Basic statements that are implemented in the interpreter are listed in table 9 Upper or lower case case insensitive may be used for statement function and variable names String variable names must end with the character The PRINT command in Basic programs is useful for debugging rate expressions It can be used to write quantities to the output file to check that rates are calculated correctly However the PRINT command will write to the output file every time a rate is evaluated which may be many times per time step The sequence of information from PRINT statements in RATES definitions may be difficult to interpret because of the automatic time step adjustment of the integration method Table 9
128. term for the isotopic ratio of the element in the phase Expanding equation 138 and neglecting the products of 6 s gives the following approximation M i 0 DIOS T nAg tE R i Ad ghee T Uy 5 i yl a oe p amp p Ce pp pi D 139 qm 7 Commonly 6 E will be small relative to the concentration of the valence state or 6 for the isotopic ratio will be small relative to the isotopic ratio itself In either case the products of 6 s that are neglected will be small rela tive to the other terms and equation 139 will be a good approximation The approximation in equation 139 will be poor only if the concentration of the valence state and the isotopic ratio have large calculated 6 s In this case the overall effect is that the true values of the uncertainty terms will be larger than specified uncertainty limits The neglected terms can be made smaller by decreasing the uncertainty limits on either the valence state concentrations or the isotopic ratios for each aqueous solution Relation Among pH Alkalinity and Total Dissolved Inorganic Carbon Uncertainty Terms One additional equation is added for each aqueous solution to relate the uncertainty terms in pH alkalinity and total dissolved inorganic carbon Unlike all other mole balance quantities which are assumed to vary independently alkalinity pH and inorganic carbon are not independent The following equation is used to relate the uncertainty terms for each of these quan
129. the SAVE keyword Advective Transport Calculations Advective transport calculations are used to simulate advection and chemical reactions as water moves through a one dimensional column ADVECTION data block The column is divided into a number of cells n which is defined by the user The cells are numbered 1 through n and these cells initially contain solutions with identifying numbers 1 through n A solution composition for each of these integers must have been defined by SOLUTION data blocks or the SAVE keyword The cells may also contain other reversible or irreversible reactants For a given cell number i if a phase assemblage exchange assemblage solid solution assemblage surface assemblage gas phase mixture reaction or reaction temperature data block with identifying number i has been defined then it is present in cell i during the advective transport calculation Thus the initial conditions and the set of reactants can be defined individually for each cell which provides flexibility to simulate a variety of chemical conditions throughout the column see examples 11 and 14 in Examples The infilling solution for the column is always solution number 0 Advection is modeled by shifting solution 0 to cell 1 the solution in cell 1 to cell 2 and so on At each shift kinetic reactions are integrated in each cell while maintaining equilibrium with any gas phase or solid phase assemblages that are present in each cell To facil
130. the additional processes of diffusion dispersion and diffusion into stagnant zones The transport capabilities of the ADVECTION keyword in PHREEQC version 2 are equivalent to the capabilities of the TRANSPORT keyword in PHREEQC version 1 In the example data block given in this section a column of five cells cells is modeled and 5 pore volumes of filling solution are moved through the column shifts cells is 5 Unless kinetic reactions are modeled no explicit definition of time is required only the number of shifts Also no distance is explicitly specified for advection calculations only the number of cells The time_step identifier is required if kinetic reactions KINETICS data block are defined for at least one cell in the column If kinetic reactions are defined then an integration is performed for each cell that has kinetic reactions for each advective shift Kinetic reactions significantly increase the run time of a simulation because the integration of the rates of reaction imposes 1 to 6 or possibly more additional batch reaction calculations for each cell that has kinetic reactions for each advective shift The total time modeled in the example data block simulation is 25 000 seconds time_step X shifts By default the composition of the solution pure phase assemblage exchange assemblage gas phase solid solution assemblage surface assemblage and kinetic reactants are printed for each cell for each shift Use of print_c
131. the data block Individual print options may follow Default is true Optionally reset or r eset True or False True causes all data blocks on lines 2 through 15 to be printed to the output file false causes all these data blocks to be excluded from the output file Optionally t rue or f alse case independent Line 2 eh True or False eh Prints eh values derived from redox couples in initial solution calculations if value is true excludes print if value is false Default is true Optionally eh Line 3 eguilibrium phases True or False eguilibrium phases Prints composition of the pure phase assemblage if value is true excludes print if value is false Default is true Optionally eguilibria eguilibrium pure eg uilibrium phases eq uilibria plure phases or p ure Note the hyphen is required 120 User s Guide to PHREEOc Version 2 to avoid a conflict with the keyword EQUILIBRIUM_PHASES the same is true for the syn onym PURE_PHASES Line 4 exchange True or False exchange Prints composition of the exchange assemblage if value is true excludes print if value is false Default is true Optionally ex change Note the hyphen is required to avoid a conflict with the keyword EXCHANGE Line 5 gas_phase True or False gas_phase Prints composition of the gas phase if value is true excludes print if value is false Default is true Optionally g as_phase Note the hyphen is required to avoid a
132. the list is used for the remain ing solutions Thus if only one uncertainty limit is entered it is used for the given element or element valence state for all solutions The uncertainty limit for pH must be given in standard units Thus the uncertainty limit in pH given on line 6a is 0 1 pH units for all solutions The uncertainty limits for elements and element valence states but not for pH may have two forms 1 if the uncertainty limit is positive it is interpreted as a fraction that when multiplied times the moles in solution gives the uncertainty limit in moles A value of 0 02 would indicate an uncertainty limit of 2 percent of the moles in solution and 2 if the uncertainty limit is negative 100 User s Guide to PHREEOc Version 2 it is interpreted as an absolute value in moles to use for the solution in the mole balance equation for element or valence state name In the example data block line 6b the uncertainty limit for calcium in solution 10 is 1 percent of the moles of calcium in solution 10 The uncertainty limit for calcium in solution 3 and 5 is 0 005 moles The uncertainty limit for iron line 6d is 5 percent in solution 10 10 percent in solution 3 and 20 percent in solution 5 Line 7 isotopes isotopes Identifier that specifies mole balance for the isotopes listed on succeeding lines will be included in the calculation Optionally isotopes or i sotopes Line 8 isotope_name list of uncertainty limits is
133. the same sign of charge as the surface See notes following the example The identifier only_counter_ions only applies when the diffuse_layer identifier is used and applies to all surfaces in the surface assemblage Optionally only_counter_ions or o nly_counter_ions Notes 1 The default databases contain thermodynamic data for a surface named Hfo Hydrous ferric oxide that are derived from Dzombak and Morel 1990 Two sites are defined in the databases a strong binding site Hfo_s and a weak binding site Hfo_w Note that Dzombak and Morel 1990 used 0 2 mol weak sites and 0 005 mol strong sites per mol Fe a surface area of 5 33e4 m mol Fe and a gram formula weight of 89 g Hfo mol Fe to be consistent with their model the relative number of strong and weak sites should remain constant as the total number of sites varies The order of lines 1 2 3 4 and 5 is not important Lines 1 and optionally 4 5 or 6 should occur only once within the keyword data block Lines 2 and 3 may be repeated to define the amounts of all binding sites for all surfaces Lines la 1b and 1c require the program to make three calculations to determine the composition of each of the surface assemblages termed initial surface composition calculations Before any batch reaction or transport calculations three initial surface composition calculations will be performed to determine the composition of the surface assemblages that would exist in equil
134. the start of the Basic program Optional Basic numbered Basic statement numbered Basic statement A valid Basic language statement that must be numbered The program should contain at least one PRINT statement The statements are evaluated in numerical order Statements and functions that are available through the Basic interpreter are listed in tables 8 and 9 Line 2 end end Indicates the end of the Basic program Optional Note the hyphen is reguired to avoid a conflict with the keyword END Notes USER PRINT allows the user to write Basic programs to make calculations and print selected results as the program is running Results of PRINT Basic statements are written directly to the output file after each calculation More information on the Basic interpreteris available in the description of the RATES keyword All of the functions defined in tables 8 and 9 are available in USER PRINT Basic programs Writing results of USER PRINT can be enabled or suspended with the user print identifier in the PRINT data block The USER PUNCH data block is similar to USER PRINT except PUNCH Basic statements are used to write results to the selected output file Example problems The keyword USER PRINT is used in example problem 6 10 and 12 DESCRIPTION OF DATA INPUT 183 Related keywords PRINT RATES SELECTED_OUTPUT and USER_PUNCH 184 User s Guide to PHREEQC Version 2 USER_PUNCH This keyword data block is used to define Basic progra
135. the surfaces in the cell The evolution of water chemistry in the cell represents the evolution of the water chemistry at a point near the top of the saturated zone of the aquifer Initial Conditions Parkhurst and others 1996 provide data from which it is possible to estimate the moles of calcite dolomite and cation exchange sites in the aquifer per liter of water The weight percent ranges from 0 to 2 percent for calcite and 0 to 7 percent for dolomite with dolomite much more abundant Porosity is stated to be 0 22 Cation exchange capacity for the clay ranges from 20 to 50 meq 100 g with average clay content of 30 percent For these example calculations calcite was assumed to be present at 0 1 weight percent and dolomite at 3 weight percent which by assuming a rock density of 2 7 kg L corresponds to 0 1 mol L for calcite and 1 6 mol L for dolomite The number of cation exchange sites was estimated to be 1 0 eq L The amount of arsenic on the surface was estimated from sequential extraction data on core samples Mosier and others 1991 Arsenic concentrations in the solid phases generally ranged from 10 to 20 ppm which corresponds to 1 3 to 2 6 mmol L arsenic The number of surface sites were estimated from the amount of extractable iron in sediments which ranged from 1 6 to 4 4 percent Mosier and others 1991 A content of 2 percent iron for the sediments corresponds to 3 4 mol L of iron However most of the iron is in goethite and hema
136. tion will have a smaller saturation index for this phase than the target saturation index If amount is equal to zero then the phase can not dissolve but will precipitate if the solution becomes supersaturated with the phase Default is 10 0 moles Notes If just one number is included on line 1 it is assumed to be the target saturation index or log partial pressure and the amount of the phase defaults to 10 0 mol If two numbers are included on the line the first is the target saturation index and the second is the amount of the phase present Line 1 may be repeated to define all pure phases that are assumed to react reversibly It is possible to include a pure phase that has an amount of zero line 1a In this case chalcedony can not dissolve but can precipitate if the solution is supersaturated with chalcedony either by initial conditions or through dissolution of pure phases or other specified reactions mixing stoichiometric or kinetic reactions It is possible to maintain constant pH conditions by specification of an alternative formula and a special phase PHASES input Line le would maintain a pH of 5 0 by adding HCl provided a phase named pH_Fix were defined with reaction H H and log K 0 0 see example 8 in Examples Note If the acid HCI is specified and in fact a base is needed to attain pH 5 0 it is possible the program will fail to find a solution to the algebraic equations The number of exchange
137. to molarity concentration in solution If only monodentate complexes are considered as is done by Dzombak and Morel 1990 terms cancel in the mass action eguation and identical numerical results are obtained irrespective of the convention for standard state However a notable difference in surface site concentration exists when the molarity convention is used for multidentate complexes bidentate tridentate and others cf Appelo and Postma 1999 If a vessel contains a solution in eguilibrium with a surface containing multidentate species and more of exactly the same solution is added the composition of solution and surface would change with the molarity convention The molarity convention is clearly not correct in this case Hfo Hydrous ferric oxide is used in the default database files with w which indicates a low affinity gt or weak site and s which indicates a high affinity or strong site Hfo_wOH is used to represent a neutral surface species at a weak site and the association reaction for the formation of a negatively charged weak site it 1s an association reaction in the sense that the defined species is on the right hand side of the equation can be written as Hfo_wOH gt Hfo wO H 13 The mass action expression which includes the electrostatic potential term is a a int _ Hfo wO H RT a ase 14 jo w A Hfo wOH FY int Van amari ree RT where K ee A is the intrinsic equilibrium c
138. unit for element see line 7g If units are not specified the default units units value if line 5 is present or mmol kgw if line 5 is absent are assumed as formula Indicates a chemical formula formula will be given from which a gram formula weight will be calculated A gram formula weight is needed only when the input concentration is in mass units The calculated gram formula weight is used to convert mass units into mole units for this element and this solution it is not stored for further use If a gram formula weight is not specified the default is the gram formula weight defined in SOLUTION_MASTER_SPECIES For alka linity the formula should give the gram equivalent weight For alkalinity reported as calcium car bonate the formula for the gram equivalent weight is Cag s CO3 9 5 this is the default in the phreeqc dat and wateq4f dat database files distributed with this program gfw gfw Indicates a gram formula weight gfw will be entered A gram formula weight is needed only when the input concentration is in mass units The specified gram formula weight is used to con vert mass units into mole units only for this element and this solution it is not stored for further use If a gram formula weight is not specified the default is the gram formula weight defined in SOLUTION_MASTER_SPECIES For alkalinity the gram equivalent weight should be entered For alkalinity reported as calcium carbonate the gram equivalent weight is approxi m
139. unknowns have been calculated the master unknowns are updated new molalities and activities of all the aqueous exchange and surface species are calculated and residuals for all of the functions are calculated The residuals are tested for convergence convergence criteria are defined internally in the program but can be switched to an alternate set with the convergence_tolerance in KNOBS or high_precision option in SELECTED_OUTPUT data blocks and a new iteration is begun if convergence has not been attained Aqueous Speciation Calculations Aqueous speciation calculations use a chemical composition for a solution as input and calculate the distribution of aqueous species and saturation indices for phases Aqueous speciation calculations include the equations f ae f H 0 and f po which are equations for mole balance for elements or element valence states activity of water and ionic strength Mole balance equations for hydrogen and oxygen are not included because the total masses of hydrogen and oxygen generally are not known Instead the mass of water is assumed to be 1 0 kg or is specified water in the SOLUTION or SOLUTION SPREAD data block and the total masses of 34 User s Guide to PHREEQC Version 2 hydrogen and oxygen are calculated in the speciation calculation from the mass of water and the concentrations of all hydrogen and oxygen containing aqueous species If pH pe or the master unknown for an element or element valence
140. v and D are is the change in con equal for all solute species so that C can be the total dissolved concentration for an element including all redox species dC My sn Lox Figure 1 Terms in the advection reaction dispersion equation 44 User s Guide to PHREEQC Version 2 The transport part of equation 107 is solved with an explicit finite difference scheme that is forward in time central in space for dispersion and upwind for advective transport The chemical interaction term dq dt for each element is calculated separately from the transport part for each time step and is the sum of all equilibrium and non equilibrium reaction rates The numerical approach follows the basic components of the ARD equation in a split operator scheme Press and others 1992 Yanenko 1971 With each time step first advective transport is calculated then all equilibrium and kinetically controlled chemical reactions thereafter dispersive transport which is followed again by calculation of all equilibrium and kinetically controlled chemical reactions The scheme differs from the majority of other hydrogeochemical transport models Yeh and Tripathi 1989 in that kinetic and equilibrium chemical reactions are calculated both after the advection step and after the dispersion step This reduces numerical dispersion and the need to iterate between chemistry and transport A major advantage of the split operator scheme is that numerical accuracy and st
141. water itself a y m and n mW q Equilibrium among aqueous species in an ion association model requires that all mass action equations for aqueous species are satisfied For example the association reaction for the aqueous 10 User s Guide to PHREEQC Version 2 species CaSO is Ga soi CaSO The log K for this reaction at 25 C is 2 3 which results in the mass action equation 2 3 caso 10 aa 1 ad 74a 2 Ca SO In general mass action equations can be written as Maq e Cm i K al a 2 m where K is a temperature dependent equilibrium constant c is the stoichiometric coefficient of master species m in species i and M is the total number of aqueous master species The values of c may be positive or negative For PHREEOC terms on the right hand side of an association reaction are assigned negative coefficients and terms on the left hand side are assigned positive coefficients The same formalism applies to master species where the mass action eguation is simply 1 a m The total moles of an agueous species i can be derived from the mass action expression Mo Cm i Mo AE ni M Wag KiWaq i 3 1 The Newton Raphson method uses the total derivative of moles with respect to the master unknowns The total derivative is Mo 1 1 1 4 dn nj din W en din a Ju n y du 4 m Activity coefficients of aqueous species are defined with the Davies equation logy
142. with this name must be defined by PHASES input in the database or input file partial pressure Initial partial pressure of this component in the gas phase in atmospheres The partial pressure along with volume and temp are used to calculate the initial moles of this gas component in the fixed volume gas phase Notes 2 Line 4 may be repeated as necessary to define all of the components initially present in the fixed volume gas phase as well as any components which may subseguently enter the gas phase The initial moles of any gas component that is defined to have a positive partial pressure will be computed using the ideal gas law n PV RT where n is the moles of the gas P is the defined partial pressure line 4 V is given by volume and T is given by temperature converted to Kelvin When the initial moles of gas components are brought in contact with a solution during a batch reaction simulation the total pressure the partial pressures of the gas components in the gas phase and the partial pressures of the gas components in the agueous phase will adjust so that eguilibrium is established for each component A constant volume gas phase always exists unless all of the gas components are absent from the system The identifier pressure is not used for a fixed volume gas phase DESCRIPTION OF DATA INPUT 93 Some gas components may be defined to have initial partial pressures of zero In this case no moles of that component will
143. zone for cell number 1 is cell number 22 and the other four stagnant layers are cell numbers 42 62 82 and 102 with number 102 being the innermost cell of the sphere which is connected only to EXAMPLES 251 one other cell cell 82 The volume of the mobile cell cell 1 is expressed relative to the volume of a sphere of radius 0 01 m by multiplying this volume with 0 0 4 19e 6 0 3 0 1 1 26e 5 In table 35 the value for fpc is 1 72 as calculated from equation 127 It may be noted that using fpe 1 81 slightly improves the fit to an analytical solution given in Crank 1975 for diffusion into spheres in a closed vessel a beaker with solution and clay beads However changing f to 1 81 has little effect on the concentration profiles for the column which are shown in figure 13 Table 36 Input data set for example 13C Stagnant zone with diffusion calculated by finite differences partial listing TITLE Example 13C 1 mmol l NaC1 NO3 enters column with stagnant zones 5 layer stagnant zone with finite differences SOLUTION 0 1 mmol l NaCl units mmol 1 pH EQ pe 135 0 02 g 0 7 Na 1 0 Na has Retardation Cl 1 0 Cl has Retardation 1 stagnant exchange N 5 1 0 NO3 is conservative charge imbalance is no problem END SOLUTION 1 121 Column with KNO3 units mmol l pH 7 0 pe 13 0 02 g 0 7 K 1 0 N 5 1 0 EXCHANGE 1 121 eguil 1 X 1 e 3 EXCHANGE_SPECIES For linear exchange
144. 0 Basic 120 rem le 3 converts mmol to mol Basic 130 rate area le 3 rf 1 10 2 3 si_cc Basic 140 moles rate TIME Basic 200 SAVE moles Line 3a end Line 1b Pyrite Line 2b start Basic 1 rem PARM 1 log10 A V 1 dm Basic 2 rem PARM 2 exp for M MO Basic 3 rem PARM 3 exp for 02 Basic 4 rem PARM 4 exp for H Basic 10 if M lt 0 then goto 200 Basic 20 if SI Pyrite gt 0 then goto 200 Basic 30 lograte 10 19 PARM 1 PARM 2 LOG10 M MO Basic 40 lograte lograte PARM 3 LM 02 PARM 4 LM H Basic 50 moles 10 lograte TIME Basic 60 if moles gt M then moles M Basic 200 SAVE moles Line 3b end Explanation Line 0 RATES RATES is the keyword for the data block No other data are input on the keyword line 124 User s Guide to PHREEQC Version 2 Line 1 name of rate expression name of rate expression Alphanumeric character string that identifies the rate expression no spaces are allowed Line 2 start start Identifier marks the beginning of a Basic program by which the moles of reaction for a time sub interval are calculated Optional Basic numbered Basic statement numbered Basic statement A valid Basic language statement that must be numbered The statements are evaluated in numerical order The sequence of statements must extrapolate the rate of reaction over the time subinterval given by the inter
145. 0 shifts 5 flow d forward timest 3600 bcon flux flux diffc 0 0 length 0 1 disp 0 015 stag 1 PRINT reset false END SOLUTION 0 Original units mmol l pH 7 0 pe 13 0 02 g K 1 0 Column with KNO3 solution reenters 250 User s Guide to PHREEQC Version 2 make KX exch o PP N a 23 2155 Dey ZO Sy 33 35 Se 39 41 coeff Dis N equal to Nax 93038 93038 93038 93038 293038 93038 93038 93038 293038 93038 20886 20886 20886 20886 20886 20886 20886 20886 20886 20886 23 25 21 29 31 33 35 37 39 41 23 25 Za 29 31 33 35 37 39 41 06962 06962 06962 06962 06962 06962 06962 06962 06962 06962 79114 79114 79114 79114 79114 79114 79114 79114 79114 79114 N 5 1 0 TRANSPORT shifts 10 punch freguency 10 punch cells 1 20 SELECTED OUTPUT file ex13b sel reset false distance true solution USER PUNCH head C1 mmol Na mmol 10 PUNCH TOT C1 1000 TOT Na 1000 END Stagnant Zone Calculation Using a Finite Difference Approximation The stagnant zone consists of spheres with radius r 0 01 m Diffusion into the spheres induces radially symmetric concentration changes according to the differential eguation 2 oc _ ac 2ac a 7 ofr 3 ai The calculation in finite differences can therefore be simplified to o
146. 0 125e 0 604e 0 979e 841e 0 591e 0 118e 0 425e 1 093e 1 557e 1 28le 1 509e 1 372e 2 417e 2 462e 2 228e 2 122e 2 000e 0 042e 0 627e 0 137e 0 742e 0 330e 0 195e 0 913e 0 084e 0 171e 0 582e 1 696e 1 021e 1 439e 1 077e 1 434e 1 789e 1 375e 2 993e 2 609e 0 326e 0 157e 0 847e 0 375e 2 791e 0 053e 0 667e 0 118e 0 117e 0 Molality 6 9 1 3 4 4 5 5 5 5 5 5 8 9 0 1 2 0 0 3 3 5 5 8 1 1 COWOFFO 9 0 0 0 0 1 7 8 9 9 4 8 9 9 9 0 0 4 6 9 0 2 4 9 2 3 4 5 5 9 0 0 0 1 1 t 2 0 6 6 8 8 6 0 1 3 4 5 7 oor H N 08 WW HHHLW JW OH H H PUBN HEHALO BHAWWEN NOPNE WEA O YENEPANANANE BW 0 HH H EN WOO B PHNDHE N W 18 W OH BW Activit 629e 0 026e 0 806e 0 023e 0 640e 0 948e 0 041e 0 020e 0 106e 0 959e 0 183e 0 413e 0 184e 1 653e 1 150e 1 541e 1 678e 1 28le 2 222e 2 380e 0 266e 0 106e 0 183e 0 429e 0 467e 528e 0 160e 103e 071e 978e 693e 817e 2 656e 2 1956 817e 2 660e 2 28le 2 222e 2 147e 2 242e 2 318e 0 924e 0 583e 0 937e 1 167e 1 978e 1 693e 1 196e 2 761e 2 656e 2 322e 2 318e 2 679e 3 000e 0 495e 0 216e 0 665e 0 371e 0 562e 0 640e 0 041e 0 100e 0 982e 1 160e 1 150e 1 360e 1 103e 1 541le 1 071e 1 0
147. 0 PHREEQE was capable of simulating a variety of geochemical reactions for a system including e Mixing of waters e Addition of net irreversible reactions to solution e Dissolving and precipitating phases to achieve equilibrium with the aqueous phase and e Effects of changing temperature PHREEQE calculated concentrations of elements molalities and activities of aqueous species pH pe saturation indices and mole transfers of phases to achieve equilibrium as a function of specified reversible and irreversible geochemical reactions PHREEQC version 1 Parkhurst 1995 was a completely new program written in the C programming language that implemented all of the capabilities of PHREEQE and added many capabilities that were not available in PHREEQE including e Ion exchange equilibria e Surface complexation equilibria e Fixed pressure gas phase equilibria and e Advective transport Other improvements relative to PHREEOE included complete accounting for elements in solids and the agueous and gas phase mole balance on hydrogen and oxygen to account for the mass of water in the agueous phase iden tification of the stable phase assemblage from a list of candidate phases use of redox couples for definition of redox state in speciation calculations and a more robust non linear eguation solver PHREEQC version 2 is a modification of PHREEQC version 1 All of the capabilities and most of the code for version 1 are retained in vers
148. 0 cell model punch freguency is set to every two shifts print freguency is set to every 10 shifts and the time step for going from the cell midpoint to the column end is halved on line 10 in USER PUNCA All of the changes to make a 20 cell model are also noted in table 44 by comments at the end of lines EXAMPLES 267 Results The distributions of aqueous and immobile constituents in the column at the end of 75 hours are shown in figures 15 and 16 for the 10 and 20 cell models In the experiment two pore volumes of water with Nta and cobalt were introduced to the column over the first 20 hours and then followed by 5 5 pore volumes of background water over the next 55 hours At 10 hours HNta begins to appear at the column outlet along with a rise in the pH fig 15 If Nta and cobalt were conservative and dispersion were negligible the graph would show square pulses that increase at 10 hours and decrease at 30 hours However the movement of the Nta and cobalt is retarded relative to conservative movement by the sorption reactions The peak in Nta and cobalt concentrations occurs in the CoNta complex between 30 and 40 hours The peak in Co concentration is even more retarded by its sorption reaction and does not show up until near the end of the experiment 4e 06 T I I 6 8 Co 10 cells e CoNta 10 cells 6 6 HNta 10 cells Co 20 cells v pH 10 cells pH 20 cells 3e 06 oc j Ly F
149. 0 seconds of reaction However the INCREMENTAL_REACTIONS keyword can be used to make the time steps incremental so that the results of the previous time step are the starting point of the new time step For incremental time steps the example data block would produce results after 100 300 and 600 seconds Default is 1 0 second Optionally steps or s teps Line 8 step_divide step_divide step divide If step divide is greater than 1 0 the first time interval of each integration is set to time step step divide at least two time intervals must be integrated to reach the total time of time step 0 to time step step divide and time step step divide to time step If step divide is less than 1 0 then step_divide is the maximum moles of reaction that can be added during a kinetic integration subinterval Frequently reaction rates are fast initially thus requiring small time intervals to produce an accurate integration of the rate expressions The Runge Kutta method will adapt to these fast rates when the integration fails the tolerance criterion but it may require several reductions in the length of the initial time interval for the integration to meet the crite rion step_divide gt 1 can be used to make the initial time interval of each integration sufficiently small to satisfy the criterion which may speed the overall calculation time However the smaller time interval will apply to all integrations throughout the simulation even if reac
150. 000 CO3 2 2 H CO2 H20 log_k 16 681 delta h 5 738 kcal analytic 464 1965 0 09344813 26986 16 165 75951 2248628 9 CO3 2 10 H 8 e CH4 3 H20 log_k 41 071 delta_h 61 039 kcal SO4 2 H HSO4 log_k 1 988 delta_h 3 85 keal analytic 56 889 0 006473 23807 69 19 8858 0 0 HS 1822 A log_k 12 918 delta_h 12 1 kcal gamma 5 0000 0 0000 S04 2 9 H 8 e HS 4 H20 log_k 33 65 delta_h 60 140 kcal gamma 3 5000 0 0000 HS H H2S log_k 6 994 delta_h 5 300 kcal analytical 11 17 0 02386 3279 0 NO3 2 H 2 e NO2 H20 log k 28 570 delta h 43 760 kcal gamma 3 0000 0 0000 2 NO3 12 H 10 e N2 6 H20 log_k 207 080 delta_h 312 130 kcal NH4 NH3 H log_k ESAS delta_h 12 48 kcal analytic 0 6322 0 001225 2835 76 NO3 10 H 8 e NH4 3 H20 log_k 119 077 delta_h 187 055 kcal gamma 2 5000 0 0000 NH4 S04 2 NH4S04 log_k ort H3B03 H2B03 H log k 9 240 delta_h 3 224 kcal analytical 24 3919 0 012078 1343 9 13 2258 H3BO3 F BF OH 3 log_k 0 400 delta_h 1 850 kcal H3BO3 2 F H BF2 0H 2 H20 log_k 7 63 delta_h 1 618 kcal H3BO3 2 H 3 F BF30H 2 H20 log_k 13567 delta h 1 614 kcal H3BO3 3 H 4 F BF4 3 H20 log_k 20 28 delta_h 1 846 kcal PO4 3 H HPO4 2 log_k 12 346 delta_h 3 530 kcal gamma 4 0000 0 0000 PO4 3 2 H H2P04 log_k 19 553 delta_h 4 520 kcal gamma 4 5000 0 0000 H P
151. 000 in an evaporation prob lem In this case the method would fail to find the true maximum for amp q and instead find a value closest to 1000 This error can be remedied by choosing a larger value for M The value of M may be changed with the range identifier in the INVERSE_MODELING data block For data input to PHREEQC identifiers in the INVERSE_MODELING data block are used for the selection of aqueous solutions solutions uncertainty limits uncertainties and balances reactants phases mole balance equations balances range calculations range and minimal models minimal Aqueous 60 User s Guide to PHREEOcC Version 2 solution compositions are defined with the SOLUTION SOLUTION_SPREAD or SAVE data block and reactants must be defined with PHASES or EXCHANGE_SPECIES data blocks see Description of Data Input ORGANIZATION OF THE COMPUTER CODE The computer code for PHREEQC is divided into 22 files of C code roughly corresponding to processing tasks Definitions of global variables and global structures are defined in the header file global h which is included in all of the source code files those ending in c except cl c Definitions of variables and structures for the Basic interpreter are contained in p2c h Definitions for memory allocation routines are contained in phgalloc h which is included in all source code files except phqalloc c The main program is in the file main c It contains the logic fo
152. 016 Gypsum CaS0 2H 0 015 Kaolinite ALSi 05 OH 4 033 Ca Montmorillonite Cap 7Al 33513 67019 OH 2 081 CO2gas CO 427 Calcite CaCO3 115 Silica SiO 0 Biotite KMg3AlISi 0 9 OH 014 Plagioclase Nap 62Cap 33411 3851 6208 175 The analytical data for the two springs are given in table 46 The chemical compositions of minerals and gases postulated to react by Garrels and Mackenzie 1967 and their mole transfers are given in table 47 The selection of the identity and composition of the reactive phases is the most difficult part of inverse modeling In general the selection is made by knowledge of the flow system and the mineralogy along the flow path microscopic and chemical analysis of the aquifer material and isotopic composition of the water and minerals provide additional insight for the selection of reactants It is not necessary to know precisely which minerals are reacting but it is necessary to have a comprehensive list of potential reactants The input data set for this example is given in table 48 The SOLUTION_SPREAD data block is used to define the two spring waters The INVERSE_MODELING data block is used to define all of the characteristics 270 User s Guide to PHREEQC Version 2 of the inverse modeling calculations including the solutions and phases to be used the mole balance equations the uncertainty limits whether all or only minimal models will be printed and whether ranges of mole transfer that are con
153. 05 0 1 0 05 Line 8b 345S DO Line 9 range 10000 Line 10 minimal Line 11 tolerance le 10 Line 12 force solutions true false Line 13 uncertainty water 0 55 moles 1 Line 14 mineral water false Explanation Line 0 INVERSE_MODELING number description INVERSE_MODELING is the keyword for the data block number Positive number to designate the following inverse modeling definition Default is 1 description Optional comment that describes the inverse modeling calculation Line 1 solutions list of solution numbers solutions Identifier that indicates a list of solution numbers follows on the same line Optionally sol or s olutions Note the hyphen is required to avoid conflict with the keyword SOLUTION list of solution numbers List of solution numbers to use in mole balance calculations At least two solution numbers are required and these solutions must be defined by SOLUTION input or by SAVE after a batch reaction calculation in the current or previous simulations The final solution number is listed last all but the final solution are termed initial solutions If more than one initial solution is listed the initial solutions are assumed to mix to form the final solution The 98 User s Guide to PHREEQC Version 2 mixing proportions of the initial solutions are calculated in the modeling process In the example data block line 1 solution 5 is to be made by mixing solutions 10 and 3 in combination with phase
154. 1 debug_set True or False debug_set Includes debugging prints for subroutines called by subroutine set Optionally debug_set or debug s et True or False A value of true optionally t rue indicates the debugging information will be included in the output file false optionally f alse indicates debugging information will not be printed If neither true nor false is entered a value of true is assumed At the start of the program the default value is false If this option is set to true the initial revisions of the master unknowns see eguation 84 which occur in subroutine set are printed for each element or element valence DESCRIPTION OF DATA INPUT 113 state that fails the initial convergence criteria The initial revisions occur before the New ton Raphson method is invoked and attempt to provide good estimates of the master unknowns to the Newton Raphson method The printout is tedious Line 12 logfile True or False logfile Prints information to a file named phreegc log Optionally logfile or I ogfile True or False A value of true optionally t rue indicates information will be written to the log file phreeqc log false optionally f alse indicates information will not be written If neither true nor false is entered a value of true is assumed At the start of the program the default value 1s false If this option is set to true information about each calculation will be written to the log file
155. 1 rem decrease rate on precipitation 90 if SR Albite gt 1 then moles moles 0 1 100 save moles eng EEEE E Calcite HHEHH HEH Plummer L N Wigley T M L and Parkhurst D L 1978 American Journal of Science v 278 p 179 216 Example of KINETICS data block for calcite rate KINETICS 1 Calcite tol le 8 m0 3 e 3 m 3 e 3 parms 5 0 0 6 Calcite sstart 1 rem Modified from Plummer and others 1978 2 rem parm 1 A V 1 m parm 2 exponent for m m0 10 si cc si Calcite 20 if m lt 0 and si cc lt 0 then goto 200 30 kl 10 0 198 444 0 273 16 tc 40 k2 10 2 84 2177 0 273 16 tc 50 if tc lt 25 then k3 107 5 86 317 0 273 16 tc 60 if tc gt 25 then k3 10 1 1 1737 0 273 16 tc 70 tal 80 if m0 gt 0 then t m m0 90 if t 0 thent 1 100 moles parm 1 t parm 2 110 moles moles kl act H k2 act CO2 k3 act H20 120 moles moles 1 10 2 3 si_cc 130 moles moles time 140 if moles gt m then moles m Attachment B Description of Database Files and Listing 307 150 if moles gt 0 then goto 200 160 temp tot Ca 170 me tot C 4 180 if mc lt temp then temp mc 190 if moles gt temp then moles temp 200 save moles end HHEHH EE Pyrite HHEEH RE Williamson M A and Rimstidt J D 1994 Geochimica et Cosmochimica Acta v
156. 10768 0 K 39 9 1 Fe 0 002 n 0 0002 pe S 4 28 Gl 19353 0 Alkalinity 141 682 as HCO3 S 6 2712 0 N 5 0 29 gfw 62 0 EXAMPLES 197 N 3 0 03 as NH4 U 3 23 ppb N 5 N 3 O 0 1 0 02 g 0 7 SOLUTION MASTER SPECIES U U 4 0 0 238 0290 238 0290 U 4 U 4 0 0 238 0290 U 5 U02 0 0 238 0290 U 6 U02 2 0 2 0 238 0290 SOLUTION_SPECIES primary master species for U is also secondary master species for U 4 U 4 U 4 log_k 0 0 U 4 4 H20 U OH 4 4 H log k 8 538 delta_h 24 760 kcal U 4 5 H20 U OH 5 5 H log_ 1347 delta_h 27 580 kcal secondary master species for U 5 U 4 2 H20 UO2 4 H e log_k 6 432 delta_h 31 130 kcal secondary master species for U 6 U 4 2 H20 UO2 2 4 H 2 e log_ 9 217 delta_h 34 430 kcal U02 2 H20 UO20H H log k 5 782 delta_h 11 015 kcal 2U02 2 2H20 U02 2 0H 2 2 2H log_k 5 626 delta_h 36 04 kcal 3U02 2 5H20 U02 3 0H 5 5H log k 15 641 delta_h 44 27 kcal UO2 2 CO3 2 UO2CO3 log_k 10 064 delta_h 0 84 kcal UO2 2 2C03 2 UO2 CO3 2 2 log_k 16 977 delta_h 3 48 kcal UO2 2 3C03 2 UO2 CO3 3 4 log_k 21 397 delta_h 8 78 kcal PHASES Uraninite UO2 4 H U 4 2 H20 log_k 3 490 delta_h 18 630 kcal END 198 User s Guide to PHREEOc Version 2 Uranium is not included in phreegc dat one of the database files that is distributed with the program Thus d
157. 2 Mn 2 log_k gamma A1 3 A1 3 log_k gamma Ba 2 Ba 2 log_k gamma Sr 2 Sr 2 log_k gamma H4Si04 H4Si04 log k CL G1 log_k gamma CO3 2 CO3 2 log_k gamma s04 2 s04 2 log k gamma NO3 NO3 log_k gamma H3B03 H3B03 log_k PO4 3 PO4 3 log_k gamma log k gamma Li Li log_k gamma Br Br log_k gamma Zn 2 Zn 2 log_k gamma Cd 2 Cd 2 log k Pb 2 Pb 2 log k Cu 2 Cut2 log_k gamma H20 OH H log k 0000 5000 0000 5000 0000 0000 0000 0000 2600 5000 4000 0000 0000 0000 5000 0000 0000 0000 0000 delta_h 13 362 analytic gamma 3 5000 2 H20 02 4 H 4 e 294 User s Guide to PHREEOcC Version 2 0 000 0 000 0 1650 0 000 0 2000 0 000 0 0750 0 000 0 0150 0 000 0 0000 0 000 0 0000 0 000 0 0000 0 000 0 0000 0 000 0 1210 0 000 0 000 0 0150 0 000 0 0000 0 000 0 0400 0 000 0 0000 0 000 0 000 0 0000 0 000 0 0000 0 000 0 0000 0 000 0 0000 0 000 0 0000 0 000 0 000 0 000 0 0000 14 000 kcal 283 971 0 0000 0 05069842 13323 0 102 24447 1119669 0 log k 86 08 delta_h 134 79 kcal 2 H 2 e H2 log_k 3 315 delta_h 1 759 kcal CO3 2 H HCO3 log_k 10 329 delta_h 3 561 kcal analytic 107 8871 0 03252849 5151 79 38 92561 563713 9 gamma 5 4000 0 0
158. 2 5 Na 1000 GN 1000 END RATES Rate expressions for the four kinetic reactions HNta 2 start 10 Ks 7 64e 7 20 Ka 6 25e 6 30 gm 1 407e 3 3600 40 f1 MOL HNta 2 Ks MOL HNta 2 50 2 MOL 02 Ka MOL 02 60 rate qm KIN Biomass f1 2 70 moles rate TIME 80 PUT rate 1 save the rate for use in Biomass rate calculation 90 SAVE moles end Biomass start 10 Y 65 14 20 b 0 00208 3600 30 rate GET 1 uses rate calculated in HTNA 2 rate calculation 40 rate Y rat b M 50 moles rate TIME 60 if M moles lt 0 then moles M 70 SAVE moles end Co_sorption start 10 km 1 3600 20 kd 5 07e 3 30 solids 3 75e3 40 rate km MOL Co 2 M solids kd 50 moles rate TIME 60 if M moles lt 0 then moles M 70 SAVE moles end CoNta_sorption start 10 km 1 3600 20 kd 5 33e 4 30 solids 3 75e3 EXAMPLES 265 40 rate km MOL CoNta M solids kd 50 moles rate TIME 60 if M moles lt 0 then moles M 70 SAVE moles end KINETICS 1 10 Four kinetic reactions for all cells 1 20 HNta 2 formula C 3 12 H 1 968 O 4 848 N 0 424 Nta 1 Biomass formula H 0 0 m 1 36e 4 Co_sorption formula CoC12 m 0 0 tol le 11 CoNta_sorption formula NaCoNta m 0 0 tol le 11 SELECTED_OUTPUT fil x15 sel mol Nta 3 CoNta HNta 2 Co 2 USER PUNCH heading hours Co
159. 23H REACTION 1 H20 il 40 52 73 moles SAVE solution 2 END TITLE Example 4b Factor of 20 more solution IX 2 20 SAVE solution 3 END All solutions defined by SOLUTION input are scaled to have exactly 1 kg approximately 55 5 mol of water unless water identifier is used To concentrate the solution by 20 fold it is necessary to remove approximately 52 8 mol of water 55 5 X0 95 The second simulation uses MIX to multiply by 20 the moles of all elements in the solution including hydrogen and oxygen This procedure effectively increases the total mass or volume of the agueous phase but maintains the same concentrations For identification purposes the solution that results from the MIX simulation is stored as solution 3 with the SAVE keyword Solution 3 will have the same concentrations as solution 2 from the previous simulation but will have a mass of water of approximately 1 kg Selected results of the simulation are presented in table 18 The concentration factor of 20 is reasonable in terms of a water balance for the process of evapotranspiration in central Oklahoma Parkhurst and others 1996 The PHREEOC modeling assumes that evaporation and evapotranspiration have the same effect and that evapotranspiration has no effect on the ion ratios These assumptions have not been verified and may not be correct After evaporation the simulated solution composition is still undersaturated with respect to calcite do
160. 3 48E 09 8 5 5 58E 07 7 65E 08 4 90E 09 1 21E 10 246 User s Guide to PHREEOcC Version 2 Example 13 1D Transport in a Dual Porosity Column with Cation Exchange This example demonstrates the capabilities of PHREEQC to calculate flow in a dual porosity medium with exchange among the mobile and immobile pores via diffusion The flexible input format and the modular definition of additional solutions and processes in PHREEQC allow inclusion of heterogeneities and various complexities within a 1D column This example considers a column filled with small clay beads of 2 cm diameter which act as stagnant zones Both the first order exchange approximation and finite differences are applied in this example and transport of both a conservative and a retarded by ion exchange chemical are considered It is furthermore shown how a heterogeneous column can be modeled by prescribing mixing factors to account for diffusion between mobile and immobile cells with keyword MIX Stagnant Zone Calculation Using the First Order Exchange Approximation with Implicit Mixing Factors The example input file table 33 is for a column with a uniform distribution of the stagnant porosity along the column The 20 mobile cells are numbered 1 20 Each mobile cell n exchanges with one immobile cell which is numbered 20 1 n cells 22 41 are immobile cells All cells are given an identical initial solution and exchange complex but these could be defined differently
161. 3C Dolomite 3 6 1 0 3 0 1 9 5 0 5 0 8 3c CH O 25 0 30 0 21 4 25 0 20 0 20 0 Calculated 5 13C final water 2 3 2 2 3 0 2 3 4 3 3 3 Calculated 8 4S final water 15 8 15 8 16 1 15 8 15 9 16 0 age 12 900 PHREEQC C compared to 22 700 NETPATH A This large change in the calculated age can be attributed to differences in the reactions involving carbon Two effects can be noted the change in the exchange reaction and the adjustments for charge balance errors The effect of the change in exchange reaction can be estimated from the differences between NETPATH A which contains pure Ca Na exchange and NETPATH C which contains Cao 75Mg0 25 Na exchange but neither model includes corrections for charge imbalances in the solution compositions The increase in Mg in the exchange reaction causes larger mole transfers of calcite and dolomite and EXAMPLES 283 decreases the calculated age from 22 700 to 16 500 years The effects of charge balance errors are estimated by the differences between NETPATH C and C which differ only in that the NETPATH charge balance option was used in NETPATH C Charge balancing the solutions produces larger mole transfers of organic matter and calcite and decreases the calculated age from 16 500 to 13 000 years The mole transfers and calculated age for NETPATH C are similar to PHREEQC C but differ slightly because the uncertainty terms in the PHREEQC model have been calculated to achieve not only charge b
162. 6 026 0 506 U02 2 OH 2 2 1 780e 21 5 547e 22 20 750 21 256 0 506 U02 3 OH 5 2 908e 23 2 173e 23 22 536 22 663 O 0127 Phase SI log IAP log KT Anhydrite 0 84 5 20 4 36 Caso4 Aragonite 0 61 7 72 8 34 Caco3 Calcite 0 76 RL 8 48 CaC03 Chalcedony 0 51 4 06 3 55 102 Chrysotile 3 36 35 56 32 20 Mg3Si205 OH 4 CO2 g 3 38 520 93 18 15 002 Dolomite 2 41 14 68 17 09 CaMg CO3 2 Fe OH 3 a 0 19 3 42 3 61 Fe 0H 3 Goethite 6 09 3 41 9 50 Fe00H Gypsum 0 63 5 21 4 58 CaSso4 2H20 H2 9 41 22 1 82 43 04 H2 H20 g 1 52 0 01 1 51 H20 Halite 2 50 0 92 1 58 Nacl Hausmannite 1 57 19 56 17 99 Mn304 Hematite 14 20 6 81 21 01 Fe203 Jarosite K 7 52 42 23 34 71 KFe3 S04 2 0H 6 Manganite 2 99 6 21 3 82 MnOOH Melanterite FLOSS 211 56 2 21 FeSso4 7H20 NH3 9 8 84 2 18 11 01 NH3 02 9 0 70 3 66 2 96 02 Pyrochroite 8 08 Kel 2 15 20 Mn 0H 2 Pyrolusite 6 96 5530 1 66 Mn02 Ouartz 0 08 4 06 3 98 Ssi02 Rhodochrosite 3 27 14 40 11 13 MnC03 Sepiolite 1 16 16 92 15 76 Mg2Si307 50H 3H20 Sepiolite d 1 74 16 92 18 66 Mg2Si307 50H 3H20 Siderite 13 13 24 02 10 89 FeCco3 si02 a 1 35 4 06 2 71 9102 Talc 6 04 27 44 21 40 Mg3Si4010 OH 2 Uraninite 12 07 4 39 17 06 UQ The output from the model table 12 contains several blocks of information delineated by headings First the names of the input output and database files for the run are listed Next all keywords encountered in reading
163. 71 468 following the ideal gas assumption units are atmospheres atm and the following mass action equation applies at equilib rium 1 468 Pco 10 469 19 where Po o is the partial pressure atm calculated using activities in the agueous phase In general the partial pressure of a gas component may be written in terms of agueous phase activities as M ag 1 am 8 K m gt E m P 20 where P E is the partial pressure of gas component g calculated using activities in the aqueous phase K is the Henry s law constant for the gas component and c i is the stoichiometric coefficient of agueous master spe cies m in the dissolution eguation The values of c may be positive or negative For PHREEOC terms on the m g left hand side of a dissolution reaction are assigned negative coefficients and terms on the right hand side are assigned positive coefficients For a fixed volume gas phase the total volume of the gas phase is specified to be Vota but the pressure of the gas phase is variable At eguilibrium the number of moles of a gas component in the gas n is calculated as M V otal g 2 V otal acme 21 RT RTK m S m The total derivative of the moles of a gas component in the gas phase is V jot ota dn pT n oe ANA yy 22 m For a fixed pressure gas phase the total pressure is specified as P otaj but the volume of the gas phase is variable At equilibrium the number of moles of a gas
164. 8 002 delta_h 25 896 kcal Anorthite CaAl2Si208 8 H20 Ca 2 2 A1 0H 4 2 H4Si04 log_k 19 714 delta_h 11 580 kcal K feldspar KA1Si308 8 H20 log_k delta_h 30 820 20 573 kcal K mica KA13Si3010 OH 2 10 H log_k 12 703 delta_h 59 376 kcal Chlorite 14A Mg5A12Si3010 OH 8 16H log_k 68 38 delta_h 151 494 kcal Ca Montmorillonite 5Mg 2 2A1 3 K Al 0H 4 3 H4Si04 K 3 Al 3 3 H4Si04 3H4Si04 6H20 165Ca 2 2 33 A1 OH 4 3 67 H4Si04 2 H 0 6K 0 25Mg 2 2 3A1 0H 4 3 5H4Si04 1 2H 102171 6 1894 2 Mg 2 3 H4Si04 Ca0 165A12 33Si3 67010 0H 2 12 H20 0 log_k 45 027 delta_h 58 373 kcal Talc Mg3Si4010 0H 2 4 H20 6 H 3 Mg 2 4 H4Si04 log_k 21 399 delta_h 46 352 kcal Illite K0 6Mg0 25A12 35i3 5010 0H 2 11 2H20 log_k 40 267 delta_h 54 684 kcal Chrysotile Mg3Si205 OH 4 6 H H20 2 H4Si04 3 Mg 2 log_k 32 200 delta_h 46 800 kcal analytic 13 248 0 0 Sepiolite Mg2Si307 50H 3H20 4 H 0 5H20 log_k 15 760 delta_h 10 700 kcal Sepiolite d Mg2Si307 50H 3H20 4 H 0 5H20 log_k 18 660 Hematite Fe203 6 H 2 Fe 3 3 H20 log_k 4 008 delta_h 30 845 kcal Goethite Fe00H 3 H Fe 3 2 H20 log_k 1 000 delta_h 14 48 kcal Fe OH 3 a Fe OH 3 3 H Fe 3 3 H20 log k 4 891 Pyrite 302 User s Guide to PHREEQC Version 2 2 Mg 2 3 H4Si04 FeS2 2 H 2 e Fe 2 2 HS log_k 18 479 delta_h 11 300 kcal
165. 84e 1 606e 2 349e 2 049e 0 558e 0 106e 0 846e 0 606e 2 387e 0 523e 0 948e 0 020e 0 641e 0 y 6 9 1 3 4 4 4 5 5 6 3 5 0 0 0 1 2 0 0 3 3 ja 5 8 K F 0 0 1 9 9 0 0 9 0 0 0 0 1 5 8 9 9 4 9 9 9 0 0 0 6 6 3 0 3 4 9 2 3 4 4 6 0 0 0 0 0 1 1 2 0 7 7 8 8 6 0 1 3 4 5 7 Log Molality ME 098 009 820 658 778 050 173 2337 418 565 917 901 741 569 216 129 709 786 022 965 39 71 565 065 223 247 019 025 844 020 202 109 849 284 109 315 709 786 085 1523 547 181 674 026 961 020 202 455 196 849 609 374 950 436 982 5789 503 324 135 658 050 965 663 019 569 695 025 216 844 555 862 222 794 135 381 315 862 320 218 778 173 506 Log Activity 788 220 009 990 785 710 982 299 508 099 497 850 927 248 502 343 062 642 913 623 898 508 497 192 350 452 145 958 970 526 329 2 35 OL 923 235 247 642 913 211 649 479 308 801 032 088 526 329 554 322 781 634 880 115 369 187 915 436 863 067 785 982 092 303 145 502 627 958 343 970 681 794 362 043 068 508 546 794 470 345 710 299 439 Log Gam
166. 9 200 User s Guide to PHREEOcC Version 2 C 4 Ca cl Fe 2 Fe 3 H 0 Mg Mn 2 Mn 3 N 3 N 5 Na Species OH HT H20 Di HCO3 MgHCO3 NaHCO3 MgC03 Naco3 CaHCO3 CO3 2 Caco3 co2 UO2 CO3 3 4 UO2 CO3 2 2 MnC03 MnHCO3 UO02CO3 FeC03 FeHCO3 Cat2 Caso4 CaHCO3 Caco3 CaOH CaHSO4 C1 MnC1 MnC12 MnC13 FeCl 2 FeCl2 Fecl FeC13 Fe 2 Fecl Feso4 FeC03 FeHCO3 FeOH FeHSO4 Fe OH 3 Fe OH 4 Fe OH 2 Fe0H 2 Fes04 FeCl 2 FeCl2 Fe 3 Fe S04 2 FeC13 Fe2 OH 2 4 FeHSO4 2 Fe3 OH 4 5 0 H2 E K KSO4 KOH Mg 2 MgS04 MgHCO3 MgC03 MgOH Mn 2 MnC1 MnC03 MnS04 MnC12 MnHCO3 MnC13 MnOH Mn NO3 2 Mn 3 NH4 NH3 NH4S04 NO3 Mn NO3 2 Na Naso4 NaHCO3 Naco3 NaOH 2 7 5 180e 03 FPRADNFRPENWADOARPNE 066e 02 W ON BH O 657e 01 PRIDE O U 909e 19 W 0OH H BJ UI 711e 08 BD HEW VH ELN EN 000e 00 0 058e 02 m we 507e 02 HONNA 773e 09 PNFAONNON 993e 26 0 7246 06 1 7 4 847e 06 4 p 854e 01 WARDA 657e 0 582e 439e 434e 5571e 28le 786e 2 417e 2 205e 186e 2 845e 2 952e 2 635e 2 227e 2 000e 2 674e 0 98le 0 551e 0 514e 0 195e 0 667e 0 913e 0 118e 0 597e 0 821e 0 725e 0 210e 0 255e 0 814e 0 696e 1 077e 1 429e 1 952e 2 635e 2 504e 0 083e 0 597e
167. 99 0 080 8 499 8 580 0 080 38 659 38 655 0 004 15 074 15 070 0 004 117 646 117 731 0 084 117 860 117 856 0 004 123 270 123 582 0 312 1 981 2 295 0 313 2 285 2 281 0 004 7 293 7 374 0 080 8 499 8 580 0 080 Casod Caso4 2H20 H2 H20 H2S 02 S percent seawater D The mixture is equilibrated with calcite and dolomite Finally E the mixture is equilibrated with calcite only to investigate the chemical evolution if dolomite precipitation is assumed to be negligible Table 15 Input data set for example 3 TITLE Example 3 part A Calcite equilibrium at log Pco2 2 0 and 25C SOLUTION 1 Pure water pH 10 temp 25 0 EQUILIBRIUM_PHASES CO2 g 2 0 Calcite 0 0 SAVE solution 1 END TITLE Example 3 part B Definition of seawater SOLUTION 2 Seawater units ppm pH 8 22 pe 8 451 density 1 023 temp 2540 Ca 412 3 Mg 1291 8 Na 10768 0 K 39921 Si 4 28 El 19353 0 Alkalinity 141 682 as HCO3 S 6 2712 0 END TITLE Example 3 part C Mix 70 ground water 30 seawater MIX 1 1 0 7 2 0 3 SAVE solution 3 END TITLE Example 3 part D Eguilibrate mixture with calcite and dolomite EQUILIBRIUM_PHASES 1 Calcite 0 0 Dolomite 0 0 USE solution 3 END TITLE Example 3 part E Equilibrate mixture with calcite only EQUILIBRIUM_PHASES 2 Calcite 0 0 USE solution 3 END The input for part A table 15 cons
168. A oes 106 Explanation Lio e ies 106 Example data block Zuecos opencacietinn e n Sv s pea esli ssu n EE aa kaa sea EA E SE 109 Explanation 2 esinaine sae aen Ars ase lei Kane masi hake asso a nh battens Nen 109 TN 109 Example problems ui a a 110 Related key words iio aiii ran 110 ENOBS uni AA A A 111 Example d ta block re ad alo rte 111 Explanation aalaas 111 IN OTES esses ai ii is ASS A hob ava Gin een e cd 114 Example problems sortir eat me iris eins ici d 00 115 ME A OSA O E Se NN IS AA 116 Example data BIOCK cidcid ira idas 116 Expl nation RN 116 Notes eiii iria 116 Example problems ies 117 Related Key WordS coi oda Sa cates ca hac heess M mien 117 PHASES rta ppt Siska mtn ess id toes ti atados ai 118 Example data block comi iii 118 Explanation Aline ts ti tdi iaa 118 NN 119 Example Problem S coi e levees shes atin elec anes cs assi Sis cousk eebieb ena SH sensa Ha 119 Related key words iii tdi 119 PRINTS hk ed ee Re ee ik A 120 Example data DIGCK ii a eii iii sb eopied E E 120 A O 120 NOTES Caicos is ASA to dsd ia iii cds 122 Example proDlems issiisissa set mass pisaa s Ek sas tkN sso OnE aE ESE ETDE nE eSa REE auesbepsvaabavegasveasaseve ria 123 Related key Words s o AN s Aiu AA ates 123 RATES sota oh aN A ro iii rei ss 124 Example data block iaa 124 Explanation dina ii di spond VEN KESKUS ANU EESTE N aia 124 Note siii isis 125 Example problems vans isla Ma edi 129 Related Key Words cortito pitt traia
169. AL_REACTIONS true the solution composition will be calculated after 0 5 moles of reaction are added to the initial solution and again after an additional 0 5 moles of reaction are added to the reacted solution Although the calculation procedure differs results of calculations using the in form of data input should be the same for INCREMENTAL_REACTIONS true or false If INCREMENTAL_REACTIONS true REACTION is defined with a list of steps and more batch reaction steps maximum number of steps defined in KINETICS REACTION and REACTION_TEMPERATURE than REACTION steps are defined then the last reaction step is repeated for the additional batch reaction steps Thus the reaction continues to be added to solution during the final batch reaction steps If no additional reaction is desired in these final batch reaction steps then additional reaction amounts equal to zero should be entered in the REACTION data block Similarly if more batch reaction steps are defined than kinetic steps the final time step from the KINETICS data block will be used for the final batch reaction steps If in is used in steps in the REACTION data block and the number of batch reaction steps is greater than the number of steps defined in the REACTION data block then the reaction step is zero for REACTION in the remaining batch reaction steps Likewise if in is used in steps in the KINETICS data block and the number of batch reaction steps is greater than the n
170. Alk C o7 tion of carbonate species is included in the alkalinity term of the summation 56 User s Guide to PHREEOcC Version 2 Isotope Balance Equations Geochemical mole balance models must account for the isotopic composition as well as the chemical composition of the final aqueous solution In general isotopic evolution requires solving a differential equation that accounts for fractionation processes for precipitating solids and exsolving gases In the development presented here only the simpler case of isotopic mole balance without fractionation is considered This approach is correct if aqueous mixing occurs and or all isotope bearing phases dissolve but is approximate when isotope bearing phases precipitate or exsolve The approach does not calculate isotopic compositions of individual redox states within the aqueous phase only net changes in isotopic composition of the aqueous phase are considered Mole balance for an isotope can be written as Q M 0 Ele Yl a oe Ja POs 5 e a fa tdi Je 138 g m where M is a aa ee v states of element e R i is the isotopic ratio which may be delta notation for ole E or 8 ts a activity in percent modern carbon or any units that allow linear mixing for isotope i for valence state m in aqueous solution q is an uncertainty term for the isotopic ratio for a valence state in the aqueous solution Ro a is the isotopic ratio of element e in phase p and is an uncertainty
171. DEBUG Line 1 iterations iterations iterations Allows changing the maximum number of iterations Optionally iterations or i tera tions iterations Positive integer limiting the maximum number of iterations used to solve the set of algebraic equations for a single calculation Values greater than 200 are not usually effective Default is 100 Line 2 convergence_tolerance convergence_tolerance convergence_tolerance Changes the convergence criterion used to determine when the algebraic equations have been solved For an element mole balance equation convergence is satisfied when mole balance is within convergence_tolerance times the total moles of the element convergence_tolerance T When the high_precision identifier of SELECTED_OUTPUT is used the convergence criterion is set to the smaller of convergence_tolerance and 1e 12 Default is 1e 8 Optionally convergence_tolerance or c onvergence tolerance Line 3 tolerance tolerance tolerance Allows changing the tolerance used by the optimization solver subroutine Cl1 to deter mine numbers equal to zero This is not the convergence criterion used to determine when the algebraic equations have been solved Optionally tolerance or t olerance tolerance Positive decimal number used by the optimization solver subroutine cl1 All numbers smaller than this number are treated as zero This number should approach the value of the least DESCRIPTION OF DATA INPUT 111 signif
172. EQUATIONS AND NUMERICAL METHOD FOR TRANSPORT MODELING 53 For data input to PHREEQC 1D transport including only advection is accomplished with the ADVECTION data block All other 1D transport calculations including diffusion advection and dispersion and advection and dispersion in a dual porosity medium require the TRANSPORT data block Initial conditions of the transport column are defined with SOLUTION or SOLUTION_SPREAD EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE SOLID_SOLUTIONS and SURFACE data blocks Kinetic reactions are defined with KINETICS data blocks Infilling solutions are defined with SOLUTION or SOLUTION_SPREAD data blocks see Description of Data Input EQUATIONS AND NUMERICAL METHOD FOR INVERSE MODELING PHREEQC has capabilities for geochemical inverse modeling which attempts to account for the chemical changes that occur as a water evolves along a flow path Plummer and Back 1980 Parkhurst and others 1982 Plummer and others 1991 Plummer and others 1994 In inverse modeling one aqueous solution is assumed to mix with other aqueous solutions and to react with minerals and gases to produce the observed composition of a second aqueous solution Inverse modeling calculates mixing fractions for the aqueous solutions and mole transfers of the gases and minerals that produce the composition of the second aqueous solution The basic approach in inverse modeling is to solve a set of linear equalities that account for the
173. ES input is important the log K is not used in inverse modeling calcula tions force The phase is included forced to be in the range calculation see line 9 whether or not the phase mole transfer is nonzero This will give another degree of freedom to the range calculation DESCRIPTION OF DATA INPUT 99 for models that do not include the phase and the resulting range of mole transfers may be larger The order of this option following the phase name is not important Optionally f orce dissolve or precipitate The phase may be constrained only to enter the aqueous phase dissolve or leave the aqueous phase precipitate Any set of initial letters from these two words are sufficient to define a constraint list of isotope name isotope ratio isotope uncertainty limit Isotopic information for the phase may be defined for one or more isotopes by appending to line 4 triplets of isotope name isotope ratio isotope uncertainty limit isotope name Isotope name written with mass number first followed by element name with no inter vening spaces isotope ratio Isotope ratio for this isotope of this element isotope name in the phase frequently per mil but percent or other units can be used Units must be consistent with the units in which this isotope of the element is defined in SOLUTION input isotope uncertainty Uncertainty limit for isotope ratio in the phase Units must be consistent with the units for isotope rati
174. EXCHANGE MASTER SPECIES EXCHANGE SPECIES KINETICS SAVE exchange and USE exchange 86 User s Guide to PHREEQC Version 2 EXCHANGE_MASTER_SPECIES This keyword data block is used to define the correspondence between the name of an exchange site and an exchange species that is used as the master species in calculations Normally this data block is included in the database file and only additions and modifications are included in the input file Example data block Line 0 EXCHANGE MASTER SPECIES Line la X X Line 1b Xa Xa Explanation Line 0 EXCHANGE MASTER SPECIES Keyword for the data block No other data are input on the keyword line Line 1 exchange name exchange master species exchange name Name of an exchange site X and Xa in this example data block It must begin with a capital letter followed by zero or more lower case letters or underscores exchange master species Formula for the master exchange species X and Xa in this example data block Notes All half reactions for the exchanger X and Xa in this example data block must be written in terms of the master exchange species X and Xa in this example data block Each exchange master species must be defined by an identity reaction with log K of 0 0 in EXCHANGE SPECIES input Any additional exchange species and associated reactions must be defined with EXCHANGE SPECIES input Example problems The keyword EXCHANGE MASTER SPECIESis
175. Fe tri 55 847 SOLUTION SPECIES Fe di 2 Fe di 2 log k 0 0 Fe tri 3 Fe tri 3 log_k 0 0 Fe 2 species Fe di 2 H20 Fe _diOH H4 log_k 9 5 delta_h 13 20 kcal and also other Fe 2 species Fe 3 species Fe_tri 3 H20 Fe_triOH 2 H log_k 22 19 delta_h 10 4 kcal ft and also other Fe 3 species EXAMPLES 231 PHASES Goethite Fe _triOOH 3 H Fe tri 3 2 H20 log_k 0 END SOLUTION 1 pH 7 0 pe 10 0 02 g 0 67 Fe_di 0 1 Na 10 Cl 10 charge EQUILIBRIUM_PHASES 1 02 9 0 67 RATES Fe di ox start 10 Fe di TOT Fe di 20 if Fe di lt 0 then goto 200 30 p 02 10 SI 02 g 40 moles 2 91e 9 1 33e12 ACT O0H 2 p 02 Fe di TIME 200 SAVE moles end KINETICS 1 Fe di ox formula Fedi 1 0 Fetri 1 0 steps 100 400 3100 10800 21600 5 04e4 8 64e4 1 728e5 1 728e5 1 728e5 1 728e5 INCREMENTAL REACTIONS true ELECTED OUTPUT file ex9 sel reset false USER_PUNCH headings Days Fe 2 Fe 3 pH si goethite 10 PUNCH SIM TIME 3600 24 TOT Fe_di le6 TOT Fe tri le6 LA H SI Goethite END n The SOLUTION data block defines a sodium chloride solution that has 0 1 mmol kgw ferrous iron Fe di and is in equilibrium with atmospheric oxygen The EOUILIBRIUM PHASES phases data block specifies that all batch reaction solutions will also be in equilibrium with atmospheric oxygen thus there is a cont
176. Fix H 5 0 NaOH 10 0 ah ww solution 2 surface 1 ILIBRIUM PHASES 1 Fix H 5 25 NaOH 10 0 solution 2 surface 1 ILIBRIUM PHASES 1 Fix H D b NaOH 10 0 E solution 2 surface 1 ILIBRIUM_PHASES 1 Fix_H 5 75 NaOH 10 0 solution 2 surface 1 ILIBRIUM_PHASES 1 Fix_H 6 0 NaOH 10 0 solution 2 surface 1 ILIBRIUM_PHASES 1 Fix_H 6 25 NaOH 10 0 solution 2 surface 1 ILIBRIUM_PHASES 1 Fix_H SETS NaOH 10 0 HE O solution 2 EXAMPLES 227 USE surface 1 EQUILIBRIUM_PHASES 1 Fix_H 6 75 NaOH 10 0 D USE solution 2 E surface 1 EQUILIBRIUM_PHASES 1 Fix_H NO NaOH 10 0 D USE solution 2 E surface 1 EQUILIBRIUM_PHASES 1 Fix_H 7 25 NaOH 10 0 D USE solution 2 E surface 1 EQUILIBRIUM_PHASES 1 Fix_H D NaOH 10 0 D USE solution 2 E surface 1 EQUILIBRIUM_PHASES 1 Fix_H 7 75 NaOH 10 0 D USE solution 2 E surface 1 EQUILIBRIUM_PHASES 1 Fix_H 8 0 NaOH 10 0 Surface complexation reactions derived from the summary of Dzombak and Morel 1990 are defined by the SURFACE_SPECIES in the default database files for PHREEQC However the intrinsic stability constants used in this example of Dzombak and Morel 1990 chapter 8 differ from their summary values and are therefore specified explicitly with aSURFACE_SPECIES data block in the input file table 27 The mass action equations taken from Dzombak and Morel 1990 p 259 are given in the input data set t
177. Gamma OH 1 002e 07 1 001e 07 6 999 6 999 0 000 H 1 001e 07 1 000e 07 7 000 7 000 0 000 H20 5 551e 01 1 000e 00 0 000 0 000 0 000 H 0 1 416e 25 H2 7 079e 26 7 079e 26 25 150 25 150 0 000 0 0 0 000e 00 02 0 000e 00 0 000e 00 42 080 42 080 0 000 a SS Se Saturation indices Phase SI log IAP log KT H2 g 22 00 22 00 0 00 H2 H20 g ou 0 00 1 51 R20 02 9 39 12 44 00 83 12 02 EXAMPLES 205 Reaction step 1 Using solution 1 Pure water Using pure phase assemblage 1 Using temperature 1 Moles in assemblage Phase SI log IAP log KT Initial Final Delta Anhydrite 01022 4 58 4 36 1 000e 00 1 000e 00 Gypsum 0 00 4 58 4 58 1 000e 00 1 985e 00 9 849e 01 a cae E Solution Composition SS Elements Molality Moles Ca 1 564e 02 1 508e 02 s 1 564e 02 1 508e 02 pH pe Activity of water Ionic strength Mass of water kg Total alkalinity eq kg Total carbon mol kg Total CO2 mol kg Temperature deg C Electrical balance eq 100 Cat An Cat An Iterations Total H Total O Percent error COrFWUBFON 25 0 19 067 686 000 178e 02 645e 01 122e 10 000e 00 000e 00 000 082e 10 00 Charge balance Adjusted to redox equilibrium 1 070728e 02 5 359671e 01 Species Molality Activity OH 1 417e 07 1 167e 07 H 9 957e 08 8 575e 08 H20 5 551e 01 9 996e 01 Ca 1 564e 02 Cat2 1 045e 02 5 176e 03 Casod 5 191e 03 5 242e 03 CaOH 1
178. H O system from zero to high concentration at 25 C Geochimica et Cosmochimica Acta v 44 p 981 997 Helgeson H C Brown T H Nigrini A and Jones T A 1970 Calculation of mass transfer in geochemical processes involv ing aqueous solutions Geochimica et Cosmochimica Acta v 34 p 569 592 Helgeson H C Garrels R M and Mackenzie F T 1969 Evaluation of irreversible reactions in geochemical processes involv ing minerals and aqueous solutions II Applications Geochimica et Cosmochimica Acta v 33 p 455 481 Langmuir Donald 1997 Aqueous environmental geochemistry Upper Saddle River New Jersey Prentice Hall 600 p Lapidus L and Amundson N R 1952 Mathematics of adsorption in beds VI The effect of longitudinal diffusion in ion exchange and chromatographic columns Journal of Physical Chemistry v 56 p 984 988 Lindstrom F T Haque R Freed V H and Boersma L 1967 Theory on the movement of some herbicides in soils Linear diffusion and convection of chemicals Environmental Science and Technology v 1 p 561 565 Mosier E L Papp C S E Motooka J M Kennedy K R and Riddle G O 1991 Sequential extraction analyses of drill core samples Central Oklahoma Aquifer U S Geological Survey Open File Report 91 347 42 p Nordstrom D K Plummer L N Langmuir Donald Busenberg Eurybiades May H M Jones B F and Parkhurst D L 1990 Revised chemical equilibrium data for major water minera
179. ILIBRIUM_PHAS Gibbsite Kaolinit K mica K feldsp END TITLE Example 6A USE solution 1 reach kaolinite saturation ES 1 0 0 0 0 e 0 0 KA1Si308 10 0 0 0 0 0 ar 0 0 0 0 3 Find amount of K feldspar dissolved to reach K mica saturation EQUILIBRIUM_PHASES 1 Gibbsite 0 0 0 0 Kaolinite 0 0 0 0 K mica 0 0 KA1Si308 10 0 K feldspar 0 0 0 0 END USE solution 1 TITLE Example 6A4 Find amount of K feldspar dissolved to reach K feldspar saturation EQUILIBRIUM_PHASES 1 Gibbsite 0 0 0 0 Kaolinite 0 0 0 0 K mica 0 0 0 0 K feldspar 0 0 KA1Si308 10 0 END 214 User s Guide to PHREEQC Version 2 TITLE Example 6A5 Find point with kaolinite present but no gibbsite USE solution 1 EQUILIBRIUM_PHASES 1 Gibbsite Kaolinite KA1Si308 10 0 1 0 OO oo END TITLE Example 6A6 Find point with K mica present but no kaolinite USE solution 1 EQUILIBRIUM_PHASES 1 Kaolinite K mica KA1Si308 10 0 10 oo oo END TITLE Example 6B Path between phase boundaries USE solution 1 EQUILIBRIUM_PHASES 1 Kaolinite 0 0 0 0 Gibbsite 0 0 0 0 K mica 0 0 0 0 K feldspar 0 0 0 0 REACTION 1 K feldspar 1 0 0 04 0 08 0 16 0 32 0 64 1 0 2 0 4 0 8 0 16 0 32 0 64 0 100 200 umol END TITLE Example 6C kinetic calcu
180. IONS 1 Two solid solutions Line la CaSrBaSso4 greater than 2 components ideal Line 2a comp Anhydrite 1 500 Line 2b comp Celestite 0 05 Line 2c comp Barite 0 05 Line lb Ca x Mg 1 x CO3 Binary nonideal Line 3 compl Calcite 0 097 Line 4 comp2 Ca 5Mg 5C03 0 003 Line 5 temp 25 0 Line 6 tempk 298 15 Line 7 Gugg nondim 5 08 1 90 Optional definitions of excess free energy parameters for nonideal solid solutions Line 8 Gugg kj 12 593 4 70 Line 9 activity coefficients 24 05 1075 0 0001 0 9999 Line 10 distribution coefficients 0483 1248 0001 9999 Line 11 miscibility gap 0 0428 0 9991 Line 12 spinodal gap 0 2746 0 9483 Line 13 critical point 0 6761 925 51 Line 14 alyotropic point 0 5768 8 363 Line 15 Thompson 17 303 7 883 Line 16 Margules 0 62 7 6 Explanation Line 0 SOLID_SOLUTIONS number description SOLID_SOLUTIONS is the keyword for the data block Optionally SOLID_SOLUTION number Positive number to designate the following solid solution assemblage and its composition A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the surface assemblage Line 1 solid solution name solid solution name User defined name of a solid solution Line 2 comp phase name moles comp I
181. ION_MASTER_SPECIES 158 User s Guide to PHREEQC Version 2 SOLUTION_SPREAD The SOLUTION_SPREAD data block is an alternative input format for SOLUTION that is compatible with the output of many spreadsheet programs Input for SOLUTION_SPREAD is transposed from the input for SOLUTION that is the rows of input for SOLUTION become the columns of input for SOLUTION_SPREAD The data are entered in columns which are tab delimited NW in the example data block Example data block Line 0 SOLUTION S t indicates the tab character Line 1 temp 25 Line 2 ph Tel Line 3 pe 4 Line 4 redox 0 0 O0 2 Line 5 units mmol kgw Line 6 density I Line 7 water LU Line 8a isotope 348 15 0 1 0 Line 8b isotope 13c 1240 Line 9 isotope uncertainty 13 1 0 Line 10 Number t 13C t uncertainty t pH t Ca t Na t CINE Alkalinity t Description Line 11 NE Mt NE t t t t mg kgw as HCO3 t Line 12a 10 11 t 10 2 t O 0S t 6 91E 231 6 t 10 5 t 61 t soln 10 11 Line 12b It I2Z INE 0 1Xt Mt 17 t 6 t Oi NE 55 t My well 1 Line 12c 5 t 14 1 t Or ZNE Mt 27 t NE LINE 70 t My well 5 Explanation Line 0 SOLUTION_SPREAD Keyword for the data block No other data are input on the keyword line Line 1 temp temperature temp Identifier for temperature The temperature will be used for all subsequent solutions in the data block if no column has the heading temperature or temp or if the entry for the temperature col
182. LING keyword defines the inverse model for this example Solution 2 the solution during halite precipitation evolves from solution 1 Black Sea water Uncertainty limits of 2 5 percent are applied to all data Water calcite carbon dioxide gypsum and halite are specified to be the potential reactants phases Each of these phases must precipitate that is must be removed from the aqueous phase in any valid inverse model By default mole balance equations for water alkalinity and electrons are included in the inverse formulation In addition mole balance equations are included by default for all elements in the specified phases In this case calcium carbon sulfur sodium and chloride mole balance equations are included by the default The balances identifier is used to specify additional mole balance equations for bromide magnesium and potassium In the absence of alkalinity data the calculated alkalinity of these solutions is controlled by the choice of pH and the assumption that the solutions are in equilibrium with atmospheric carbon dioxide For reasonable values of pH alkalinity is a minor contributor to charge balance Only one model is found in the inverse calculation This model indicates that Black Sea water solution 1 must be concentrated 88 fold to produce solution 2 as shown by the fractions of the two solutions in the inverse model output table 51 Thus approximately 88 kg of water in Black Sea water is reduced to 1 kg of w
183. LUTION_MASTER_SPECIES SOLUTION_MASTER_SPECIES element name master species alkalinity gram formula weight or formula gram formula weight of element SOLUTION_SPECIES SOLUTION_SPECIES Association reaction log_k log K delta_h enthalpy units analytical expression A A gt Az Ay As gamma Debye Hiickel a Debye Hiickel b no check mole balance formula SOLUTION SPREAD SOLUTION SPREAD temp temperature pH pH pe pe redox redox couple units concentration units density density water mass isotope name value uncertainty limit isotope uncertainty name uncertainty limit column headings subheadings chemical data SUMMARY OF DATA INPUT 193 SURFACE Implicit definition of surface composition SURFACE number description equilibrate number surface binding site name sites specific_area_per_gram mass surface binding site formula name equilibrium_phase or kinetic_reactant sites_per_mole specific_area_per_mole no_edl diffuse_layer thickness only_counter_ions Explicit definition of surface composition SURFACE number description surface binding site formula sites specific_area_per_gram mass surface binding site formula name equilibrium_phase or kinetic_reactant sites per mole specific area per mole SURFACE MASTER SPECIES SURFACE MASTER SPECIES surface binding site name surface master species SURFACE SPECIES SURFACE SPECIES Association reaction
184. N 1 EQUILIBRIUM_PHASES 1 Calcite co2 g 1 5 SAVE solution 1 ECTED OUTPUT reset false file ex7 sel simulation true state true reaction true si CO2 g CH4 g N2 g NH3 g gas CO2 g CH4 g N2 g NH3 g ND Simulation 2 Decomposition of organic matter CH2O NH3 07 at fixed pressure of 1 1 atm USE solution 1 GAS_PHASE 1 Fixed pressure gas phase fixed_pressur m pressure a RASI CO2 g 00 CH4 g 0 0 N2 g 0 0 NH3 g 0 0 REACTION 1 CH20 NH3 0 07 1 0 Li Ze S Mi 8 161 32 64 120 2502 500 1000 mmol END Simulation 3 Decomposition of organic matter CH20 NH3 07 at fixed volume of 22 5 L solution 1 reaction 1 GAS_PHASE 1 Fixed volume gas phase fixed volume R py R Py volume 2 15 CO2 g CH4 g N2 g NH3 g O O 0 0 N O Oo O 0 EXAMPLES 223 For the fixed pressure gas phase a bubble forms when nearly 3 mmol of reaction have been added fig 7 Initially the gas is more than 90 percent CH and less than 10 percent CO with only minor amounts of N and NH NH partial pressures were less than 107 atm throughout the batch reaction calculation and are not plotted The volume of gas produced ranges from less than 1 mL at 3 mmol of reaction to 22 5 L after 1 mol of reaction After 1 mol of reaction is added nearly all of the carbon and nitrogen is in the gas phase For the fixed volume gas phase the gas phas
185. Na has Retardation cl 1 0 Cl has Retardation 1 stagnant exchange N 5 1 0 NO3 is conservative charge imbalance is no problem END SOLUTION 1 41 Column with KNO3 units mmol l pH 7 0 pe 130 02 g 0 7 K 1 0 N 5 1 0 EXCHANGE 1 41 eguil 1 X 1 e 3 EXCHANGE_SPECIES For linear exchange make KX exch coeff equal to Nax K X KX log_k 0 0 gamma 3 5 0 015 END TRANSPORT cells 20 shifts 5 flow d forward timest 3600 bcon flux flux diffc 0 0 length 0 1 disp 0 015 stag 1 6 8e 6 0 3 0 1 1 stagnant layer alpha theta m theta im PRINT reset false END SOLUTION O Original solution reenters units mmol 1 pH 7 0 pe 13 0 02 g 05 7 K 1 0 N 5 1 0 TRANSPORT shifts 10 punch freguency 10 punch cells 1 20 SELECTED OUTPUT file reset ex13a sel false 248 User s Guide to PHREEQC Version 2 solution distance true USER PUNCH head C1 mmol Na mmol 10 PUNCH TOT C1 1000 TOT Na 1000 END The mixing factors mixf and mixf for the first order exchange approximation for this example are derived from equations 121 and 123 as follows 9 atf 0 0 mixf x 1 expl 161 dl at Om O dii and mixf mixf img 162 m The retardation factors R and R are not included here in the formulas for mixf and mixf because in PHREEQC the retardation is a consequence of chemical reactions According to equations 161 and 162 for t
186. O indicates the number of aqueous solutions that are included in the calculation T is the total moles of element or element valence state m in agueous solution g n g can be positive or negative c is the coefficient of master species m in the dissolution reaction for phase p by convention all chemical reactions for phases are written as dissolution reactions precipitation in mole balance models is indicated by negative mole transfers A lt 0 P is the total number of reactive phases c H is the stoichiometric coefficient of secondary master spe cies m in redox reaction r and R is the total number of aqueous redox reactions The last aqueous solution number O is assumed to be formed from mixing the first Q aqueous solutions or c 1 for q lt Q and cg 1 q For PHREEQC redox reactions are taken from the reactions for secondary master species defined in SOLUTION_SPECIES input data blocks Dissolution reactions for the phases are derived from chemical reactions defined in PHASES and EXCHANGE_SPECIES input data blocks see Description of Data Input Alkalinity Balance Equation The form of the mole balance equation for alkalinity is identical to the form for other mole balance equations Q P R q p r where Alk refers to alkalinity The difference between alkalinity and other mole balance equations is contained in the meaning of c q yz and 416 pe What is the contribution to the alkalinity of an aqueous soluti
187. ON MASTER SPECIES input the values for the default database phreegc dat are listed in table 4 and in Attachment B If the data are reported relative to a gram formula weight different from the default it is necessary to specify the appropriate gram formula weight in the input data set This can be done with the gfw identifier where the actual gram formula weight is input the gram formula weight by which to convert nitrate is specified to be 62 0 g mol or more simply with the as identifier where the chemical formula for the reported units is input as shown in the input for alkalinity and ammonium in this example Note finally that the concentration of O 0 dissolved oxygen is given an initial estimate of 1 ppm but that its concentration will be adjusted until a log partial pressure of oxygen gas of 0 7 is achieved O2 g is defined under PHASES input of the default database file Attachment B When using phase equilibria to specify initial concentrations like O 0 in this example only one concentration is adjusted For example 1f gypsum were used to adjust the calcium concentration the concentration of calcium would vary but the concentration of sulfate would remain fixed Table 11 Input data set for example 1 TITLE Example 1 Add uranium and speciate seawater SOLUTION 1 SEAWATER FROM NORDSTROM ET AL 1979 units ppm pH 8 22 pe 8 451 density 1 023 temp 25 0 redox 0 0 0 2 Ca 412 3 g 1291 8 Na
188. PHREEOC DATABASE home jdoe local project mydata dat The environmental variable can be set permanently by including the appropriate command in a file that is read when the shell is initiated frequently HOME login or HOME profile If this environmental variable is not set the default database is set in the script in the installation directory to database phreegc dat relative to the installation directory It is possible to specify a different default database by editing the script After PHREEQC is installed it can be executed from any directory with any of the commands described in the Win32 installation section with the understanding that Unix is case sensitive and that most Unix commands and file names are lower case The examples from this manual can be run from the subdirectory examples in the installation directory Note that example 14 requires the database file wateg4f dat which is database wateg4f dat in the installation directory and example 15 requires the database file ex15 dat which is in the examples subdirectory Purpose and Scope The purpose of this report is to describe the theory and operation of the program PHREEQC The report includes the definition of the constituent equations explanation of the transformation of these equations into a numerical method description of the organization of the computer code that implements the numerical method description of the input for the program and presentation of a series of ex
189. QUI LIBRIA PURE_PHASES PURE number Positive number to designate the following phase assemblage and its composition A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the phase assemblage Line 1 phase name saturation index alternative formula or alternative phase amount phase name Name of a phase The phase must be defined with PHASES input either in the database file or in the current or previous simulations of the run The name must be spelled identically to the name used in PHASES input except for case saturation index Target saturation index for the pure phase in the agueous phase line 1a for gases this number is the log of the partial pressure line 1b The target saturation index partial pres sure may not be attained if the amount of the phase in the assemblage is insufficient Default is 0 0 alternative formula Chemical formula that is added or removed to attain the target saturation index or log partial pressure By default the mineral defined by phase name dissolves or precipitates to attain the target saturation index If alternative formula is entered phase name does not react the stoichiometry of alternative formula is added or removed from the aqueous phase to attain the target saturation index Alternative formula
190. RIPTION OF DATA INPUT The input for PHREEQC is arranged by keyword data blocks Each data block begins with a line that contains the keyword and possibly additional data followed by additional lines containing data related to the keyword The keywords that define the input data for running the program are listed in table 2 Keywords and their associated data are read from a database file at the beginning of a run to define the elements exchange reactions surface complexation reactions mineral phases gas components and rate expressions Any data items read from the database file can be redefined by keyword data blocks in the input file After the database file is read data are read from the input file until the first END keyword is encountered after which the specified calculations are performed The process of reading data from the input file until an END is encountered followed by performing calculations is repeated until the last END keyword or the end of the input file is encountered The set of calculations defined by keyword data blocks terminated by an END is termed a simulation A run is a series of one or more simulations that are contained in the same input data file and calculated during the same invocation of the program PHREEQC DESCRIPTION OF DATA INPUT 63 Table 2 List of keyword data blocks and their function Keyword data block ADVECTION END EQUILIBRIUM_PHASES EXCHANGE EXCHANGE_MASTER_SPECIES EXCHANGE_SPECIE
191. S GAS_PHASE INCREMENTAL_REACTIONS INVERSE_MODELING KINETICS KNOBS MIX PHASES PRINT RATES REACTION REACTION_TEMPERATURE SAVE SELECTED_OUTPUT SOLID_SOLUTIONS SOLUTION SOLUTION_MASTER_SPECIES SOLUTION_SPECIES SOLUTION_SPREAD SURFACE SURFACE_MASTER_SPECIES SURFACE_SPECIES TITLE TRANSPORT USE USER_PRINT USER_PUNCH Function Specify parameters for advective reactive transport no dispersion Demarcate end of a simulation Phase assemblage to react with an aqueous solution Define exchange assemblage composition Identify exchange sites and corresponding exchange master species Define association half reaction and thermodynamic data for exchange species Define a gas phase composition Define whether reaction increments are defined incrementally or cumulatively Specify solutions reactants and parameters for mole balance modeling Specify kinetic reactions and define parameters Define parameters for numerical method and printing debugging information Define mixing fractions of aqueous solutions Define dissociation reactions and thermodynamic data for minerals and gases Select data blocks to be printed to the output file Define rate equations with Basic language statements Add specified irreversible reactions Specify temperature for batch reactions Save results of batch reactions for use in subsequent simulations Print specified quantities to a user defined file Define the composition of a solid solution assemblage Define the compositi
192. SURFACE number description Same as example data block 1 Line 7 surface binding site formula sites specific_area_per_gram mass surface binding site formula Formula of the surface binding site in its OH form Surf_sOH and Surf_wOH in this example data block It is important to include the OH in the formula or hydro gen and oxygen will be extracted from the solution during the reaction step which will cause unexpected redox or pH reactions sites Total number of sites for this binding site in moles specific_area_per_gram Specific area of surface in m g Default is 600 m g mass Mass of solid for calculation of surface area in g surface area is mass times specific area per gram Default is O g Line 3 surface binding site formula name eguilibrium phase or kinetic reactant sites per mole specific area per mole Same as example data block 1 Notes 2 The difference between example data block 2 and example data block 1 is that no initial surface composition calculation is performed in example data block 2 the initial states of the surfaces are defined to be in their OH form and not in eguilibrium with any solution Additional surfaces and binding sites can be defined by repeating lines 7 or 3 The diffuse layer only counter ions or no edl identifier can also be included After a set of batch reaction calculations has been simulated it is possible to save the resulting surface composition with the SAVE keyword If the new
193. See the listing of the default database file in Attachment B for examples Related keywords SURFACE and SURFACE SPECIES DESCRIPTION OF DATA INPUT 169 SURFACE_SPECIES This keyword data block is used to define a reaction and log K for each surface species including surface master species Normally this data block is included in the database file and only additions and modifications are included in the input file Surface species defined in Dzombak and Morel 1990 are defined in the default databases the master species are Hfo_w and Hfo_s for the weak and strong binding sites of hydrous ferric oxide Example data block Line 0 SURFACE_SPECIES Line la Surf_sOH Surf_sOH Line 2a log_k 0 0 Line 1b Surf sOH H Surf sOH2 Line 2b log_k 6 3 Line 1c Surf wOH Surf wOH Line 2c log k 0 0 Line 1d Surf wOH H Surf wOH2 Line 2d log k 4 3 Explanation Line 0 SURFACE SPECIES Keyword for the data block No other data are input on the keyword line Line 1 Association reaction Association reaction for surface species The defined species must be the first species to the right of the egual sign The association reaction must precede all identifiers related to the surface spe cies Line la is a master species identity reaction Line 2 log k log K log k Identifier for log K at 25 C Optionally log k logk I 0g k or l ogk log K Log K at 25 for the reaction Log K for a master specie
194. TPATH to obtain carbon 14 ages and to consider the fractionation effects of calcite precipitation One NETPATH calculation used the charge balancing option to identify the effects of charge balance errors The charge balance option of NETPATH adjusts the concentrations of all cationic elements by a fraction f and of all anionic elements by a fraction 7 to EXAMPLES 281 achieve charge balance for the solution The charge balance option of NETPATH was improved in version 2 13 to produce exact charge balance previous versions produced only approximate charge balance For all NETPATH calculations including calculations that used PHREEQC adjusted concentrations carbon dioxide was included as a potentially reactive phase but the 6 348 of anhydrite was adjusted to produce zero mole transfer of carbon dioxide The 5 3C of dolomite and organic matter were adjusted within their uncertainty limits to reproduce the 5C of the final solution as nearly as possible Madison Aquifer Results and Discussion The predominant reactions determined by mole balance modeling are dedolomitization ion exchange halite dissolution and sulfate reduction as listed in table 54 for various modeling options discussed next The driving force for dedolomitization is dissolution of anhydrite about 20 mmol kgw table 54 which causes calcite precipitation and dolomite dissolution Some of the calcium from anhydrite dissolution and or magnesium from dolomite dissolut
195. Table 50 Input data of water gained or lost in homogeneous hydrolysis and complexation reactions set for example 17 TITLE Example 17 Inverse modeling of Black Sea water evaporation SOLUTION 1 Black Sea water units mg L density 1 014 pH 8 0 estimated Ca 233 Mg 679 Na 5820 K 193 S 6 1460 CL 10340 Br 35 C 1 CO2 g 3 5 SOLUTION 2 Composition during halite precipitation units mg L density 1 271 pH 5 0 estimated Ca 0 0 Mg 50500 Na 55200 K 15800 S 6 76200 Cl 187900 Br 2670 C 1 CO2 g 3 5 INVERSE_MODELING solution 1 2 uncertainties 025 range balances Br K Mg phases H20 g pre Calcite pre CO2 g pre Gypsum pre Halite pre This example uses data for the evaporation of Black Sea water that is presented in Carpenter 1978 Two analyses are selected halite precipitates Th the initial Black Sea water and a water composition during the stage of evaporation in which e hypothesis is that evaporation precipitation of calcite gypsum and halite and loss of carbon dioxide are sufficient to account for the changes in water composition of all of the major ions and bromide 276 User s Guide to PHREEOcC Version 2 The input data set table 50 contains the solution compositions in the SOLUTION data blocks The total carbon in the solutions is unknown but is estimated by assuming that both solutions are in equilibrium with atmospheric carbon dioxide The INVERSE_MODE
196. U S DEPARTMENT OF THE INTERIOR U S GEOLOGICAL SURVEY USER S GUIDE TO PHREEQC VERSION 2 A COMPUTER PROGRAM FOR SPECIATION BATCH REACTION ONE DIMENSIONAL TRANSPORT AND INVERSE GEOCHEMICAL CALCULATIONS By David L Parkhurst and C A J Appelo Water Resources Investigations Report 99 4259 I Hydrochemical Consultant Valeriusstraat 11 1071 MB Amsterdam NL appt xs4all nl http www xs4all nl appt index html Denver Colorado 1999 U S DEPARTMENT OF THE INTERIOR BRUCE BABBITT Secretary U S GEOLOGICAL SURVEY Charles G Groat Director The use of trade product industry or firm names is for descriptive purposes only and does not imply endorsement by the U S Government For additional information write to Chief Branch of Regional Research U S Geological Survey Box 25046 MS 418 Denver Federal Center Denver CO 80225 Copies of this report can be purchased from U S Geological Survey Earth Science Information Center Open File Reports Section Box 25286 MS 517 Denver Federal Center Denver CO 80225 CONTENTS NN Introduction Prostam Capabilities to atari ein tea e NN a tdi diri rias Program limitations nia aE N Eaa a eei EEEE AE A R Na sedan Ea e ier a eE eaaa AQUEOUS model sess costs ssa e s de ba E TNA bebe EA dacs Ladue e Oboe coves EE E Aa TO Ex CHANGE il eta AA In iia E E Aa ERA Surface COMPLEX AMO cosita a tai EGS Sold solutions E E E E a Transport modeling seeniori NA te e
197. UT 75 punch_modulus Printing to the selected output file will occur after every punch_modulus advection shifts Default is 1 Line 9 warnings True or False warnings Identifier enables or disables printing of warning messages for advection calculations In some cases advection calculations could produce many warnings that are not errors Once it is determined that the warnings are not due to erroneous input disabling the warning messages can avoid generating large output files Optionally warnings warning or w arnings True or False If value is true warning messages are printed to the screen and the output file if value is false warning messages are not printed to the screen or the output file The value set with warnings is retained in all subsequent advection simulations until changed Default is true value at beginning of run is true Notes The capabilities available through the ADVECTION data block are a simplified version of a more complete formulation of 1D advective dispersive reactive transport that is presented by Appelo and Postma 1993 and implemented in the TRANSPORT data block Calculations using the ADVECTION keyword are sufficient for initial investigations and in comparison to other problems that include dispersion the calculations are fast For many systems with limited data the kinds of calculations available with ADVECTION are adequate and appropriate The TRANSPORT data block allows modeling of
198. Un e an aa nannaa conos 211 Example 6 Reaction path calculations ooooosssss oon en a aa a ae a E aa naa aa E a naa aa a UL naa naan cnn nono 213 Example 7 Gas phase Calculations i ussssisssss sensa sanaa asin a isken N A Issa aan sikaa EEEa oeieo kassan E REES oiea Eae 221 Example 8 Surface complexa tion 3 sssusa ae pe hiv saana is Senps vaste praderas 224 Example 9 Kinetic oxidation of dissolved ferrous iron with OXYgen uuosussmsesse nenne e a naan an a n a tae aa a n aeeen 230 Example 10 Aragonite strontianite solid solution oooosusss ss e a ne a aan a eaa nan aan an a aan a naa aan nono 234 Example 11 Transport and cation exchange ouussossss eee en e a a na n e eaa recono an aa aan aa an aa naa aan nenas 238 Example 12 Advective and diffusive flux of heat and solutes uusssssss sa e n n an aa aa Anaa taen non nccnnno 242 Example 13 1D transport in a dual porosity column with cation exchange uuuusssse seen ent crn corn ncnnonnos 247 Stagnant zone calculation using the first order exchange approximation with implicit mixing factors 247 Stagnant zone calculation using the first order exchange approximation with explicit mixing factors 249 Stagnant zone calculation using a finite difference approximation coocccccnocnnonnnonnonnnancnnnnnncnnnonnc nn non nc aan naene 251 Example 14 Advective transport cation exchange surface comple
199. X from the default database provided calcium magnesium and sodium are present in solution that would exist in equilibrium with the specified solution solution 1 in this example data block The composition of the solution will not change during this calculation When an exchange assemblage defined as in example data block 1 or example data block 2 is placed in contact with a solution during a batch reaction both the exchange composition and the solution composition will adjust to reach a new equilibrium The exchange ions given by the formulas in Lines 2 are not used in the initial exchange composition calculation However the definition of the exchange ions is important for batch reaction and transport calculations As the reactant either a pure phase or a kinetic reactant dissolves or precipitates the number of exchange sites varies Any new sites are initially filled with the exchangeable ions given in Lines 2 When exchange sites are removed for example when a pure phase dissolves then the net effect is to subtract from the pure phase formula the amount of the exchange ions defined in Lines 2 and add an equivalent amount of ions as defined by the exchanger composition As an example suppose some Ca montmorillonite forms Initially calcium is in the exchange positions but sodium replaces part of the calcium on the exchanger When the montmorillonite dissolves again the calcium in the formula for the phase is added to solution the exchange
200. _k delta_h 14 3 Cl FeCl 2 log_k delta_h 5 6 2 Cl FeC12 log_k 3 Cl Fec13 log_k 504 2 FeSO4 log_k delta_h 3 91 HSO4 FeHSO4 2 log_k 023 kcal 1 48 kcal 2 13 113 4 04 kcal 2 48 2 s04 2 Fe so4 2 log_k delta_h 4 60 HPO4 2 FeHPO4 log_k delta_h 5 76 5 38 kcal 5 43 kcal 673 6 Attachment B Description of Database Files and Listing 297 Fe 3 Fe 3 Fe 3 Fe 3 Mn 2 Mn 2 Mn 2 Mn 2 Mn 2 Mn 2 Mn 2 Mn 2 Mn 2 Mn 2 A1 3 A1 3 A1 3 A1 3 A1 3 H2P04 FeH2P04 2 log_k 5 43 F FeF 2 log_k 6 62 delta_h 2 7 kcal 2 F FeF2 log_k 10 8 delta_h 4 8 kcal 3 F FeF3 log_k 14 0 delta_h 5 4 kcal H20 MnOH H log k 10 590 delta_h 14 400 kcal Cl Mncl log_k 0 610 2 C1 MnC12 log_k 0 250 3 C1 MnC13 log_k 0 310 CO3 2 MnC03 log_k 4 900 HCO3 MnHCO3 log_k 1 95 s04 2 Mnso4 log k 2 250 delta h 3 370 kcal 2 N03 Mn NO3 2 log_k 0 600 delta_h 0 396 kcal F MnF log k 0 840 Mn 3 e log_k 225 510 delta_h 25 800 kcal H20 AlOH 2 H log_k 5 00 delta_h 11 49 kcal analytic 38 253 0 0 656 27 2 H20 Al1l 0H 2 2 H log_k 207 delta h 26 90 kcal analytic 88 500 0 0 9391 6 3 H20 A1 0H 3 3 H log k 16 9 delta_h 39 89 kcal analytic 226 374 0 0 18247 8 4 H20 Al1 0H 4 4 H log_k 22T delta_h 42 30 kcal analytic 51 578 0 0 11168 9 504 2 A1SO4 log_k 350 de
201. a 2Az dina 17 Us Us 2 Mis m lsp Y 09 The second formulation of mass action eguations for surface species excludes the electrostatic potential term in the mass action expression no edl identifier in the SURFACE data block The eguation for the moles of a surface species is the same as eguation 16 except the factor involving Ay does not appear Likewise the total derivative of the moles is the same as eguation 17 except the final term is absent For data input to PHREEOC the chemical eguation for the mole balance and mass action expressions and the log K and its temperature dependence of surface species are defined through the SURFACE SPECIES data block Surface master species or types of surface sites are defined with the SURFACE MASTER SPECIES data block The identity of the surfaces and the number of eguivalents of each site type the composition of the surface the specific surface area and the mass of the surface are defined with the SURFACE data block see Description of Data Input Gas Phase Components Equilibrium between a multicomponent gas phase and the aqueous phase is modeled with heterogeneous mass action eguations and an eguation for total pressure fixed pressure gas phase only Only one gas phase can exist in eguilibrium with the agueous phase but the gas phase may contain multiple components All gas components are assumed to behave ideally and the gas phase is assumed to be an ideal mixture of gas components I
202. a 2 Hfo sOHBa 2 log k 5 46 Hfo wOH Ba 2 Hfo wOBa H log k 7 2 table 10 5 Cations from table 10 2 Se e E Cadmium Hfo_sOH Cd 2 log_k 0 47 Hfo_sOCd H Hfo wOH Cd 2 log_k 22 91 Hfo wOCd H Attachment B Description of Database Files and Listing 305 Zinc Hfo_sOH Zn 2 Hfo sOZn H log_k 0 99 Hfo_wOH Zn 2 Hfo_wOZn H log_k 1 799 Copper Hfo sOH Cu 2 Hfo sOCu H log k 2 89 Hfo wOH Cu 2 Hfo wOCu H log k 0 6 table 10 5 Lead Hfo sOH Pb 2 Hfo sOPb H log k 4 65 Hfo wOH Pb 2 Hfo wOPb H log_k 0 3 table 10 5 Derived constants table 10 5 Magnesium Hfo_wOH Mg 2 Hfo_wOMg H log_k 4 6 Manganese Hfo_sOH Mn 2 Hfo_sOMn H log_k 0 4 table 10 5 Hfo_wOH Mn 2 Hfo_wOMn H log k 3 5 table 10 5 Iron Hfo_sOH Fe 2 Hfo sOFe H log_k 0 7 LFER using table 10 5 Hfo_wOH Fe 2 Hfo_wOFe H log_k 2 5 LFER using table 10 5 AA AA Ea ANIONS Ha A aE a aE a AE AE a A AE aE HE aE a aR A aE EA A EE EH E ste Anions from table 10 6 Phosphate Hfo wOH PO4 3 3H Hfo wH2PO4 H20 log_k 31 29 Hfo wOH PO4 3 2H Hfo wHPO4 H20 log_k 25 39 Hfo wOH PO4 3 H Hfo wP04 2 H20 log k 17 72 Anions from table 10 7 Se e e e Borate Hfo wOH H3BO3 Hfo_wH2BO3 H20 log_k 0 62 Anions from table 10 8 Se e e e Sulfate Hfo_wOH log_k SO4 2 H Hfo_wSO4
203. a block For each model that is found the following values are written to the selected output file 1 the sum of residuals sum of each residual divided by its uncertainty limit and the maximum fractional error 2 for each solution the mixing fraction minimum mixing fraction and maximum mixing fraction and 3 for each phase in the list of phases phase identifier the mole transfer minimum mole transfer and maximum mole transfer Mixing fractions and mole transfers are zero for solutions and phases not included in the model Minimum and maximum values are 0 0 unless the range calculation is performed The result of printing to the selected output file is columns of numbers where each row represents a mole balance model The numerical method for inverse modeling requires consideration of the uncertainties related to aqueous concentrations Uncertainties related to mineral compositions may be equally important but are not automatically considered To consider uncertainties in mineral compositions it is possible to include two or more phases under phases identifier and definitions in PHASES data block that represent end member compositions for minerals The inverse modeling calculation will attempt to find models considering the entire range of mineral composition Usually each model that is found will include only one or the other of the end members but any mixture of inverse models which in this case would represent mixtures of the
204. ability can be obtained by adjusting time step to grid size for the individual parts of the equation Numerical dispersion is minimized by always having the following relationship between time and distance discretization At 108 where Ar is the time step for advective transport and Ax is the cell length Numerical instabilities oscillations in the calculation of diffusion dispersion are eliminated with the constraint 2 Ax 3D Ar p lt 109 where Af is the time step s for dispersive diffusive transport calculations The two conditions of equation 108 and 109 are the Courant condition for advective transport and the Von Neumann criterion for dispersive transport calculations respectively for example Press and others 1992 Numerical dispersion is in many cases negligible when Ax lt a because physical dispersive transport is then equally or more important than advective transport When a fine grid is used to reduce numerical dispersion the time step for dispersive transport calculations egua tion 109 may become smaller than the time step for advective calculations eguation 108 because the first has guadratic dependence on grid size The conflict is solved by multiple dispersion time steps such that Y Ar p At and calculating chemical reactions after each of the dispersion time steps For input to PHRE EQC a time step must be defined which equals the advection time step At or if diffus
205. able 13 Input data set for example 2 TITLE Example 2 Temperature dependence of solubility of gypsum and anhydrite SOLUTION 1 Pure water pH 7 0 temp 25 0 EXAMPLES 203 EQUILIBRIUM_PHASES 1 Gypsum Anhydrite oo af ks oo ere a amp oo REACTION_TEMPERATURE 1 fil 25 0 75 0 in 51 steps SELECTED_OUTPUT x2 sel si anhydrite gypsum A set of 51 temperatures is specified in the REACTION_TEMPERATURE data block The input data specify that for every degree of temperature beginning at 25 C and ending at 75 C the phases defined by EQUILIBRIUM_PHASES gypsum and anhydrite will react to equilibrium if possible or until both phases are completely dissolved Finally SELECTED_OUTPUT is used to write the saturation indices for gypsum and anhydrite to the file ex2 sel after each calculation This file was then used to generate figure 5 0 1 0 amp N x SS n Anhydrite E Q N z Gypsum a 6 5 E 01 x 4 lt Sy 5 x Ea N n x a 0 2 4 0 3 25 30 35 40 45 50 55 60 65 70 75 TEMPERATURE IN DEGREES CELSIUS Figure 5 Saturation indices of gypsum and anhydrite in solutions that have equilibrated with the more stable of the two phases over the temperature range 25 to 75 Celsius The results of the initial solution calculation and the first batch reaction step are shown in table 14 The distribut
206. able 27 Note the activity coefficient or potential term is not included as part of the mass action expression the potential term is added internally by the program The composition and other characteristics of an assemblage of surfaces is defined with the SURFACE data block The composition of multiple surfaces each with multiple binding sites may be defined within this data block For each surface the moles of each type of site the initial composition of the surface and the surface area must be defined The composition of the surfaces will vary with the extent of reactions The number of binding sites and surface areas may remain fixed or may vary if the surface is related to the moles of an equilibrium phase or a kinetic reaction In this example one surface Hfo with two binding sites Hfo_w and Hfo_s is defined and the number of binding sites and surface area are fixed The number of moles of strong binding sites Hfo_s is 5x10 sites and the number of moles of weak binding sites Hfo_w is 2x104 Initially all surface sites are in the uncharged protonated form The surface area for the entire surface Hfo must be defined with two numbers the area per mass of surface material 600 m g in this example and the total mass of surface material 0 09 g in this example The use of these two numbers to define surface area is traditional but only the product of these numbers 228 User s Guide to PHREEQC Version 2 ao J Yo Zn
207. ach cell while maintaining equilibrium with any gas phase or assemblages that are present in the cell see examples 11 12 13 and 15 in Examples Inverse Modeling Inverse modeling is used to deduce the geochemical reactions that account for the change in chemical composition of water along a flow path At least two chemical analyses of water at different points along the flow path are needed as well as a set of phases that are potentially reactive along the flow path From the analyses and phases mole balance models are calculated A mole balance model is a set of mole transfers of phases and reactants that accounts for the change in composition along the flow path Normally only SOLUTION or SOLUTION_SPREAD data blocks and an INVERSE_MODELING keyword data block are needed for inverse modeling calculations However additional reactant phases may need to be defined with PHASES or EXCHANGE SPECIES data blocks see examples 16 17 and 18 in Examples Units The concentrations of elements in solution and the mass of water in the solution are defined through the SOLUTION or SOLUTION_SPREAD data blocks Internally all concentrations are converted to molality and the number of moles of each element in solution including hydrogen and oxygen is calculated from the molalities and the mass of water Thus internally a solution is simply a list of elements and the number of moles of each element PHREEQC allows each reactant to be def
208. action 91 volume Identifier defining the initial volume of the fixed pressure gas phase Optionally volume or v olume volume The initial volume of the fixed pressure gas phase in liters The volume along with temp and partial pressure are used to calculate the initial moles of each gas component in the fixed pres sure gas phase Default is 1 0 liter Line 4 temperature temp temperature Identifier defining the initial temperature of the gas phase Optionally temperature or t emperature temp The initial temperature of the gas phase in Celsius The temp along with volume and partial pressure are used to calculate the initial moles of each gas component in the fixed pressure gas phase Default is 25 0 Line 5 phase name partial pressure phase name Name of a gas component A phase with this name must be defined by PHASES input in the database or input file partial pressure Initial partial pressure of this component in the gas phase in atmospheres The par tial pressure along with volume and temp are used to calculate the initial moles of this gas com ponent in the fixed pressure gas phase Notes 1 Line 5 may be repeated as necessary to define all of the components initially present in the fixed pressure gas phase as well as any components which may subsequently enter the gas phase The initial moles of any gas component that is defined to have a positive partial pressure in GAS_PHASE input will be
209. action This requirement is due to the inclusion of a charge balance constraint for each solution Each solution is adjusted to charge balance for each model by adjusting the concentrations of the elements within their uncertainty limits while minimizing the objective function of the optimization method see Equations and Numerical Method for Inverse Modeling If a solution can not be adjusted to charge balance using the given uncertainty limits the solution will be noted in the output and no models will be found Because all of the solutions are charge balanced in the modeling process phases must also be charge balanced or they will not be included in any models Note that the reaction for plagioclase table 48 is on two lines but the program interprets the two lines to be a single logical line because of the backslash at the end of the first of these two lines The range identifier indicates that in addition to finding all of the inverse models each model that is found will be subjected to additional calculations to determine the range of values that each mole transfer may have within the constraints of the uncertainty limits The following equations are included for every inverse model mole balance for each element or valence state of each element in the system as defined by elements in the phases of phases and each element listed in balances charge balance for each solution alkalinity balance for the system electron bala
210. ad of S 6 or S 2 had been entered then a concentration of S 2 would have been calculated and a saturation index for mackinawite and other sulfide minerals would have been calculated Example 2 Equilibration with Pure Phases This example determines the solubility of the most stable phase gypsum or anhydrite over a range of temperatures The input data set is given in table 13 Only the pH and temperature are used to define the pure water solution Default units are millimolal but no concentrations are specified By default pe is 4 0 the default redox calculation uses pe and the density is 1 0 not needed because no concentrations are per liter All phases that are allowed to react to a specified saturation index during the batch reaction calculation are listed in EQUILIBRIUM_PHASES whether they are initially present or not The input data include the name of the phase previously defined through PHASES input in the database or input file the specified saturation index and the amount of the phase present in moles If a phase is not present initially it is given 0 0 mol in the pure phase assemblage In this example gypsum and anhydrite are allowed to react to equilibrium saturation index equal to 0 0 and the initial phase assemblage has 1 mol of each mineral Each mineral will react either to equilibrium or until it is exhausted in the assemblage In most cases 1 mol of a single phase is sufficient to reach equilibrium T
211. al estimates have been made the distribution of species is calculated for each element except hydrogen and oxygen and in initial solution calculations only for the individual valence states which were defined Subsequently the ratio of the calculated moles to the input moles is calculated If the ratio for a master species m 1s greater than 1 5 or less than 10 the following equation is used to revise the value of the master unknown Nag Voy in k 1 k i Ina Ina wIn r7 5 m 84 where w is 1 0 if the ratio is greater than 1 5 and 0 3 if the ratio is less than 10 and T 15 the total concentration of an element or element valence state Analogous equations are used for exchange and surface master species After revisions to the initial estimates the distribution of species is calculated The iterations continue until the ratios are within the specified ranges at which point the modified Newton Raphson technique is used If the suc cessive revisions fail to find activities such that the ratios are within the specified bounds then a second set of iter ations tries to reduce the ratios below 1 5 with no lower limit to these ratios Whether or not the second set of iterations succeeds the Newton Raphson technique is then used The optimization technique of Barrodale and Roberts 1980 is a modification of the simplex linear programming algorithm that minimizes the sum of absolute values of residuals L1 optimization on a set of
212. alance but also to reproduce as closely as possible the observed 6 13C of the final solution One advantage of the revised mole balance formulation in PHREEQC is that much of the sensitivity analysis that was formerly accomplished by setting up and running multiple models can now be done by including uncertainty limits for all chemical and isotopic data simultaneously For example one run of the revised mole balance formulation determines that no pure Ca Na model can be found even if any or all of the chemical data were adjusted by as much as plus or minus 10 percent This kind of information would be very difficult and time consuming to establish with previous mole balance formulations Another improvement is the explicit inclusion of charge balance constraints In this example including the charge balance constraint requires a change in the exchange reaction and adjustments to solution composition which have the combined effect of lowering the estimated maximum age of the ground water by about 10 000 years If Mg Na exchange is the sole exchange reaction the age would be modern Thus the estimated range in age is large 0 to 13 000 years However because the calcium to magnesium ratio in solution is approximately 2 5 1 and the cation exchange constants for calcium and magnesium are approximately equal Appelo and Postma 1993 the combined exchange reaction with a dominance for calcium is more plausible which gives more credence to the older age Fu
213. all will be 30 User s Guide to PHREEQC Version 2 invalid if the surface area is sufficiently large for a thickness of 1x107 m a surface area of 1000 m results in a dif fuse layer volume of 0 1 L which is a significant portion of 1 L of bulk solution The total derivative of the moles of an aqueous species in the diffuse layer is W Gee W A Ei s 2RT A t dn i TN Joen 2e dinay ni dW tny in 77 r aq 9X aq aq where the second term is the partial derivative with respect to the master unknown for the potential at the surface Indy and the last term is present only jf the number of surface sites is related to the moles of a pure phase or kinetic reactant The partial derivative lt is equal to the integrand from equation 74 evaluated at X 3 OX Le 08 s Xa s 1 X N A surf EX y 57 1 a N 7 78 d s 2 Z1 Xa ym Xd so D l and the partial derivative of the function g with respect to the master unknown is FY FY a 08 S 08 KY 377 377 Xa s 1 aina 3X 2e A sy EX y 71 a 2e 79 Na 1 2 2 ZI Xi ym Xd so 1 1 In the numerical method it is computationally expensive to calculate the functions g so the same approach as Borkovec and Westall 1983 is used in PHREEQC to reduce the number of function evaluations A new level of iterations is added when the diffuse layer is explicitly included in the calculations The functions and their partial derivatives are exp
214. alues included with these two identifiers and 2 the equilibrium constants for the pure phase components The latter are defined by a PHASES data block in the input file or database file DESCRIPTION OF DATA INPUT 147 The parameters for excess free energy are dependent on which component is labeled 1 and which component is labeled 2 It is recommended that the component with the smaller value of log K be selected as component 1 and the component with the larger value of log K be selected as component 2 The excess free energy parameters must be consistent with this numbering A positive value of a nondimensional Guggenheim parameter or g dimensional Guggenheim parameter will result in skewing the excess free energy function toward component 2 and if a miscibility gap is present it will not be symmetric about a mole fraction of 0 5 but instead will be shifted toward component 2 In the calcite dolomite example the positive value of a 1 90 results in a miscibility gap extending almost to pure dolomite mole fractions of miscibility gap are 0 0428 to 0 9991 After a batch reaction with a solid solution assemblage has been simulated it is possible to save the resulting solid solution compositions with the SAVE keyword If the new compositions are not saved the solid solution compositions will remain the same as they were before the batch reaction After it has been defined or saved the solid solution assemblage may be used in subs
215. alytical data such that inverse models are constrained to satisfy mole balance for each element and valence state as well as charge balance for each solution but only within these specified uncertainty limits With version 2 isotope mole balance equations with associated uncertainty limits can be specified but Rayleigh fractionation processes can not be modeled explicitly The input to PHREEQC is completely free format and is based on chemical symbolism Balanced equations written in chemical symbols are used to define aqueous species exchange species surface complexation species solid solutions and pure phases which eliminates all use of index numbers to identify elements or species At present a graphical user interface is available for version 1 Charlton and others 1997 and a graphical user interface with charting options has been released for version 2 PHREEQC for Windows V E A Post written commun 1999 http www geo vu nl users posv phreegc html The free format structure of the data the use of order independent keyword data blocks and the relatively simple syntax facilitate the generation of input data sets with a standard editor The C programing language allows dynamic allocation of computer memory so there are very few limitations on array sizes string lengths or numbers of entities such as solutions phases sets of phases exchangers solid solutions or surfaces that can be defined to the program Program Limitations
216. ame as the previous advective dispersive transport simulation Normally the diffusion coefficient lengths of cells dispersivities and stagnant zone definitions would remain the same through all advective dispersive transport simulations and thus need not be redefined For long advective dispersive transport calculations it may be desirable to save intermediate states in the calculation either because of hardware failure or because of nonconvergence of the numerical method The dump_frequency identifier allows intermediate states to be saved at intervals during the calculation The dump identifier allows the definition of a file name in which to write these intermediate states The dump file is formatted as an input file for PHREEQC so calculations can be resumed from the point at which the dump file was made The dump_restart identifier allows a shift number to be specified from which to restart the calculations Example problems The keyword TRANSPORT is used in example problems 11 12 13 and 15 Related keywords ADVECTION EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE KINETICS MIX PRINT REACTION REACTION_TEMPERATURE SAVE SELECTED_OUTPUT SOLID_SOLUTIONS SOLUTION and SURFACE 180 User s Guide to PHREEQC Version 2 USE This keyword data block is used to specify explicitly which solution exchange assemblage pure phase assemblage solid solution assemblage and surface assemblage are to be used in the batch reaction calculation of
217. amples of input data sets and model results that demonstrate many of the capabilities of the program EQUATIONS FOR SPECIATION AND FORWARD MODELING In this section of the report the algebraic equations used to define thermodynamic activities of aqueous species ion exchange species surface complexation species gas phase components solid solutions and pure phases are presented First thermodynamic activities and mass action equations are described for aqueous exchange and surface species Then a set of functions denoted f are defined that must be solved simultaneously to determine equilibrium for a given set of conditions Many of these functions are derived from mole balance equations for each element or element valence state exchange site and surface site or from mass action equations EQUATIONS FOR SPECIATION AND FORWARD MODELING 9 for pure phases and solid solutions Additional functions are derived for alkalinity activity of water aqueous charge balance gas phase equilibria ionic strength and surface complexation equilibria Each function is reduced to contain a minimum number of variables such that the number of functions equals the number of variables The program uses a modified Newton Raphson method to solve the simultaneous nonlinear equations This method uses the residuals of the functions and an array of partial derivatives of each function with respect to the set of master unknowns or master unknowns For clarity the se
218. an uncertainty limit of 2 per cent of the moles of each element in solution will be used and 2 if the uncertainty limit is neg ative it is interpreted as an absolute value in moles to use for each mole balance constraint The second form is rarely used in uncertainty input In this example data block the default uncer tainty limit for the first solution is set to 0 02 which indicates that the concentration of each ele ment in the first solution solution 10 is allowed to vary up to plus or minus 2 percent and a default uncertainty limit of 4 percent will be applied to each element and valence state in the sec ond solution solution 3 and all remaining solutions solution 5 in this case Line 3 phases phases Identifier that indicates a list of phases to be used in inverse modeling follows on succeeding lines Optionally phase phase_data p hases or p hase_data Note the hyphen is required in phases to avoid conflict with the keyword PHASES Line 4 phase name force dissolve or precipitate list of isotope name isotope ratio isotope uncertainty limit phase name Name of a phase to be used in inverse modeling The phase must be defined in PHASES input or it must be a charge balanced exchange species defined in EXCHANGE_SPECIES input Any phases and exchange species defined in the database file or in the current or previous simulations are available for inverse modeling Only the chemical reaction in PHASES or EXCHANGE_SPECI
219. ange species is by default assumed to be equal to the equivalent fraction of the species relative to the total equivalents of exchanger The gamma identifier allows the equivalent fraction to be multiplied by an activity coefficient to obtain the activity of an exchange species This activity coefficient is identical to the activity coefficient for an aqueous species calculated by using the WATEQ Debye Hiickel equation The Davies equation can be used to calculate the activity coefficient of the exchange species by specifying the davies identifier The use of these equations is strictly empirical and is motivated by the observation that these activity corrections provide a better fit to some experimental data Temperature dependence of log K can be defined with the standard enthalpy of reaction identifier delta_h using the van t Hoff equation or with an analytical expression analytical_expression See SOLUTION_SPECIES or PHASES for examples The identifier no_check can be used to disable checking charge and elemental balances see SOLUTION_SPECIES The use of no_check is not recommended By default the equation given for the exchange species line 1 is used to determine the mass action equation and the contribution of the species to each DESCRIPTION OF DATA INPUT 89 mole balance equation Alternatively the contribution of the species to each mole balance equation can be defined using the mole_balance identifier See SOLUTION_SPECIES an
220. are relative to the phase not relative to solution The second and third columns of mole transfers are the minimum and maximum mole transfers of each phase that can be attained within the constraints of the specified uncertainty limits These two columns are nonzero only if the range identifier is used In general these minima and maxima are not independent that is obtaining a maximum mole transfer of one phase places very strong constraints on the mole transfers of the other phases in a mole balance model No redox mole transfers were calculated in this inverse model If any redox mole transfers had been calculated the moles transferred between valence states of each element would be printed under the heading Redox mole transfers The next block of data prints results related to the extent to which the analytical data were adjusted for this model if no adjustments were made all three quantities that are printed would be zero First the sum of residuals is printed which is a sum of the uncertainty unknowns weighted by the inverse of the uncertainty limit a6 A Em B4 TLL 24 Next a sum of the adjustment to each element concentration and isotopic com g m m q m m q position that is weighted by the inverse of the uncertainty limit is printed ID Sm Sum of delta uncertainty qm Um q limit Finally the maximum fractional adjustment to any element or isotopic composition in any solution is printed Maximum fractiona
221. area 110 Calculate forward rate 130 Calculate overall rate factor of 1e 3 converts rate to moles from millimoles 140 Calculate moles of reaction over time interval given by TIME Note that the multiplication of the rate by TIME must be present in one of the Basic lines 200 Return moles of reaction for time subinterval with SAVE A SAVE statement must always be present in a rate pro gram 2 IAP y Reatcire 1 z 156 Calcite d f K calcite where R Calcite 18 mmol em sl Equation 156 is implemented in Basic for the first example above Explanations of the Basic lines for this rate expression are given in table 6 The second example is for the dissolution of pyrite in the presence of dissolved oxygen from Williamson and Rimstidt 1994 1971019 0 5 yy 70 11 R Pyrite Ox qq H 157 where parentheses indicate molality This rate is based on detailed measurements in solutions of varying compo sitions and shows a square root dependence on the molality of oxygen and a small dependence on pH This rate is Table 7 Description of Basic program for pyrite dissolution kinetics given in example for RATES data block Line number Function 1 4 Comments 10 Checks that pyrite is still available otherwise exits with value of moles 0 by default 20 Checks that the solution is undersaturated the rate is for dissolution only otherwise exits with value of moles 0 30 40 Calculate log of the rate of py
222. ariable controlled by time in SELECTED OUTPUT data block Optionally initial time or i nitial_time initial_time Time seconds at the beginning of the advection simulation Default is the cumulative time including all preceding ADVECTION simulations for which time_step has been defined and all preceding TRANSPORT simulations Line 5 print_cells list of cell numbers print_cells Identifier to select cells for which results will be written to the output file If print_cells is not included results for all cells will be written to the output file Once print_cells is defined the list of cells will be used for all subsequent advection simulations until the list is redefined Optionally print_cells or pr int_cells Note the hyphen is required in print to avoid a conflict with the keyword PRINT list of cell numbers Printing to the output file will occur only for these cell numbers The list of cell numbers must be delimited by spaces or tabs and may be continued on the succeeding line s A range of cell numbers may be included in the list in the form m n where m and n are positive inte gers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default 1 cells Line 6 print_frequency print_modulus print_frequency Identifier to select shifts for which results will be written to the output file Once defined the print frequency will be used for all subsequent advection simulations until it is re
223. ary master species are the only agueous species that contain electrons in their chemical reaction Additional hydroxide and carbonate complexes are defined for the 4 and 6 valence states but none for the 5 state Finally a new phase uraninite is defined with PHASES input This phase will be used in calculating saturation indices in speciation modeling but could also be used without redefinition for batch reaction transport or inverse calculations within the computer run Table 12 Output for example 1 Input file exl Output file exl out Database file phreegc dat SOLUTION_MASTER_SPECIES SOLUTION_SPECIES PHASES EXCHANGE_MASTER_SPECIES EXCHANGE_SPECIES SURFACE_MASTER_SPECIES SURFACE_SPECIES RATES TITLE Example 1 Add uranium and speciate seawater SOLUTION 1 SEAWATER FROM NORDSTROM ET AL 1979 units ppm pH 8 22 pe 8 451 density 1 023 temp 25 0 redox 0 0 0 2 Ca 412 3 Mg 1291 8 Na 10768 0 K 399 1 Fe 0 002 Mn 0 0002 pe Si 4 28 cl 19353 0 Alkalinity 141 682 as HCO3 S 6 2712 0 N 5 0 29 gfw 62 0 N 3 0 03 as NH4 U 3 3 ppb N 5 N 3 o 0 1 0 02 g 0 7 EXAMPLES 199 SOLUTION_MASTER_SPECIES U U 4 0 0 238 0290 238 0290 U 4 U 4 0 0 238 0290 U 5 U02 0 0 238 0290 U 6 U02 2 0 0 238 0290 SOLUTION_SPECIES U 4 U 4 log_k 0 0 U 4 4 H20 U OH 4 4 H log_k 8 538 delta_h 24 760 kcal U 4 5 H20 U OH 5 5 H log_k 13 147 delta_h 27 580 kcal U 4 2 H20 UO2 4 H
224. as 0 Line 29 inverse_modeling True or False inverse modeling Prints results of inverse modeling to the selected output file if value is true excludes print if value is false For each inverse model three values are printed for each solution and phase defined in the INVERSE_MODELING data block the central value of the mixing fraction or mole transfer and the minimum and maximum of the mixing fraction or mole trans fer which are zero unless range is specified in the INVERSE_MODELING data block Default is true Initial value at start of program is true Optionally inverse or i nverse modeling Note the hyphen is required to avoid a conflict with the keyword INVERSE_MODELING Notes The selected output file contains a column for each data item defined through the identifiers of SELECTED OUTPUT Additional columns may be defined through the USER PUNCH data block In the input for the SELECTED_OUTPUT data block all element names species names and phase names must be spelled exactly including the case and charge for the species names One line containing an entry for each of the items will be written to the selected output file after each calculation that is after any initial solution initial exchange composition initial surface composition or initial gas phase composition calculation and after each step in batch reaction or each shift in transport calculations The selected_output identifier in the PRINT data block can be used to
225. at indicate infeasible solutions The remedy to these problems is an ongoing investigation but altering tolerance or diagonal_scaling sometimes fixes the problem and it should be noted that the program attempts several combinations of these parameters automatically before terminating the calculations Additional iterations iterations beyond 200 usually do not solve nonconvergence problems A trick that is sometimes helpful with nonconvergence is to include the following fictitious aqueous species that has a concentration of about 1e 9 and produces terms in the charge hydrogen and oxygen balance equations of a magnitude great enough for the solver to solve the equations SOLUTION_SPECIES H20 0 01 H20 0 01 log_k 9 0 If the numerical method does not converge with the original set of convergence parameters either default or user specified six additional sets of parameters are tried automatically to obtain convergence 1 iterations is doubled and smaller values for step_size and pe_step_size are used 2 iterations is doubled and the value of diagonal_scale is switched from false to true or from true to false 3 iterations is doubled and tol is decreased by 114 User s Guide to PHREEOC Version 2 a factor of 10 0 4 iterations is doubled and tol is increased by a factor of 10 0 5 iterations is doubled diagonal_scale is switched and tol is decreased by a factor of 10 0 and 6 iterations is double
226. ata to describe the thermodynamics and composition of aqueous uranium species must be included in the input data when using this database file Two keyword data blocks are needed to define the uranium species SOLUTION_MASTER_SPECIES and SOLUTION_SPECIES By adding these two data blocks to the input data file aqueous uranium species will be defined for the duration of the run To add uranium permanently to the list of elements these data blocks should be added to the database file The data for uranium shown here are intended to be illustrative and are not a complete description of uranium speciation It is necessary to define a primary master species for uranium with SOLUTION MASTER SPECIES input Because uranium is a redox active element it is also necessary to define a secondary master species for each valence state of uranium The data block SOLUTION MASTER SPECIES table 11 defines U as the primary master species for uranium and also as the secondary master species for the 4 valence state UO is the secondary master species for the 5 valence state and U0 is the secondary master species for the 6 valence state Eguations defining these agueous species plus any other complexes of uranium must be defined through SOLUTION SPECIES input In the data block SOLUTION SPECIES table 11 the primary and secondary master species are noted with comments A primary master species is always defined in the form of an identity reaction U 4 U 4 Second
227. ate ground water B defines seawater C performs mixing with no other mole transfer D equilibrates the mixture with calcite and dolomite and E equilibrates the mixture with calcite only Mole transfer is relative to the moles in the phase assemblage positive numbers indicate an increase in the amount of the phase present that is precipitation negative numbers indicate a decrease in the amount of the phase present or dissolution Saturation index indicates saturation index calculation not possible because one of the constituent elements was not in solution Mole transfer indicates no mole transfer of this mineral was allowed in the simulation Saturation index Mole transfer millimoles Simulation pH log Pog Calcite Dolomite CO Calcite Dolomite A 7 297 2 00 0 00 1 976 1 646 B 8 220 3 38 76 2 41 C 7 351 2 23 10 52 D 7 056 1 98 00 00 15 71 7 935 E 7 442 2 31 00 73 040 Selected results from the output for example 3 are presented in table 16 The ground water produced by part A is in equilibrium with calcite and has a log P co of 2 0 as specified by the input The moles of CO in the 208 User s Guide to PHREEOcC Version 2 phase assemblage decreased by about 2 0 mmol which means that about 2 0 mmol dissolved into solution Likewise about 1 6 mmol of calcite dissolved Part B defined seawater which is calculated to have slightly greater than atmospheric carbon diox
228. ately 50 04 g eq redox couple Redox couple to use for the element or element valence states in element list Definition of a redox couple is appropriate only when the element being defined is redox active and either 1 the total amount of the element is specified no parentheses in the element name or 2 two or more valence states are specified a valence state is defined in parentheses following element name definition of a redox couple is not needed for non redox active elements or for individual valence states of an element Initial solution calculations do not require redox equilibrium among all redox couples of all redox elements Specifying a redox couple will force selective redox equi librium the redox element being defined will be in equilibrium with the specified redox couple A redox couple is specified by two valence states of an element separated by a No spaces are allowed The specified redox couple overrides the default pe or default redox couple and is used to calculate a pe by which the element is distributed among valence states If no redox couple is entered the default redox couple defined by line 4 will be used or the pe if line 4 is not entered charge Indicates the concentration of this element will be adjusted to achieve charge balance The ele ment must have ionic species If charge is specified for one element it may not be specified for pH or any other element Note that it is possible to have a greater charg
229. ater in solution 2 Halite precipitates 19 75 mol and gypsum precipitates 0 48 mol during the evaporation process Note that these mole transfers are relative to 88 kg of water To find the loss per kilogram of water in Black Sea water it is necessary to divide by the mixing fraction of solution 1 The result is that 54 9 mol of water 0 0004 mol of calcite 0 0004 mol carbon dioxide 0 0054 mol of gypsum and 0 22 mol of halite have been removed per kilogram of Black Sea water This calculation could be accomplished by making solution 1 from solution 2 taking care to reverse the constraints on minerals from precipitation to dissolution All other ions magnesium potassium and bromide are conservative within the 2 5 percent uncertainty limit that was specified The inverse modeling shows that with the given uncertainty limits evaporation loss of water carbon dioxide outgassing and calcite halite and gypsum precipitation are sufficient to account for all of the changes in major ion composition between the two solutions Table 51 Selected output for example 17 Solution 1 Black Sea water Input Delta Input Delta pH 8 000e 00 0 000e 00 8 000e 00 Alkalinity 8 625e 04 0 000e 00 8 625e 04 Br 4 401e 04 0 000e 00 4 401e 04 C 4 0 000e 00 0 000e 00 0 000e 00 C 4 8 284e 04 0 000e 00 8 284e 04 Ca 5 841e 03 0 000e 00 5 841e 03 cl 2 930e 01 7 845e 04 2 938e 01 H 0 0 000e 00 0 000e 00 0 000e 00 K 4 959e
230. ation Services Box 25286 Denver Federal Center Denver CO 80225 0286 For additional information write to the address on page ii of this report Installation and Execution of the Win32 Version The Win32 version of PHREEOC reguires Windows 9x or Windows NT The installation file phrgc2xx exe where xx is the version number obtained by downloading from a web page or anonymous ftp will install the necessary files to run PHREEOC Optionally the installation program will modify the user s path to allow PHREEOC to run from any directory The installation will install all of the files of the program distribution into a user supplied directory name default cwsgsyphreeqc The executable file phreegc exe will be installed in the subdirectory src Release relative to the installation directory A batch file phreeqc bat will be installed in the installation directory along with the database files phreegc dat wateg4f dat and minteg dat The source code is installed in the subdirectory src relative to the installation directory An example file for each problem described in the Examples section of this manual is copied into the subdirectory examples relative to the installation directory The version of PHREEOC described here is a batch oriented program that reguires an input file that describes the calculations to be made an output file name to store results and a database file To run any of the input files in the examples subdirectory change
231. ation changes shown in figure 11 The differences between the two simulations are due entirely to the inclusion of dispersion in the TRANSPORT calculation The breakthrough curve for chloride in the TRANSPORT calculation coincides with an analytical solution to the advection dispersion equation for a conservative solute Appelo and Postma 1993 p 433 Without dispersion the ADVECTION calculation produces a square wave breakthrough curve for chloride The characteristic smearing effects of dispersion are absent in the fronts calculated for the other elements as well although some curvature exists due to the effects of the exchange reactions The peak potassium concentration is larger in the ADVECTION calculation because the effects of dispersion are neglected Example 12 Advective and Diffusive Flux of Heat and Solutes The following example demonstrates the capability of PHREEQC to calculate transient transport of heat and solutes in a column or along a 1D flowline A column is initially filled with a dilute KCI solution at 25 C in equilibrium with a cation exchanger A KNO solution then advects into the column and establishes a new temperature of 0 C Subsequently a sodium chloride solution at 24 C is allowed to diffuse from both ends of the column assuming no heat is lost through the column walls At one end a constant boundary condition is imposed and at the other end the final cell is filled with the sodium chloride solution and a closed b
232. be calculated in the same algorithm for both mass and heat while thermal diffusion may require an additional calculation when it exceeds hydrodynamic diffusion When temperatures are different in the column and when the thermal diffusion coefficient is larger than the hydrodynamic diffusion coefficient PHREEQC first calculates for one time step the temperature distribution and the chemical reactions due to thermal diffusion in excess of the hydrodynamic diffusion Subsequently PHREEQC calculates transport for the combination of heat and mass due to hydrodynamic diffusion for the time step The temperature retardation factor and the thermal diffusion coefficient must be defined in the input file identifier thermal_diffusion in keyword TRANSPORT Both parameters may vary in time but are uniform and temperature independent over the flow domain The similarity between thermal and hydrodynamic transport is an approximation which mainly falls short because diffusion of mass is by orders of magnitude larger in water than in minerals whereas diffusion of heat is comparable in the two media although often anisotropic in minerals The small difference in thermal diffusivity leads to complicated heat transfer at phase boundaries which is not accounted for by PHREEQC Also PHREEQC does not consider the convection that may develop in response to temperature gradients Transport in Dual Porosity Media Water in structured soils and in solid rock has often a
233. be present initially but the component will enter the gas phase when in contact with a solution containing the component Example data block 3 Fixed volume gas phase Define initial moles of components by equilibrium with a solution Line 0 GAS PHASE 1 5 Air Line 1 fixed volume Line 2 eguilibrium with solution 10 Line 3 volume 1 0 Line 4a CH4 g Line 4b CO2 g Line 4c 02 g Line 4d N2 g Explanation 3 Line 0 GAS_PHASE number description GAS_PHASE is the keyword for the data block number Positive number to designate the following gas phase and its composition A range of num bers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the gas phase Line 1 fixed_volume fixed volume Identifier defining the gas phase to be one that has a fixed volume not a gas bubble A fixed pressure gas phase is the default if neither the fixed_pressure nor the fixed_volume identifier is used Optionally fixed volume or fixed v olume Line 2 eguilibrium number eguilibrium Identifier indicates that the fixed volume gas phase is defined to be in eguilibrium with a solution of a fixed composition This identifier may only be used with the fixed volume iden tifier Optionally equil equilibrium e guilibrium equilibrate e guilibrate num
234. bed in table 23 The functions PUT GET and EXISTS are used to manipulate data in static global storage The subscripts used in the PUT statement identify a datum uniquely EXISTS can be used to determine if a datum with a given set of subscripts has been stored and GET is used to retrieve data that have been stored Once a datum has been stored with PUT it exists for the remainder EXAMPLES 219 Table 23 Description of Basic program for K feldspar dissolution kinetics and identification of phase transitions Line number Function 20 Save initial amount of K feldspar 1 94 moles 40 50 Integrates K feldspar dissolution rate over time interval given by TIME 90 110 Identify greatest amount of K feldspar present least amount of reaction at which gibbsite is saturated 160 180 Identify greatest amount of K feldspar present at which kaolinite is saturated 200 230 Identify greatest amount of K feldspar present at which kaolinite is saturated but gibbsite is absent 250 280 Identify greatest amount of K feldspar present at which K mica is saturated 300 330 Identify greatest amount of K feldspar present at which K mica is saturated but kaolinite is absent 350 380 Identify greatest amount of K feldspar present at which K feldspar is saturated 1000 Save integrated reaction 1010 End of Basic program 1500 1560 Subroutine for saving values for phase transitions If amount of K feldspar is greater than current saved value for the index i sav
235. ber Solution number with which the fixed volume gas phase is to be in equilibrium Any alpha betic characters following the identifier and preceding an integer with solution in line 2 are ignored Line 3 volume volume volume Identifier defining the volume of the fixed volume gas phase which applies for all batch reaction or transport calculations Optionally volume or v olume volume The volume of the fixed volume gas phase in liters Default is 1 0 liter Line 4 phase name phase name Name of a gas component A phase with this name must be defined by PHASES input in the database or input file 94 User s Guide to PHREEQC Version 2 Notes 3 Line 4 may be repeated as necessary to define all of the components that may be present in the fixed volume gas phase The equilibrate identifier specifies that the initial moles of the gas components are to be calculated by equilibrium with solution 10 This calculation is termed an initial gas phase composition calculation During this calculation the composition of solution 10 does not change only the moles of each component in the gas phase are calculated A constant volume gas phase always exists unless all of the gas components are absent from the system When the equilibrate identifier is used the identifiers pressure and temperature are not needed and initial partial pressures for each gas component need not be specified the partial pressures for the gas components
236. bonate species is the master species for alkalinity Conceptually a measured alkalinity differs from the alkalinity calculated by PHREEQC In the default database files for PHREEQC the values of b Iki have been chosen such that the reference state b 4 his 0 for each element or element valence state is the predominant species at a pH of 4 5 It is assumed that all of the element or element valence state is converted to this predominant species in an alkalinity titration However significant concentrations of aqueous species that are not in the reference state that is species that have nonzero alkalinity contributions may exist at the endpoint of a titration and the extent to which this occurs causes the alkalinity calculated by PHREEQC to be a different quantity than the measured alkalinity Hydroxide complexes of iron and aluminum are the most common examples of species that may not be converted to the defined reference state Thus the alkalinity of a solution as calculated by PHREEQC though it will be numerically equal to the measured alkalinity is an approximation because of the assumption that a titration totally converts elements and element valence states to 24 User s Guide to PHREEQC Version 2 their reference state In most solutions where the alkalinity is derived predominantly from carbonate species the approximation is valid For data input to PHREEQC the alkalinity of each species is calculated from the association reaction
237. ced chemical reaction that defines the species in the SURFACE SPECIES data block see Description of Data Input Surface Charge Balance Equation with Explicit Calculation of the Diffuse Layer Composition As an alternative to the previous model for the surface charge potential relation PHREEQC optionally will use the approach developed by Borkovec and Westall 1983 Their development solves the Poisson Boltzmann equation to determine surface excesses of ions in the diffuse layer at the oxide electrolyte interface Throughout the derivation that follows it is assumed that a volume of one liter L contains 1 kg of water The surface excess is co Tys c 60 c ex 71 Xq 25 where I is the surface excess in mol m of aqueous species i on surface s xy is the location of the outer Helmholtz plane c x is concentration as a function of distance from the surface in mol m and ci is the con centration in the bulk solution The surface excess is related to concentration in the reference state of 1 0 kg of water by Mis As 72 i S where m is the surface excess of aqueous species i in moles per kilogram water mol kgw This surface excess concentration can be related to the concentration in the bulk solution by EOUATIONS FOR SPECIATION AND FORWARD MODELING 29 m s Si si gt 73 where Es is a function of the potential at the surface and the concentrations and charges of all ions in the bulk
238. ces is physically incorrect Consider the following where a charge balanced surface is brought together with a charge balanced solution Assume a positive charge develops at the surface Now remove the surface from the solution With the present formulation a positive charge imbalance is associated with the surface Z and a negative charge imbalance Z 01n surrounding it would be electrically neutral and both should be removed when the surface is removed from is associated with the solution In reality the charged surface plus the diffuse layer solution This would leave an electrically neutral solution The default formulation is workable its main defect is that the counter ions that should be in the diffuse layer are retained in the solution The model results are adequate provided solutions and surfaces are not separated or the exact concentrations of aqueous counter ions are not critical to the investigation The diffuse_layer identifier is a switch that activates a different model to account for the accumulation of surface charge When the diffuse_layer identifier is used the composition of the diffuse layer is calculated and an additional printout of the elemental composition of the diffuse layer is produced The moles of each aqueous species in the diffuse layer are calculated according to the method of Borkovec and Westall 1983 and the assumption that the diffuse layer is a constant thickness optional input with diffuse_layer defa
239. changes in the moles of each element by the dissolution or precipitation of minerals Garrels and Mackenzie 1967 Parkhurst and others 1982 Previous approaches have also included equations to account for mixing conservation of electrons which forces oxidative reactions to balance reductive reactions and isotope mole balance Plummer and Back 1980 Parkhurst and others 1982 Plummer and others 1983 Plummer 1984 Plummer and others 1990 Plummer and others 1991 and Plummer and others 1994 Equations and Inequality Constraints PHREEQC expands on previous approaches by the inclusion of a more complete set of mole balance equations and the addition of inequality constraints that allow for uncertainties in the analytical data Mole balance equations are included for 1 each element or for a redox active element each valence state of the element 2 alkalinity 3 electrons which allows redox processes to be modeled 4 water which allows for evaporation and dilution and accounts for water gained or lost from minerals and 5 each isotope Parkhurst 1997 Also included are 6 a charge balance equation for each aqueous solution and 7 an equation that relates uncertainty terms for pH alkalinity and total dissolved inorganic carbon for each solution Furthermore inequalities are used 8 to constrain the size of the uncertainty terms within specified limits and 9 to constrain the sign of the mole transfer of reactants The u
240. cies for Fe 3 is Fe The correspondence between master species and elements and element valence states is defined by the SOLUTION_MASTER_SPECIES data block The chemical equations for the master species and all other aqueous species are defined by the SOLUTION_SPECIES data block Conventions for Documentation The descriptions of keywords and their associated input are now described in alphabetical order Several formatting conventions are used to help the user interpret the input requirements Keywords are always capitalized and bold Words in bold must be included literally when creating input data sets although upper and lower case are interchangeable and optional spellings may be permitted Identifiers are additional keywords that apply only within a given keyword data block they can be described as sub keywords Temperature is an identifier for SOLUTION input Each identifier may have two forms 1 the identifier word spelled exactly for example temperature or 2 a hyphen followed by a sufficient number of characters to define the identifier uniquely for example t for temperature The form with the hyphen is recommended Words in italics are input values that are variable and depend on user selection of appropriate values Items in brackets are optional input fields Mutually exclusive input fields are enclosed in parentheses and separated by the word or In general the optional fields in a line must be ente
241. ciety Symposium Series 416 p 104 116 Yanenko N 1971 The method of fractional steps Springer New York Yeh G T and Tripathi V S 1989 A critical evaluation of recent developments in hydrogeochemical transport models of reac tive multichemical components Water Resources Research v 25 p 93 108 REFERENCES CITED 287 Attachment A Listing of Notation gt gt S S oO S S R R gt gt gt gt S a a ot m g oO SS S S 3 surf m i m i s m p S m Pss S S Lis E a on 3 k Temperature dependent constant in the activity coefficient equation Initial surface area of kinetic reacting solid m Interfacial area between cells i and j m3 Specific surface area of a surface that is related to a pure phase or kinetic reactant m mol Specific surface area of surface s m g Surface area of a surface complexation material m Temperature dependent constant for diffuse layer surface model 0 02931 L mol C m at 25 C Factor for mobile immobile exchange s Dispersivity m Mole transfer of phase p into positive or out of negative solution mol Mixing fraction for agueous phase g Aqueous transfer of an element between valence states mol Activity of the master species for alkalinity Activity of the master species for exchanger e Ion size parameter for aqueous species i for extended Debye Hiickel equation
242. coefficients for components 1 and 2 are used to calculate dimensional Guggenheim parameters Optionally activity coefficients or a ctivity coefficients A comp Activity coefficient for component 1 in the solid solution No default Pr A comp Activity coefficient for component 2 in the solid solution No default P2 x Mole fraction of component 2 for which a applies No default comp X2 Mole fraction of component 2 for which a applies No default comp Line 10 distribution_coefficients k k x7 x2 distribution_coefficients Two distribution coefficients are used to calculate dimensional Guggen heim parameters Optionally distribution_coefficients or d istribution_coefficients k Distribution coefficient of component 2 at mole fraction x of component 2 expressed as X2 X1 aa where x is the mole fraction in the solid and a is the aqueous activity No default 0 k Distribution coefficient of component 2 at mole fraction x of component 2 expressed as above No default xj Mole fraction of component 2 for which k applies No default X2 Mole fraction of component 2 for which k applies No default Line 11 miscibility gap x x2 miscibility gap The mole fractions of component 2 that delimit the miscibility gap are used to cal culate dimensional Guggenheim parameters Optionally miscibility gap or mliscibility gap x Mole fraction of component 2 at one end of the miscibility
243. compile the programs using make By default the makefile named src Makefile uses gcc as the compiler Change the variables CC and CCFLAGS in the makefile to be consistent with the C compiler on your system if necessary The following commands will create an executable file named bin phreeqc cd sre make 8 User s Guide to PHREEOc Version 2 4 Install the script to run PHREEQC The makefile edits a template of the script bin phreegc orig to contain the complete pathname to the installation directory and places the edited script in the installation directory A symbolic link that points to the script is then placed in a directory specified by the user frequently usr bin The directory in which the symbolic link is installed is assumed to be included in your PATH environmental variable so that the PHREEQC will run regardless of the directory from which it is invoked The default directory in which the symbolic link is installed is HOME bin The following command installs a symbolic link in HOME bin make install The following command installs the script in the specified directory make install BINDIR usr local bin 5 The environmental variable PHREEQC_DATABASE can be used to specify the default database In the shell csh this variable can be set with the command setenv PHREEQC_DATABASE home jdoe local project mydata dat In the Bourne or Korn shell this variable can be set with the command export
244. compiled using long double precision Line 12 force solutions list of True or False force solutions Identifier that indicates one or more solutions will be forced to be included in all range calculations Optionally force solution force solutions or force solutions list of True or False True values include initial solutions in all range calculations It is possible to input a True or False value for each initial solution used in inverse modeling If fewer values are entered than the number of initial solutions solutions identifier then the final value in the list is used for the remaining initial solutions Thus if only one True or False value is entered itis used for all initial solutions In the example data block line 12 solution 10 will be included in all range calculations for all models even if a model does not include solution 10 mixing fraction of zero the range calculation will allow for nonzero mixing fractions of solution 10 in calculating the minimum and maximum mole transfers of phases Solutions 3 and 5 will be included in range calculations only for models that have a nonzero mixing fractions for these solutions Line 13 uncertainty water moles uncertainty water Identifier for uncertainty term in the water balance eguation For completeness in the formulation of inverse modeling an uncertainty term can be added to the water balance eguation The sum of the moles of water derived from each initial solution
245. component in the gas phase is equal to the fraction of the total pressure for the gas times the total moles of gas in the gas phase 16 User s Guide to PHREEOc Version 2 M aq n N E 808 TT gins 23 as m N E j P rotat Protatk g ni The total derivative of the moles of a gas component in the gas phase is P Mos E dn 5 AN gas Y oy l 24 tota m For data input to PHREEOC the mass action eguations Henry s law constant and temperature dependence of the constant are defined with the PHASES data block The type of gas phase fixed volume or fixed pressure the components to include in gas phase calculations and initial gas phase composition are defined with the GAS PHASE data block see Description of Data Input Equations for the Newton Raphson Method A series of functions denoted by f are used to describe heterogeneous equilibrium These equations are derived primarily by substituting the equations for the moles of species derived from mass action equations in the previous section into mole and charge balance equations When equilibrium is satisfied all of the functions relevant to a specific equilibrium calculation are equal to zero The zeros of the functions are found by the Newton Raphson method by which each function is differentiated with respect to each master unknown to form the Jacobian matrix A set of linear equations is formed from the Jacobian matrix that can be solved to approximate a s
246. components n appear in the mole balance equations for elements and the terms dn g appear in the Jacobian matrix for the mole balance equations No additional equation labeled f is required to calculate equilibrium with the fixed volume gas phase For data input to PHREEQC the mass action equations Henry s law constant and temperature dependence of the constant are defined with the PHASES data block The type of gas phase fixed volume or fixed pressure the components to include in gas phase calculations and initial gas phase composition are defined with the GAS_PHASE data block see Description of Data Input Equilibrium with a Fixed Pressure Multicomponent Gas Phase For a fixed volume gas phase the number of moles of each gas component is calculated from the activities of the aqueous master species and the total moles of gas components in the gas phase N The terms for the moles of each gas components n appear in the mole balance equations for elements and the terms dn g appear in the Jacobian matrix for the mole balance eguations Eguilibrium between a fixed pressure multicomponent gas phase and the agueous phase reguires one new eguation the sum of the partial pressures of the component gases is egual to the total pressure P ota The function fp is defined as total N S om P otal n E 31 g where N i is the total number of gas components in the gas phase The total derivative of fp with respect to the master u
247. composition is not saved the surface composition will remain the same as it was initially defined before the batch reaction calculations After it has been defined or saved the surface composition may be used in subseguent simulations through the USE keyword In ADVECTION and TRANSPORT simulations the surface assemblages in the column are automatically updated after each shift DESCRIPTION OF DATA INPUT 167 Example problems The keyword SURFACE is used in example problems 8 and 14 Related keywords ADVECTION SURFACE MASTER SPECIES SURFACE SPECIES SAVE surface TRANSPORT and USE surface 168 User s Guide to PHREEQC Version 2 SURFACE_MASTER_SPECIES This keyword data block is used to define the correspondence between surface binding site names and surface master species Normally this data block is included in the database file and only additions and modifications are included in the input file The default databases contain master species for Hfo_s and Hfo_w which represent the weak and strong binding sites of hydrous ferric oxides Dzombak and Morel 1990 Example data block Line 0 SURFACE MASTER SPECIES Line la Surf s Surf sOH Line 1b Surf_w Surf_wOH Explanation Line 0 SURFACE_MASTER_SPECIES Keyword for the data block No other data are input on the keyword line Line 1 surface binding site name surface master species surface binding site name Name of a surface binding site It must begin with a capi
248. computed using the ideal gas law n PV RT where n is the moles of the gas P is the defined partial pressure line 5 V is given by volume and T is given by temperature converted to Kelvin It is likely that the sum of the partial pressures of the defined gases will not be equal to the pressure given by pressure However when the initial moles of gas components are brought in contact with a solution during a batch reaction simulation the moles of gases and volume of the gas phase will adjust so that each component is in equilibrium with the solution and the total pressure sum of the partial pressures is that specified by pressure It is possible that the gas phase will not exist if the sum of the partial pressures of dissolved gases does not exceed the pressure given by pressure Some gas components may be defined to have initial partial pressures of zero In this case no moles of that component will be present initially but the component may enter the gas phase when in contact with a solution that contains that component If no gas phase exists initially the initial partial pressures of all components should be set to 0 0 a gas phase may subsequently form if batch reactions cause the sum of the partial pressures of the gas components to exceed pressure Example data block 2 Fixed volume gas phase Define initial moles of components with partial pressures Line 0 GAS PHASE 1 5 Air Line 1 fixed volume Line 2 volume 1 0 Line 3
249. ctions that depend on the evolving composition of the solution see examples 6 and 9 in Examples Initial conditions for batch reactions are defined with SOLUTION SOLUTION_SPREAD EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE SOLID_SOLUTIONS and SURFACE data blocks Irreversible reactions are defined with the data blocks MIX for mixing of solutions REACTION for adding or removing fixed amounts of specified reactants KINETICS and RATES for defining kinetic reactions and REACTION_TEMPERATURE for changing the temperature at which the batch reaction occurs DESCRIPTION OF DATA INPUT 69 Table 4 Elements and element valence states included in default database phreegc dat including PHREEQC notation and default formula for gram formula weight For alkalinity formula for gram equivalent weight is given Element or element valence state PHREEQC Formula used tor a fault notation gram formula weight Alkalinity Alkalinity Cag s CO3 5 Aluminum Al Al Barium Ba Ba Boron B B Bromide Br Br Cadmium Cd Cd Calcium Ca Ca Carbon C HCO Carbon IV C 4 HCO Carbon IV methane C 4 CH Chloride Cl Cl Copper Cu Cu Copper II Cu 2 Cu Copper I Cu 1 Cu Fluoride F F Hydrogen 0 dissolved hydrogen H 0 H Iron Fe Fe Iron 11 Fe 2 Fe Trond Fe 3 Fe Lead Pb Pb Lithium Li Li Magnesium Mg Mg Manganese Mn Mn Manganese II Mn 2 Mn Manganese III Mn 3 Mn Nitrogen N N Nitrogen V nitrate N 5 N Nitrogen IID nitrite NG N Nitrog
250. culated incrementally 6B or the reaction path can be calculated as a kinetic process 6C In the first approach no knowledge of the amounts of reaction is needed but a number of simulations are necessary to find the appropriate phase boundary intersections In the second approach only one simulation is sufficient but the appropriate amounts of reaction must be known beforehand In the third approach a kinetic rate expression is used to calculate the reaction path using a step size adjusting algorithm which takes care of phase boundary transitions by automatically decreasing the time interval when necessary Only the total time to arrive at the point of K feldspar equilibrium is required All three approaches are demonstrated in this example PHREEQC implicitly contains all the logic of a complete reaction path program for example Helgeson and others 1970 Wolery 1979 Wolery and others 1990 Moreover the capability to calculate directly the phase boundary intersections provides an efficient way to outline reaction paths on phase diagrams and the option to add the reaction incrementally and automatically find the stable phase assemblage allows points on the reaction path between phase boundaries to be calculated easily and rapidly The kinetic approach and the Basic interpreter that is embedded in PHREEQC can be used to save and print the arrival time and the aqueous composition at each phase transition Conceptually the example considers the r
251. d which is eguivalent to 200 pore volumes because there is only a single cell in this calculation The results of the calculations are plotted on figure 14 During the initial 5 pore volumes the high concentrations of sodium calcium and magnesium decrease such that sodium is the dominant cation and calcium and magnesium concentrations are small The pH increases to more than 9 0 and arsenic concentrations increase to close to 2 u mol kgw Over the next 45 pore volumes the pH gradually decreases and the arsenic concentrations decrease to negligible concentrations At about 100 pore volumes the calcium and magnesium become the dominant cations and the pH stabilizes at the pH of the infilling recharge water The advective transport calculations produce three types of water which are similar to water types observed in the aguifer the initial brine a sodium bicarbonate water and a calcium and magnesium bicarbonate water The EXAMPLES 257 10 pH As pMOL KGW Oe 033 30 CALCIUM E E MAGNESIUM Eh TI SODIUM y 3 2f 5 vati n ana 5 E oe aoe J O 41 ae lt ines T 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 25 50 75 100 125 150 175 200 PORE VOLUME OR SHIFT NUMBER Figure 14 Results of transport simulation of the chemical evolution of ground water due to calcium magnesium bicarbonate water inflow to an aquifer initially c
252. d SURFACE_SPECIES for an example If the no_check identifier is used then the mole_balance identifier is required Example problems The keyword EXCHANGE_SPECIES is used in example problems 12 13 and 18 See also listing of default database file in Attachment B for examples Related keywords EXCHANGE EXCHANGE_MASTER_SPECIES SAVE exchange and USE exchange 90 User s Guide to PHREEOcC Version 2 GAS_PHASE This keyword data block is used to define the composition of a fixed total pressure or a fixed volume multicomponent gas phase A GAS_PHASE data block is not needed if fixed partial pressures of gas components are desired use EQUILIBRIUM_PHASES instead The gas phase defined with this keyword data block subsequently may be equilibrated with an aqueous phase in combination with pure phase surface exchange and solid solution assemblages in batch reaction calculations As a consequence of batch reactions a fixed pressure gas phase may exist or not depending on the sum of the partial pressures of the dissolved gases in solution A fixed volume gas phase always contains some amount of each gas component that is present in solution The initial composition of a fixed pressure gas phase is defined by the partial pressures of each gas component The initial composition of a fixed volume gas may be defined by the partial pressures of each gas component or may be defined to be that which is in equilibrium with a fixed compo
253. d and the minimum scaled diagonal is increased by a factor of 10 0 Example problems The keyword KNOBS is not used in the example problems DESCRIPTION OF DATA INPUT 115 MIX This keyword data block is used if two or more aqueous solutions are to be mixed together Normally the mixing occurs as part of the batch reaction calculation but mixing may be applied during advection calculations also Example data block Line 0 MIX 2 Mixing solutions 5 6 and 7 Line la 5 Tel Line 1b 6 O25 Line lc 7 053 Explanation Line 0 MIX number description MIX is the keyword for the data block number Positive number to designate the following mixing parameters Default is 1 description Optional comment that describes the mixture Line 1 solution number mixing fraction solution number Defines a solution to be part of the mixture mixing fraction Decimal number which is multiplied times the moles of each element in the specified solution to be summed with any other solutions included in the mixture Mixing fractions may be greater than 1 0 Notes In mixing each solution is multiplied by its mixing fraction and a new solution is calculated by summing over all of the fractional solutions In the example data block if the moles of sodium in solutions 5 6 and 7 were 0 1 0 2 and 0 3 the moles of sodium in the mixture would be 0 1 x 1 1 0 2 x 0 5 0 3 x 0 3 0 3 The moles of all elements are multiplied by the s
254. d the results printed Additional simulations may follow in the input data set each in turn will be terminated with an END keyword or the end of the file Example problems The keyword END is used in all example problems 1 through 18 78 User s Guide to PHREEOcC Version 2 EQUILIBRIUM_PHASES This keyword data block is used to define the amounts of an assemblage of pure phases that can react reversibly with the aqueous phase When the phases included in this keyword data block are brought into contact with an aqueous solution each phase will dissolve or precipitate to achieve equilibrium or will dissolve completely Pure phases include minerals with fixed composition and gases with fixed partial pressures Two types of input are available in one type the phase itself reacts to equilibrium or a specified saturation index or gas partial pressure in the other type an alternative reaction occurs to the extent necessary to reach equilibrium or a specified saturation index or gas partial pressure with the specified pure phase Example data block Line 0 EOUILIBRIUM PHASES 1 Define amounts of phases in assemblage Line la Chalcedony 0 0 0 0 Line 1b CO2 g 3 0 1 0 Line lc Gibbsite c 0 0 KA1Si308 1 0 Line ld Calcite 1 0 Gypsum 1 0 Line le pH Fix 5 4 0 HCl 10 0 Explanation Line 0 EQUILIBRIUM_PHASES number description EOUILIBRIUM PHASES is the keyword for the data block Optionally EQUILIBRIUM E
255. de fined Optionally print_frequency print_f requency output_frequency o utput freguency print modulus Printing to the output file will occur after every print modulus advection shifts Default is 1 Line 7 punch cells list of cell numbers punch cells Identifier to select cells for which results will be written to the selected output file If punch cells is not included results for all cells will be written to the selected output file Once defined the list of cells will be used for all subseguent advection simulations until the list is rede fined Optionally punch punch cells pu nch cells selected cells or selected cfells list of cell numbers Printing to the selected output file will occur only for these cell numbers The list of cell numbers must be delimited by spaces or tabs and may be continued on the succeeding line s A range of cell numbers may be included in the list in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without inter vening spaces Default 1 cells Line 8 punch freguency punch modulus punch freguency Identifier to select shifts for which results will be written to the selected output file Once defined the punch freguency will be used for all subseguent advection simulations until it is redefined Optionally punch freguency punch_f requency selected output freguency selected_o utput_frequency DESCRIPTION OF DATA INP
256. de 1e 6 Time steps seconds are defined with the identifier steps INCREMENTAL_REACTIONS true causes the total time simulated to be the sum of all of the time steps 1 111111e8 seconds each new time step starts at end of the previous time step The rate for K feldspar dissolution is defined in the form of Basic statements in the RATES data block To demonstrate some of the features of the Basic interpreter the Basic program also identifies and saves information at phase transitions which is printed at the end of the run via USER_PRINT The accuracy of locating a phase transition is determined by the user definable accuracy of the integration A small tolerance tol a large step_divide that is greater than 1 initial time interval will be divided by this number or a small step_divide that is less than 1 specifies maximum moles of reaction will force smaller time intervals and more accurate identification of phase transitions In this example step divide is set to 1e 6 which limits the maximum amount of reaction for any time interval to be less than 1 micromole Thus the amount of reaction to reach a phase transition should be identified with an accuracy of one micromole However limiting the amount of reaction requires smaller time intervals during the integration and consequently more time intervals to complete the integration which increases the CPU time of the run The functions of the different parts of the Basic program are descri
257. del Example 16 Inverse Modeling of Sierra Spring Waters This example repeats the inverse modeling calculations of the chemical evolution of spring water compositions in the Sierra Nevada that are described in a classic paper by Garrels and Mackenzie 1967 The same example is described in the manual for the inverse modeling program NETPATH Plummer and others 1991 and 1994 The example uses two spring water compositions one from an ephemeral spring which is less chemically evolved and one from a perennial spring which probably has had a longer residence time in the subsoil The differences in composition between the ephemeral and perennial spring are assumed to be due to reactions between the water and the minerals and gases it contacts The object of inverse modeling in this example is to find sets of minerals and gases that when reacted in appropriate amounts quantitatively account for the differences in composition between the solutions NETPATH Plummer and others 1991 1994 and PHREEQC are both capable of performing inverse modeling calculations NETPATH has two advantages relative to PHREEQC 1 NETPATH provides a thorough treatment of isotopes including isotopic mole balance isotope fractionation and carbon 14 dating whereas PHREEQC has only isotope mole balance capabilities and 2 NETPATH provides a completely interactive environment for data entry and model development whereas PHREEQC version 2 is primarily a batch orie
258. dentifier indicates a component of an ideal solid solution is defined Component is part of the solid solution defined by the last Line 1 encountered Optionally comp component or c omponent 144 User s Guide to PHREEQC Version 2 phase name Name of the pure phase that is a component in the solid solution A phase with this name must have been defined in a PHASES data block moles Moles of the component in the solid solution Line 3 comp1 phase name moles comp1 Identifier indicates the first component of a nonideal binary solid solution is defined The component is part of the solid solution defined by the last Line 1 encountered Optionally compl phase name Name of the pure phase that is component 1 of the nonideal solid solution A phase with this name must have been defined in a PHASES data block moles Moles of the component in the solid solution Line 4 comp2 phase name moles comp2 Identifier indicates the second component of a nonideal binary solid solution is defined The component is part of the solid solution defined by the last Line 1 encountered Optionally comp2 phase name Name of the pure phase that is component 2 of the nonideal solid solution A phase with this name must have been defined in a PHASES data block moles Moles of the component in the solid solution Line 5 temp temperature in Celsius temp Temperature at which excess free energy parameters are defined in Celsius Temperature either temp te
259. der EXCHANGE Example problems The keyword PHASES is used in example problems 1 6 8 9 10 16 and 18 Related keywords EOUILIBRIUM PHASES EXCHANGE INVERSE MODELING KINETICS REACTION SAVE eguilibrium phases and USE eguilibrium phases DESCRIPTION OF DATA INPUT 119 PRINT This keyword data block is used to select which results are written to the output file Fourteen blocks of calculation results may be included or excluded in the output file for each simulation In addition this data block allows the following to be enabled or disabled writing of results to the selected output file and writing a status line to the screen that monitors the type of calculation being performed Example data block Line 0 PRINT Line 1 reset false Line 2 eh true Line 3 equilibrium phases true Line 4 exchange true Line 5 gas_phase true Line 6 headings true Line 7 inverse true Line 8 kinetics true Line 9 other true Line 10 saturation indices true Line 11 solid solutions true Line 12 species true Line 13 surface true Line 14 totals true Line 15 user print true Line 16 selected output false Line 17 status false Explanation Line 0 PRINT Keyword for the data block No other data are input on the keyword line Line 1 reset True or False reset Changes all print options listed on lines 2 through 15 to true or false If used this identifier should be the first identifier of
260. dison aquifer results and discussion oosossesssss soseen e na a aa a na ne a a enaa a nan aa an aa an aa naa aa aeeen 282 References CHE sis vm oss i en en E met an aemm vin datos 284 Attachment A Listing Of notations scenie da E a aan an aa aa a a ee naa a na RR na naa a e Un aa na naa a Kaa eOe Soie Soay 288 Attachment B Description of database files and listing 00 cece eeeceeeceeeecesseceeeceseeeneecneecseceeaeessecesaeceaeeceaeeeneeeeeeecseeeeeens Attachment C Input file to investigate the order of the numerical method for example 12 uuuuussss se te ennnen FIGURES 1 Diagram showing terms in the advection reaction dispersion equatiOM cooconnnonnnonnonnnoncnnnonncnnconnconncn non nono nonnncnnono 2 5 Graphs showing 2 Analytical solution for 1D transport with ion exchange reactions and flux boundary condition compared with PHREEOC calculations at various grid spacings csscesceceseeeseeeeeeeeseceeeeees 3 Analytical solution for 1D transport with ion exchange reactions and constant boundary condition compared with PHREEQC calculations at various grid SpaciMgS ocooconccconnnnoncnnnos 4 Analytical solution for transport with stagnant zones a pulse input and ion exchange reactions compared with PHREEQC calculations at various grid spacings eecececceeeeceeeceseceeeeceteeeeeeeeeecseeeeeeees 5 Saturation indices of gypsum and anhydrite in solutions that have equilibrated with the m
261. during batch reaction steps It is necessary to enter this data block if a temperature other than the default temperature is needed for batch reaction calculations This data block can also be used to specify the temperature in a cell or range of cells during advective transport calculations ADVECTION and the initial temperature for a cell or range of cells in advective dispersive transport calculations TRANSPORT Example data block 1 Line 0 REACTION_TEMPERATURE 1 Three explicit reaction temperatures Line 1 1520 2040 300 Explanation 1 Line 0 REACTION_TEMPERATURE number description REACTION_TEMPERATURE is the keyword for the data block number Positive number to designate the following temperature data A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the temperature data Line 1 list of temperatures list of temperatures A list of temperatures in Celsius that will be applied to batch reaction calcula tions More lines may be used to supply additional temperatures One batch reaction calculation will be performed for each listed temperature Example data block 2 Line 0 REACTION TEMPERATURE 1 Three implicit reaction temperatures Line 1 15 0 35 0 in 3 steps Explanation 2 Line 0 REACTION_TEMPERATURE number description Sam
262. e nb S S Strontianite mol2 x1 1 x1 nb nc mol2 mol2 x1 1 x1 moll nb mol2 x2 x1 REM PUNCH moll PUNCH mol2 GOTO 300 REM PUNCH le 10 PUNCH le 10 300 PUNCH S S Aragonite 310 PUNC end END S S Strontianite Ca 2 ACT Sr 2 Mole fraction aragonite Mole fraction strontianite Sr Mole aqueous calcium T Sr Mole aqueous strontium TO 250 x2 1 x2 Moles of misc end members if in gap Moles of misc end members if not in gap Moles aragonite Moles Strontianite EXAMPLES 237 Total of 0 001 to 0 1 moles of SrCO3 added C ab e SE solution 1 USE solid_solution 1 EACTION 1 SrCO3 1 0 1 in 100 steps N Total of 0 1 to 10 moles of SrCO3 added U SE solution 1 USE solid_solution 1 REACTION 1 SrCO3 1 0 10 0 in 100 steps The excess free energy parameters describe a nonideal solid solution that has a miscibility gap For compositions that fall within the miscibility gap the activities of calcium and strontium within the aqueous phase remain fixed and are in equilibrium with solids of two compositions one solid with a strontium mole fraction of 0 0048 and one solid with a strontium mole fraction of 0 8579 For the simulations in the example each incremental addition of strontium carbonate increases the mole fraction of strontium carbonate in the solid until abou
263. e excludes print if value is false Default is true Optionally si si saturation indices or sa turation indices Line 11 solid solutions True or False solid solutions Prints compositions of solid solutions if value is true excludes print if value is false Default is true Optionally so lid solutions Note the hyphen is reguired to avoid a conflict with the keyword SOLID SOLUTIONS Line 12 species True or False species Prints the distribution of agueous species including molality activity and activity coefficient if value is true excludes print if value is false Default is true Optionally species or sp ecies Line 13 surface True or False DESCRIPTION OF DATA INPUT 121 surface Prints composition of the surface assemblage if true excludes print if false Default is true Optionally su rface Note the hyphen is required to avoid a conflict with the keyword SUR FACE Line 14 totals True or False totals Prints the total molalities of elements or element valence states in initial solutions pH pe temperature and other solution characteristics if true excludes print if false Note printing of molalities and other properties of all of the aqueous species is controlled by the species identi fier Default is true Optionally totals or t otals Line 15 user print True or False user print Controls writing of information defined in USER PRINT to the output file When set to fa
264. e a relative pathname For instance example 14 requires the database wateg4f dat and this example could be run from the examples subdirectory with the following command phreeqc ex14 ex14 out wateq4f dat The results of this calculation will be found in the file ex 4 out in the examples directory Installation and Execution of the Unix Version The Unix source code is almost identical to the Win32 source code the only difference being one statement in the file global h define DOS is absent A script to run the program in batch mode and a makefile are included in the Unix distribution The following steps should be used to transfer compile and install the program on a Unix computer Compiled executables are available at the web sites for SunOS and Linux operating systems which eliminates the need for the compilation step on these operating systems 1 Transfer the compressed tar files to your home computer with a browser or by ftp Be sure to use type binary for transferring the tar file by ftp 2 Uncompress the compressed tar file and extract the files with tar The files will automatically extract into subdirectories named bin database doc src and examples Here 2 x represents a version number uncompress phreeqc 2 x tar Z tar xvof phreeqc 2 x tar 3 Versions for Linux and Sun are available with precompiled executables If the program is to be used on another type of computer then change directory into src and
265. e amount of K feldspar cumulative time log activity ratio of potassium ion divided by hydrogen ion and log activity of silicic acid of the run unless it is overwritten with another PUT statement with the same set of subscripts Data stored with PUT can be retrieved by any Basic program including those defined in RATES USER_PRINT and USER_PUNCH In this example data are stored by the RATES Basic program and the USER_PRINT Basic program retrieves the data and prints a summary of the phase transitions While the RATES program is run many times during the kinetic integration of a time step integration over many time intervals may be necessary for the required accuracy the USER_PRINT program is run once at the end of each integration time step Table 24 gives the phase transitions encountered by the end of the last time step of example 6C For each phase transition the time at which the phase transition occurred the total amount of K feldspar that has reacted and the coordinates of the transition on figure 6 are given Although the values in table 24 are approximate the amount of K feldspar and the coordinates of the transition can be compared to table 22 As expected the approximate mole transfers to reach the phase transitions are within 1 micromole of the values in table 22 Table 24 Phase transitions identified by the RATES Basic program and printed to the output file by the USER_PRINT Basic program in example 6C which simulates th
266. e as example data block 1 Line 1 temp temp in steps temp Temperature of first reaction step in Celsius temp gt Temperature of final reaction step in Celsius in steps in indicates that the temperature will be calculated for each of steps number of steps The temperature at each step i will be calculated by the formula 1 temp t 5 JA steps 1 temp temp if steps 1 then the temperature of the batch reaction will be temp Example data block 2 performs exactly the same calculations as example data block 1 If more batch reaction steps are defined by REACTION or KINETICS input the temperature of the additional steps will be temp DESCRIPTION OF DATA INPUT 133 Notes If more batch reaction steps are defined in REACTION or KINETICS than temperature steps in REACTION_TEMPERATURE then the final temperature will be used for all of the additional batch reaction steps INCREMENTAL_REACTIONS keyword has no effect on the REACTION_TEMPERATURE data block The default temperature of a reaction step is equal to the temperature of the initial solution or the mixing fraction averaged temperature of a mixture REACTION_TEMPERATURE input can be used even if there is no REACTION input The method of calculation of temperature steps using in is slightly different than that for reaction steps If n temperature steps are defined with in n in a REACTION TEMPERATURE data block then the temperature of the fi
267. e by PI 1 80008 RT u sin bl 5 68 where is the dielectric constant of water 78 5 dimensionless is the permittivity of free space 8 854x10 CV m or C m J v is the ionic charge of a symmetric electrolyte R is the as 8 314 J mol K T is temperature K u is the ionic strength and Fi is the Faraday constant J ya eg Lor C mol Y is the potential at the surface in volts At 25 C 8000 R Ty 0 1174 The charge of the electrolyte ions is T tobe 1 The charge potential function is 28 User s Guide to PHREEQC Version 2 K s Na FY F fw 80008 RT u sinh 577 Zz A 69 Y 0 2RT 091922 s Msp NI NI sp and the total derivative of this function is 1 2 1 1 1 8000 RT 5 Fy 55 PV df y a aa sinh 3777 du 000 RT u cosh Jalnay K Ns F g 0999 2 2 op tep 70 For data input to PHREEOC calculation without an explicit diffuse layer is the default Specific surface area A or A and mass of surface S are defined in the SURFACE data block The moles of surface sites are defined 1 in the SURFACE data block if the number of sites is fixed 2 by a proportionality factor in the SURFACE data block and the moles of a phase in EOUILIBRIUM PHASES data block or 3 by a proportionality factor in the SURFACE data block and the moles of a kinetic reactant in KINETICS data block The charge on a surface species is specified in the balan
268. e details Moles of a gas component in the gas phase Retrieves the value that is identified by the list of one or more subscripts Value is zero if PUT has not been used to store a value for the set of subscripts Values stored in global storage with PUT are accessible by any Basic program See description of PUT for more details Moles of a kinetic reactant Logl0 of activity of an aqueous exchange or surface species Log10 of molality of an aqueous exchange or surface species Current moles of reactant for which the rate is being calculated see KINETICS Initial moles of reactant for which the rate is being calculated see KINETICS Mole fraction of component 2 at the beginning of the miscibility gap returns 1 0 if there is no miscibility gap see SOLID SOLUTIONS Mole fraction of component 2 at the end of the miscibility gap returns 1 0 if there is no miscibility gap see SOLID SOLUTIONS Molality of an agueous exchange or surface species Tonic strength of the solution Parameter array defined in KINETICS data block Percent charge balance error 100 cations lanionsl cations lanionsl Write to output file Write to selected output file Saves value of x in global storage that is identified by a sequence of one or more subscripts Value of x can be retrieved with GET 1 12 and a set of subscripts can be tested to determine if a value has been stored with EXISTS 11 12 PUT may be used in RATES
269. e dimensional Guggenheim parameters Optionally thompson or th ompson wg Thompson and Waldbaum parameter wg kJ mol No default wg Thompson and Waldbaum parameter wg kJ mol No default Line 16 Margules alpha alpha Margules Margules parameters alpha and alpha are used to calculate dimensional Guggenheim parameters Optionally Margules or Ma rgules alpha Margules parameter alpha dimensionless No default alpha3 Margules parameter alpha dimensionless No default Notes Multiple solid solutions may be defined by multiple sets of lines 1 2 3 and 4 Line 2 may be repeated as necessary to define all the components of an ideal solid solution Nonideal solid solution components must be defined with Lines 3 and 4 Calculations with solid solutions assume that the entire solid recrystallizes to be in equilibrium with the aqueous phase This assumption is usually unrealistic because it is likely that only the outer layer of a solid would re equilibrate with the solution even given long periods of time In most cases the use of ideal solid solutions is also unrealistic because nonideal effects are nearly always present in solids Lines 7 16 provide alternative ways of defining the excess free energy of a nonideal binary solid solution Only one of these lines should be included in the definition of a single solid solution The parameters in the example data block are taken from Glynn 1991 and Glynn 1990 for
270. e entered in any order the line numbers 72 User s Guide to PHREEQC Version 2 given in examples for the keyword data blocks are for identification purposes only Default values for identifiers are obtained if the identifier is omitted DESCRIPTION OF DATA INPUT 73 ADVECTION This keyword data block is used to specify the number of cells and the number of shifts for an advection simulation Advection simulations are used to model one dimensional advective or plug flow with reactions No dispersion or diffusion is simulated and no cells with immobile water are allowed However all chemical processes modeled by PHREEQC may be included in an advection simulation The TRANSPORT data block may be used to model additional physical processes such as dispersion diffusion and connected cells with immobile water Example data block Line 0 ADVECTION Line 1 cells 5 Line 2 shifts 25 Line 3 time step 3 15e7 seconds 1 yr Line 4 initial time 1000 Line 5 print cells 1 3 5 Line 6 print freguency 5 Line 7 punch cells 2 5 Line 8 punch freguency 5 Line 9 warnings false Explanation Line 0 ADVECTION ADVECTION is the keyword for the data block No other data are input on the keyword line Line 1 cells cells cells Identifier for number of cells in the advection simulation Optionally cells or c ells cells Number of cells in the one dimensional column to be used in the advection simulation D
271. e exists for all amounts of organic decomposition fig 7 Initially the gas is primarily CO with significant amounts of CH and a small amount of N3 As the gas composition evolves CO and CH partial pressures become nearly equal The N partial pressure is always an order of magnitude smaller than CO and CH4 NH partial pressures are always small not shown The partial pressures of the fixed volume gas phases are smaller than the fixed pressure gas phase up to 1 0 mol of reaction If the reaction continued beyond 1 0 mol the pressure of the fixed volume gas phase would continue to increase and would be greater than the pressure in the fixed pressure gas phase which remains constant Conversely the volume of the fixed pressure gas phase is less than the volume of the fixed volume gas phase until 1 0 mol of reaction If the reaction continued beyond 1 0 mol the volume of the fixed pressure gas phase would exceed the volume of the fixed volume gas phase Example 8 Surface Complexation PHREEQC contains three surface complexation models 1 By default the generalized two layer model is used with no explicit calculation of the diffuse layer composition 2 Alternatively an electrostatic double layer model with explicit calculation of the diffuse layer composition may be used diffuse_layer 3 Finally a non electrostatic model may be selected no_edl The electrostatic model is the generalized two layer model described in Dzombak and M
272. e flow direction is forward optionally f orward 2 Backward advective flow direction is backward optionally b ackward or 3 Diffusion only only diffusion occurs there is no advective flow optionally d iffusion only or n o flow Default is forward Line 5 boundary conditions first last boundary conditions Defines boundary conditions for the first and last cell Optionally bc bcond b cond boundary condition b oundary condition Three types of boundary conditions are allowed at either end of the column indicated by x y constant Concentration is constant C x g t Cg also known as first type or Dirichlet boundary condition Optionally co nstant or 1 OC X ona t closed No flux at boundary 3 0 also known as second type or Neumann X boundary condition Optionally cl osed or 2 D 9C X q 1 flux Flux boundary condition C x pt Cot 3 also known as third type or Cauchy boundary condition Optionally f lux or 3 first Boundary condition at the first cell constant closed or flux Default is flux last Boundary condition at the last cell constant closed or flux Default is flux Line 6 lengths list of lengths lengths Defines length of each cell for advective dispersive transport simulations m Optionally length lengths or I engths list of lengths Length of each cell m Any number of lengths up to the total number of cells cells may be entered If cells is
273. e imbalance than can be adjusted by removing all of the specified element in which case the problem is unsolvable phase name The concentration of the element will be adjusted to achieve a specified saturation index for the given pure phase Be sure that specifying equilibrium with the phase is reasonable the ele DESCRIPTION OF DATA INPUT 151 ment should be a constituent in the phase Phase name may not be used if charge has been spec ified for this element saturation index The concentration of the element will be adjusted to achieve this saturation index for the given pure phase Default is 0 0 Line 8 isotope name value uncertainty limit isotope Indicates isotopic composition for an element or element valence state is entered on this line Isotope data are used only in inverse modeling Optionally isotope or i sotope name Name of the isotope The name must begin with mass number followed by an element or ele ment valence state name that is defined through SOLUTION_MASTER_SPECIES value Isotopic composition of element or element valence state units are usually a ratio permil or percent modern carbon uncertainty limit The uncertainty limit to be used in inverse modeling This value is optional in the SOLUTION data block and alternatively a default uncertainty limit may be used see INVERSE_MODELING or an uncertainty limit may be defined with the isotopes identifier of the INVERSE_MODELING data block Line 9 water mas
274. e included in the C matrix In an attempt to avoid some numerical problems related to small numbers in the B matrix a row of the matrix that represents a mole balance equation is scaled if all coefficients a column of A and B of the corresponding unknown change in the log activity of the element master species are less than 1e 10 In this case the equation is scaled by 1e 10 divided by the absolute value of the largest coefficient Alternatively when specified diagonal_scale in KNOBS a mole balance equation is scaled by 1e 10 divided by the coefficient of the corresponding unknown if the coefficient of the unknown in the mole balance equation is less than 1e 10 The scaled matrix is solved by the optimizing solver and the solution that is returned is a vector of changes to the values of the master unknowns The values of the changes are checked to ensure that the changes to the unknowns are less than criteria that limit the maximum allowable size of changes These criteria are specified by default in the program or by input in the KNOBS data block If any of the changes are too large then all the changes to the unknowns except the mole transfers of pure phases and solid solution components are decreased proportionately to satisfy all of the criteria Pure phase and solid solution mole transfers are not altered except to produce nonnegative values for the total moles of the pure phases and solid solution components After suitable changes to the
275. e kinetic dissolution of K feldspar User print Transition Time K feldspar LA K H LA H4Si04 reacted moles A Gibbsite 1 10000E 03 1 40477E 07 3 57546E 01 6 37631E 00 B Gibbsite gt Kaolinite 1 74339E 05 2 20636E 06 2 56086E 00 5 19500E 00 C Gibbsite gt Kaolinite 2 39290E 05 3 02835E 06 2 83517E 00 5 19434E 00 D Kaolinite gt K mica 1 58687E 06 2 00699E 05 4 40800E 00 4 46585E 00 E Kaolinite gt K mica 2 59719E 06 3 27914E 05 4 41031E 00 4 25093E 00 F K mica gt K feldspar 4 78404E 07 1 90721E 04 5 48792E 00 3 55397E 00 220 User s Guide to PHREEQC Version 2 The SELECTED_OUTPUT data block specifies that a new selected output file will be used for this simulation ex6C sel and all printing to the selected output file is eliminated reset false The USER PUNCH data block causes two columns to be written to each line of the selected output file the log of the ratio of the activities of potassium ion to hydrogen ion and the log activity of silicic acid The data will be written after each time step has been simulated steps KINETICS data block The following table shows the results written to ex6C sel Table 25 Results written to the selected output file by the USER_PUNCH Basic program in example 6C which simulates the kinetic dissolution of K feldspar Nt indicates a tab character pH log K 6 00016E 00N 1 89754E 00 8 53163E 01 3 57546E 01 2 18230E
276. e left hand side are allowed All chemical equations must contain an equal sign In addition left and right hand sides of all chemical equations must balance in numbers of atoms of each element and total charge All equations are checked for these criteria at runtime unless they are specifically excepted Nested parentheses in chemical formulas are acceptable Spaces and tabs within chemical equations are ignored Waters of hydration and other chemical formulas that are normally represented by a as in the formula DESCRIPTION OF DATA INPUT 65 for gypsum CaSO4 2H O are designated with a colon in PHREEQC CaSO 4 2H O but only one colon per formula is permitted Element names An element formula wherever it is used must begin with a capital letter and may be followed by one or more lowercase letters or underscores _ In general element names are simply the chemical symbols for elements which have a capital letter and zero or one lower case letter It is sometimes useful to define other entities as elements which allows mole balance and mass action equations to be applied Thus Fulvate is an acceptable element name and it would be possible to define metal binding constants in terms of metal Fulvate complexes Charge on a chemical species The charge on a species may be defined by the proper number of pluses or minuses following the chemical formula or by a single plus or minus followed by a integer numbe
277. ea eE E Ep EEE VEE EEE SEES ea Eere de dasi DiE Kapak Mole balance for surface Sites 2sccesce ss aasin ds dd E E EEE dates E EEN est aisa S Mole balance for exchange SiteS eaaa e stash a a E AEA A OR ESE EEEO EEEa Mole balance for alkalamity a M l amp balance for elements e ia Aqueous charge balance ANA E E Tera A eh es a EEEa Surface charge potential equation with no explicit calculation of the diffuse layer composition Surface charge balance equation with explicit calculation of the diffuse layer composition Non electrostatic surface complexation cee eeeeesseesecesseceececeeeecsseceeeecseeeeneesseeessecsscecseecsaeceeeecseeeeaeceeeesaeeaees Numerical method for speciation and forward modeling sussssssse eee e n aa aa na a aa eaa n ae aa aan n a Aaa nannaa aeeeaeen Aqueous speciation calculations o uuossss n e eaa ea e nan ana ea na na naa a aa naa e an aa aan a na EEE EEEE Calculation of the initial composition of an exchanger uusvssssesa aa ea e a n a a a aa a a aa a ne a a eaa eaa eee Calculation of the initial composition of a Surface vovessess saamat asa a e a aan a a an a a a aa a na a aa aa e ene a eee Calculation of the initial composition of fixed volume gas phase oo cess nn nn nan a a na eaa ean aa naa aan aeeen Batch reaction and transport calculation Suenan a aa aa aa aa a aa E an aa aaa Ta eiS Numerical meth
278. eactions that would occur if K feldspar were placed in a beaker and allowed to react slowly As K feldspar dissolves other phases may begin to precipitate In this example it is assumed that only gibbsite kaolinite or K mica can form and that these phases will precipitate reversibly if they reach saturation Phases precipitated at the beginning of the reaction may redissolve as the reaction proceeds Table 21 Input data set for example 6 TITLE Example 6A React to phase boundaries SOLUTION 1 PURE WATER pH 7 0 charge temp 25 0 PHASES Gibbsite Al OH 3 3 H A1 3 3 H20 log_k 8 049 delta_h 22 792 kcal EXAMPLES 213 Kaolinite A125i1205 0H 4 6 H H2O 2 H4Si04 2 A1 3 log k 5 708 delta h 35 306 kcal K mica KA13Si3010 0H 2 10 H 3 Al 3 3 H4Si04 K log_k 12 970 delta_h 59 377 kcal K feldspar KA1Si308 4 H20 4 H Al 3 3 H4Si04 K log_k 0 875 delta_h 12 467 kcal SELECTED_OUTPUT file ex6A B sel activities K H H4Si04 si Gibbsite Kaolinite K mica K feldspar equilibrium Gibbsite Kaolinite K mica K feldspar END USE solution 1 EQUILIBRIUM_PHAS Gibbsite Kaolinit K mica K feldsp END TITLE Example 6A TITLE Example 6A1 Find amount of K feldspar dissolved to reach gibbsite saturation ES 1 00 KA1Si308 10 0 e 0 0 0 0 0 0 0 0 ar 0 0 0 0 2 Find amount of K feldspar dissolved to USE solution 1 EQU
279. ed for charge and elemental balance The only exceptions might be polysulfide species which assume equilibrium with a solid phase this assumption has the effect of removing solid sulfur from the mass action equation By default all equations are checked However the identifier mole_balance is needed to ensure that the proper number of atoms of each element are included in mole balance equations see mole_balance Optionally no_check or n o_check Line 7 mole_balance formula mole_balance Indicates the stoichiometry of the species will be defined explicitly Optionally mole balance mass balance mb m ole balance mass balance m b formula Chemical formula defining the stoichiometry of the species Normally both the stoichiometry and mass action expression for the species are determined from the chemical eguation that defines the species Rarely it may be necessary to define the stoichiometry of the species sepa rately from the mass action eguation The polysulfide species provide an example These species are usually assumed to be in eguilibrium with native sulfur The activity of a pure solid is 1 0 and thus the term for native sulfur does not appear in the mass action expression Line 1d The S species contains two atoms of sulfur but the chemical eguation indicates it is formed from species containing a total of one sulfur atom The mole balance identifier is needed to give the correct stoichiometry Note that unlike all o
280. efault is 0 Line 2 shifts shifts shifts Identifier for the number of shifts or time steps in the advection simulation Optionally shifts or shfifts shifts Number of times the solution in each cell will be shifted to the next higher numbered cell Default is 0 Line 3 time_step time_step time_step Identifier for time step associated with each advective shift The identifier is required if kinetic reactions KINETICS data blocks are part of the advection simulation and optional for other advection simulations If time_step is defined then the value for time printed to the selected output file will be initial_time advection_shift_number X time_step if time_step is not defined the value of time printed to the selected output file will be the advection shift num ber Once time_step is defined the time step will be used for all subsequent advection simula tions until it is redefined Optionally timest t imest time step or t ime_step time_step The time in seconds associated with each advective shift Kinetic reactions will be inte grated for this period of time for each advective shift Default is 0 s Line 4 initial_time initial_time 74 User s Guide to PHREEOcC Version 2 initial_time Identifier to set the time at the beginning of an advection simulation The identifier initial_time has effect only if time_step has been set in this or a previous ADVECTION data block The identifier sets the initial value of the v
281. efined by PHASES input After each calculation the saturation index of each of the phases will be written to the selected output file If the phase is not defined or if one or more of its constituent elements is not in solution the saturation index will be printed as 999 999 Line 26 gases gas component list gases Identifier allows definition of a list of gas components for which the amount in the gas phase moles will be written to the selected output file Optionally gases or g ases gas component list List of gas components The list may continue on subsequent line s Each gas component must have been defined by PHASES input After each calculation the moles of each of the selected gas components in the gas phase will be written to the selected output file If a gas component is not defined or is not present in the gas phase the amount will be printed as 0 Before the columns for the gas components the flat file will contain the total pressure total moles of gas components and the volume of the gas phase Partial pressures of any gas including the compo nents in the gas phase can be obtained by use of the saturation_indices identifier Line 27 kinetic_reactants reactant list DESCRIPTION OF DATA INPUT 141 kinetic_reactants Identifier allows definition of a list of kinetically controlled reactants for which two values are written to the selected output file 1 the current moles of the reactant and 2 the moles t
282. efines the solubility of gypsum in pure water However the total number of moles of each constituent in the aqueous phase is only 15 08 because the mass of water is only 0 9645 kg Description of solution In precipitating gypsum CaSO 4 2H O water has been removed from solution Thus the mass of solvent water is not constant in batch reaction calculations reactions and waters of hydration in dissolving and precipitating phases may increase or decrease the mass of solvent water The saturation indices for all of the batch reaction steps are plotted in figure 5 In each step pure water was reacted with the phases at a different temperature the reactions are not cumulative The default database for PHREEQC indicates that gypsum is the stable phase saturation index equals 0 0 at temperatures below about 57 C above this temperature anhydrite is calculated to be the stable phase Table 14 Selected output for example 2 Initial solution 1 Pure water Elements Molality Moles Pure water pH 7 000 pe 4 000 Activity of water 1 000 Ionic strength 1 001e 07 Mass of water kg 1 000e 00 Total alkalinity eq kg 1 082e 10 Total carbon mol kg 0 000e 00 Total CO2 mol kg 0 000e 00 Temperature deg C 25 000 Electrical balance eq 1 082e 10 Percent error 100 Cat An Cat An 0 05 Iterations 0 Total H 1 110124e 02 Total O 5 550622e 01 Log Log Log Species Molality Activity Molality Activity
283. el requires the preparation of extended lists of mixing factors notice that a separate simulation with USER_PUNCH EXAMPLES 253 0 8 gt CI FIRST ORDER EXCHANGE APPROXIMATION A Na FIRST ORDER EXCHANGE APPROXIMATION a L CI FINITE DIFFERENCE APPROXIMATION al Na FINITE DIFFERENCE APPROXIMATION a 0 6 F lt lt ei lt 0 5 i a O L J O x 0 4 4 jam U a W J n U 03 H lt O S A 5 0 2 J 0 1 0 0 0 0 0 5 1 0 1 5 2 0 DISTANCE IN METERS Figure 13 Results of simulations of transport with diffusion into spherical stagnant zones modeled using finite difference and first order exchange approximations can serve that purpose which change when the discretization is adapted The calculation time for a finite difference model with multiple immobile zone layers may also be considerably longer than for the single immobile zone layer of the first order exchange approximation Example 14 Advective Transport Cation Exchange Surface Complexation and Mineral Eguilibria This example uses the phase eguilibrium cation exchange and surface complexation reaction capabilities of PHREEOC in combination with advective transport capabilities to model the evolution of water in the Central Oklahoma aguifer The geochemistry of the aguifer has been described by Parkhurst and others 1996 Two predominant water types occur in the aquifer a calcium magnesium b
284. ells and print_frequency will limit the data written to the output file The print_cells identifier restricts printing in the output file to the specified cells in the example data block results for cells 1 2 3 and 5 are printed to the output file The identifier print_frequency restricts printing in the output file to those advection shifts that are evenly divisible by print_modulus In the example data block results are printed to the output file after each integer pore volume 5 shifts Data written to the output file can be further limited with the keyword PRINT see reset false The USER_PRINT data block can be used to calculate quantities to be printed to the output file 76 User s Guide to PHREEOcC Version 2 If the SELECTED_OUTPUT data block has been defined recommended then data specified in the SELECTED_OUTPUT and USER_PUNCH data blocks are written to the selected output file Use of punch_cells and punch_frequency in the ADVECTION data block will limit what is written to the selected output file The punch_cells identifier restricts printing to the selected output file to the specified cells in the example data block results for cells 2 3 4 and 5 are printed to the selected output file The identifier punch_frequency restricts printing to the selected output file to those advection shifts that are evenly divisible by punch_modulus In the example data block results are printed to the selected output file after each intege
285. elo and Postma 1993 are included in two of the databases distributed with the program phreegc dat and wateq4f dat New modeling capabilities in version 2 include kinetically controlled reactions solid solutions and fixed volume gases Kinetically controlled reactions can be defined in a general way by using an embedded Basic interpreter Rate expressions written in the Basic language are included in the input file and the program uses the Basic interpreter to calculate rates Formulations for ideal multicomponent and nonideal binary solid solutions have been added The program is capable of determining the eguilibrium compositions of nonideal binary solid solutions even if miscibility gaps exist and of determining the eguilibrium composition of ideal solid solutions that have two or more components It is possible to precipitate solid solutions from supersaturated conditions with no pre existing solid and to dissolve solid solutions completely In addition to the fixed pressure gas phase of version 1 fixed pressure gas bubbles version 2 allows for a fixed volume gas phase It is possible to define independently any number of solution compositions gas phases or pure phase solid solution exchange or surface complexation assemblages Batch reactions allow any combination of solution or mixture of solutions gas phase and assemblages to be brought together any irreversible reactions are added and the resulting system is brought to eguilibri
286. emperature True or False alkalinity True or False SUMMARY OF DATA INPUT 191 ionic_strength True or False water True or False charge balance True or False percent error True or False totals element list molalities species list activities species list eguilibrium phases phase list saturation indices phase list gases gas component list kinetic_reactants reactant list solid_solutions component list inverse modeling True or False SOLID SOLUTIONS SOLID SOLUTIONS number description solid solution name comp phase name moles compl1 phase name moles comp2 phase name moles temp temperature in Celsius tempk temperature in Kelvin Gugg nondim a0 al Gugg kJ a0 al activity coefficients a Xp X2 comp A comp distribution coefficients k k x x2 miscibility_gap x x2 spinodal gap x x critical point xop tep alyotropic point x log 211 aly Thompson wg wg Margules alpha alpha SOLUTION SOLUTION number description temp temperature pH pH charge or phase name saturation index pe pe charge or phase name saturation index 192 User s Guide to PHREEQC Version 2 redox redox couple units concentration units density density element list concentration units as formula or gfw gfw redox couple charge or phase name sat uration index isotope name value uncertainty limit water mass SO
287. en 0 dissolved nitrogen N 0 N Nitrogen IID ammonia N 3 N Oxygen 0 dissolved oxygen O 0 O Phosphorous P P Potassium K K Silica Si SiO Sodium Na Na Strontium Sr Sr Sulfur S SO Sulfur VD sulfate S 6 SO4 Sulfur ID sulfide S 2 S Zinc Zn Zn 70 User s Guide to PHREEOcC Version 2 Different sets of keyword data blocks can be defined within one simulation each set being identified by the number or range of numbers which follow the keyword In the subsequent batch reaction a set may be included either implicitly or explicitly For an implicit calculation a solution or mixture SOLUTION or MIX keywords must be defined within the simulation and the first of each keyword set defined before the END will be included in the calculation That is the first solution or mixture will be used along with the first of each of the data blocks EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE SOLID_SOLUTIONS SURFACE KINETICS REACTION and REACTION_TEMPERATURE For an explicit calculation USE keyword number defines a set that is to be used regardless of position within the input lines see examples 3 6 7 8 and 9 in Examples USE keyword none eliminates a set that was implicitly defined see example 8 in Examples If the composition of the solution pure phase assemblage exchange assemblage gas phase solid solution assemblage or surface assemblage has changed after the batch reaction calculation it can be saved with
288. en from MINTEQA2 Allison and others 1990 However in these compendia the log K s and enthalpies of reaction have been taken from various literature sources No systematic attempt has been made to determine the aqueous model that was used to develop the individual log K s or whether the aqueous models defined by the current database files are consistent with the original experimental data The database files provided with the program should be considered to be preliminary Careful selection of aqueous species and thermodynamic data is left to the users of the program lon Exchange The ion exchange model assumes that the thermodynamic activity of an exchange species is equal to its equivalent fraction Optionally the equivalent fraction can be multiplied by a Debye Hickel activity coefficient to define the activity of an exchange species Appelo 1994a Other formulations use other definitions of activity mole fraction instead of equivalent fraction for example and may be included in the database with appropriate rewriting of species or solid solutions No attempt has been made to include other or more complicated exchange models In many field studies ion exchange modeling requires experimental data on material from the study site for appropriate model application Surface Complexation PHREEQC incorporates the Dzombak and Morel 1990 generalized two layer model a two layer model that explicitly calculates the diffuse layer compositi
289. end members is also a valid inverse model The possibility of evaporation or dilution can be included in inverse modeling by including water as one of the phases under the phases identifier H2O g for databases distributed with program The mole transfer of this phase will affect only the water balance equation If the mole transfer is positive dilution is simulated if negative evaporation is simulated see example 17 in Examples If uncertainty is not included a default uncertainty limit of 0 05 5 percent is used for elements and 0 05 for pH Default uncertainty limits specified by uncertainty will almost always be specified as positive numbers indicating fractional uncertainty limits A default uncertainty limit specified by a negative number indicating a fixed molal uncertainty limit for all elements in solution is usually not reasonable because of wide ranges in concentrations among elements present in solution DESCRIPTION OF DATA INPUT 103 No mole balance equation is used for pH and the uncertainty limit in pH only affects the mole balance on alkalinity Alkalinity is assumed to co vary with pH and carbon and an equation relating the uncertainty term for alkalinity and the uncertainty terms for pH and carbon is included in the inverse model see Equations and Numerical Methods for Inverse Modeling All phase names and phase stoichiometries must be defined through PHASES or EXCHANGE SPECIES input Line 4c and
290. ens 182 Related Key words timer ir ibid ii 182 PS RE EES 183 Example data DIOCK ss ve cba seed A I RINE he BE RAG Bae Ba ie 183 Xp lama TOM RNA 183 Notes a e o a oS oe a do 183 VIII User s Guide to PHREEOcC Version 2 Example problems usvaa suosin saatas a Taas Ea EEA AEE EEEE ubeedebogivonis EEEE E ERS TE EE 183 Related key words iii ia 184 USER PUNCH EE a ae ink ee ee RI ei Ng es E 185 Example data block otro pa ai tale tesis 185 Explanation A NO 185 NOTES e eener tenet sarasa cea T T Ss Gatien Si SE as A Aste nant te Macias Ash Bost DEES 185 Example problems 3 2 5scsssississseisdsvassscevtseyscvapsctpecsuoasedesssys chutes vsasves ieesvsscveavesdhssvsetbapuesysesoaises psceetedvvasssaieeas 186 Related Key Words ii lei Kia e at aie eee RU 186 Summa ty of data MP UE see sied sesso ais 187 EXAM ples iii A tds 196 Example 1 Speciation calculation oooonnncnoccnnnnonononconnnonconnnanonn n a a naa ae a naa nooo non a a ena aa EE aa an a Kan aa naan ne 196 Example 2 Equilibration with pure phases oouosssssss see ea a ea ne aa a ae a e a a ena nn nan rra aa naa naa aan aeaen 203 Example3 MIXx1ng issa san irei A IN ohne sone E ASE AI SIIT SIS Asse Rae SEEN SN KIEN VIA A eR NN 206 Example 4 Evaporation and homogeneous redox reactions uosuuoss susanna e a a n a naa nan a ea naa naa aan aeeen 209 Example 5 Irreversible reactions uuouususss none nee a eaa a aa naan naa a aa na a n
291. ents for an analytical expression for the temperature dependence of log K If defined the analytical expression takes precedence over the van t Hoff equation to determine the temperature dependence of the equilibrium constant Optionally analytical expression a e ae a nalytical expression a _e a e A Az Az Ag As Five values defining log K as a function of temperature in the expression A A log oK A A T Aylog pT where T is in Kelvin Notes The set of lines 1 and 2 must be entered in order either line 3 log k or 5 analytical expression must be entered for each phase The analytical expression analytical expression takes precedence over the van t Hoff eguation delta H to determine the temperature dependence of the eguilibrium constant Lines 3 4 and 5 may be entered as needed in any order Additional sets of lines 1 through 5 may be added as necessary to define all minerals and gases The eguations for the phases may be written in terms of any agueous chemical species including The identifiers no check can be used to disable checking charge and elemental balances see SOLUTION SPECIES The use of no check is not recommended except in cases where the phase is only to be used for inverse modeling Even in this case eguations defining phases should be charge balanced The identifier can also be used to define the mineral formula for an exchanger with an explicit charge imbalance see explanation un
292. epending on the completeness of the experimental information When information is lacking a simple rate that is often applied is NUMERICAL METHOD AND RATE EXPRESSIONS FOR CHEMICAL KINETICS 41 uE y where k is an empirical constant and JAP K is the saturation ratio SR This rate equation can be derived from transition state theory where the coefficient is related to the stoichiometry of the reaction when an activated complex is formed Aagaard and Helgeson 1982 Delany and others 1986 Often 1 An advantage of this expression is that the rate equation applies for both supersaturation and undersaturation and the rate is zero at equilibrium The rate is constant over a large domain whenever the geochemical reaction is far from equilibrium IAPIK lt 0 1 and the rate approaches zero when JAP K approaches 1 0 equilibrium The rate expression may also be based on the saturation index S7 in the following form 2 K 96 r k vote This rate expression has been applied with some success to dissolution of dolomite Appelo and others 1984 Rate expressions often contain concentration dependent terms One example is the Monod eguation xx r r i 97 k a C where Fmax is the maximal rate and K is equal to the concentration where the rate is half of the maximal rate The Monod rate equation is commonly used for simulating the sequential steps in the oxidation of organic matter Van Cappellen and Wang 1996 A seri
293. equent simulations through the USE keyword Solid solution compositions are automatically saved following each shift in transport calculations Example problems The keyword SOLID_SOLUTIONS is used in example problem 10 Related keywords PHASES SAVE solid_solution and USE solid_solution 148 User s Guide to PHREEQC Version 2 SOLUTION This keyword data block is used to define the temperature and chemical composition of initial solutions All input concentrations are converted internally to units of molality or equivalently moles of elements and element valence states and mass of water Speciation calculations are performed on each solution and each solution is then available for subsequent batch reaction transport or inverse modeling calculations Capabilities exist to adjust individual element concentrations to achieve charge balance or equilibrium with a pure phase Example data block Line 0 SOLUTION 25 Test solution number 25 Line 1 temp 2000 Line 2 pH 7 0 charge Line 3 pe 4 5 Line 4 redox 0 2 0 0 Line 5 units ppm Line 6 density 1 02 Line 7a Ca 80 Line 7b S 6 96 as SO4 Line 7c S 2 Ta as S Line 7d N 5 N 3 14 as N Line 7e o 0 8 0 Line 7f C 61 0 as HCO3 CO2 9 3 5 Line 7g Fe Do ug kgs as Fe S 6 S 2 Pyrite Line 8a isotope 13C 12 1 permil PDB Line 8b isotope 345 15 1 5 permil CDT Line 9 water 0 5 kg Explanation Line 0 SOLUTION number
294. er column is empty for a solution Molalities of solutes are calculated from input concentrations and the moles of sol utes are determined by the mass of water in solution Optionally water or w ater mass Mass of water in the solution kg Default is 1 0 kg Line 8 isotope name value uncertainty limit isotope Identifier for default ratio for an isotope The isotope ratio and uncertainty limit will be used for all subsequent solutions in the data block if no column has the same name as a heading or if the entry for that column is empty for a solution Isotopes and isotope uncertainty limits can be used only in inverse modeling Optionally isotope or i sotope name Name of the isotope The name must begin with mass number followed by an element name or element redox state that is defined through SOLUTION MASTER SPECIES value Isotopic value units are usually a ratio permil or percent modern carbon uncertainty limit Uncertainty limit to be used in mole balance modeling This value is optional in the SOLUTION data block and alternatively the internally defined default uncertainty limit may be used or an uncertainty limit may be defined with the isotopes identifier of the INVERSE MODELING data block Line 9 isotope uncertainty name uncertainty limit 160 User s Guide to PHREEOc Version 2 isotope_uncertainty Identifier for uncertainty limit in the ratio for an isotope The uncertainty limit for the isotope ratio will
295. ere k refers to the iteration number It is possible for T m tO be negative in intermediate iterations but it must be positive when equilibrium is attained The total derivative of the function f is SS Ny Shu 740 EY Pp dp Yi jan LE i SS Dos S K Ns N S Nu n YY on i MA edn Y bn jan KI s k isp g s i For data input to PHREEQC total moles of elements are initially defined for an aqueous phase with the SOLUTION or SOLUTION_SPREAD data block for an exchange assemblage with the EXCHANGE data block for a surface assemblage with the SURFACE data block for the gas phase with a GAS_PHASE data block The moles of each phase in a pure phase assemblage are defined with the EQUILIBRIUM_PHASES data block The moles of each component in each solid solution in a solid solution assemblage are defined with the SOLID_SOLUTIONS data block Total moles of elements may also be modified by batch reaction and transport calculations see Description of Data Input Aqueous Charge Balance The charge balance equation sums the equivalents of aqueous cations and anions and in some cases the charge imbalances developed on surfaces and exchangers When specified a charge balance equation is used in initial solution calculations to adjust the pH or the activity of a master species and consequently the total concentration of an element or element valence state to produce electroneutrality in the solution The charge balance equation is necessar
296. ermodynamic equilibrium the speciation calculation allows redox disequilibria and accepts the concentrations of the two redox states of nitrogen that are defined by the input data regardless of thermodynamic equilibrium During the batch reaction evaporation step redox equilibrium is attained for the aqueous phase which causes ammonium to be oxidized and nitrate to be reduced generating dissolved nitrogen N 2 aq gt OF N 0 in PHREEQC notation The first batch reaction solution solution 2 contains the equilibrium distribution of nitrogen which consists of nitrate and dissolved nitrogen but no ammonium table 18 The 210 User s Guide to PHREEQC Version 2 Table 18 Selected results for example 4 kg kilogram u mol micromole Constituent Solution 1 Solution 2 i Solution 3 Rain water Concentrated 20 fold Mixed with factor 20 Mass of water kg 1 000 0 05002 1 000 CI u mol 6 657 6 657 133 1 Cl u mol kg water 6 657 133 1 133 1 Nitrate N 5 1 mol kg water 16 9 160 1 160 1 Dissolved nitrogen N 0 u mol kg water 0 475 1 475 1 Ammonium N 3 u mol kg water 14 8 0 0 Calcite saturation index 9 21 9 37 9 37 Dolomite saturation index 19 02 19 35 19 35 Gypsum saturation index 5 35 2 91 2 91 oxidation of ammonium and reduction of nitrate occur in the batch reaction calculation to produce redox equilibrium from the inherent redox disequilibrium in the definition of the rain water composition Nitrogen redox reaction
297. es E E EE EE K NETS E E aay Converg ence PLODLEMS varela ii Inverse modeling tna How to obtain the software and manual eee ee eeceseeeeceeeeeeceseeeeecseecsecssesaecsacsaecnecsececeseseeseseseaeeseeeaecaaecaessaeease Installation and execution of the Win32 Version eee eceeeeeceseeeeecseeesecaeesaeceaesaecnscssecssceseeeeeeeeeaseseeeaecsaeeaessaeeae Installation and execution of the Unix Version ooousssssa son eaa na aa a ne aa a e a aa aa naa aan a aan aa naan a en aeeen Purpose COPE A it Equations for speciation and forward modeling cccecceeseesceeseescesceeeceseecsecaeecaeceaesaecsaessecseeeeceeeeseeeeeseeeaeeaeecseceecaecnaeeas Activities and mass action eguations einean E eE EE EEE eE IE ESE E AECE EE KAATAA OEKE RANo e AQUEQUS SPECIES henee Sass eri e aE E E A E ir iio Exchange specie Sisemi an ves secu eee e da e EA cosa dit Surtac SPECIES So E E O Gas phas COMPONEN Sit ie Is dp Equations for the Newton Raphson method cceesscesccessecesseceeecneeenceceneecseceeneesecesaecececeaeeeaeeceeecseceeeeceeeesaecaees ACUIVITY OF A O O TT Tome HEM Ta Equilibrium with a fixed volume multicomponent gas phaSe oooconcccnnccconccononononconncnonononnannnnoonnnnnnccono non cncnnncones Equilibrium with a fixed pressure multicomponent gas phase eceeccesceceeeeesseeeeeeesecesneceseecaeceaeeceeeenaeesees Equilibtivm with pure phases se ni N deidad Equilibrium with solid Solution S isse ernen eie
298. es for aqueous species PHREEQC allows mole balances on individual valence states or combinations of valence states of an element for initial solution calculations It is DESCRIPTION OF DATA INPUT 67 necessary for PHREEQC to be able to determine the valence state of an element in a species from the chemical equation that defines the species To do this the program requires that at most one aqueous species of an element valence state is defined by an electron half reaction that relates it to another valence state The aqueous species defined by this half reaction is termed a secondary master species there must be a one to one correspondence between valence states and secondary master species In addition there must be one primary master species for each element such that reactions for all aqueous species for an element can be written in terms of the primary master species The equation for the primary master species is simply an identity reaction If the element is a redox element the primary master species must also be a secondary master species For example to be able to calculate mole balances on total iron total ferric iron or total ferrous iron a primary master species must be defined for Fe and secondary master species must be defined for Fe 3 ferric iron and Fe 2 ferrous iron In the default databases the primary master species for Fe is Fe the secondary master species for Fe 2 is Fe and the secondary master spe
299. es i If charged surfaces or exchangers are not present the charge imbalance for a solution at the end of a batch reaction or transport simulation will be the same as at the beginning of the simulation The charge imbalance on a surface is calculated in the initial surface composition calculation in each batch reaction step and for each cell during each time step of transport simulations with the equation K Ns N ag YY tn M Yms 62 k k k isp i where T is the charge imbalance for the surface z is the charge on the surface species i of surface type s of surface s nd the final term in the equation represents the charge accumulated in the diffuse layer The final term is used only if the diffuse layer composition is explicitly included in the calculation diffuse_layer in the SUR FACE data block When the diffuse layer composition is calculated explicitly it is required that all solutions be charge balanced and T will always be equal to zero Normally exchange species have no net charge but for generality this is not required However the activity of exchange species the equivalent fraction is not well defined if the sum of the charged species is not equal to the total number of equivalents of exchange sites exchange capacity If charged exchange species exist then the charge imbalance on an exchanger is calculated in the initial exchange composition calculation in each batch reaction step and for each cell during
300. es of rate expressions can be developed in line with the energy yield of the oxidant first O is consumed then NO and successively other more slowly operating oxidants such as Fe III oxides and S o The coefficients in the Monod equation can be derived from first order rate equations for the individual processes For degradation of organic matter C in soils the first order rate equation is dsc E kiSc 98 where s is organic carbon content mol kg soil and kj is the first order decay constant sh The value of kj is approximately equal to 0 025 yr in a temperate climate with aerobic soils Russell 1973 whereas in sandy aquifers in The Netherlands where NO is the oxidant k 5e 4 ae Concentrations of up to 3 UM O are found in ground water even outside the redox domain of organic degradation by O and 3 u M O may be taken as the concentration where the concentration dependent rate for aerobic degradation equals the reaction rate for denitrification First order decay kj 0 025 yr for 0 3 mM O and kj 5e 4 yr for 3 uM O gt is obtained with the coefficients Fmax 1 57e 9 s and K 294 u M in the Monod equation and oxygen as the limiting solute A similar estimate for denitrification is based on kj 5e 4 yr for NO 3 mM and k le 5 yr for NO 3 UM which yields r 1 67e 11 s and Kn 155 uM The combined overall Monod expression for degradation of organic carbon in a fresh water aquifer is then N
301. esidual of an optimization equation f p which is equal to b e Y a yt is constrained to j be nonnegative which maintains an estimate of saturation or undersaturation for the mineral 2 the value of the residual of an optimization eguation f Pe which is equal to b p ya Peo FPP is constrained to be nonnegative J which maintains an estimate of saturation or undersaturation for the component of the solid solution 3 the resid ual of the optimization equation for f Pus 1s constrained to be nonnegative which maintains a nonnegative esti mate of the total gas pressure 4 the decrease in the mass of a pure phase dn p is constrained to be less than or equal to the total moles of the phase present n 5 the decrease in the mass of a component of a solid solution P dn p is constrained to be less than or equal to the total moles of the component present n p and 6 the decrease in the moles in the gas phase dN is constrained to be less than the moles in the gas phase N gas gas Initial values for the master unknowns for the aqueous phase are taken from the previous distribution of species for the solution If mixing of two or more solutions is involved the initial values are the sums of the values in the solutions weighted by their mixing factor If exchangers or surfaces have previously been equilibrated with a solution initial values are taken from the previous equilibration If they have not been equilibrated with a
302. estarting from a dump file The shift number is written in the dump file by PHREEQC It equals the shift number at which the dump file was cre ated Default is 1 Line 20 warnings True or False warnings Identifier enables or disables printing of warning messages for transport calculations In some cases transport calculations could produce many warnings that are not errors Once it is determined that the warnings are not due to erroneous input disabling the warning messages can avoid generating large output files Optionally warnings warning or w arnings True or False If value is true warning messages are printed to the screen and the output file if value is false warning messages are not printed to the screen or the output file The value set with warnings is retained in all subsequent transport simulations until changed Default is True value at beginning of run is True Notes The advective dispersive transport capabilities of PHREEQC are derived from a formulation of 1D advective dispersive transport presented by Appelo and Postma 1993 The 1D column is defined by a series of cells number of cells is cells each of which has the same pore volume Lengths are defined for each cell and the time step time step gives the time necessary for a pore volume of water to move through each cell Thus the velocity of water in each cell is determined by the length of the cell divided by the time step In the example data bloc
303. esults for the Madison aquifer example Results are in millimoles per kilogram of water unless otherwise noted 14C is carbon 14 in percent modern carbon pmc 5 13C is carbon 13 in permil PDB 5 348 is sulfur 34 in permil CDT CH O represents organic matter Positive numbers for mineral mass transfer indicate dissolution negative numbers indicate precipitation For exchange reactions positive numbers indicate a decrease in calcium and or magnesium and an increase in sodium in solution reactant not included in model 8 34S of pyrite was approximately 22 permil in all models For comparison to calculated isotopic values measured 5 Be 2 3 measured 5 34s total sulfate plus sulfide 15 8 measured o 0 8 pmc Ca Na Mg Na Can 75Mg0 25 Na k NETPATH A NETPATHB PHREEQC B NETPATH C Ge aces PHREEQC C Ca Na exchange 8 3 a z Can 75Mgo 25 Naz exchange 8 3 7 6 7 7 Mg Na exchange 8 3 77 Dolomite CaMg CO3 gt 3 5 11 8 11 2 5 6 5 3 5 4 Calcite CaCO3 5 3 21 8 23 9 9 4 12 3 12 1 Anhydrite CaSO4 20 1 20 1 22 9 20 1 2255 22 5 CH O 8 8 4 1 8 4 3 3 5 Goethite FeOOH 1 AL 1 0 1 1 0 8 Pyrite FeS 1 1 1 0 1 1 0 8 Halite NaCl 15 3 15 3 15 3 15 3 15 8 15 3 Sylvite KCl 2 5 2 5 25 20 25 2 5 Carbon dioxide CO3 0 0 0 0 14C reaction adjusted 12 5 6 4 5 9 3 8 3 8 Apparent age years 22 700 2 200 5 400 16 500 13 000 12 900 5 34S Anhydrite 15 6 15 6 12 8 15 6 12 5 13 4 8
304. etic reactions the number of calls is proportional to number of cells X number of advection steps X 1 number of dispersion steps In this example D D Q v 04 5 X15 m yr Thus by equation 110 mixf 1 3 1 and 3 respectively for the progressively smaller cell sizes For the 15 meter cell size mixf 1 3 one dispersion step is taken for each advection step for the 5 meter cell size mixf 1 three dispersion steps are taken for each advection step and for the 1 67 meter cell size mixf 3 nine dispersion steps are taken for each advection step Figure 2 shows profiles the advective front of Cl C Cg 0 5 after 4 years of travel when it has arrived at 60 m for the 15 meter cell size this requires 4 advection steps The flowtube consists of 9 cells for which geochemical calculations are done for each step therefore the number of the reaction calculations is 9 X4 X 1 1 72 Larger numbers of cells and advection steps apply for the smaller grids The number of calls to the reaction calculations for the other two cases is 27 X12 x 1 3 1 296 and 81 X36 X 1 9 29 160 The examples given here have linear retardation to enable comparison with analytical solutions However linear retardation is subject to large numerical dispersion and the examples are in a sense worst cases with respect 46 User s Guide to PHREEOcC Version 2 Na 15 m cells lt gt CI 15 m cells O Na 5 m cells J O Cl 5 m cells Na 1
305. exchanger e The equivalent fraction is the moles of sites occupied by an exchange species divided by the total number of exchange n eii i sites The activity of an exchange species is a Y T e where b is the number of equivalents of exchanger e occupied by the exchange species i and T is the total number of exchange sites for the exchanger in equivalents Note that T is the total number of equivalents of the exchanger in the system which is not necessarily equal to the number of equivalents per kilogram of water eq kgw because the mass of water in the system may be more or less than 1 kg By default the activity coefficient for an exchange species is 1 0 but optionally a Davies extended Debye Hiickel or WATEQ Debye Hiickel activity coefficient can be used which is based on the aqueous ionic strength and the number of equivalents of exchange sites occupied by the exchange species Equilibrium among aqueous and exchange species requires that all mass action equations for the exchange species are satisfied The association reaction for the exchange species CaX is C a 2X CaX 2 Where X i is the exchange master species for the default database The use of equivalent fractions for activities and this form for the chemical reaction is known as the Gaines Thomas convention Gaines and Thomas 1953 and is the 12 User s Guide to PHREEQC Version 2 convention used in the databases phreeqc dat and wateg4f dat
306. f a gas phase is specified to have a fixed volume then the pressure in the gas volume will vary with reaction extent but each gas component will always be present in the gas phase For a fixed volume gas phase no additional EOUATIONS FOR SPECIATION AND FORWARD MODELING 15 master unknowns are needed and the moles of a component in the gas phase can be calculated from the activities of the aqueous master species If a gas phase is specified to have a fixed pressure the gas phase is a fixed pressure bubble that will vary in volume with reaction extent If the sum of the partial pressures of the component gases is less than the specified total pressure the fixed pressure gas phase will not exist and none of the gas components will be present in the gas phase For a fixed pressure gas phase one additional master unknown is included in the equations which is the total moles of gas components in the gas phase Nay By the assumption of ideality the fugacity activity of a gas component is equal to its partial pressure PHREEQC uses dissolution equations in the sense that the gas component is assumed to be on the left hand side of the chemical reaction For carbon dioxide the dissolution reaction may be written as COn Ory 18 The Henry s law constant relates the partial pressure of the gas component numerically equal to fugacity for ideal gases to the activity of aqueous species For carbon dioxide the Henry s law constant is 10
307. f ferrous iron is a matter of minutes in an aerated solution when pH is above 7 0 However Fe forms solute complexes with OH and it may also precipitate as iron oxyhydroxides so that pH decreases during oxidation Because the rate has quadratic dependence on the activity of OH the oxidation rate rapidly diminishes as pH decreases The rate equation is highly non linear in an unbuffered solution and must be integrated numerically This example models a reaction vessel with 10 mmol NaCl kgw and 0 1 mmol FeCl kgw at pH 7 0 through which air is bubbled the change in solution composition over time is calculated The calculation requires the uncoupling of equilibrium among the Fe 2 and Fe 3 species Two new elements are defined in SOLUTION_MASTER_SPECIES Fe_di which corresponds to Fe 2 and Fe_tri which corresponds to Fe 3 The master species for these elements are defined to be Fe_di 2 and Fe_tri 3 and all solution species phases exchange species and surface species must be rewritten using these new elements and master species A few of the transcriptions are shown in table 28 which gives the partial input file for this example Table 28 Partial input data set for example 9 TITLE Example 9 Kinetically controlled oxidation of ferrous iron Decoupled valence states of iron SOLUTION_MASTER_SPECIES T Fe di Fe di 2 0 0 Fe di 55 847 Fe tri Fe tri 3 0 0
308. f gas component g in the gas phase Moles of aqueous species i in the system Moles of aqueous species i the diffuse layer of surface s Moles of exchange species i in the system Moles of surface species i 5 in the system Moles of phase p in the phase assemblage Moles of solid solution component p in solid solution ss Moles of a reactant either a pure phase or a kinetically controlled reactant 290 User s Guide to PHREEQC Version 2 P f Partial pressure of gas component g atm Porat Total pressure in the gas phase atm p Index number for phases in phase assemblage Pss Index number for components in solid solution ss Y Surface potential for surface s V Q Number of aqueous solutions q Index number for an aqueous solution in a set of aqueous solutions q Concentration in the solid phase expressed as mol kgw in the pores p Density kg m Py for water p for solid R Gas constant kJ mol K R Retardation factor unitless Rr Temperature retardation factor unitless R Total number of agueous redox reactions in inverse modeling R Isotopic ratio of isotope i for element e in phase p i Retardation in the stagnant zone unitless R Overall rate of reaction for substance k mol kgw s Ry Retardation in the mobile zone unitless Ri g Isotopic ratio of isotope i for valence state m in aqueous solution g rp Specific rate of reaction for solid k mol m s O Surface charge density for surface s C m S Number
309. factor Factor describing exchange between mobile and immobile cells s The exchange_factor is used only if stagnant_cells is 1 and all immobile cells have the same proper ties WARNING If exchange_factor is entered all previously defined MIX structures will be deleted and MIX structures for the first order exchange model for a dual porosity medium will be created Default is 0 9 Porosity in each mobile cell The 6 is used only if stagnant_cells is 1 and all immobile cells have the same properties Default is 0 O Porosity in each immobile cell The 6 is used only if stagnant_cells is 1 and all immobile cells have the same properties Default is 0 Line 11 thermal_diffusion temperature retardation factor thermal diffusion coefficient thermal_diffusion Defines parameters for calculating the diffusive part of heat transport Diffusive heat transport will be calculated as a separate process if the temperature in any of the solutions of the transport domain differs by more than 1 C and when the thermal diffusion coefficient is larger than the effective aqueous diffusion coefficient Otherwise diffusive heat transport is calculated DESCRIPTION OF DATA INPUT 175 as a part of aqueous diffusion The temperature retardation factor is defined as the ratio of the heat capacity of the total aquifer over the heat capacity of water in the pores and equals Ry 1 EW where 0 is the water filled porosity p is density kg m k
310. ffect that no batch reaction calculation is performed A batch reaction is implicitly defined whenever a solution or mixture is defined in the simulation and any one of the keyword data blocks EXCHANGE EQUILIBRIUM_PHASES GAS_PHASE KINETICS REACTION REACTION_TEMPERATURE SOLID_SOLUTIONS or SURFACE also is defined in the same simulation The remaining simulations in the input data set equilibrate the surface assemblage with either solution 1 or solution 2 for pH values that range from 5 to 8 It would be possible to use the REACTION data block to add varying amounts of NaOH to a solution in a single simulation but the reaction increments would not produce evenly spaced pH values and the size of the reaction increments is not known beforehand In the example a different approach is taken that produces evenly spaced pH values with no previous knowledge of the amount of NaOH required but many simulations are needed to produce all of the desired pH values Each of the simulations uses the phase Fix_H in an EQUILIBRIUM_PHASES data block with varying saturation indices to adjust pH The reaction NaOH is added or removed from each solution to produce a specified saturation index which by the definition of the reaction for Fix H is numerically equal to the log of the hydrogen activity or negative pH Note that although it is possible to attain the desired pH in all of these simulations a pH that is sufficiently low will cause the program to
311. for a simulation SURFACE_MASTER_SPECIES SURFACE_SPECIES and SURFACE The SURFACE_MASTER_SPECIES data block in the default database files defines a binding site named Hfo hydrous ferric oxides with two binding sites The name of a binding site is composed of a name for the surface Hfo optionally followed by an underscore and a lowercase binding site designation Hfo_w and Hfo_s for weak and strong in the database files The underscore notation is necessary only if two or more binding sites 224 User s Guide to PHREEQC Version 2 exist for a single surface The notation allows a mole balance equation to be derived for each of the binding sites Hfo_w and Hfo_s in this example and a single charge potential or charge balance equation for the surface Hfo in this example Thus the charge that develops on each binding site will enter into a single charge potential or charge balance equation for the surface Table 27 Input data set for example 8 TITLE Example 8 Sorption of zinc on hydrous iron oxides SURFACE_SPECIES Hfo_sOH H Hfo sOH2 log k 7 18 Hfo sOH Hfo sO H log k 8 82 Hfo sOH Zn 2 Hfo sOZn H log k 0 66 Hfo wOH H Hfo wOH2 log k 7 18 Hfo wOH Hfo wO H log k 8 82 Hfo wOH Zn 2 Hfo wOZn H Log k 2532 SURFACE 1 Hfo_sOH 5e 6 600 0 09 Hfo_wOH 2e 4 SOLUTION 1 units mmol kgw pH 8 0 Zn 0 0001
312. for each individual cell It is also possible to distribute the immobile cells over the column non uniformly simply by omitting solutions for the stagnant cells that are not present The connections between the mobile zone and the stagnant zone cells and among stagnant zone cells can be varied along the column as well but this requires that mixing factors among the mobile and immobile cells are prescribed using the keyword MIX As defined in table 33 the column initially contains a 1 mmol L KNO solution in both the mobile and the stagnant zone SOLUTION 1 41 A NaCI NO solution flows into the column SOLUTION 0 An exchange complex with 1 mmol of sites is defined for each cell EXCHANGE 1 41 and exchange coefficients are adapted to give linear retardation R 2 for Nat EXCHANGE_SPECIES The first TRANSPORT data block is used to define the physical and flow characteristics of the first transport simulation The column is 2 m in length and is discretized in 20 cells cells of 0 1 m length A pulse of 5 shifts shifts of the infilling solution SOLUTION 0 is introduced into the column The length of time for each shift is 3600 s timest which results in a velocity in the mobile pores v 0 1 3600 2 78e 5 m s The dispersivity is set to 0 015 m for all cells disp The diffusion coefficient is set to 0 0 diffc The stagnant mobile interchange is defined using the first order exchange approximation The stagnant zone consists of sp
313. for the calculation The set of equations is linear and can be solved k 1 k simultaneously for the unknowns dx New values of the unknowns are calculated I x dx Where k refers to the iteration number after which new values of the residuals are calculated The process is repeated until the values of the residuals are less than a specified tolerance Two problems arise when using the Newton Raphson method for chemical equilibria The first is that the initial values of the unknowns must be sufficiently close to the equilibrium values or the method does not converge and the second is that a singular matrix may arise if the chemical reactions for a set of phases are not linearly independent PHREEQC uses an optimization technique developed by Barrodale and Roberts 1980 to avoid the occurrence of singular matrices The optimization technique also allows inequality constraints to be added to the problem which are useful for constraining the total amounts of phases and solid solutions that can react The selection of initial estimates for the master unknowns is described for each type of modeling in the following sections Regardless of the strategy for assigning the initial estimates the estimates for the activities of the master species for elements or element valence states are revised 1f necessary before the Newton Raphson iterations to produce approximate mole balance The procedure for aqueous master species is as follows After the Initi
314. fp oxygen and m refers to all aqueous master species except H e HO and the alkalinity master species The corresponding set of master unknowns is lna 477 Ina n lna Indy o gt Ina In W 9 N n or e g gas possibly Ina in speciation calculations n Ina Ina or possibly Ina in speciation calculations Indy explicit diffuse layer calculation U on Indy implicit diffuse layer calculation When the residuals of all the functions that are included for a given calculation are equal to zero a solution to the set of nonlinear equations has been found and the equilibrium values for the chemical system have been determined Note that some equations that are initially included in a given calculation may be dropped if a pure phase or gas phase does not exist at equilibrium The solution technique assigns initial values to the master unknowns and then uses a modification of the Newton Raphson method iteratively to revise the values of the master unknowns until a solution to the equations has been found within specified tolerances For a set of equations f 0 in unknowns x the Newton Raphson method involves iteratively revising an initial set of values for the unknowns Let r f be the residuals of the equations for the current values of the unknowns The following set of eguations is formulated 32 User s Guide to PHREEQC Version 2 J ar ri L 83 J where J is the total number of master unknowns
315. fy the constraints may be found Ignoring the values of the s and redox mole transfers 0 let the set of nonzero amp a and Q e mixing fractions and phase mole transfers uniquely identify an inverse model The magnitude of the o s is not important in the identity of an inverse model only the fact that the amp s are nonzero in a certain set is considered At this point little significance should be placed on the exact mole transfers that are found only that it is possible to account for the observations using the aqueous solutions and phases of the inverse model But could other sets of aqueous solutions and phases also produce feasible inverse models An additional algorithm is used to find all of the unique inverse models Assuming P phases and Q aqueous solutions we proceed as follows If no model is found when all Q aqueous solutions and P phases are included in the equations we are done and no feasible models exist If a model is found then each of the phases in the model is sequentially removed and the remaining set of phases and aqueous solutions EQUATIONS AND NUMERICAL METHOD FOR INVERSE MODELING 59 is tested to see if other feasible models exist If no model is found when a particular phase is removed the phase is retained in the model otherwise the phase is discarded After each phase has been tested and possibly discarded the phases that remain constitute a minimal model that is to obtain a feasible model none
316. g i s i S Excess i s aq where saan refers to the moles of agueous species i that are present in the diffuse layer due to the contribution from the bulk solution 1 excess refers to the surface excess W is the mass of water in the system excluding the diffuse layer W is the mass of water in the diffuse layer of surface s It is assumed that the amount of water in the aqueous phase is much greater than in the diffuse layers such that W Wa g In version 1 S Work Wa g y W The mass of water in the diffuse layer is calculated from the thickness of the diffuse S layer and the surface area assuming 1 L contains 1 kg water W 1tA 76 sS S surf where 1 is the thickness of the diffuse layer in meters If the moles of surface sites are related to the moles of a is constant and calculated from the specific pure phase or kinetic reactant then A f A n otherwise A SUV SUV area and the mass of the surface that are specified on input kaa to electrostatic theory the thickness of the diffuse layer should be greater at low ionic strength and smaller at high ionic strength The default value used in PHREEQC for the thickness of the diffuse layer is 1x10 8 m which is approximately the thickness calculated by Debye theory for an ionic strength of 0 001 molal For ionic strength 0 00001 the Debye length of the diffuse layer is calculated to be 1x10 m The assumption that the amount of water in the diffuse layer is sm
317. gram is false Optionally water or w ater Line 19 charge balance True or False charge balance Writes charge balance of solution eg to the selected output file if value is true excludes print if value is false Default is true Initial value at start of program is false Option ally charge balance or c harge balance Line 20 percent error True or False cations lanions percent error Writes percent error in charge balance 100 cations anions to the selected out put file if value is true excludes print if value is false Default is true Initial value at start of program is false Optionally percent_error or per cent_error Line 21 totals element list totals Identifier allows definition of a list of total concentrations that will be written to the selected output file Optionally totals or t otals element list List of elements element valence states exchange sites or surface sites for which total concentrations will be written The list may continue on subsequent line s line 2a Elements valence states exchange sites and surface sites must have been defined in the first column of SOLUTION_MASTER_SPECIES EXCHANGE_MASTER_SPECIES or SURFACE_MASTER_SPECIES input After each calculation the concentration mol kgw of each of the selected elements element valence states exchange sites and surface sites will be written to the selected output file If an element is not defined or is
318. gth false water false charge balance false percent error false define printout of selected properties totals Hfos C C 4 C 4 N N 0 Fe Fe 3 Fe 2 Ca Mg Na Cl molalities Fe 2 Hfo_sOZn ZnX2 activities H Ca 2 CO2 HC03 CO3 2 eguilibrium phases Calcite Dolomite Sphalerite saturation indices CO2 g Siderite gases CO2 g N2 9 02 g kinetic reactants CH20 Pyrite solid solutions Caso4 Srso4 inverse modeling true DESCRIPTION OF DATA INPUT 137 Explanation Line 0 SELECTED_OUTPUT SELECTED_OUTPUT is the keyword for the data block No additional data are read on this line Optionally SELECTED_OUT SELECT_OUTPUT or SELECT_OUT Line 1 file file name file Identifier allows definition of the name of the file where the selected results are written Option ally file or f ile file name File name where selected results are written If the file exists the contents will be overwrit ten File names must conform to operating system conventions Default is selected out Line 2 selected_out True or False selected_out Controls printing to the selected output file When selected_out is set to false all printing to the selected output file is halted Printing can be resumed if selected_out is set to true in a SELECTED OUTPUT data block in a subsequent simulation Default is true Optionally se lected_out Note the hyphen is required to avoid a conflict with synonym of keyword SELECTED_OUTPUT Line 3 user_pu
319. gw over solute concentration maximum Na 24 mmol kgw is 2 0 for all concentrations and the retardation is therefore R 1 dNaX dN a 3 0 which is numerically equal to the temperature retardation 25 T Na AND TEMPERATURE Cl e ANALYTICAL SOLUTION RETARDATION 3 0 O ANALYTICAL SOLUTION RETARDATION 1 0 N O rtr pt ot tt O MMOL KG WATER OR TEMPERATURE C o o al 10 15 DISTANCE IN METERS N o Figure 12 Simulation results for diffusion from column ends of heat and Na retardation R 3 and Cl R 1 compared with constant boundary condition analytical solution The SELECTED OUTPUT data block specifies the name of the selected output file to be ex 2 sel The identifier high_precision true is used to obtain an increased number of digits in the printing and the identifiers dist and temp specify that the distance and temperature of each cell will be printed to the file The USER_PUNCH data block is used to print concentrations of sodium potassium and chloride to the selected output file in units of mmol kgw In the model the temperature is calculated with the linear retardation formula however the Nat concentration is calculated by the cation exchange reactions Even though the Na concentration and the temperature are calculated by different methods the numerical values should be the same because the initial conditions and the transient conditions are numerically equal and the
320. h 0 703 kcal analytic 607 642 0 121098 20011 25 Gypsum CaS04 2H20 Ca 2 s04 2 2 H20 log_k 4 580 delta_h 0 109 kcal analytic 68 2401 0 0 5322151 Anhydrite CaSO4 Ca 2 SO4 2 log_k 4 360 delta_h 1 710 kcal analytic 197 52 0 0 8669 8 Celestite SrS04 Sr 2 s04 2 log_k 6 630 delta_h 1 037 kcal analytic 14805 9622 2 4660924 756968 533 Barite BaS04 Ba 2 S04 2 log_k 9 970 delta_h 6 350 kcal analytic 136 035 0 0 7680 41 Hydroxyapatite Ca5 P04 30H 4 H H20 3 HPO4 2 5 Ca 2 log_k 3 421 delta_h 36 155 kcal Fluorite CaF2 Ca 2 2 F log_k 10 600 delta_h 4 690 kcal analytic 66 348 0 0 4298 2 Si02 a SiO2 2 H20 H4Si04 log_k 2 710 delta_h 3 340 kcal 713595 11 595 56 58638 236 4948 25 0627 69 835 5436 3588 40553604 0 48 595 225 0271 Attachment B Description of Database Files and Listing 301 analytic 0 26 0 0 731 0 Chalcedony Si02 2 H20 H4Si04 log_k 34 9 90 delta_h 4 720 kcal analytic 0 09 0 0 1032 0 Quartz SiO2 2 H20 H4Si04 log_k 3 980 delta_h 5 990 kcal analytic 0 41 0 0 1309 0 Gibbsite A1 0H 3 3 H Al 3 3 H20 log_k 8 110 delta_h 22 800 kcal Al OH 3 a A1 0H 3 3 H Al 3 3 H20 log_k 10 800 delta_h 26 500 kcal Kaolinite A12Si205 OH 4 6 H H20 2 H4Si04 2 A1 3 log_k 7 435 delta_h 35 300 kcal Albite NaA1Si308 8 H20 Na Al 0H 4 3 H4Si04 10g k 1
321. h not incorrect the batch reaction calculation will produce the same compositions for the solution and surface as previously defined By including USE solution none the batch reaction calculation will be eliminated The composition of the solution exchange assemblage solid solution assemblage surface assemblage pure phase assemblage or gas phase can be saved after a set of batch reaction calculations with the SAVE keyword Example problems The keyword USE is used in example problems 3 6 7 8 10 and 14 Related keywords EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE KINETICS MIX REACTION REACTION_TEMPERATURE SAVE SOLID_SOLUTIONS SOLUTION and SURFACE 182 User s Guide to PHREEQC Version 2 USER_PRINT This keyword data block is used to define Basic programs that print user defined quantities to the output file Any Basic PRINT statement will write to the output file Example data block Line 0 USER_PRINT Line 1 start Basic 10 REM convert to ppm Basic 20 PRINT Sodium MOL Na 22 99 1000 Basic 30 PRINT Magnesium MOL Mg 2 24 3 1000 Basic 40 pairs MOL NaCO03 MOL M9gCO3 Basic 50 PRINT Pairs mol kgw pairs Basic 60 REM print reaction increment Basic 70 PRINT Rxn incr RXN Line 2 end Explanation Line 0 USER PRINT USER PRINT is the keyword for the data block No other data are input on the keyword line Line 1 start start Indicates
322. h only two solutions in the model normally the fraction for each solution will be 1 0 If more than two solutions are included in the inverse model normally the sum of the fractions of the solutions excluding the last solution will equal 1 0 The fractions are actually derived from a mole balance on water so if hydrated minerals consume or produce significant amounts of water or if evaporation is modeled see example 17 the numbers may not sum to 1 0 In this example all fractions are identically 1 0 the amount of water from gypsum dissolution is too small to affect the four significant figures of the mixing fractions The second and third column for the block giving solution fractions are the minimum and maximum fractional values that can be attained within the constraints of the specified uncertainty limits These two columns are nonzero only if the range identifier is used The next block of data in the listing contains three columns describing the mole transfers for the phases Phase mole transfers The first column contains the inverse model that is consistent with the adjusted concentrations printed in the listing of the solutions In this example the adjusted solution 1 plus the mole transfers in the first column exactly equals the adjusted solution 2 Mole transfers that are positive indicate dissolution mole transfers that are negative indicate precipitation Note that mole transfers in phase assemblages in batch reaction calculations
323. hange formula Exchange species including stoichiometry of exchange ion and exchange site s The exchange formula must be charge balanced if no exchange ions are included in the formula then the exchange site must be uncharged name Name of the pure phase or kinetic reactant that has this kind of exchange site If name is a phase the amount of the phase in an EQUILIBRIUM_PHASES data block with the same number as this exchange number 10 in the example data block will be used to determine the number of exchange sites If name is a kinetic reactant the amount of the reactant in a KINET ICS data block with the same number as this exchange number 10 in the example data block will be used to determine the number of exchange sites Some care is needed in defining the sto ichiometry of the exchange species if the exchangeable ions are related to a phase or kinetic reactant The assumption is that some of the ions in the pure phase or kinetic reactant are avail able for exchange and these ions are defined through one or more entries of Line 2 The stoichi 82 User s Guide to PHREEQC Version 2 ometry of the phase defined in a PHASES data block or kinetic reactant defined in a KINETICS data block must contain sufficient amounts of the exchangeable ions From the example data block Line 2a there must be at least 0 165 mol of calcium per mole of Ca Mont morillonite From the example data block Line 2b there must be at least 0 1 mol of sodium
324. hat the sorbed species are not transported When modeling with PHREEQC kinetic reactants must be charge balanced For sorption of Co and CoNta 1 mmol of NaCl was added to the solution definitions to have counter ions for the sorption process The kinetic sorption reactions were then defined to remove or introduce depending on the sign of the mole transfer CoCl and NaCoNta which are charge balanced To convert from moles sorbed per gram of sediment s to moles sorbed per liter of water it is necessary to multiply by the grams of sediment per liter of water 3 75e3 g L Input Data Set Table 44 shows the input data set derived from the preceding problem definition Although rates have been given in units of mol L hr rates in PHREEQC are always mol s and all rates have been adjusted to seconds in the definition of rate expressions in the input data set It is assumed that a volume of 1 L of water is in each cell which is reasonable for the current problem because the mass of water in each solution is nearly 1 kg and the solutions are relatively dilute If the mass of water in a solution deviates significantly from 1 kg the assumption of a constant volume may break down The 10 meter column was discretized with 10 cells of 1 meter each The first two SOLUTION data blocks define the infilling solution and the initial solution in cells 1 through 10 The RATES data block defines the rate expressions for four kinetic reactions HNta 2 Biomass C
325. he end of the run or until changed in another PRINT data block Unlike most of PHREEQC input the order in which the identifiers are entered is important when using the reset identifier Any identifier set before the reset in the data block will be reset when reset is encountered Thus reset should be the first identifier in the data block Using reset false will eliminate all printing to the output file except echoes of the input data set and warning and error messages For long TRANSPORT and ADVECTION calculations with KINETICS printing the status line status true default may cause a significant increase in run time This has found to be the case on some Macintosh systems If printing to the screen is unbuffered the program must wait for the status line to be written before continuing calculations which slows overall execution time In this case setting status false may speed up run times 122 User s Guide to PHREEQC Version 2 The identifiers species and saturation_indices control the longest output data blocks and are the most likely to be selectively excluded from long computer runs If transport calculations are made the output file could become very large unless some or all of the output is excluded though the PRINT data block reset false Alternatively the output in transport calculations may be limited by using the print_cells and print_frequency identifiers in the ADVECTION and TRANSPORT data block For transport calc
326. he extent of the kinetic reactions at each time increment are calculated by the Basic interpreter which is found in basic c and p2clib c If explicit diffuse layer calculations are made the integration of the Poisson Boltzmann equation is performed by the subroutines in integrate c A few functions that are used throughout the code are found in utilities c Finally many of the manipulations of structures including allocating space initializing copying and freeing space are performed by subroutines in the file structures c The subroutine clean_up in structures c frees all allocated memory at the termination of the program The file phgalloc c contains subroutines to allocate reallocate and free memory These subroutines have capabilities for debugging memory leaks that is memory that is allocated but not released when it is no longer needed For efficiency a hash table of character strings is kept by the program Each character string including element names species names phase names and others is stored only once All references to the same string then point to the same memory location Thus for example a comparison of element names need only check to see if the memory address is the same avoiding the necessity of comparing the strings character by character Finding the memory location of a specified string is performed by a hash table lookup Hash tables are also used to speed up lookups for species elements and phases DESC
327. he initial surface composition calculation are f PE f y or f e Fed H 0 and f po which are equations for mole balance for each type of surface site in the surface assemblage the charge potential relation or charge balance for each surface both of these equations are excluded in the non electrostatic model mole balance for each element or element valence state activity of water and ionic strength For initial surface composition calculations the values of T include only the aqueous concentrations and the corresponding mole balance equations f do not contain terms for the contribution of the surfaces to the total element concentrations All quantities related to the aqueous phase are the same as for the solution without the surface assemblage present he values of the master unknowns for each surface type of the surface assemblage Ina s and the potential unknowns For the explicit calculation of the diffuse layer a charge balance equation is used for each surface f t Indy are adjusted to achieve mole balance and charge balance for each surface If the diffuse layer composition is not explicitly included in the calculation then the charge potential equation fy is used in place of the surface charge balance equation If the non electrostatic model is used for the surface assemblage then neither the surface charge balance nor the charge potential equation is included in the set of equations to be solved All equations for initia
328. he rate expressions for exam ple constants exponents or half saturation constants In the rate expression defined with the RATES keyword these numbers are available to the Basic interpreter in the array PARM PARM 1 is the first number entered PARM 2 the second and so on Optionally parms p arms parameters or p arameters Line 6 tol tolerance tolerance Tolerance for integration procedure moles For each integration time interval the differ ence between the fifth order and the fourth order integrals of the rate expression must be less than DESCRIPTION OF DATA INPUT 107 this tolerance or the time interval is automatically reduced The value of tolerance is related to the concentration differences that are considered significant for the elements in the reaction Smaller concentration differences that are considered significant require smaller tolerances Numerical accuracy of the kinetic integration can be tested by decreasing the tolerance to deter mine if results change significantly Default is 1e 8 Optionally tol or t ol Line 7 steps list of time steps list of time steps Time steps over which to integrate the rate expressions seconds The steps iden tifier is used only during batch reaction calculations it is not needed for transport calculations By default the list of time steps are considered to be independent times all starting from zero The example data block would produce results after 100 200 and 30
329. heres with radius r 0 01 m diffusion coefficient D 3 e 10 m s and shape factor f 0 21 according to table 1 see Transport in Dual Porosity Media These variables give an exchange factor a 6 8e 6 s Mobile porosity is 8 0 3 stag and immobile porosity 0 0 1 For the first order exchange im approximation in PHREEQC a single cell immobile zone and the parameters 0 6 and 0 are specified with stag This stagnant zone definition causes each cell in the mobile zone numbered 1 20 to have an associated cell in the immobile zone numbered 22 41 The PRINT data block is used to eliminate all printing to the output file Following the pulse of NaCl solution 10 shifts of 1 mmol KNOy L second SOLUTION 0 are introduced into the column The second TRANSPORT data block does not redefine any of the column or flow characteristics but specifies that results for cells 1 through 20 punch_cells be written to the selected output file after 10 shifts punch_frequency The data blocks SELECTED_OUTPUT and USER_PUNCH specify the data to be written to the selected output file EXAMPLES 247 Table 33 Input data set for example 13A Stagnant zone with implicitly defined mixing factors TITLE Example 13A 1 mmol l NaC1 NO3 enters column with stagnant zones Implicit definition of first order exchange model SOLUTION 0 1 mmol l NaCl units mmol 1 pH 7 0 pe 130 02 g 0 7 Na 1 0
330. his example the mixing factors are calculated to be mixf 0 20886 and mixf 0 06962 The mixing factors differ for the mobile cell and the immobile cell to account for the difference in the volume of mobile and immobile water In PHREEQC a mixing of mobile and stagnant water is done after each diffusion dispersion step This means that the time step decreases when the cells are made smaller and when more diffusive steps mixruns are performed A 20 cell model as in example 13A has one mixrun A 100 cell model would have 3 mixruns equation 110 requires n 3 for mixf lt 1 3 and the time step for calculating mixf would be 3600 5 3 240 s A time step t 240 s leads to mixf 0 01614 in the 100 cell model Stagnant Zone Calculation Using the First Order Exchange Approximation with Explicit Mixing Factors The input file with explicit mixing factors for a uniform distribution of the stagnant zones is given in table 34 The SOLUTION data blocks are identical to the previous input file One stagnant layer without further information is defined stag 1 in the TRANSPORT data block The mobile immobile exchange is set by the mix fraction given in the MIX data blocks The results of this input file are identical with the results from the previous input file in which the shortcut notation was used However the explicit definition of mix factors illustrates that a non uniform distribution of the stagnant zones or other physical propert
331. hod of lower order to derive an error estimate The error estimate is compared with a user defined error tolerance to automatically decrease or increase the integration time interval to maintain the errors within the given tolerance Furthermore if the rates in the first three RK evaluations differ by less than the tolerance the final rate is calculated directly and checked once more against the required tolerance The user can specify the number of intermediate RK subintervals which are evaluated before final integration of the interval is attempted see Description of Data Input The coefficients in the scheme are from Cash and Karp 1990 Rate Expressions The overall rate for a kinetic reaction of minerals and other solids is A m Y r Lk RAR 94 where r is the specific rate mol m s Ag is the initial surface area of the solid m Vis the amount of solution kgw myy is the initial moles of solid m is the moles of solid at a given time and 7m mp is a factor to account for changes in A V during dissolution and also for selective dissolution and aging of the solid For uniformly dis solving spheres and cubes n 2 3 All calculations in PHREEQC are in moles and the factor Ay V must be provided by the user to obtain the appropriate scaling The specific rate expressions r for a selection of substances have been included in the database under keyword RATES These specific rates have various forms largely d
332. hydrite 11 5 to 15 5 permil The 6 13C of precipitating calcite depends on the isotopic evolution of the solution and is affected by isotopic fractionation The fractionation equations are not included in PHREEQC so it is necessary to assume a compositional range of calcite that represents the average isotopic composition of the precipitating calcite The average isotopic composition of precipitating calcite from NETPATH calculations was about 1 5 permil Plummer and others 1994 and an uncertainty limit of 1 0 permil was selected to account for uncertainties in fractionation factors All carbon 14 modeling was done with NETPATH using mole transfers from PHREEQC models The 55 of precipitating pyrite was estimated to be 22 permil Plummer and others 1990 with an uncertainty limit of 2 permil sensitivity analysis indicated that the isotopic value for the precipitating pyrite had little effect on mole transfers The input data set for PHREEOC is shown in table 53 Note that the log K values for sylvite CH O and the Cag 75M2 25 Na exchange reaction are set to zero in the PHASES and EXCHANGE SPECIES data blocks The stoichiometry of each of these reactants is correct which is all that is needed for mole balance modeling however any saturation indices or forward modeling using these reactions would be incorrect because the log K values have not been properly defined Table 53 Input data set for example 18 TITLE Example 18 Inverse m
333. ibrium with the specified solution solution 10 for all three surface assemblages in this example data block The composition of the solution will not change during these calculations In contrast during a batch reaction calculation when a surface assemblage defined as in example data block 1 or example data block 2 of this section is placed in contact with a solution with which it is not in equilibrium both the surface composition and the solution composition will adjust to reach a new equilibrium SURFACE 1 has two surfaces Surfa and Surfb Surfa has two binding sites Surfa_w and Surfa_s the surface area and mass for Surfa must be defined in the input data for at least one of the two binding sites Surfb has only one kind of binding site and the area and mass must be defined as part of the input for the single binding site SURFACE 3 has one surface Surfc which has two binding sites Surfc_w and Surfc_s The number of binding sites for these two kinds of sites is determined by the amount of Fe OH 3 a in EQUILIBRIUM_PHASES 3 where 3 is the same number as the surface number If m represents the moles of Fe OH 3 a in EQUILIBRIUM_PHASES 3 then the number of sites of Surfc_w is 0 1m mol and of Surfc_s is 0 001m mol The surface area for Surfc is defined relative to the moles of Fe OH 3 a such that the surface area is 100 000m m During batch reaction simulations the moles of Fe OH 3 a in EOUILIBRIUM PHASES 3 may change in which case the n
334. ical expression is used in preference to the enthalpy value for calculation of temperature dependence of a log K Comments The character delimits the beginning of a comment in the input file All characters in the line that follow this character are ignored If the entire line is a comment the line is not echoed to the output file If the comment follows input data on a line the entire line including the comment is echoed to the output file The is useful for adding comments explaining the source of various data or describing the problem set up In addition it is useful for temporarily removing lines from an input file Logical line separator A semicolon is interpreted as a logical end of line character This allows multiple logical lines to be entered on the same physical line For example solution data could be entered as pH 7 0 pe 4 0 temp 25 0 on one line The semicolon should not be used in character fields such as the title or other comment or description fields Logical line continuation A backslash VW at the end of a line may be used to merge two physical lines into one logical line For example a long chemical equation could be entered as Ca0 165A12 33513 67010 0H 2 12 H20 V 0 165Ca 2 2 33 Al OH 4 3 67 H4Si04 2 H 66 User s Guide to PHREEOcC Version 2 on two lines The program would interpret this sequence as a balanced equation entered on a single logical line Note
335. icant decimal digit that can be interpreted by the computer The value of tolerance should be on the order of 1e 12 to 1e 15 for most computers and most simulations Default is 1e 15 or possibly smaller if the program is compiled with long double precision Line 4 step_size step_size step_size Allows changing the maximum step size Optionally step_size or s tep_size step_size Positive decimal number limiting the maximum multiplicative change in the activity of an aqueous master species on each iteration Default is 100 that is activities of master species may change by up to 2 orders of magnitude in a single iteration Line 5 pe_step_size pe_step_size pe_step_size Allows changing the maximum step size for the activity of the electron Optionally pe_step_size or p e_step_size pe_step_size Positive decimal number limiting the maximum multiplicative change in the conven tional activity of electrons on each iteration Normally pe_step_size should be smaller than the step_size because redox species are particularly sensitive to changes in pe Default is 10 that is a _ may change by up to 1 order of magnitude in a single iteration or pe may change by up to 1 unit Line 6 diagonal_scale True or False diagonal_scale Allows changing the default method for scaling equations Optionally diagonal_scale or d iagonal_scale True or False A value of true optionally t rue indicates the alternative scaling method
336. icarbonate water with pH in the range of 7 0 to 7 5 in the unconfined part of the aquifer and a sodium bicarbonate water with pH in the range of 8 5 to 9 2 in the confined part of the aquifer In addition marine derived sodium chloride brines exist below the aquifer and presumably in fluid inclusions and dead end pore spaces within the aquifer Large concentrations of arsenic selenium chromium and uranium occur naturally within the aquifer Arsenic is associated almost exclusively with the high pH sodium bicarbonate water type 254 User s Guide to PHREEQC Version 2 The conceptual model for the calculation of this example assumes that brines initially filled the aquifer The aquifer contains calcite dolomite clays with cation exchange capacity and hydrous ferric oxide surfaces initially the cation exchanger and surfaces are in equilibrium with the brine The aquifer is assumed to be recharged with rainwater that is concentrated by evaporation and equilibrates with calcite and dolomite in the vadose zone This water then enters the saturated zone and reacts with calcite and dolomite in the presence of the cation exchanger and hydrous ferric oxide surfaces The calculations use the advective transport capabilities of PHREEQC with just a single cell representing the saturated zone A total of 200 pore volumes of recharge water are advected into the cell and with each pore volume the water is equilibrated with the minerals cation exchanger and
337. icic acid the saturation indices for gibbsite kaolinite K mica and K feldspar and the total amounts in the phase assemblage and mole transfers for gibbsite kaolinite K mica and K feldspar will be written to the file ex6A B sel after each calculation The definitions for SELECTED OUTPUT remain in effect for all simulations in the run until anew SELECTED_OUTPUT data block is read or until writing to the file is suspended with the identifier selected_output in the PRINT data block Table 22 Selected results for example 6A Simulation refers to labels in the input data set for example 6A Negative mole transfers indicate dissolution positive mole transfers indicate precipitation Point on graph refers to labeled points on figure 6 K feld Log activity Mole transfer micromoles Saturation index spar E A Point Simu mole K n lation transfer A K Gibbs Kao K Gibbs Kao K A E h micro H H4SiO ite linite mica ite linite mica grap moles spar 6A1 0 03 7 01 0 57 7 10 0 00 0 00 0 00 0 0 3 8 10 7 14 7 A 6A2 2 18 8 21 2 55 5 20 1 78 00 00 0 0 1 9 5 9 B 6A3 20 02 9 11 4 41 4 47 00 9 71 00 7 0 0 2 5 D 6A4 190 9 9 39 5 49 3 55 00 00 63 61 2 0 7 0 0 F 6A5 3 02 8 35 2 83 5 20 00 1 24 00 0 0 1 6 5 6 C 6A6 32 68 9 07 4 41 4 25 00 00 10 78 9 0 0 2 1 E Simulation 6A1 allows K feldspar to react until equilibrium with gibbsite is reached This is set up in EQUILIBRIUM_PHASES in
338. ide 3 38 compared to about 3 5 and is supersaturated with calcite saturation index 0 76 and dolomite 2 41 No mole transfers of minerals was allowed for part B Part C performed the mixing and calculated the equilibrium distribution of species in the mixture again with no mole transfers of the minerals allowed The resulting log Pag is 2 23 calcite is undersaturated and dolomite is supersaturated The saturation indices indicate that thermodynamically dolomitization should occur that is calcite should dissolve and dolomite should precipitate Part D calculates the amounts of calcite and dolomite that should react To produce equilibrium 15 71 mmol of calcite should dissolve and 7 935 mmol of dolomite should precipitate Dolomitization is not observed to occur in present day mixing zone environments even though dolomite is the thermodynamically stable phase The lack of significant dolomitization is due to the slow reaction kinetics of dolomite formation Therefore part E simulates what would happen if dolomite does not precipitate If dolomite does not precipitate only a very small amount of calcite dissolves 0 040 mmol for this mixing ratio Example 4 Evaporation and Homogeneous Redox Reactions Evaporation is accomplished by removing water from the chemical system Water can be removed by three methods 1 water can be specified as an irreversible reactant with a negative reaction coefficient in the REACTION keyword input 2 the
339. identifier affects only the range calculation it does not affect the number of models that are found When the range identifier is specified and a model is found by the numerical method then the model is augmented by any phase for which force is specified and by any solution for which force_solutions is true the range calculation is performed with the augmented model The effect of these options is to calculate wider ranges for mole transfers for some models If every phase and every solution were forced to be in the range calculation then the results of the range calculation would be the same for 104 User s Guide to PHREEQC Version 2 Table 5 Default uncertainty limits for isotopes 13c 4 BC 4 34g 345 5 345 2 H 180 87Sr Default uncertainty limit 1 permil PDB 1 permil PDB 5 permil PDB 1 permil CDT 1 permil CDT 5 permil CDT 1 permil VSMOW 0 1 permil VSMOW 0 01 ratio every model and the results would be the maximum possible ranges of mole transfer for any models that could be derived from the given set of solutions and phases Example problems The keyword INVERSE_MODELING is used in example problems 16 17 and 18 Related keywords EXCHANGE_SPECIES PHASES PRINT SELECTED_OUTPUT SOLUTION and SAVE DESCRIPTION OF DATA INPUT 105 KINETICS This keyword data block is used to identify kinetic reactions and specify reaction parameters for batch reaction and transport calculations Mathe
340. ides the stoichiometry of the elements C H O and N in the reaction This stoichiometry is equal to the sum of the elements on the right hand side of the equation excluding C5H7O N minus the sum of the ele ments on the left hand side of the equation The corresponding change in aqueous element concentrations per mole of HNta reaction is given in Table 41 positive coefficients indicate an increase in aqueous concentration negative coefficient indicates a decrease in aqueous concentration Table 41 Reaction stoichiometry for oxidation of Nta Component Coefficient Nta 1 0 3 12 1 968 4 848 Z O fF A 424 The following multiplicative Monod rate expression is used to describe the rate of Nta degradation C 7 HNTA co R INTA Imm K xc 164 Ss HNTA Kat o where RINTA gt is the rate of HNta degradation mol L hr g is the maximum specific rate of substrate utili zation mol g cells hr X is the biomass g cells L K is the half saturation constant for the substrate Nta mol L K is the half saturation constant for the electron acceptor O mol L and c indicate concentration mol L The rate of biomass production is dependent on the rate of substrate utilization and a first order decay rate for the biomass R YR lt bX 0 165 cells 7 HNTA where R jj 18 the rate of cell growth g cells L hr Y is the microbial yield coefficient g cells mol Nta and b is the first order bi
341. ies of the stagnant zone can be included in PHREEQC simulations by varying the mixing fractions which define the exchange among mobile and immobile cells Table 34 Input data set for example 13B Stagnant zone with explicitly defined mixing factors TITLE Example 13B 1 mmol l NaC1 NO3 enters column with stagnant zones Explicit definition of first order exchange factors SOLUTION 0 1 mmol l NaCl units mmol l pH 7 0 pe 13 0 02 g 001 Na 1 0 Na has Retardation 2 cl 1 0 Cl has Retardation 1 stagnant exchange N 5 1 0 NO3 is conservative charge imbalance is no problem EXAMPLES 249 END SOLUTION 1 41 units mmol l pH 7 0 pe 130 02 g K 120 N 5 10 EXCHANGE 1 41 equil 1 X 1 e 3 EXCHANGE SPECIES For linear exchange K X KX log k 0 0 gamma 3 5 0 015 END MIX 1 1 93038 22 06962 MIX 3 3 93038 24 06962 MIX 5 5 93038 26 06962 MIX 7 7 93038 28 06962 MIX 9 9 93038 30 06962 MIX 11 11 93038 32 06962 MIX 13 13 93038 34 06962 MIX 15 15 93038 36 06962 TX Lk 17 oe 930382 38 06962 MIX 19 19 93038 40 06962 MIX 22 1 20886 22 79114 MIX 24 3 20886 24 79114 MIX 26 5 20886 26 79114 MIX 28 7 20886 28 79114 MIX 30 9 20886 30 79114 MIX 32 11 20886 ID 79114 MIX 34 13 20886 34 79114 MIX 36 15 20886 36 79114 MIX 38 17 20886 38 79114 MIX 40 19 20886 40 79114 TRANSPORT cells 2
342. ill be added with a relative coefficient of 1 0 and NaCl will be added with a relative coefficient of 0 5 The steps of the reaction are defined to be 0 0 0 001 0 005 0 01 and 0 05 mol The reactants can be defined by a chemical formula as in this case Oy or by a phase name that has been defined with PHASES input Thus the phase name O2 g or Halite from the default database file could have been used in place of O2 or NaCl to achieve the same result The number of moles of the element oxygen added to the aqueous phase in each reaction step is equal to the stoichiometric coefficient of oxygen in the formula O2 2 0 times the relative coefficient 1 0 times the moles of reaction defined by the reaction step 0 0 0 001 0 005 0 01 or 0 05 the number of moles of chloride added at each step is the stoichiometric coefficient of chlorine in the formula NaCl 1 0 times the relative coefficient 0 5 times the moles in the reaction step SELECTED_OUTPUT is used to write the total concentration of chloride the saturation index of gypsum and the total amounts and mole transfers of pyrite goethite calcite carbon dioxide and gypsum to the file ex5 sel after each equilibrium calculation The results for example 5 are summarized in table 20 When no oxygen and sodium chloride are added to the system a small amount of calcite and carbon dioxide dissolves and trace amounts of pyrite and goethite react 212 User
343. in low temperature aqueous systems in Bassett R L and Melchior D eds Chemical modeling in aqueous systems II Washington D C American Chemical Society Symposium Series 416 Chapt 6 p 74 86 Glynn P D 1991 MBSSAs A code for the computation of Margules parameters and equilibrium relations in binary solid solu tion aqueous solution systems Computers and Geosciences v 17 no 7 p 907 966 Glynn P D and Parkhurst D L 1992 Modeling non ideal solid solution aqueous solution reactions in mass transfer com puter codes in Kharaka Y K and Maest A S eds Proceedings of the 7th International Symposium on Water Rock Inter action Park City Utah July 13 18 1992 Balkema Rotterdam p 175 179 Glynn P D and Reardon E J 1990 Solid solution aqueous solution equilibria Thermodynamic theory and representation American Journal of Science v 290 p 164 201 Glynn P D Reardon E J Plummer L N and Busenberg Eurybiades 1990 Reaction paths and equilibrium end points in solid solution aqueous solution systems Geochimica et Cosmochimica Acta v 54 p 267 282 Harvie C E Moller N and Weare J H 1984 The prediction of mineral solubilities in natural waters The Na K Mg Ca H Cl SO4 OH HCO3 CO3 CO H30 system to high ionic strengths at 25 C Geochimica et Cosmochimica Acta v 48 p 723 751 Harvie C E and Weare J H 1980 The prediction of mineral solubilities in natural waters The Na K Mg Ca Cl SO 4
344. in which advection occurs and then additional immobile cells connected to the mobile cells are used to represent the stagnant zone that is accessible only by diffusion The stagnant zone can be defined to be parallel or perpendicular to the column of mobile cells or to be a combination of the two by proper definition of mixing factors in MIX data blocks A shortcut is available for the classical formulation of a dual porosity medium with a first order rate of exchange In this case stagnant is used to define one stagnant cell for each mobile cell stagnant_cells 1 an exchange factor exchange_factor for the exchange between immobile and mobile cells and for the mobile and immobile cells WARNING If this shortcut method is used to define the stagnant zone then all previously defined MIX structures will be deleted and MIX structures for first and the porosities order exchange in a dual porosity medium are set up Thermal diffusion can be modeled for a stagnant zone with first order exchange between mobile and immobile cells Thermal exchange is calculated after subtracting the part that is associated with hydrodynamic diffusion see Transport of Heat PHREEQC uses the value of the diffusion coefficient to find the correct heat 178 User s Guide to PHREEOc Version 2 exchange factor and the value entered with identifier diffusion_coefficient should be the same as has been used in equation 125 to calculate the exchange fact
345. included another part to their test problem that increased the rate constants for the sorption reactions from 1 to 1000 hr The increased rate constants generate a stiff set of partial differential equations in which the rate limited processes occur on different 268 User s Guide to PHREEQC Version 2 2 0e 09 4e 04 Sorbed CoNta 10 cells a J j 2 AES lomass cells 1 50 09 Sorbed Co 10 cells 36 04 Sorbed CoNta 20 cells z Sorbed Co 20 cells 4 D E a Z W 1 0e 09 2e 04 2 5 o m 5 0e 10 1e 04 0 0e 00 Sole 0e 00 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 HOURS Figure 16 Concentrations of sorbed species and biomass at the outlet of the column for Nta and cobalt transport simulations with 10 and 20 cells time scales The stiff problem with very fast sorption reactions proved intractable for the explicit algorithm of PHREEQC but could be solved successfully when the fast kinetic sorption reaction was calculated as the equilibrium process that it effectively constituted However even with equilibrium sorption grid convergence was computationally much more intensive it was necessary to use 100 cells or more to arrive at a satisfactory solution As an estimate of relative CPU times the 10 cell model took 270 seconds and the 20 cell model took 732 seconds to run on a Pentium I 133 MHz computer A 200 cell model took approximately 600 times more CPU time than the 10 cell mo
346. ined by a valence enclosed by parentheses following an element name Comment character all characters following are ignored Logical line separator Line continuation if Y is the last non white space character of a line Can be used to indicate a repeat count for length and dispersivity values in the TRANSPORT data block Reducing Chemical Eguations to a Standard Form The numerical algorithm of PHREEQC requires that chemical equations be written in a particular form Internally every eguation must be written in terms of a minimum set of chemical species essentially one species for each element or valence state of an element For the program PHREEOE these species were called master species and the reactions for all agueous complexes had to be written using only these species PHREEOC also needs reactions in terms of master species however the program contains the logic to rewrite the input eguations into this form Thus it is possible to enter an association reaction and log K for an agueous species in terms of any agueous species in the database not just master species and PHREEOC will rewrite the eguation to the proper internal form PHREEOC Will also rewrite reactions for phases exchange complexes and surface complexes Reactions are still reguired to be dissolution reactions for phases and association reactions for agueous exchange or surface complexes There is one major restriction on the rewriting capabiliti
347. ined in the SURFACE data block The moles of surface sites are defined 1 in SURFACE if the number of sites is fixed or 2 by a proportionality factor in the SURFACE data block and the moles of a phase in EQUILIBRIUM_PHASES data block or 3 by a proportionality factor in the SURFACE data block and the moles of a kinetic reactant in KINETICS data block The charge on a surface species is specified in the balanced chemical reaction that defines the species in the SURFACE_SPECIES data block see Description of Data Input Non Electrostatic Surface Complexation Davis and Kent 1990 describe a non electrostatic surface complexation model In this model the electrostatic term is ignored in the mass action expressions for surface complexes In addition no surface charge balance or surface charge potential relation is used only the mole balance equation is included for each surface site type For data input to PHREEQC the non electrostatic model for a surface is invoked by using the no_edl identifier in the SURFACE data block see Description of Data Input NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING The formulation of any chemical equilibrium problem solved by PHREEQC is derived from the set of f gt f gt total P Pss f a3 f E f ae f po and fy where f y and f are the simply the mole balance functions for hydrogen and functions denoted f in the previous sections These include f 417 feo f g fast H 0 fm fo
348. ined independently In particular reactants EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE KINETICS REACTION SOLID_SOLUTIONS and SURFACE are defined in terms of moles without reference to a volume or mass of water Systems are defined by combining a solution with a set of reactants that react either reversibly EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE SOLID_SOLUTIONS and SURFACE or irreversibly KINETICS or REACTION Essentially all of the moles of elements in the solution and the reversible reactants are combined the moles of irreversible reactants are added or removed and a new system equilibrium is calculated Only after system equilibrium is calculated is the mass of water in the system known and only then the molalities of all entities can be calculated For transport calculations each cell is a system that is defined by the solution and all the reactants contained in keywords that bear the same number as the cell number The system for the cell is initially defined by the moles of elements that are present in the solution and the moles of each reactant The compositions of all these entities evolve as the transport calculations proceed Keywords The following sections describe the data input requirements for the program Each type of data is input through a specific keyword data block The keywords are listed in alphabetical order Each keyword data block may have a number of identifiers many of which are optional Identifiers may b
349. input for SOLUTION or SOLUTION_SPREAD EXCHANGE and SURFACE data blocks combined with speciation initial exchange composition and initial surface composition calculations The charge on a species is defined in the balanced chemical reaction that defines the species in SOLUTION_SPECIES EXCHANGE_SPECIES or SURFACE_SPECIES data blocks see Description of Data Input Surface Charge Potential Equation with No Explicit Calculation of the Diffuse Layer Composition By default PHREEQC uses the approach described by Dzombak and Morel 1990 to relate the charge density on the surface G with the potential at the surface P The surface charge density is the amount of charge per area of surface material which can be calculated from the distribution of surface species K Ny F 7 Os A DIA 67 surf k where is the charge density for surface s in coulombs per square meter C m Fis the Faraday constant in coulombs per mole 96 493 53 C mol A surf 1S the surface area of the material m3 The surface area is calculated by one of the following formulas 1 A inf A S where A is the specific area of the surface material m 18 and S is the mass of surface material g or 2 A A n where A is the surface area per mole of a pure surf phase or kinetic reactant m mol and n is the moles of the pure phase or reactant At 25 C the surface charge density is related to the electrical potential at the surfac
350. inuous supply of oxygen for oxidation of ferrous iron In the RATES data block the rate expression is designated with the name Fe_di_ox and defined according to equation 159 Note the use of the special Basic function TOT to obtain the total concentration molality of ferrous iron line 10 SI to obtain the saturation index or in the case of a gas the log of the gas partial pressure oxygen line 30 and ACT to obtain the activity of OH line 40 Line 40 defines the moles of reaction Notice also that the variable moles is calculated by multiplying the rate times the current time interval TIME and that the rate definition ends with a SAVE statement The SAVE and TIME statements must be included in arate definition they specify the moles that reacted over the time sub interval In the KINETICS data block the rate expression named Fe_di_ox is invoked and parameters are defined When the rate name in the KINETICS data block is identical to a mineral name that is defined under PHASES 232 User s Guide to PHREEQC Version 2 the stoichiometry of that mineral will be used in the reaction However no mineral is associated with the rate name of this example and the identifier formula must be used to specify the reaction stoichiometry The reaction involves loss of Fe_di equivalent to Fe 2 from solution as indicated by the stoichiometric coefficients of 1 0 The loss is balanced by a gain in solution of Fe_tri
351. ion 2 and several new capabilities have been added including e Kinetically controlled reactions e Solid solution equilibria e Fixed volume gas phase equilibria e Variation of the number of exchange or surface sites in proportion to a mineral or kinetic reactant e Diffusion or dispersion in 1D transport e ID transport coupled with diffusion into stagnant zones and e Isotope mole balance in inverse modeling The numerical method has been modified to use several sets of convergence parameters in an attempt to avoid convergence problems User defined quantities can be written to the primary output file and or to a file suitable for importation into a spreadsheet and solution compositions can be defined in a format that is more compatible with spreadsheet programs 2 User s Guide to PHREEQC Version 2 Program Capabilities PHREEQC can be used as a speciation program to calculate saturation indices and the distribution of aqueous species Analytical data for mole balances can be defined for any valence state or combination of valence states for an element Distribution of redox elements among their valence states can be based on a specified pe or any redox couple for which data are available PHREEQC allows the concentration of an element to be adjusted to obtain equilibrium or a specified saturation index or gas partial pressure with a specified phase Solution compositions can be specified with a variety of concentration units In batch
352. ion is modeled equals the diffusion period Furthermore the number of shifts must be defined which is the number of advection time steps or diffusion periods to be calculated Dispersive transport in a central difference scheme is essentially mixing of cells A mixing factor mixf is defined as D AD a mixf 110 2 n Ax where n is a positive integer The restriction is that never more is mixed out of a cell than stays behind that is mixf must be less than 1 3 as follows from equation 109 When according to equation 110 with n 1 mixf is greater than 1 3 the value of n is increased such that mixf is less than or equal to 1 3 The dispersion time step is then AD At p and n mixes are performed EQUATIONS AND NUMERICAL METHOD FOR TRANSPORT MODELING 45 The numerical scheme has been checked by comparison with analytical solutions for simple cases with linear exchange Linear exchange results when the exchange coefficient for the exchange half reaction is equal for two homovalent cations It gives a linear retardation R 1 CEC C where CEC is the cation exchange capacity expressed in mol kgw In the following example a 130 m flow tube contains water with an initial concentration C x 0 C 0 The displacing solution has concentration C Cy 1 mmol kgw and the pore water flow velocity is v 15 m year The dispersivity is a 5 m and the effective diffusion coefficient is D 0 m s The profile is given after
353. ion is taken up by ion exchange sites which release sodium to solution About 15 mmol kgw of halite dissolves Sulfate and iron oxyhydroxide reduction by organic matter leads to precipitation of pyrite Plummer and others 1990 realized that the stoichiometry of the exchange reaction was not well defined and considered two variations on these reactions in the sensitivity analysis of the mole balance model Pure Ca Na exchange and pure Mg Na exchange were considered as potential reactants NETPATH A and B table 54 When PHREEQC was run with these two reactants a model was found with Mg Na PHREEQC B but no model was found with pure Ca Na exchange This difference between NETPATH and PHREEQC results is attributed to the charge imbalance of the solutions Solution 2 table 52 has a charge imbalance of 3 24 meq kgw which is more than 3 percent relative to the sum of cation and anion equivalents This is not an exceptionally large percentage error but the absolute magnitude in milliequivalents is large relative to some of the mole transfers of the mole balance models When the charge balance constraint is included by using the revised mole balance equations in PHREEQC with pure Ca Na exchange as the only exchange reaction it is not possible simultaneously to attain mole balance on elements and isotopes produce charge balance for each solution and keep uncertainty terms within the specified uncertainty limits The exchange reaction with the largest
354. ion of species for pure water is shown under the heading Beginning of initial solution calculations The equilibration of the system with the given amounts of gypsum and anhydrite at 25 C is the first batch reaction step which is displayed after the heading Beginning of batch reaction calculations Immediately following this heading the batch reaction step is identified followed by a list of the identity of the keyword data used in the calculation In this example the solution composition stored as number 1 the pure phase assemblage stored as 204 User s Guide to PHREEQC Version 2 number 1 and the reaction temperatures stored as number 1 are used in the calculation Conceptually the solution and the pure phases are put together in a beaker which is regulated to 25 C and allowed to react to system equilibrium Under the subheading Phase assemblage the saturation indices and amounts of each of the phases defined by EQUILIBRIUM_PHASES are listed In the first batch reaction step the final phase assemblage contains no anhydrite which is undersaturated with respect to the solution saturation index equals 0 22 and 1 985 mol of gypsum which is in equilibrium with the solution saturation index equals 0 0 All of the anhydrite has dissolved and most of the calcium and sulfate have reprecipitated as gypsum The Solution composition indicates that 15 64 mmol kgw of calcium and sulfate remain in solution which d
355. ionally pe Line 14 reaction True or False reaction Prints 1 reaction increment to the selected output file if REACTION is used in the calcu lation or 2 99 for other calculations if value is true excludes print if value is false Default is true Initial value at start of program is false Optionally rxn rea ction or rx n Note the hyphen is required to avoid a conflict with the keyword REACTION Line 15 temperature True or False temperature Prints temperature Celsius to the selected output file if value is true excludes print if value is false Default is true Initial value at start of program is false Optionally temp temper ature or te mperature DESCRIPTION OF DATA INPUT 139 Line 16 alkalinity True or False alkalinity Prints alkalinity eq kgw to the selected output file if value is true excludes printif value is false Default is true Initial value at start of program is false Optionally alkalinity alk or al kalinity Line 17 ionic strength True or False jonic strength Prints ionic strength to the selected output file if value is true excludes print if value is false Default is true Initial value at start of program is false Optionally ionic strength mu io nic_strength or mu Line 18 water True or False water Writes mass of water to the selected output file if value is true excludes print if value is false Default is true Initial value at start of pro
356. is calculated for all solution species and for all exchange equilibrium phase solid solutions surface assemblages and gas phases that have been defined A check is performed to ensure that the difference between the 4th and 5th order estimates of the integrated rate over a time interval does not vary by more than a user defined tolerance If the tolerance is not satisfied then the integration over the time interval is automatically restarted with a smaller time interval Kinetic reactions between solids and the aqueous phase can be calculated without any modification of the database PHREEQC can also calculate kinetic reactions among aqueous species that are normally assumed to be in equilibrium but this requires that the database be redefined Aqueous species that react kinetically must be defined essentially as separate elements with SOLUTION_MASTER_SPECIES This example illustrates the procedure 230 User s Guide to PHREEQC Version 2 for decoupling two valence states of an element iron and shows how PHREEQC can be used to calculate the kinetic oxidation of Fe to Fe in water The rate of oxidation of Fe by O in water is given by Singer and Stumm 1970 dm Fe dt 2910 1 33el12a Po m 159 OH 2 2 gt Fe where f is time in seconds A oy is the activity of the hydroxy ion m po is the total molality of ferrous iron in solution and P is the oxygen partial pressure atm The time for complete oxidation o
357. is generated at each iteration it is only necessary to perform the multiplications and additions as described by the list to calculate the residuals of the mole balance equations no extraneous calculations multiplication by zero for example additional loops or conditional statements are necessary The actual implementation uses several lists for each task to skip multiplication if the coefficient is 1 0 and to include constants that are not iteration dependent that is do not require the pointer to a source datum An additional list is generated that is used for printing For each aqueous species this list includes an entry for each master species in the mass action equation This list is sorted by master species and concentration after the equilibrium calculation is completed and provides all the information for aqueous exchange and surface species for printing results to the output file In batch reaction and transport calculations if the set of elements exchanger components gas phase components pure phases solid solutions and surface components does not change from one calculation to the next then the lists prepared in prep c do not need to be regenerated In this case the lists used during the previous calculation are used for the current calculation Thus most of the time spent in the subroutines of the file prep c can be saved The subroutines in model c solve the equations that have been set up in prep c Initial estimates f
358. is to be used false optionally f alse indicates the alternative scaling method will not be used If nei ther true nor false are entered true is assumed At the beginning of the run the value is set to false Invoking this alternative method of scaling causes any mole balance equations with the diagonal element approximately the total concentration of the element or element valence state in solution less than 1e 11 to be scaled by the factor 1e 11 diagonal element Line 7 debug diffuse layer True or False debug diffuse layer Includes debugging prints for diffuse layer calculations This identifier applies only when diffuse layer is used in the SURFACE data block Optionally debug diffuse layer or debug dfiffuse layer True or False A value of true optionally t rue indicates the debugging information will be included in the output file false optionally f alse indicates debugging information will not be printed If neither true nor false is entered a value of true is assumed At the start of the pro gram the default value is false If this option is set to true values of the g function the surface excess are printed for each value of charge for agueous species the charge s for which the value of g has not converged are printed and the number of iterations needed for the integration by which g values are calculated are printed Line 8 debug inverse True or False debug inverse Includes debugging prints f
359. ists of the definition of pure water with SOLUTION input and the definition of a pure phase assemblage with EQUILIBRIUM_PHASES input In the definition of the phases only a saturation index was given for each phase Because it was not entered the amount of each phase defaults to 10 0 mol which is essentially an unlimited supply for most phases The batch reaction is implicitly defined to be the EXAMPLES 207 equilibration of the first solution defined in this simulation with the first pure phase assemblage defined in the simulation Explicit definition of batch reaction entities is done with the USE keyword The SAVE keyword instructs the program to save the batch reaction solution composition from the final batch reaction step as solution number 1 Thus when the simulation begins solution number 1 is pure water After the batch reaction calculations for the simulation are completed the batch reaction solution water in equilibrium with calcite and CO is stored as solution 1 Part B defines the composition of seawater which is stored as solution number 2 Part C mixes ground water solution 1 with seawater solution 2 in a closed system in which P o o is calculated not specified The MIX keyword is used to define the mixing fractions approximately mixing volumes of each solution in the mixture The SAVE keyword causes the mixture to be saved as solution number 3 The MIX keyword allows the mixing of an unlimited number of solutions in
360. itate definition of the initial conditions the keywords EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE KINETICS MIX REACTION REACTION_TEMPERATURE SOLID_SOLUTIONS SOLUTION and SURFACE allow simultaneous definition of a range of cell numbers The SAVE keyword also permits a range of solution gas phase or assemblage numbers to be saved simultaneously Advective Dispersive Transport Calculations Analogous to purely advective transport advective dispersive or diffusive 1D transport can be modeled with the TRANSPORT data block A single dispersion or diffusion coefficient is used for all chemical species and therefore dispersion and diffusion have the same mathematical formulation for all species For this document the terms dispersion and dispersive transport are used to describe both dispersion and diffusion restricted to a single dispersion diffusion coefficient Like for purely advective transport a column of n cells is defined but also dispersion diffusion parameters boundary conditions direction of flow cell lengths and advective time step can be provided It is also possible to model double porosity by including the relevant information The infilling solution depends on the direction of flow and may be solution number 0 or n For each shift advection step a number of DESCRIPTION OF DATA INPUT 71 dispersion diffusion mixing steps are performed For each shift and dispersion step kinetic reactions are integrated for e
361. ite in EQUILIBRIUM_PHASES 10 then the number of moles of exchangeable component CaY is 0 165m and the total number of exchange sites Y is 0 33m 0 165x2 The stoichiometry of Ca must be at least 0 165 in the formula for Ca Montmorillonite During batch reaction simulations the exchange composition including the moles of Ca exchanged will change depending on competing species defined in EXCHANGE_SPECIES In addition the moles of Ca Montmorillonite in EQUILIBRIUM_PHASES 10 may change in which case the total moles of the exchange sites Y will change Exchanger Z is related to the amount of a kinetic reactant that dissolves and precipitates according to a rate expression named kinetic_clay The formula for the kinetic reactant is defined in KINETICS 10 where 10 is the same number as the exchange assemblage number If m represents the moles of kinetic_clay in KINETICS 10 then the number of moles of exchangeable component NaZ is 0 1m which is equal to the total number of exchange sites The stoichiometry of Na must be at least 0 1 in the formula for the kinetic reactant The exchange composition will change during reaction calculations depending on competing species defined in EXCHANGE_SPECIES In addition the moles of kinetic_clay in KINETICS 10 may change in which case the total moles of the exchange sites Z will change Example data block 2 Line 0 EXCHANGE 1 Exchanger in equilibrium with solution 1 Line la X 1 0 Line 1b
362. ithm Extract characters from position n to end of string Extract m characters from string starting at position n Returns remainder a b If the expression s value rounded to an integer is N go to the Nth line number in the list If N is less than one or greater than the number of line numbers listed execution continues at the next statement after the ON statement Read from DATA statement At beginning of line line is a remark with no effect on the calculations Set pointer to DATA statement of line for subsequent READ Return from subroutine Sign of a 1 or 1 Sine function a Ja Convert number to a string Tangent function Convert string to number While loop Example problems The keyword RATES is used in example problems 6C 9 and 15 Related keywords ADVECTION KINETICS and TRANSPORT DESCRIPTION OF DATA INPUT 129 REACTION This keyword data block is used to define irreversible reactions that transfer specified amounts of elements to or from the aqueous solution during batch reaction or transport calculations REACTION steps are specified explicitly and do not depend directly on solution composition or time Use KINETICS and RATES data blocks instead of the REACTION data block to model the rates of irreversible reactions that evolve with time and vary with solution composition Example data block 1 Line 0 REACTION 5 Add sodium chloride and calcite to solution Line
363. ixed partial pressure approach as in the atmosphere or sometimes in the unsaturated zone The partial pressure of the gas component in the reservoir does not change regardless of the extent of reactions If the gas reservoir is finite and the pressure on the gas phase is constant as in gas bubbles in estuarine and lake sediments then a fixed pressure gas phase is appropriate If the gas reservoir is finite and the volume that the gas phase fills is constant as in an experiment with a fixed head space then a fixed volume gas phase is appropriate In this example the GAS PHASE data block is used to model the decomposition of organic matter in pure water under fixed pressure and fixed volume conditions with the assumption that carbon nitrogen hydrogen and oxygen are released in the stoichiometry CH O NH3 97 by the decomposition reaction With no other electron EXAMPLES 221 acceptors available in pure water the pertinent microbiological decomposition reaction is methanogenesis The carbon and nitrogen released by organic decomposition are assumed to react to redox and gas solution equilibrium Aqueous carbon species are defined in SOLUTION_MASTER_SPECIES or SOLUTION_SPECIES of the default databases for two valence states carbon 4 and carbon 4 methane no intermediate valence states of carbon are defined Aqueous nitrogen may occur in the 5 3 0 and 3 valence states The gas components considered are carbon dioxide CO methane CH3
364. k Na F NaF log k K H20 KOH H log k 11 399 kcal 48 6721 0 03252849 2614 335 2 370 kcal 6 589 kcal 2 87 10913 1 820 kcal 14 180 1 270 kcal 0325 0 700 kcal 0 240 14 460 296 User s Guide to PHREEQC Version 2 485 818 517 70761 18 00263 563713 9 563713 9 K K Fet2 Fet2 Fe 2 Fe 2 Fe 2 Fe 2 Fe 2 Fe 2 Fe 2 Fe 2 Fe 2 Fe 2 Fe 3 Fe 3 Fe 3 Fe 3 504 2 KS04 log_k delta_h 2 250 analytical HPO4 2 KHP04 log_k H20 FeOH H log_k delta_h 13 200 Cl FeCl log_k CO3 2 FeC03 log_k HCO3 FeHCO3 log_k SO4 2 FeSo4 log_k delta_h 3 230 HSO4 FeHSO4 log_k 2HS Fe HS 2 log_k 3HS Fe HS 3 log_k HPO4 2 FeHPO4 log_k H2P04 FeH2P04 log_k F FeF log_k Fe 3 e log_k delta_h 9 680 gamma 9 0000 H20 FeOH 2 H log_k delta_h 10 4 2 H20 Fe OH 2 log_k delta_h 17 1 0 850 kcal 3 106 0 0 9 500 kcal 0 140 4 380 2 250 kcal 10 987 Dish 1 000 13 020 kcal 0 0000 2 19 kcal 2 H 5 67 kcal 3 H20 Fe OH 3 3 H log_k delta_h 24 8 4 H20 Fe OH 4 log_k delta_h 31 9 12 56 kcal 4 H 21 6 kcal 2 Fe 3 2 H20 Fe2 0H 2 4 2 H log_k delta_h 13 5 2 595 kcal 3 Fe 3 4 H20 Fe3 0H 4 5 4 H Fe 3 Fe 3 Fe 3 Fe 3 Fe 3 Fe 3 Fe 3 log
365. k a column DESCRIPTION OF DATA INPUT 177 of five cells cells is modeled and 5 pore volumes of filling solution are moved through the column shifts cells is 5 The total time of the simulation is 25 years shifts x time step The total length of the column is 6 m four 1 m cells and one 2 m cell At each shift advection is simulated by moving solution cells J to cell cells solution cells 2 to cell cells 1 and so on until solution 0 is moved to cell 1 upwind scheme With flux type boundary conditions the dispersion steps follow the advective shift With Dirichlet boundary conditions the dispersion step and the advective shift are alternated After each advective shift and dispersion step kinetic reactions and chemical equilibria are calculated The moles of pure phases and the compositions of the exchange assemblage surface assemblage gas phase solid solution assemblage and kinetic reactants in each cell are updated after each chemical equilibration The time_step identifier defines the length of time associated with each advective shift or diffusion period This time step may be subdivided into smaller dispersion time steps if necessary to calculate dispersion accurately Each dispersion time step may be further subdivided to integrate the kinetic reactions KINETICS data block Kinetic reactions are likely to slow the calculations by up to a factor of six or more compared to pure equilibrium calculations The numerical scheme
366. kcal gamma 2 5000 0 0000 Cu 2 H20 CuOH H log_k 8 000 gamma 4 0000 0 0000 Cu 2 2 H20 Cu OH 2 2 H log_k 13 680 Cu 2 3 H20 Cu OH 3 3 H log_k 26 900 Cu 2 4 H20 Cu OH 4 2 4 H log_k 39 600 Cu 2 SO4 2 Cuso4 log_k 2 310 delta_h 1 220 kcal Zn 2 H20 ZnOH H log_k 8 96 delta_h 13 4 kcal Zn 2 2 H20 Zn 0H 2 2 H log_k 16 900 Zn 2 3 H20 Zn 0H 3 3 H log_k 28 400 Zn 2 4 H20 Zn 0H 4 2 4 H log_k 41 200 Zn 2 C1 Zncl log_k 0 43 delta_h 7 79 kcal 108 18466 1119669 0 108 18466 1119669 0 0 0 0 38 92561 563713 9 Attachment B Description of Database Files and Listing 299 Zn 2 2 C1 ZnC12 log_k 0 45 delta_h 8 5 kcal Zn 2 3C1 ZnC13 log_k 0 5 delta_h 9 56 kcal Zn 2 4C1 ZnC14 2 log_k 0 2 delta_h 10 96 kcal Zn 2 CO3 2 ZnCO3 log_k 229 Zn 2 2C03 2 Zn C03 2 2 log_k 963 Zn 2 HCO3 ZnHCO3 log_k Zak Zn 2 SO4 2 Znso4 log_k ZSA delta h 1 36 kcal Zn 2 2504 2 Zn SO4 2 2 log_k 3 28 Cd 2 H20 CdOH H log_k 10 080 delta_h 13 1 kcal Cd 2 2 H20 Cd 0H 2 2 H log_k 20 350 Cd 2 3 H20 Cd OH 3 3 H log_k 33 300 Cd 2 4 H20 Cd 0H 4 2 4 H log_k 47 350 Cd 2 C1 CdCl log_k 1 980 delta_h 0 59 kcal Cd 2 2 C1 Cdcl2 log_k 2 600 delta_h 1 24 kcal Cd 2 3 C1 Cac13 log_k 2 400 delta_h 3 9 kcal Cd 2 CO3 2 CdCO3 log_k 2 9 Cd 2 2Cc03 2 Cd CO3 2 2
367. l balances see SOLUTION_SPECIES The use of no_check is not recommended If no_check is used then the mole_balance identifier is needed to ensure the correct stoichiometry for the surface species In PHREEQC version 1 the no_check option was included to permit the stoichiometry of a species to be defined separately from the mass action equation Specifically the sorption of uranium on iron oxides as described by Waite and others 1994 provides an example where they use different coefficients in the mass action equation than the mole balance equations However activity of a surface species is defined as mole fraction of sites occupied by the species in PHREEQC version 2 which is inconsistent with activity that is defined as molality by Waite and others 1994 and PHREEQC version 1 It is noted that formulas with coefficients of only 1 in the mass action equation will give identical results for PHREEQC version and 2 The no_check and mole_balance identifiers have been retained in version 2 but its use should be restricted to special sorption formulas Example problems The keyword SURFACE_SPECIES is used in example problems 8 and 14 See the listing of the default database file in Attachment B for additional examples Related keywords PHASES SOLUTION_SPECIES SURFACE and SURFACE_MASTER_SPECIES DESCRIPTION OF DATA INPUT 171 TITLE This keyword data block is used to include a comment for a simulation in the output file The co
368. l error in element concentration All three values apply to the model printed in the left hand column EXAMPLES 273 For a given mole balance model if no simpler inverse model can be found with any proper subset of the solutions and phases of the model the statement Model contains minimum number of phases is printed for the given model After all models are printed a short summary of the calculations is presented which lists the number of models found the number of minimal models found models with a minimum number of phases the number of infeasible models that were tested and the number of calls to the inequality equations solver cll calculation time is generally proportional to the number of calls to cl1 The results of the example show that two inverse models exist using the phases suggested by Garrels and Mackenzie 1967 The main reactions are dissolution of calcite and plagioclase which consume carbon dioxide kaolinite and Ca montmorillonite precipitate in the first model and kaolinite and chalcedony precipitate in the second model Small amounts of halite gypsum and biotite dissolution are required in the models The results of Garrels and Mackenzie 1967 fall within the range of mole transfers calculated in the first model of PHREEQC for all phases except carbon dioxide The carbon dioxide mole transfer for the first model differs from Garrels and Mackenzie 1967 because they did not account for the dissolved carbon dio
369. l reactions and their limitations in Bassett R L and Mel chior D eds Chemical modeling in aqueous systems II Washington D C American Chemical Society Symposium Series 416 Chapt 31 p 398 413 REFERENCES CITED 285 Nordstrom D K Plummer L N Wigley T M L Wolery T J Ball J W Jenne E A Bassett R L Crerar D A Florence T M Fritz B Hoffman M Holdren G R Jr Lafon G M Mattigod S V McDuff R E Morel F Reddy M M Sposito G and Thrailkill J 1979 A comparison of computerized chemical models for equilibrium calculations in aqueous systems in Chemical Modeling in aqueous systems speciation sorption solubility and kinetics Jenne E A ed Series 93 American Chemical Society p 857 892 Parkhurst D L 1995 User s guide to PHREEQC A computer program for speciation reaction path advective transport and inverse geochemical calculations U S Geological Survey Water Resources Investigations Report 95 4227 143 p Parkhurst D L 1997 Geochemical mole balance modeling with uncertain data Water Resources Research v 33 no 8 p 1957 1970 Parkhurst D L Christenson Scott and Breit G N 1996 Ground water quality assessment of the Central Oklahoma Aqui fer Geochemical and geohydrologic investigations U S Geological Survey Water Supply Paper 2357 C 101 p Parkhurst D L Plummer L N and Thorstenson D C 1982 BALANCE A computer program for calculating mass transfe
370. l surface composition calculations are included as equality constraints in the solver No equations are optimized and no inequality constraints are included An initial surface composition calculation is performed only if the initial surface is defined to be in equilibrium with a specified solution The distribution of species for this solution has already been calculated either by an initial solution calculation or by a batch reaction or transport calculation Thus the values of all master unknowns related to the aqueous phase are known and are used as starting estimates for the surface calculation The initial estimate of the activity of the master species for each surface is set equal to one tenth of the moles of surface sites for that surface For explicit and implicit diffuse layer calculations the initial estimate of the potential unknown Indy is zero for each surface which implies that the surface charge is zero For data input to PHREEQC definition of the initial surface composition calculation is made with the SURFACE data block see Description of Data Input NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING 37 Calculation of the Initial Composition of Fixed Volume Gas Phase An initial gas phase composition calculation is needed if the composition of a gas phase is not defined explicitly but rather the composition of a fixed volume gas phase is defined to be that which is in equilibrium with a specified solution compositio
371. la Nacl ZO Line 1b Calcite 0 001 Line 2 0 25 0 5 0 75 1 0 moles Explanation 1 Line 0 REACTION number description REACTION is the keyword for the data block number Positive number to designate the following stoichiometric reaction A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the stoichiometric reaction Line 1 phase name or formula relative stoichiometry phase name or formula If a phase name is given the program uses the stoichiometry of that phase as defined by PHASES input otherwise formula is a chemical formula to be used in the stoichi ometric reaction Additional lines can be used to define additional reactants relative stoichiometry Amount of this reactant relative to other reactants it is a molar ratio between reactants In the example data block the reaction contains 2000 times more NaCl than calcite Default is 1 0 Line 2 list of reaction amounts units list of reaction amounts A separate calculation will be made for each listed amount If INCREMENTAL_REACTIONS is false default example data block 1 performs the calcu lation as follows the first step adds 0 25 mol of reaction to the initial solution the second step adds 0 5 mol of reaction to the initial solution the third 0 75 and the fourth 1 0 each reaction
372. lage Ina are adjusted to achieve mole balance for the exchanger Once mole balance is achieved the composition of each exchanger is known 36 User s Guide to PHREEQC Version 2 All equations for initial exchange composition calculations are included as equality constraints in the solver No equations are optimized and no inequality constraints are included An initial exchange composition calculation is performed only if the exchanger is defined to be in equilibrium with a specified solution The distribution of species for this solution has already been calculated either by an initial solution calculation or by a batch reaction or transport calculation Thus the values of all master unknowns related to the aqueous phase are known and are used as initial estimates for the exchange calculation The initial estimate of the master unknown for each exchanger is set equal to the moles of exchange sites for that exchanger For data input to PHREEQC definition of the initial exchange composition calculation is made with the EXCHANGE data block see Description of Data Input Calculation of the Initial Composition of a Surface An initial surface composition calculation is needed if the composition of a surface is not defined explicitly but is indicated to be in equilibrium with a specified solution composition In this case the composition of the surface is not known only that it is in equilibrium with a solution The equations for t
373. lance equation for an element or element valence state then the initial activity of the master species is set equal to one thousandth of the input concentration converted to molality For data input to PHREEQC all options for a speciation calculation use of an alkalinity equation charge balance equation phase equilibrium equation and redox couples are defined in a SOLUTION or SOLUTION_SPREAD data block see Description of Data Input Calculation of the Initial Composition of an Exchanger An initial exchange composition calculation is needed if the composition of an exchanger is not defined explicitly but rather is indicated to be in equilibrium with a specified solution composition In this case the composition of the exchanger is not known only that it is in equilibrium with a solution The equations for an initial exchange composition calculation are f fm f H 0 and f po which are equations for mole balance for each exchanger mole balance for each element or element valence state activity of water and ionic strength For initial exchange composition calculations the values of 7 include only the aqueous concentrations and the mole balance equations f do not contain terms for the contribution of the exchangers to the total element concentrations All quantities related to the aqueous phase are the same as for the solution without the exchanger present Essentially only the values of the master unknowns of the exchange assemb
374. lation SOLUTION 1 units mol kgw Al 1 e 13 K 1 e 13 si 3 e 13 EQUILIBRIUM_PHASES 1 Gibbsite 0 0 0 0 Kaolinite 0 0 0 0 K mica 0 0 0 0 KINETICS 1 K feldspar k0 A V le 16 mol cm2 s 10 fsp 0 1mm cubes 136 cm 136 e 13 mol dm3 s parms 1 36e 11 m0 2 16 m 1 94 step divide le 6 steps le2 le3 le le5 le6 le7 les INCREMENTAL REACTIONS true RATES K feldspar start 10 REM store the initial amount of K feldspar 20 IF EXISTS 1 0 THEN PUT M 1 30 REM calculate moles of reaction 40 SR kfld SR K feldspar 50 moles PARM 1 M M0 0 67 1 SR kfld TIME 60 REM The following is for printout of phase transitions EXAMPLES 215 80 REM Start Gibbsite 90 if ABS SI Gibbsite gt le 3 THEN GOTO 150 100 i 2 110 GOSUB 1500 150 REM Start Gibbsite gt Kaolinite 160 if ABS SI Kaolinite gt le 3 THEN GOTO 200 170 i 3 180 GOSUB 1500 200 REM End Gibbsite gt Kaolinite 210 if ABS SI Kaolinite gt le 3 OR EQUI Gibbsite gt 0 THEN GOTO 250 220 i 4 230 GOSUB 1500 250 REM Start Kaolinite gt K mica 260 if ABS SI K mica gt le 3 THEN GOTO 300 270 i 5 280 GOSUB 1500 300 REM End Kaolinite gt K mica 310 if ABS SI K mica gt le 3 OR EQUI Kaolinite gt 0 THEN GOTO 350 320 i 6 330 GOSUB 1500 350 REM Start K mica gt K feldspar 360 if ABS SI K feldspar gt le 3 THEN GOTO 1000 370 i 7 380 GOSUB 1500 1000 SAVE moles
375. lcium chloride solution osossasoss osa n n aa aa aan a a aan aa na e aa nana aa naa Ana aeeaaee 12 Simulation results for diffusion from column ends of heat and Na retardation R 3 and CI R 1 compared with constant boundary condition analytical solution uuosssss sea an na ae taneet 13 Results of simulations of transport with diffusion into spherical stagnant zones modeled using finite difference and first order exchange approximatiOns ccsccesceescesseeeceeceseceeceeeeeceeeeeceneeeseeseeeaeeaesaes 14 Results of transport simulation of the chemical evolution of ground water due to calcium magnesium bicarbonate water inflow to an aquifer initially containing a brine calcite and dolomite a cation exchanger and a surface that complexes With arsenic cesessseeececeeeeeeeceeeeeaeceaeeceeeeaeeees 15 Aqueous concentrations and pH values at the outlet of the column for Nta and cobalt transport simulations with 10 and 20 cellS i iisssssssstsasss sessa Ruusa saalis sessa seal via ei etikan 16 Concentrations of sorbed species and biomass at the outlet of the column for Nta and cobalt transport simulations with 10 and 20 Cells wo eee susanna na aan a eaa a n aan a naa aa a naa aan aeeen X User s Guide to PHREEOcC Version 2 TABLES gt PIN 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 Shape factors for diffusive first order exchange between cells with
376. le is opened and headings are written Subroutines in the file prep c set up the equations for a calculation The equations and unknowns that are needed for the calculation are determined and work space to solve a matrix with this number of equations and ORGANIZATION OF THE COMPUTER CODE 61 unknowns is allocated All mass action expressions are rewritten according to the master species and redox information for the calculation Several lists of pointers are prepared that allow the residuals of equations the Newton Raphson array and the change in moles of elements due to mineral mole transfers to be calculated quickly These lists are C structures that in general contain a pointer to a source datum in memory a coefficient and another pointer to a target memory location The source datum is retrieved multiplied by the coefficient and added to the target memory location As an example consider the species CaSO which should appear in the mole balance equations for calcium sulfur and oxygen One of the lists is used to calculate the residuals of the mole balance equations There would be three entries in this list for the species CaSO In all three entries the source datum would be a pointer to the moles of CaSO The target memory locations would be the variable locations where the residuals for calcium sulfur and oxygen mole balances are stored and the coefficients would be 1 0 1 0 and 4 0 respectively Once the entire list
377. les are available at http wwwbrr cr usgs gov projects GWC_coupled An interactive user interface for Windows can be obtained from the web site http www geo vu nl users posv phreeqc html An expanded interactive user interface for Windows is currently under development 1999 and will be made available through the web sites noted in the previous paragraph Win32 and Unix versions of PHREEQC may be obtained by anonymous ftp from the Internet address brrcrftp cr usgs GOV For ftp access the files reside in directories geochem pc phreegc and 6 User s Guide to PHREEQC Version 2 geochem unix phreeqc Be sure to use type binary for transferring the tar file by ftp A typical anonymous ftp session follows ftp brrerftp cr usgs GOV Name anonymous Password userid computer replaced with your userid and computer name ftp gt cd geochem pc phreeqe change directory ftp gt Is list files in directory phrgc2xx exe xx represents version number ftp gt type binary eliminate any ascii translation for binary files ftp gt get phrgc2xx exe transfer the file xx represents version number ftp gt guit guit ftp Alternatively the documentation and Win32 or Unix versions of the software can be ordered from the following address U S Geological Survey NWIS Program Office 437 National Center Reston VA 22092 703 648 5695 Additional copies of this report are available from U S Geological Survey Branch of Inform
378. licitly evaluated once at the beginning of each of these diffuse layer iterations During the model iterations which occur within the diffuse layer iterations the values of the functions are updated using the following equation k 1 k 08 s 85 85 s nag X gt 80 where k is the model iteration number and g s s the value that is evaluated explicitly at the beginning of the dif fuse layer iteration The model iterations end when the Newton Raphson method has converged on a solution however convergence is based on the values of the functions g j s that are estimates Thus diffuse layer iterations continue until the values of the functions are the same on successive diffuse layer iterations within a specified tol erance When explicitly calculating the composition of the diffuse layer the function involving the sinh of the potential unknown eguation 69 is replaced with a charge balance function that includes the surface charge and the diffuse layer charge N aq K Ns fz s7 yi ep E Yan s 81 k igp i where the function f is zero when charge balance is achieved The total derivative of f is EQUATIONS FOR SPECIATION AND FORWARD MODELING 31 K Na Na df s D tio Pi T Lzan s 82 i k isp For data input to PHREEQC explicit calculation of the diffuse layer is invoked using the diffuse layer identifier in the SURFACE data block Specific surface area A or A and mass of surface S are def
379. line Line 1 cells cells cells Indicates that the number of cells in the 1D column will be given Optionally cells or c ells cells Number of cells in a ID column to be used in the advective dispersive transport simulation Default is O Line 2 shifts shifts shifts Indicates that the number of shifts or diffusion periods in the advective dispersive transport simulation will be given Optionally shifts or s hifts shifts For advective dispersive transport shifts is the number of advective shifts or time steps which is the number of times the solution in each cell will be shifted to the next higher or lower num bered cell the total time simulated is shifts X time step For purely diffusive transport shifts is DESCRIPTION OF DATA INPUT 173 the number of diffusion periods that are simulated the total diffusion time is shifts X time step Default is 1 Line 3 time_step time step time_step Defines time step associated with each advective shift or diffusion period The number of shifts or diffusion periods is given by shifts Optionally timest t imest time_step or t ime_step time step Time in seconds associated with each shift or diffusion period Default is 0 Line 4 flow_direction forward back or diffusion_only flow_direction Defines direction of flow Optionally direction flow flow_direction dir ection or f low direction forward back or diffusion only 1 Forward advectiv
380. ll the mixing factors are shown in table 36 they are identical for subseguent cells and their neighboring stagnant cells In this example with clay beads only radial 1D diffusion is considered and only mixing among cells in different layers is defined However it is possible to include mixing among the immobile cells of adjacent mobile cells Figure 13 compares the concentration profiles in the mobile cells obtained with example 13A and B with example 13C The basic features of the two simulations are the same The positions of the peaks as calculated by the two simulations are similar The Cl peak is near 1 2 m but would be at about 1 45 m in the absence of stagnant zones The integrated concentrations in the mobile porosity are about equal for the first order exchange and the finite difference simulations The exchange factor f 0 21 for the first order exchange approximation appears to provide adequate accuracy for this simulation However the first order exchange approximation produces lower peaks and more tailing than the more exact solution obtained with finite differences Discrepancies can also appear as deviations in the breakthrough curve Van Genuchten 1985 The first order exchange model is probably least accurate when applied to simulating the transport behavior of spheres other shapes of the stagnant area can give a better correspondence It is clear that the linear exchange model is much easier to apply because any explicit mod
381. lly pe pe pe value conventional negative log of the activity of the electron charge Not recommended indicates pe is to be adjusted to achieve charge balance phase name pe will be adjusted to achieve specified saturation index with the specified phase saturation index pe will be adjusted to achieve this saturation index for the specified phase Default is 0 0 If line 3 is not entered the default pe is 4 0 Specifying both charge and a phase name is not allowed Adjusting pe for charge balance is not recommended Care should also be used in adjusting pe to a fixed saturation index for a phase because frequently this is not possible Line 4 redox redox couple redox Indicates the definition of a redox couple that is used to calculate pe This pe will be used for any redox element for which a pe is needed to determine the distribution of the element among its valence states Optionally r edox redox couple Redox couple which defines pe A redox couple is specified by two valence states of an element separated by a No spaces are allowed If line 4 is not entered the input pe value will be the default The use of redox does not change the input pe The example data block uses the dissolved oxygen concentration defined by O 0 in line 7e and the redox half reaction for formation of O ag from water defined in the SOLUTION SPECIES data block of the default databases to calculate a default pe Line 5 units concentration units unit
382. lock either in the default database file or in the current or pre vious simulations of the run The name must be spelled identically to the name used in RATES input except for case Line 2 formula list of formula stoichiometric coefficient 106 User s Guide to PHREEQC Version 2 By default the rate name is assumed to be the name of a phase that has been defined in a PHASES data block and the formula for that phase is then used for the stoichiometry of the reaction for exam ple calcite in case b above However kinetic reactions are not restricted to mineral phases any set of elements produced or consumed by the kinetic reaction relative to the aqueous phase can be specified through a list of doublets formula and stoichiometric coefficient lines 2a and 2c Optionally formula or f ormula formula Chemical formula or the name of a phase to be added by the kinetic reaction If a chemical formula is used it must begin with a capital letter and contain element symbols and stoichiometric coefficients line 2a A phase name may be entered independent of case Each formula must be a charge balanced combination of elements An exception may be for defining exchangers or surfaces related to kinetic reactants stoichiometric coefficient Defines the mole transfer coefficient for formula per mole of reaction progress evaluated by the rate expression in RATES The product of the coefficient times the moles of reaction progress gi
383. lock is used to produce a file that is suitable for processing by spreadsheets and other data management software It is possible to print selected entities from the compositions of solution exchange assemblage gas phase pure phase assemblage solid solution assemblage and surface assemblage after the completion of each type of calculation The selected output file contains a column for each data item defined through the identifiers of SELECTED_OUTPUT Initial print settings are shown in lines 1 4 6 20 and 29 of the following example data block Line 0 Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 Line 11 Line 12 Line 13 Line 14 Line 15 Line 16 Line 17 Line 18 Line 19 Line 20 Line 21 Line 21 Line Line 23 Line 24 Line 25 Line 26 Line 27 Line 28 Line 29 225 Example data block SELECTED OUTPUT file selected out selected out user punch high precision true true false set value for all identifiers on lines 6 through 20 reset true By default data for the identifiers marked true will be printed in order of line numbers By default data for the identifiers marked false will not be printed simulation true state true solution true distance true time true step true ph true pe true reaction false temperature false alkalinity false ionic stren
384. log k 0 0 ga Nta 3 Nta 3 log_k 0 0 ga Nta 3 3H H3Nta log_k 14 9 ga Nta 3 2H H2Nta log k 13 35 ga Nta 3 H HNta 2 log_k 10 3 ga Nta 3 Co 2 CoNta log_k LEST ga 2 Nta 3 Co 2 CoNta2 4 log_k 14 5 ga Nta 3 Co 2 H20 CoOHNt log_k 0 53 ga Co 2 H20 CoOH H log_k A ga Co 2 2H20 Co OH 2 2H log_k 22 9 ga 260 User s Guide to PHREEQC Version 2 p 3 61 0173 Cal 58 93 0 0 1 008 1 008 1 008 14 0067 Na Ls 16 00 18 016 16 00 le7 Q le7 Oe 1e7 0 le7 0 le7 Os le7 0 le7 0 le7 Or 1e7 0 le7 0 le7 0 le7 O le7 Or 1e7 0 le7 0 le7 0 H le7 0 le7 Or le7 0 12 0111 35 453 58 93 0 0 1 008 14 0067 22 9898 de 16 00 Co 2 3H20 log_k 3 1 5 CO2 H20 HCO3 H log_k 6 35 CO2 H20 CO3 2 2H4 log_k 16 68 NH4 NH3 H log_k 9 37 H20 OH H log k 14 03 END Co 0H 3 3H gam gam gam gam gam Initial and Boundary Conditions le7 0 0 le7 0 0 1e7 0 0 1e7 0 0 1e7 0 0 The background concentrations in the column are listed in table 40 The column contains no Nta or cobalt initially but has a biomass of 1 36x104 g L A flux boundary condition is applied at the inlet of the column and for the first 20 hours a solution with Nta and cobalt enters the column the concentrations in the pulse are also given in table 40 After 20 hours the background so
385. log_k 6 4 Cd 2 HCO3 CdHCO3 log_k ED Cd 2 SO4 2 CASOZ log_k 2 460 delta_h 1 08 kcal Cd 2 2504 2 Cd SO4 2 2 log_k 3 5 Pb 2 H20 PbOH H log_k 7 710 Pb 2 2 H20 Pb 0H 2 2 H log_k SL Pb 2 3 H20 Pb OH 3 3 H log_k 28 060 Pb 2 4 H20 Pb 0H 4 2 4 H log_k 39 700 2 Pb 2 H20 Pb20H 3 H log_k 6 360 Pb 2 Cl PbCl log_k 1 600 delta_h 4 38 kcal Pb 2 2 C1 PbC12 log_k 1 800 delta_h 1 08 kcal Pb 2 3 C1 PbC13 log_k 1 700 delta_h 2 17 kcal Pb 2 4 C1 PbC14 2 log_k 1 380 delta_h 3 53 kcal 300 User s Guide to PHREEOcC Version 2 Pb 2 C 03 2 PbC03 log_k 7 240 Pb 2 2 CO3 2 Pb CO3 2 2 log_k 10 640 Pb 2 HCO3 PbHCO3 log_k 2 9 Pb 2 SO4 2 PbSO4 log_k 2 750 Pb 2 2 s04 2 Pb S04 2 2 log_k 3 470 Pb 2 NO3 PbNO3 log_k 1 170 PHASES Calcite CaC03 CO3 2 Ca 2 log_k 8 480 delta_h 2 297 kcal analytic 171 9065 0 077993 2839 319 Aragonite CacO3 CO3 2 Ca 2 log_k 8 336 delta_h 2 589 kcal analytic 171 9773 0 077993 2903 293 Dolomite CaMg CO3 2 Ca 2 Mg 2 2 CO3 2 log_k 17 090 delta_h 9 436 kcal Siderite FeCO3 Fe 2 C03 2 log_k 10 890 delta_h 2 480 kcal Rhodochrosite MnCO3 Mn 2 CO3 2 log_k 11 130 delta_h 1 430 kcal Strontianite SrC03 Sr 2 CO3 2 log_k 93271 delta_h 0 400 kcal analytic 155 0305 0 0 7239 594 Witherite BaCO3 Ba 2 C03 2 log_k 8 562 delta_
386. lomite and gypsum As expected the mass of water decreases from 1 kg in rain water solution 1 to approximately 0 05 kg in solution 2 after water was removed by the reaction In general the amount of water remaining after the reaction is approximate because water may be consumed or produced by homogeneous hydrolysis reactions surface complexation reactions and dissolution and precipitation of pure phases The number of moles of chloride u mol was unaffected by the removal of water however the concentration of chloride u mol kgw increased because the amount of water decreased The second mixing simulation increased the mass of water and the moles of chloride by a factor of 20 Thus the moles of chloride increased but the chloride concentration is the same before solution 2 and after solution 3 the mixing simulation because the mass of water increased proportionately An important point about homogeneous redox reactions is illustrated in the results of these simulations table 18 Batch reaction calculations and transport calculations always produce aqueous equilibrium for each redox element The rain water analysis contained data for both ammonium and nitrate but none for dissolved nitrogen The pe of the rain water has no effect on the distribution of species in the initial solution because the concentrations of individual redox states of all redox elements C N and S are specified Although nitrate and ammonium should not coexist at th
387. lse information defined in USER PRINT vill not be written to the output file Default is true Optionally user print Note the hyphen is required to avoid a conflict with the keyword USER PRINT Line 16 selected output True or False selected output Controls writing of information to the selected output file This identifier has no effect unless the SELECTED OUTPUT data block is included in the file If a SELECTED OUTPUT data block is included and selected output is false no results are written to the selected output file Writing to the selected output file can be resumed if selected outputis set to true in a PRINT data block in a subseguent simulation This print control option is not affected by reset Default is true Optionally se lected output Note the hyphen is reguired to avoid a conflict with the keyword SELECTED OUTPUT Line 17 status True or False status Controls printing of information to the screen that monitors calculations When set to true a status line is printed to the screen identifying the simulation number and the type of calculation that is currently being processed by the program When set to false no status line will be printed to the screen This print control option is not affected by reset Default is true Optionally sta tus or st atus Notes By default all print options are set to true at the beginning of a run Once set by the keyword data block PRINT options remain in effect until t
388. lta_h 2 29 kcal A1 3 28504 2 Al S04 2 log_k 5 0 delta_h 3 11 kcal Al 3 HSO4 AlHSO4 2 log_k 0 46 Al 3 F AlF 2 log_k 7 000 delta_h 1 060 keal Al 3 2 F AlF2 log k 12 700 delta h 1 980 kcal Al 3 3 F A1F3 log_k 16 800 delta_h 2 160 kcal Al 3 4 F AlF4 log_k 19 400 delta_h 2 200 kcal Al 3 5 F AlF5 2 log_k 20 600 delta_h 1 840 kcal 298 User s Guide to PHREEQC Version 2 14 327 27 121 1825097 14 865 Al 3 6 F AlF6 3 log_k 20 600 delta_h 1 670 kcal H4Si04 H3Si04 H log_k 9 83 delta_h 6 12 kcal analytic 302 3724 0 050698 15669 69 H4Si04 H2Si04 2 2 H log_k 23 0 delta_h 17 6 kcal analytic 294 0184 0 072650 11204 49 H4Si04 4 H 6 F SiF6 2 4 H20 log_k 30 180 delta_h 16 260 keal Ba 2 H20 Ba0H H log_k 13 470 Ba 2 CO3 2 BaC03 log_k 2 71 delta_h 3 55 kcal analytic 0 113 0 008721 Ba 2 HCO3 BaHCO3 log_k 0 982 delta_h 5 56 kcal analytical 3 0938 0 013669 0 0 Ba 2 S04 2 BaS04 log_k 2 700 Sr 2 H20 SrOH H log_k 13 290 gamma 5 0000 0 0000 Sr 2 CO3 2 H SrHCO3 log_k 11 509 delta_h 2 489 kcal analytic 104 6391 0 04739549 5151 79 gamma 5 4000 0 0000 Sr 2 C03 2 SrC03 log_k 2 81 delta_h 5 22 kcal analytic 1 019 0 012826 Sr 2 S04 2 Srso4 log_k 2 290 delta_h 2 080 kcal Li H20 LiOH H log_k 13 640 Li SO4 2 Liso4 log_k 0 640 GUFA 46 8 Cut log_k 2 720 delta_h 1 650
389. lume for example a titration When multiple batch reaction steps are defined in KINETICS REACTION or REACTION_TEMPERATURE and if INCREMENTAL_REACTIONS is false cumulative reaction steps then each batch reaction step uses the same mixing factors if INCREMENTAL_REACTIONS is true incremental reaction steps then the mixing fractions are applied during the first batch reaction step only Example problems The keyword MIX is used in example problems 3 4 and 13 Related keywords INCREMENTAL_REACTIONS SOLUTION SAVE solution USE solution and USE mix DESCRIPTION OF DATA INPUT 117 PHASES This keyword data block is used to define a name chemical reaction log K and temperature dependence of log K for each gas component and mineral that is used for speciation batch reaction transport or inverse modeling calculations Normally this data block is included in the database file and only additions and modifications are included in the input file Example data block Line 0 PHASES Line la Gypsum Line 2a Caso4 2H20 Ca 2 SO4 2 2H20 Line 3a log_k 4 58 Line 4a delta_h 0 109 Line 5 analytical expression 68 2401 0 0 3221 51 25 0627 0 0 Line lb 02 g Line 2b 02 02 Line 3b log_k 2 96 Line 4b delta_h 1 844 Explanation Line 0 PHASES Keyword for the data block No other data are input on the keyword line Line 1 Phase name phase name Alphanumeric name of phase no spaces are allo
390. lution is introduced at the inlet until the experiment ends after 75 hours Na and Cl were not in the original problem definition but were added for charge balancing sorption reactions for PHREEQC see Sorption Reactions below Table 40 Concentration data for example 15 Constituent Ht Total C NH O Ntaz C 02 Na Cl Biomass CoNta ads CO ads Type Agueous Agueous Agueous Agueous Agueous Agueous Agueous Agueous Immobile Immobile Immobile Pulse concentration 10 0e 6 mol L 4 9e 7 mol L 0 3 125e 5 mol L 5 23e 6 mol L 5 23e 6 mol L 1 0e 3 mol L 1 0e 3 mol L Kinetic Degradation of Nta and Cell Growth Background concentration 10 0e 6 mol L 4 9e 7 mol L 0 3 125e 5 mol L 0 0 1 0e 3 mol L 1 0e 3 mol L 1 36e 4 g L 0 0 Nta is assumed to degrade in the presence of biomass and oxygen by the reaction HNta 1 620 1 272H 0 2 424H 0 576C5H7O2N 3 12H CO3 0 424NH PHREEQC requires kinetic reactants to be defined solely by the moles of each element that enter or leave the solution due to the reaction Furthermore the reactants should be charge balanced no net charge should enter or leave the EXAMPLES 261 solution The Nta reaction converts 1 mol HNta CgH7O 6N to 0 576 mol C5H7O2N where the latter is chemi cally inert so that its concentration can be discarded The difference in elemental mass contained in these two reactants prov
391. lve or precipitate list of isotope name isotope ratio isotope uncertainty limit balances element or valence state name list of uncertainty limits isotopes isotope_name list of uncertainty limits range maximum 188 User s Guide to PHREEQC Version 2 minimal tolerance tol force_solutions list of True or False uncertainty_water moles mineral_water True or False KINETICS Explicit definition of steps KINETICS number description rate name formula list of formula stoichiometric coefficient m moles m0 initial moles parms list of parameters tol tolerance steps list of time steps step_divide step_divide runge_kutta 1 2 3 or 6 Equal increment definition of steps steps total time in steps KNOBS MIX KNOBS iterations iterations convergence_tolerance convergence_tolerance tolerance tolerance step_size step_size pe_step_size pe_step_size diagonal_scale True or False debug_diffuse_layer True or False debug_inverse True or False debug_model True or False debug_prep True or False debug_set True or False logfile True or False MIX number description SUMMARY OF DATA INPUT 189 solution number mixing fraction PHASES PHASES Phase name Dissolution reaction log_k log K delta_h enthalpy units analytical expression A A gt Az Ay As no_check PRINT PRINT reset True or False eh True
392. ly with the USE keyword during the remainder of the computer run Example data block Line Oa SAVE equilibrium phases 2 Line Ob SAVE exchange 2 Line Oc SAVE gas_phase 2 Line Od SAVE solid solution 1 Line Oe SAVE solution 2 Line Of SAVE surface 1 Explanation Line 0 SAVE keyword number SAVE is the keyword for the data block keyword One of six keywords exchange equilibrium_phases gas_phase solid_solution solution or surface Options for equilibrium_phases equilibrium equilibria pure_phases or pure number User defined positive integer to be associated with the respective composition A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Notes SAVE affects only the internal storage of chemical composition information and has effect only for the duration of a run To save results to a permanent file see SELECTED_OUTPUT The SAVE data block applies only at the end of batch reaction calculations and has no effect following initial solution initial exchange composition initial surface composition initial gas phase composition transport or inverse calculations During batch reaction calculations the compositions of the solution exchange assemblage gas phase pure phase assemblage solid solution assemblage and surface assemblage vary to attain equilibrium The compositions which exis
393. m number of phases Summary of inverse modeling Number of models found 1 Number of minimal models found 1 Number of infeasible sets of phases saved 6 Number of calls to cll 22 Example 18 Inverse Modeling of the Madison Aquifer In this example inverse modeling including isotope mole balance modeling is applied to the evolution of water in the Madison aquifer in Montana Plummer and others 1990 used mole balance modeling to quantify the extent of dedolomitization at locations throughout the aquifer In the dedolomitization process anhydrite dissolution causes the precipitation of calcite and dissolution of dolomite Additional reactions identified by mole balance modeling include sulfate reduction cation exchange and halite and sylvite dissolution Plummer and others 1990 6 13C and 8 34S data were used to corroborate the mole balance models and carbon 14 was used to estimate ground water ages Plummer and others 1990 Initial and final water samples were selected from a flow path that extends from north central Wyoming northeast across Montana Plummer and others 1990 flow path 3 This pair of water samples was selected specifically because it was one of the few pairs that showed a relatively large discrepancy between previous mole balance approaches and the mole balance approach of PHREEQC which includes uncertainties results for most sample pairs were not significantly different between the two approaches In addition this
394. m of the moles of sites occupied by exchange species must equal the total moles of the exchange site The following function is derived from the mole balance relation for an exchange site N e Js T IP 53 le where the value of the function f is zero when mole balance is achieved T is the total moles of exchange sites for exchanger e and b is the number of exchange sites occupied by the exchange species The total derivative of f is N df AT Y b dn 54 i If the total number of sites is proportional to the moles of a pure phase then AT p N p where c 5 is the moles of exchange sites per mole of phase p If the phase dissolves then dn is positive and the number of exchange sites decreases If the total number of sites is proportional to the moles of a kinetic reactant AT 0 in EQUATIONS FOR SPECIATION AND FORWARD MODELING 23 the total derivative equation The change in the number of sites is included as part of the reaction that is integrated with the rate equations and no term is included in the Jacobian matrix As the kinetic reaction increases or decreases the moles of the reactant the number of exchange sites is adjusted proportionately If the number of exchange sites is fixed AT 0 For data input to PHREEQC the moles of exchange sites are defined in the EXCHANGE data block and may be a fixed quantity or it may be related to the moles of a pure phase or a kinetic reactant Exchanger
395. ma 215 122 000 170 EXAMPLES 201 0 0 3 746e 04 02 1 873e 04 2 188e 04 3 727 3 660 0 067 S 6 2 926e 02 s04 2 1 463e 02 2 664e 03 1 8305 2 574 0 740 MgS04 7 330e 03 8 562e 03 ETID 2 067 0 067 Naso4 6 053e 03 4 523e 03 2 218 2349 0 127 Caso4 1 083e 03 1 266e 03 2 965 2 898 0 067 KS04 1 627e 04 1 216e 04 3 789 3 915 0 127 NH4S04 4 157e 08 3 106e 08 Ta 38 7 508 O E1267 HS04 2 089e 09 1 561e 09 8 680 8 807 0 127 MnS04 2 021e 10 2 360e 10 9 695 9 627 0 067 CaHSO4 5 979e 11 4 467e 11 10 223 10 350 0 127 Feso4 1 093e 18 8 167e 19 17 961 18 088 0 127 Fe S04 2 6 372e 20 4 76le 20 19196 19 322 0 127 Feso4 4 845e 20 5 660e 20 19 315 19 247 0 067 FeHSO4 2 4 228e 26 1 318e 26 25 374 25 880 0 506 FeHSO4 3 000e 27 2 242e 27 SEEE 26 649 0 127 si 7 382e 05 H4Si04 7 110e 05 8 306e 05 4 148 4 081 0 067 H3Si04 2 720e 06 2 032e 06 5 565 5 692 0 127 H2Si04 2 7 362e 11 2 294e 11 10 133 10 639 0 506 U 4 1 034e 21 U OH 5 1 034e 21 7 726e 22 20 985 21 2112 0 127 U OH 4 1 652e 25 1 930e 25 24 782 24 715 0 067 U 4 0 000e 00 0 000e 00 46 997 49 022 2 025 U 5 1 622e 18 UO2 1 622e 18 1 212e 18 21 77 90 1 74916 0 127 U 6 1 437e 08 UO2 CO3 3 4 1 255e 08 1 184e 10 7 901 9 927 2 025 UO2 C03 2 2 1 814e 09 5 653e 10 8 741 9 248 0 506 UO02C03 7 429e 12 8 678e 12 11 129 11 062 0 067 UO20H 3 385e 14 2 530e 14 13 470 13 97 0 1 27 U02 2 3 019e 16 9 409e 17 15 520 1
396. make KX exch coeff equal to Nax K X KX log k 0 0 gamma 3 5 0 015 END IX J 1 0 90712 22 0 09288 IX 22 1 0 57098 22 0 21656 42 0 21246 IX 42 22 0 35027 42 0 45270 62 0 19703 TA 62 42 0 38368 62 0 44579 82 0 17053 IX 82 62 0 46286 82 0 42143 102 0 11571 TX 102 82 0 81000 102 0 19000 MIX definitions omitted for mobile cells 2 19 and associated immobile cells MIX 20 20 0 90712 41 0 09288 MIX 41 20 0 57098 41 0 21656 61 0 21246 MIX 6l 41 0 35027 61 0 45270 81 0 19703 MIX 81 61 0 38368 81 0 44579 101 0 17053 MIX 101 81 0 46286 101 0 42143 1 2 10 1 0 1157 MIX 121 101 0 81000 121 0 19000 TRANSPORT 252 User s Guide to PHREEOcC Version 2 cells 20 shifts 5 flow direction forward timest 3600 tempr 3 0 bcond flux flux diffc 0 0 length 0 10 disp 0 015 stag 5 PRINT END reset false SOLUTION 0 Original solution reenters units mmol l pH 7 0 pe 130 02 g 0 7 K 1 0 N 5 1 0 TRANSPORT shifts 10 punch freguency 10 punch cells 1 20 SELECTED OUTPUT file ex13c sel reset false solution distance true USER PUNCH head Cl mmol Na mmol PUNCH TOT C1 1000 TOT Na 1000 HP 1 O D Note in table 36 that 121 solutions are defined 1 20 for the mobile cells and the rest for the immobile cells The input file is identical with the previous one except for stag 5 and the mixing factors among the cells Not a
397. matical expressions for the rates of the kinetic reactions are defined with the RATES data block The rate equations are integrated over a time step by a Runge Kutta method that estimates the error of the integration and uses appropriate time subintervals to maintain the errors within specified tolerances for each time interval Example data block 1 Line 0 KINETICS 1 Define 3 explicit time steps Line la Pyrite Line 2a formula FeS2 1 0 FeAs2 0 001 Line 3a m le 3 Line 4a m0 le 3 Line 5a parms 3 0 0 67 D 0 11 Line 6a tol le 9 Line lb Calcite Line 3b m 7 e 4 Line 4b m0 7 e 4 Line 5b parms 5 0 0 3 Line 6b tol 1 e 8 Line le Organic_C Line 2c formula CH20 NH3 0 1 0 5 Line 3c m 5 e 3 Line 4c m0 5 e 3 Line 6c tol 1 e 8 Line 7 steps 100 200 300 seconds Line 8 step divide 100 Line 9 runge kutta 6 Explanation 1 Line 0 KINETICS number description KINETICS is the keyword for the data block number Positive number to designate the following set of kinetic reactions A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the kinetic reactions Line 1 rate name rate name Name of a rate expression The rate name and its associated rate expression must be defined within a RATES data b
398. me unitless Total porosity unitless Aqueous species index number Exchange species index number for exchange site e Surface species index number for surface site type s Total number of master unknowns for a calculation Effective thermal diffusion coefficient m s Heat conductivity of the aquifer including pore water and solid kJ Or s Thermal dispersion coefficient m s Equilibrium constant for gas component g Equilibrium constant for aqueous species i Intrinsic equilibrium constant for association reaction for surface species i Equilibrium constant for phase p Number of site types for surface s Specific heat kJ C kg k for water k for solid Ionic strength Total number of master species Total number of aqueous master species Number of valence states of element e Index number for master species Index number for aqueous master species excluding H e H 20 and the alkalinity master species Initial moles of kinetic reactant k Molality of the aqueous species i mol kgw Surface excess of aqueous species i mol kgw Moles of kinetic reactant k at a given time valence of a symmetric electrolyte Number of aqueous species Number of exchange species for exchanger e Number of gas components in the gas phase Total moles of gas in the gas phase Number of phases in the phase assemblage Number of surface species for surface s Number of components in solid solution ss Moles o
399. me step are used as the starting point for the next time step and integrating over the same early time interval is avoided If the time steps in the KINETICS data block are defined as steps 100 in 2 steps and INCREMENTAL_REACTIONS false then the kinetic reactions will be integrated from 0 to 50 and 0 to 100 s By using INCREMENTAL_REACTIONS true the kinetic reactions will be integrated from 0 to 50 and 50 to 100 s Although the calculation procedure differs results of calculations using the in form of data input should be the same for INCREMENTAL_REACTIONS true or false For consistency the INCREMENTAL_REACTIONS keyword also has an effect on the interpretation of steps defined in the REACTION data block If the steps in the REACTION data block were 0 1 1 10 and 100 96 User s Guide to PHREEQC Version 2 mmol then by default solution compositions would be calculated after a total of 0 1 1 10 and 100 mmol of reaction had been added to the initial solution By using incremental reaction steps solution compositions would be calculated after a total of 0 1 1 1 11 1 and 111 1 mmol of reaction had been added If the time steps in the REACTION data block are defined as steps 1 in 2 steps and INCREMENTAL_REACTIONS false default then the solution composition will be calculated after 0 5 moles of reaction are added to the initial solution and after 1 mole of reaction has been added to the initial solution By using INCREMENT
400. member solid is equal to its mole fraction For nonideal solid solutions the activity of each end member is the product of the mole fraction and an activity coefficient which is determined from the mole fraction and Guggenheim excess free energy parameters The following example considers an aragonite CaCO3 strontianite SrCO3 solid solution and demonstrates how the composition of the solid solution and aqueous phase change as strontium carbonate is added to an initially pure calcium carbonate system The example is derived from a diagram presented in Glynn and Parkhurst 1992 The equilibrium constants at 25 C K srco 107 and Kcaco 10 and the Guggenheim parameters ay 3 43 and a 1 82 are derived from Plummer and Busenberg 1987 The input data set is shown in table 29 The PHASES data block defines the log K s for aragonite and strontianite and overrides any data for these minerals that might be present in the database file The SOLID_SOLUTIONS data block defines the unitless Guggenheim excess free energy parameters and the initial composition of the solid solution which is zero moles of aragonite 234 User s Guide to PHREEQC Version 2 and strontianite Initial solution 1 is defined to be a calcium bicarbonate solution The solution is then equilibrated with aragonite at nearly 1 atm partial pressure of carbon dioxide and saved as the new composition of solution 1
401. method of order 5 A value of 6 will exclusively use the 5th order method Values of 1 or 2 are mainly expedient when it is known that the rate is nearly constant in time Default is 3 Optionally rk r k runge_kutta or r unge_kutta Example data block 2 Line 0 KINETICS 1 Define 3 equal time steps Line la Calcite Line 3a m 7 e 4 Line 5a parms 5 0 3 Line 7 steps 300 in 3 steps seconds Explanation 2 Line 0 KINETICS number description Same as example data block 1 Line 1 rate name Same as example data block 1 Line 3 m moles Same as example data block 1 Line 5 parms list of parameters Same as example data block 1 Line 7 steps total time in steps total time Total time over which to integrate kinetic reactions in seconds The total time may be divided into a number of calculations given by steps The steps identifier is used only in batch reaction calculations it is not needed for transport calculations Default is 1 0 second Optionally steps or s teps in steps in indicates that the total time will be divided into steps number of steps INCREMENTAL_REACTIONS has no effect on the output for example data block 2 results will be printed after 100 200 and 300 seconds of reaction However INCREMENTAL_REACTIONS does affect the computational method If INCREMENTAL_REACTIONS is false the reactions will be integrated over the time intervals from 0 to 100 0 t
402. mine the temperature dependence of the 156 User s Guide to PHREEQC Version 2 equilibrium constant Internally all enthalpy calculations are performed with the units of kilo joules per mole Line 4 analytical_expression A A gt A3 Ay As analytical_expression Identifier for coefficients for an analytical expression for the temperature dependence of log K Optionally analytical expression a e ae a nalytical expression a ale A A2 Az Ay As Five values defining log K as a function of temperature in the expression A A log oK A 4 7 F Aylog pT where T is in Kelvin Line 5 gamma Debye Hiickel a Debye Hiickel b gamma Indicates activity coefficient parameters are to be entered If gamma is not input for a spe cies for charged species the Davies eguation is used to calculate the activity coefficient logy A 0 3 u for uncharged species the following equation is used 1 Ju logy 0 11 If gamma is entered then the equation from WATEO Truesdell and Jones 1974 2 Az Ju o is used logy 1 Ba Ju bu In these equations y is the activity coefficient U is ionic strength and A and B are constants at a given temperature Optionally g amma Debye Hiickel a Parameter a in the WATEQ activity coefficient equation Debye Hiickel b Parameter b in the WATEQ activity coefficient equation Line 6 no_check no_check Indicates the reaction equation should not be check
403. mistry groundwater and pollution Rotterdam A A Balkema 536 p Ball J W and Nordstrom D K 1991 WATEQ4F User s manual with revised thermodynamic data base and test cases for cal culating speciation of major trace and redox elements in natural waters U S Geological Survey Open File Report 90 129 185 p Barrodale I and Roberts F D K 1980 L1 solution to linear equations subject to linear equality and inequality constraints Association for Computing Machinery Transactions on Mathematical Software v 6 p 231 235 Borkovec Michal and Westall John 1983 Solution of the Poisson Boltzmann equation for surface excesses of ions in the diffuse layer at the oxide electrolyte interface Journal of Electroanalytical Chemistry v 150 p 325 337 284 User s Guide to PHREEQC Version 2 Carpenter A B 1978 Origin and chemical evolution of brines in sedimentary basins Thirteenth Annual Forum on the Geology of Industrial Minerals eds Johnson K S and Russell J A Oklahoma Geological Survey Circular 79 p 60 77 Cash J R and Karp A H 1990 A Variable Order Runge Kutta Method for Initial Value Problems with Rapidly Varying Right Hand Sides Transactions on Mathematical Software v 16 no 3 p 201 222 Charlton S R Macklin C L and Parkhurst D L 1997 PHREEQCI A graphical user interface for the geochemical computer program PHREEQC U S Geological Survey Water Resources Investigations Report 97 4222 9 p Crank
404. mment will appear in the echo of the input data and it will appear at the beginning of the simulation calculations Example data block Line 0 TITLE The title may begin on this line Line la or on this line ine 1 It continues until a keyword is found at the beginning of a line Line 1c or until the end of the file o Explanation Line 0 TITLE comment TITLE is the keyword for the data block Optionally COMMENT comment The first line of a title or comment may begin on the same line as the keyword Line 1 comment comment The title or comment may continue on as many lines as necessary Lines are read and saved as part of the title until a keyword begins a line or until the end of the input file Notes Be careful not to begin a line of the title with a keyword because that signals the end of the TITLE data block The TITLE data block is intended to document a simulation in the output file If more than one title keyword is entered for a simulation each will appear in the output file as part of the echo of the input data but only the last will also appear at the beginning of the simulation calculations The characters and have special meanings in PHREEOC input files in the TITLE data block the will cause the remainder of the line to be excluded from comment and will have the same effect as a line break at that character position Lines that are entirely white space tabs and spaces a
405. mpc or tempk is used if excess free energy parameters are input with any of the following options gugg_nondim activity_coefficients distribution_coefficients miscibility_gap spinodal_gap alyotropic_point or margules Optionally temp tempc or t empc Default is 25 C Line 6 tempk temperature in Kelvin tempk Temperature at which excess free energy parameters are defined in Kelvin Temperature either temp tempc or tempk is used if excess free energy parameters are input with any of the following options gugg_nondim activity_coefficients distribution_coefficients miscibility_gap spinodal_gap alyotropic_point or margules Optionally tempk Default is 298 15 K Line 7 Gugg nondim ao a Gugg_nondim Nondimensional Guggenheim parameters are used to calculate dimensional Guggen heim parameters Optionally gugg nondimensional parms g ugg nondimensional or plarms dg Guggenheim a parameter dimensionless Default is 0 0 a Guggenheim a parameter dimensionless Default is 0 0 Line 8 Gugg_kJ g g Gugg kJ Guggenheim parameters with dimensions of kJ mol define the excess free energy of the nonideal binary solid solution Optionally gugg kJ or gugg_k J amp o Guggenheim ay parameter kJ mol Default is 0 0 g Guggenheim a parameter kJ mol Default is 0 0 Line 9 activity_coefficients a a X X2 comp comp DESCRIPTION OF DATA INPUT 145 activity_coefficients Activity
406. ms that print user defined quantities to the selected output file Any Basic PUNCH statement will write to the selected output file Example data block Line 0 USER_PUNCH Line 1 headings Na Mg 2 Pairs Rxn increment Line 2 start Basic 10 REM convert to ppm Basic 20 PUNCH MOL Na 22 99 1000 Basic 30 PUNCH MOL Mg 2 24 3 1000 Basic 40 pairs MOL NaCO03 MOL MgCO3 Basic 50 PUNCH pairs Basic 60 REM punch reaction increment Basic 70 PUNCH RXN Line 3 end Explanation Line 0 USER PUNCH USER PUNCH is the keyword for the data block No other data are input on the keyword line Line 1 headings list of column headings headings Headings will appear on the first line of the selected output file Optionally heading head ings or h eadings list of column headings White space delimited any combination of spaces and tabs list of column headings Line 2 start start Indicates the start of the Basic program Optional Basic numbered Basic statement numbered Basic statement A valid Basic language statement that must be numbered The program should contain at least one PUNCH statement The statements are evaluated in numerical order Statements and functions that are available through the Basic interpreter are listed in tables 8 and 9 Line 2 end end Indicates the end of the Basic program Optional Note the hyphen is reguired to avoid a conflict with the keyword
407. must balance the moles of water in the final solution plus or minus moles of water Optionally uncertainty water u water uncertainty water or u water 102 User s Guide to PHREEOc Version 2 moles Uncertainty term for the water balance equation Default is 0 0 Line 14 mineral_water True or False mineral_water Identifier to include or exclude water derived from minerals in the water balance equation Normally water from minerals should be included in the water balance equation Sometimes unreasonable models are generated that create all the water in solution by dissolution and precipitation of minerals Setting mineral_water to False removes the terms for water derived from minerals from the water balance equation which eliminates these unreasonable models However removing these terms may introduce errors in some models by ignoring water derived from minerals for example water from dissolution of gypsum that should be considered in the water balance equation Optionally mineral water or mine ral_water True or False True includes terms for water derived from minerals in the water balance equation False excludes these terms from the equation Default is True Notes Writing of inverse models to the output file can be enabled or disabled with the inverse identifier in the PRINT data block Inverse models can be written to the selected output file by including the inverse identifier in the SELECTED_OUTPUT dat
408. n Line 7 state True or False state Prints type of calculation in each line of the selected output file if value is true excludes print if value is false The following character strings are used to identify each calculation type initial solution i_soln initial exchange composition i_exch initial surface composition i surf initial gas phase composition i_gas batch reaction react inverse inverse advection 138 User s Guide to PHREEQC Version 2 advect and transport transp Default is true Initial value at start of program is true Option ally state or st ate Line 8 solution True or False solution Prints solution number used for the calculation in each line of the selected output file if value is true excludes print if value is false Default is true Initial value at start of program is true Optionally soln solu tion or soln Note the hyphen is required to avoid a conflict with the keyword SOLUTION Line 9 distance True or False distance Prints to the selected output file 1 the X coordinate of the cell for advective dispersive transport calculations TRANSPORT 2 the cell number for advection calculations ADVEC TION or 3 99 for other calculations if value is true excludes print if value is false Default is true Initial value at start of program is true Optionally distance dist or d istance Line 10 time True or Fal
409. n Mole balance eguation for exchanger e Fguation relating agueous and gas phase partial pressures for gas component g Mole balance eguation for hydrogen Eguation for activity of water in an agueous solution Mole balance eguation for element or element valence state exchanger or surface m Mole balance eguation for element or element valence state m excluding alkalinity hydrogen and oxygen and also excluding the charge balance equation Mole balance eguation for oxygen Eguation that sums the partial pressures of all gas components as calculated from agueous species Saturation index eguation for phase p Saturation index eguation for component p in solid solution ss Mole balance eguation for surface s Charge balance eguation for agueous solution Charge balance eguation for surface s used in explicit diffuse layer calculation Eguation for ionic strength in an agueous solution Charge potential eguation for surface s used when diffuse layer composition is not explicitly calculated Index number for gas phase components Ratio of concentration of agueous species i in surface excess for surface s to concentration in the bulk solution Attachment A Listing of Notation 289 N R a int N gt S A n SKK EN a e833 358 ZZ ZZZzzz 09 n Porosity of the stagnant immobile zone a fraction of total volume unitless Water filled porosity of the mobile part a fraction of total volu
410. n For demonstration purposes in the example the uncertainty limit for calcium is set to 0 05 5 percent in solution 1 and 0 025 2 5 percent in solution 2 The phases to be used in the inverse modeling calculations are defined with the phases identifier In addition this identifier can be used to constrain any phases to dissolve only or precipitate only In this example kaolinite Ca montmorillonite and chalcedony SiO2 are required to precipitate only This means that kaolinite will be precipitating negative mole transfer in any model that contains the phase kaolinite likewise for Ca montmorillonite and chalcedony Biotite and plagioclase are required to dissolve positive mole transfer if they are present in an inverse model All of the phases used in inverse modeling must be defined in PHASES or EXCHANGE_SPECIES data blocks either in the database file or the input file Thus all phases defined in the default database file phreegc dat or wateg4f dat are available for use in inverse modeling Biotite and plagioclase are not in the default database file phreeqc dat and so they are defined explicitly in the PHASES data block in the input data set For simplicity the log K s are set to zero for these phases which does not affect inverse modeling because only the mineral stoichiometry is used however the saturation indices calculated for these phases will be spurious All phases used in inverse modeling must have a charge balanced re
411. n The equations for the initial gas phase composition calculation are the same as an initial solution calculation and are f mi f H 0 and f po which are equations for mole balance for each element or element valence state activity of water and ionic strength For initial gas phase composition calculations the values of T include only the aqueous concentrations and the corresponding mole balance equations f do not contain terms for the contribution of the gas components to the total element concentrations The values calculated for all quantities related to the aqueous phase are the same as for the solution without the gas phase present Once the distribution of species in the aqueous phase is determined the partial pressures of all components in the gas phase can be calculated The partial pressures and the specified fixed volume are used with the ideal gas law to calculate the moles of each component in the gas phase All equations for initial gas phase composition calculations are included as equality constraints in the solver No equations are optimized and no inequality constraints are included An initial gas phase composition calculation is performed only if the gas phase is defined to have a constant volume and is defined to be initially in equilibrium with a specified solution The distribution of species for this solution has already been calculated either by an initial solution calculation or by a batch reaction or transport calculation
412. n contains all elements related to phases in EQUILIBRIUM_PHASES which although not required for the program to run successfully eliminates some warning messages During the integration of the reaction rates a simple dissolution rate law was assumed based on transition state theory A m 9 87 IAP RK _ feldspar n 1 16 Ee 158 with k le 16 mol cm s The KINETICS data block is used to enter specific data for the kinetic simulation The stoichiometry of the kinetic reaction is the chemical formula of K feldspar by default the name of the rate is assumed to be a phase defined in PHASES data block and the formula of the phase is used as the stoichiometry of the reaction It was assumed that the pristine soil comand Io percent K feldspar in the form of 0 1 mm cubes and had p 6 g cm so that A V 136 cm The value of k y 1 36e 11 mol L s is entered in the KINETICS data block with the identifier parms assuming that 1 kgw 1 liter and can be recalled as PARM 1 in the Basic rate definition in the RATES data block It was assumed that the soil had already been weathered to some extent and that only 90 percent of the initial K feldspar was left m0 2 16 and m 1 94 where m0 indicates the initial mass 1 kg soil X0 1 100 g 278 3 g mol 0 359 mol kg X6 kg L 2 16 mol L and m the remaining mass 90 percent of 2 16 is 1 94 mol L The maximum amount of reaction for any time interval is restricted to 1e 6 moles step_divi
413. n index calculations 2 batch reaction and one dimensional 1D transport calculations involving reversible reactions which include aqueous mineral gas solid solution surface complexation and ion exchange equilibria and irreversible reactions which include specified mole transfers of reactants kinetically controlled reactions mixing of solutions and temperature changes and 3 inverse modeling which finds sets of mineral and gas mole transfers that account for differences in composition between waters within specified compositional uncertainty limits New features in PHREEQC version 2 relative to version 1 include capabilities to simulate dispersion or diffusion and stagnant zones in 1D transport calculations to model kinetic reactions with user defined rate expressions to model the formation or dissolution of ideal multicomponent or nonideal binary solid solutions to model fixed volume gas phases in addition to fixed pressure gas phases to allow the number of surface or exchange sites to vary with the dissolution or precipitation of minerals or kinetic reactants to include isotope mole balances in inverse modeling calculations to automatically use multiple sets of convergence parameters to print user defined quantities to the primary output file and or to a file suitable for importation into a spreadsheet and to define solution compositions in a format more compatible with spreadsheet programs This report presents the equations
414. n the TRANSPORT data block will limit the data that are written to the selected output file If punch_cells has been defined then only the specified cells will be written otherwise all cells will be written The identifier punch_frequency will restrict writing to the selected output file to those shifts that are evenly divisible by punch_modulus In the example data block results are written to the selected output file for cells 2 3 4 and 5 after each integer pore volume 5 shifts has passed through the column At the end of a advective dispersive transport simulation all the physical and chemical data for example compositions of solutions equilibrium phase assemblages surfaces exchangers solid solutions and kinetic reactants are automatically saved and are identified by the cell number in which they reside These data are available for subsequent simulations within a single run Transient conditions can be simulated by including subsequent DESCRIPTION OF DATA INPUT 179 TRANSPORT data blocks which may define new chemical boundary and transport conditions Only parameters that differ from the previous advective dispersive transport simulation need to be redefined such as new infilling solution SOLUTION 0 a change from advection to diffusion only flow_direction diffusion_only or a change in flow direction from forward to backward flow_direction backward All parameters not specified in the new TRANSPORT data block remain the s
415. nally defined variable TIME The last statement must be SAVE expression where the value of expression is the moles of reaction that occur during time subinterval TIME Statements and functions that are available through the Basic interpreter are listed in tables 8 and 9 Parameters defined in the KINETICS data block are also available through the array PARM Line 2 end end Identifier marks the end of a Basic program by which the number of moles of a reaction for a time subinterval is calculated Note the hyphen is required to avoid a conflict with the keyword END Notes A Basic interpreter David Gillespie Synaptics Inc San Jose CA written commun 1997 distributed with the Linux operating system Free Software Foundation Inc is embedded in PHREEQC The Basic interpreter is used during the integration of the kinetic reactions to evaluate the moles of reaction progress for a time subinterval A Basic program for each kinetic reaction must be included in the input or database file Each program must stand alone with its own set of variables and numbered statement lines No data is passed between rate programs and there is no conflict using the same variable names or line numbers in separate rate programs However it is possible to transfer data among rates with the special Basic statements PUT and GET see table 8 The programs are used to calculate the instantaneous rate of reaction and extrapolate that rate for a time subinterval
416. nce for the system and water balance for the system The unknowns in these equations include the mole transfers of phases the mole transfers of redox reactions and the uncertainty unknowns for each element in each solution excluding hydrogen and oxygen An uncertainty unknown is included for alkalinity and pH for each solution The optimization method solves for a set of values for the unknowns that satisfies all of the equations satisfies all of the uncertainty limits and simultaneously minimizes the objective function which is a weighted sum of the uncertainty unknowns see Equations and Numerical Method for Inverse Modeling 272 User s Guide to PHREEQC Version 2 Results for the two inverse models found in this example are shown in table 49 The results begin with a listing of three columns for each solution that is part of the model All columns are values in mol kgw except pH and isotopic values if included The first column contains the original analytical data for the solution Input The second column contains any adjustments to the analytical data calculated for the model Delta These adjustments must be within the specified uncertainty limits The third column contains the revised analytical data for the solution which are equal to the original data plus any adjustment Input Delta After the listing of the solutions the relative fractions of each solution in the inverse model are printed Solution fractions Wit
417. nch True or False user_punch Controls printing of information defined in USER_PUNCH to the selected output file When user_punch is set to false information defined in USER_PUNCH will not be written to the selected output file Writing this information to the selected output file can be resumed if user_punch is set to true ina SELECTED_OUTPUT data block in a subsequent simulation Default is true Optionally u ser_punch Note the hyphen is required to avoid a conflict with the keyword USER_PUNCH Line 4 high_precision True or False high_precision Prints results to the selected output file with extra numerical precision 12 decimal places default is 3 or 4 In addition the criterion for convergence of the calculations is set to le 12 default is 1e 8 convergence_tolerance in KNOBS data block Default is true Initial value at start of program is false Optionally high precision or hligh precision Line 5 reset True or False reset Resets all identifiers listed in lines 6 20 to true or false Default is true Optionally reset or r eset Line 6 simulation True or False simulation Prints simulation number or for advective dispersive transport calculations the number of advective dispersive transport simulations to each line of the selected output file if value is true excludes print if value is false Default is true Initial value at start of program is true Optionally simulation sim or sim ulatio
418. ncludes complexation 292 User s Guide to PHREEQC Version 2 constants for two generalized organic ligands fulvate and humate Some additional gases are included some carbonate reactions retain the chemical equations used in PHREEQE Cation exchange data from Appelo and Postma 1993 as well as surface complexation reactions from Dzombak and Morel 1990 have been included The rate expressions in phreegc dat are also included in wateg4f dat The file named minteg dat contains thermodynamic data for the agueous species and gas and mineral phases that are derived from the database files of MINTEOA2 Allison and others 1990 The database file contains data for the following elements aluminum barium boron bromide cadmium calcium carbon chloride copper fluoride hydrogen iron lead lithium magnesium manganese nitrogen oxygen phosphorous potassium silica sodium strontium sulfur and zinc It also has data for the following organic ligands benzoate p acetate isophthalate diethylamine n butylamine methylamine dimethylamine tributylphosphate hexylamine ethylenediamine n propylamine isopropylamine trimethylamine citrate NTA EDTA propanoate butanoate isobutyrate 2 methylpyridine 3 methylpyridine 4 methylpyridine formate isovalerate valerate acetate tartrate glycine salicylate glutamate and phthalate A listing of the file phreegc dat follows In the interest of space the other files are not included in this
419. nd comments characters following are eliminated Example problems The keyword TITLE is used in all examples 1 through 18 172 User s Guide to PHREEQC Version 2 TRANSPORT This keyword data block is used to simulate 1D transport processes that include advection and dispersion diffusion and diffusion into stagnant zones adjacent to the 1D flow system All chemical processes modeled by PHREEQC including kinetically controlled reactions may be included in an advective dispersive transport simulation Purely advective transport plus reactions without diffusion dispersion or stagnant zones can be simulated with the ADVECTION data block Example data block Line 0 TRANSPORT Line 1 cells 5 Line 2 shifts 25 Line 3 time step 3 15e7 Line 4 flow direction forward Line 5 boundary conditions flux constant Line 6 lengths 4 1 0 2 0 Line 7 dispersivities 4 0 1 0 2 Line 8 correct disp true Line 9 diffusion coefficient 1 0e 9 Line 10 stagnant 6 8e 6 0 3 0 1 Line 11 thermal diffusion 30 0 5e 6 Line 12 initial time 1000 Line 13 print cells 1 3 5 Line 14 print freguency 5 Line 15 punch cells 2 5 Line 16 punch freguency 5 Line 17 dump dump file Line 18 dump freguency 10 Line 19 dump restart 20 Line 20 warnings false Explanation Line 0 TRANSPORT TRANSPORT is the keyword for the data block No other data are input on the keyword
420. ne radial dimension Table 35 Mixing factors for finite difference calculation of diffusion in soheres Cell rm Vj m3 Aj m hy m foc mixf j mixf mixfjx 102 0 001 3 35e 8 5 03e 5 0 002 1 0 81 0 19 82 003 2 35e 7 2 01e 4 002 1 463 421 0 116 62 005 6 37e 7 4 52e 4 002 1 384 446 170 42 007 1 24e 6 8 04e 4 002 1 350 453 197 22 009 2 04e 6 1 26e 3 002 1 72 571 217 212 1 1 26e 5 907 093 The calculation follows the theory outlined in the section Transport in Dual Porosity Media of this manual The stagnant zone is divided into a number of layers that mix by diffusion In this example the sphere is cut in 5 equidistant layers with Ar 0 002 m Five stagnant layers are defined under keyword TRANSPORT with stagnant 5 table 36 Mixing is specified among adjacent cells in the stagnant layers with MIX data blocks the mixing factors are calculated by equations 128 and 129 For the calculation the volume V of cell j m is needed the shared surface area A ij of cell i and j m3 the distance between midpoints hi of cells i and j m and the correction factor for boundary cells fpe dimensionless The values for mobile cell 1 and associated immobile cells are given in table 35 The cells in the immobile layer are numbered as n L X cells 1 where n is the number of a mobile cell is the number of the stagnant layer and cells is the total number of mobile cells In this example the boundary cell in the stagnant
421. ne 2c log k 14 000 Line 3c delta_h 13 362 kcal Line 4c a_e 283 971 0 05069842 13323 0 102 24447 1119669 0 Line 5c gamma 39 0 0 Line 1d HS S2 2 H Line 2d log k 14 528 Line 3d delta_h 11 4 Line 6 no check Line 7d mole balance S 2 2 Explanation Line 0 SOLUTION_SPECIES Keyword for the data block No other data are input on the keyword line Line 1 Association reaction Association reaction for aqueous species The defined species must be the first species to the right of the equal sign The association reaction must precede any identifiers related to the aqueous species The association reaction is an identity reaction for each primary master species Line 2 log_k log K log_k Identifier for log K at 25 C Optionally log k logk I og_k or l ogk log K Log K at 25 C for the reaction Log K must be 0 0 for primary master species Default is 0 0 Line 3 delta_h enthalpy units delta_h Identifier for enthalpy of reaction at 25 C Optionally delta_h deltah d elta_h or d eltah enthalpy Enthalpy of reaction at 25 C for the reaction Default is 0 0 units Default units are kilojoules per mole Units may be calories kilocalories joules or kilojoules per mole Only the energy unit is needed per mole is assumed and abbreviations of these units are acceptable Explicit definition of units for all enthalpy values is recommended The enthalpy of reaction is used in the van t Hoff equation to deter
422. ne the amount and composition of each surface in a surface assemblage The composition of a surface assemblage can be defined in two ways 1 implicitly by specifying that the surface assemblage is in equilibrium with a solution of fixed composition or 2 explicitly by defining the amounts of the surfaces in their neutral form for example SurfbOH A surface assemblage may have multiple surfaces and each surface may have multiple binding sites which are identified by letters following an underscore Example data block 1 Line Oa SURFACE 1 Surface in equilibrium with solution 10 Line la eguilibrate with solution 10 Line 2a Surfa_w 1 0 1000 0 4 33 Line 2b Surfa_s 0 01 Line 2c Surfb 0 5 1000 0 33 Line Ob SURFACE 3 Sites related to pure phase and kinetic reactant Line 1b eguilibrate with solution 10 Line 3a Surfc_wOH Fe OH 3 a equilibrium phase 0 1 le5 Line 3b Surfc_sOH Fe OH 3 a equilibrium phase 0 001 Line 3b Surfd_sOH A1 0H 3 a kinetic 0 001 2e4 Line 4 no edl Line Oc SURFACE 5 Explicit calculation of diffuse layer composition Line lc eguilibrate with solution 10 Line 2d Surfe w ORES 1000 033 Line 5 diffuse layer 2e 8 Line 6 only counter ions Explanation 1 Line 0 SURFACE number description SURFACE is the keyword for the data block number Positive number to designate the following surface assemblage and its composition A range of numbers may also be given in the f
423. nflict with the key word PRINT list of cell numbers Printing to the output file will occur only for these cell numbers The list of cell numbers may be continued on the succeeding line s A range of cell numbers may be included in the list in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default 1 cells Line 14 print_frequency print_modulus print freguency Identifier to select shifts for which results will be written to the output file Option ally print_frequency print_f requency output freguency or o utput_frequency print_modulus Printing to the output file will occur after every print_modulus advection shifts or dif fusion periods Default is 1 Line 15 punch_cells list of cell numbers punch_cells Identifier to select cells for which results will be written to the selected output file Optionally punch punch_cells pu nch cells selected cells or selected_c ells list of cell numbers Printing to the selected output file will occur only for these cell numbers The list of cell numbers may be continued on the succeeding line s A range of cell numbers may be included in the list in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default 1 cells 176 User s Guide to PHREEQC Version 2 Line 16 punch_frequency punch_modulus p
424. ng uses a chemical analysis of a water to calculate the distribution of aqueous species using an ion association aqueous model The most important results of speciation calculations are saturation indices for minerals which indicate the saturation state of each mineral relative to the water Normally speciation modeling requires only aSOLUTION or SOLUTION_SPREAD data block for each water analysis for which saturation indices are to be calculated Example 1 demonstrates speciation calculations Batch Reaction Calculations Batch reaction calculations simulate reactions occurring in a beaker and can involve equilibrium and irreversible reactions Equilibrium reactions are defined by specifying a solution or mixture of solutions to be put in the beaker along with a pure phase assemblage an exchange assemblage a multicomponent gas phase a solid solution assemblage or a surface assemblage The solution or mixture is brought to equilibrium with the reactants Furthermore irreversible reactions can be specified including addition or removal of specified reactants temperature changes and or kinetic reactions for which the reaction rate depends on solution composition Conceptually the irreversible reactions are added and equilibrium is calculated for the system see examples 2 3 4 5 6 7 8 and 10 in Examples Kinetic reactions are integrated for a specified time step by calculating equilibrium following each of a series of irreversible rea
425. nknowns with the convention that positive dN sas total are increases in solution concentration is 18 User s Guide to PHREEQC Version 2 N Maq dfo o O eae 32 g m For data input to PHREEQC the mass action equations Henry s law constant and temperature dependence of the constant are defined with the PHASES data block The type of gas phase fixed volume or fixed pressure the components to include in gas phase calculations and initial gas phase composition are defined with the GAS_PHASE data block see Description of Data Input Equilibrium with Pure Phases Equilibrium between the aqueous phase and pure phases including gases with fixed partial pressures is included in the model through heterogeneous mass action equations PHREEQC allows multiple pure phases termed a pure phase assemblage to exist in equilibrium with the aqueous phase subject to the limitations of the Gibbs Phase Rule The activity of a pure phase is assumed to be identically 1 0 The additional master unknown for each pure phase is the moles of the pure phase that is present in the system n where p refers to the p phase Terms representing the changes in the moles of each pure phase occur in the mole balance equations for elements PHREEQC also allows a calculation where equilibrium with a pure phase is produced by adding or removing a specified reactant alternative formula and alternative phase in EQUILIBRIUM_PHASES data block the mole tra
426. nknowns for this set of equations and inequalities are 1 the mixing fraction of each aqueous solution A 2 the mole transfers of minerals and gases into or out of the agueous solution amp p 3 the aqueous mole transfers between valence states of each redox element amp the number of redox reactions for each redox element is the number of valence states minus one and 4 a set of uncertainty terms that account for uncertainties in the analytical data 9 __ Unlike previous approaches to inverse modeling uncertainties are assumed to be present in m q the analytical data as evidenced by the charge imbalances found in all water analyses Thus the uncertainty terms 8 g present uncertainties due to analytical error and spatial or temporal variability in concentration of each 54 User s Guide to PHREEQC Version 2 element element valence state or alkalinity m in each aqueous solution q The uncertainty terms can be constrained to be less than specified uncertainty limits u ji which allows user supplied estimates of uncertainty for each element or element valence state to limit the deviation from the analytical data T q of revised element concentrations T gF 6 _ that are calculated in mole balance models m q Mole Balance Equations The mole balance equations including the uncertainty terms and redox reactions for elements and valence states are defined as Q P R IATA DA pop Y Cm yp 0 131 q p where
427. not used in the example problems See listing of default database file in Attachment B for an example Related keywords EXCHANGE EXCHANGE SPECIES SAVE exchange and USE exchange DESCRIPTION OF DATA INPUT 87 EXCHANGE_SPECIES This keyword data block is used to define a half reaction and relative log K for each exchange species Normally this data block is included in the database file and only additions and modifications are included in the input file Example data block Line 0 EXCHANGE SPECIES Line la X X Line 2a log_k 0 0 Line 1b X Na NaX Line 2b log_k 056 0 Line 3b gamma 4 0 075 Line lc 2X Cat2 CaX2 Line 2c log k 0 8 Line 4c davies Line ld Xa Xa Line 2d log_k 0 0 Line le Xa Nat NaXa Line 2e log_k 0 0 Line 1f 2Xa Ca 2 CaXa2 Line 2f log_k 2 0 Explanation Line 0 EXCHANGE_SPECIES Keyword for the data block No other data are input on the keyword line Line 1 Association reaction Association reaction for exchange species The defined species must be the first species to the right of the equal sign The association reaction must precede any identifiers related to the exchange species Master species have an identity reaction lines la and 1d Line 2 log_k log K log_k Identifier for log K at 25 C Optionally log_k logk I og_k or I ogk log K Log Kat 25 C for the reaction Unlike log K for aqueous species the log K for exchange species is implici
428. ns disequilibrium among valence states of redox elements is allowed The unknowns for each aqueous species i are the activity a activity coefficient Ys molality m and moles in solution n PHREEQC rewrites all chemical equations in terms of master species There is one master aqueous species associated with each element for example Ca for calcium or element valence state for example Fe for ferric iron plus the activity of the hydrogen ion the activity of the aqueous electron and the activity of water Some programs for example MINTEQA2 Allison and others 1990 and MINEQL Schecher and McAvoy 1991 use the term component for these species but that terminology is not used here because of confusion with the definition of component for the Gibbs phase rule For PHREEQC the identity of each aqueous master species is defined with SOLUTION_MASTER_SPECIES data block see Description of Data Input The numerical method reduces the number of unknowns to be a minimum number of master unknowns and iteratively refines the values of these master unknowns until a solution to the set of algebraic equations is found The master unknowns for aqueous solutions are the natural log of the activities of master species the natural log of the activity of water a H 0 the ionic strength 1 and the mass of solvent water in an aqueous solution Wag The following relationships apply to all aqueous species except aqueous electrons and
429. nse that y is a minimum where i is the index of b Ya ja 1 J rows and j is the index for columns subject to the equality constraints of the second matrix equation and the ine quality constraints of the third matrix equation The method will find a solution that minimizes the objective func tions AX B or it will determine that no feasible model for the problem exists m oe Mins SlEn ql N ae l Initially AX B is set to minimize LL ma where S 0 001 is a scaling factor that limits the size pete eR RR EL A Ri eee S f of the coefficients in the A matrix A is a diagonal matrix with elements JA and B 0 The equality constraints CX D include all mole balance alkalinity balance charge balance electron balance and water balance equations and all inorganic carbon alkalinity pH relations The inequality constraints EX lt F include two ine qualities for each of the s one for positive and one for negative to account for the absolute values used in the formulation an ineguality relation for each mixing fraction for the agueous solutions which forces each mixing fraction to be nonnegative and an ineguality relation for each phase that is specified to dissolve only or precipitate only Application of the optimization technigue will determine whether any inverse models exist that are consistent with the constraints Thus one set of mixing fractions and phase mole transfers plus associated s that satis
430. nsfer of the reactant that is necessary to produce equilibrium with the pure phase is calculated In this type of calculation the terms in the mole balance equations are derived from the stoichiometry of the reactant rather than the stoichiometry of the pure phase and the unknown is the number of moles of reactant that enter or leave solution The new function corresponding to each of the new unknowns is a mass action expression for each pure phase PHREEQC uses dissolution reactions in the sense that the pure phase is on the left hand side of the chemical equation For calcite the dissolution reaction may be written as 2 2 CaCO Ca C03 33 and using log K of 10848 and activity of the pure solid of 1 0 the resulting mass action expression is 8 48 K calcite 10 Ce Cor 34 In general pure phase equilibria can be represented with the following equation Mo Cm Kp Tos as m where cp i is the stoichiometric coefficient of master species m in the dissolution reaction The values of c r may be positive or negative For PHREEQC terms on the left hand side of a dissolution reaction are assigned nega tive coefficients and terms on the right hand side are assigned positive coefficients The saturation index for the mineral SI p is defined to be M ag Cm D SI log 4 36 m The function used for phase eguilibrium in the numerical method is EOUATIONS FOR SPECIATION AND FORWARD MODELING 19 fp nK COSI sa
431. nted program On the other hand EXAMPLES 269 Table 46 Analytical data for spring waters in example 16 Analyses in millimoles per liter from Garrels and Mackenzie 1967 Spring pH SiO Ca Mg Nat K HCO 0 7 cr Ephemeral spring 6 2 0 273 0 078 0 029 0 134 0 028 0 328 0 010 0 014 Perennial spring 6 8 410 260 071 259 040 895 025 030 complete graphical user interfaces are available for PHREEQC version 1 which lacks the isotope mole balance capabilities Charlton and others 1997 and for version 2 PHREEQC for Windows V E A Post written commun 1999 http www geo vu nl users posv phreegc html The major advantage of inverse modeling with PHREEQC relative to NETPATH is the capability to include uncertainties in the analytical data that are used in the calculation of inverse models This capability produces inverse models that are more robust that is small changes in input data do not produce large differences in model calculated mole transfers Another advantage of PHREEQC is that any set of elements may be included in the inverse modeling calculations whereas NETPATH is limited to a selected though relatively comprehensive set of elements Table 47 Reactant compositions and mole transfers given by Garrels and Mackenzie 1967 Mole transfer in millimoles per kilogram water positive numbers indicate dissolution and negative numbers indicate precipitation Reactant Composition Mole transfer Halite NaCl 0
432. o 200 and 0 to 300 seconds If INCREMENTAL_REACTIONS is true the reactions will be integrated over the time intervals from 0 to 100 100 to 200 and 200 to 300 sec onds Notes Both KINETICS and REACTION data blocks are used to model irreversible reactions REACTION can only be used to define specified amounts of stoichiometric reactions essentially the rates of the reactions are constant KINETICS is used to define truly kinetic reactions To use KINETICS a mathematical rate expression based on the solution composition must be defined and this expression is used to calculate the rate of reaction at any DESCRIPTION OF DATA INPUT 109 point in time The RATES data block is used to define a set of general rate expressions that may apply over the entire modeling domain The KINETICS data block is used to identify the subset of general rate expressions that apply to a given batch reaction or to specified cells of transport calculations The data block also is used to define specific parameters for the rate expression such as the moles of reactant initially present in a cell spatially varying coefficients or cell specific exponents for the rate equation In advective ADVECTION data block and advective dispersive transport TRANSPORT data block calculations the number s assigned with the KINETICS keyword defines the cell s to which the kinetic reactions apply For a batch reaction calculation the number of reaction steps is the maximum numbe
433. o PHREEQC Keywords Input data blocks are identified with an initial keyword This word must be spelled exactly although case is not important Several of the keywords have synonyms For example PURE_PHASES is a synonym for EQUILIBRIUM_PHASES Identifiers Identifiers are options that may be used within a keyword data block Identifiers may have two forms 1 they may be spelled completely and exactly case insensitive or 2 they may be preceded by a hyphen and then only enough characters to uniquely define the identifier are needed The form with the hyphen is always acceptable and is recommended Usually the form without the hyphen is acceptable but in some cases the hyphen is needed to indicate the word is an identifier rather than an identically spelled keyword these cases are noted in the definition of the identifiers in the following sections In this report the form with the hyphen is used except for identifiers of the SOLUTION keyword and the identifiers log_k and delta_h The hyphen in the identifier never implies that the negative of a quantity is entered Chemical equations For aqueous exchange and surface species chemical reactions must be association reactions with the defined species occurring in the first position past the equal sign For phases chemical reactions must be dissolution reactions with the formula for the defined phase occurring in the first position on the left hand side of the equation Additional terms on th
434. o and units in which this isotope of this element is defined in SOLUTION input Line 5 balances balances Identifier that indicates a list of element or element valence state name follow on succeed ing lines Optionally bal balance balances or b alances Line 6 element or valence state name list of uncertainty limits element or valence state name Name of an element or element valence state to be included as a mole balance constraint in inverse modeling The identifier balances is used for two purposes 1 to include mole balance equations for elements not contained in any of the phases phases and 2 to override the uncertainty limits defined with uncertainty or the default uncertainty limits for elements element valences states or pH Mole balance equations for all elements that are found in the phases of phases input are automatically included in inverse modeling with the default uncertainty limits defined by the uncertainties identifier mole balance equations for all valence states of redox elements are included if the element is in any of the phases of phases list of uncertainty limits List of uncertainty limits for the specified element or element valence state constraint It is possible to input an uncertainty limit for element or valence state name for each solution used in inverse modeling as defined by solutions If fewer uncertainty limits are entered than the number of solutions the final uncertainty limit in
435. o ways 1 explicitly by listing the composition of each exchange component or 2 implicitly by specifying that each exchanger is in equilibrium with a solution of fixed composition The exchange master species stoichiometries and log K s for the exchange reactions are defined with the keywords EXCHANGE_MASTER_SPECIES and EXCHANGE_SPECIES The number of exchange sites can be fixed can be related to the amount of a phase in a phase assemblage or can be related to the amount of a kinetic reactant Example data block 1 Line 0 EXCHANGE 10 Measured exchange composition Line la CaX2 O23 Line 1b MgX2 0 2 Line lc Nax 0 5 Line 2a CaY2 Ca Montmorillonite equilibrium_phase 0 165 Line 2b NaZ Kinetic_clay kinetic_reactant 0 1 Explanation 1 Line 0 EXCHANGE number description EXCHANGE is the keyword for the data block number Positive number to designate the following exchange assemblage and its composition A range of numbers may also be given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the exchanger Line 1 exchange formula amount exchange formula Exchange species including stoichiometry of exchange ion and exchanger amount Quantity of exchange species in moles Line 2 exchange formula name eguilibrium phase or kinetic_reactant exchange_per_mole exc
436. o_sorption and CoNta_sorption The rate expressions are initiated with start defined with numbered Basic language statements and terminated with end The last statement of each expression is SAVE followed by a variable name This variable is the number of moles of reaction over the time subinterval and is calculated from an instantaneous rate mol s times the length of the time subinterval s which is given by the variable TIME Lines 30 and 20 in the first and second rate expressions and line 10 in the third and fourth rate expressions adjust parameters to units of EXAMPLES 263 seconds from units of hours The function MOL returns the concentration of a species mol kgw and the function M returns the moles of the reactant for which the rate expression is being defined KIN returns the moles of a kinetic reactant which may be any of the reactants defined for a cell The functions PUT and GET are used to save and retrieve a term that is common to both the HNta 2 and Biomass rate expressions The KINETICS data block defines the names of the rate expressions that apply to each cell cells 1 through 10 are defined simultaneously in this example For each rate expression that applies to a cell the formula of the reactant formula and the moles of the reactant initially present m if needed are defined It is also possible to define a tolerance tol in moles for the accuracy of the numerical integration fo
437. obtained that has second order accuracy O ny It is therefore advantageous to make the grid regular The correction factor fp depends on the ratio of the volume of the mobile zone V to the volume of the boundary cell which contacts the mobile zone V When the two volumes are equal fpe 1 It can be shown that fie 22 when V or if the concentration is constant in the mobile region Appelo and Postma 1993 p 376 Likewise fpe 0 when V 0 To a good approximation therefore V fie 25 127 Va Vie EQUATIONS AND NUMERICAL METHOD FOR TRANSPORT MODELING 51 0 6 r Na 0 105 m cells Cl 0 105 m cells e Na 0 015 m cells o Cl 0 015 m cells Na 0 005 m cell Cl 0 005 m cell Na analytical solution si CI analytical solution MILLIMOLES PER KILOGRAM WATER l 0 0 0 5 1 0 15 2 0 DISTANCE IN METERS Figure 4 Analytical solution for transport with stagnant zones a pulse input and ion exchange reactions compared with PHREEQC calculations at various grid spacings Equation 126 can be restated in terms of mixing factors for combinations of adjacent cells For an adjacent cell the mixing factor contains the terms which multiply the concentration difference C C DAA f a ae ij be mixf KU 128 J J and for the central cell the mixing factor is n Afi E ij bc mixf 1p iV 129 which give in equation 126 n 12 tl e tl C mixf ji C Y mixf Ci 130
438. od and rate expressions for Chemical Kinetics ossososss a a n ae a n aa n aa aa naa Aaa naa naa non ncnnnno Niimertcal mie tha Od iss ces dies fossa N es ages heli meita vasem cg suveds munassa vv inoeveus SN A Ka Suesoatees 41 Rate expressions A da 41 Equations and numerical method for transport Modeling 0 eee eeceenceesecesseceeecseesneeceeecaeceeneesecesaeceseeceaeeeaeeeeeeesseeeeeeens 44 The advection reaction dispersion equation ceeceeseceeeessecesseceseecsseesaeecneecsececeessecesaecsseecsaeeeaeecneecseceeeecereesaeenaee 44 Transport of heat cierre crei 48 Transport in dual porosity media saisissait ses o ns AT A REEERE aE KEE LEE ESE s E EEEE SAREE 49 First order exchange approximation cc ceessecseesecsecesecseceseeseceseeeceseeesceseecaeeaeseeecaecsaecseesaecsessaeessseseeeeneees 49 Finite differences for the stagnant Zone ooooococcnocooncnononnconnconconncononnncnnonnn cnn n aa aan aa an aa a na a cenar e aa U aa ana aaee 51 Equations and numerical method for inverse modeling uuosossssss ee n a a aa an a eaa na aa aa ea aan aa UL a Tan aan aeeen 54 Equations and inequality constraints u soossosssssess ean non crono aa a a na na a na e a aa na Ua aa na aa naa Tena a aeaen 54 Mole balance equations siine esenee sores caves eenen ib tet oiies EE sennasta EEE EEEE kts lay e lees 55 Alkalinity balance eguation AAA saas oee e Uu sa E E EEEE EES Sr RESE e cs EEEE EE ES 55 Elec
439. odeling of Madison aquifer SOLUTION 1 Recharge number 3 units mmol kgw temp 9 9 pe Ol pH 7 55 Ca 1 2 Mg 1 01 Na 0 02 K 0 02 Fe 2 0 001 CL 0 02 S 6 0 16 S 2 0 C 4 4 30 i 13 7 0 1 4 i 345S 9 7 0 9 SOLUTION 2 Mysse units mmol kgw temp 63 pH 6 61 pe Os redox S 6 S 2 Ca 11 28 Mg 4 54 Na 31 89 280 User s Guide to PHREEQC Version 2 K 2 54 Fe 2 0 0004 CL 17 85 S 6 19 86 S 2 0 26 C 4 6 87 i 13c 243 0 2 a 34S 6 16 3 LaS sii 34S 2 22 1 7 INVERSE_MODELING 1 solutions 1 2 uncertainty 0 05 range isotopes 13 34S balances Fe 2 10 ph Oil phases Dolomite dis 136 3 0 2 Calcite pre 13C S15 1 Anhydrite dis 34S 1355 2 CH20 dis 13 25 0 5 Goethite Pyrite pre 34S TARR 2 Cax2 pre Ca 75Mg 25X2 pre MgX2 pre Nax Halite Sylvite PHASES Sylvite KCl K Cl log_k 0 0 CH20 CH20 H20 CO2 4H 4e log_k 0 0 EXCHANGE SPECIES 0 75Ca 2 0 25Mg 2 2X Ca 75Mg 25X2 log_k 0 0 Mole balance calculations included equations for all elements in the reactive phases listed under the identifier phases and an equation for 6 34S NETPATH calculations included isotopic fractionation equations to calculate the 5 3C of the final water whereas PHREEQC calculations included a mole balance equation on 6 BC The adjusted concentrations original data plus calculated 5 s from the PHREEQC results were rerun with NE
440. oes not con tain a valence state in parentheses the corresponding master species is a primary master species If the element name does contain a valence state in parentheses the master species is a second ary master species The master species must be defined in the SOLUTION SPECIES data block alkalinity Alkalinity contribution of the master species The alkalinity contribution of aqueous non master species will be calculated from the alkalinities assigned to the master species gram formula weight Default value used to convert input data in mass units to mole units for the ele ment or element valence For alkalinity the gram equivalent weight is entered Either gram for mula weight or formula is required but these items are mutually exclusive formula Chemical formula used to calculate gram formula weight which is used to convert input data from mass units to mole units for the element or element valence For alkalinity the formula for the gram equivalent weight is entered Either gram formula weight or formula is required but these items are mutually exclusive gram formula weight for element This field is required for primary master species and must be the gram formula weight for the pure element not for an aqueous species 154 User s Guide to PHREEQC Version 2 Notes Line 1 must be repeated for each element and each element valence state to be used by the program Each element must have a primary master species If secondar
441. of surfaces Index number for surfaces S Concentration of i in the solid phase mol kg solid S Mass of surface s g SI p Saturation index for phase p SI widened Specified target saturation index for phase p SS Number of solid solutions in solid solution assemblage SS Index number for solid solutions T Temperature K Ta Total number of equivalents of alkalinity in solution T Total number of equivalents of exchange sites for exchanger e E Total quantity of m an element element valence exchanger site surface site or alkalinity mol or for alkalinity eq T Total quantity of a dissolved element or element valence state excluding alkalinity hydrogen oxygen and m q y E y hydrog ys electrons mol T m Total moles of an element element valences or alkalinity m in solution g mol or for alkalinity eg I Total number of eguivalents of surface sites for surface s i Charge imbalance for the system during reaction and transport calculations eq T gt e Charge imbalance for the exchanger e eq I Charge imbalance for the aqueous phase q eq Li Charge imbalance for the surface s eq Total number of reactants in inverse modeling Attachment A Listing of Notation t Time s t Thickness of diffuse layer for surface s m Um q Uncertainty limit assigned to element m in solution q mol v Pore water flow velocity m s V Amount of solution in kinetic reactions kg H O Vota Total volume of a fixed volume gas
442. olumn headings are elements or element valence states and succeeding lines are the data values for each solution with one solution defined on each line Read the documentation for DESCRIPTION OF DATA INPUT 161 SOLUTION for detailed descriptions of input capabilities to convert mass units to mole units to change default redox calculations and to adjust concentrations to obtain equilibrium with a specified phase This information is entered as a subheading in SOLUTION_SPREAD The identifiers of SOLUTION are included in SOLUTION_SPREAD but in SOLUTION_SPREAD the values defined for the identifiers apply to all subsequently defined solutions Identifiers can precede or follow data lines Line 12 and will apply to any subsequently defined solutions until the end of the data block or until the identifier is redefined In the example data block the pH of solutions 10 11 is defined to be 6 9 by an entry in the pH column the pH for solutions 1 and 5 is the default defined by pH identifier 7 1 Empty entries in columns with headings that are not identifiers are interpreted as zero concentrations or missing values If a column heading can not be interpreted as part of the solution input warnings are printed and the data for that column are ignored Example problems The keyword SOLUTION_SPREAD is used in example problem 16 Related keywords SOLUTION 162 User s Guide to PHREEQC Version 2 SURFACE This keyword data block is used to defi
443. olution s mixing fraction including hydrogen and oxygen Thus the mass of water is effectively multiplied by the same fraction In the example data block if all solutions have 1 kg of water the total mass of water in the mixture is 1 1 0 5 0 3 1 9 kg and the concentration of sodium would be approximately 0 16 mol kgw 0 3 1 9 The charge imbalance of each solution is multiplied by the mixing fraction and all the imbalances are then summed to calculate the charge imbalance of the mixture The temperature of the mixture is approximated by multiplying each solution temperature by its mixing fraction summing these numbers and dividing by the sum of the mixing fractions Other intensive properties of the mixture are calculated in the same way as temperature This approach for calculating the temperature of mixtures is an approximation because enthalpies of reaction are ignored For example heat generated by mixing a strong acid with a strong base is not considered This formulation of mixing can be used to approximate constant volume processes if the sum of the mixing fractions is 1 0 and all of the solutions have the same mass of water The calculations are only approximate in terms of mixing volumes because the summation is made in terms of moles or mass and no consideration is given to 116 User s Guide to PHREEQC Version 2 the partial molar volumes of solutes Similarly the formulation for mixing can approximate processes with varying vo
444. olution in equilibrium with the cation exchanger The column is then flushed with three pore volumes of calcium chloride solution Calcium potassium and sodium react to equilibrium with the exchanger at all times The problem is run two ways by using the ADVECTION data block which models only advection and by using the TRANSPORT data block which simulates advection and dispersive mixing The input data set is listed in table 30 The column has 40 cells to be consistent with one of the runs described by Appelo and Postma 1993 This requires that 40 solutions numbered 1 through 40 be defined the number of the solution corresponds to the number of the cell in a column In this example all cells contain the same solution 238 User s Guide to PHREEQC Version 2 but this is not necessary Solutions could be defined differently for each cell and could be defined by reactions in the current or preceding simulations using the SAVE keyword The definition of a solution for each cell is mandatory but the definition of an exchanger for each cell is optional The number of the exchanger corresponds to the number of the cell in a column and if an exchanger is defined for a cell number it is used in the calculations for that cell In this example an identical exchanger composition is prescribed for all cells The solution filling each of the 40 cells of the column is defined with the SOLUTION 1 40 data block The infilling solution for the column mus
445. olution to the nonlinear equations By iteratively solving successive sets of linear equations a solution to the nonlinear equations can be found Each of the f functions that is used in the numerical method is presented in this section along with the total derivative with respect to the master unknowns that is used to form the Jacobian matrix Activity of Water The activity of water is calculated from an approximation that is based on Raoult s law Garrels and Christ 1965 p 65 66 N aq n 1 ay o ie E 25 i The function f H O is defined as N ag fio Wagld o 1 0 017Y n 26 1 and the total derivative of this function is N g Af o Wagt odnlay o ay o DW AW gq 0 017 Y dn 27 1 The master unknown is the natural log of the activity of water Ina H 0 EQUATIONS FOR SPECIATION AND FORWARD MODELING 17 lonic Strength The ionic strength of the aqueous solution is a master unknown and is defined as Naa j 1 2 K 32 Way 28 1 The function f u is defined as N les i and the total derivative of this function is Ip 2 df y WWW Wogd 5 Y 3 4N 30 L Equilibrium with a Fixed Volume Multicomponent Gas Phase For a fixed volume gas phase the moles of each gas component can be calculated from the activities of the aqueous master species and the numerical model treats the gas phase components in the same way that it treats aqueous species The terms for the moles of each gas
446. om laboratory or field tracer experiments version 2 0 U S Salinity Laboratory Research Report 137 Riverside California Truesdell A H and Jones B F 1974 WATEQ A computer program for calculating chemical equilibria of natural waters Jour nal of Research U S Geological Survey v 2 p 233 274 Van Cappellen P and Wang Y 1996 Cycling of iron and manganese in surface sediments American Journal of Science v 296 p 197 243 Van Genuchten M Th 1985 A general approach for modeling solute transport in structured soils IAH Memoirs v 17 p 513 526 Waite T D Davis J A Payne T E Waychunas G A and Xu N 1994 Uranium VI adsorption to ferrihydrite Application of a surface complexation model Geochimica et Cosmochimica Acta v 59 p 5465 5478 Williamson M A and Rimstidt J D 1994 The kinetics and electrochemical rate determining step of aqueous pyrite oxidation Geochimica et Cosmochimica Acta v 58 p 5443 5454 Wolery T J 1979 Calculation of chemical equilibrium between aqueous solution and minerals The EQ3 6 software package Lawrence Livermore National Laboratory Report UCRL 52658 Livermore CA Wolery T J Jackson K J Bourcier W L Bruton C J Viani B E Knauss K G and Delany J N 1990 Current status of the EQ3 6 software package for geochemical modeling in Melchior D C and Bassett R L eds Chemical Modeling of Aqueous Systems II Washington D C American Chemical So
447. om the advection simulation is still in effect and the pore volume at each transport step is calculated and written to the selected output file Table 30 Input data set for example 11 TITLE Example 11 Transport and ion exchange SOLUTION 0 CaC12 units mmol kgw EXAMPLES 239 temp 25 lt 0 pH TED charge pe 12 5 02 g 0 68 Ca 0 6 CL 132 SOLUTION 1 40 Initial solution for column units mmol kgw temp 25250 pH 7 0 charge pe 12 25 02 g 0 68 Na 1 0 K 0 2 N 5 1 2 EXCHANGE 1 40 equilibrate 1 X 0 0011 ADVECTION cells 40 shifts 120 punch cells 40 punch freguency 1 print cells 40 print freguency 20 SELECTFD OUTPUT file exlladv sel reset false step totals Na Cl K Ca USER PUNCH heading Pore vol 10 PUNCH STEP NO 5 40 END SOLUTION 1 40 Initial solution for column units mmol kgw temp 230 pH 7 0 charge pe T25 02 g 0 68 Na 1 0 K 0 2 N 5 T2 EXCHANGE 1 40 equilibrate 1 X 0 0011 TRANSPORT cells 40 length 0 002 shifts 120 time step 720 0 flow direction forward boundary cond flux flux diffc 0 0e 9 dispersivity 0 002 correct disp true punch 40 240 User s Guide to PHREEOcC Version 2 punch freguency 1 print 40 print freguency 20 SELECTED OUTPUT file exlltrn sel reset false step totals Na Cl K Ca END IET ADVECTION AND DISPERSION 1 0 H J C
448. omass decay coefficient hrt The parameter values for these equations are listed in table 42 Table 42 Kinetic rate parameters used in example 15 Parameter Description Parameter value K Half saturation constant for donor 7 64e 7 mol L K Half saturation constant for acceptor 6 25e 6 mol L Im Maximum specific rate of substrate utilization 1 418e 3 mol Nta g cells hr Y Microbial yield coefficient 65 14 g cells mol Nta b First order microbial decay coefficient 0 00208 hr 262 User s Guide to PHREEQC Version 2 Sorption Reactions Tebes Steven and Valocchi 1997 defined kinetic sorption reactions for Co and CoNta by the rate equation Si KR aloin 166 d where i is either Co or CoNta mol L s is the sorbed concentration mol g sediment k is the mass transfer coefficient hr and K is the distribution coefficient L g The values of the coefficients are given in table 43 Table 43 Sorption coefficients for Co and CoNta Species Km Ka Co2 1hr 5 07e 3 L g CoNta 1 hr 5 33e 4 Lig The values of Kj were defined to give retardation coefficients of 20 and 3 for Co and CoNta respectively Because the sorption reactions are defined to be kinetic the initial moles of these reactants and the rates of reaction are defined with KINETICS and RATES data blocks no surface definitions SURFACE SURFACE_MASTER_SPECIES or SURFACE_SPECIES are needed Furthermore all kinetic reactants are immobile so t
449. on Borkovec and Westall 1983 and a non electrostatic surface complexation model Davis and Kent 1990 Other models including triple and quadruple layer models have not been implemented in PHREEQC Sorption according to Langmuir or Freundlich isotherms can be modeled as special cases of the non electrostatic model Davis and Kent 1990 reviewed surface complexation modeling and note theoretical problems with the use of molarity as the standard state for sorbed species PHREEQC version 2 uses mole fraction for the activity of surface species instead of molarity This change in standard state has no effect on monodentate surface species but does affect multidentate species significantly Other uncertainties occur in determining the number of sites the surface area the composition of sorbed species and the appropriate log K s In many field studies surface complexation modeling requires experimental data on material from the study site for appropriate model application The capability of PHREEQC to calculate explicitly the composition of the diffuse layer diffuse_layer option SURFACE data block is ad hoc and should be used only as a preliminary sensitivity analysis Solid Solutions PHREEQC uses a Guggenheim approach for determining activities of components in nonideal binary solid solutions Glynn and Reardon 1990 Ternary nonideal solid solutions are not implemented It is possible to model two or more component solid solutions by
450. on due to aqueous redox reactions or the dissolution or precipitation of phases The alkalinity contribution of a reaction is defined by the sum of the alkalinities of the aqueous species in a redox or phase dissolution reaction PHREEQC defines C yz and c Alk p 88 follows Nog Car Y PAi icir 133 i and Na CAlk p Y Dan ifi p 134 i EQUATIONS AND NUMERICAL METHOD FOR INVERSE MODELING 55 where D _ is the number of equivalents of alkalinity per mole of species i c is the stoichiometric coefficient of the species i in the aqueous redox reaction r and c p is the stoichiometric coefficient of the species i in the dissolution reaction for phase p Electron Balance Equation The mole balance equation for electrons assumes that no free electrons are present in any of the aqueous solutions Electrons may enter or leave the system through the aqueous redox reactions or through the phase dissolution reactions However the electron balance equation requires that any electrons entering the system through one reaction be removed from the system by another reaction R P Ye the ja 0 135 n where ec is number of electrons released or consumed in aqueous redox reaction r and c _ is the number e p of dn released or consumed in the dissolution reaction for phase p Water Balance Eguation The mole balance eguation for water is R P ag Yami c a EDDA EA Y Cno pa p 0 136 r p where GF W H 0 is the gram fo
451. on of an aqueous solution Identify elements and corresponding aqueous master species Define association reaction and thermodynamic data for aqueous species Define one or more aqueous solution compositions using a tab delimited format Alternative input format for SOLUTION Define the composition of an assemblage of surfaces Identify surface sites and corresponding surface master species Define association reaction and thermodynamic data for surface species Specify a text string to be printed in the output file Specify parameters for an advective dispersive reactive transport optionally with dual porosity Select aqueous solution or other reactants that define batch reactions Print user defined quantities to the output file Print user defined quantities to the selected output file Each simulation may contain one or more of seven types of speciation batch reaction and transport calculations 1 initial solution speciation 2 determination of the composition of an exchange assemblage in 64 User s Guide to PHREEOcC Version 2 equilibrium with a fixed solution composition 3 determination of the composition of a surface assemblage in equilibrium with a fixed solution composition 4 determination of the composition of a fixed volume gas phase in equilibrium with a fixed solution composition 5 calculation of chemical composition as a result of batch reactions which include mixing kinetically controlled reactions net addition or
452. ons Figure 4 shows the comparison of PHREEQC with the analytical solution obtained with CXTFIT version 2 Toride and others 1995 The agreement is excellent for Cl R 1 but the simulation shows numerical dispersion for Na R 2 When the grid is made finer so that Ax is equal to or smaller than a L 0 015 m numerical dispersion is much reduced In the figure the effect of a stagnant zone is to make the shape of the pulse asymmetrical The leading edge is steeper than the trailing edge where a slow release of chemical from the stagnant zone maintains higher concentrations for a longer period of time Finite Differences for the Stagnant Zone As an alternative to first order exchange of stagnant and mobile zones a finite difference grid can be laid over the stagnant region Fick s diffusion equations F D VC and S VeF transform to finite differences for an arbitrarily shaped cell j A Cc C D At Y CI Ca 126 is where C a is the concentration in cell j at the current time C A is the concentration in cell j after the time step At is the time step s equal to Af p in PHREEQC i is an adjacent cell Aj is shared surface area of cell i and j m hi is the distance between midpoints of cells i and j m V is the volume of cell j m and fp is a factor for boundary cells The summation is for all cells up to n adjacent to j When A ij and hi are equal for all cells a central dif ference algorithm is
453. onstant for the reaction and e is a factor that accounts for the 0 W work involved in moving a charged species H away from a charged surface In general the mass action egua tion for surface species 1 is Pk 14 User s Guide to PHREEOc Version 2 PE Z Cm igs 5 RT op Kin T isp i Q m I 15 where Ki yi is the intrinsic equilibrium constant ls is the i surface species for surface site type k weak or strong in Dzombak and Morell 1990 in surface s m varies over all master species M including surface master species c is the stoichiometric coefficient of master species m in the association reaction for surface species i s and A is the net change in surface charge due to the formation of the surface species The values of Cm May be positive or negative For PHREEOC terms on the right hand side of an association reaction are Ms assigned negative coefficients and terms on the left hand side are assigned positive coefficients For a surface species the equation for the total moles of species i 5 is FY Az ju Co Ts RT sp ms n K E e an s eb s Sk 7 Us m i 16 2Az Mic Ts l sg m r s a spb Y II m 5 m where Ta _ is the total number of a type of surface site and b is the number of surface sites bounded to the spe Us cies The total derivative of the moles of species i 5 with respect to the master unknowns is M dn n c din
454. onstant throughout the advection simulation The KINETICS data block provides a better definition of time varying reactions for individual cells The MIX keyword can be used with ADVECTION modeling to define simplistic dispersion or lateral inflow to the column At each shift solution 0 is moved to cell 1 any stoichiometric reaction or mixing for cell 1 is added kinetic reactions are integrated while maintaining equilibrium with the contents of cell 1 solution 1 before mixing and reaction is moved to cell 2 reaction or mixing for cell 2 is added kinetic reactions are integrated while maintaining equilibrium with the contents of cell 2 and so on until solution ce ls 1 is moved to cell cells The moles of pure phases and kinetic reactants and the compositions of the exchange assemblage surface assemblage and gas phase in each cell are updated with each shift but only after mixing for the next cell has been accomplished Example problems The keyword ADVECTION is used in example problems 11 and 14 Related keywords EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE KINETICS MIX PRINT REACTION REACTION_TEMPERATURE SAVE SELECTED_OUTPUT SOLID_SOLUTIONS SOLUTION SURFACE TRANSPORT USER_PRINT and USER_PUNCH DESCRIPTION OF DATA INPUT 77 END This keyword has no associated data It ends the data input for a simulation After this keyword is read by the program the calculations described by the input for the simulation are performed an
455. ontaining a brine calcite and dolomite a cation exchanger and a surface that complexes arsenic calculated pH values are consistent with observations of aquifer water In the sodium dominated waters the calculated pH is generally greater than 8 0 and sometimes as high as 9 2 in the calcium magnesium bicarbonate waters the pH is slightly greater than 7 0 Sensitivity calculations indicate that the maximum pH depends on the amount of exchanger present Decreasing the number of cation exchange sites decreases the maximum pH Simulated arsenic concentrations are similar to values observed in the aquifer where the maximum concentrations are 1 to 2 u mol kgw Lower maximum pH values produce lower maximum arsenic concentrations The stability constant for the surface complexation reactions have been taken directly from the literature a decrease in the log K for the predominant arsenic complexation reaction tends to decrease the maximum arsenic concentration as well In conclusion the model results which were based largely on measured values and literature thermodynamic data provide a satisfactory explanation of the variation in major ion chemistry pH and arsenic concentrations within the aquifer 258 User s Guide to PHREEOc Version 2 Example 15 1D Transport Kinetic Biodegradation Cell Growth and Sorption A test problem for advective dispersive reactive transport was developed by Tebes Steven and Valocchi 1997 1998 Although based on rela
456. ontains the mole fraction of component 1 that satisfies the equation and then interval halving to refine the estimate of the mole fraction Once the mole fractions of the solid have been determined two values of the total activity product Ym are calculated as follows Dil IAP 1AP 91 and Y oja XM Kj x 4 K 92 If yn solid yn aq then the equations for the solid solution are included otherwise the equations are not included If the equations for a solid solution are not included in the matrix all coefficients for the unknowns dn ja ss in the matrix are set to zero NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING 39 At each iteration the equation for the sum of partial pressures of gas components in the gas phase is included for a fixed pressure gas phase if the moles in the gas phase are greater than a small number 1x10 or if the sum of the partial pressures of the gas phase components as calculated from the activities of agueous species is greater than the total pressure If the equation for the sum of the partial pressures of gas components in the gas phase is not included in the matrix then all coefficients of the unknown dN g are set to zero Equations f Paar f A and f p are included as optimization equations in the solver All other equations are included as equality constraints in the solver In addition several inequality constraints are included in the solver 1 the value of the r
457. or a Most of the information for advective dispersive transport calculations must be entered with other keyword data blocks Advective dispersive transport assumes that solutions with numbers 1 through cells have been defined using SOLUTION SOLUTION_SPREAD or SAVE data blocks In addition the infilling solution must be defined If flow direction is forward solution 0 is the infilling solution if flow_direction is backward solution cells 1 is the infilling solution if flow direction is diffusion_only then infilling solutions at both column ends are optional If stagnant zones are modeled solution compositions for the stagnant zone cells must be defined with SOLUTION SOLUTION_SPREAD or SAVE data blocks Pure phase assemblages may be defined with EQUILIBRIUM_PHASES or SAVE with the number of the assemblage corresponding to the cell number Likewise an exchange assemblage a surface assemblage a gas phase and a solid solution assemblage can be defined for each cell through EXCHANGE SURFACE GAS_PHASE SOLID_SOLUTIONS or SAVE keywords with the identifying number corresponding to the cell number Kinetically controlled reactions can be defined for each cell through the KINETICS data block Note that ranges of numbers can be used to define multiple solutions exchange assemblages surface assemblages gas phases solid solution assemblages or kinetic reactions simultaneously and that SAVE allows definition of a range of numbers Constant ra
458. or is not present in the calculation its log activity will be printed as 999 999 Line 24 equilibrium_phases phase list equilibrium_phases Identifier allows definition of a list of pure phases for which 1 total amounts in the pure phase assemblage and 2 moles transferred will be written to the selected output file Optionally e quilibrium_phases or p ure_phases Note the hyphen is required to avoid a conflict with the keyword EQUILIBRIUM_PHASES and its synonyms phase list List of phases for which data will be written to the selected output file The list may continue on subsequent line s Each phase must have been defined by PHASES input After each calcu lation two values are written to the selected output file 1 the moles of each of the phases defined by EOUILIBRIUM PHASES and 2 the moles transferred If the phase is not defined or is not present in the pure phase assemblage the amounts will be printed as 0 Line 25 saturation_indices phase list saturation_indices Identifier allows definition of a list of phases for which saturation indices or log base 10 partial pressure for gases will be written to the selected output file Optionally saturation indices si s aturation_indices or s i phase list List of phases for which saturation indices or log base 10 partial pressure for gases will be written to the selected output file The list may continue on subsequent line s Each phase must have been d
459. or subroutines called by subroutine inverse models Optionally debug inverse or debug_i nverse 112 User s Guide to PHREEQC Version 2 True or False A value of true optionally t rue indicates the debugging information will be included in the output file false optionally f alse indicates debugging information will not be printed If neither true nor false is entered a value of true is assumed At the start of the program the default value is false If this option is set to true a large amount of information about the pro cess of finding inverse models is printed The program will print the following for each set of equations and inequalities that are attempted to be solved by the optimizing solver a list of the unknowns a list of the equations the array that is to be solved any nonnegativity or nonpositivity constraints on the unknowns the solution vector and the residual vector for the linear equations and inequality constraints The printout is very long and very tedious Line 9 debug_model True or False debug_model Includes debugging prints for subroutines called by subroutine model Optionally debug model or debug ml odel True or False A value of true optionally t rue indicates the debugging information will be included in the output file false optionally f alse indicates debugging information will not be printed If neither true nor false is entered a value of true is assumed At the start of the
460. or the master unknowns are calculated and the residuals for mole balance equations are reduced below tolerances to provide suitable estimates for the Newton Raphson technique Once suitable estimates of the master unknowns have been found the following iterative process occurs 1 The residuals of the equations are tested for convergence if convergence is found the calculation is complete Otherwise 2 the Newton Raphson matrix is formulated and solved by subroutine c11 in file cl c 3 the master unknowns are updated 4 activity coefficients are calculated 5 the distribution of species is calculated 6 if a master species of a redox element becomes small basis switching may be performed In the basis switching process new mass action equations are written and the lists for calculating residuals and the Newton Raphson matrix are remade and 7 the residuals of the equations are calculated Steps 1 through 7 are repeated until a solution to the equations is found or a prescribed number of iterations is exceeded If the numerical method fails to find a solution six additional sets of convergence parameters are used in trying to obtain convergence see description of KNOBS data block in Description of Data Input for details on alternative convergence parameters If all sets of parameters fail the program terminates Following a calculation the subroutines in print c write data to the output file and to the selected output file
461. ore stable of the two phases over the temperature range 25 to 759 Celsius c cccececesesseseseceseeeteecesceeneeeeseeeeeeesees 6 Phase diagram for the dissolution of microcline in pure water at 25 C showing stable phase boundary intersections example 6A and reaction paths across stability fields example 6B uosuusussn nin neen 7 16 Graphs showing 7 Composition of the gas phase during decomposition of organic matter with a composition of CH O NH3 9 97 in pure water under conditions of fixed volume and fixed pressure for The eas Phase mami A data 8 Distribution of zinc among the aqueous phase and strong and weak surface sites of hydrous iron oxide as a function of pH for total zinc concentrations of 107 and 104 molal 9 Concentration of total Fe 2 total Fe 3 and pH as dissolved ferrous iron Fe 2 is kinetically oxidized to ferric iron Fe 3 by oxygen uuuuummmmmm nen nn e ne a nen a na ena na n an aa na naa a naa Anaa e aeneen 10 A Mole fraction of strontianite and aragonite in solid solution B mole fraction of calcium and strontium in agueous phase C moles of strontianite and aragonite in solid solution and D moles of miscibility gap end members in solid solution as a function of the amount of strontium carbonate added sssisssssss S An TE enn asthma 11 Results of transport simulation of the replacement of sodium and potassium on a cation exchanger by infilling ca
462. orel 1990 with the following modifications 1 surfaces may have more than two types of binding sites 2 surface precipitation is not included and 3 optionally an alternative formulation for the charge potential relationship modified from Borkovec and Westall 1983 that explicitly calculates the composition of the diffuse layer can be employed diffuse_layer The non electrostatic model does not consider the effects of the development of surface charge on the formation of surface complexes with the result that surface complexes are treated mathematically very much like aqueous complexes without activity coefficient terms The following example of the generalized two layer model is taken from Dzombak and Morel 1990 chapter 8 with no explicit calculation of the diffuse layer composition Zinc sorption on hydrous ferric oxide is simulated assuming two types of sites weak and strong are available on the oxide surface Protons and zinc ions compete for the two types of binding sites and equilibrium is described by mass action equations Activities of the surface species depend on the potential at the surface which is due to the development of surface charge The example considers the variation in sorption of zinc on hydrous ferric oxides as a function of pH for low zinc concentration 107 m and high zinc concentration a104 m in 0 1 m sodium nitrate electrolyte Three keyword data blocks are required to define surface complexation data
463. orm m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Default is 1 description Optional comment that describes the surface assemblage Line 1 eguilibrate number eguilibrate Indicates that the surface assemblage is defined to be in eguilibrium with a given solution composition Optionally eguil eguilibrate or e guilibrate number Solution number with which the surface assemblage is to be in eguilibrium Any alphabetic characters following the identifier and preceding an integer with solution in line 1a are ignored Line 2 surface binding site name sites specific area per gram mass surface binding site name Name of a surface binding site sites Total number of sites for this binding site in moles specific area per gram Specific area of surface in m g Default is 600 m g DESCRIPTION OF DATA INPUT 163 mass Mass of solid for calculation of surface area in g surface area is mass times specific_area_per_gram Default is 0 g Line 3 surface binding site formula name equilibrium_phase or kinetic_reactant sites_per_mole specific_area_per_mole surface binding site formula Formula of surface species including stoichiometry of surface site and other elements connected with a pure phase or kinetic reactant The formula must be charge bal anced and is normally the OH form of the surface binding site If no elements other than the sur
464. otope_name Name of an isotope for which mole balance is desired The name must be written with mass number first followed by element name or redox state with no intervening spaces list of uncertainty limits List of uncertainty limits for the specified isotope for the solutions used in inverse modeling as defined by solutions If fewer uncertainty limits are entered than the num ber of solutions the final uncertainty limit in the list is used for the remaining solutions Thus if only one uncertainty limit is entered it is used for the given isotope for all solutions In the exam ple data block the uncertainty limit for carbon 13 line 8a is 0 05 permil in solution 10 0 1 per mil in solution 3 and 0 05 permil in solution 5 The uncertainty limit for sulfur 34 line 8b is 1 permil in all solutions Units of the uncertainty limits for an isotope must be consistent with units used to define the isotope in SOLUTION input and with the units used to define isotope values under the phases identifier line 4 Line 9 range maximum range Identifier that specifies that ranges in mole transfer for each phase in each model should be cal culated The range in mole transfer for a phase is the minimum and maximum mole transfers that can be attained for a given inverse model by varying element concentrations within their uncer tainty limits The calculation of these ranges is time consuming but provides valuable informa tion In the interest of
465. oundary condition is prescribed For the column end with a constant boundary condition an analytical solution is compared with PHREEQC results both for retardation R 1 0 CI and R 3 0 Na and temperature Finally the second order accuracy of the numerical method is verified by increasing the number of cells by a factor of three and demonstrating a decrease in the error of the numerical solution by approximately an order of magnitude relative to the analytical solution Table 31 Input data set for example 12 TITLE Example 12 Advective and diffusive transport of heat and solutes Constant boundary condition at one end closed at other The problem is designed so that temperature should equal Na conc in mmol kgw after diffusion EXCHANGE SPECIES 242 User s Guide to PHREEQC Version 2 Na X NaX log k 0 0 gamma 4 0 0 075 H X HX 10g 99 gamma 9 0 0 0 K X KX log_k 0 0 gamma 345 0 015 SOLUTION 0 24 0 mM KNO3 units mol kgw temp 0 Incoming solution OC pH 7 0 pe 12 0 02 g 0 67 K 24 e 3 N 5 24 e 3 SOLUTION 1 20 0 001 mM KCl units mol kgw temp 25 Column is at 25C pH PD pe 12 0 02 g 0 67 K le 6 cl le 6 EXCHANGE 1 20 KX 0 048 TRANSPORT Make column temperature OC displace Cl cells 20 shifts 19 flow d forward bcon flux flux length 1 0 disp 0 0 No dispersion diffc 0 0 No diffusion thermal diffusion 1 0
466. over the 10 days of the simulation It can be seen that the pH rapidly decreases at the beginning of the reaction The slope of Fe 2 against time is initially very steep but lessens as the reaction progresses which is consistent with equation 159 When the experiment is performed in reality in an unbuffered solution it is noted that the pH initially rises This rise in pH is consistent with slowly forming hydroxy complexes of Fe 3 Because the oxidation reaction by itself consumes protons the pH would initially rise if the hydroxy complexes that lower the pH form slowly Such kinetic formation of aqueous complexes could also be included in PHREEQC simulations but it would require that the hydroxy complexes of Fe 3 also be defined using a separate SOLUTION_MASTER_SPECIES and that a rate expression be defined for the kinetic formation of the complexes EXAMPLES 233 4 0 100 im 80 lt o I Total Fe 2 al z Total Fe 3 8 l O 40 5 e na SB ee cis E SL osasin j 0 1 2 3 4 5 6 7 8 9 10 DAYS Figure 9 Concentration of total Fe 2 total Fe 3 and pH as dissolved ferrous iron Fe 2 is kinetically oxidized to ferric iron Fe 3 by oxygen Example 10 Aragonite Strontianite Solid Solution PHREEQC has the capability to model ideal multicomponent or nonideal binary solid solutions For ideal solid solutions the activity of each end
467. pecies m7 s Optionally diffusion coefficient diffc dif fusion coefficient or dif fc diffusion coefficient Diffusion coefficient Default is 0 3e 9 m s Line 10 stagnant stagnant_cells exchange_factor O Oin stagnant Defines the maximum number of stagnant immobile cells associated with each cell in which advection occurs mobile cell The immobile cells are usually defined to be a 1D column that is connected to the mobile cell however the connections among the immobile cells may be defined arbitrarily with MIX data blocks The immobile cells associated with a mobile cell cell are numbered as follows n x cells 1 cell where cells is number of mobile cells and 1 lt n lt stagnant cells Each immobile cell that is used must have a defined solution SOLU TION SOLUTION_SPREAD or SAVE data block and either a MIX data block must be defined or for the first order exchange model the exchange_factor must be defined only appli cable if stagnant_cells equals 1 Mixing will be performed at each diffusion dispersion time step EQUILIBRIUM_PHASES EXCHANGE GAS_PHASE KINETICS REACTION REACTION_TEMPERATURE SOLID_SOLUTIONS and SURFACE may be defined for an immobile cell Thermal diffusion in excess of hydrodynamic diffusion can only be calculated for the first order exchange model Optionally stagnant or st agnant stagnant_cells Number of stagnant immobile cells associated with each mobile cell Default is 0 exchange_
468. phase name is used to define the stoichiometry of a reactant that phase must be defined by PHASES input in the database or in the input data file If negative relative stoichiometries or negative reaction amounts are used it is possible to remove more of an element than is present in the system which results in negative concentrations DESCRIPTION OF DATA INPUT 131 Negative concentrations will cause the calculations to fail It is possible to evaporate a solution by removing H O or dilute a solution by adding HO If more reaction steps are defined in the REACTION TEMPERATURE or KINETICS data blocks than in REACTION then the final reaction amount defined by REACTION will be repeated for the additional steps Suppose only one reaction step of 1 0 mole is specified in a REACTION data block and two temperature steps are specified in a REACTION_TEMPERATURE data block If INCREMENTAL_REACTIONS is false then the total amount of reaction added by the end of step 1 and 2 is the same 1 0 mole However if INCREMENTAL_REACTIONS true the total amount of reaction added by the end of step 1 will be 1 0 mole and by the end of step two will be 2 0 mole Example problems The keyword REACTION is used in example problems 4 5 6 7 and 10 Related keywords INCREMENTAL_REACTIONS KINETICS PHASES RATES and REACTION_TEMPERATURE 132 User s Guide to PHREEQC Version 2 REACTION_TEMPERATURE This keyword data block is used to define temperature
469. pl n tiOn NN 74 Note siii els As 76 Example proble iii is e dd ile dto TI Related key Word cicatrices TI END sic veh eile ae ada men ie oe ee 78 Example problems aaa 78 EQUILIBRIUM PHASES ssissscssesceedscyscoasettvscieschdadsaescousessantvaiststyscaspescobssnensasspachs EE S O ERs TAR IE EROE Eia 79 Example data DOCK caia ri ir bi 79 A OO 79 Not RN A AI 80 Example problems ise attc td eo aiii usb copied ES 81 Related Key words cui A ARA 81 IV User s Guide to PHREEOc Version 2 EXCHANGE voii ii arre ia be sia 82 Example data block Vii it ai 82 Explanation lr testein ee si TESE 82 Notes diva aro ic terio 83 Example data block AA NO 83 Expl nation 2 sussnsssss asa KA KTA esse nn ies EE Ta Kes es nant ates ta tms sin aava J 84 Notes 2 vesseciscas tes risti ue ssttet ksen taos EET E seal sakasti 84 Ex mple problems n s sss Rans italia 85 Related key Words oia matias 86 EXCHANGE MASTER SPECIES until iaa iia 87 Example dat block iii iii 87 A O 87 NOES nia a E li od A di Es 87 Example problems ssa kasv todas 87 Related key Words 0 HAIN KSS Nytkin st Moss MES 87 EXCHANGE SPECIES mosse R Re Kts iisi ke ira 88 Example data block cicle ciclista ice sopscipecsestscaies peili rss sea 88 Expla O a e ae slim iaa 88 Not ion eepe sa E E EEE ai E E E EEE EEES 89 Example problems nia ii 90 Related Key Word acti li sd OEE E E E EE EEE 90 GAS PHASE ut Ie code m ik kit olo eds TRENT 91 Example data block 1 Fixed
470. pper fluoride hydrogen iron lead lithium magnesium manganese nitrogen oxygen phosphorous potassium silica sodium strontium sulfur and zinc The thermodynamic data for cation exchange are taken from Appelo and Postma 1993 p 160 and converted to log K accounting for valence of the exchanging species The thermodynamic data for surface species are taken from Dzombak and Morel 1990 acid base surface reactions are taken from table 5 7 and other cation and anion reactions are taken from tables in chapter 10 Preliminary rate expressions for K feldspar Sverdrup 1990 albite Sverdrup 1990 calcite modified from Plummer and others 1978 pyrite Williamson and Rimstidt 1994 organic carbon Organic_c additive Monod kinetics for oxygen nitrate and sulfate and pyrolusite Postma D and Appelo C A J 2000 Geochim Cosmochim Acta in press are included from various sources Examples of KINETICS data block for each of these expressions are included in the definitions in the RATES data block in phreegc dat The file named wateg4f dat contains thermodynamic data for the aqueous species and gas and mineral phases that are essentially the same as WATEQ4F Ball and Nordstrom 1991 In addition to data for the elements in the database file phreegc dat the database file wateg4f dat contains data for the elements arsenic cesium iodine nickel rubidium selenium silver and uranium The WATEQ4F derived database file also i
471. process repeated Unfortunately doubling the grid size at least quadruples the number of solution calculations that must be made because the number of cells doubles and the time step is halved If the cell size approaches the size of the dispersivity it may require even more solution calculations because the number of mix steps in the dispersion calculation will increase as well Table 45 Revised TRANSPORT data block for example 15 for grid refinement to a 20 cell model TRANSPORT Last 55 hours with background infilling solution cells 20 length 045 shifts 40 time step 1800 flow direction forward boundary condition flux flux dispersivity 05 diffusion coef 0 0e 9 punch cells 20 punch freguency 2 print cells 20 print freguency 10 END To test grid convergence in this example the number of cells in the column were doubled for a total of 20 cells All keyword data blocks that defined compositions for the range 1 10 were changed to 1 20 In addition the parameters for advective dispersive transport were adjusted to be consistent with the new number of cells Table 45 shows the first TRANSPORT data block adjusted for 20 cells The number of cells and number of shifts are doubled the cell length and time step are halved To print information for the same location as the 10 cell model the end of the column the punch cells and print cells are set to cell 20 To print information at the same time in the simulation as the 1
472. put by specifying equilibrium for gibbsite saturation index equals 0 0 and an alternative reaction to reach equilibrium KAISI308 the formula for K feldspar A large amount of K feldspar 10 0 mol is present to assure equilibrium with gibbsite can be obtained Kaolinite K mica and K feldspar are allowed to precipitate 1f they become saturated but they can not dissolve because they were given zero initial moles in the phase assemblage The amount of reaction that is calculated in this simulation is the dissolution of precisely enough K feldspar to reach equilibrium with gibbsite possibly including precipitation of one or more of the other minerals No gibbsite will dissolve or precipitate the alternative reactant KA1S1308 will dissolve or precipitate in its place Simulations 6A2 6A4 perform the same calculations for kaolinite K mica and K feldspar At other temperatures or using other minerals it may be that a target phase is undersaturated regardless of the amount of the alternative reaction that is added because the phase is unstable relative to other phases In this case the numerical method will find the amount of the alternative reaction that produces the maximum saturation index Selected results for simulations 6A1 6A4 are presented in table 22 and are plotted on figure 6 as points A B D and F The stability fields for the phases which are based on the thermodynamic data are outlined on the figure EXAMPLES 217 8 0 7 0 K
473. quation is included in the problem formulation it is included as the only optimization equation for the solver All other equations are included as equality constraints No inequality constraints are included for speciation calculations Partial redox disequilibrium is allowed in initial solution calculations and redox options in the SOLUTION or SOLUTION_SPREAD data block affect the aqueous speciation and saturation index calculations By default whenever a value of the activity of the electron is needed to calculate the molality or activity of an aqueous species the input pe is used If a default redox couple is given redox or a redox couple is specified for an element or combination of element valence states see SOLUTION keyword in Description of Data Input then the mass action expression for each aqueous species of the redox element is rewritten to remove the activity of the electron from the expression and replace it with the activities of the redox couple For example if iron Fe is to be distributed using the sulfate sulfide redox couple S 6 S 2 then the original chemical reaction for Fe Foe aa 86 would be rewritten using the association reaction for sulfide SO 9H 8e HS 4H 0 87 to produce the following chemical reaction that does not include electrons 2 1 2 914 3 1 1 1 Fe 85 eH Fe HS 5420 88 The mass action expression for this final reaction would be used as the mass action expres
474. r for geochemical reactions in ground water U S Geological Survey Water Resources Investigations Report 82 14 29 p Parkhurst D L Thorstenson D C and Plummer L N 1980 PHREEQE A computer program for geochemical calculations U S Geological Survey Water Resources Investigations Report 80 96 195 p Revised and reprinted August 1990 Pitzer K S 1979 Theory Ion interaction approach in R M Pytkowicz ed Activity Coefficients in Electrolyte Solutions v 1 CRC Press Inc Boca Raton Florida p 157 208 Plummer L N 1984 Geochemical modeling A comparison of forward and inverse methods in Hitchon B and Wallick E I eds First Canadian American Conference on Hydrogeology Practical Applications of Ground Water Geochemis try Worthington Ohio National Water Well Association p 149 177 Plummer L N and Back W W 1980 The mass balance approach Application to interpreting the chemical evolution of hydrologic systems American Journal of Science v 280 p 130 142 Plummer L N Busby J F Lee R W and Hanshaw B B 1990 Geochemical modeling of the Madison aquifer in parts of Montana Wyoming and South Dakota Water Resources Research v 26 p 1981 2014 Plummer L N and Busenberg Eurybiades 1987 Thermodynamics of aragonite strontianite solid solutions Results from stoichiometric dissolution at 25 and 76 C Geochimica et Cosmochimica Acta v 51 p 1393 1411 Plummer L N Parkhurst D L Fleming
475. r a rate expression Note that the HNta 2 rate expression generates a negative rate so that coefficients in the formula that are positive remove elements from solution and coefficients that are negative add elements to solution In general if the product of the rate and the coefficient is positive the element is entering solution and if the product is negative the element is leaving solution The biomass reaction adds H 0 0 or no moles of hydrogen which specifies that the kinetic reaction for biomass growth does not add or remove elements from solution The assimilation of carbon and nutrients that is associated with biomass growth is ignored in this simulation The SELECTED_OUTPUT data block causes the molalities of the aqueous species Nta 3 CoNta HNta 2 and Co 2 to be written to the file ex 5 sel To each line in the file the USER PUNCH data block appends the time in hours the sorbed concentrations converted to mol g sediment and the biomass The first TRANSPORT data block defines the first 20 hours of the experiment during which Nta and cobalt are added at the column inlet The column is defined to have 10 cells cells of length 1 m length The duration of the advective dispersive transport simulation is 20 time steps shifts of 3600 seconds time_step The direction of flow is forward flow_direction Each end of the column is defined to have a flux boundary condition boundary_condition The dispersivity is 0 05 m dispe
476. r designating the charge Either of the following is acceptable Al 3 or Al However Al3 would be interpreted as a molecule with three aluminum atoms and a charge of plus one Valence states Redox elements that exist in more than one valence state in solution are identified for definition of solution composition by the element name followed by the formal valence in parentheses Thus sulfur that exists as sulfate is defined as S 6 and total sulfide H2S HS and others is identified by S 2 log K and temperature dependence The identifier log_k is used to define the log K at 25 C for a reaction The temperature dependence for log K may be defined by the van t Hoff expression or by an analytical expression The identifier delta_h is used to give the standard enthalpy of reaction at 25 C for a chemical reaction which is used in the van t Hoff equation By default the units of the standard enthalpy are kilojoules per mole kJ mol Optionally for each reaction the units may be defined to be kilocalories per mole kcal mol An analytical expression for the temperature dependence of log K for a reaction may be defined with the analytical_expression identifier Up to five numbers may be given which are the coefficients for the equation A A log K A A T Aglog p7 where T is in Kelvin A log K must always be defined either with T log_k or analytical_expression the enthalpy is optional If both are present an analyt
477. r of steps defined in any of the following keyword data blocks KINETICS REACTION and REACTION_TEMPERATURE When the maximum number of steps is greater than the number of steps defined in KINETICS then if INCREMENTAL_REACTIONS is false cumulative reaction steps the reactions are integrated for the time specified by the final time step for each of the additional steps if INCREMENTAL_REACTIONS is true incremental reaction steps kinetic reactions are not included in the additional steps Example problems The keyword KINETICS is used in example problems 6C 9 and 15 Related keywords ADVECTION PHASES RATES REACTION and TRANSPORT 110 User s Guide to PHREEQC Version 2 KNOBS This keyword data block is used to redefine parameters that affect convergence of the numerical method during speciation batch reaction and transport calculations It also provides the capability to produce long uninterpretable output files Hopefully this data block is seldom used Example data block Line 0 KNOBS Line 1 iterations 150 Line 2 convergence tolerance 1e 8 Line 3 tolerance le 14 Line 4 step size 10 Line 5 pe step size 5 Line 6 diagonal_scale TRUE Line 7 debug diffuse layer TRUE Line 8 debug inverse TRUE Line 9 debug model TRUE Line 10 debug prep TRUE Line 11 debug set TRUE Line 12 logfile TRUE Explanation Line 0 KNOBS KNOBS is the keyword for the data block Optionally
478. r pore volume 5 shifts All printing to the selected output file can be switched on or off through the selected_output identifier of the keyword PRINT Most of the information for advection calculations must be entered with other keywords This advection calculation assumes that solutions with numbers 0 through 5 have been defined using the SOLUTION or SAVE data blocks Solution 0 is the infilling solution and solutions 1 through 5 are the initial solutions in the cells of the column Other reactants may be defined for each of the cells Pure phase assemblages may be defined with EQUILIBRIUM_PHASES or SAVE with the number of the assemblage corresponding to the cell number Likewise an exchange assemblage gas phase solid solution assemblage or surface assemblage can be defined for each cell through EXCHANGE GAS_PHASE SOLID_SOLUTIONS SURFACE or SAVE data blocks with the identifying number corresponding to the cell number Note that ranges of numbers can be used for example SOLUTION 1 5 to define multiple solutions pure phase assemblages exchange assemblages gas phases solid solution assemblages or surface assemblages and that SAVE allows a range of numbers to be used The REACTION data block can be used to define a stoichiometric reaction that applies to a cell at each shift with the reaction number corresponding to the cell number This capability is not very useful because it represents only zero order kinetics the reaction rate is c
479. r the sequence of calculations which occur in the following order 1 At the beginning of the run the database file is read The database file usually defines the elements and mass action expressions for all of the aqueous species and phases Definition of species for exchangers and surfaces and rate expressions may also be included in this file 2 A simulation is read from the input data file 3 Any initial solution calculations are performed 4 Any initial exchange composition calculations are performed 5 Any initial surface composition calculations are performed 6 Any initial gas phase composition calculations are performed 7 Any batch reactions mixing irreversible reaction mineral equilibration and others are performed 8 Any inverse modeling calculations are performed 9 Any advective reactive transport calculations ADVECTION keyword are performed And 10 any advective dispersive reactive transport calculations TRANSPORT keyword are performed The sequence from 2 through 10 is repeated until the end of the input file is encountered The subroutines that perform tasks 3 through 7 are found in the file mainsubs c The subroutines to perform inverse modeling 8 are found in inverse c to perform advective reactive transport modeling 9 are found in advection c and to perform dispersive diffusive reactive transport modeling 10 are found in transport c The file read c is used to read both the database file and the
480. ransferred of the reactant Optionally kin k inetics kinetic_reactants or k inetic_reactants Note the hyphen is required to avoid a conflict with the keyword KINET ICS reactant list List of kinetically controlled reactants The list may continue on subsequent line s Each reactant is identified by the rate name in the KINETICS data block The rate name in turn refers to a rate expression defined with RATES data block After each calculation the moles and the moles transferred of each of the kinetically controlled reactants will be written to the selected output file If the reactant is not defined the amount will be printed as 0 Line 28 solid_solutions component list solid_solutions Identifier allows definition of a list of solid solution components for which the moles in a solid solution is written to the selected output file Optionally so lid_solutions Note the hyphen is required to avoid a conflict with the keyword SOLID_SOLUTIONS component list List of solid solution components The list may continue on subsequent line s Each component is identified by the component name defined in the SOLID_SOLUTIONS data block The component names are also phase names which have been defined in the PHASES data block After each calculation the moles of each solid solution component in the list will be written to the selected output file If the component is not defined in any of the solid solutions the amount will be printed
481. rded equal to Na No dispersion m 2 s O e e e Attachment C Input File To Investigate the Order of the Numerical Method For Example 12 311 sti pu SELE mest 1 0e 10 nch_cell 1 60 CTED_OUTPUT high precision user punch true reset dist temp END false true true true 317 years Print comparison with analytical solution for Cl and Na in 20 cell and 60 cell models SOLUTION PRINT reset false user print true h precision false Distance 0 TO 8 PAS SELECTED_OUTPUT hig USER PRINT 10 PRINT 20 PRINT 30 PRINT 40 PRINT 50 FOR j 60 PRINT 70 NEXT j END G A calculation is needed to invo Initial solution calculation no ke USI Initial solution calculation for pure water ER PRINT t pri nted Controls precision for USER_PRINT too Error in Cl concentration Error in Na concentration 312 User s Guide to PHREEQC Version 2 20 cell 60 cell 20 c ell 60 cell ET 4 Jj 2
482. red in the specified order and it is sometimes possible to omit intervening fields For clarity commas are used to delimit input fields in the explanations of data input however commas are not allowed in the input data file only white space spaces and tabs may be used to delimit fields in input data sets Where applicable default values for input fields are stated Getting Started When the program PHREEQC is invoked two files are used to define the thermodynamic model and the types of calculations that will be done the database file and the input file The database file is read once to the end of the file or until an END keyword is encountered at the beginning of the program The input file is then read and processed simulation by simulation as defined by END keywords until the end of the file The formats for the keyword data blocks are the same for either the input file or the database file The database file is used to define static data for the thermodynamic model Although any keyword data block can occur in the database file normally it contains the keyword data blocks EXCHANGE_MASTER_SPECIES EXCHANGE_SPECIES PHASES RATES 68 User s Guide to PHREEOcC Version 2 SOLUTION_MASTER_SPECIES SOLUTION_SPECIES SURFACE_MASTER_SPECIES and SURFACE_SPECIES These keyword data blocks define rate expressions master species and the stoichiometric and thermodynamic properties of all of the aqueous phase species exchange species surface
483. retardation factors are the same The temperature and the Na concentration are equal to at least 6 digits in the PHREEQC selected output file which indicates that the algorithm for the chemical transport calculations is correct for the simplified chemistry considered in this example A further check on the accuracy is obtained by comparing simulation results with an analytical solution For an infinite column with C 0 for t 0 and diffusion from x 0 with Cy_ Cy for t gt 0 the analytical solution is EXAMPLES 245 x Cop la 160 where D is the effective diffusion coefficient The PHREEQC results are compared with the analytical solution for Cl and for temperature and Na in figure 12 and show excellent agreement Notice that diffusion of CT from the column ends has not yet touched in the mid section so that the column is still effectively infinite and the analytical solution is appropriate Although both ends of the column started with the same temperature and concentration x O is maintained at the same temperature and concentrations because of the constant boundary condition The temperature and concentrations have decreased in cell 20 plotted at the midpoint of the cell x 19 5 because of the closed boundary condition that was applied at x 20 no flux of heat or mass through this boundary is allowed and the temperature and concentrations are diminishing because of diffusion into the column The sodium concentra
484. rge Y Cm p MA 37 where SI aia 1s the target saturation index for the phase and In 10 converts base 10 log to natural log The target saturation index is specified by the user a positive zero or negative value specifies supersaturation equi librium or undersaturation for the mineral with respect to the solution For fixed partial pressure gas component SI p target 5 equivalent to the log of the partial pressure of the gas component The total derivative with respect to the master unknowns is Mag df cm yll 38 m For data input to PHREEOC the mass action eguations eguilibrium constant and temperature dependence of the constant for a pure phase are defined with the PHASES data block Initial composition of a pure phase assemblage and target saturation indices are defined with the EOUILIBRIUM PHASES data block Eguilibrium with Solid Solutions Modeling of ideal multicomponent or nonideal binary solid solutions is based on the work of Glynn Glynn and Reardon 1990 Glynn and others 1990 Glynn 1991 Glynn and Parkhurst 1992 Eguilibrium between the agueous phase and solid solutions is included in the model through heterogeneous mass action eguations PHREEOC allows multiple solid solutions termed a solid solution assemblage to exist in eguilibrium with the agueous phase subject to the limitations of the Gibbs Phase Rule Modeling of nonideal solid solutions is limited to two component binary solid solutions ideal
485. rite dissolution 50 Calculate the moles of pyrite dissolution over time interval given by TIME 60 Limits pyrite dissolution to remaining moles of pyrite 200 Return moles of reaction for time subinterval with SAVE A SAVE statement must always be present in a rate pro gram 126 User s Guide to PHREEQC Version 2 Table 8 Special Basic statements and functions for PHREEQC Special PHREEQC Statement or Function ACT HCO3 ALK CELL_NO CHARGE BALANCE DIST EOUI Calcite EXISTS i i2 GAS CO2 g GET i i2 KIN CH20 LA HCO3 LM HCO3 M MO MISC1 Ca x Sr 1 x SO4 MISC2 Ca x Sr 1 x SO4 MOL HCO3 MU PARM i PERCENT_ERROR PRINT PUNCH PUT x 1 i2 RXN SAVE SI Calcite SIM NO Explanation Activity of an agueous exchange or surface species Alkalinity of solution Cell number in TRANSPORT or ADVECTION calculations Agueous charge balance in eguivalents Distance to midpoint of cell in TRANSPORT calculations cell number in ADVECTION calculations 99 in all other calculations Moles of a phase in the pure phase eguilibrium phase assemblage Determines if a value has been stored with a PUT statement for the list of one or more subscripts The function equals 1 if a value has been stored and 0 if no value has been stored Values are stored in global storage with PUT and are accessible by any Basic program See description of PUT for mor
486. rmula weight for water approximately 0 018 kg mol W ao is the mass of water in aqueous solution g cy y is the stoichiometric coefficient of water in aqueous redox reaction r and 2 CHO p 1s the stoichiometric coefficient of water in the dissolution reaction for phase p Charge Balance Equation The charge balance equations for the aqueous solutions constrain the unknown s to be such that when the 9 s are added to the original data charge balance is produced in each aqueous solution The charge balance equation for an aqueous solution is EA a TL g 137 m where T is the charge imbalance in aqueous solution g calculated by a speciation calculation and Z is defined to be the charge on the master species plus the alkalinity assigned to the master species Zm mt Pal k m For alkalinity Z 41 18 defined to be 1 0 The summation ranges over all elements or element valence states and includes a term for alkalinity just as charge balance is commonly calculated by summing over cationic and anionic elements plus a contribution from alkalinity In the definition of Z the alkalinity of the master species is added to the charge for that master species to remove the equivalents for the element or element redox state that are already accounted for in the alkalinity For example the contribution of carbonate species in equation 137 is zero with this definition of Z z 2 2 0 all of the charge contribu 2 b C O
487. rsivity and the diffusion coefficient is set to zero diffusion_coef Data are written to the selected output file only for cell 10 punch_cells after each shift punch_frequency Data are written to the output file only for cell 10 print_cells after every five shifts print_frequency After the first advective dispersive transport simulation a new infilling solution is defined SOLUTION 0 which contains no Nta or cobalt For the associated initial solution calculation printing to the selected output file is eliminated and then reinstated selected_out false and selected_out true in PRINT data blocks Finally the second TRANSPORT data block defines the final 55 hours of the experiment during which Nta and cobalt are not present in the infilling solution All parameters are the same as in the previous TRANSPORT data block only the number of advection steps shifts is increased to 55 Table 44 Input data set for example 15 TITLE Example 15 1D Transport Kinetic Biodegradation Cell Growth and Sorption KKKKKKKKKAKAK PLEASE NOTE This problem reguires database file ex15 dat KKKKKKKKKKK SOLUTION 0 Pulse solution with Nta and cobalt units umol L pH 6 G 49 O 0 6255 Nta 52 3 264 User s Guide to PHREEOcC Version 2 Co 5 23 Na 1000 cl 1000 END SOLUTION 1 10 Background solution initially filling column 1 20 units umol L pH 6 C 49 o 0 6
488. rst reaction step is equal to temp temperatures in the remaining steps changes in n 1 equal increments If n reaction steps are defined with in n in a REACTION data block then the reaction is added in n equal increments In an advective transport calculation ADVECTION if REACTION TEMPERATURE n is defined or a range is defined n m and n is less than or equal to the number of cells in the simulation then the first temperature in the data block of REACTION TEMPERATURE n is used as the temperature in cell n or cells n m for all shifts in the advective transport calculation In advective dispersive transport simulations TRANSPORT the initial eguilibration also occurs at the first temperature of REACTION TEMPERATURE n in cell n However depending on the setting of temperature retardation factor an exchange of heat may take place that will cause the temperature of the cell to change as the advective dispersive transport calculation progresses Example problems The keyword REACTION TEMPERATURE is used in example problem 2 Related keywords ADVECTION KINETICS TRANSPORT and REACTION 134 User s Guide to PHREEQC Version 2 SAVE This keyword data block is used to save the composition of a solution exchange assemblage gas phase pure phase assemblage solid solution assemblage or surface assemblage following a batch reaction calculation The composition is stored internally in computer memory and can be retrieved subsequent
489. rthermore comparisons with other carbon 14 ages in the aquifer and with ground water flow model ages also indicate that the older end of the age range is more reasonable REFERENCES CITED Aagaard P and Helgeson H C 1982 Thermodynamic and kinetic constraints on reaction rates among minerals and aqueous solutions I theoretical considerations American Journal of Science v 282 p 237 285 Allison J D Brown D S and Novo Gradac K J 1990 MINTEQA2 PRODEFA2 A geochemical assessment model for envi ronmental systems version 3 0 user s manual Environmental Research Laboratory Office of Research and Develop ment U S Environmental Protection Agency Athens Georgia 106 p Appelo C A J 1994a Cation and proton exchange pH variations and carbonate reactions in a freshening aquifer Water Resources Research v 30 p 2793 2805 Appelo C A J 1994b Some calculations on multicomponent transport with cation exchange in aquifers Ground Water v 32 p 968 975 Appelo C A J Beekman H E and Oosterbaan A W A 1984 Hydrochemistry of springs from dolomite reefs in the southern Alps of Northern Italy International Association of Hydrology Scientific Publication 150 p 125 138 Appelo C A J and Postma D 1999 A consistent model for surface complexation on birnessite MnO and its applica tion to a column experiment Geochimica et Cosmochimica Acta v 63 p 3039 3048 Appelo C A J and Postma D 1993 Geoche
490. s 50 User s Guide to PHREEOcC Version 2 where D is the diffusion coefficient in the sphere m s a is the radius of the sphere m and f _ is a shape factor for sphere to first order model conversion unitless Other geometries can likewise be transformed to a value for amp using other shape factors Van Genuchten 1985 These shape factors are given in table 1 An analytical solution is known for a pulse input in a medium with first order mass transfer between mobile and stagnant water Van Genuchten 1985 Toride and others 1993 example 13 defines a simulation that can be compared with the analytical solution A 2 m column is discretized in 20 cells of 0 1 m The resident solution is 1 mM KNO in both the mobile and the stagnant zone An exchange complex of 1 mM is defined and exchange coefficients are adapted to give linear retardation R 2 for Na A pulse that lasts for 5 shifts of 1 mM NaCl is followed by 10 shifts of 1 mM KNO3 The Cl R 1 and Na R 2 profiles are calculated as a function of depth 0 1 vm 0 1 3600 2 778e 5 m s and a 0 015 m The stagnant zone consists of spheres with radius a 0 01 m diffusion coefficient D 3 e 10 m s and a shape factor The transport variables are du 0 3 0 im foi 9 21 This gives an exchange factor 0 6 8e 6 s In the PHREEQC input file a 6 and 0 must be given m R m and R are calculated implicitly by PHREEQC through the geochemical reacti
491. s Entities can be defined implicitly a solution or mixture SOLUTION or MIX keywords must be defined within the simulation then the first of each kind of entity defined in the simulation will be used to define the reaction system Thus the first solution or mixture will be brought together with the first of each of the following entities that is defined in the simulation exchange assemblage EXCHANGE gas phase GAS_PHASE pure phase assemblage EOUILIBRIUM PHASES solid solution assemblage SOLID SOLUTIONS surface assemblage SURFACE equilibrium among these entities will be calculated and maintained Irreversible reactions may also be added implicitly to the system and again the first of the following entities that is defined in the simulation is added kinetically controlled reaction KINETICS stoichiometric reaction REACTION and reaction temperature REACTION TEMPERATURE DESCRIPTION OF DATA INPUT 181 Entities to be included in the system can be defined explicitly with the USE keyword Any combination of USE keyword number data blocks can be used to define a system USE keyword none can be used to eliminate an entity that was implicitly defined to be in the system For example if only a solution and a surface are defined in a simulation and the surface is defined to be in equilibrium with the solution then implicitly an additional batch reaction calculation will be made to equilibrate the solution with the surface Thoug
492. s water Indicates mass of water is entered on this line Molalities of solutes are calculated from input concentrations and the moles of solutes are determined by the mass of water in solution Option ally water or w ater mass Mass of water in the solution kg Default is 1 kg Notes The order in which the lines of SOLUTION input are entered is not important Specifying both as and gfw within a single line is not allowed Specifying both charge and a phase name within a single line is not allowed Specifying the concentration of a valence state or an element concentration twice is not allowed For example specifying concentrations for both total Fe and Fe 2 is not allowed because ferrous iron is implicitl y defined twice Alkalinity or total carbon or both may be specified in solution input If both alkalinity and total carbon are specified the pH is adjusted to attain the specified alkalinity If the units of alkalinity are reported as calcium carbonate the correct formula to use is as Ca0 5 CO3 0 5 because the gram equivalent weight is 50 04 which corresponds to one half the formula CaCO3 However to avoid frequent errors if as CaCO3 is entered the value of 50 04 will still be used as the equivalent weight All concentrations defined in the SOLUTION data block are converted into molality The absolute number of moles is usually numerically equal to the molality because a kilogram of solvent water is
493. s However the m qt equations can be linearized with the awai Em q Agm q 145 The mole balance t now become P R Eer Cat ma a Dy a Zm oe r amp r 0 146 p r a alkalinity van eguation can be written as Q e Alk gt aC Alk at LAI p amp p LC Auk ro b 147 q p F The sn eguation is unchanged The charge balance eguation can be rewritten into Yann gt YT y 0 148 The water balance eguation is unchanged The isotope balance eguation 139 is P i 0 PE ng iG e Rn nate oF meg Yle JA yt p ri 149 P The n among carbon 4 pH and alkalinity is 58 User s Guide to PHREEQC Version 2 dAlk Alk talk q aC c a t OpH pHa 150 and lastly the inequality constraints become ql lt Ang 151 All of these equality and inequality equations are linear in the unknowns and and once the values of all of the a and are known the values of the uncertainty terms 6 can be determined This formulation of the inverse modeling problem produces a series of linear eguality and ineguality constraints which are solved with the algorithm developed by Barrodale and Roberts 1980 Their algorithm performs an L1 optimization minimize sum of absolute values on a set of linear equations subject to equality and ineguality constraints The problem can be posed with the following matrix eguations AX B CX D 152 EX lt F The first matrix eguation is minimized in the se
494. s Indicates default concentration units are entered on this line Optionally u nits concentration units Default concentration units Three groups of concentration units are allowed concentration 1 per liter L 2 per kilogram solution kgs or 3 per kilogram water kgw All concentration units for a solution must be within the same group Within a group either grams or moles may be used and prefixes milli m and micro u are acceptable Parts per thousand ppt parts per million ppm and parts per billion ppb are acceptable in the per kilogram solution group Default is mmol kgw millimoles per kilogram water Line 6 density density density Indicates density is entered on this line Optionally dens or d ensity density Density of the solution kg L equals g cm Default is 1 0 The density is used only if the input concentration units are per liter Line 7 element list concentration units as formula or gfw gfw redox couple charge or phase name saturation index 150 User s Guide to PHREEOc Version 2 element list An element name or a list of element valence states separated by white space see line 7d The element names and valence states must correspond to the items in the first column in SOLUTION_MASTER_SPECIES concentration Concentration of element in solution or sum of concentrations of element valence states in solution units Concentration
495. s Guide to PHREEQC Version 2 the pH is 8 28 the pe is low 4 94 because of equilibrium with pyrite and gypsum is six orders of magnitude undersaturated saturation index 6 13 As oxygen and sodium chloride are added pyrite oxidizes and goethite being relatively insoluble precipitates This reaction generates sulfuric acid decreases the pH slightly increases the pe and causes calcite to dissolve and carbon dioxide to be released At some point between 10 and 50 mmol of oxygen added gypsum reaches saturation and begins to precipitate When 50 mmol of oxygen and 25 mmol of sodium chloride have been added a total of 9 00 mmol of gypsum has precipitated Example 6 Reaction Path Calculations In this example the precipitation of phases as a result of incongruent dissolution of K feldspar microcline is investigated Only a limited set of phases K feldspar gibbsite kaolinite and K mica muscovite is considered in this example The reaction path for this set of phases was originally addressed by Helgeson and others 1969 In this example the thermodynamic data for the phases table 21 PHASES keyword are derived from Robie and others 1978 and are the same as test problem 5 in the PHREEQE manual Parkhurst and others 1980 PHREEQC can be used to solve this problem in three ways the individual intersections of the reaction path and the phase boundaries on a phase diagram can be calculated example 6A the reaction path can be cal
496. s as the previous transport example Again the conservative solute Cl with R 1 is modeled accurately for all three grid sizes The retarded chemical Na R 2 5 shows numerical dispersion for the coarser grids but again the average front locations agree With the constant concentration boundary condition the number of dispersion time steps is twice the number for the flux case because of the specified condition at x 0 Also the effect of the first type boundary condition is to increase diffusion over the contact surface of the column with the outer solution The flux of chemical over the boundary is correspondingly larger and the fronts have progressed a few meters further than in figure 2 More comparisons of analytical solutions are given in the discussion of example 11 breakthrough at the outlet of a column and example 12 diffusion from a constant source 1 0 ES OE j i Ee Na 15 m cells lt gt CI 15 m cells 0 8 ES O Na 5 m cells a O CI 5 m cells O Na 1 67 m cell oc x x Cl 1 67 m cell LU J E 0 6 L Q Na analytical solution m gt Cl analytical solution LU A A tu 0 4 F a O 2 i 0 2 o H N L 0 0 20 0 40 0 60 0 80 0 100 0 120 0 140 0 DISTANCE IN METERS Figure 3 Analytical solution for 1D transport with ion exchange reactions and constant boundary condition compared with PHREEGC calculations at various grid spacings Transport of Heat Conserva
497. s for each aqueous species are defined through the SOLUTION_SPECIES data block Master species for elements and element valence states are defined with the SOLUTION_MASTER_SPECIES data block Composition of a solution is defined with the SOLUTION or SOLUTION_SPREAD data block see Description of Data Input Exchange Species Ion exchange equilibria are included in the model through heterogeneous mass action equations and mole balance equations for exchange sites PHREEQC allows multiple exchangers termed an exchange assemblage to exist in equilibrium with the aqueous phase The approach uses mass action expressions based on half reactions between aqueous species and a fictive unoccupied exchange site Appelo and Postma 1993 for each exchanger This unoccupied exchange site is the master species for the exchanger and the log of its activity is an additional master unknown Its identity is defined with EXCHANGE_MASTER_SPECIES data block see Description of Data Input However the master species is not included in the mole balance equation for the exchanger forcing its physical concentration to be zero Its activity is also physically meaningless but is such that all of the exchange sites are filled by other exchange species The unknowns for exchange calculations are the activity a which is defined to be the equivalent fraction in PHREEQC times an activity coefficient y E and the moles Nj gt of each exchange species i a of
498. s is 0 0 Default is 0 0 Notes This example data block assumes that Surf w and Surf s are defined in a SURFACE MASTER SPECIES data block Lines 1 and 2 may be repeated as necessary to define all of the surface reactions An identity reaction is needed to define each master surface species lines 1a and 1c in this example data block The log K for the identity reaction must be 0 0 lines 2a and 2c in this example data block This example data block assumes that Surf w and Surf s are defined in a SURFACE MASTER SPECIES data block An underscore plus one or more lowercase letters is used to define different binding sites for the same surface In the example data block association reactions for a strong and a weak binding site are defined for the surface named Surf Multiple surfaces may be defined simply by defining multiple master surface species for example Surfa Surfb and Surfc Multiple binding sites can be defined for each surface by using an underscore followed by one or more lower case letters Association reactions for each surface and binding site must be defined with SURFACE SPECIES input 170 User s Guide to PHREEQC Version 2 Temperature dependence of log K can be defined with enthalpy of reaction identifier delta_h and the van t Hoff equation or with an analytical expression analytical_expression See SOLUTION_SPECIES or PHASES for examples The identifier no_check can be used to disable checking charge and elementa
499. s simulation is included with the TITLE keyword The SOLUTION data block defines the composition of seawater Note that 196 User s Guide to PHREEQC Version 2 valence states are identified by the chemical symbol for the element followed by the valence in parentheses S 6 N 5 N 3 and O 0 The pe to be used for distributing redox elements and for calculating saturation indices is specified by the redox identifier In this example a pe is to be calculated from the O 2 0 0 redox couple which corresponds to the dissolved oxygen water couple and this calculated pe will be used for all calculations that require a pe If redox were not specified the default would be the input pe The default redox identifier can be overridden for any redox element as demonstrated by the manganese input where the input pe will be used to speciate manganese among its valence states and the uranium input where the nitrate ammonium couple will be used to calculate a pe with which to speciate uranium among its valence states The default units are specified to be ppm in this data set units identifier This default can be overridden for any concentration as demonstrated by the uranium concentration which is specified to be ppb instead of ppm Because ppm is a mass unit not a mole unit the program must use a gram formula weight to convert each concentration into molal units The default gram formula weights for each master species are specified in the SOLUTI
500. s would have occurred in the simulation even if the REACTION keyword had specified that no water was to be removed The only way to prevent complete equilibration of the nitrogen redox states would be to define the individual redox states as separate SOLUTION_MASTER_SPECIES and SOLUTION_SPECIES for example by defining a new element in SOLUTION MASTER SPECIES called Amm and defining NH and other N 3 species in terms of Amm AmmH3 AmmH and others In this case equilibrium would be attained among all species of N and all species of Amm but no equilibria would exist between N and Amm species Example 5 Irreversible Reactions This example demonstrates the irreversible reaction capabilities of PHREEQC in modeling the oxidation of pyrite Oxygen 0 3 and NaCl are added irreversibly to pure water in five varying amounts 0 0 1 0 5 0 10 0 and 50 0 mmol the relative proportion of O to NaCl in the irreversible reaction is 1 0 to 0 5 Pyrite calcite and goethite are allowed to dissolve to equilibrium and carbon dioxide partial pressure is maintained at 1025 atmospheric partial pressure In addition gypsum is allowed to precipitate if it becomes supersaturated Table 19 Input data set for example 5 TITLE Example 5 Add oxygen equilibrate with pyrite calcite and goethite SOLUTION 1 PURE WATER pH 7 0 temp 25 0 EQUILIBRIUM_PHASES 1 Pyrite Goethite Calcite CO2 g w O O O OO O
501. se time Prints to the selected output file 1 the cumulative model time since the beginning of the simu lation for batch reaction calculations with kinetics 2 the cumulative transport time since the beginning of the run or since initial_time identifier was last defined for advective dispersive transport calculations and advective transport calculations for which time_step is defined 3 the advection shift number for advective transport calculations for which time_step is not defined or 4 99 for other calculations if value is true excludes print if value is false Default is true Initial value at start of program is true Optionally time or ti me Line 11 step True or False step Prints to the selected output file 1 advection shift number for transport calculations 2 reaction step for batch reaction calculations or 3 99 for other calculations if value is true excludes print if value is false Default is true Initial value at start of program is true Optionally step or ste p Line 12 pH True or False pH Prints pH to each line of the selected output file if value is true excludes print if value is false Default is true Initial value at start of program is true Optionally pH case insensitive Line 13 pe True or False pe Prints pe to each line of the selected output file if value is true excludes print if value is false Default is true Initial value at start of program is true Opt
502. se modeling One and only one line of headings must be entered Line 11 subheadings subheadings Subheadings are used to specify element specific units redox couples and concentra tion determining phases Anything entered following the second data item of line 7 of the SOLU TION data block can be entered on this line including as gfw redox couple or phase name and saturation index Tabs not spaces must delimit the columns data within a column must be space delimited Subheadings are optional At most one line of subheadings can be entered directly fol lowing the line of headings and it is identified as a line in which all fields begin with a character Line 12 chemical data chemical data Analytical data one line for each solution For most columns the data are equivalent to the second data item of line 7 of the SOLUTION data block Tabs not spaces must delimit the columns Solution numbers or ranges of numbers are defined in a column with the heading num ber default numbering begins sequentially from 1 or sequentially from the largest solution num ber that has been defined by any SOLUTION SOLUTION_SPREAD or SAVE data block in this or any previous simulation Descriptive information can be entered in a column with the head ing description One Line 12 is needed for each solution Notes SOLUTION_SPREAD is a complete equivalent to the SOLUTION data block that allows data entry in a tabular or spreadsheet format In general c
503. sion for the species F en and the differential for the change in the moles of F er a dn 43 would also be based on this mass action expression However the original mass action expression based on eguation 86 is used to determine the mole balance eguations in which the term d nn appears that is the species F o would appear in the mole bal ance eguation for iron but not in the mole balance eguations for S 6 or S 2 The effect of these manipulations is that ferrous iron ferric iron sulfate and sulfide are in redox eguilibrium Another set of redox elements for NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING 35 example oxygen and nitrogen may also be defined to be in equilibrium among themselves but not necessarily in redox equilibrium with iron and sulfur By default if a saturation index calculation requires a value for pe or activity of the electron then the input pe is used If a default redox couple has been defined redox then the dissolution reaction for the phase is rewritten as above to eliminate the activity of the electron and replace it with the activities of the redox couple The set of master unknowns may change for redox elements during a calculation The process which is termed basis switching occurs if the activity of the master species which is the master unknown for a mole balance equation becomes ten orders of magnitude smaller than the activity of another master species included in the same mole
504. sistent with the uncertainty limits will be calculated A series of identifiers sub keywords preceded by a hyphen specify the characteristics of the inverse model Table 48 Input data set for example 16 TITLE Example 16 Inverse modeling of Sierra springs SOLUTION_SPREAD units mmol L Xt indicates tab Number t pH t Si t Ca t Mg t Na t K t Alkalinity t S 6 Yt CL ING 6 2Xt 0 273 t 0 078 t 0 029 t 0 134 t 0 028 t 0 328 t 0 01 t 0 014 2 t 6 8 t 0 41 Xt 0 26 Xt 0 071Xt 0a 2 5 ONE 0 04 Xt 0 895 t 0 025 t 0 03 INVERSE_MODELING 1 solutions 1 2 uncertainty 0 025 balances Ca 0 05 0 025 phases Halite Gypsum Kaolinite precip Ca montmorillonite precip CO2 g Calcite Chalcedony precip Biotite dissolve Plagioclase dissolve range PHASES Biotite KMg3A1Si3010 0OH 2 6H 4H20 K 3Mg 2 Al OH 4 3H4Si04 log_k 0 0 No log_k Inverse modeling only Plagioclase a0 62Ca0 38A11 38Si2 6208 5 52 H 2 48H20 0 62Na 0 38Ca 2 1 38A1 3 2 62H4Si04 log_k 0 0 No log_k Inverse modeling only END The identifier solutions selects the solutions to be used by solution number Two or more solution numbers must be listed after the identifier If only two solution numbers are given the second solution is assumed to evolve from the first solution If more than two solution numbers are given the last solution listed is assumed to evolve from a mixture of the preceding solu
505. sites are defined with the EXCHANGE_MASTER_SPECIES data block and exchange species are defined with the EXCHANGE_SPECIES data block see Description of Data Input Mole Balance for Alkalinity The mole balance equation for alkalinity is used only in speciation calculations and in inverse modeling Mole balance for alkalinity is a special case of the general mole balance equation where the coefficients are defined by the alkalinity contribution of each aqueous species Alkalinity is defined as an element in PHREEQC and a master species is associated with this element see SOLUTION_MASTER_SPECIES keyword in Description of Data Input In the default databases for PHREEQC the master species for alkalinity is C a The master unknown for alkalinity is Ina Alk OF for the default databases Ina y The total number of eguivalents of alkalinity is specified by input to the model The sum of the alkalinity contribution of each agueous species must egual the total number of eguivalents of alkalinity The following function is derived from the alkalinity balance eguation N aq fan Tan Y Pam iti 55 i where the value of the function f4 is zero when mole balance is achieved Tj is the number of equivalents of alkalinity in solution and by is the alkalinity contribution of the aqueous species i eg mol The total deriva tive of fag 18 Nag df Aik Y Barx iMi 56 i The value of T must be positive provided a car
506. sition aqueous phase The thermodynamic properties of the gas components are defined with PHASES input Lin Lin Lin Lin Lin Lin Lin Lin Lin 0 0 D D D D od oO D Example data block 1 Fixed pressure gas phase GAS PHASE 1 5 Air fixed pressure pressure volume temperature CH4 g CO2 g 02 g N2 g 1 0 1 0 25 0 0 0 0 000316 0 2 0 78 Explanation 1 Line 0 GAS_PHASE number description Line 1 fixed_pressure Line 2 pressure pressure Line 3 volume volume GAS_PHASE is the keyword for the data block number Positive number to designate the following gas phase and its composition A range of numbers description Optional comment that describes the gas phase and transport calculations Optionally pressure or p ressure two numbers are separated by a hyphen without intervening spaces Default is 1 bubble A fixed pressure gas phase is the default if neither the fixed_pressure nor the fixed_volume identifier is used Optionally fixed_pressure or fixed_p ressure pressure The pressure of the gas phase in atmospheres Default is 1 0 atm DESCRIPTION OF DATA INPUT may also be given in the form m n where m and n are positive integers m is less than n and the fixed_pressure Identifier defining the gas phase to be one that has a fixed total pressure that is a gas pressure Identifier defining the fixed pressure of the gas phase that applies during all batch re
507. solution ju Gn 8 5 AgurpSign Xy Da 74 l DS E n A where X e f X 1 s is the value of X at the outer Helmholtz plane A surfis the surface area m sign Xg 1 is 1 or 1 depending on the sign of the term in parentheses i is the aqueous species for which the surface excess is being calculated z is the charge on aqueous species i ranges over all aqueous species my is the molality and z is the charge of aqueous species and amp RT Aa The value of amp at 25 C is 0 02931 L mol 2 C m The relation between the unknown X used by Borkovec and Westall 1983 and the master unknown used by PHREEQC is dy X The development of Borkovec and Westall 1983 calculates only the total excess concentration in the diffuse layer of each aqueous species A problem arises in batch reaction and transport modeling when a solution is removed from the surface for example in an advection simulation when the water in one cell advects into the next cell In this case the total moles that remain with the surface need to be known In PHREEQC an arbitrary assumption is made that the diffuse layer is a specified thickness and that all of the surface excess resides in the diffuse layer The total moles of an aqueous species in the diffuse layer are then the sum of the contributions from the surface excess plus the bulk solution in the diffuse layer n n n n n n Woulk8i sw t Vs 8i tit W 75 a
508. solution the estimates of the master unknowns are the same as those used for initial exchange composition and initial surface composition calculations Initial values for the moles of each phase in the pure phase assemblage each component in the solid solutions in the solid solution assemblage and each gas component in the gas phase are set equal to the input values or the values from the last simulation in which they were saved For data input to PHREEQC definition of batch reaction and transport calculations rely on many of the data blocks Initial conditions are defined with SOLUTION or SOLUTION_SPREAD EXCHANGE SURFACE GAS_PHASE EQUILIBRIUM_PHASES SOLID_SOLUTIONS and USE data blocks Batch reactions are defined by initial conditions and with MIX KINETICS REACTION REACTION_TEMPERATURE and USE data blocks Transport calculations are specified with the ADVECTION or the TRANSPORT data block see Description of Data Input NUMERICAL METHOD AND RATE EXPRESSIONS FOR CHEMICAL KINETICS A major deficiency with geochemical equilibrium models is that minerals organic substances and other reactants often do not react to equilibrium in the time frame of an experiment or a model period A kinetically controlled reaction of a solid or a nonequilibrium solute generates concentration changes of aqueous species according to the rate equation 40 User s Guide to PHREEOcC Version 2 dm a Ro 93 where c is the stoichiometric coefficien
509. solution can be mixed with pure water which is given a negative mixing fraction in MIX or 3 H20 can be specified as the alternative reaction in EQUILIBRIUM_PHASES keyword input in which case water is removed or added to the aqueous phase to attain a specified saturation index for a pure phase This example uses the first method the REACTION data block is used to simulate concentration of rain water by approximately 20 fold by removing 95 percent of the water The resulting solution contains only about 0 05 kg of water In a subsequent simulation the MIX keyword is used to generate a solution that has the same concentrations as the evaporated solution but has a total of mass of water of approximately 1 kg The first simulation input data set table 17 contains four keywords 1 TITLE is used to specify a description of the simulation to be included in the output file 2 SOLUTION is used to define the composition of rain water from central Oklahoma 3 REACTION is used to specify the amount of water in moles to be removed from the aqueous phase and 4 SAVE is used to store the result of the batch reaction calculation as solution number 2 Table 17 Input data set for example 4 TITLE Example 4a Rain water evaporation SOLUTION 1 Precipitation from Central Oklahoma units mg L pH 4 5 estimated temp 25 0 Ca 384 Mg 043 Na 141 K 036 Cl 236 etd il CO2 g 3 5 S 6 1 3 N 3 208 EXAMPLES 209 N 5
510. sorb CoNta sorb Biomass start 10 punch TOTAL TIME 3600 1800 3600 TOTAL TIME 3600 900 3600 20 punch KIN Co_sorption 3 75e3 30 punch KIN CoNta_sorption 3 75e3 40 punch KIN Biomass end TRANSPORT First 20 hours have Nta and cobalt in infilling solution cells 10 20 length 1 0 5 shifts 20 40 time step 3600 1800 flow direction forward boundary condition flux flux dispersivity 00 correct disp true diffusion coef 0 0e 9 punch cells 10 20 punch freguency 1 2 print cells 10 20 print freguency 5 10 END PRINT selected out false SOLUTION 0 New infilling solution same as background solution units umol L pH 6 el 49 O 0 62 5 Na 1000 cal 1000 266 User s Guide to PHREEOcC Version 2 END PRINT selected out true TRANSPORT Last 55 hours with background infilling solution shifts 55 110 END Grid Convergence With advective dispersive reactive transport simulations it is always necessary to check the numerical accuracy of the results In general there will not be analytical solutions for these complex simulations so the only test of numerical accuracy is to refine the grid and time step rerun the simulation and compare the results If simulations on two different grids give similar results there is some assurance that the numerical errors are relatively small If simulations on two different grids give significantly different results the grid must be refined again and the
511. ss For data input to PHREEOC the mass action eguations eguilibrium constant and temperature dependence of the constant for each pure phase are defined with the PHASES data block Initial composition of a solid solution assemblage and Guggenheim parameters for nonideal solid solutions are defined with the SOLID SOLUTIONS data block see Description of Data Input Mole Balance for Surface Sites Mole balance for a surface site is a special case of the general mole balance eguation The surface assemblage is a set of one or more surfaces each of which may have one or more site types The total number of moles of a surface site type is specified by input to be one of the following 1 fixed 2 proportional to the moles of a pure phase or 3 proportional to the moles of a kinetic reactant The sum of the moles of surface sites occupied by the surface species of a site type must equal the total moles of that surface site type The following function is derived from the mole balance relation for a surface site type s of surface s 22 User s Guide to PHREEQC Version 2 N Sk T gt N 1 cen Sk Los isp isp N 6 Us where the value of the function f s is zero when mole balance is achieved T A is the moles of the surface site type N is the number of surface species for the site type and b M is the number of surface sites occupied by the S 1 ad a 5 surface species Us The total derivative of f s 8 N k df AT
512. st letter is checked sites_per_mole Moles of this surface sites per mole of phase or kinetic reactant unitless mol mol specific_area_per_mole Specific area of surface in m mol of equilibrium phase or kinetic reactant Default is 0 m mol Line 4 no_edl no_edl Indicates that no electrostatic terms will be used in the mass action equations for surface spe cies and no charge balance equations for the surfaces will be used The identifiers no_edl and diffuse_layer are mutually exclusive and apply to all surfaces in the surface assemblage Optionally no_edl n o edl no electrostatic n o_electrostatic Line 5 diffuse layer thickness diffuse layer Indicates that the composition of the diffuse layer will be estimated such that the net surface charge plus the net charge in the diffuse layer will sum to zero See notes following the example data block The identifiers diffuse layer and no edl are mutually exclusive and apply to all surfaces in the surface assemblage Optionally diffuse layer or d iffuse layer thickness Thickness of the diffuse layer in meters Default is 10 m eguals 100 Angstrom Line 6 only counter ions 164 User s Guide to PHREEOc Version 2 only_counter_ions Indicates that the surface charge will be counterbalanced in the diffuse layer with counter ions only the sign of charge of counter ions is opposite to the surface charge Charge balance by co ion exclusion is neglected co ions have
513. st problem that includes the identity of the aqueous species and log K s of the species activity coefficients were assumed to be 1 0 The database file in table 39 was constructed on the basis of their aqueous model For the PHREEQC simulation NTA was defined as a new element in the SOLUTION_MASTER_SPECIES data block named Nta From this point on NTA will be referred to as Nta for consistency with the PHREEQC notation The gram formula weight of Nta in SOLUTION_MASTER_SPECIES is immaterial if input units are moles in the SOLUTION data block and is simply setto 1 The aqueous complexes of Nta are defined in the SOLUTION_SPECIES data block Note that the activity coefficients of all aqueous species are defined with a large value for the a parameter 1x107 in the gamma identifier which forces the activity coefficients to be very nearly 1 0 EXAMPLES 259 Table 39 Database for example 15 SOLUTION_MASTER_SPECIES C CO2 2 0 Cal El 0 0 Co Co 2 0 0 E e 0 0 H H 1 H 0 H2 0 0 H 1 H zis N NH4 0 0 Na Nat 0 0 Nta Nta 3 320 O H20 0 0 O 2 H2O 0 0 O 0 02 0 0 SOLUTION SPECIES 2H20 02 4H 4e log k 86 08 ga 2 H 2 e H2 log_k 3 15 ga H H log k 0 0 ga e e log_k 0 0 ga H20 H20 log_k 0 0 ga CO2 C02 log_k 0 05 ga Na Na log_k 0 0 ga Cl Cl log_k 0 0 ga Co 2 Co 2 log k 0 0 ga NH4 NH4
514. state is specified to be adjusted to obtain charge balance for the solution f 5 is included to calculate the value of the master unknown In a Ina orln a e that produces charge balance In this case the calculated pH pe or total concentration of m will differ from the input value If f is included for the master unknown Ina the equation f is excluded If pH pe or the master unknown for an element or element valence state is specified to be adjusted to obtain a specified saturation index for a pure phase f p is included to calculate the value of the master unknown na 5 Ina or lna that produces the target saturation index In this case the calculated pH pe or total concentration e of m will differ from the input value If f p is included for the master unknown Ina the equation f is excluded If total alkalinity is specified in the input the mole balance equation for alkalinity f 4 is included to calculate Ina and the total molality of the element associated with alkalinity carbon in the default database If the problem definition contains a mole balance equation for both carbon or carbon 4 and alkalinity then the two master unknowns associated with these equations are Ina jj Ina 92 for the default database files and Ina In this case the pH will be calculated in the speciation calculation and will not be equal to the input pH For speciation calculations if the alkalinity mole balance e
515. step begins with the same initial solution and adds only the amount of reaction specified If INCREMENTAL_REACTIONS keyword is true the calculations are performed as follows the first step adds 0 25 mol of reaction and the intermediate results are saved as the starting point for the next step then 0 5 mol of reaction are added and the intermediate results saved then 0 75 mol then 1 0 mol the total amount of reaction added to the initial solution is 2 5 mol The total amount of each reactant added at any step in the reaction is the reaction amount times the relative stoichiometric coefficient of the reactant Additional lines may be used to define all reactant amounts 130 User s Guide to PHREEQC Version 2 units Units may be moles millimoles or micromoles Units must follow all reaction amounts Default is moles If line 2 is not entered the default is one step of 1 0 mol Example data block 2 Line 0 REACTION 5 Add sodium chloride and calcite to reaction solution Line la NaCl 2 0 Line lb Calcite 0 001 Line 2 1 0 moles in 4 steps Explanation 2 Line 0 REACTION number description Same as example data block 1 Line 1 phase name or formula relative stoichiometry Same as example data block 1 Line 2 reaction amount units in steps reaction amount A single reaction amount is entered This amount of reaction will be added in steps steps units Same as example data block 1 in steps in indicates tha
516. t 0 001 mol of strontium carbonate have been added fig 10A That point is the beginning of the miscibility gap fig 10 and the composition of the solid is 0 0048 strontium mole fraction The next increments of strontium carbonate up to 0 005 mol strontium carbonate added produce constant mole fractions of calcium and strontium in the solution fig 10B and equilibrium with both the miscibility gap end members However the amounts of calcium carbonate and strontium carbonate in the solid phases fig 10C and the amounts of each of the miscibility gap end members fig 10D vary with the amount of strontium carbonate added Finally the end of the miscibility gap is reached after about 0 005 mol of strontium carbonate have been added At this point the solution is in equilibrium with a single solid with a strontium mole fraction of 0 8579 Addition of more strontium carbonate increases the mole fractions of strontium in the aqueous phase and in the solid solution until both mole fractions are nearly 1 0 after the addition of 10 mol of strontium carbonate Example 11 Transport and Cation Exchange The following example of advective transport in the presence of a cation exchanger is derived from a sample calculation for the program PHREEQM Appelo and Postma 1993 example 10 13 p 431 434 The chemical composition of the effluent from a column containing a cation exchanger is simulated Initially the column contains a sodium potassium nitrate s
517. t at the end of a simulation in temporary storage locations are overwritten by the next simulation These compositions are not automatically saved however they may be saved explicitly for use in subsequent simulations within the run by using the SAVE keyword The SAVE keyword must be used for each type of composition that is to be saved solution exchange assemblage gas phase pure phase assemblage solid solution assemblage or surface assemblage SAVE assigns number to the corresponding composition If one of the compositions is saved in a number that already exists the old composition is deleted There is no need to save the compositions unless they are to be used in subsequent simulations within the run Transport calculations automatically save the results of calculations after each step and the SAVE keyword has no effect in these calculations Amounts of kinetic reactions KINETICS are automatically saved during all batch reaction and transport calculations and can not be saved with the SAVE keyword The USE keyword can be invoked in subsequent simulations to use the saved compositions in additional batch reaction calculations DESCRIPTION OF DATA INPUT 135 Example problems The keyword SAVE is used in example problems 3 4 7 10 and 14 Related keywords EXCHANGE EQUILIBRIUM_PHASES GAS_PHASE SELECTED_OUTPUT SOLID_SOLUTIONS SOLUTION SURFACE and USE 136 User s Guide to PHREEQC Version 2 SELECTED_OUTPUT This keyword data b
518. t be defined as SOLUTION 0 and it is a calcium chloride solution The amount and composition of the exchanger in each of the 40 cells is defined by the EXCHANGE 1 40 data block The number of exchange sites in each cell is 1 1 mmol and the initial composition of the exchanger is calculated such that it is in equilibrium with solution 1 Note that the initial exchange composition is calculated assuming that the composition of solution 1 is fixed the composition of solution 1 is not changed during the initial exchange composition calculation The ADVECTION data block need only include the number of cells and the number of shifts for the simulation The calculation only accounts for numbers of pore volumes that flow through the cells no explicit definition of time or distance is used The identifiers punch_cells and punch_frequency specify that data will be written to the selected output file for cell 40 at each shift The identifiers print_cells and print_frequency indicate that data will be written to the output file for cell 40 every 20 shifts The SELECTED_OUTPUT data block specifies that the shift or advection step number and the total dissolved concentrations of sodium chloride potassium and calcium will be written to the file ex ladv sel Pore volumes can be calculated from the shift number one shift moves a solution to the next cell and the last solution out of the column PHREEQC calculates cell centered concentrations so that the concen
519. t of species i in the kinetic reaction and R is the overall reaction rate for substance k mol kgw s In general reaction rates vary with reaction progress which leads to a set of ordinary dif ferential equations that must be solved Kinetic rates have been published for numerous reactions and for various conditions of temperature pressure and solution composition However different researchers applied different rate expressions to fit observed rates and it is difficult to select rate expressions which commonly have been hard coded into programs that have sufficient generality The problem is circumvented in PHREEQC with an embedded BASIC interpreter that allows definition of rate expressions for kinetic reactions in the input file in a general way obviating the need for hard coded rate expressions in the program Numerical Method The rate must be integrated over a time interval which involves calculating the changes in solution concentrations while accounting for effects on the reaction rate Many geochemical kinetic reactions result in stiff sets of equations in which some rates the time derivatives of concentration change are changing rapidly while others are changing slowly as the reactions unfold in time PHREEQC solves such systems by a Runge Kutta RK algorithm which integrates the rates over time An RK scheme by Fehlberg 1969 is used with up to 6 intermediate evaluations of the derivatives The scheme includes an RK met
520. t of variables used in partial differentiation are referred to as master unknowns The total derivatives of each function f will be presented without derivation In the following equations lack of a subscript or the subscript aq will refer to entities in the aqueous phase e refers to exchangers g refers to gases s refers to surfaces ss refers to solid solutions and p refers to phases Activities and Mass Action Equations In this section the activities of aqueous exchange and surface species are defined and the mass action relations for each species are presented Equations are derived from the mass action expression for the moles of each species in the chemical system in terms of the master unknowns These equations are then differentiated with respect to the master unknowns Later these equations for the moles of a species and the partial derivatives will be substituted into the constituent mole balance charge balance and phase equilibria functions Aqueous Species PHREEQC allows speciation or equilibration with respect to a single aqueous phase However multiple aqueous phases may be defined in the course of a run and an aqueous phase may be defined as a mixture of one or more aqueous phases see MIX keyword in Description of Data Input The dissolved species in the aqueous phase are assumed to be in thermodynamic equilibrium with one exception in initial solution calculatio
521. t the stoichiometric reaction will be divided into steps number of steps If INCREMENTAL_REACTIONS is false default example data block 2 performs the calcula tions as follows the first step adds 0 25 mol of reaction to the initial solution the second step adds 0 5 mol of reaction to the initial solution the third 0 75 and the fourth 1 0 If INCREMENTAL_REACTIONS keyword is true the calculations are performed as follows each of the four steps adds 0 25 mol of reaction and the intermediate results are saved as the start ing point for the next step If line 2 is not entered the default is one step of 1 0 mol Notes The REACTION data block is used to increase or decrease solution concentrations by specified amounts of reaction The specified reactions are added to or removed from solution without regard to equilibrium time or reaction kinetics Irreversible reactions for which time evolution or concentration dependent rates are needed must be modeled using the KINETICS and RATES keywords however a kinetic rate expression is needed for this type of modeling Example data block 1 with INCREMENTAL_REACTIONS false and example data block 2 with INCREMENTAL_REACTIONS True or False will generate the same results solutions after a total of 0 25 0 5 0 75 and 1 0 mol of reaction have been added Example data block 1 with INCREMENTAL_REACTIONS true generates results after a total of 0 25 0 75 1 5 and 2 5 mol of reaction have been added If a
522. ta Setfor example Diva ksm ease E asemaansa EERE ESER ES 231 Input data set forexample IOs 0553 N hil Boi ASENNE MSN EST ag a eben 236 Input data set for example A Vivir ita litio 239 Input data set forexample latino noc ra ita inicien 242 Numerical errors relative to an analytical solution for example 12 for a 20 cell and a 60 cell model 246 Input data set for example 13A Stagnant zone with implicitly defined mixing factoTS ooonccioninnconnconconnconcnnnconono 248 Input data set for example 13B Stagnant zone with explicitly defined mixing facto S ooononccinninnnnnnconnonnconcnnncnono 249 Mixing factors for finite difference calculation of diffusion in spheres cs seeceecseeseeeecsecseeseeseceeeeeeseaeeereeeeeens 251 Input data set for example 13C Stagnant zone with diffusion calculated by finite differences partial listing 252 Input datasset for ex mple 14 iii saaste N osa EE EE en E E E E deci maasta st wussdbaghevees 255 Hydraulic and physical properties of the column in example 15 0 0 eee es e aan aa aa a naa a naene naene 259 Database for example lista ei didas usb A shia TARKAS ETA I Pat LS A N eet as ose s 260 Concentration data for example ld erres osre e orero ep asiaticas estes 261 Reaction stoichiometry for oxidation of Nla oooooncnnninnnnonioncnncconccnnonnconocononnnnnnonnnnnnnnn ron crac cnn conc conc n eaa a naene naene 262 Xl 42 43 44 45 46 47 48 49 50 51 52
523. tal letter followed e 99 by zero or more lower case letters Underscores plus one or more lower case letters are used to differentiate types of binding sites on a single surface Multiple binding sites can be defined for each surface surface master species Formula for the surface master species usually the OH form of the binding site Notes In this example data block a surface named Surf has a strong and a weak binding site Association reactions must be defined with SURFACE SPECIES for the master species associated with each binding site and for any additional surface complexation species All reactions for the binding sites of a surface Surf s and Surf w in this example data block must be written in terms of the surface master species Surf sOH and Surf wOH in this example data block Each surface master species must be defined by an identity reaction with log K of 0 0 in SURFACE SPECIES input The number of sites in moles for each binding site must be defined in the SURFACE data block Information defining the surface area is also specified with the SURFACE data block In setting up the eguations for a simulation that includes multiple binding sites one mole balance eguation is included for each binding site for each surface and one charge balance eguation is included for each surface including all of its binding sites Example problems The keyword SURFACE MASTER SPECIES is not used in the example problems
524. te reactions can be defined for mobile or immobile cells through REACTION data blocks again with the identifying number of the REACTION data block corresponding to the cell number REACTION_TEMPERATURE data blocks can be used to specify the initial temperatures of the cells in the transport simulation Temperatures in the cells may change during the transport simulation depending on the temperature distribution and the temperature retardation factor defined by temp_retardation_factor By default the composition of the solution pure phase assemblage exchange assemblage surface assemblage gas phase solid solution assemblage and kinetic reactants are printed for each cell for each shift Use of print_cells and print_frequency will limit the amount of data written to the output file If print_cells has been defined then only the specified cells will be written otherwise all cells will be written The identifier print_frequency will restrict writing to the output file to those shifts that are evenly divisible by print_modulus In the example data block results for cells 1 2 3 and 5 are written to the output file after each integer pore volume 5 shifts has passed through the column Data written to the output file can be further limited with the keyword PRINT see reset false If aSELECTED_OUTPUT data block has been defined recommended then selected data are written to the selected output file Use of punch_cells and punch_frequency i
525. that are the basis for chemical equilibrium kinetic transport and inverse modeling calculations in PHREEQC describes the input for the program and presents examples that demonstrate most of the program s capabilities INTRODUCTION PHREEQC version 2 is a computer program for simulating chemical reactions and transport processes in natural or polluted water The program is based on equilibrium chemistry of aqueous solutions interacting with minerals gases solid solutions exchangers and sorption surfaces but also includes the capability to model kinetic reactions with rate equations that are completely user specified in the form of Basic statements Kinetic and equilibrium reactants can be interconnected for example by linking the number of surface sites to the amount of a kinetic reactant that is consumed or produced during the course of a model period A 1D transport algorithm comprises dispersion diffusion and various options for dual porosity media A powerful inverse modeling capability allows Abstract 1 identification of reactions that account for observed water compositions along a flowline or in the time course of an experiment An extensible chemical data base allows application of the reaction transport and inverse modeling capabilities to almost any chemical reaction that is recognized to influence rain soil ground and surface water quality PHREEQC is based on the Fortran program PHREEQE Parkhurst and others 198
526. the backslash must be the last character in the line if white space or other characters follow the backslash the next line is not considered to be a continuation line Repeat count An asterisk can be used with data for the identifiers length and dispersivity in the TRANSPORT data block to indicate a repeat count for the following data item The format is an integer followed directly by the asterisk which is followed directly by a numeric value For example 4 1 0 is the same as entering four values of 1 0 1 0 1 0 1 0 1 0 Range of integers A hyphen can be used to indicate a range of integers for the keywords with an identification number It is also possible to define a range of cell numbers for the identifiers print_cells and punch_cells in the ADVECTION and TRANSPORT data blocks A range of integers is given in the form m n where m and n are positive integers m is less than n and the two numbers are separated by a hyphen without intervening spaces Table 3 Summary of special characters for input data files sharers a When preceding a character string a hyphen indicates an identifier for a keyword or subkeyword Indicates a range of cell numbers for keyword data blocks for example SOLUTION 2 5 or for identifiers print cells and punch cells in the ADVECTION and TRANSPORT data blocks In a chemical equation replaces in a formula like CaSO42H 0O The redox state of an element is def
527. the phase assemblage Assigning an initial amount of 1 mol to kaolinite in 6A5 and K mica in 6A6 is arbitrary the amount must only be sufficient to reach equilibrium with the mineral A simpler approach to determining the reaction path is to react K feldspar incrementally allowing the stable phase assemblage among gibbsite kaolinite K mica and K feldspar to form at each point along the path The only difficulty in this approach is to know the appropriate amounts of reaction to add From points A and F in table 22 K feldspar dissolution ranges from 0 03 to 190 9 mmol In part 6B table 21 a logarithmic range of reaction increments is used to define the path solid line across the phase diagram from its beginning at gibbsite equilibrium point A to equilibrium with K feldspar point F However the exact locations of points A through F will not be 218 User s Guide to PHREEQC Version 2 determined with the arbitrary set of reaction increments that are used in part B The reaction path calculated by part 6B is plotted on the phase diagram in figure 6 with points A through F from part 6A included in the set of points Finally in the kinetic approach kinetic dissolution of K feldspar is followed for varying amounts of time while the phases gibbsite kaolinite and K mica are allowed to precipitate and redissolve as the kinetic reaction proceeds SOLUTION 1 is defined to have a small amount of dissolved K feldspar 1e 13 moles The solution the
528. ther chemical formulas used in PHREEOC the valence state of DESCRIPTION OF DATA INPUT 157 the element can and should be included in the formula Line 7d The example indicates that the polysulfide species will be summed into the S 2 mole balance equation in any initial solution calculations for which total sulfide is defined Notes Line 1 must be entered first in the definition of a species Additional sets of lines lines 1 7 as needed may be added to define all of the aqueous species A log K must be defined for each species with either log_k line 2 or analytical_expression line 4 default is 0 0 but is not meaningful except for primary master species In this example data block the following types of aqueous species are defined a a primary master species SO the reaction is an identity reaction and log K is 0 0 b a secondary master species HS the reaction contains electrons c an aqueous species that is not a master species OH and d an aqueous species for which the chemical equation does not balance ee By default equation checking for charge and elemental balance is in force for each equation that is processed Checking can only be disabled by using no_check for each equation that is to be excluded from the checking process Example problems The keyword SOLUTION_SPECIES is used in example problem 1 9 and 15 See also the listing of the default database file in Attachment B Related keywords SOLUT
529. tion is not dissipating as rapidly as the chloride concentration because exchange sites must be filled with sodium along the diffusive reach Because this example has an analytical solution it is possible to verify the second order accuracy of the numerical algorithms used in PHREEOC For a second order method decreasing the cell size by a factor of three should improve the results by about a factor of nine An input file is given in Attachment C that performs the 20 cell calculation given in this example together with a 60 cell calculation The deviations from the analytical solution at the end of the time step are calculated at distances from 0 5 to 8 5 m in 0 5 m increments The results are shown in table 32 As expected for a second order method the deviations from the analytical solution decreased by approximately an order of magnitude as the result of decreasing the cell size by a factor of three Table 32 Numerical errors relative to an analytical solution for example 12 for a 20 cell and a 60 cell model Error in CI concentration Error in Na concentration Distance 20 cell 60 cell 20 cell 60 Cell model model model model 0 5 3 32E 05 3 03E 06 5 75E 04 4 42E 05 1 5 8 17E 05 7 66E 06 5 54E 04 6 08E 05 2 5 9 18E 05 9 09E 06 8 29E 05 1 43E 05 3 5 7 15E 05 7 65E 06 5 07E 05 5 64E 06 4 5 4 24E 05 4 98E 06 2 54E 05 3 26E 06 55 2 00E 05 2 61E 06 5 44E 06 6 27E 07 6 5 7 81E 06 1 12E 06 7 20E 07 6 15E 08 7 5 2 55E 06 3 97E 07 6 77E 08
530. tion of heat yields the transport eguation for heat or rather for the change of temperature The eguation is identical to the advection reaction dispersion eguation for a chemical substance 2 T oT oT T 0 pkp 1 0 pk 8 Puky v O 117 x 48 User s Guide to PHREEQC Version 2 where T is the temperature C O is the porosity a fraction of total volume unitless p is the density kg m k is the specific heat kJ Cl keh K is a term which entails both the dispersion by advective flow and the heat con ductivity of the aquifer kJ Clin s and subscripts w and s indicate water and solid respectively The tempera ture T is assumed to be uniform over the volume of water and solid Dividing equation 117 by Op k gives oT or dT Rr oF w 132 118 1 0 PK Ko where Ry 1 is the temperature retardation factor unitless and k is the thermal Op k 0p k dispersion coefficient The thermal dispersion coefficient contains a component for pure diffusion and a compo nent for dispersion due to advection k K Bzy similar to the hydrodynamic dispersion coefficient The analogy permits the use of the same numerical scheme for both mass and heat transport De Marsily 1986 suggests that the thermal dispersivity B and the hydrodynamic dispersivity may be equal whereas the thermal diffusion coefficient k is orders of magnitude larger than D Thus dispersion due to advection can
531. tion of the chemical in the solid due to al chemical processes including exchange surface complex ation kinetic and mineral reactions it may be non linear with solute concentration and it may vary over time for the same concentration The equation can be integrated with the following initial conditions Cim C im and C m gt at t 0 and by using the mole balance condition M C26 00 00 Tt m Mo im im R 9 i m The integrated form of equation 119 is then Cim BC y BAYCim gt 120 where B R mom f 1 exp 0 is the water filled porosity of the mobile part a R mO n Rim im BO Rim ae fraction of total volume unitless and R is the retardation in the mobile area A mixing factor mixf can be defined that is a constant for a given time t mixf Bf 121 When mixf is entered in equation 120 the first order exchange is shown to be a simple mixing process in which fractions of two solutions mix C mixf C FU mixf im O 122 im im m imp Similarly an equivalent mixing factor mixf for the mobile zone concentrations is obtained with the mole bal ance equation Rim in mixf Mixf 123 ER and the concentration of C at time t is Co 1 MiXf m C my MT mC im 124 The exchange factor amp can be related to specific geometries of the stagnant zone Van Genuchten 1985 For example when the geometry is spherical the relation is D 6 a en 125
532. tion rates are slow later in the simulation Using an appropriate step_divide lt 1 can also cause sufficiently small initial time intervals when rates are fast but will not require small time intervals later in the simulation if rates are slow however the appropriate value for step_divide lt 1 is not easily known and usually must be found by trial and error The default maximal reaction is 0 1 moles during a time subinterval Normally step_divide is not used unless run times are long and it is apparent that each integration requires several time intervals The status line which is printed to the screen notes the number of integration intervals that fail the tolerance criterion as bad and the number of integration intervals that pass the criterion as OK Optionally step_divide or step_ divide Line 9 runge_kutta 1 2 3 or 6 1 2 3 or 6 Designates the preferred number of time subintervals to use when integrating rates and 1s related to the order of the integration method A value of 6 specifies that a 5th order embedded Runge Kutta method which requires 6 intermediate rate evaluations will be used for all inte grations For values of 1 2 or 3 the program will try to limit the rate evaluations to this number 108 User s Guide to PHREEOc Version 2 If the tolerance criterion is not satisfied among the evaluations or over the full integration inter val the method will automatically revert to the Runge Kutta
533. tions The solutions to be used in inverse modeling are defined in the same way as any solutions used in PHREEQC models Usually the analytical data are entered in a SOLUTION or SOLUTION_SPREAD data block but solutions defined by batch reaction calculations in the current or previous simulations may also be used if they are saved with the SAVE keyword The uncertainty identifier sets the default uncertainty limit for each analytical datum In this example a fractional uncertainty limit of 0 025 2 5 percent is assumed for all of the analytical data except pH By default the uncertainty limit for pH is 0 05 unit The uncertainty limit for pH can be set to an absolute value standard units with balances identifier The uncertainty limit for any datum for any of the solutions can be set explicitly to a fractional value or an absolute value moles equivalents for alkalinity using the balances identifier EXAMPLES 271 By default every inverse model includes mole balance equations for every element in any of the phases included in phases except hydrogen and oxygen If mole balance equations are needed for elements not included in the phases that is for elements with no source or sink conservative mixing the balances identifier can be used to include those elements in the formulation of the inverse modeling equations see example 17 In addition the balances identifier can be used to specify uncertainty limits for an element in each solutio
534. tite which have far fewer surface sites than hydrous ferric oxide The fraction of iron in hydrous ferric oxide was arbitrarily assumed to be 0 1 Thus a total of 0 34 mol of iron was assumed to be in hydrous ferric oxide and using a value of 0 2 for the number of sites per mole of iron a total of 0 07 mol of sites per liter was used in the calculations A gram formula weight of 89 was used to estimate that the mass of hydrous ferric oxide was 30 g L The specific surface area was assumed to be 600 m g Table 37 Input data set for example 14 TITLE Example 14 Transport with equilibrium_ phases exchange and surface reactions KKKKKKKKKKK PLEASE NOTE This problem requires database file wateq4f dat KKKKKKKKKKK SURFACE_SPECIES Hfo_wOH Mg 2 Hfo_wOMg H log_k 15 Hfo_wOH Ca 2 Hfo_wOCa H log_k 15 SOLUTION 1 Brine pH 5 1 13 EXAMPLES 255 pe 4 0 02 g 0 7 temp 29 units mol kgw Ca 4655 Mg 1609 Na 5 402 Cl 6 642 charge C 00396 S 004725 As 05 umol kgw END USE solution 1 EQUILIBRIUM_PHASES 1 Dolomite 0 0 1 6 Calcite 0 0 O51 SAVE solution 1 prints initial condition to the selected output file SELECTED_OUTPUT fil x14 sel reset false step R PUNCH head m Ca m Mg m Na umol As pH 10 PUNCH TOT Ca TOT Mg TOT Na TOT As 1e6 LA H END PRINT skips print of initial exchange and initial surface to the selected output file selected o
535. tities JAIK dAlk Saik q 3C a Oota 140 where Alk j is the alkalinity of solution q and C a is the total inorganic carbon of solution g The partial deriva tives are evaluated numerically for each agueous solution EQUATIONS AND NUMERICAL METHOD FOR INVERSE MODELING 57 Inequality Constraints This formulation of the inverse problem makes sense only if the values of the 8 s are small meaning that the revised aqueous solution compositions original plus 6 s do not deviate unreasonably from the original data A set of inequalities places limits on the magnitudes of the 6 s The absolute value of each 6 is constrained to be less than or equal to a specified uncertainty limit u q l m ql m q 141 Inequality constraints equation 141 are also included for carbon 4 alkalinity and pH for each aqueous solu tion In addition the mixing fractions for the initial aqueous solutions q lt Q are constrained to be nonnegative a gt 0 142 and the final agueous solution mixing fraction is fixed to 1 0 a asi 1 0 If phases are known only to dissolve or only to precipitate the mole transfer of the phases may be constrained to be nonnegative or nonpositive a 20 143 or a lt 0 144 p Change of Variables The system of eguations for inverse modeling in the previous section is nonlinear because it includes the product of unknowns of the form amp GT m g where amp and 6 are unknown
536. tively simple speciation chemistry the solution to the problem demonstrates several interacting chemical processes that are common to many environmental problems bacterially mediated degradation of an organic substrate bacterial cell growth and decay metal sorption and aqueous speciation including metal ligand complexation In this example the test problem is solved with PHREEQC which produces results almost identical to those of Tebes Steven and Valocchi 1997 1998 However care is needed in advective dispersive transport simulations with PHREEQC as with any reactive transport model to ensure that an accurate numerical solution is obtained The test problem models the transport processes when a pulse of water containing NTA nitrylotriacetate and cobalt is injected into a column The problem includes advection and dispersion in the column aqueous equilibrium reactions and kinetic reactions for NTA degradation growth of biomass and cobalt sorption Transport Parameters The dimensions and hydraulic properties of the column are given in table 38 Table 38 Hydraulic and physical properties of the column in example 15 Property Value Length of column 10 0 m Porosity 4 Bulk density 1 5e6 g m Grams of sediment per liter from 3 75e3 g L porosity and bulk density Pore water velocity 1 0 m hr Longitudinal dispersivity 05 m Aqueous Model Tebes Steven and Valocchi 1997 defined an aqueous model to be used for this te
537. tly relative to a single exchange species In the default database file sodium NaX is used as the reference and the reaction X Nat NaX is given a log K of 0 0 line 2b The log K for the exchange reaction for the reaction given in line 2c is then numerically equal to the log K for the reaction 2NaX Cat CaX 2Na Master species have log K of 0 0 lines 2a and 2d reactions for reference species also have log K of 0 0 lines 2b and 2e Default is 0 0 Line 3 gamma Debye Hiickel a Debye Hiickel b gamma Indicates WATEO Debye Hiickel eguation will be used to calculate an activity coefficient for the exchange species If gamma or davies is not input for an exchange species the activity of the species is equal to its equivalent fraction If gamma is entered then an activity coefficient of 88 User s Guide to PHREEQC Version 2 2 Az Ju the form of WATEQ Truesdell and Jones 1974 logy t bu is multiplied times 1 Ba Ju the equivalent fraction to obtain activity for the exchange species In this equation y is the activ ity coefficient u is ionic strength A and B are constants at a given temperature and z is the number of equivalents of exchanger in the exchange species Optionally gamma or g amma Debye Hiickel a Parameter a in the WATEQ activity coefficient equation Debye Hiickel b Parameter b in the WATEQ activity coefficient equation Line 4 davies davies Indicates the Davies
538. to 1e 7 equivalents uncertainty limits 1 0 or 1e 6 to obtain a mole balance on alkalinity For most natural waters alkalinity will not be small in both solutions and special handling of the alkalinity uncertainty will not be necessary note alkalinity is a negative number in acid solutions Uncertainty limits for electrons are never used because it is always assumed that no free electrons exist in an aqueous solution If isotope mole balances are used then 1 isotopic values for the aqueous phases must be defined through the SOLUTION data block 2 the isotopes identifier must be used in the INVERSE_MODELING data block to specify the isotopes for which mole balances are desired and optionally the uncertainty limits in isotopic values associated with each solution and 3 for each phase listed below the phases identifier of the INVERSE_MODELING data block isotopic values and uncertainty limits must be defined for each isotope that is contained in the phase In addition each phase that contains isotopes must be constrained either to dissolve or to precipitate Default uncertainty limits for isotopes are given in table 5 The options minimal and range affect the speed of the calculations The fastest calculation is one that includes the minimal identifier and does not include range The slowest calculation is one that does not include minimal and does include range The force option for a phase in phases and the force_solutions
539. to be that which is in equilibrium with atmospheric oxygen partial pressure The column is discretized in 20 cells which are filled initially with a 1 u mol kgw KCI solution SOLUTION 1 20 Each cell has 48 mmol of exchange sites which are defined to contain only potassium by the data block EXCHANGE 1 20 The TRANSPORT data block defines cell lengths of 1 m length 1 no dispersion disp 0 no diffusion diffc 0 and no retardation for temperature thermal_diffusion 1 SOLUTION 0 is shifted 19 times into the column shifts 19 flow_d forward and arrives in cell 19 at the last shift of the advective dispersive transport simulation The boundary conditions at the column ends are of flux type bcon flux flux In this initial advective dispersive transport simulation no exchange occurs the solution contains only K as cation and the exchange sites are completely filled with potassium and the concentrations and temperatures in the first 19 cells are brought to 24 mmol kgw KNO and 0 C This result could be more easily achieved with SOLUTION data blocks directly as is done in Attachment C but the simulation demonstrates how transient boundary and flow conditions can be represented The dissolved and solid composition and temperature of each cell of the column is automatically saved after each shift in the advective dispersive transport simulation The keyword PRINT is used to exclude all printing to the output file reset false In the ne
540. tr n ba la ce eguation soinera isis bi id tdi e cis 56 Water bal nce CU testi osa atleti ai tease aae nen E apea conte E reos IESS 56 Charge balance equation sssusa A a eae 56 Is tope bal nce EQUAtIONS iii id ai ita 57 Relation among pH alkalinity and total dissolved inorganic carbon uncertainty terMS 0 cesses 57 Inequality COS rants ilatina ita 58 Change of vartables orcos orleans rra leales 58 Organization of the computer g der sena naene annan a aan aa aan N a na na aa EE aa na aa Ka Ka EE aa eee 61 DESCTIpt1on of data pitido SUNIN E E ook eestor betes ma enhet dois 63 Conventions for data MpUbiio peo mi 65 Reducing chemical equations to a standard form ooouosssssss onn a n a ne ae na aan aa aan a aa aan aa nana a nono 67 Conventions for documentatii sisisi ossi sai ses neriti onosi NESE EEE Erap paeo a EEEa EE EEO ik EEEE canti 68 Getting Started ri ETSIN a E E EE E E EE Take EE es bes E EE EE vas de E E lyte E EE EEE 68 Speciation calculations srein sida 69 Batch reaction calculations nennen o e a E na eaa E E E a na a a n eaa nen EE ENS 69 Advecttve tr nsport calculations snerru r ei e ee a Ran i N A eee e 71 Advective dispersive transport Calculations s seessesseeesesseesttsstestesstsstesstseestestesersetseteseereteseeseeseseseeseeeseetet 71 Inverse modens iii di A A di Aa 72 TN 72 Keywords oea i a AASS ee eT rat a teed a seed a ee edges 72 ADVECTION ot to pia 74 Example data block iaa 74 Ex
541. trations in the last cell arrive a half shift later at the column end In this example one shift represents 1 40 of the column pore volume The number of pore volumes PV that have been flushed from the column is therefore PV number of shifts 0 5 40 The number of pore volumes is calculated and printed to the selected output file using the USER_PUNCH data block Following the advection calculation ADVECTION the initial conditions are reset for the advection and dispersion calculation TRANSPORT with a second set of SOLUTION and EXCHANGE data blocks SOLUTION 0 is unchanged by the ADVECTION simulation and need not be redefined The TRANSPORT data block includes a much more explicit description of the transport process than the ADVECTION data block The length of each cell length the boundary conditions at the column ends boundary_cond the direction of flow flow_direction the dispersivity dispersivity and the diffusion coefficient diffc can all be specified The identifier correct_disp should be set to true when modeling outflow from a column with flux boundary conditions The identifiers punch punch_frequency print and print_frequency serve the same function as in the ADVECTION data block The second SELECTED_OUTPUT data block specifies that the transport step shift number and total dissolved concentrations of sodium chloride potassium and calcium will be written to the file exl Itrn sel The USER PUNCH data block fr
542. trolled reactants two columns for each reactant total amount of reactant and mole transfer for current calculation solid solution components and data defined by the USER_PUNCH data block A data item within an input list for example an aqueous species within the molalities list is printed in the order of the list If the selected output file contains data for gases gases identifier the total pressure total moles in the gas phase and the total volume of the gas phase precede the moles of each gas component specified by the identifier Example problems The keyword SELECTED_OUTPUT is used in example problems 2 5 6 7 8 9 10 11 12 13 14 and 15 Related keywords ADVECTION EQUILIBRIUM_PHASES EXCHANGE MASTER SPECIES EXCHANGE SPECIES GAS PHASE INVERSE MODELING KINETICS KNOBS PHASES PRINT REACTION SOLUTION MASTER SPECIES SOLID SOLUTIONS SOLUTION SPECIES SURFACE MASTER SPECIES SURFACE SPECIES TRANSPORT and USER PUNCH DESCRIPTION OF DATA INPUT 143 SOLID_SOLUTIONS This keyword data block is used to define a solid solution assemblage Each solid solution may be nonideal with two components or ideal with any number of components The amount of each component in each solid solution is defined in this keyword data block Any calculation involving solid solutions assumes that all solid solutions dissolve entirely and reprecipitate in equilibrium with the solution Example data block Line 0 SOLID SOLUT
543. ulations the SELECTED_OUTPUT data block is usually used to produce a compact file of selected results Example problems The keyword PRINT is used in example problems 10 12 13 14 and 15 Related keywords ADVECTION print_cells and print_frequency SELECTED_OUTPUT TRANSPORT print_cells and print_frequency USER_PRINT and USER_PUNCH DESCRIPTION OF DATA INPUT 123 RATES This keyword data block is used to define mathematical rate expressions for kinetic reactions General rate formulas are defined in the RATES data block and specific parameters for batch reaction or transport kinetics are defined in KINETICS data blocks Example data block Line 0 RATES Line la Calcite Line 2a start Basic 1 rem M current number of moles of calcite Basic 2 rem MO number of moles of calcite initially present Basic 3 rem PARM 1 A V cm 2 L Basic 4 rem PARM 2 exponent for M MO Basic 10 si cc SI Calcite Basic 20 if M lt 0 and si cc lt 0 then goto 200 Basic 30 kl 10 0 198 444 0 TK Basic 40 k2 107 2 84 2177 0 TK Basic 50 if TC lt 25 then k3 10 5 86 317 0 TK Basic 60 if TC gt 25 then k3 10 1 1 1737 0 TK J Basic 70 t 1 Basic 80 if MO gt 0 then t M MO Basic 90 if t 0 then t 1 Basic 100 area PARM 1 t PARM 2 Basic 110 rf k1 ACT H k2 ACT CO2 k3 ACT H2
544. ult is 10 m The variation of thickness of the diffuse layer with ionic strength is ignored The net charge in the diffuse layer exactly balances the net surface charge Conceptually the results of using this alternative approach are correct charge imbalances on the surface are balanced in the diffuse layer and the solution remains charge balanced Great uncertainties exist in the true composition of the diffuse layer and the thickness of the diffuse layer The ion complexation in the bulk solution is assumed to apply in the diffuse layer which is unlikely because of changes in the dielectric constant of water near the charged surface The thickness of the diffuse layer is purely an assumption that allows the volume of water in the diffuse layer to remain small relative to the solution volume It is possible especially for solutions of low ionic strength for the calculated concentration of an element to be negative in the diffuse layer In these cases the assumed thickness of the diffuse layer is too small or the entire diffuse layer approach is inappropriate However the identifier only counter ions offers an option to let only the counter ions increase in concentration in the diffuse layer and to leave the co ions at the same concentration in the diffuse layer as in the bulk solution The counter ions have a higher concentration in the diffuse layer than without this option because co ion exclusion is neglected The calculation of the diffuse layer
545. um If kinetic reactions are defined then the kinetic reactions are integrated with an automatic time stepping algorithm and system eguilibrium is calculated after each time step The capability to define multiple solutions and multiple assemblages combined with the capability to determine the stable phase assemblage provides a framework for 1D transport modeling PHREEOC provides a numerically efficient method for simulating the movement of solutions through a column or 1D flow path with or INTRODUCTION 3 without the effects of dispersion The initial composition of the aqueous gas and solid phases within the column are specified and the changes in composition due to advection and dispersion Appelo and Postma 1993 coupled with reversible and irreversible chemical reactions within the column can be modeled A very simple advective reactive transport simulation option with reversible and irreversible chemical reactions is retained from version 1 Inverse modeling attempts to account for the chemical changes that occur as a water evolves along a flow path Assuming two water analyses which represent starting and ending water compositions along a flow path inverse modeling is used to calculate the moles of minerals and gases that must enter or leave solution to account for the differences in composition Inverse models that mix two or more waters to form a final water can also be calculated PHREEQC allows uncertainty limits to be defined for all an
546. umber of sites of Surfc will change as will the surface area associated with Surfc Whenever Fe OH 3 a precipitates the specified amounts of Surfc wOH and Surfc sOH are formed These formulas are charge balanced and the OH groups are part of the formula for Fe OH 3 a The OH is not used in the initial surface composition calculation but is critical when amounts of Fe OH 3 a vary Erroneous results will occur if the formula is not charge balanced an error message will result if the elements in the surface complex other than the surface site itself are not contained in sufficient guantities in the eguilibrium phase or kinetic formula DESCRIPTION OF DATA INPUT 165 The number of sites of Surfd in the example data block is determined by the amount of a kinetic reactant defined in KINETICS 3 where 3 is the same number as the surface number Sites related to a kinetic reactant are exactly analogous to sites related to an equilibrium phase The same restrictions apply the formula must be charge balanced and the elements in the surface complex other than the surface site itself must be included in the formula of the reactant When diffuse_layer is not used default to account for the charge that develops on the surface an equal but opposite charge imbalance is attributed to the solution Thus charge imbalances accumulate in the solution and on the surface when surfaces and solutions are separated This handling of charge imbalances for surfa
547. umber steps defined in the KINETICS data block then the time step for kinetic reactions in the remaining batch reaction steps will be zero The incremental approach is not implemented for the MIX keyword If a MIX data block is used then solutions are mixed only once before any reaction or kinetic steps REACTION_TEMPERATURE steps are always non incremental Example problems The keyword INCREMENTAL_REACTIONS is used in example problems 6C and 9 Related keywords KINETICS MIX and REACTION DESCRIPTION OF DATA INPUT 97 INVERSE_MODELING This keyword data block is used to specify the information needed for an inverse modeling calculation Inverse modeling attempts to determine sets of mole transfers of phases that account for changes in water chemistry between one or a mixture of initial water compositions and a final water composition Isotope mole balance but not isotope fractionation can be included in the calculations The data block includes definition of the solutions phases and uncertainty limits used in the calculations Example data block Line 0 INVERSE_MODELING 1 Line 1 solutions 10 3 5 Line 2 uncertainty 0 02 0 04 Line 3 phases Line 4a Calcite force pre 13C 1 0 1 Line 4b Anhydrite force dis 348 1355 2 Line 4c CaX2 Line 4d NaX Line 5 balances Line 6a pH 0 1 Line 6b Ca 0 01 0 005 Line 6c Alkalinity 1 0e 6 Line 6d Fe 0 05 0 1 0 2 Line 7 isotopes Line 8a 13C 0
548. umn is empty for a solution Optionally temp t emp temperature or t emperature temperature Temperature degrees Celsius Default is 25 0 Line 2 pH pH pH Identifier for pH The pH will be used for all subsequent solutions in the data block if no column has the heading pH or if the entry for the pH column is empty for a solution Optionally ph pH pH value negative log of the activity of hydrogen ion Default is 7 0 Line 3 pe pe pe Identifier for pe The value pe will be used as default for all subsequent solutions in the data block if no column has the heading pe or if the entry for the pe column is empty for a solution Option ally pe pe pe value conventional negative log of the activity of the electron Default is 4 0 Line 4 redox redox couple redox Identifier for the redox couple to be used to calculate pe This pe will be used for any redox element for which a pe is needed to determine the distribution of the element among its valence states The redox couple will be used for all subsequent solutions in the data block if no column DESCRIPTION OF DATA INPUT 159 has the heading redox or if the entry for the redox column is empty for a solution If no redox couple is specified the pe will be used Optionally redox or r edox redox couple Redox couple to use for pe calculations A redox couple is specified by two valence states of an element separated by a No spaces are allowed Default is pe Line 5
549. unch_frequency Identifier to select shifts for which results will be written to the selected output file Optionally punch_frequency punch_f requency selected_output_frequency selected_o utput_frequency punch_modulus Printing to the selected output file will occur after every punch_modulus advection shifts or diffusion periods Default is 1 Line 17 dump dump file dump Identifier to write complete state of a advective dispersive transport simulation after every dump_modulus advection shifts or diffusion periods The file is formatted as an input file that can be used to restart calculations Optionally dump or du mp dump file Name of file to which complete state of advective dispersive transport simulation will be written Default is phreeqc dmp Line 18 dump_frequency dump_modulus dump_frequency Complete state of a advective dispersive transport simulation will be written to dump file after dump_modulus advection shifts or diffusion periods Optionally dump_frequency or dump_f requency dump_modulus Complete state will be printed after dump_modulus advection shifts or diffusion peri ods Default is shifts 2 or 1 whichever is larger Line 19 dump_restart shift number dump_restart If an advective dispersive transport simulation is restarted from a dump file the start ing shift number is given on this line Optionally dump restart or dump rfestart shift number Starting shift number for the calculations if r
550. units concentration units units Identifier for concentration units The concentration units will be used for all subsequent solu tions in the data block if no column has the heading units or unit or if the entry for the units column is empty for a solution Optionally unit units or u nits concentration units Default concentration units Three groups of concentration units are allowed concentration 1 per liter L 2 per kilogram solution kgs or 3 per kilogram water kgw All concentration units for a solution must be within the same group Within a group either grams or moles may be used and prefixes milli m and micro u are acceptable Parts per thousand ppt parts per million ppm and parts per billion ppb are acceptable in the per kilogram solution group Default is mmol kgw Line 6 density density density Identifier for solution density The density will be used for all subsequent solutions in the data block if no column has the heading density or dens or if the entry for the density column is empty for a solution Density is used only if concentration units are per liter Optionally dens density or d ensity density Density of solution kg L Default is 1 0 kg L Line 7 water mass water Identifier for mass of water The mass of water will be used for all subseguent solutions in the data block if no column has the heading water or if the entry for the wat
551. ut false EXCHANGE 1 eguil with solution 1 X 1 0 1 eguil solution 1 assumes 1 10 of iron is HFO US ES SURFAC E Hfo_w 0 07 600 30 END SOLUTION 0 20 x precipitation pH 4 6 pe 4 0 02 g 0 7 temp 25 units mmol kgw Ca 191625 Mg 035797 Na 122668 cl 133704 C 01096 S ZOO LOS charge EQUILIBRIUM_PHASES 0 Dolomite 0 0 1 6 Calcite 0 0 0 1 CO2 g L 5 10 SAVE solution 0 END PRINT 256 User s Guide to PHREEQC Version 2 selected out true ADVECTION cells 1 shifts 200 The brine that initially fills the aguifer was taken from Parkhurst and others 1996 and is given as solution 1 in the input data set for this example table 37 The pure phase assemblage containing calcite and dolomite is defined with the EOUILIBRIUM PHASES 1 data block The brine is first equilibrated with calcite and dolomite and stored again as solution 1 The number of cation exchange sites is defined with EXCHANGE 1 and the number of surface sites are defined with SURFACE 1 The initial exchange and the initial surface composition are determined by eguilibrium with the brine after eguilibration with calcite and dolomite note that eguilibration of exchangers and surfaces before mineral eguilibration will yield different results due to buffering by the sorbed elements The concentration of arsenic in the brine was determined by trial and error to give a total of approximately
552. ves the mole transfer for formula relative to the aqueous solution a negative stoichiometric coefficient and a positive value for reaction progress gives a negative mole transfer which removes reactants from the aqueous solution In line 2a each mole of reac tion dissolves 1 0 mole of FeS and 0 001 moles of FeAs into the aqueous solution in line 2c each mole of reaction as calculated by the rate expression adds 0 5 mole of CH O and 0 05 mole of NH to the aqueous solution to simulate the degradation of nitrogen containing organic matter Default is 1 0 Line 3 m moles moles Current moles of reactant As reactions occur the moles will increase or decrease Default is equal to initial moles if initial moles is defined or 1 0 mol if initial moles is not defined Option ally m or m Line 4 m0 initial moles initial moles Initial moles of reactant This identifier is useful if the rate of reaction is dependent on grain size Formulations for this dependency often include the ratio of the amount of reactant remaining to the amount of reactant initially present The quantity initial moles does not change as the kinetic reactions proceed Frequently the quantity initial moles is equal to moles at the beginning of a kinetic reaction Default is equal to moles if moles is defined or 1 0 if moles is not defined Optionally m0 or m0 Line 5 parms list of parameters list of parameters A list of numbers may be entered that can be used in t
553. wed Line 2 Dissolution reaction Dissolution reaction for phase to aqueous species Any aqueous species including e may be used in the dissolution reaction The chemical formula for the defined phase must be the first chemical for mula on the left hand side of the equation The dissolution reaction must precede any identifiers related to the phase The stoichiometric coefficient for the phase in the chemical reaction must be 1 0 Line 3 log_k log K log_k Identifier for log K at 25 C Optionally log k logk I og_k or l ogk log K Log K at 25 C for the reaction Default is 0 0 Line 4 delta_h enthalpy units delta_h Identifier for enthalpy of reaction at 25 C Optionally delta_h deltah d elta h or d eltah enthalpy Enthalpy of reaction at 25 C for the reaction Default is 0 0 units Units may be calories kilocalories joules or kilojoules per mole Only the energy unit is needed per mole is implied and abbreviations of these units are acceptable Explicit definition of units for all enthalpy values is recommended The enthalpy of reaction is used in the van t Hoff equation to determine the temperature dependence of the equilibrium constant Internally all enthalpy calculations are performed in the units of kilojoules per mole Default units are kilo joules per mole 118 User s Guide to PHREEQC Version 2 Line 5 analytical_expression A A gt A3 Ay As analytical_expression Identifier for coeffici
554. whatever fractions are specified The fractions volumes need not sum to 1 0 If the fractions were 7 0 and 3 0 instead of 0 7 and 0 3 the number of moles of each element in solution 1 including hydrogen and oxygen would be multiplied by 7 0 the number of moles of each element in solution 2 would be multiplied by 3 0 and the resulting moles of elements would be added together The mass of water in the mixture would be approximately 10 kg 7 0 from solution 1 and 3 0 from solution 2 instead of approximately 1 kg if the fractions were 0 7 and 0 3 The concentrations in the mixture would be the same for either set of mixing fractions because the relative proportions of solution 1 and solution 2 are the same However during subseguent reactions it would take 10 times more mole transfer for mixing fractions 7 0 and 3 0 than that shown in table 16 because there would be 10 times more water in the system Part D equilibrates the mixture with calcite and dolomite The USE keyword specifies that solution number 3 which is the mixture from part C is to be the solution with which the phases will eguilibrate By defining the phase assemblage with EOUILIBRIUM PHASES 1 the phase assemblage replaces the previous assemblage number 1 that was defined in part A Part E performs a similar calculation to part D but uses phase assemblage 2 which does not contain dolomite as a reactant Table 16 Selected results for example 3 Simulation A generates carbon
555. when the solution approaches equilibrium or when oxygen is depleted An example of a more complete rate expression which applies for both dissolution and precipitation is the rate equation for calcite Plummer and others 1978 have found that the rate can be described by the equation k H k CO ky H O kylCa HCO 101 Pealcite where bracketed chemical symbols indicate activity and the coefficients kj k and kz have been determined as a function of temperature by Plummer and others 1978 from calcite dissolution experiments in CO gt charged solu tions The rate contains a forward part ry first three terms of equation 101 and a backward part r last term of equation 101 and thus is applicable for both dissolution and precipitation The backward rate contains a coeffi cient k4 the value of which depends on the solution composition In a pure water calcite system bicarbonate con centration is approximately equal to twice the calcium concentration and the backward rate can be approximated as 2 r kylla HCO k 2 Ca 102 At eguilibrium a is the activity at saturation C as Also reaicite 0 and therefore r 2k 103 24 2 Ca s Combining equations 101 102 and 103 gives 2 2 calcite 7 rf Ca 1 104 2 Ca In a pure Ca CO system at constant CO pressure the ion activity product IAP is D ea HCO esi ce and K 4 IAP Calcite 7 P 105
556. which are distributed with PHREEQC It is also possible to use the Gapon convention in PHREEQC which also uses equivalent fraction but writes the exchange reaction as 0 5C a X C dy 5X See Appelo and Postma 1993 for more discussion The log K for calcium exchange in the default database file is 0 8 which results in the following mass action equation a 0 8 CaX 10 RT 9 a a Car x In general mass action equations can be written as Moo K a Jan 10 m where m varies over all master species including exchange master species c ni is the stoichiometric coefficient of master species m in the association half reaction for exchange species i and K is a half reaction selectivity constant The values of c may be positive or negative For PHREEQC terms on the right hand side of an associ ation reaction are assigned negative coefficients and terms on the left hand side are assigned positive coefficients For an exchange species the equation for the total moles of species i is M Cm i e Te m 2 11 The natural log of the activity of the master species of the exchanger is a master unknown in the numerical method The total derivative of the moles of species i with respect to the master unknowns is M dn Yen dln a ainen a 12 For data input to PHREEQC the chemical equation for the mole balance and mass action expressions the log K and its temperature dependence and optionally the
557. which should serve as templates for modeling other geochemical processes Only selected output from each of the example runs is presented Example 1 Speciation Calculation This example calculates the distribution of aqueous species in seawater and the saturation state of seawater relative to a set of minerals To demonstrate how to expand the model to new elements uranium is added to the aqueous model defined by phreegc dat One of the database files included with the program distribution wateg4f dat is derived from WATEQ4F Ball and Nordstrom 1991 and includes uranium Table 10 Seawater composition Concentration is in parts per million ppm unless specified otherwise PHREEQC Analysis notation Concentration Calcium Ca 412 3 Magnesium Mg 1291 8 Sodium Na 10768 0 Potassium K 399 1 Iron Fe 002 Manganese Mn 0002 Silica as SiO Si 4 28 Chloride Cl 19353 0 Alkalinity as HCO Alkalinity 141 682 Sulfate as So S 6 2712 0 Nitrate as NO37 NG 29 Ammonium as NHy N 3 03 Uranium U 0033 pH standard units pH 8 22 pe unitless pe 8 451 Temperature C temperature 25 0 Density kilograms per liter density 1 023 The essential data needed for a speciation calculation are the temperature pH and concentrations of elements and or element valence states These data for seawater are given in table 10 The input data set for this example calculation is shown in table 11 A comment about the calculations performed in thi
558. with solution 1 Y Montmorillonite equilibrium_phase 0 165 eguilibrate with solution 1 PHASES no check must use no check because of unbalanced equation Montmorillonite Montmorillonite has 0 165 mol Y mol A12 33513 67010 OH 2 12 H20 2 33 A1 OH 4 3 67 H4Si04 2 H log_k 44 532 Assume a 0 001 at equilibrium delta_h 58 373 kcal An exchanger can be defined with a fixed number of sites initially but through special definition of a kinetic reactant the number of sites can vary with reaction progress Concentration changes in the number of exchange sites can be included in the KINETICS keyword under formula The combination of exchanger and kinetic reaction must be neutral EXCHANGE 1 Z is related to Goethite initial amount is 0 2 m_go 0 02 Z 0 02 eguil 1 KINETICS 1 Z has a charge of 1 0 Fe 0H 2 sorbs anions formula FeOOH 0 8 Fe 0H 2 0 2 Zz 0 2 m Oise After a batch reaction has been simulated it is possible to save the resulting exchange assemblage composition with the SAVE keyword If the new composition is not saved the exchange assemblage composition will remain the same as it was before the batch reaction After it has been defined or saved the exchange assemblage can be used in subseguent simulations through the USE keyword Example problems The keyword EXCHANGE is used in example problems 11 12 13 and 14 DESCRIPTION OF DATA INPUT 85 Related keywords EQUILIBRIUM_PHASES
559. xation and mineral equilibria 254 IhitialiCOnditiOnS nt E EE E E EEE lei 255 Recharge Waterson usutti E eE E E EEEE EA E E dem SEERE ET EEES 257 Advective transport calcyl ti nSss oeeie t aee ES a ran cra E TE a naa aa E EEEE 257 Example 15 1D Transport Kinetic biodegradation cell growth and SOrpti0N oooonncnoncnicnoonncnnnonnnnnonncnncrnnonacinncnnos 259 Transport parameters ont A AA 259 Aquedus Models Atkins etsi kusi wuds E A EEEa EA 259 Initial and boundary conditions iseset orense na a na naan a a taan aa a e aa aa aa a naa na na aa an aa anna p s 261 Kinetic degradation of Nta and cell growth 0 lee cece seen ee tan a n a a aa na a naa a na ono corno nero ena aaeen 261 Sorption reactions 3svsses NT 263 Input data Set seis costes tasa Nna NAT s e ne Mi the AIN iaa lies Ashe Beer Asse S 263 GPE CONVEREENCE mtrs pills isso 267 RRGSULES vi ti 268 Example 16 Inverse modeling of Sierra spring Waters ooooncnnnonnonnnononnnonnnononnconnonnnonncnno cono aa n a a n a eaa aa aa aa a naa aan ncnnos 269 Example 17 Inverse modeling with evaporation vossusssssses ene a aa aa a naa nono an aa naa aa na aa na aa nana a nan Aeneaan 275 Example 18 Inverse modeling of the Madison aguifer oooooossssn on a nana na naa n a aan a eaa a naa na Ua aan aan ncnnos 278 Water compositions and teactants isses Rise ask a vesan oee sE me chess LSA EE EARED ea KAAVAN E KSS ea ILA NTS sins 278 Ma
560. xide in the spring waters Garrels and Mackenzie 1967 also ignored a small discrepancy in the mole balance for potassium PHREEQC avoids the potassium imbalance by adjusting concentrations of the elements in the two solutions The PHREEQC calculations show that two inverse models can be found by adjusting concentrations by no more than the specified uncertainty limits 2 5 percent Without making the calculations with PHREEQC and considering the magnitude of uncertainties it is not clear whether the discrepancy in potassium that was ignored by Garrels and Mackenzie is significant The results of PHREEQC are concordant with the results of NETPATH except that NETPATH also must ignore the discrepancy in the potassium mole balance Table 49 Selected output for example 16 Solution 1 Input Delta Input Delta pH 6 200e 00 1 246e 02 6 212e 00 Al 0 000e 00 0 000e 00 0 000e 00 Alkalinity 3 280e 04 5 500e 06 3 335e 04 C 4 0 000e 00 0 000e 00 0 000e 00 C 4 7 825e 04 0 000e 00 7 825e 04 Ca 7 800e 05 3 900e 06 7 410e 05 cl 1 400e 05 0 000e 00 1 400e 05 H 0 0 000e 00 0 000e 00 0 000e 00 K 2 800e 05 7 000e 07 2 730e 05 Mg 2 900e 05 0 000e 00 2 900e 05 Na 1 340e 04 0 000e 00 1 340e 04 0 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 1 000e 05 0 000e 00 1 000e 05 si 2 730e 04 0 000e 00 2 730e 04 Solution 2 Input Delta Input Delta pH 6 800e 00 3 407e 03
561. xt advective dispersive transport simulation diffusion is calculated from the column ends beginning with the column composition and temperatures that exist following the first advective dispersive transport calculation except that a NaCl solution is now defined as solution 0 which diffuses into the top of the column and as solution 20 which diffuses from the bottom of the column The new SOLUTION 0 is defined with a temperature of 24 C and with 24 mmol kgw NaCl The last cell SOLUTION 20 is also defined to have this solution composition and temperature The exchanger in cell 20 is defined to be in equilibrium with the new solution composition in cell 20 EXCHANGE 20 244 User s Guide to PHREEQC Version 2 The TRANSPORT data block defines one diffusive transport period shifts 1 flow_d diffusion The boundary condition at the first cell is constant concentration and at the last cell the column is closed bcon constant closed The effective diffusion coefficient diffc is set to 0 3e 9 m s and the time step timest is defined to be 1 e10 s Because only one diffusive time period is defined shifts 1 the total time modeled is equal to the time step 1e10 s However the time step will automatically be divided into a number of time substeps to satisfy stability criteria for the numerical method The heat retardation factor is set to 3 0 thermal_diffusion 3 0 For Na the ratio of exchangeable concentration maximum NaX is 48 mmol k
562. y master species are defined for an element then the primary master species additionally must be defined as a secondary master species for one of the valence states PHREEQC will reduce all chemical reaction equations to a form that contains only primary and secondary master species Each primary master species must be defined by SOLUTION_SPECIES input to have an identity reaction with log K of 0 0 For example the definition of the primary master species so in the SOLUTION_SPECIES data block of the database phreegc dat is SO4 2 SO4 2 log K 0 0 Secondary master species that are not primary master species must be defined by SOLUTION_SPECIES input to have a reaction that contains electrons and the log K in general will not be 0 0 For example the definition of the secondary master species HS in the SOLUTION SPECIES data block of the database phreegc dat is SO4 2 9 H 8 e HS 4 H20 log K 33 65 The treatment of alkalinity is a special case and Alkalinity is defined as an additional element In most cases the definitions in SOLUTION_MASTER_SPECIES for alkalinity and carbon in the default database files should be used without modification The gram formula weight and formula are defined for convenience in converting units For example if data for nitrate are consistently reported in mg L of nitrate as NO37 then gram formula weight should be set to 62 0 or formula should be set to NO3 Then it will not be necessary to use the as
563. y to calculate pH in batch reactions and transport simulations In real solutions the sum of the equivalents of anions and cations must be zero However analytical errors and unanalyzed constituents in chemical analyses generally cause electrical imbalances to be calculated for solutions If a charge imbalance is calculated for an initial solution the pH is adjusted in subsequent batch reactions or transport simulations to maintain the same charge imbalance If mixing is performed the charge imbalance for the batch reaction step is the sum of the charge imbalances of each solution weighted by its mixing factor If a surface is used in a simulation and the explicit diffuse layer calculation is not specified then the formation of charged surface species will result in a surface charge imbalance Similarly if exchange species are not electrically 26 User s Guide to PHREEQC Version 2 neutral all exchange species in the default databases are electrically neutral the exchanger will accumulate a charge The charge imbalances of surfaces and exchangers are included in the general charge balance equation The charge imbalance for a solution is calculated in each initial solution calculation in each batch reaction step and for each cell during each time step of transport simulations with the equation N ag 1 Dan 61 i where g identifies the agueous phase T d is the charge imbalance for aqueous phase q and z is the charge on aqueous speci
564. ytical solution by a factor of about nine The deviations from the analytical solutions for each model at the end of the time step are calculated and stored with PUT statements for distances from 0 5 to 8 5 m in 0 5 m increments by the Basic program in the USER_PUNCH data block The stored results are printed in an additional simulation with a USER_PRINT data block The final simulation is a dummy calculation for pure water none of the results are printed However the calculation causes USER_PRINT to be invoked The Basic program in the USER_PRINT data block uses GET statements and prints the results stored by the USER_PUNCH Basic program during the previous TRANSPORT simulations Table 56 Input data set for example 12 demonstrating second order accuracy of the numerical method TITLE Example 12a Advective and diffusive transport of heat and solutes Constant boundary condition at one end closed at other The problem is designed so that temperature should equal Na conc in mmol kgw after diffusion Compares with analytical solution for 20 cell and 60 cell models EXCHANGE SPECIES Na X NaX log k 0 0 gamma 4 0 0 075 H X HX log k Ya gamma 9 0 0 0 K X KX log_k 0 0 gamma Sis D 0 015 20 cell model initial conditions SOLUTION 0 Fixed temp 24C and NaCl conc first type boundary cond at inlet units mol kgw temp 24 PH T0 pe 12 0 02 g 0 67 Na 24 e 3
Download Pdf Manuals
Related Search
Related Contents
Samsung RF267ABRS/XAC User Manual DWC-MD421 User Manual Entrematic Swing Door Operator EMSW EMO - Ruko e-shop ホイールボルト折損による車輪脱落事故防止のための HP 30S áÜ ÖÑ GUÍA DE INSTALACIÓN RÁPIDA Conexão Ensino Médio LEGISLATION PHARMACEUTIQUE Kuppersbusch IKEF 2480-0 User Guide Manual PDF manual de usuario por componente consulta web Copyright © All rights reserved.
Failed to retrieve file