Home
user`s guide to phreeqc—a computer program for speciation
Contents
1. PH 92 Example 1 Speciation calculation eese eese essen eene ennen onn PRE erir EE EREE EU ener inen nennen EEE nnne 92 Example 2 Equilibration with pure phases sseseeeeeseeeeeeneenneenee nennen nennen erinnerte trennen trennen nre 97 Io cupis Upeu p 100 Example 4 Evaporation and homogeneous redox reactions n nre 102 Example 5 Irreversible reactions neret etit Re EORR copi tide PERSE ER Eres b Een EP Ee rE EREE e FRE EE 103 Example 6 R action path calculdtiops ice iei eteg e iseteb e eere s Eroee Ie seb ieu Usa hice aos e ERE re sb et dte eid 105 Example 7 Gas phase calculations u et tr rte ree tO Pee E RE C tb VEEE EEN EEEE EREE 109 Example 8 Surface complex ations i s a sanan e ever Eose alea ra p ELS SIME EE TOES Pee veaeectansbhess Vea epos b aea eR 110 Example 9 Advective transport and cation exchange ees cesesceceseceeceseeeeeeeeeeseeseecaeescecaecsaecaessaeesessaeeeeseesereees 114 Example 10 Advective transport cation exchange surface complexation and mineral equilibria 116 nifial COMGIIONS e ET 117 Recharge Water ETE 119 Transport calculations ec meret Debt t i Le HERE LEE RI CH RUE ETHER Io RERE EEES ORe Ri eet tpe EEE EEES 119 Exampl 11 Inyerse
2. M 47 Example cass ua ama a ua tex sdeses A ea an E AEE EAEE ra Seesbaaestadioeda seeasbeanene 47 EEX 6 5ULDD TERRE C Sau 47 NOTES EM 47 Example problems sc u 48 Related keywords iain eicere te par eie Gb n EO ED ERROR I ERE ER CO Ee IP SEDI GI ERR 48 INVERSE MODELING PE v 49 Example uuu H E E EEr Eat 49 Exp lam atomic E erodeer eE ere eree EEEE EEEN E REEE TRENI AEEA EEEE ET 49 A o E A T E E 51 Example Problem EH X AE E a 52 Related keyword m 52 KNOBS cireni oee ia EEEE EE EEE R EE SEESE E EET EAEE sqa sab teense E E 53 Example ENE says 53 EEX pl AM Ath OM os sa secs veces MR 53 INOUES ss sscsscshecsacies cetusaseesscssaescastehdecsbapevbiaceystessesbuasieansceybtnetates dacebepsbbnaceasbevbanceseseoessdbasd antes yaustadehaessonsnseeasene 55 Example proDlerns eee EE 55 hjlbqe S 56 penult M 56 Explanati n u M M 56 INGLES usu M 56 Example probl
3. 82 EIU PL EP ya S 83 Example 83 Explanation isis as aa 83 NOTES nM 83 Example probl rnsu J u 83 TERAINSPOR M m 84 loc m ahus 84 Explanation toe iie doe een b Co ere ERE RERO SEE Ee ht Ee e EEREEEL EU Eo cepa Eee Eb Fb ree kpe REP EE tn 84 hnc pc Eassa 84 Example problems pe 85 Related Key Words m 85 MSE EE 86 Example ej ssid 86 Explanation retten eR E EER EE EE EEEE AEE EEE EEEE E E EER e ECEE verte aee ep keen 86 AOIL 5 sists conse EE OA EE EA EA EEE E E E AEE O E as asassstw 86 Example problems L ren ae aaneen ean esea oE 86 Related aou M N 87 Surimary OF data 1npult eco e tet rr ek Pre LUND UI AE IEE EERE ESEESE SE HERE NEL TER e eH EXC HER ba aote ERE ERE Ea EEEE 88 Examples c
4. bin 6 which is referred to as either the extended Debye H ckel equation if b is zero or the WATEQ Debye H ckel equation see Truesdell and Jones 1974 if b is not equal to zero A and B are constants dependent only on oO x r M x o temperature a is the ion size parameter in the extended Debye H ckel equation a and b are ion specific parameters fitted from mean salt activity coefficient data in the WATEQ Debye H ckel equation and z is the ionic charge of aqueous species i 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 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 9 gg In 10 a2 7 e for the Davies equation and D Az 3 ln 10 bi 8 n 2 u Ba Ju 1 for the extended or WATEQ Debye H ckel equation For data input to PHREEQC the chemical equation for the mole balance and mass action expression the log K and its temperature dependence and the activity coefficient parameters for each aqueous species are defined through the SOLUTION SPECIES keyword data block Master species for elements and element valence states are defined with the SOLUTION MASTER SPECIES keyword data block Composition of a solu
5. T where b is the number of equivalents e e e 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 kg H5O because the mass of water in the system may be more or less than 1 kg Equilibrium among aqueous and exchange species requires that all mass action equations for the exchange ca ks 2 species are satisfied The association reaction for the exchange species CaX is Ca 2X CaX where X 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 con vention used in the default database for PHREEQC It is also possible to use the Gapon convention in PHREEQC which uses equivalent fraction but writes the exchange reaction as 0 5 Ca X Ca 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 Se 9 a a Ga X In general mass action equations can be written as follows P os K aj o 5 10 m where m varies over all master species including exchange ma
6. HOEN HOEN HOEN HOEN HOEN HOEN HOEN HOEN HOEN 0 SL G Sc 0 GL S Sg 0 GNT 8 H XI I SHSWHd NOIHSITIn S I 9Soe9juns HSN Zz uorqn1os usn aNd i H XI I SHSWHd WNIYAITINOG I 9Soe9juns HSN zZ uorqan1os usn GN L H XI I SHSWHd NOINSITIn S T 9oe9juns HSN Z uorqan1os 4SN aNd H XI I SusvHd NOIHSITIn S 1 eoegans usn c uorjnios usn INS L H XI4 I SHSVHd WOINSITID S I 9Soe9egjuns HSN c UOTANTOS sn GN g H XA I SHSVHd WOINSITIDO S T 9Soe9gjuns HASN lt UOTANTOS ASA GN g H XA I SHSVHd WOIWNSITID S T 9oegjans HSN lt UOTANTOS ASN aNd g H XA I SHSVHd WOINSITID S T 9Soegjuns HSN lt UOTANTOS ASA GN TO H XI I SHSVHd WNANIYAITIN T 2ezIns usn z uoran os 49N 0 01 HO N 0 01 HOEN 0 01 HOEN 0 01 HO N 0 01 HO N 0 01 HO N 0 01 HOEN 0 01 HOEN 0 01 HOEN aNg SL 6 H XTA I SusvHd NOIHSITIn S I 9oegjuans HSN zZ uot AnNtTos 4SN GNI G G H XI I SHSWHd WNIYAITINOG 9oe9juns HASN Z uorqan1os 4SN aNg SgZ S H XI I SHSWHd WNIYAITINOG T goeyans HASN Z uorqan1os 4SN aNg QS H XFA T SHSVHd W IMHSITIn S I eoejans usn c UOTANTOS ASN v S8T UZ ON 0 8 H XTA I SHSVHd WO INSITID S I eoegzans usn T uorqnIos ASNA GN SL L H XI I SusvHd W lWgsITdIDn S I 9oe9gjuns HASN I uoranjos usn anal Grke
7. Z UZ 090 8z x bor Teo 8 8 u eilep H HO dd OZH Z4dd Gro BOT TOUZ IO Z C UZ OZlI LI x bor H Z Z HO qQd OZH Z z d l OxX 6L L d 3l9p v 0 Bot OTL L x bor TOUZ TO Z4UZ H HOGd OZH Z4dd 007 Th BOT c e x bot H p Z vP HO UZ OZH b Z uZ Z Z vOS PD Z FOSZ Z DO 007 8zZ x bor Teoy g0 1 u eirep H HO UZ OZH Z uZ 09v c x bor POSPO Z FOS Z4PO 006 9T BOT H Z Z HO UZ OZH Z 7 UZ S I x bor OOHPO OOH Z pP9 TeoyY ET d e3Tep 96 8 BOT po x bot H HOUZ OZH Z4UZ 2 E00 PO Z OOZ Z P9 Teoy OZZ I u eirep e z X bor TE E X BOT OODO Z 00 Z PO FOSnO Z FOS Z nO Teo 6 u eqT p 009 6 X bor 00v z x bor H P HO ND OZH p 74ND TOPO T9 Z PO 006 9z x bor Teo PpZ I Wu ei 9P H HO nO OZH Z nO 009 Zz x bor IOPO IO g P 089 I x BOT H Z HO ND OZH Z Z nO Teo 6S 0 qd eITEP 086 I X bor 0000 0 0000 f eunreb TOPO IO Z4pO 000 8 x Bor H HOND OZH Z nO OSE Lb X bor H p Z v HO PO OZH F Z DO 0000 0 000s z euureb Teo 0G9 I Y ei ep got EE X bor 0gL z X BOT H HO PO OZH Z DO nO 74ND OSE 0Z x bor 099 0 x bor H Z Z HO PO OZH Z Z DO FOST T Z vOS T TeoyY I ET Y e3T p Op9 ET x bor 080 0T x BOT H HOTT OZH T H HODO OZH Z PO Teo 080 2 V 3I9P BE boT 0
8. with the SURFACE keyword data block for the gas phase T witha GAS PHASE keyword data block The number of moles of each phase in a pure phase assemblage n is defined with the EQUILIBRIUM PHASES keyword data block Total moles of elements and total moles of pure phases may be modified by reaction calculations See Description of Data Input Aqueous Charge Balance Equation The charge balance equation sums the ionic charges of aqueous species and in some cases the charge imbal ances developed on surfaces For generality net charge on an exchanger is also included in the derivation though it is not justified by the theoretical framework 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 ele ment or element valence state to produce electroneutrality in the solution The charge balance equation is used to calculate pH in reaction 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 solu tions If a charge imbalance is calculated for an initial solution the pH is adjusted in subsequent reaction or trans port simulations to maintain the same charge imbalance If mixing is performed the charge imbalance for the react
9. Table 11 Input data set for example 5 TITLE Example 5 Add oxygen equilibrate with pyrite calcite and goethite SOLUTION 1 PURE WATER I pH 7 0 temp 25 0 EQUILIBRIUM PHASES 1 Pyrite 0 0 Goethite 0 0 Calcite 0 0 Gypsum 0 0 0 0 REACTION 1 O2 1 0 0 0 0 001 0 005 0 01 0 05 SELECTED_OUTPUT file ex5 pun si CO2 g Gypsum equilibrium phases pyrite goethite calcite gypsum END if it becomes supersaturated it can not dissolve because no moles are present The REACTION data block defines the irreversible reaction that is to be modeled In this example oxygen O2 will be added with a relative fraction of 1 0 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 O5 or by a phase name that has been defined with PHASES input Thus the phase name O2 g from the default database file could have been used in place of O2 to achieve the same result The number of moles of the element oxygen as O not O gt added in each reaction step is equal to the sto ichiometric coefficient of oxygen in O 2 times the relative fraction 1 0 times the number of moles in the reac tion step The relative fraction is useful in reactions that have multiple reactants because it defines the relative rates of reaction among the reactants SELECTED OUTPUT was used to write the partial pressure of
10. The keyword PHASES is used in example problems 1 8 11 and 12 Related keywords EQUILIBRIUM PHASES INVERSE MODELING REACTION SAVE equilibrium phases and USE equilibrium phases 58 User s Guide to PHREEQC PRINT PRINT This keyword is used to select which results are written to the output file Nine blocks of calculation results may be included or excluded in the output file for each simulation In addition the writing of results to the selected output file can be suspended or resumed and a status line which is written to the screen and monitors the type of calculation being performed can be enabled or disabled Example 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 other true Line 7 saturation indicies true Line 8 species true Line 9 surface true Line 10 totals true Line 11 selected_output true Line 12 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 above except selected output and status to true or false Default is true Optionally reset or res et Should be the first identifier of the data block Indi vidual print options may follow True or False True causes all data blocks to be included in the output file false causes all data blocks to be excluded to the outp
11. 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 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 con verted to units of molality The activity of the master species of elements except hydrogen and oxygen and ele ment 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 balance 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 con verted to molality For data input to PHREEQC all options for a speciation calculation use of an alkalinity equation charge balance equation phase equilibrium equation to adjust pH or the concentrations of an element or an ele ment valence state and redox couples are all defined in SOLUTION keyword data block See Description of Data Input Application to Initial Exchange Calculations A limited set of equations is included in initial exchange calculations that is when the composition of an exchange assemblage is defined to be that whic
12. SSES ZOTS 0 9986 9 v0 9t8vP l v0 9 60 I Auopsoteyo OZHZ vOS O 0 988S I S0 9tIV I S 0 9008 I unsddA5 008 v0 986l I S0 evL8 8 PO0 evzl I aroteo TOPN S0 S90TL T S0 9067 I 80 9009 SATEEN ZOO P0 eb89 c PO ebLV z pO pr0 5 zoo MISES ll k i S SS SS s p HO SOZTSZIV v0 96SI I vY0 9 0v I v0 9282 1 93rur oex gt s OZHZ POSeD G0 988S8 1 S0 ETP T S0 00S I unsd amp 5 0049000 T 00 9000T 00T99007T G MOPARTS TON S0 90IL I S0 9069 1 0 9009 1 earreH 00FS900T 09390007 T 00 20007T T o MOPS ECS umurrxemq UnuTUurW sz jsuezqa e ou eseud REESE OEE EN SEUOTIOEMI HOFSIHIOS 00 8000 T 00 8000 T 00 8000 T Z uorantos R L S a NE EE ed s 00 9000 1 0049000 1 00 9000 1 I uorantos Fee ee 050009 0 T GQ 5005 C 1218 unurxey UnururW Suor3oeaj UOT NTOS 00 2000 0 00 9000 0 00 9000 0 Z S 00 2000 0 00 9000 0 00 9000 0 0 0 0 9001 004900070 0 9001 5 TS K ee ee 5 ss ch S0 S00S Z 00 29000 0 GS0 S 00S Z2 9 S S0 9110 L L0 96L6 8 SO STOT L BW 00 9000 0 00 98000 0 00 8000 0 Z s ae Rn ursa o a 00 9000 0 00 9000 0 00 9000 0 0 0 eee eee a eee oese Oye 70 2806S Z 00 9000 0 p0 28066 Z eN 0 9000 00 9000 0 S0 9000 TO S0 TTO L 10 2086 8 SO TOT L Sw vO 9999 C 90 9108 9 v0 9009 c7 e9 GO0 00T 7 90 28000 T 60 9000 F 0 966l I 00 8000 0 0 9660l I 9 2 004900070 0049000 0 le Ooto 0 H 00 2000 0 00 9000 0 00 9000 0 p 9 S0 2000
13. or possibly Ina in speciation calculations Indy explicit diffuse layer calculation u and Inay 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 cal culation may be dropped if a pure phase or gas phase does not exist at equilibrium The solution technique assigns initial values to the master variables and then uses a modification of the Newton Raphson method iteratively to revise the values of the master variables until a solution to the equations has been found within specified tolerances 22 User s Guide to PHREEQC 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 equations is formulated r pe re 69 J The set of equations is linear and can be solved simultaneously for the unknowns dx New values of the unknowns are calculated did xj 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 probl
14. 00 9000 0 00 9000 0 00 8000 0 na S A OOl ssss nn nnn nnn 00 9Z2IZ 9 Z20 9Z29Z l 0Q00 9002 9 Hd suorae no eo bur epou eszsaut jo buruurbeg sp wetampos 000 0 0 0 0 O he es LL ejdurexe 104 ndino pejoejes oz aIqeL 123 EXAMPLES 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 19 is on two lines but the program interprets the two lines to be a single logical line because of the backslash V 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 uncertainties 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 for example the balances identifier can be used to include those elements in the formulation of the inverse modeling equations see example 12 In addition the balances identifier can be used to specify uncertainties for an element in each solution For demonstration purposes in the example the uncertainty
15. Each data block begins with a line that con tains the keyword and possibly additional data followed by additional lines containing data related to the key word The keywords that define the input data for running the program are listed alphabetically END EQUILIBRIUM PHASES EXCHANGE EXCHANGE MASTER SPECIES EXCHANGE SPECIES GAS PHASE INVERSE MODELING KNOBS MIX PHASES PRINT REACTION REACTION TEMPERATURE SAVE SELECTED OUTPUT SOLUTION SOLUTION MASTER SPECIES SOLUTION SPECIES SURFACE SURFACE MASTER SPECIES SURFACE SPECIES TITLE TRANSPORT and USE Keywords and their associated data are read from a database file at the beginning of a run to define the aqueous model Then data are read from the input file until the 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 termi nated 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 Each simulation may contain one or more of five types of speciation reaction and transport calculations 1 initial solution speciation 2 determination of the composition of an exchang
16. H XI I SHSWHd WNAIXAITIN H T eoeguns 4SN T uoranrios 4SN GNI SZ L H XI I SHSWHd WNIYEITINOG T 9Soegjans HSN I UO NTOS usn aNg 0 L H XI I SHSVHd NOINSIJIIDOS penumnuo2 g ejdurexe Jo jas eyep ndul 9L qe L 113 EXAMPLES o l e Zn 10 MOLAL MOLALITY 7 uu Zn 10 MOLAL Fe OZn 10 5 0 6 0 7 0 8 0 pH Figure 4 Distribution of zinc between the aqueous phase and strong and weak surface sites of hydrous iron oxide as a func tion of pH for total zinc concentrations of 107 and 10 molal Example 9 Advective 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 solution 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 Dispersion is included in the calculations of Appelo and Postma but PHREEQC lacks the capability to calculate dispersive effects The input data set is listed in table 17 The column has 40 cells to be consistent with
17. HO ea LET 0 c26 LI S6L Ll 81 9L61 I 81 9v09 1 zon LZl 0 80 8 I81 8 60 evc6 v 60 S6S 9 v HO 94 81 9v09 I s o 890 0 BGP LS LYS L 80 9LIE 80 8078 Z HO 84 TE0 Z 820 6v 966 9y 004900070 004900070 ven 80 91IL ea 890 0 O0ZL Vvc L8L VC GZ 8906 T SZ ZE9 T p HO N LZl 0 0S9 9Z 2S 97 LZ 86 7 Z LZ 9666 Z pOSH J LZl 0 LIT TZ 066 02 ZZ 91 9 L IZz 9Z220 I S HO N LZE 0 IIZ 02 v80 02 IZz 99v1 9 IZ S8 Z7 8 HOSd IZz 9220 I n LZl 0 16 61 98L 6T OZ TZZ T OZ 9 9 T E00H 4 80S 0 6 9 01 IEI OI II 9v6z z II 988 L Z VOTSCH 890 0 Zr9 61 OIL 6I 02 9082 2 0Zz 9286 I goo a LEL 0 269 G S9S G 90 9ct0 c 90 9tcL c VOTSEH 890 0 8vc 6I SIE 6I 02 92S9 G 02 96t8 v rosea 890 0 180 v SPI F gt S0 890 8 S0 90II L vOTStH LET 0 SEC 6 601 61 02 9608 G8 02 9I8L L 1994 S0 9ez28t L TS T90 EZE 8T Z8Z 81 61 9v6l I 6T EZZ S Z a LET 0S9 97 ZS 97 LZ 26 7 Z LZ 2666 Z pOSH 4 61 9926 9 2 a 80S 0 I88 GC L SZ 9Z 9TE T 92 98t 7 V Z pOSH J 8900 8L 61 0S88 61I 02 8679 T 0z 9zIv I T0 8d 890 0 8vZ 61 GIE 61 0z ezs9 G 0Z2 96 8 Y posed EZT O 9 2 61 601 6I 02 9608 G 0Z 918L L TO 4d LZl 0 c 61 961 61 0z 96vL Y 0z 9z9 9 c vos ea LZl 0 O 81 02 8I 6I 9089 v 61 90L2 9 710 84 LZl 0 680 8I Z96 LI 61 99Sl1 8 81 9 60 I posed 80S 0 LZG 81 610 81 6I 9vPL6 Z 61 89L5 6 Zz lo9e
18. If more reaction steps are defined in REACTION input than temperature steps in REACTION TEMPERATURE then the final temperature will be used for all of the additional reaction steps If more temperature steps are defined the final reaction step will be used for any remaining temperature steps Example 2 Line 0 REACTION TEMPERATURE 1 Three implicit reaction temperatures Line 1 15 0 35 0 in3 steps Explanation 2 Line 0 REACTION TEMPERATURE number description Same as example 1 Line 1 temp temp in steps temp temperature of first reaction step in Celsius temp 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 G 1 steps 1 culations as example 1 If more than steps reaction steps are defined by REACTION input the temperature of the additional temperature steps will be temp If more temperature steps are temp temp temp temp Example 2 performs exactly the same cal defined the final reaction step will be used for any remaining temperature steps Notes The default temperature of a reaction step is equal to the temperature of the initial solution or the mix ing fraction averaged temperature of a mixture REACTION TEMPERATURE input can be used even if there is no REACTION input The implicit method of calculation of temperat
19. Line 1c Gibbsite c 0 0 KAIS1OS8 1 0 Line 1d Calcite 1 0 Gypsum 1 0 Line le pH Fix 5 0 HCl 10 0 Explanation Line 0 EQUILIBRIUM_PHASES number description EQUILIBRIUM PHASES is the keyword for the data block Optionally EQUILIBRIUM EQUI LIBRIA PURE_PHASES PURE number positive number to designate this phase assemblage and its composition Default is 1 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 description is an optional character field 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 default database file or in the current or previous simulations of the run The name must be spelled iden tically to the name used in PHASES input except for case saturation index target saturation index for the pure phase in the aqueous phase line 1a for gases this number is the log of the partial pressure line 1b Default is 0 0 The target saturation index may not be attained if the amount of the phase in the assemblage is insufficient alternative formula chemical formula that is added or removed to attain the target saturation index By default the mineral defined by phase name dissolves or precipitates to attain the target sa
20. OOH Z 4dd 0v9 01 bor Z z 02 dd Z 0D Z z ad OvZ L bol 00dd Z 09 Z4dd Teoy G u e3I p 08 T bot Z vVIOdd IO v Z4dd Teox Ll Z d e3T p 00L I BOT TOdd TO Z qd Teox g0 T u eiTep 008 1 x bor ZTOqd TO Z Z qa Teo 8 vp u eqTEp 009 I x bor p nunuoO 3D33tiHd W014 panuep ej seqeleq I Vq ODO33tiHd 8 1u uuu39ellv User s Guide to PHREEQC 140 Teo OI6 Y e3I9P SH Ct94 H Sea 602 Z X bor add seg Z vOS Z 493 OZH L OZHL vOS943 arz quer W Teoy O00 II d eiTep 6Lv 81 x bor Tleox OLI 8 Y e3 ep SH Z 494 Z H Z S9 4 OLL I X bor e3ra gd EHN HN 5 EHN T68 v x bor OZH 494 H HO ea Teoy L Y ei 9P HO ea 098 z x bor YHO PHO 000 I Xx bor 5 pHo OZH Z 494 H HOO 4 arua os Te2oX OLG P Y e3T p L66 0 X bor Te2xX Gvp8 0 Y e3 9P SZH SZH 800 7 x bor 5 SZH OZH 494 Z H 9 OZed ar3eu H Teox 8SE T yY eqTep 092 X bor 099 8T X BOT ZN ZN OTSPH C4DW Z OZHS 0 H v OCHE HOG LOE ISZDW 5 ZN p earroerdes Te9X 6SL I V e3iTeP Te2X OOL OT Y e3 9P OSI g x BOT O9L SI x bor ZH ZH POTSPH Z DW Z OZHG 0 H OZHE HOGS LOE ISZ W 6 ZH ea3rrordes TeoyY PP8 I U eatp v681 9 I LIEOT 0 0 8vtZ tl oT ATeue 096 Z x bor TeOyY 008 9p Y e3il9p ZO ZO 002 2 X bor 6 Zo Z4DW PO
21. Optionally debug model or debug m 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 program the default value is false If this option is set to true a large amount of information about the Newton Raphson equations is printed The program will print some or all of the fol lowing at each iteration the array that is solved the solution vector calculated by the solver the residuals of the linear equations and inequality constraints the values of all of the master vari ables and their change the number of moles of each pure phase and phase mole transfers the number of moles of each element in the system minus the amount in pure phases and the change in this quantity The printout is very long and very tedious If the numerical method does not converge in iterations 10 iterations this printout is automatically begun Line 9 debug inverse True or False debug inverse includes debugging prints for subroutines called by subroutine inverse models Optionally debug inverse or debug_i nverse 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
22. The saturation index for the mineral S7 p 1s defined to be Cn p m SI log 34 P The function used for phase equilibrium in the numerical method is fy Ink In 10 7 toner 23 6 In a 35 m where S7 is a specified target saturation index for the phase see keyword EQUILIBRIUM PHASES p target and In 10 converts base 10 log to natural log For single component gas phases Sr is equivalent to the target log of the partial pressure of the gas The total derivative with respect to the master unknowns is df en pdn a 36 m For data input to PHREEQC the mass action equations equilibrium constant and temperature dependence of the constant for pure phases are defined with the PHASES keyword data block Initial composition of a pure phase assemblage is defined with the EQUILIBRIUM_PHASES keyword data block See Description of Data Input Mole Balance Equation for a Surface Mole balance for a surface site is a special case of the general mole balance equation The total number of moles of a surface site is specified by input to the model The sum of the moles of all of the surface species for the site must equal the total number of moles of surface sites The following function is derived from the mole balance relation for a surface site fs T b ni 37 14 User s Guide to PHREEQC where the value of the function f is zero when mole balance is achieved 7 is the number of equ
23. W 0 017 dn 20 i l The master unknown is the natural log of the activity of water lonic Strength The ionic strength of the aqueous solution is a master unknown and is defined as follows _ 1 2 i 21 b aw i aq The function f is defined as follows 1 2 f W i 5 ni 22 i and the total derivative of this function is 1 2 df MW dln W W du 32 5 dn Q3 l Equations for Equilibrium with a Multicomponent Gas Phase Equilibrium between a multicomponent gas phase and the aqueous phase is modeled with additional heter ogeneous mass action equations Only one gas phase can exist in equilibrium with the aqueous phase but the gas phase may contain multiple components The fugacity or activity of a gas component is assumed to be equal to its partial pressure PHREEQC assumes the total pressure of the gas phase in equilibrium with a solution is fixed and is specified as P aI If the sum of the partial pressures of the gas components in solution is less than Pjo q the gas phase does not exist The additional master unknown for the gas phase is the total number of moles of gas in the gas phase including all gas components N 4s The number of moles of a gas component g in the gas phase is no A mass action equation is used to relate gas component activities fugacities to aqueous phase activities PHREEQC uses dissolution equations in the sense that the gas component is assumed to be on the left hand side
24. of the chemical reaction For carbon dioxide the dissolution reaction may be written as follows CO Q4 CO 2 8 2 aq The Henry s law constant relates the partial pressure of the gas component to the activity of aqueous species For carbon dioxide the Henry s law constant is 1071468 equilibrium and the following mass action equation obtains at 1 468 Peg 10 aco 25 where Po 0 is the partial pressure calculated using activities in the aqueous phase In general the partial pressure of a gas component may be written in terms of aqueous phase activities as follows 12 User s Guide to PHREEQC 1 Cm g P Sgillinn Q6 m where P 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 is the stoichiometric coefficient of master species m in the dissolution equation The values of c may be positive or negative For PHREEQC terms on the left hand side of a dissolution reaction are assigned negative coefficients and terms on the right hand side are assigned positive coefficients At equilibrium the number of moles of a gas component in the gas phase is equal to the partial pressure of the gas times the total number of moles of gas in the gas phase N P tes Ioas Cm g 2 no T gas g K am c 27 8 m The total derivative of the number of moles of a gas component in the gas phase is dh
25. surface binding site name surface master species surface binding site name name of a surface binding site It must begin with a capital letter followed 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 Notes In this example a surface named Surf has a strong and a weak binding site Association reactions for each binding site must be defined with SURFACE SPECIES The number of sites in moles for each binding site must be defined in the SURFACE keyword data block The surface area per gram and the number of grams of the sur face bearing material are also defined with the SURFACE keyword data block In setting up the equations for a simulation that includes multiple binding sites one mole balance equation is included for each binding site for each surface and one charge balance equation is included for each surface including all of its binding sites All reactions for the binding sites of a surface Surf s and Surf w in this example must be written in terms of the surface master species Surf sOH and Surf wOH in this example Each surface master species must be defined by an identity reaction with log K of 0 0 in SURFACE SPECIES input Example problems The keyword SURFACE MASTER SPECIES is not used in the examp
26. the solution composition will remain the same as it was before the reaction After it has been defined or saved the solution may be used in subsequent simulations through the USE keyword Example problems The keyword SOLUTION is used in all example problems 1 through 12 Related keywords SOLUTION MASTER SPECIES SOLUTION SPECIES SAVE solution and USE solution DESCRIPTION OF DATA INPUT 71 SOLUTION MASTER SPECIES SOLUTION MASTER SPECIES This keyword is used to define the correspondence between element names and aqueous primary and sec ondary 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 Line 0 SOLUTION MASTER SPECIES Line 1a H H 1 0 1 008 1 008 Line 1b H 0 H2 0 0 1 008 Line 1c S SO4 2 0 0 SOA 32 06 Line 1d S 6 SO4 2 0 0 SO4 Line le SC2 HS 1 0 S Line 1f Alkalinity CO3 2 1 0 Ca0 5 CO3 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 name of an element or an element name followed by a valence state in parentheses The elem
27. 0 estimated Ca 233 Mg 679 Na 5820 K 193 S 6 1460 Cl 10340 Br 35 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 C1 187900 Br 2670 INVERSE MODELING solution 1 2 uncertainties 025 balances Alkalinity 1 Br K Mg phases H20 pre gypsum pre halite pre PHASES H20 H20 H20 log_k 0 0 Halite NaCl Na Cl log_k 1 582 END EXAMPLES 125 Example 12 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 H5O The important concept in modeling evaporation is the water mole balance equation that is included in every inverse problem formulation see 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 of water gained or lost in homogeneous hydrolysis and complexation reactions This example uses data for the evaporation of Black Sea water that is presented in Carpenter 1978 Two analyses are selected the initi
28. 000 G eunre6 L900 v1 N 0 0 ON N 000 0 X bor S o r SH z S Z 00 Z OO kos 0 0 vOS 9 S 790 ZE pos 0 0 Z vOS S 0S10 0 000S euure6 soos G 0 OD0 S 0 9D 0 I Z 00 AarurTexXTV 000 0 X bor PHO 0 0 PHO p O 9 TO 00H 0 z 02 p O TETO ZI EODH 0 z Z 00 5 00070 X bor ESP SE TO 0 0 12 39 VOTSPH POTSPH v80 8z ZOTS 0 0 VOTSTH TS 29 L8 as 0 0 Z IS Is OIZl 0 0092 G ewwep pe Let eg 0 0 z eg eg 00070 X bor SI86 97 TY 0 0 TW TV Z IS 724318 uW 0 0 E UN UW uW 0 0 Z UW Z UN 0000 0 0000 S ewwep 8 6 vG uW 0 0 Z UW uW 000 0 x bor ed 0 z 494 ea c ed 7 ed ea 0 0 Z9 z 93 LvY8 SG ed 0 0 Z a ea 0000 0 0000 6 eunreb 0l 6 x 0 0 3 x 00070 X bor 8686 2z eN 0 0 eN eN TV E4TV STEPS on 0 0 Z4bW DW 80 0F RD 0 0 2 95 eJ 00000 0000 9 euureb 0 0 0 0 OZH 2 20 000 0 x bor o 0 0 zo 0 0 Z UW Z UW 00 91 o 0 0 OZH o 0 0 0 0 0 0 a 0000 0 0000 9 eure b 0 0 ye H T H 00070 x bor H 0 0 ZH 0 H 493 Z 4 800 T H I H H OSIO 0 ooos s eunreb5 MJ queuele einudgog Mjb Xl Seroeds qu u T g 00070 X bor iX 4M SHIOHdS YALSVW NOTINTOS JjouauHd WO peAuep l esegereq Lva 90JJHYHd 8 1ueugoeny 135 Attachment B Description of Database Files and Listing 096 0 X bor TET X bor 329 d Z 29 POSPHN Z OS FHN Teoy pre u eiTep 0000 0 000S z eunreb 80P I X bor Teox SG0 L81 Y e3T9p POdZHeO vOdZH Z 29 LLO 61
29. 0049000 0 0 9000 E 12 v0 9tt6 8 90 996L l TVv0 9IS6 8 A3TUIT XIV v0 eGg99 z 90 T0S 9 P0 e009 Z ES 00 9000 0 00 9000 0 00 9000 0 1T 0 96670 I 004900070 0 966I0 I p O DOTS Ess T Se eens n s i g uoraniosg 00 9000 0 00 9000 0 00 9000 0 v 9 j F s I t E E onc D oc M airo x Ad S0 9000 01 00 9000 0 0 8000 T 9 s 0049000 0 00 9000 0 00 9000 0 z S TE MORELOS 00 9000 0 00 9000 0 00 000 0 0 0 v0 90v I 00 9000 0 Yv0 90vE TI eN v0 90EL C 00 2000 0 s v0 90 L C TS G0 2006 Z 00 9000 0 G0 9006 Z OW S0 9000 1 00 9000 0 0 8000 T 9 S GO S80EL Z L0 9000 L S0 9008 Z 3 00 000 0 00 9000 0 00 9000 0 2 2 00 000 0 00 8000 0 00 8000 0 0 H 00 9000 0 00 9000 0 00 9000 0 0 0 S0O 00FP LI 00 49000 0 GS0O O0P LI ta v0 90vE I 00 9000 0 Yv0 90vE I eN S0 90IbP L 90 9006 G0 9008 L e2 0 9006 7 00 8000 0 GS0 9006 2 at v0 9sz8 L 00 9000 0 0 8G78 L 9 2 S0 90 L c L0 9000 L S0 8008 C a 00 2000 0 00 9000 0 00 9000 0 7 9 00 2000 0 00 9000 0 00 9000 0 0 H pO s 90 00S S Fv0 9082 A3TUTTe3TV S0 00FP I 0O00 000 0 S0 00FP LI T2 00 000 0 00 000 0 00 9000 0 TV S0 90Iv L 90 9006 3S30 9008 L ep 00 ZIZ 9 Z0 Z Z I 00 800z 9 Hd po SZ8 L 00 8000 0 Yv0 9Ss28 L 2 uoranTos 00 9000 0 00 9000 0 00 9000 0 v 9 VO 8SEETE 90 8005 S Yv0 9082 A3TUTTEXTV
30. 1 0 a p 1 0 If phases are known only to dissolve or only to precipitate the mole transfer of the phases may be constrained to be nonpositive or nonnegative o 20 84 or o 0 85 If inorganic carbon is included in the inverse model one additional equation is added for each aqueous solu tion Unlike all other mole balance quantities which are assumed to vary independently alkalinity pH and inor ganic carbon must be assumed to co vary The following equation is used to relate values for each of these quantities oC oC Ga JATE DAI q JPH pH q 86 where the partial derivatives are evaluated numerically for each aqueous solution Inequality constraints equation 82 are also included for carbon 4 alkalinity and pH for each aqueous solution The system of equations for inverse modeling as formulated is nonlinear because it includes the product of unknowns of the forma T a T a _ However if the following substitution is made q mq m q q m q q mq Em q 7 0 Og 87 then the mole balance equations can be written as follows Q Q d PX E tU 2 Yen p 0 88 q q p the charge balance equation can be rewritten as follows str pret us 0 89 m the inequality constraints can be written as follows En ql H Mg n q oy and the relation among carbon 4 pH and alkalinity is dC oC Ca 7 JAIR Alka pH pla P All of these equality and inequality equations ar
31. 648 5695 Additional copies of this report are available from 4 User s Guide to PHREEQC U S Geological Survey Earth Science Information Center Open File Reports Section Box 25286 MS 517 Denver Federal Center Denver CO 80225 0046 For additional information write to the address on page ii of this report Installation and Setup of the DOS Version The self extracting file PHRQCSFX EXE obtained by anonymous ftp or from the distribution diskette should be copied to a directory on the hard drive of the microcomputer where PHREEQC is to be set up and exe cuted To retain pre designed sub directories during extraction type PHRQCSFX D at the DOS prompt for the hard drive During extraction the executable file PHREEQC EXE and database files PHREEQC DAT and WATEQ4F DAT are extracted in the directory where PHROCSFX EXE was copied here CAPHREEQC is used as an example The source code is extracted in the sub directory CAPHREEQCNSRC The sub directory CAPHREEQCNEXAMPLESN contains the files for each simulation described in the Examples section of this manual To run the examples in the EXAMPLES sub directory it will be necessary to copy the executable and data files PHREEQC EXE and PHREEQC DAT from the top level directory into the EXAMPLES sub directory Then PHREEQC can be invoked from this sub directory with any of the following commands phreeqc The program will query for each of the needed files phreeqc input The i
32. A simpler approach to determining the reaction path is simply to react microcline incrementally allowing the stable phase assemblage among gibbsite kaolinite muscovite and microcline 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 14 microcline dissolution ranges from 0 03 to 190 88 mmol In part B table 13 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 microcline point F However the exact locations of points A through F will not be determined with the arbitrary set of reaction increments that are used in part B The reaction path calculated by part B is plotted on the phase diagram in figure 2 with points A through F from part A included in the set of points 108 User s Guide to PHREEQC Example 7 Gas Phase Calculations This example demonstrates the capabilities of PHREEQC to model the appearance and evolution of a fixed pressure multicomponent gas phase a bubble Gas liquid reactions can be modeled in two ways with PHRE EQC a gas can react to maintain a fixed partial pressure using EQUILIBRIUM PHASES keyword or a fixed total pressure multicomponent gas phase can be modeled using the GAS PHASE keyword Conceptually the difference between the two approaches depends on the size of the gas reservoi
33. 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 alge braic equations for a single calculation Default 100 Line 2 tolerance tolerance tolerance allows changing the tolerance used by solver to determine numbers equal to zero Option ally tolerance or t olerance This is not the convergence criterion used to determine when the algebraic equations have been solved The convergence criteria are hard coded in the pro gram and can not be modified with the input file tolerance positive decimal number used by the routine c11 All numbers smaller than this number are treated as zero This number should approach the value of the least significant decimal digit that can be interpreted by the computer The value of tolerance should be on the order of 1e 12 to le 14 for most computers and most simulations Default is 1e 14 Line 3 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 4 pe step size pe step size pe step size allows ch
34. Halite NaCl 0 016 Gypsum CaSO42H O 015 Kaolinite ALbSi Os OH 033 Ca Montmorillonite Cag 7AL 45815 50419 OH 081 CO2gas CO 427 Calcite CaCO3 115 Silica S10 0 Biotite KMg3AI1Si30 9 OH 014 Plagioclase Nap 62Cap 38 Al 38510 6208 175 The keyword INVERSE MODELING is used to define all of the characteristics of the inverse modeling calculations including the solutions and phases to be used the mole balance equations to be included the uncer tainties to be used whether all or only minimal models will be printed and whether ranges of mole transfer that are consistent with the uncertainties will be calculated A series of identifiers sub keywords preceded by a hyphen are used to specify the characteristics of the inverse model The input data set for this example is given in table 19 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 solutions 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 ina SOLUTION keyword data block but solutions defined by reaction calculation in the current or previous sim
35. I bo H pOTSEH OFSHH ODHUN OOH Z UNW TeoyY 0L9 I Y e3T p 006 F bo 009 0Z X bor OOUW Z 09 Z UNW 94TV A 9 TV OTEO bo Teoyx OvP8 I uU e3I9Dp IOUN IO C UN 009 02 x bor SATW d S E4lV 0sc 0 bo ZIOUN TO C ZUN Teox 00Zz z V eiTep 00 6T oT 0T9 0 bo pdTW d F E IV IOUN TO Z UW Teoy 09l Zz V e3i ep TeX OOP PT Wu e3I9P 008 9T BOT 069 0T bo JIV 4 C 1TV H HOUW OZH Z UNW Te9X 086 1 u e3T P Teox b s y e3 ep 00L ZI BOT 0 v1 x bor ZUIV d Z E IV gad d J 484 Teoy 090 I u e3I p Teox 8 v uq ei ep 000 L BOT 8 OT BOT 4dTW J 1V Zd d 1 Z 494 9v 0 x bor Teo L Z d e3I9P Z VOSHIV FOSH IV z 9 BOT 2 494 d 494 Teoy II u eaqTep o s x bor EP S BOT Z pOS TW Z FOSZ E TW Z POd HOd vOdZH 494 Ieox 6Z Z d e T p Teox 9L G d e3I9P cre X bor E S BOT POSTV Z vOS IV FOdH 4 pOdH 494 S98 vI 6 89ITlI 0 0 8LS TS or3 reue Teox 09 U e34Tep Teox O0 Zzv Wu eiT9p 8 G x bor L gg x bolt Z vOS e3 Z vOS i p nunuoO 3D33tiHd W014 peauep ej seqeleq Vq OO33tiHd 8 juewYoeny User s Guide to PHREEQC 138 TOqd T dd Teo 96 01 u eITEP 0 X bor 09 9 x bor Z vIOUZ TOb Z UZ H HOZdd OZH Z Qd Z Teo 96 6 qd eITEP 00L 6 x bor S o x BOT H P Z v HO dd OZH Z qd TOUZ TO2
36. 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 process 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 10 logfile True or False logfile prints information to a file named phreeqc log Optionally logfile or 1 ogfile 54 User s Guide to PHREEQC KNOBS 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 Atthe start of the program the default value is false If this option is set to true information about each calculation will be written to the log file 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
37. PHASES input This phase will be used in calculating satu ration indices in speciation modeling but could also be used without redefinition for reaction or inverse modeling within the computer run The output from the model table 4 contains several blocks of information delineated by headings First all keywords encountered in reading 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 The next heading is 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 1 kg of water is assumed During reaction calculations the mass of water may change and the number of 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 exa
38. SPECIES Ay Az As A4 As Five values defining log K as a function of temperature in the expression A A logjyK A A T A log I T where T is in Kelvin Line 5 gamma Debye H ckel a Debye Hiickel b gamma indicates activity coefficient parameters are to be entered Optionally g amma If gamma is not input for a species for charged species the Davies equation is used to calculate the activity coefficient logy A Tu _ 0 341 for uncharged species the following 1 Ju equation is used logy 0 1 If gamma is entered then the equation from WATEQ Truesdell 2 Az Ju 1 Ba Ju cient u is ionic strength and A and B are constants at a given temperature and Jones 1974 is used logy bu In these equations y is the activity coeffi Debye H ckel a parameter a in the WATEQ activity coefficient equation Debye H ckel b parameter b in the WATEQ activity coefficient equation Line 6 no check no check indicates the reaction equation defining aqueous species should not be checked for charge and elemental balance Optionally no check or n o check By default all equations are checked 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 equa tion However the identifier mole balance is needed to ensure that the proper number of atoms of each element are included in mole balance e
39. SURFACE DESCRIPTION OF DATA INPUT 87 SUMMARY OF DATA INPUT END EQUILIBRIUM PHASES Line 0 Line 1 EXCHANGE Line 0 Line 1 Line 0 Line 1 Line 2 EQUILIBRIUM_PHASES number description phase name saturation index alternative formula or alternative phase amount Example 1 EXCHANGE number description chemical formula amount Example 2 EXCHANGE number description equilibrate number exchanger name amount EXCHANGE MASTER SPECIES Line 0 Line 1 EXCHANGE MASTER SPECIES exchange name exchange master species EXCHANGE SPECIES Line 0 Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 EXCHANGE SPECIES Association reaction log k log K delta h enthalpy units analytical expression A A A3 Ay A5 no check mole balance formula GAS PHASE Line 0 Line 1 Line 2 Line 3 Line 4 GAS PHASE number description pressure pressure volume volume temperature temp phase name partial pressure INVERSE_MODELING 88 Line 0 Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 INVERSE MODELING number description solutions list of solution numbers uncertainty list of uncertainties phases phase name constraint balances element or valence state name list of uncertainties range maximum minimal tolerance tol User s Guide to PHREEQC KNOBS Line 0 Line 1 Line 2 Line 3 Line 4 Line 5
40. SURFACE GAS PHASE and EQUILIBRIUM PHASES keyword data blocks Reactions are defined with MIX REACTION REACTION TEMPERATURE and USE keyword data blocks Transport calculations are specified with the TRANSPORT keyword data block See Description of Data Input NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING 2f EQUATIONS AND NUMERICAL METHOD FOR INVERSE MODELING In inverse modeling one aqueous solution is assumed to react with minerals and gases to produce the observed composition of a second aqueous solution The inverse model calculates the amounts of these gases and minerals from the difference in elemental concentrations between the two aqueous solutions It is also possible to determine mixing fractions for two or more aqueous solutions and the mass transfers of minerals necessary to pro duce the composition of another aqueous solution The basic approach in inverse modeling is to solve a set of linear equalities that account for the changes in the number of moles of each element by the dissolution or precipitation of minerals Garrels and Mackenzie 1967 Parkhurst and others 1982 Previous approaches have also included an equation to conserve electrons which forces oxidative reactions to balance reductive reactions 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 PHREEQC expands on these previous approache
41. Society p 857 892 Parkhurst D L Christenson Scott and Breit G N 1993 Ground water quality assessment of the Central Oklahoma Aqui fer Geochemical and geohydrologic investigations United States Geological Survey Open File Report 92 642 113 p To be published as United States Geological Survey Water Supply Paper 2357 C Parkhurst D L Plummer L N and Thorstenson D C 1982 BALANCE A computer program for calculating mass trans fer 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 calcula tions U S Geological Survey Water Resources Investigations Report 80 96 p 195 Revised and reprinted August 1990 128 User s Guide to PHREEQC 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 Journ
42. Survey Circular 79 p 60 77 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 Mineralogy vol 23 Chapt 5 p 177 260 Dzombak D A and Morel F M M 1990 Surface complexation modeling Hydrous ferric oxide New York John Wiley 393 p 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 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 H 0 system to high ionic strengths at 25 C Geochimica et Cosmochim ica 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 SO4 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 197
43. a conflict with the key word PRINT modulus Printing to the output file will occur after every modulus transport steps Default 1 Line 4 selected_output modulus selected_output Results will be written to the selected output file during transport step numbers that are evenly divisible by modulus Optionally se lected_output Note the hyphen is required to avoid a conflict with the keyword SELECTED_OUTPUT modulus Printing to the selected output file will occur after every modulus transport steps Default 1 Notes The transport capabilities of PHREEQC are derived from a more complete formulation of 1 dimensional advective dispersive transport presented by Appelo and Postma 1993 In this example a column of five cells ncell is modeled and 5 pore volumes of filling solution are moved through the column nshift ncell is 5 Most of the information for transport calculations must be entered with other keywords Transport assumes that solutions with numbers 0 through ncell have been defined using SOLUTION input or SAVE These solutions represent the infilling solution solution 0 and the initial solution in each cell 1 through ncell 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 and a gas phase can be defined for each cell through EXCHANGE SURFACE GAS PHASE or SAVE keywords with the identify
44. an irreversible reactant with a negative reaction coefficient in the REAC TION keyword input or 2 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 keyword data block is used to simulate con centration of rain water by approximately 20 fold by removing 95 percent of the water The resulting solution con tains 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 9 contains four keywords 1 TITLE is used to specify a descrip tion 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 reaction calculation as solution number 2 Table 9 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 p 1 CO2 g 3 5 S 6 1 3 N 3 208 N 5 23
45. and log Pc increase At some point between 10 and 50 mmol of oxygen added gypsum reaches 2 saturation and begins to precipitate When 50 mmol of oxygen have been added a total of 12 73 mmol of gypsum has precipitated After 1 or more millimoles of oxygen have been added the Pc is much greater than atmo 2 spheric 103 atm If the system is assumed to be open to the atmosphere carbon dioxide should be included as one of the equilibrium phases with a target partial pressure of atmospheric which would allow the simulated release of carbon dioxide to the atmosphere Example 6 Reaction Path Calculations In this example the precipitation of phases as a result of incongruent dissolution of microcline potassium feldspar is investigated Only a limited set of phases microcline gibbsite kaolinite and muscovite potassium mica 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 13 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 two ways 1 the individual intersections of the reaction path and the phase boundaries on a phase diagram can be calculated or 2 the reaction path can be calculated incrementally In the former approach no knowledge of the amounts of re
46. be possible to dissolve the entire amount without reaching the target saturation User s Guide to PHREEQC EQUILIBRIUM PHASES index in which case the solution will have a smaller saturation index for this phase than the tar get saturation index If amount is equal to zero then the phase can not dissolve but will precip itate if the solution becomes supersaturated with the phase Notes If just one number is included on line 1 it is assumed to be the target saturation index 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 only precipitate if the solution is supersaturated with this phase either by initial conditions or through disso lution of pure phases or other specified reactions mixing or stoichiometric reactions It is possible to maintain constant pH conditions by proper specification of an alternative formula and a phase PHASES input Line le would maintain a pH of 5 0 by adding HCI provided a phase named pH Fix were defined with reaction H H and log K 0 0 see example 8 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 f
47. bor Z eO G Z VOdH OZH H v HOE pOd Ged oqtyedeAxorpAy Tp 089L 0 9 S 0 9 lI oT3 T eue TeoyY 0S 9 Y eITEP 0L6 6 X bor Z vOS Z4 H posed eirazeg 0 PO9ESGOb S 8969SL v26099v z ZZ96 S08FI or3 reue Teoy O I d ei ep 0 9 9 BOT Z vOS Z438 OSIS eqtaseTeo 8 6998 0 0 G L6T or3 eue Teoy OIL I d ei eP 09 BOT Z POS Z eD posed eqrapAyuy IS IZcE 0 0 IOvz 89 or3 eue Teo 601 0 Y e3I9P 08S v BOT OZH Z Z vOS Z eO OZHZ VOS O unsdA s 8v6v 9 2 8 988 9G S6S TL S6S TL SZ TI100c vec 6tcL t 6c t 06c 6I 6 8c 860IZ2I 0 Zv9 L09 orj Teue Teoy 0L 0 Y e3T9P 298 8 x bor Z 0D Z eg ooeag 93T49U31M 070 S0 0 SGT oraKTeue IeOX 00P 0 Y e3T D LES 6 X bor Z 00 24398 ooas qarquoaas Teo O p I d e3T9P O T TI x bot Zg OO Z UN ODUN qarsozuoopous IeOxX 08p Z 3lI9P 068 01I x bot Z 00 Z49d 000g arz prs Teo 9 v 6 qd eITEP 060 LI x bot Z 09 Z Z b5W 7492 z gOO DWeO aruoroq 66LL0 0 ELLE LET oraKT1eue Teox 68S Z d e3T D 9 8 x bot 492 0OO 0029 eq4ruobeiv 66LL0 0 G906 TLT oTqATeue Teoy L62 2 d e3l9P 08v 8 x bot 492 OO 0029 qaroreo susvHda OLT T bor ONdd EON Z4dd OLb Ee bor Zz Zz vOS dd Z vOS Z Zz4dd OSL Z bor posdd Z vOS z dd 6 c bor ODHdd
48. 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 will enter the gas phase when in contact with a solution If no gas phase exists initially the initial partial pressures of all components should be set to 0 0 Example problems The keyword GAS PHASE is used in example problem 7 Related keywords EQUILIBRIUM_PHASES PHASES SAVE gas phase and USE gas phase 48 User s Guide to PHREEQC INVERSE MODELING INVERSE MODELING This keyword is used to define all the information used in 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 The data block includes definition of the solutions phases and uncertainties used in the calculations Line 0 Line 1 Line 2 Line 3 Line 4a Line 4b Line 4c Line 4d Line 5 Line 6a Line 6b Line 6c Line 6d Line 7 Line 8 Line 9 Example INVERSE MODELING 1 solutions 1 2 5 uncertainty 0 02 phases Calcite precipitate Dolomite dis CaX2 NaX balances pH 0 1 Ca 0 01 0 005 Alkalinity 0 5 Fe 0 05 0 1 0 2 range 1000
49. 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 the data block For each surface the number of moles of sites the initial composition of the surface and the surface area must be defined Although the composition of the surfaces may change due to reactions the number of surfaces moles of binding sites and surface areas remain fixed until the end of the run or until the entire assemblage is rede fined In this example one surface Hfo with two binding sites Hfo w and Hfo s is defined 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 tradi tional but only the product of these numbers 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 co
50. chemical evolution of spring water composi tions in the Sierra Nevada that are described in a classic paper by Garrels and Mackenzie 1967 The same exam ple 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 assumed to be less chemically evolved and one from a perennial spring which is assumed to be more chemically evolved The dif ferences 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 com position between the solutions The analytical data for the two springs are given below Analyses in millimoles per liter from Garrels and Mackenzie 1967 pH SiO Ca Mg Na K HCO so 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 120 User s Guide to PHREEQC The chemical compositions of minerals and gases postulated to react by Garrels and Mackenzie 1967 are as follows Mole transfer in millimoles per kilogram water positive numbers indicate dissolution and negative numbers indicate precipitation Phase Composition Mole transfer
51. concentration units to mole concentration units The input data file is used primarily 1 to define the types of calculations that are to be made and 2 if nec essary to modify the data read from the database file If new elements and aqueous species exchange species sur face species or phases need to be included in addition to those defined in the database file or if the stoichiometry or log K or activity coefficient information from the database file needs to be modified for a given run then the keywords mentioned above can be included in the input file The data read for these data blocks in the input file will augment or supercede 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 Initial conditions are defined with SOLUTION EXCHANGE SURFACE EQUILIBRIUM PHASES and GAS PHASE keywords Solution compositions and speciation calculations are defined with the SOLUTION keyword data block The composition of an exchange assemblage is defined with the EXCHANGE keyword data block the composition of a surface assemblage is defined with the SURFACE keyword data block and the iden tity and amount of each phase in a pure phase assemblage is defined with the EQUILIBRIUM_PHASES key word data block The composition of a fixed total pressure multicomponent gas phase is defined with the GAS_PHASE keyword data block Mul
52. ep EE C HIRED eo aka REPE 3 Convergence problems PP E 4 Inverse modeling crt e OO ER EEE EE E EE ETER EKER EEE E HE ER a Re reor EE a o pe ERE E 4 How to obtain th software and manual 1 1e itt p teret ecce net Une ero ila zoe CEE rea Pea Bue re en a saqeq s EEEIEE 4 Installation and setup of the DOS version essssssssseeseeeseeneeneeeennen nennen rernm nennen nennen tentent retener terere ene 5 Installation and setup of the Unix version seeeseseseeeeeeeeeeneneen nennen Eae entre ESEESE EEE EE EEEE NTEN 5 P rpose unge c M M 6 Equations for speciation and forward modeling essen enne nre nen nennen inen 6 Activities and mass action equations ssssesseeseeeeeeneeenee nennen rennen rennen eren entrer entre tren tentent net Eek ssi eeit 6 Mass action and activity coefficient equations for aqueous species 7 Mass action equations for exchange species n nn nne nee nen enne innen 8 Mass action equations for surface species n nn nennen en nennen nnne 10 Equations for the Newton Raphson Method enne eren rene en entren nennen nennen 11 PR CHIVICY TRU SERERE 11 Tomie streng Misser sa a E Ea EA E ENA Erre aaar a SEa AEE TEE EEKEREN ES EERE 12 Equations for equilibrium with a multicomponent gas phase cee eee eseceeceeeceeceseeeeeeeeeeeeaeeeeeeaeeeeeeneeeaee 1
53. 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 the 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 6699 ignored Waters of hydration and other chemical formulas that normally are represented by a as in the formula for gypsum CaSO 2H O are designated with a colon in PHREEQC CaSOq 2H O but only one colon per formula is allowed Element names An element formula wherever it is used must begin with a capital letter and may be fol lowed by one or more lowercase letters or underscores Thus Fulvate is an acceptable element name 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 number design
54. fol lows Q A Ub Pb FP E 70 Yen p 0 75 q i P where Q indicates the number of aqueous solutions that are included in the calculation T y is the total number of moles of element or element valence state m in aqueous solution q c is the coefficient of secondary master species m in redox reaction r c 5 is the coefficient of master species m in the dissolution reaction for phase p The last aqueous solution number Q is assumed to be formed from mixing the first Q 1 aqueous solutions and SO Oy 0 For PHREEQC redox reactions are taken from the reactions for secondary master species 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 The form of the mole balance equation for alkalinity is identical to the form of all other mole balance equa tions Q y e Gan zt Sak g 232711 1 Cn p 0 76 q d p where Alk refers to alkalinity The difference between alkalinity and other mole balance equations is in the meaning of c and cj p What is the contribution to the alkalinity of an aqueous solution due to aqueous redox reactions or due to the dissolution or precipitation of phases The alkalinity contribution is defined by the sum of the alkalinities of the master species in a chemical reaction PHREEQC defines c y and c 1 p 85 follows 28 User s Guide to PHREEQC CAlk r Al Cm
55. following commands will create an executable file named bin phreeqc exe cd src make 4 Install the script to run PHREEQC This script needs to be installed in a directory where executables are stored The makefile automatically edits the scripts to contain the appropriate pathnames for the data file phre eqc dat by default and the executable file The directory is assumed to be included in your PATH environmental variable so that the programs will run regardless of the directory from which they are invoked The default direc tory in which the scripts are installed is HOME bin This command installs the script in HOME bin make install This command installs the script in the specified directory make install BINDIR home jdoe local bin After the scripts are properly installed they can be executed in any directory with any of the commands described in the DOS installation section with the understanding that Unix is case sensitive Most Unix commands and file names are lower case The examples from this manual can be run from the sub directory test Purpose and Scope The purpose of this report is to describe the theory and operation of the program PHREEQC The scope of 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 i
56. for exchanger e Ion size parameter for aqueous species i for extended Debye H ckel equation or simply a fitted parameter for WATEQ Debye H ckel equation Activity of aqueous species i Activity of exchange species i Activity of surface species i M Activity of an aqueous master species but excluding a a anda e a Alk fyt H 0 Activity of a master species including all aqueous exchange and surface master species Activity of the master species for surface s FY S Master unknown for the surface potential of surface s ay ZRT e Temperature dependent constant in the activity coefficient equation Number of equivalents of alkalinity per mole of aqueous species i Number of exchange sites of exchanger e occupied by exchange species i Debye H ckel fitting parameter for aqueous species i Number of moles of element m in gas component g Number of moles of element m in aqueous species i Number of moles of element m in aqueous species i Number of moles of element m in exchange species i Number of moles of element m in surface species i Number of moles of element m in phase p Number of sites of surface s occupied by surface species i Surface excess of aqueous species i for surface s mol m Activity coefficient of aqueous species i ke H5O mol Concentration of aqueous species i used in derivation of excess quantities for diffuse layer model mol m Stoichiometric coefficien
57. implicit diffuse layer calculations the initial estimate of the potential unknown Indy for each surface is zero which implies that the surface potential is zero For data input to PHREEQC definition of the initial surface calculation is made with the SURFACE key word data block See Description of Data Input 26 User s Guide to PHREEQC Application to Reaction and Transport Calculations The complete set of Newton Raphson equations that can be included in reaction and transport calculation are derived from f fy fuo ffo fp ur fy f fo f gi f and fy A mole balance equation for alkalinity can not be included it is used only in initial solution calculations All mole balance equations are for total concen trations of elements not individual valence states or combinations of individual valence states The charge balance equation fz is always used to calculate Ina The mole balance equation on hydrogen f is always used to calculate Ina _ The mole balance equation on oxygen fo is always used to calculate the mass of water in the e system Wag The equation fp is included if a gas phase is specified and is present at equilibrium The equations total f are included if an exchange assemblage is specified The equation f is included if a surface assemblage is spec ified In addition fy is included if an implicit diffuse layer calculation is specified or f is included if an explicit diffuse layer calculation
58. 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 evaporation is modeled see example 12 the numbers may not sum to 1 0 The second and third column for the block giving solution fractions are the minimum and maximum fractional values that can be attained within the specified uncertainties These two columns are nonzero only if the range identifier is used 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 next block of data in the listing contains three columns describing the mole transfers for the phases The first column contains the inverse model that is consistent with the adjustments printed in the listing of the solutions In this example the adjusted solution 1 plus the mole transfers in the first column exactly equal the adjusted solu tion 2 Mole transfers that are positive indicate dissolution mole transfers that are negative indicate precipitation Note that mole transfers of phases in reaction calculations are relative to the phase not relative to solution posi tive values mean an increase in the phase negative values mean a decrease in the phase The second and third columns of mole transfers are the minim
59. input file Example 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 1b O2 g Line 2b 02202 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 allowed 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 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 I ogk log K Log K at 25 C for the reaction Default 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 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 implied and abbreviations of these units are a
60. is specified An equation i is included for each pure phase that is present at equilibrium It is not known at the beginning of the calculation whether a particular pure phase or a gas phase will be present at equilibrium Thus at each iteration the equation for a phase is included if it has a positive number of moles ny 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 d n in the matrix are set to zero Similarly at each iteration the equation for the sum of partial pressures of gas components in the gas phase is included if the I 14 number of moles in the gas phase is greater than a small number Nad 1x10 orthe sum of the partial pres sures of the gas phase components as calculated from the activities of aqueous 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 aN are set to zero Equations fp and I are included as optimization equations in the solver All other equations are included total as equality constraints in the solver In addition several inequality constraints are included in the solver 1 the value of the residual of an optimization equation fy which is equal to b _ ya P is constrained to be nonne j gative which maintains an estimate of
61. keywords and their associated input are now described in alphabetical order Several for matting 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 one of two forms 1 the identifier word spelled exactly for exam ple temperature or 2 a hyphen followed by a sufficient number of characters to define the identifier uniquely for example t for temperature 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 must be entered in the specified order 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 Overview of Data Files and Keyword Data Blocks When the program PHREEQC
62. log K for the predominant arsenic complexation reaction would tend 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 satisfac tory explanation of the variation in major ion chemistry pH and arsenic concentrations within the aquifer Example 11 Inverse Modeling NETPATH Plummer and others 1991 1994 and PHREEQC are both capable of performing inverse mod eling calculations NETPATH has two advantages relative to PHREEQC 1 NETPATH provides a thorough treat ment of isotopes including isotopic mole balance isotope fractionation and carbon 14 dating whereas PHREEQC has no built in isotope modeling capabilities and 2 NETPATH provides a completely interactive environment for data entry and model development whereas PHREEQC is a batch oriented program The major advantage of 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 more robust inverse models that are less susceptible to large differences in results due to small changes in input data 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 This example repeats the inverse modeling calculations of the
63. mass of water in the system excluding the diffuse layer W is W ae W The mass of water in the diffuse M layer is calculated from the thickness of the diffuse layer and the surface area assuming 1 L contains 1 kg water W A S t 62 S ss the mass of water in the diffuse layer of surface s and W y where t is the thickness of the diffuse layer in meters The total derivative of the number of moles of an aqueous species in the diffuse layer is as follows FU d Bj pu ik W d W 1498 s 5 s di ni peus was nini W 3x e nay aq aq 63 8 c dlnW where the second term is the partial derivative with respect to the master unknown for the potential at the surface 8 Ina The partial derivative a is equal to the integrand from equation 60 evaluated at xg Urt Bis Xa 64 ox N 1 2 x x 1 ay d l and the partial derivative of the function 8 With respect to the master unknown is P zr FE 2 2RT Zi E cae Qa BS Ae Macc NM s 65 9lnay oX I N B 1 2 T EEr I 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 explicitly evaluated once at the beginning of each of these diffus
64. modeling Lu P H EE 120 Example 12 Inverse modeling with evaporation sess ener en entren nennen nne 126 References entera E 128 Attachment A Listing of notation iiiter eno Roc erbe EE DERE RED sabes Orto tb babe aksa bc ute Re npe e db Co edens 130 Attachment B Description of database files and listing sess enne nennen enne nenne nnne 134 vi FIGURES 1 Graph showing 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 98 2 Phase diagram for the dissolution of microcline in pure water at 25 C showing stable phase boundary intersections and reaction paths across stability fields eese enne 108 3 6 Graphs showing 3 Composition of the gas phase during decomposition of organic matter with a composition of CH5ON 6 05 IT pure Waters s eene ms a stata es hoes serene qi n a RU HERES 110 4 Distribution of zinc between 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 aa aaa 114 5 Transport simulation of the replacement of sodium and potassium on an ion exchanger by inflowing calcium chloride solution L u u Ier ettet eee ee E Reste de oer ER Ced ee E ERREUR SS ug sa 116 6 Chemical evolution of ground water due to calcium magnesium bicarbonate water
65. name name of a surface binding site analogous to the name of an element sites total number of sites for this binding site in moles specific area specific area of surface in m g Default 600 m g mass mass of surface in g Default 0 g Line 3 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 Optionally diffuse_layer d iffuse_layer See notes following the example The identifiers diffuse_layer and no_edl are mutually exclusive thickness thickness of the diffuse layer in meters Default is 10 m 100 Angstrom Line 4 no edl no edl indicates that no electrostatic terms will be used in the calculation No potential term will be included in the mass action expressions for the surface species and no charge balance equations for the surface will be used The identifiers diffuse layer and no_edl are mutually exclusive DESCRIPTION OF DATA INPUT 77 SURFACE Notes 1 The default databases contain thermodynamic data for a surface named Hfo Hydrous Ferric Oxides 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 The order of lines 1 2 3 and 4 is not important Lines 1 and optionally 3 or 4 should occur only once within the keyword data block Line 2 may be repe
66. 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 iter ations and 2 accumulation of roundoff errors in simulations involving very small concentrations of elements in solution The first cause can be identified by overflow messages at iteration 1 or greater that appear in the file phreeqc log see logfile above This problem can usually be eliminated by decreasing the maximum allowable step sizes from the default values The second cause of nonconvergence can be identified by messages in phre eqc log that indicate infeasible solutions The remedy to these problems is an ongoing investigation but altering tolerance or diagonal scaling frequently fixes the problem Additional iterations usually do not solve noncon vergence problems Example problems The keyword KNOBS is not used in the exampl
67. of the solution exchange assemblage surface assemblage pure phase assemblage or gas phase can be saved after a set of reaction calculations with the SAVE keyword Advective 1 dimensional transport can be modeled with the TRANSPORT keyword and a combination of the EQUILIBRIUM PHASES EXCHANGE GAS PHASE MIX REACTION REACTION TEMPERATURE SOLUTION and SURFACE keywords Logically a sequence of n reaction cells are defined An initial solution corresponding to numbers 1 through n must be defined for each cell In addi tion gas phases and exchange pure phase and surface assemblages may be defined for each cell with their num bers corresponding to the cell numbers The infilling solution 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 the solution in each cell is equilibrated with the gas phase and assemblages that are present in the cell To facilitate definition of the initial conditions the keywords EQUILIBRIUM PHASES EXCHANGE GAS PHASE MIX REACTION REACTION TEMPERATURE SOLUTION and SURFACE allow simultaneous definition of a range of cell numbers The SAVE keyword also allows a range of solution gas phase or assemblage numbers to be saved simultaneously Inverse modeling is defined with the INVERSE MODELING keyword Previous definitions of solution compositions with SOLUTION input and possibly new reactants with PHASES or EXCHANGE SPECIES
68. one for negative to account for the absolute values used in the formulation an inequality relation for each mixing fraction for the aqueous solutions and an inequality relation for each phase that is specified to dissolve only or precipitate only Application of the optimization technique will determine whether any inverse models exist that are consistent with the constraints Thus we may be able to find one set of mixing fractions and phase mole transfers plus associated s that satisfy the constraints Ignoring the values of the s and redox mole transfers c let the set of nonzero o and o mixing fractions and phase mole transfers uniquely identify an inverse model The magnitude of the a s is not considered in the identity of an inverse model only the fact that a certain set of the s are nonzero At this point little significance should be placed on the exact numbers that are found only that it is possible to account for the observations using the stated aqueous solutions and phases 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 mod els Assuming P phases and Q aqueous solutions we proceed as follows If no feasible 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 feasible model is found then each of the phases in this mode
69. part of the echo of the input data but only the last will also appear at the beginning of the simulation calculations Example problems The keyword TITLE is used in all example 1 12 DESCRIPTION OF DATA INPUT 83 TRANSPORT TRANSPORT This keyword data block is used to specify the number of cells and the number of shifts for a transport simulation Transport simulations are one dimensional and model advective plug flow only No dispersion is simulated however all chemical processes modeled by PHREEQC may be included in a transport simulation Example Line 0 TRANSPORT Line 1 cells 5 Line 2 shifts 25 Line 3 print 5 Line 4 selected output 5 Explanation Line 0 TRANSPORT TRANSPORT is the keyword for the data block Line 1 cells ncell cells Indicates that the number of cells in the transport simulation will be given Optionally cells or c ells ncell number of cells in a one dimensional column to be used in the transport simulation Default 0 Line 2 shifts nshift shifts Indicates that the number of shifts or time steps in the transport simulation will be given Optionally shifts or sh ifts nshift number of times the solution in each cell will be shifted to the next higher numbered cell Default 0 Line 3 print modulus print Results will be written to the output file during transport step numbers that are evenly divisible by modulus Optionally p rint Note the hyphen is required to avoid
70. peATOSSTp zeds y jo aunoue purJj py9 eriduexa3 JTILIL aNd SUTITOOIOIN 0 0 0 0 0 0I 8O TSTVM 0 0 o11TAODSnh 070 0 0 93IUITO EM 0 0 0 0 93T9QqT5 I SusvHd W INSITID S T UOT ANTOS ASN uorqaeanaes ej3rAoosnu uoe z oa peAT ossrp deds x jo qunoue pur4 cv9 r duex WTILII CONS 0 0 0 0 9SUTTO2OJOTW 0 0 0 0 eqtaoosn O OT 80 TSTVM 0 0 93TUTTO PM 070 0 0 93TSqQqT5 I SHSVHd WNIYEITINO I uorantios usn uorqaezanaes ejrurT oex uoeea oa p xaTossrp zeds y jo aqunoue purj zvo9 eTdwexg WILIIL OIN 0 0 0 0 eur oo4oT 0 0 0 0 eitAoosn 0 0 0 0 eitur oey 0 01 BOE TSTVM 0 0 arsqqr5 I SHSVHd W IHSITID S I uoranrjos ASN PUTTOOAOTW 93TAO2SnW FTUTTOLY arsqqr5 unraqrrrnb PUTTOOZOTW 931AOOSDW 93TUTITO M sqtTsqqty fs POTSPH H A S9T3TAT329 und 9xe TTJ INdLnoO daLOaTas uoraeanaes eqtsqqth uoeezd oa peA ossrp deds x jo qunoue pur4 T V9 eTdwexg WTILII CON TeO 9F ZT u eirep SL8 0 X bor X POTSEH 4TIV H t OZH p 8OCISIV3 SUT TOOAOT Teoy LLE 6S u eirep 0L6 ZI x BOT M POTSPH IV H OT Z HO OIOE TSETVM 9jrAoosn Teoy 90E SE u e3rep 80L G x Bot E TV Z pOTSPH Z OZH H 9 f HO GOZITSZIV qarurroey TEDA Z6L Zc u eirep 6F0 8 x Bot OZH TV H HO TY qarsqqr T SWuSVHd 0 SZ dure 3 obaeuo O L Hd WHILVM X4und T NOLTINTIOS s rzepunoq eseud oq 3oeewy yo eT
71. phase Fix_H in an EQUILIBRIUM_PHASES keyword 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 reac tion 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 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 on figure 4 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 EXAMPLES 111 FUZOS OJH I eoegzans usn I uoranios ASN CON 0 01 HOEN S 9 H XI I SHSVHd W IHSITIn SN T eoegjzuns 4SN T UOTANTOS ASA GN 0 01 HOeN G 9 H XI I SusvHd WNIYEITINOG T 9SoeZjuans
72. r 17 and Cane p D Ale p 78 m where Alk is the alkalinity assigned to master species m and c is the stoichiometric coefficient of the master species m in the aqueous redox reactions and the phase dissolution reactions 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 dis solution reactions However the electron balance equation requires that any electrons entering the system through one reaction be removed from the system by another reaction DEN a rt he 79 Ex where c _ represents the number of electrons released or consumed in the aqueous redox and phase dissolution e reactions The mole balance equation for water is w aq q GFWy o 2 io rtt De H 0 p p 9 80 q where GFW is the gram formula weight for water approximately 0 018 kg mol Wig j is the mass of water 2 in aqueous solution q c is the stoichiometric coefficient of water in the aqueous redox reaction and H O r c is the stoichiometric coefficient of water in the dissolution reaction for phase p H O p The charge balance equations for the aqueous solutions constrain the unknown 6 s to be such that when the 5 s are added to the original data charge balance is produced in each aqueous solution The charge balance equa tion for an aqueous solution is as fo
73. saturation or undersaturation for the mineral 2 the residual of the optimi zation equation for fp is constrained to be nonnegative which maintains a nonnegative estimate of the total gas total pressure 3 the decrease in the number of moles in the gas phase dN gas is constrained to be less than the number of moles in the gas phase N gas and 4 the decrease in the mass of a pure phase dn is constrained to be less than or equal to the total moles of the phase present ng Initial values for the master unknowns for the aqueous phase are taken from the previous distribution of spe cies 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 solution the estimates of the master unknowns are the same as those used for initial exchange and initial surface calcula tions Initial values for the number of moles of each phase in the pure phase 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 reaction and transport calculations rely on many of the keyword data blocks Initial conditions are defined with SOLUTION EXCHANGE
74. surface assemblage present For the explicit calculation of the diffuse layer a charge balance equation is used for each surface f the values of the master unknowns for each surface of the surface assemblage Ina and Ina are adjusted to achieve y 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 fu 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 initial surface calculations are included as equality constraints in the solver No equations are optimized and no inequality constraints are included An initial surface calculation is performed only if the surface initially 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 solu tion calculation or by a reaction or transport calculation Thus the initial estimates of all master unknowns related to the aqueous phase are set equal to the values from the previous distribution of species The initial estimate of the activity of the master species for each surface is set equal to one tenth of the number of moles of surface sites for that surface For explicit and
75. temp the initial temperature of the gas phase in Celsius Default is 25 0 The volume and tempera ture are used to compute the initial number of moles present in the gas phase Line 4 phase name partial pressure phase name name of a gas A phase with this name must be defined by PHASES input partial pressure initial partial pressure of this gas in the gas phase in atmospheres The partial pres sure along with volume and temperature are used to compute the initial number of moles of this gas present in the gas phase Notes Line 4 may be repeated as necessary to define all of the components initially present in the gas phase as well as any components which may subsequently enter the gas phase The initial number of moles of any gases that are defined to have positive partial pressures in GAS PHASE input will be computed using the ideal gas law DESCRIPTION OF DATA INPUT 47 GAS PHASE n PV RT where n is the number of moles of the gas P is the defined partial pressure line 4 V is given by vol ume and T is given by temperature It is probable 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 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 is that specified
76. temperature is entered on this line Optionally temperature or t emperature value temperature in Celsius Line 2 pH value charge or phase name saturation index pH indicates pH is entered on this line Optionally ph value 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 saturation index pH will be adjusted to achieve this saturation index for the specified phase Default 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 physically possible to adjust the pH to achieve the specified saturation index Line 3 pe value charge or phase name saturation index pe indicates pe is entered on this line Optionally pe value 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 0 0 DESCRIPTION OF DATA INPUT 69 SOLUTION 70 If line 3 is not entered the default pe is
77. the equation excluding the defined surface species The mole balance identifier is used to specify explicitly the stoichiometry of the surface species Line 4 DESCRIPTION OF DATA INPUT 81 SURFACE SPECIES Notes Lines 1 through 4 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 2a and 1c 2c in this example The log K for the identity reaction must be 0 0 An underscore plus one or more lowercase letters is used to define different binding sites for the same sur face In the example 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 Association reactions for each surface and binding site must be defined with SURFACE SPECIES input 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 elemental 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
78. 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 Uncertainties for electrons are never used because it is always assumed that no free electrons exist in an aqueous solution 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 Example problems The keyword INVERSE MODELING is used in example problems 11 and 12 Related keywords EXCHANGE SPECIES PHASES SOLUTION and SAVE 52 User s Guide to PHREEQC KNOBS KNOBS This keyword data block is used to redefine parameters that affect convergence of the numerical method dur ing speciation reaction and transport calculations It also provides the capability to produce long uninterpretable output files Hopefully this data block is seldom used Example Line 0 KNOBS Line 1 iterations 150 Line 2 tolerance 1e 14 Line 3 step_size 100 Line 4 pe step size 10 Line 5 diagonal scale TRUE Line 6 debug prep TRUE Line 7 debug set TRUE Line 8 debug model TRUE Line 9 debug inverse TRUE Line 10 logfile Explanation Line 0 KNOBS KNOBS is the keyword for the data block Optionally
79. tolerance for the optimizing solver is to be given tol Tolerance used by the optimizing solver Default 1e 10 The value of tol should be greater than the greatest calculated mole transfer or solution fraction multiplied by 1e 15 The default value is adequate 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 is needed Essentially a value less than tol is treated as zero Thus the value of tol should not be too large or significantly different concentrations will be treated as equal Notes Evaporation or dilution can accomplished by using the phase water formula H20 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 12 in Examples section If uncertainty is not included a default uncertainty of 0 05 5 percent is used for elements and 0 05 for pH Default uncertainties specified by uncertainty will almost always be specified as positive numbers indicat ing fractional uncertainties A default uncertainty specified by a negative number indicating a fixed molal uncer tainty for all elements in solution is not reasonable because of wide ranges in concentrations among elements present in solution No mole balance equation is used for pH The uncertainty in pH only affects the mol
80. value of 0 02 indicates an uncertainty of 2 percent of the number of moles of each element in solution will be used and 2 if the uncertainty is negative 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 Line 3 phases phases identifier that indicates a list of phases to be used in inverse modeling follows on succeeding lines Optionally phase data p hases p hase data Note phases without a preceding hyphen is not acceptable because it will be interpreted as the keyword PHASES Line 4 phase name constraint 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 SPECIES input is important the log K is not used in inverse modeling calcu lations constraint 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 words are sufficient to define these constraints Line 5 balances balances identifier that indicates a list of element or element valence state constraints and if other than the default associated uncertai
81. wD lt O e l l eeee tee CALCIUM MAGNESIUM SODIUM a lt 2f J O gt MNT S adii I I dcc cR O H Qu 4 O E E UE quee T L T m 6 T I l ji l l I l l I i 1 l I l l l l l l 0 25 50 75 100 125 150 175 200 PORE VOLUME OR SHIFT NUMBER Figure 6 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 complexer containing arsenic Middle plot shows arsenic concentration in micromoles per kilogram of water EXAMPLES 119 The transport calculations produce three types of water in the aquifer the initial brine a sodium bicarbonate water and a calcium and magnesium bicarbonate water which are similar to the observed water types in the aqui fer The pH values are also consistent with the observations although the peak near pH 9 5 is slightly too high 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 Arsenic concentrations are also higher than the maximum values observed in the aquifer which are in the range of 1 to 2 umol kg water Lower maximum pH values would produce lower maximum arsenic concentrations The stability constant for the surface complexation reactions have been taken directly from the literature a minor decrease in the
82. x bor HOM OJH x BOT HOM OJH x BOT HOM OJH gzeydsoyd woazjy suotuy INS Hbc E AEE AEA EAE REE AE AE AEE aE AEA aE E AEAEE AE aE EE AR AE EE EAE EAE HEEE SNOINV Fi HE AE HE GE AE GE FE AE HE AE HE GE FE GE FE AE HE AE HE GE FE GE FE AE HE AE BE GE FE GE FE AE AE AE HE E FE E HE HE S e X bot H UWOM OJH Z UW HOM OJH SGg 0I Tlqe3 S 0I lqe3 p 0 x bot Z UWHOS 93H UW HOS OJH esouebuew II 9 y x bot H 4b5WOM OJH Z 6W HOM OJH unrseubew G OT lrlqeqa saueaqasuoo peAradeq S OT eide3 0 x bor H QdOM OJH Z qd HOM OJH S9 t x Dot H QdOS OJH Z qd HOS OJH peel S OT rqe3 4 9 0 x bot H nOOM OJH Z4n2 HOM OJH 68 Z x boT H nOOS OJH Z ND HOS OJH ieddo5 66 1 x Pot H 4UZOM OJH Z UZ HOM OJH 66 0 x bor H UZOS OJH Z4UZ HOS OJH ouz 4 Tl6 z x BOT H DOOM OJH Z DO HOM OJH Lv O X bor H p20S OJH Z PD HOS OJH unrupeo 4 Z OI T1qe3 uozg suorqeO S OI lqe3 Z L B H eqOM OJH Z eq HOM OJH 9v G x Dot Z HHOS OJH Z eq HOS OJH unraeg d 09 LT x Pot HZ HOXSOM OJH OZH Z 3S HOM OJH gg 9 x Por H ISOM OJH Z 3S8 HOM OJH To s x bor ASHOS OJH Z448 HOS OJH wnt uot AS Sg8 s x Bor 490 HOM OJH H eOOM OJH L6 p X bot Z eO HOS OJH unrore25 Z eOHOS OJH G OI 4O OI eTqe uo4gj suorq
83. 0 minimal tolerance 1e 9 Explanation Line 0 INVERSE MODELING number description INVERSE MODELING is the keyword for the data block number positive number to designate this inverse modeling definition Default is 1 description optional character field that describes the mixture Line 1 solutions ist of solution numbers solutions identifier that indicates a list of solution numbers follows on the same line Optionally sol or s olutions Note solution without a preceding hyphen is not acceptable because it will be interpreted as 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 reaction calculation in the current or previous simulations The final solution num ber 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 mixing proportions of the initial solutions are calculated in the modeling process In the example line 1 solution 5 is to be made by mixing solutions 1 and 2 in combination with phase mass trans fers Line 2 uncertainty list of uncertainties uncertainty identifier that indicates a list of default uncertainties for each solution follows on the same line Optionally uncertainties u ncer
84. 0 Calculation of mass transfer in geochemical processes involving 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 involving minerals and aqueous solutions II Applications Geochimica et Cosmochimica Acta v 33 p 455 481 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 mineral reactions and their limitations in Bassett R L and Melchior D eds Chemical modeling in aqueous systems II Washington D C American Chemical Society Symposium Series 416 Chapter 31 p 398 413 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
85. 0 00 8000 0 zo 00 8000 0 0 0 v0070 96v Gz 00S SZ 9Z SZ61 9c 919l1 ZH 9Z ZZE 9 0 H 080 0 00 8 76 L 60 8606 6 80 926l1 I HOPD v0070 l8c z S8Z2 z 0 9ZvZ G 0 9I61I G poseo 90 0 982 Z 086 T 0 99LT G Z0 9LvO T g 9 Z0 L9S T e2 000 0 000 0 000 0 I0 9966 6 TO TSS S OZH S90 0 Z90 L L66 9 80 9999 8 LO 8L00 T H 80 0 8 6 9 88 9 L0 9SSI I L0 9 0P I HO ewweg A3TAT3OV QTIelON AqtTaAtT IW AYTTeE ION s ro ds boT Hoyt bot Se SS Sees SS a See Se See SS Seroeds jo uoty4nqra4stq TO SL896SE S O TeqOL 0 962LOLO T H TeqoL I suorqez qI 0I 9280 I be soueTeq eoria3oeTau 000 St O bep eanqezedwez 00 8000 0 6 TOwW ZOD TEOL 00 8000 0 6 Tou uoqaeo Te3ol OT 8 ZT T bx be AqtuTTeyTe TeIOL T0 8S79 6 bx aeaqeM Jo ssew 20 906l1 v wuqBbu aqas oruor 000 T i9e3e go Aqtat oy unraqrrTrnbe xopez oq p sn py TITI ed soueTeq ebreyo 290 L yd uorj4n os jo uora draoseg 20 9I1IS I 0 9L9S T S 20 9IIS I 20 9L9S T e9 S TON J TeTON S3ueue u o uot4tsoduos uor3n og 2 2 T0 96v8 6 00 S86 T 00 9000 1 8S v 8S8 v 00 0 uns d amp 5 00 9000 T 00 9000 1 9 v 8S8 v 2c 0 e3rap uuv leired eura Terarur IM BOT dVvI OT IS eseud berqu sse ur Se oW eanjeiedue43 Qqueadno st 00 GZ 1 znaea du a bursn I ebeiques
86. 0 9990 1 70 899 0 990P Z 0 990 SSTOW AQTTET _ uor3arsoduoo uot 4nTos TW Ld WOHLISGHON WOHui HNXLVMVdS 8 E z E 09 S v OOH 2 L 9 O0PN 8 8 oobw 9 T OOHEN ES OOHOW GE 02H 0 9081TI c S S OZH 6 L H 9 Z HO OW seroedg ue M T 0 0 2 0 S N E N rdnoo xopeu T9301 Te3olL Oorqez qI 9 eoue eq eorda3o2era bep eanjezedusy N TOU ZOD Te401L x TOU uoqIeo TeqOL yJ ai93eM JO SSEW buead4s oruoI qem go A3TAT3OV lm CPI vI n E L TS 6 c 9 S L 0 0 8 v eN 8 v S N LX N L UW S S DW 0I x L EI 9 G TO op e9 vc A3TUTTEXIV OW sau u rs s O seTdnoo xop qg uorantTos erirur 1ejeMeoes ojeroeds pue unrueian ppy eTdwexg ATLIL qN3 Teox 0 9 81I uy eilep 06v x bor OZH Z N H v con ej3ruruead l Teos 81 8 S3SVHd q eirep L6 12 BOT p 00 ZON Z ODE Z ZON Teox BP uq eaTep LL6 91 BOT Z Z 02 ZON Z E 007 Z ZON Teox p8 0 y eirep v90 01 bor goozon Z 02 Z zOn Teox LZ vV y eirep Iy9 GI BOT HS G HO ZON OZHS Z ZONE Teox v0 9 uq eirep 929 6 BOT HZ Z Z HO Z ZON OZHZ Z ZONZ TeO3 GIO II y ear p Z8L S BOT H HOZON OZH Z ZON Teox OEP PE uy eirep Li 6 bor Z H p Z ZOD OZH Z F N TeOY O T IE y eirep Zen 9 BOT H t ZOn OZH Z t4 Teox 08
87. 000 0 0000 euureb OZH ZOD H Z Z 00 Teoy 0O0t G Y eITEP 9F Zl bot 0000 0 000v G eunreb Z OdH H rOd 6 ETLE9S T9SZ6 8E 6L ISIG 6Tv82S2 0 0 IL88 LOI or3 T eue leox 978 I U e3 ep Teoy I9S u ej ep 87 07 BOT 62 01 x bor OZH pda 3 p H OGEH 00H H Z OO Te9 PpI9 I Y eqTeEp 6SL l1 d eaTEp L9 T BOT SI x bor OZH Z HOEdH d H Z OHEH cH 9 Z H Z TeOX 819 I u ei 9P TeOx 6L vET d eITEP 9 L x bor 80 98 x bor OZH Z HO Z4H H d Z OGEH p H p ZO OZH Z TeOx OS8 I yY eiTep 0000 0 000S9 euureb 00t 0 x bor 0 6996111I HO 3H d OGEH LbDES COT O EZEET v869050 0 TL6 E8Z oTqATeue leoxX Z9E ET Wu eITEP TeoyY ZZ YU e3T9P 000 v1 x bot 0vz 6 x bor H HO OZH H OSZH O8 H 0000 0 0000 9 eure b penunuoo 3033HHd W014 panuep ll aseqeleg VT 2033HHd 8 juewYoeny User s Guide to PHREEQC 136 8v z X bor OvI 0 x bor Z VOSH9e4 OSH 94 1084 TO Z494 leox Il6 d e3rep Teo OOZ ET Y e3I9P vOv x bor 00S 6 x BOT pOSed Z vOS 484 H HO94 OZH Z494 ELT x bor 62 0 x bor TOe4 TO 494 POdHM Z vOdH M STE x bor Teox OsZ z u e3leP ZT9 4 TO Z 484 0S8 0 X bor pOSM Z vOS 4M Teox 9 G q eirep 8vp I X bor 09p vI x bor Z TO 4d IO 484 H HOM OZH y Teox I Y ei eP O0vz 0 X bor 9 x
88. 2 Equations for equilibrium with pure phases n rennen nennen nennen nennen nennen tenerent 13 Mole balance equation for a SUIPACE 0 eee Uu N naa sasa eene nennen E Eiraan nE roa net trennen een nne 14 Mole balance equation for an exchanger sess eere nen nen nennen nete ntnne terere ene 15 Mole balance equation for alkalinity iei sse tono retener eet sdsuedveveshieassersceuseanensadescensustasuevuspseteetes 15 Mole balance equations for elements sessssssssseeseeseeeee ener entre neen tremere tenerent enis 16 Aqueous Charge PITE EU GIU H sasvoueeveceeveddenteusnecents 17 Surface charge potential equation without explicit calculation of the diffuse layer composition 19 Surface charge balance equation with explicit calculation of the diffuse layer composition 20 Non electrostatic surface complexation modeling n enne ener 22 Numerical method for speciation and forward modeling sse eene eene ennemis 22 Application to aqueous speciation calculations esesseseseseeeeeeeeneeee enne nennen nennen tenter tenter enne 24 Application to initial exchange calculations esses ener vaserne nonai neaei 25 Application to initial surface calculations eese nennen enne nennen nnne eerte enne nennen 26 Application to reaction and transport calc
89. 22 Selected output for example 12 Beginning of inverse modeling calculations Solution 1 Black Sea water Alkalinity 5 280e 06 0 000e 00 5 280e 06 Br 4 320e 04 0 000e 00 4 320e 04 Ca 5 733e 03 1 249e 04 5 608e 03 Cl 2 876e 01 7 646e 04 2 884e 01 H 0 0 000e 00 0 000e 00 0 000e 00 K 4 868e 03 1 015e 04 4 969e 03 Mg 2 754e 02 6 886e 04 2 685e 02 Na 2 497e 01 0 000e 00 2 497e 01 O 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 1 499e 02 3 747e 04 1 536e 02 Solution 2 Composition during halite precipitation Alkalinity 1 770e 04 1 523e 04 3 294e 04 Br 2 629e 02 6 556e 04 2 695e 02 Ca 0 000e 00 0 000e 00 0 000e 00 Cl 4 170e 00 1 042e 01 4 274e 00 H 0 0 000e 00 0 000e 00 0 000e 00 K 3 179e 01 7 948e 03 3 100e 01 Mg 1 634e 00 4 086e 02 1 675e 00 Na 1 889e 00 3 092e 02 1 858e 00 O 0 0 000e 00 0 000e 00 0 000e 00 S 2 0 000e 00 0 000e 00 0 000e 00 S 6 6 241e 01 1 560e 02 6 085e 01 Solution fractions Minimum Maximum Solution 1 6 238e 01 0 000e 00 0 000e 00 Solution 2 1 000e 00 0 000e 00 0 000e 00 Phase mole transfers Minimum Maximum H20 3 406e 03 0 000e 00 0 000e 00 H20 Gypsum 3 498e 01 0 000e 00 0 000e 00 CaSO4 2H20 Halit 1 372e 01 0 000e 00 0 000e 00 NaCl Redox mole transfers Sum of residuals 2 443e 02 Maximum fractional error i
90. 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 physically impossible Line 4 redox redox couple redox indicates a redox couple is to be used to calculate the default pe This pe will be used for all redox elements that need a pe to determine the distribution of the element among valence states Optionally 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 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 uses dissolved oxygen to calculate a default pe Line 5 units concentration units units indicates default concentration units will be entered on this line Optionally u nits concentration units default concentration units Three groups of concentration units are allowed concentration 1 per liter 2 per kilogram solution or 3 per kilogram water All concentra tion 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 kil
91. 62 x bor Z Z OS UZ Z VOSZ Z UZ posas Z FOS 7438 Teo 9E T d e3I9p 928210 0 610 I oTqATeue LEZ BOT Teox Z G V e34Tep OSUZ Z pOS c4UZ I18 Z x bor 0048 Z 0O 7438 TZ BOT OOHUZ 00H Z UZ 0000 0 000 G euure6 6 EILE9G 9 6 BOT T9S76 8E 6L ISTS 6PS6ELPO O T6E9 POT oT3 eue Z Z 09 UZ Z OOZ Z uZ Ieox 68p Z u e3lep 60S II x bor e s Bot OOHIS H Z 0O Z 3S OO2UZ Z OO UZ 0000 0 0000 S euureb penunuoo 3033HHd WO peauep eJ eseqereq VT 2033HHd 8 juawYyoeny 139 Attachment B Description of Database Files and Listing TELE Gg S6S8 8v 88SE 9EPS S 8 69 Le90 Sc Z00 8T x bor POTSPH P HO IV N OZH 8 8OETSTVEN JFqTY Teo 00 S Y ei 9P SE L x bor TV Z FOTSEH Z OZH H 9 P HO SOZISZIV JFUFTOLY TeoyY 00S 9Z Y eITEP 008 0T BOT OZH TW H HO TY 9 HO TV Teox 008 Zz WU eiTep OIl 8 oT OZH TW H HO IV 931SqqI5 0 60 T 0 0 TPO oT3 eue Teox 066 G Y eiTep 086 boT POISPH OZH Z ZOIS zjaen 0 ZE0T 0 0 60 0 oT3 eue Teox OzL v u ei 9P 0SG OT FPOTSEH OZH Z ZOIS Auopeoreuo 0 TEL 0 0 92 0 oT3 eue Teox Opt t u ei 9P OTL Z x bor FOTSEH OZH Z ZOIS e zors zZ 86 v 0 0 8v 99 oT3 eue Teox 069 p u ei 9P 009 01I x bor 4 Z e 492 qrzonT4 leoxX SgGl 9 Y ej ep I P X
92. 7 REACTION 1 H20 1 0 52 73 moles SAVE solution 2 PRINT si false END TITLE Example 4b Factor of 20 more solution MIX 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 To concentrate the solution by 20 fold it is necessary to remove approximately 52 8 mol of water 55 5 x 0 95 The second simulation uses MIX to multiply by 20 the number of moles of all elements in the solution including hydrogen and oxygen This procedure effectively increases the total mass or volume of the aqueous phase but maintains the same concentrations The resulting solution is stored in solution 3 with the SAVE key 102 User s Guide to PHREEQC word 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 10 The concentration factor of 20 is reasonable in terms of a water balance for the process of evapotranspiration in central Oklahoma Parkhurst Christenson and Breit 1993 However the PHREEQC evaporation modeling assumes that evapotranspiration has no affect on the ion ratios This assumption has not been verified and may not be correct After evaporation the simulated solution composition is still undersaturated with respect to calcite dolomite and gypsum As expected the mass of water decre
93. 8 y d e3T p ET ET BOT Z 00 Z qd 00dd S9 eqtsnazap Te PL pI Y e3I9P I 0 BOT vOS Z4PO vOSPO 62 pOSPO TeoyY 9 9T Y eqTEP 90 6 x bor HZ OZH OTSPO 82 OTSPO Te 610 0 4Y e3reP Fere y Bot Z 09 Z4PO OODO GTE 911A 9310 OG9 ET x bor OZH Z Z PO H Z Z HO PO z HO pO Teoy LE EE Y e3 9P ST x bor FOTSEH Z4UZZ Hr POTSZUZ 682 93TUSTTIM IeOX 0GZ 8 u e3I9P 819 II 3 bor SH C UZ H SUZ arz reuds Teoy 9 p Y eITEP 000 0T x bor 00 Z4UZ OO0UZ aruosuqrus OS TT x BOT OZH Z UZ H Z Z HO UZ e z HO UZ Teox 082 l e3I9p 0IZ 6 x bot H 9 9 HO Z VOS 933 x earsoaep Teox 0GZ2 0S6 d iI9P 00v 1 x bor H 9 9 HO Z POS ETWM e3runtv LEE I or3A eue penunuoo 3033HHd W014 peauep ej eseqeteq VT 2033HHd 8 juewYoeny User s Guide to PHREEQC 142 dH OZH 4M oF 9 1 OM OJH 4 L 8 H H d x bor HOM OJH x bor HOM O3H OT OT lqe3a saueqasuoo2 peaArded Z YOSHOM OZH VOSM OJH OZH OSZHM OZH pOdM OJH OZH vOdHM OJH OZH FPOdZHM OJH 6L 0 O3H Z vOS BL L H Z vOS 8 01 lqeq3 29 0 OJH OSEH L O0I ergqea3 GL LT H vOd 6E SZ THE t 7Od 6Z TE H vrOd 9 0I eide3 x BOT HOM OJH x bot HOM O3H ej3e3tns wozjy suotuy x bor HOM OJH o3qeagog uozaj suoruv
94. 80 has been a useful geochemical program for nearly 15 years PHREEQE is capable of simulating a wide range of geochemical reactions including mixing of waters addition of net irreversible reactions to solution dissolving and precipitating phases to achieve equilibrium with the aqueous phase and effects of changing temperature Concentrations of elements molalities and activities of aqueous spe cies pH pe saturation indices and mole transfers of phases to achieve equilibrium can be calculated as a function of specified reversible and irreversible geochemical reactions provided sufficient thermodynamic data are avail able However PHREEQE suffers from a number of deficiencies As a speciation code it lacks flexibility in defin ing mole balances on valence states and in distributing redox elements among their valence states As a reaction path code it does not keep track of the mass of water in solution nor the moles of minerals in contact with the solution Surface complexation ion exchange or a fixed pressure gas phase can not be modeled without program modification Determining reaction paths and thermodynamically stable mineral assemblages is time consuming and tedious The numerical method fails for some redox problems which causes the program not to converge to Abstract 1 the correct solution to the algebraic equations Perhaps most importantly the fixed format input and reliance on index numbers is cumbersome and prone to errors T
95. AE a EEREN REE E ERE ER ES TI Example Tsui TI Expla ation RISE H kaso TI hd 78 locnm E EREE 79 CONTENTS V Expla ation pA P ai 79 NOES 2 HR 79 Example problems pe C kas 79 Related Key WOrds T 79 SURFACE MASTER SPECIES ua a ceti ete shneted sles SEn EEEE OEE one Peur PEL esee une E EE Sena Poen cos E ede Due Ra ERR ER PRESE 80 EX ample X 80 Explanati n u anak 80 NOLES 80 Example problems E yay uB 80 Related Key words rtr e yp eere EEEE RR EXERCERE ARE XE REE TER TE ETE EROR E PREIRES 80 SURFACE SPECIES uuu 81 Example 81 Io qbur lo ee 81 M rS 82 Example Problem Siess erisin 82 Related Key Words
96. Aduo LZl 0 ETE ES 98L 00 8277 T v0 9LE9 I OSX ZOTS GG 90 v IS 0 AuopsoT eyo 902 0 881 z 786 T 0 28987 9 Z0 8TPO T A 0029 8 8 ZL L 9L O e3ToTeo 20 98S0 I 3 ooeO Ft 8 ZL L I9 0 eiruobeiv 890 0 69 bV 9tb bvV 00 9000 0 00 9000 0 ZH vPOSeD 9 p 0z S v8 0 eqtapAyuy 00 8000 0 0 H IM OT dVI OT IS eseud PLT E SII ZzE Teo SE SGL9 L 62 99vl I G HO 94 Seen eas aes Sao Seorpur uorjeunqeg 80S 0 I88 S2 LE GC 9Z 9TE T 92 98t 7 v Z pOSH J I 0 z v 9 Sc 09 C O9c eIcE C vz 9c6v z vP42 HO z94 LZl 0 6L9 Zc eSS Z Z7 9 60 2 z 9v08 z S HO ZON 89070 8L 61 0S88 61I 02 96v9 1 O0z 9zIV I To9d 80S 0 LIT T 6SL 0z cZz 9lIv G Iz ezvL I Z HO Z ZON LZ OH t c 61 961 61 0z 96vL Y 0z ez9t 9 c vos ea 80S 0 70 9T vzG GI LI 9 62 6 91 9e266 c z zon TOT T PSG 61 ZSp 81 0z 9S6L Z 61 962G8 494 LZl 0 209 I GLY El vPI 986v 2 VPI eLvE Hozon LZl 0 O 81 07 8T 6I 9089 v 61 90Lc 9 7109d 890 0 L90 TI DET TT ZT 80LS 8 ZI 9LEE L goozon 80S 0 LZG 81 610 81 6I 9vPL6 Z 61 99LG8 6 Z T094 80S 0 SZ2 6 SPL 8 0I 9E8G G 60 986L I z z 09 zon LZl 0 680 8T 96 LI 61 99GI 8 81 9 60 I pOSed TEO Z ZE6 6 TO6 L 0I 9691 I 80 99SZ I b 02 zon 80S 0 ge G es p20 T vI 9Lt6 Z vyI 99Sp 6 Zz4HOe4 80 9L v I 9 n LZT 0 I08 8 vL9 8 60 Z8S T 60 90cl z z
97. BRIUM PHASES EXCHANGE SPECIES GAS PHASE EXCHANGE MASTER SPECIES PHASES PRINT SOLUTION MASTER SPECIES SOLUTION SPECIES SURFACE MASTER SPECIES SURFACE SPECIES and TRANSPORT 68 User s Guide to PHREEQC SOLUTION SOLUTION This keyword data block is used to define the temperature and chemical composition of initial solutions Spe ciation calculations are performed on each solution and the resulting speciated solutions may be used in subsequent reaction transport or inverse modeling calculations Facilities exist to adjust individual element concentrations to achieve charge balance or equilibrium with a pure phase Example Line 0 SOLUTION 25 Test solution number 25 Line 1 temp 25 0 Line 2 pH 7 0 charge Line 3 pe 4 5 Line 4 redox O 2 O 0 Line 5 units ppm Line 6 density 1 02 Line 7a Ca 80 Line 7b S 6 96 as SOA Line 7c SC2 1 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 g 3 5 Line 7g Fe 55 ug kgs as Fe S 6 5 2 Pyrite Explanation Line 0 SOLUTION number description SOLUTION is the keyword for the data block number positive number to designate this solution Default is 1 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 description optional character field that describes the solution Line 1 temp value temp indicates
98. CHANGE gas phase GAS PHASE pure phase assem blage EQUILIBRIUM PHASES surface assemblage SURFACE reaction REACTION and reaction temperature REACTION TEMPERATURE these entities will then be allowed to equilibrate Alternatively entities can be defined explicitly with the USE keyword USE keyword number can be used to explicitly define an entity to be used in the reaction calculation Any combination of the keyword keywords can be used to define a reaction USE keyword none can be used to eliminate an entity that was implicitly defined to be in a reaction For example if only a solution and a surface are defined in a simulation and the surface is defined to be in equilib rium with the solution then implicitly an additional reaction calculation will be made to equilibrate the solution with the surface Though not incorrect the reaction calculation will produce the exact same compositions for the solution and surface By including USE surface none the reaction calculation will be eliminated see examples 8 and 9 The composition of the solution exchange assemblage surface assemblage pure phase assemblage or gas phase can be saved after a set of reaction calculations with the SAVE keyword Example problems The keyword USE is used in example problems 3 6 7 8 and 9 86 User s Guide to PHREEQC USE Related keywords EQUILIBRIUM PHASES EXCHANGE GAS PHASE MIX REACTION REACTION TEMPERATURE SAVE SOLUTION and
99. DES SEHE REPRISE REF Re ERR Eo Pee ROKE ERE EREN EE EAEE 62 Related key Wordi m sobs 62 REACIION TEMPERATURE nr ehe bete e Cep P eee nete HERE LEER FERRE ERO OKE ERE o EERE etas 63 lo cupa p sus 63 Explanation M iyakusasusakssss 63 pcnc EE E 63 EX plamat on 2 H 63 NOTES steht a uuu a a ss 63 Example proDIems 64 Related Keywords M 64 DAV E osdvsensscsendanonyceeteeie 65 EX ANP T 65 EX pla ation EM 65 INGLES e 65 Example problems 3 nr re D e err e REO PEE e PERLE Eo cepa Eee Eb rbi Dente PR Pr 65 Inmac C X a duets 65 SELECTED OUTPUT rrr rh erbe te or ether Er EXE REED skies oe UTEN EREN EERTE Ei 66 Example M 66 Explanation 1n reta he eie nerit ro OE LE CU e LER canta PIE SEERO EE 66 hn e een
100. E Example 1 Line 0 REACTION TEMPERATURE number description Line 1 list of temperatures Example 2 Line 0 REACTION TEMPERATURE number description Line 1 temp temp in steps SAVE Line 0 SAVE keyword number SELECTED OUTPUT Line 0 SELECTED OUTPUT Line 1 file file name Line 2 totals element list Line 3 molalities species list Line 4 activities species list Line 5 equilibrium phases phase list Line 6 saturation indices phase list Line 7 gases gas list SOLUTION Line 0 SOLUTION number description Line 1 temp value Line 2 pH value charge or phase name saturation index Line 3 pe value charge or phase name saturation index Line 4 redox redox couple Line 5 units concentration units Line 6 density value Line 7 element list concentration units as formula or gfw gfw redox couple charge or phase name saturation index SOLUTION MASTER SPECIES Line 0 SOLUTION MASTER SPECIES Line 1 element name master species alkalinity gram formula weight or formula gram formula weight of element SOLUTION SPECIES Line 0 SOLUTION SPECIES Line 1 Association reaction Line 2 log k log K Line 3 delta h enthalpy units Line 4 analytical expression A A gt A5 Ay A Line 5 gamma Debye H ckel a Debye Hiickel b Line 6 no check Line 7 mole balance formula 90 User s Guide to PHREEQC SURFACE Line 0 Line 1 Line 2 Line 3 Line 4 Li
101. E SPECIES input Example problems The keyword EXCHANGE MASTER SPECIES is not used in the example problems See listing of default database file in Attachment B for example 44 Related keywords EXCHANGE EXCHANGE SPECIES SAVE exchange and USE exchange User s Guide to PHREEQC EXCHANGE SPECIES EXCHANGE SPECIES This keyword 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 Line 0 EXCHANGE SPECIES Line 1a X X Line 2a log_k 0 0 Line 1b X Na NaX Line 2b log_k 0 0 Line 1c 2X Ca 2 CaX2 Line 2c log_k 0 8 Line 1d Xa Xa Line 2d log_k 0 0 Line le X Na NaX Line 2e log_k 0 0 Line If 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 1a 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 K at 25 C for the reaction Default 0 0 Unlike log K for aqueous species the log K for ex
102. Ee E ET EEEO Cesare Rb eb rne khe PR EE EUR 41 CONTENTS lil Related Keywords cR 41 EXCHANGE UR 42 Example e 42 Explanatiohi RR P 42 Notes e 42 Inc s 42 Io e 5urob PUPPES 42 Nn 2 EE 43 Example problems u ennen B a 43 Related Key WOrds sssscesscssuscsessseivacszasabbnssskscsondentauieasien eere EEEE EEE E RA ses KEE RE E eE TERE ETE ERR E ER ESES 43 EXCHANGE MASTER SPECIES ierit estre dene rent er rere ebd pee TR dase sten p rese ce T 44 Incun lm 44 EEX PAM at OM EE X 44 NOLES r a 44 Example proDlerns ee e saku 44 Related keywords E 44 EXCHANGE SPECIES 3p grt ie ceu be ens hs bl aasan stan Sasa q Re Ro ele 45 Example 45 Explanation Mr 45 NOTES HU 45 Example Problems p 46 Related Keyw0rds u E 46 GAS PASE oc sa Saa
103. G LZ Wu eilep LUT eT x bor H S G HO N OZH S t Teox 09L vZ uy eiT9Pp 8 8 8 x bor H t P HO n OZH p PHN 0 0 x bor b n ven SSIOSdS NOIINIOS 06Z0 8 Z 0 0 z zon 9 0n 0620 8 2 0 0 con s 0n 0620 8 7 0 0 ven v n 0620 8 2 0620 8 Z2 0 0 ven n SNIONdS H3HISVW NOILNTOS L 9 5 zo T 0 0 N S N qdd ENSE n FHN se 0 0 e N EON se 62 0 S N O ZTLE 9 s EODH S 789 THT A3TUTTEXTV 0 SE6T 19 82 v TS ed z000 0 uW 20070 ea I 66 x 0 89L01 eN 8 I62I BW EZT BD Z 0 0 0 xopei 0 SZ dus 3 z0 T Aqtsuep ISv 8 ed ee 8 Hd wdd sarun 6L61 IW LH WOHISQHON WOH3 WALWMY S T NOILNTIOS z qeme s ojeroeds pue untuein ppyv T eTdwexg ATLIL aNa S3IONdS AOYIANS SHIOHdS YALSYW HOYIANS S31038dS J NYVHOX4 S3IOHdS WHLSVW SONVHOXS sSusvHda S3103dS u3ISVW NOILATIOS S3IOHdS NOIIn IOS ejduiexe JO 3ndino p eigen User s Guide to PHREEQC 94 con 90 LI 6 v 9 g aruruezn LZl 0 608 L Zoe L 80 9001 80 9 SI v FOSFHN Z HO OTOFISEPW OP IZ DP LZ p0 9 oTel 890 0 9L0 L EPT L 80 9007 8 80 T6T L EHN cOtS IL Z 90 v GeT 9 zOTS TSZ O vv0 9 6L 6 LO 9Zzv0 6 90 9019 I VHN 0084 68 0T Z0 vZ ETET ea qtzepts 90 9vZL l E N OZHE HOS LOETSZ WN 99 81 T6 91 SLT p earrordes EPT T c9 92 0zc Gc Lz 9lvE Y 92 9620 9 uW OZHE HOS LOETSZ WN 9L ST 16 91 SI I arrord s 92 9620 9 UN OOUN ET TI O
104. H of 4 5 It is assumed that all of the element or element valence state is converted to this predominant species in a theoretical alkalinity titration However in a real alkalinity titration significant concentrations of species of elements and element valence states that have nonzero alkalinity contributions may exist at the endpoint of the titration and the extent to which this occurs causes the alkalinity calculated by PHREEQC to be a different quan tity than the measured alkalinity Species that are especially susceptible to this problem are the hydroxide com plexes of iron and aluminum Thus the alkalinity of a solution as calculated by PHREEQC though it will be numerically equal to the measured alkalinity is necessarily an approximation because of the assumption that a titration totally converts elements and element valence states to 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 for the species which is defined in the SOLUTION SPECIES keyword data block and the alkalinity contributions of the master species which are defined with the SOLUTION MASTER SPECIES keyword data block Total alkalinity is part of the solution composition defined with the SOLUTION keyword data block See Description of Data Input Mole Balance Equations for Elements The
105. I x bor OZH FHN 8 H OT EON Teoy g u e3Tep EELZ x bor Teox 8P zl1 e3leP pOdHeD Z FOdH Z 0 ZSZ 6 BOT H EHN FHN Teoy OOI Y e3rep 6Sy 9 x bor Ieox O l ZlE d e3T p pOde POd Z 29 080 LOZ BOT OZH 9 ZN OT H ZI ON Z Teoy OS9 I Uu eITEP 00 Z X bor 0000 0 0000 eunureb POSeD Z FOS 492 Te2x 09L p Y eATEP 0LS 8Zz BOT 0000 0 000 G eunreb OZH ZON Z H Z EON 6 ILE9G I9LOL LIG v8 9166 v689vGvE O0 TLOO LTET oTqATeue Teoy 00 G Y eITEP Teox IL8 0 V ejrep v66 9 BOT SEV II x bor SZH H SH 00H9D H Z OO Z 92 0000 0 000S eunureb 818 S8F SL ZIGGE 0vv662 0 ZEL 87ZT oT qATeue TeoxX OvPl 09 uq eITEP Teox GtG u eiTep S9 BOT pege x bor OZH t SH 8 H 6 Z vOS 009D Z 00 490 0000 0 0000 S eweb 08L ZT x bor Teox I ZI d e3T p H HO O OZH Z 20 816 2I x bor H Z S SH qTeoy oss p Y e3I9P 09L x bor po 8S88 6T 6 LOEZ LV900 0 688 9G6 oTqATeue dH d Z H Teo S8 U eqTEPp 886 I x bor I0 6Z2v SP9ZIO 0 EED Z oT qATeue POSH H Z vOS Teox 8l u eatep 8l x bor T OX 6 0 19 Y eITEP dH d H TLO TE x bor OZH PHO 8 H OI Z OO 0000 0 000S h euureb leox OzG v Y eITEP 6 8298vc7 SG 61 BOT TS6GL S9T 91 98692 EI8FFE60 0 S961 v9v oTqATeue VOdZH H Z vOd TeoyY 8EL S Y eqTEP T89 9T x bor 0
106. Line 6 Line 7 Line 8 Line 9 KNOBS iterations iterations tolerance tolerance step_size step size pe step size pe step size diagonal scale True or False debug prep True or False debug set True or False debug model True or False debug inverse True or False Line 10 logfile True or False MIX Line 0 Line 1 PHASES Line 0 Line 1 Line 2 Line 3 Line 4 Line 5 PRINT Line 0 Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 MIX number description solution number mixing fraction PHASES Phase name Dissolution reaction log k log K delta h enthalpy units analytical expression A A gt A5 Ay As PRINT reset True or False eh True or False equilibrium phases True or False exchange True or False gas phase True or False other True or False saturation indices True or False species True or False surface True or False Line 10 totals True or False Line 11 selected output True or False Line 12 status True or False REACTION Line 0 Line 1 phase name or formula relative stoichiometry Line 2 Line 0 Line 1 phase name or formula relative stoichiometry Line 2 Example 1 REACTION number description list of reaction amounts units Example 2 REACTION number description reaction amount units in steps SUMMARY OF DATA INPUT 89 REACTION TEMPERATUR
107. N 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 3 defines U as the primary master species for uranium and the secondary master species for the 4 valence state UO5 is the secondary master species for the 5 valence state and LO is the secondary master species for the 6 valence state Equations defining these aqueous species plus any other complexes of uranium must be defined through SOLUTION_SPECIES input In the data block SOLUTION_SPECIES table 3 the primary and secondary master species are noted with comments A primary master species is always defined with an identity reaction Secondary master species are the only aqueous species that contain electrons in their chemical reaction Additional hydroxide and carbonate com plexes are defined for the 4 and 6 valence states but none for the 5 state Finally a new phase uraninite is defined with
108. ON TEMPERATURE keyword and mixing parameters MIX keyword are to be used in the reac tion calculation Example Line 0a USE equilibrium phases none Line Ob USE exchange 2 Line Oc USE gas phase 3 Line Od USE mix 1 Line 0e USE reaction 2 Line Of USE reaction temperature 1 Line 0g USE solution 1 Line Oh USE surface 1 Explanation Line 0 USE keyword number or none USE is the keyword for the data block keyword one of eight keywords equilibrium phases exchange gas phase mix reaction reaction temperature solution or surface number positive integer associated with previously defined composition or reaction parameters none the specified keyword will not be used in the reaction simulation Notes 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 surface assemblage a pure phase assemblage or a gas phase In addition mixtures irreversible reactions and reaction temperatures can be specified for reaction calculations 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 in the reaction simulation That is 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 EX
109. RODUCTION 3 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 con centration of the element has been reduced to zero then the numerical method will appear to have failed to con verge Other physical impossibilities that have been encountered are 1 when a base is added to attain a fixed pH but in fact an acid 1s 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 Known convergence problems cases when the numerical method fails to find a solution to the non linear algebraic equations have occurred only when physically impossible equilibria have been posed and when trying to find the stable phase assemblage among a large number approximately 25 minerals each with a large number of moles 5 moles or more It is suspected that the latter case is caused by loss of numerical precision in working with sparingly soluble minerals that is small aqueous concentrations in systems with large total concentrations on the order of 100 moles Occasionally it has been necessary to use the scaling features of the KNOBS keyword The scaling fe
110. Robie and others 1978 The log of the activity of H4SiO is plot ted on the x axis and the log of the ratio of potassium ion activity to hydrogen ion activity is plotted on the y axis Selected results for simulations A1 A4 are presented in table 14 and are plotted on figure 2 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 and are not calculated by the modeling in these simulations From the positions of point B and D it can be deduced that the reaction path should follow the gibbsite kaolinite phase boundary to some intermediate point C before the path crosses the kaolinite field to point D Similarly there is a point E on the kaolinite muscovite phase boundary where the reaction path begins to cross the muscovite field to point F Simulations A5 and A6 table 13 solve for these two points In simulation A5 point C is calculated by allowing microcline to dissolve to a point where kaolin ite is at saturation and is present in the phase assemblage while gibbsite is at saturation but not present in the phase assemblage Likewise simulation A6 solves for the point where muscovite is at saturation and present in the phase assemblage while kaolinite is at saturation but is not present in the phase assemblage Assigning an initial amount of 1 mol to kaolinite in A5 and muscovite in A6 is arbitrary the amount must be sufficient to reach equilibrium with the mineral
111. S are also defined in the SURFACE keyword data block The charge on a surface species or an aqueous species is defined in the balanced chemical reaction that defines the species in the SURFACE SPECIES or SOLUTION SPECIES keyword data block See Description of Data Input Non Electrostatic Surface Complexation Modeling Davis and Kent 1990 describe a non electrostatic surface complexation model In this model the electro static term is ignored in the mass action expressions for surface complexes In addition no surface charge balance or surface charge versus potential relation is used only the mole balance equation is included for each surface site For data input to PHREEQC the non electrostatic model for a surface is invoked by using the no edl iden tifier in the SURFACE keyword 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 func tions denoted f in the previous sections These include f f f fg fu Q f fo d f f f f y fy and fy where f and fo are the simply the mole balance functions for hydrogen and oxygen and m refers to all aqueous master species except H e H5O and the alkalinity master species The corresponding set of master unknowns is Ina o Ina n nox Indy o Ina InW N gas p or possibly Ina in speciation calcu amp lations Ina u
112. S 6 OI 9evPl t OT 8T69 Z EODUN I0 9vS8 v eN 80S 0 S2 6 SPL 8 0I 9 E8S G 60 986L I z z 02 zon 890 0 96L 61 v98 61 02 966S8 I 02 969 I Z EON UN TEO Z ZE6 6 I06 L 0I 9691 I 80 99SZ2 I v 02 zon eee gs 9vS 68 SIE S 90 9crv8 c 90 9Lv8 Yv EON 890 0 0S88 v LTE F S0 9tIP I S0 60Z T zoo 90 SLr8 P S N 890 0 GGy y 99G b SQ ST LI S0 9Sl1L Z 0929 p nunuoo jdwex Jo 1ndinO p IALL 95 EXAMPLES 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 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 SOLUTION MASTER SPECIES input the values for the default data b
113. SPECIES data block the exchange reactions are defined by the EXCHANGE SPECIES data block of the default database file The results for example 9 are shown by the curves in figure 5 Also shown are the results of PHREEQM simulations for the same problem except that dispersion was included in the PHREEQM calculations Only the points from the PHREEQM calculations that differ from the PHREEQC results are included on figure 5 The main EXAMPLES 115 1 2 r 1 0 0 8 0 6 K 0 4 MILLIMOLES PER KILOGRAM WATER Z 5 0 2 0 1 0 PORE VOLUMES Figure 5 Transport simulation of the replacement of sodium and potassium on a cation exchanger by inflowing calcium chloride solution Lines are concentrations at the outlet of the column as calculated with PHREEQC symbols are shown for PHREEQM calculations Appelo and Postma 1993 where they differ from the results of PHREEQC circles for Na sodium diamonds for CI chloride squares for K potassium and triangles for Ca calcium features of the calculations are the same between the two models Chloride is a conservative solute and begins to be eluted at about one pore volume The sodium initially present in the column exchanges with the incomi
114. TSPH Z OZH H 9 P HO SOZISE W erraos Adu2 0 S9 699 vPSIGP Ob S 6169 9L0S58610 0 S98 801 oTqATeue Teox pg9 pG Y e3Tep Teoy 9LL y d e3rep L9Z 0v x bor 89v 1 x bor HZ T POTSPHG E Z05 20d p HO TYE Z Z DBWSZ 0 M9 0 OZHZ ITI Z HO OIOS ETSE ZIVSZ 0DWO9 0M 5 zoo 3TTTI 00Z SI X bor Teo ZG 9p d eITEP OZH Z Z UW H Z Z HO UW 66 Ic X bor eiroaduooid ad POTSPH b Z DW H 9 OZH p Z HO OIOPISEDNW oTel Ove SZ x bor OZH Z Z UW 9 H HOOUN TeoyY ELE 8G u eITEp e3ruebuew LEO Sb X BOT H Z POTSPH Te9xX Ob9 001 d eITEP L9 P HO TW 7 Z eOS9T 0 OZH ZT Z HO OIOL9 ETSEE ZIVS9T1 0 D 0 0 T9 x bor e3ruoTTT40uquoWN e2 OZH Z UW Z H 8 POEUN aruueusnen Te2X Pep IGT Y eqal p 8 89 x BOT TeOxX OIl G9 Y eiTep OZH9 VOTSPHE IVZ Z B WS HOT 8 HO OIOE ISZIVGDW Ose Tr x bor WPT S4tz0TYD OZH Z Z UN Z H p ZOUN eqrsnptorkg Teoy 9L 6G q eITEP OL ZT x bor 000 9 X bor VPOTSPH EMTIV M H OT Z HO OTOETSETVM OZH 8 vOd Z Z jd OZH8 Z pOd 94 eoru 3 93TUPTATA Teo 028 0 u e3I9P Teo G 6 Uu e T p LS 07 X bor 288 v x bor POTSEH P HO TW M OZH 8 80 ISTVN SZH Z HZ S iedspiej3 x Ing ns Te9x 08S II Y e3I9P 809 b x bor PIL 6T X BOT SH Z494 H Sod POTSPH Z p HO TW Z Z O OZH 8 80ZISZIV O e3rMeuTXoeN eiruagouy SI6 X
115. USER S GUIDE TO PHREEQC A COMPUTER PROGRAM FOR SPECIATION REACTION PATH ADVECTIVE TRANSPORT AND INVERSE GEOCHEMICAL CALCULATIONS By David L Parkhurst U S GEOLOGICAL SURVEY Water Resources Investigations Report 95 4227 Lakewood Colorado 1995 U S DEPARTMENT OF THE INTERIOR BRUCE BABBITT Secretary U S GEOLOGICAL SURVEY Gordon P Eaton Director The use of trade product industry or firm names is for descriptive purposes only and does not imply endorsement by the U S Government For additional information write to Copies of this report can be purchased from Chief Branch of Regional Research U S Geological Survey U S Geological Survey Earth Science Information Center Box 25046 MS 418 Open File Reports Section Denver Federal Center Box 25286 MS 517 Denver CO 80225 Denver Federal Center Denver CO 80225 CONTENTS PX jc yaaksakasssa 1 nori m kiska 1 Program capabilities u uu i dee ier Cip e re ERE HEC REESE RE a E ERE E I o ER ee ESKE ao EEEn EESE 2 Proeram imitations ERR P A 3 AQUEOUS model trt trt rr iP e D GA EE EGRE ERERERE SE Hp EE TEL IEEE Ec Ern aite ve PE eed PRESE E RRRR 3 IGngo crure pakka 3 Surface complexati n 5 o nid EMO dep Iber Har a EO Hcet pee E bes
116. a solution by adding H O If more reaction steps are defined with REACTION TEMPERATURE than in REACTION then the final reaction amount defined by REACTION will be repeated for the additional temperature steps Example problems The keyword REACTION is used in example problems 4 5 6 and 7 Related keywords PHASES and REACTION TEMPERATURE 62 User s Guide to PHREEQC REACTION TEMPERATURE REACTION TEMPERATURE This keyword data block is used to define temperature during reaction steps It is necessary to enter this data block if a temperature other than the default temperature is needed for reaction calculations Example 1 Line 0 REACTION TEMPERATURE Three explicit reaction temperatures Line 1 15 0 25 0 35 0 Explanation 1 Line 0 REACTION_TEMPERATURE number description REACTION_TEMPERATURE is the keyword for the data block number positive number to designate this temperature data Default is 1 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 description optional character field that describes the temperature data Line 1 list of temperatures list of temperatures a list of temperatures in Celsius that will be applied to reaction calculations More lines may be used to supply additional temperatures At least one reaction calculation will be performed with each listed temperature
117. action is needed but a number of simu lations are needed to find the appropriate phase boundary intersections In the latter approach only one simulation is needed but knowledge of the appropriate amounts of reaction is necessary Both approaches will be demon strated in this example PHREEQC does not have all of the logic for a complete reaction path program for exam ple Helgeson and others 1970 Wolery 1979 Wolery and others 1990 in particular no automatic step size adjusting algorithm is present to determine the appropriate amount of irreversible reactions to add at each point along the path and to avoid overstepping phase boundaries However the ability to calculate directly the phase boundary intersections provides an efficient way to outline reaction paths on phase diagrams Also in the incremental approach PHREEQC automatically finds the stable phase assemblage at each step so overstepping phase boundaries does not cause any phase rule violations Conceptually the example considers the reactions that would occur if microcline were placed in a beaker and allowed to react slowly As microcline dissolves other phases may begin to precipitate In this example it is assumed that only gibbsite kaolinite or muscovite can form and that these phases will precipitate reversibly if they reach saturation Thus phases precipitated at the beginning of the reaction may redissolve as the reaction pro ceeds The input data set table 13 fir
118. ad 890 0 829 6 969 6 0I eese z OT 8ST0 Z POSUN LZl 0 L6 0I 9v 8 01 TT G90 T II 9L2b I TOUN Lecl 0 L08 8 089 8 60 6SS I 60 9680 2 VOSH 890 0 096 6 Lc0 0I 01 9860 I TI 996 6 ZTOUN LOE 0 60S L c8 L 80 9001 80 et Sl v POSPHN LZl 0 9vI 6 020 6 OI 9LETl L OT 8T9S 6 TOUW LZl 0 I6 98L v0 ezez I v0 9LE9 I POSM 902 0 Sv 0 Lvc 0 TO EZS E T0 LS9 S I2 890 0 006 z LIG Z 0 09Z T 0 88L0 T poseo I0 eLS9 G TO Le 0 9pE Z 6Ic c 0 ezIG v 0 9Sp0 9 VOSeN EZT O EGT L 990 L 80 8907 9 80 9286 8 HOe2 890 0 690 2 LEE 0 8975 8 0 9662 L VOSDW 890 0 66vb v 99G p S0 9ILI E S0O SIL Z 0029 TPL 0 SLS Z DES T 0 8199 Z Z0 9L9vV I Z pOS ILI 0 608 v 6 p S 0 98560 S0O GS8S F ooHeo 70 9976 Z 9 s 890 0 006 Z L96 2 0 9092 I 0 98L0 I poseo 890 0 099 g SEL E p0 88T1 Z p0 EL8 T ZO 09 0 ELES C60 Z 0 9cLt c 0 901S8 6 2 92 v0 99vL t 0 0 20 9990 I e9 890 0 6 y 9 L0S 9 LO0 9LE9 LO FTI E HO N Lel 0 I6 61 98L 6T 0Z IZZ l 02 99 9 I OOHPA LZl 0 00 v ELE P S0 9 10 G S0 991L 9 020 N 89070 cvY9 6I1 OIL 6I 02 9082 2 02 92S86 I goo a 890 0 IIL 6LL v0 9Gv6 I v 0 9699 I OOHEN 890 0 L90 TI DET EDS Z1 90LS 8 ZI 9LEE L oocon LZl 0 9vE 2 6Ic c 0 ezIG v 0 9Gp0 9 VOSeN LZl 0 vvE OI LTS OT II ezeS v II 91L0 9 OOHUN IS1 0 ILP 0 0z 0 TO S8 8E TO I6L F eN g90 0 0G9 6 OL
119. ained for arsenic concentrations if the calcium and magnesium surface complexation reactions were removed The SURFACE SPECIES data block was used to decrease the equilibrium 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 data base This is justified if cations and anions do not actually compete for the same sites EXAMPLES 117 Table 18 Input data set for example 10 TITLE Example 10 Transport with equilibrium phases exchange and surface reactions SOLUTION 1 Brine pH 5 743 pe 4 0 O2 g x 7 temp 254 units mol kgw Ca 4655 Mg 1609 Na 5 402 Cl 6 642 charge C 00396 5 004725 As 05 umol kgw EQUILIBRIUM_PHASES 1 Dolomite 0 0 1 6 Calcite 0 0 0 1 EXCHANGE 1 equil with solution 1 X 1 0 SURFACE 1 equil solution 1 f assumes 1 10 of iron is HFO Hfo w 0 07 600 30 END SOLUTION 0 20 x precipitation pH 4 6 pe 4 0 O2 g a Oe temp Z5 units mmol kgw Ca 191625 Mg 035797 Na 122668 Cl 133704 C 01096 S 235153 charge EQUILIBRIUM PHASES 0 Dolomite 0 0 1 6 Calcite 0 0 QI CO2 g 145 10 SAVE solution 0 END SURFACE_SPECIES Hfo wOH Mg 2 Hfo_wOMg H log_k 4 6 log_k 15 Hfo wOH Ca 2 Hfo_wOCa H log k 5 85 log k 15 TRANSPORT ce
120. al Black Sea water and a water composition during the stage of evaporation in which halite precipitates The hypothesis is that evaporation and precipitation of gypsum and halite are sufficient to account for the changes in water composition of all of the major ions and bromide The input data set table 21 contains the solution compositions in the SOLUTION keyword data blocks The INVERSE MODELING keyword defines the inverse model for this example Solution 2 the solution during halite precipitation is to be made from solution 1 Black Sea water Uncertainties of 2 5 percent are applied to all data Water 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 formula tion In addition mole balance equations are included by default for all elements in the specified phases In this case calcium 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 and to change the uncertainty on alkalinity to 100 percent In the absence of alkalinity data the calculated alkalinity of these solutions is controlled entirely by the choice of pH No pH values were given and thus the alkalinities are un
121. al 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 Parkhurst D L Fleming 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 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 Truesdell A H and Jones B F 1974 WATEQ A computer program for calculating chemical equilibria of natural waters J
122. ally 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 except for character strings at the termination of the pro gram For efficiency a hash table of character strings is kept by the program Each character string including ele ment 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 ORGANIZATION OF THE COMPUTER CODE 33 In reaction and transport calculations if the set of elements exchanger components gas phase components pure phases 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 DESCRIPTION OF DATA INPUT The input for PHREEQC is arranged by keyword data blocks
123. anging 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 Default is 10 that is a _ may change by up to 1 e order of magnitude in a single iteration or pe may change by up to 1 unit Normally pe step size should be smaller than the step size because redox species are particularly sensitive to changes in pe Line 5 diagonal scale True or False diagonal scale allows changing the default method for scaling equations Optionally diagonal scale or d iagonal scale DESCRIPTION OF DATA INPUT 53 KNOBS True or False a value of true optionally t rue indicates the alternative scaling method is to be used false optionally f alse indicates alternative scaling method will not be used If neither 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 diago nal 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 6 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 optionall
124. 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 Reaction is identity reaction for 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 I ogk log K Log K at 25 C for the reaction Default 0 0 Log K must be 0 0 for primary master species 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 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 determine the temperature dependence of the 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 e a e 74 User s Guide to PHREEQC SOLUTION
125. art A Part E performs a similar calculation to part D but uses phase assemblage 2 which does not contain dolomite as a reactant Table 8 Selected results for example 3 Simulation A generates carbonate 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 that is present that is precipitation negative numbers indicate a decrease in the amount of the phase that is 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 Pco 2 Calcite Dolomite CO Calcite Dolomite A 7 297 2 00 0 00 1 977 1 646 B 8 220 3 38 76 2 40 C 7 350 2 23 11 52 D 7 057 1 98 00 00 15 71 7 936 E 7 443 2 31 00 73 040 Selected results from the output for example 3 are presented in table 8 The ground water produced by part A is in equilibrium with calcite and has a log Pc of 2 0 as specified by the input The moles of CO in the phase 2 assemblage decreased by about 2 0 mmol which means th
126. ase phreeqc dat are listed in table 1 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 or more simply with the as identifier where the chemical formula for the reported units is input as shown in the input for alkalinity nitrate 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 It is impor tant to realize when using phase equilibria to specify initial concentrations like O 0 in this example that only one concentration is adjusted For example if gypsum were used to adjust the calcium concentration the concen tration of calcium would vary but the concentration of sulfate would remain fixed Uranium is not included in phreeqc dat the smaller of the two database files that are distributed with the program Thus data 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 SOLUTIO
127. ases 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 umol was unaffected by the removal of water however the concentration of chloride umol kg water increased because the amount of water decreased The mixing simulation increased the mass of water and the number of moles of chloride by a factor of 20 Thus the number of moles of chloride increased but the concentration is the same before solution 2 and after the mixing simulation solution 3 because of the increased mass of water Table 10 Selected results from example 4 kg kilogram umol micromole onden Solution 1 Solution 2 Solution 3 Rain water Concentrated 20 fold Mixed with factor 20 Mass of water kg 1 000 0 05002 1 000 Cl umol 6 657 6 657 133 1 Cl umol kg water 6 657 133 1 133 1 Nitrate N 5 umol kg water 16 9 160 160 Dissolved nitrogen N 0 umol kg water 0 475 475 Ammonium N 3 umol kg water 14 8 0 0 An important point about homogeneous redox reactions is illustrated in the results of these simulations table 10 Reaction calculations always produce redox equilibrium The rain water analysis contained data for bo
128. at 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 atmo spheric carbon dioxide 3 38 compared to about 3 5 and is supersaturated with calcite saturation index 0 76 and dolomite 2 40 No mole transfer was allowed for part B Part C performed the mixing with no additional reac tions The resulting log P lt 0 is 2 23 calcite is undersaturated and dolomite is supersaturated The saturation indi ces 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 EXAMPLES 101 15 7 mmol of calcite should dissolve and 7 9 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 04 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 two methods 1 water can be specified as
129. ated to define the amounts of all of the binding sites for all of the sur faces In the example two surfaces are considered 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 this binding site Lines 1a and 1b require the program to make two calculations to determine the composition of each of the surface assemblages Before any reaction calculations two initial surface composition calculations will be per formed to determine the composition of the surface assemblages that would exist in equilibrium with the specified solution solution 10 for both surface assemblages in this example The composition of the solution will not change during these calculations In contrast during a reaction calculation when a surface assemblage defined as in example 1 or example 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 When the diffuse layer identifier is used the composition of the diffuse layer is calculated 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 thi
130. ating the charge Either of the following are acceptable Al 3 or Al However A13 would be interpreted as a molecule with three aluminum atoms with a charge of plus one Log K and Temperature dependence The identifier log k is used to define the log K at 25 C for a reac tion The temperature dependence for log K may be defined by the van t Hoff expression or by an analytical expres sion 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 expres sion for the temperature dependence of log K for a reaction may be defined with the analytical expression iden tifier Up to five numbers may be given which are the coefficients for the following equation As T log_k or analytical_expression the enthalpy is optional If both are present an analytical expression for temper ature dependence is used in preference to the van t Hoff expression logjgK A A T A log T where T is in Kelvin A log K must always be defined either with Comments The character delimits the beginning of a comment in the input file All characters in the line which follow this character are ignored If the entire line is a comment the line is not echoed to the o
131. ation 3 initial sur face calculation 4 reaction calculation 5 transport calculation 3 solution number used in the calculation 4 exchange number used in the calculation 5 surface number used in the calculation 6 pure phase assemblage number used in the calculation 7 gas phase number used in the calculation 8 the reaction or transport step DESCRIPTION OF DATA INPUT 67 SELECTED OUTPUT number 9 the temperature for the calculation 10 the pH of the solution 11 the pe of the solution 12 the ionic strength of the solution 13 the mass of water in solution and 14 the amount of the reaction step mol 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 calculation identifiers totals molalities pure phases two columns for each phase total amount of phase and mole transfer for current calculation saturation indices and the gas phase data A data item within an input list for example an aqueous species within the molalities list is printed in the order in which it was input If the selected output file contains data for gases defined by the gases identifier the total moles of gas and the total volume of the gas phase precede the moles of gases for the individual components of the gas phase Example problems The keyword SELECTED OUTPUT is used in example problems 2 5 6 7 8 9 and 10 Related keywords EQUILI
132. atures appear to be neces 15 sary when total dissolved concentrations fall below approximately 10 molal Inverse Modeling Inclusion of uncertainties in the process of identifying inverse models is a major advance However the numerical method has shown some lack of robustness due to the way the solver handles small numbers The option to change the tolerance used by the solver is an attempt to remedy this problem In addition the inability to include isotopic information in the modeling process is a serious limitation How to Obtain the Software and Manual The latest DOS and Unix versions of the software described in this report and a Postscript file of this manual can be obtained by anonymous ftp from the Internet address brrcrftp cr usgs GOV 136 177 112 5 The files reside in directories geochem pc phreeqc and geochem unix phreeqc A typical anonymous ftp session follows ftp brrerftp cr usgs GOV Name anonymous Password userid computer replaced with your userid and computer name ftp cd geochem pc phreeqc change directory ftp Is list files in directory phrqcsfx exe ftp gt type binary eliminate any ascii translation for binary files ftp get phrqcsfx exe transfer the file ftp quit quit ftp Alternatively the documentation and DOS or Unix versions of the software can be ordered from the follow ing address U S Geological Survey NWIS Program Office 437 National Center Reston VA 22092 703
133. b vI Lcz eirsoauoopouu 890 0 96L 61 v98 61 02 966S8 I 02 969 I Z EON UN ZOTS 86 90 v 80 0 z3aen LET O 289 1I SSS TI 21 9080 2 21 998L Z HOUW ZOUN 99 I 0 G 96 9 ea3rsnqoa g LZl 0 L6 0Il 978 0I TI 98990 T TlT LZU TI TOUN Z HO UN OZ SI zL 80 8 ea3roaduooi ad LZE O Pte OT LTS OT II eztG v II 91L0 9 OOHUN ZO 96 72 99 Ds 5 zo 890 0 096 6 Lc0 0I 01 9860 I TI 996 6 ZTOUN HN Z0 II 8r c 88 8 5 EHN 890 0 829 6 969 6 OI 9Est c OI esrO c YOSUN OZHL VOSe3 TZ Z 9S IZ SE 6T 7fI 7UeT N 890 0 0S 6 0LS 6 OI 9vvl t OT 8T69 Z ODUN HOOUN Z8 TZ 9 68 Z qaruebuemW Lel1 0 9vI 6 020 6 OI 9LETl L OT 8T9S 6 TOUW 9 HO Z POS E84 IL vE EtZ Zv ZS L M eirsodep Iv9 0 0 6 99 8 0I etL6 v 60 evLl c Z UW OZe3 TO TZ I8 9 Oz p ar3aeu n 60 9 LL E Z UR POEUN 66 LT SS 6T 9Sg 1 ej3ruueusneH LZl 0 60 S 996 v 90 9vL0 8 S0 9280 I HODW ZH O E Z8 T ZZ LP 5 ZH 890 0 v86 IS0 v 0 98 0 I S 0 96588 8 EODH OZHZ vPOSeO 8S v ZZS v9 0 unsd amp 5 LZl 0 98L 689 vP0 9SE9 I v0 9061 Z OOH W Hooea 08 6 P 60 9 91ru3eo9 890 0 690 2 LET g 0 9928 8 0 9662 L vPOSDW HO e4 I9 cV 61 0 HO ea Tes 0 v98 l PEE T 20 9L9 1 z0 9SvPL V z 5W c oo bweo 60 LI 69 vI Ov c e3ruo oqd Z0 8L06 S bg ZOO Sl 81 S IZ 8t 5 zoo 89070 L V 8 v0S 8 60 099 60 EET E HOM v HO SOZTSEDW 07 ZE 9G SE 9E erraos
134. bo e2x 968 az u eipop penunuoo 3033HHd W014 peauep ej aseqeleg VT 2033HHd 8 juewYyoeny 141 Attachment B Description of Database Files and Listing ZHOM OJH H HOM OSH 0 0 x 6OT HOM OJH HOM OJH M OgH 93IS DuTpUuTq ye m x BOT HOS OJH qut zeyd 6 8 H OS OJH x BOT HOS OJH qut Teyd 4 ZHOS OJH 6c L H x BOT HOS OJH 0 0 HOS OJH s ogH ears Burpurq Buoazas L G e qea uoag eqep eseq prov 0661 lexoW pue yeqwozq worty eqep eoegans TIV SulIONdS govaun HOM OJH M OJH HOS OJH S OJH SHIOHdS WHlSVW HOV4uns s x bor 1V L970 XIV X x bor d SOT 2Xdd XZ x bor C po 8 0 ZXPO XZ x b5oT crUuZ 8 0 CXUZ XZ x bor Z no 9 0 ZXn2 XZ x bor 2 94 br o ZXe4 XZ x BOT C UN zS 0 ZXuW XZ x bor cred I6 0 zxed XZ x bor 4S T6 0 ZXIS XZ x BOT 7 6W 9 0 ZXW XZ bo Z e9 8 0 2 XeD KE bo 7HN bo H bo X TT bo X 4 VOS Z H OCH 9 494 OCH9 C VOS TW tM D evovic 0 0 0 0 S1v00 0 VOTSPH C4PO 0 0 x BOT XEN X EN 0 0 x bot X X SHIOHdS N5NVHOXS X X SHIQSSdS YALSYW SONVHOXS Teox 66 ET e3Ie9Pp SI 8 Bot OZHZ Z Qd HZ Z HO Ad 68 z Ho aa Teo Sl Z 3l9p et bor Z pOS Z qd vOoSdd v8t eqtsetbuy Teo 9
135. bor deN 4 N H p S p HO 4d OZH f 494 62 0 x bor Teo G I Y e3I9p VOdH N Z FOdH PN S6 z X bor H Z v Z HO Z83 OZH Z 494 Z Teoy OZI I d eatep 00L 0 x bor Toy 6 1 Y e T p VyOSEeN Z OS eN 9 TZ X bor H P v HO 94 OZH p 94 Sz 0 y BOT OOHEN EODH eN Teo 8 vz d eITEP 9S ZI x bor TeoyY 0I6 8 u e3ilep H HO 94 OZH 9 OLC I X bor OO8N Z 00 EN Teo T LT Y eaT p L9 G x bor 08I vI x bor H Z Z HO e OZH Z 494 H HON OZH N Teox pot Wd eirep Teox ooze u eITEP EL g X bor 0z28 I X BOT H Z HO 4 OZH 494 49W 4 7 5W 0000 0 0000 6 ewwep Teoy pre Y ea3Tep Teoy 089 6 Wu e3T P IS I x bor 0Z0 I X bor POd HOW vOdZH Z 6W 494 7494 Teo V e3T9P 00071 x bor L8 c x bor d d4 J 7494 FOdHBW Z FOdH Z45W Le BOT Teoy 00I Y eITEP pOdZHed pOdZH Z 4 68879 X bor pod W pOd Z4bW 9 E BOT pOdHe4 POdH 94 Teox oScS p uU e3Tep OLE Z x bor L86 01T bor pos6w Z vOS Z 6W SH 4 SHE Z 494 6 EILEO9G S6 8 BOT 9700 8T GEE VI97 6v872GS7E0 0 TZL9 8b oT3 eue Z SH e4 SHZ Z 4 Teo ILL Z d eqI p 66 II X bor 80 I BOT OOH W Z OO H 7 5W pOSH 4 pOSH 7 9a L9900 0 0166 0 oTqATeue Teoy 0 Z Y eITEP Teoy IL Z Y eITEP 0sz z X bor 86 C X BOT pOSed Z OS 72494 00bW Z 09 Z4b5W o z x b
136. carbon dioxide the saturation index of gypsum and the total amounts and mole transfers of pyrite goethite calcite and gypsum to the file ex5 pun after each equilibrium calculation Table 12 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 that is present that is precipitation negative numbers indicate a decrease in the amount of the phase that is present or dissolution Mole transfer indicates no mole transfer of this mineral occurred in the simulation Mole transfer millimoles Saturation O gt added Log millimoles pi d P i i i ia CO Pyrite Goethite Calcite Gypsum gypsum 0 0 9 9 6 95 6 18 0 00015 0 00015 0 12 6 29 1 0 7 99 4 05 3 19 27 27 1 06 1 97 5 0 6 96 2 68 1 63 1 33 1 33 4 54 93 10 0 6 62 2 22 1 13 2 67 2 66 8 15 53 50 0 6 04 1 45 22 13 34 13 25 33 06 12 73 0 The results for example 5 are summarized in table 12 When no oxygen is added to the system a small amount of calcite dissolves and trace amounts of pyrite and goethite react the pH is relatively high 9 91 the pe is low 6 95 and log Pc is low 6 18 As oxygen is added pyrite is oxidized and goethite being relatively 2 insoluble precipitates This generates sulfuric acid decreases the pH and causes calcite to dissolve During these 104 User s Guide to PHREEQC reactions the pe
137. cceptable 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 Line 5 analytical expression A A gt A3 A4 A5 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 e a e A A2 As A4 As5 Five values defining log K as a function of temperature in the expression A A logjyK A A T A log I T E where T is in Kelvin DESCRIPTION OF DATA INPUT 57 PHASES 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 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 equations for the phases may be written in terms of any aqueous chemical species including e 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 equations defining phases should be charge balanced Example problems
138. change species is implicitly relative to a single exchange species In the default database file sodium NaX is used as the reference and the reaction X Na 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 numeri cally equal to the log K for the reaction 2NaX Ca CaX 2Na Master species have log K of 0 0 lines 2a and 2d reference species have log K of 0 0 lines 2b and 2e Notes Lines 1 and 2 may be repeated as necessary to define all of the exchange reactions One identity reaction is needed to define the exchange master species in example lines 1a and 2a 1d and 2d for each exchanger The reference half reaction for each exchanger will have a log K of 0 0 in example lines 1b and 2b 1e 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 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 The equation given for the exchang
139. cit 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 defined to be o Ds flee eid Jax 57 q where I is the surface excess in mol m X4 s is the location of the outer Helmholtz plane ci x is 2 Fa oO concentration as a function of distance from the surface in mol m 3 and c is the concentration in the bulk solution The surface excess is related to concentration in the reference state of 1 0 kg of water m ASI 58 i CU ES where m is the surface excess of aqueous species in mol kg water This surface excess concentration can be related to the concentration in the bulk solution by mi 5 8 Mi 59 where g is a function of the potential at the surface and the concentrations and charges of all ions in the bulk z Tis x ed gis A S sen Xyz D a dX 60 ud 1 2 l x Y I solution FY s where X e e X _ is the value at the outer Helmholtz plane and a gg R T 2 p z is the dielectric d s constant for
140. ckness optional input with diffuse layer default is 105 m 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 There still exist great uncertainties 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 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 The calculation of the diffuse layer 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 The diffuse layer identifier is a switch that activates a different model to account for the accumulation of surface charge An additional printout of the elemental composition of the diffuse lay
141. complete Newton Raphson formulation master species switching and numerical scaling have been included in PHREEQC to eliminate some if not all of the convergence problems in PHREEQE The ability to define multiple solutions and assemblages combined with the capability to determine the stable phase assemblage leads naturally to 1 dimensional advective transport modeling PHREEQC provides a simple method for simulating the movement of solutions through a column The initial composition of the aqueous gas and solid phases within the column may be specified and the changes in composition due to advection of an infill ing solution and chemical reaction within the column can be modeled A completely new capability added to PHREEQC allows calculation of inverse models Inverse modeling 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 Assuming two water analyses 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 PHREEQC allows uncertainties in the analytical data to be defined such that inverse models are constrained to satisfy mole balance for each element and valence state and charge balance for the solution but only within spec ified uncertai
142. culations and description of the sto ichiometric reaction Default is true Optionally other o ther DESCRIPTION OF DATA INPUT 59 PRINT Line 7 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 true excludes print if value is false Default is true Optionally si si saturation indices or sa turation indices Line 8 species True or False species Prints the distribution of aqueous species including molality activity and activity coeffi cient if value is true excludes print if value is false Default is true Optionally species or sp ecies Line 9 surface True or False surface Prints composition of the surface assemblage if true excludes print if false Default is true Optionally su rface Note the hyphen is necessary to avoid a conflict with the keyword SUR FACE Line 10 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 Default is true Optionally totals or t otals Note printing of molalities and other properties of all of the aque ous species is controlled by the species identifier Line 11 selected_output True or False selected_output Controls printing of information to the selected output file Default is true Opt
143. d T NOTINTIOS aqtapAyue pue wnsdAb jo AXTTTGQnTOSs jo eouepuedep eanjerzedusal 7z atTdwexg TILIL O T 070 O T 0 0 ang S3108HdS HOVAd3unS SHIOSdS H3ISVW SOV3H S SSIOSdS NO5NVHOXS SAIDAS YALSYW S5NVHOXS SaSWHd S3IOHdS YALSYW NOILNTOS S3IONdS NOIIn IOS z lduuex 104 1nd no pejoejes 9 ejqer 99 EXAMPLES 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 investi gates diagenetic reactions that may occur in zones where seawater mixes with carbonate ground water The exam ple is divided into five simulations labeled A through E in table 7 A Carbonate ground water is defined by equilibrating pure water with calcite at a Poo of 102 atm B Seawater is defined using the major ion data 2 given in table 2 C The two solutions are mixed together in the proportions 30 percent seawater and 70 percent ground water D The mixture is equilibrated with calcite and dolomite Finally E the mixture is equilibrated with calcite only to simulate slow reaction kinetics of dolomite Table 7 Input data for example 3 TITLE Example 3 part A Calcite equilibrium at log Pco2 2 0 and 25C SOLUTION 1 Pure water pH 7 0 temp 25 0 EQUILIBRIUM PHASES CO2 g 2 0 Calcite 0 0 SAVE solution 1 END TITLE Example 3 part B Definition of seawate
144. duexy WILIIL 9 ejdujexe 10J 1es gyep ndul lq L User s Guide to PHREEQC 106 d Uc 0 0 6 6L 01 00 00 STY Irt L0 6 89 CE 9V 9 9 c 9 I 0 0 00 vol 00 OTS EST SE S c0 ev d 0 0 L3 OT 19 9 00 0 00 Se 67 S 6 6 88 061 vv qa ec 0 0 L 00 TL6 00 Lr It IT6 c0 0c CV q 6S 6l 0 0 00 00 SLI 0c S SST IT 8 SUC CV V LYI L OI 8 E 00 00 0 00 0 0070 Ol L 0 I0 070 IV SajouioJ2IU1 ude 6 SUNON ej oosn eHuyoey eNsqqio eN oosnw ewuyoey AISI tO SFH o H 1 Jsuen uone uo UlOd louu nwis x pu uomneanjes SaJOWOIIW 49JSUEJ JOIN AyAnoe 607 SUIJOOJOIIN c m8u uo slurtod po eqer 0 si J ude18 uo juroq uonviidiooud ojeorpur s1ojsue AOU oAnrsod uonnjossip ojeorpur si Jsue n AJOU oAHeSoN 9 o durexo 107 Jos ejep indur oy ut s aqey o s19jo1 uone NUTS 9 ejdurexe 10J sjnseJ peioejes PL AALL 107 EXAMPLES 8 0 m MUSCOVITE 6 0 5 0 MICROCLINE F AN GIBBSITE 3 0 Log a a 2 0 KAOLINITE 1 0 0 0 1 0 8 0 7 0 6 0 5 0 4 0 3 0 2 0 1 0 0 0 Log a sip Figure 2 Phase diagram for the dissolution of microcline in pure water at 259C showing stable phase boundary intersections example 6 part A and reaction paths across stability fields example 6 part B Diagram was constructed using thermody namic data for gibbsite kaolinite muscovite and microcline
145. e PAN o Noa ue dina Q8 m For mole balance equations the numerical model treats the gas phase components in the same way that it treats aqueous species Thus the terms dn appear in the Jacobian for the mole balance equations for each element The total number of moles of each element in the system includes both the number of moles in the gas phase and the number of moles in the aqueous phase Apart from the new terms in mole balance equations the one new function for the gas phase requires that the sum of the partial pressures of the component gases is equal to the total pressure P j The function fp is total defined as follows fp total P otal Er 29 8 The total derivative of fp with respect to the master unknowns with the convention that positive dN as total are increases in solution concentration 1s df Yy Ye Pdin a 30 8 iota m g g m m For data input to PHREEQC the mass action equations Henry s law constant and temperature dependence of the constant for gas phases are defined with the PHASES keyword data block Components to include in gas phase calculations and initial gas composition are defined with the GAS PHASE keyword data block See Description of Data Input Equations for Equilibrium with Pure Phases Equilibrium between the aqueous phase and pure phases including single component gas phases is included in the model through the addition of heterogeneous mass ac
146. e Pues ees 107 15 Input data set for example 7 esie iecit tice eire ERR EU EE CU E He epe HEP e e CHEER TU UI Sacs 109 16 Input dataset for example 8 eite titt tt cete oret ire id Eee Tess to pe an cose e oed epe E EREET 112 17 Input dataset for example 9 aio ete eh rr HH TRI UR USE ERST ERE ENE a Saita 115 18 Input dataset forexample IU ceteris fete eteete reri oe tae pep rb ka ERIS e ee SER EUREN ERUIT eR EHE NE Pe E po E 118 19 Input data set for example Il ic cene eer eite im it e ede ee e HER ee eee Sab be asqa 122 20 Selected output for example 1 iie teet petiti tes sett PE tes E E E Ie gue saceveoscwousd sp ee EE e Up e PEN e eder aei 123 2 Input dataset for example 12 eee entere UR RW B DR EE e RS EE TERRE ren 125 22 Selected output for example 12 ua trteeset esie E ee EET qpenseaiss HC EE UIS VEA VER Fera vu gU ave Feb eu Ce see egeo 127 CONTENTS vil ABBREVIATIONS OF UNITS The following abbreviations are used in this report atmosphere atm calorie cal Coulomb C degrees Celsius G degrees Kelvin K equivalent eq gram g Joule J kilocalorie kcal kilogram kg kilojoule kJ liter L meter m mole mol milliequivalent meq millimole mmol micromole umol 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 t
147. e assemblage in equilibrium with a fixed solution composition 3 determination of the composition of a surface assemblage in equilibrium with a fixed solution composition 4 calculation of chemical composition as a result of chemical reactions which include mixing net addition or removal of elements from solution termed net stoichiometric reaction equili bration with an assemblage of exchangers equilibration with a gas phase at a fixed total pressure equilibration with an assemblage of surfaces dissolution or precipitation of pure phases or variation in temperature and 5 advective transport through a series of cells in combination with any of the available chemical processes This combination of capabilities allows the modeling of very complex geochemical reactions and transport processes by using one or more simulations In addition to speciation reaction and transport calculations the code may be used for inverse modeling by which net chemical reactions are deduced that account for differences between one 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 Keyword data blocks may be entered in any order However data elements entered on a single line are order specific As much as possible the prog
148. e balance equation for iron but not in the mole balance equations for S 6 or S 2 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 rewrit ten 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 bal ance equation becomes ten orders of magnitude smaller than the activity of another master species included in the same mole 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 prob lems in dealing with small concentrations
149. e balance on carbon Total carbon is assumed to co vary with pH and alkalinity and an equation relating the uncertainty in carbon and the uncertainties of pH and alkalinity is included in the inverse model See Equations and Numerical Method for Inverse Modeling All phase names must be defined through PHASES or EXCHANGE SPECIES input Line 4c and 4d are included to allow ion exchange reactions in the inverse model Exchange species with the names CaX and NaX are defined in the default database and are thus available for use in inverse modeling 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 only to define uncertainties for pH elements or element valence states that are different than the default uncertainties or to define mole balance DESCRIPTION OF DATA INPUT 51 INVERSE MODELING equations for elements not included in the phases Mole balance equations for alkalinity and electrons are always included in the inverse model In some artificial solutions such as pure water or pure sodium chloride solutions the alkalinity may be very small less than 1e 7 in both initial and final solutions In this case it may be necessary to use large relative to 1e 7 equivalents uncertainties 1 0 or 1e 6
150. e 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 A listing of the file phreeqc dat follows In the interest of space the file wateq4f dat is not included in this attachment but is included with the program distribution 134 User s Guide to PHREEQC 00070 X bor geno Zn 0SL0 0 0000 f eunreb 000 0 x bor 00070 x bor eN 2N Z q z ad 0002 0 0009 6 eure b 000 0 x bor 000 0 x bor Z pO Z DO Z W Z 6W 0000 0 0000 S euureb 0S91 0 0000 S eure b 000 0 X bor 000 0 x bor C UZ C UZ Z 2e9 Z 2809 0000 0 0000 eunure6 000 0 x BOT 000 0 X bor OZH OZH 1g 14g 000 0 x bor 0000 0 0000 9 eure b 00070 X bor TT TT 0000 0 0000 6 euureb 000 0 x bor 0000 0 o00s eure b H H 000 0 x bor H H SNIOHdS NOILNTOS 0000 0 0000 euue6 no 0 0 T no 14 n5 00070 X bor no 0 0 eno z no pOd vOd 9vG 9 no 0 0 z ng no 61 LOZ qa 0 0 cdd qa 000 0 x bor VP ZII po 0 0 2402 po goggH COMEH LE S9 uz 0 0 z uz uz v06 6L ag 0 0 1g ag 0000 0 0000 euure6 6 6 9 FI 0 0 T I TUI 00070 X bor v866 81 a 0 0 4 a ON ON 8 EL6 0 d oz pOd d I8 01 a 0 0 OGEH 8 00p0 0 0000 S euure6 N 0 0 pHN N 000 0 x bor N 0 0 ZN 0 N vOS Z v0S N 0 0 ZON N N 0 0 EON S N 0000 0
151. e layer iterations Dur ing the model iterations which occur within the diffuse layer iterations the values of the functions are updated using the following equation NUT k 1 P Zis tna dina Y 66 E EQUATIONS FOR SPECIATION AND FORWARD MODELING 21 where k refers to the model iteration number and g is the value that is evaluated explicitly at the beginning of the diffuse 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 Zis that are estimates Thus diffuse layer iterations must continue until the values of the functions have converged within specified tolerances that is the changes in the values of the functions are small between one diffuse layer iteration and the next When explicitly calculating the composition of the diffuse layer the function involving the sinh of the poten tial unknown equation 54 is replaced with a charge balance function that includes the surface charge and the dif fuse layer charge N N s aq Dg Yun tuts 67 i i where the value of the function f s is zero when charge balance is achieved The total derivative of the function f x IS N Na df Yz an Y z an ji 68 i i For data input to PHREEQC explicit calculation of the diffuse layer is invoked using the diffuse layer identifier in the SURFACE keyword data block Specific surface area A and mass of surface
152. e linear in the unknowns and and once the values of all of the a and are known the values of can be easily determined from equation 87 This formulation of the inverse modeling problem produces a series of linear equality and inequality con straints that need to be satisfied The algorithm developed by Barrodale and Roberts 1980 is used to solve this optimization problem Their algorithm performs an L1 optimization minimize sum of absolute values on a set of linear equations subject to equality and inequality constraints The problem can be posed with the following matrix equations 30 User s Guide to PHREEQC AX B CX D 92 EX lt F The first matrix equation is minimized in the sense that Y is a minimum where i is the index of I b Xa J rows and j is the index for columns subject to the equality constraints of the second matrix equation and the inequality constraints of the third matrix equation The method will find a solution that minimizes the objective functions AX B or it will determine that no feasible model for the problem exists Initially AX B is set to minimize yy En d The equality constraints CX D include all mole bal u qm mq ance alkalinity balance charge balance electron balance and water balance equations and all inorganic car bon alkalinity pH relations The inequality constraints EX lt F include two inequalities for each of the s one for positive and
153. e problems DESCRIPTION OF DATA INPUT 55 MIX MIX This keyword data block is used if two or more aqueous solutions are to be mixed together The mixing occurs as part of the reaction calculation Example Line 0 MIX 2 Mixing solutions 5 6 and 7 Line la 5 1 1 Line 1b 6 0 5 Line Ic 7 0 3 Explanation Line 0 MIX number description MIX is the keyword for the data block number positive number to designate these mixing parameters Default is 1 description optional character field that describes the mixture Line 1 solution number mixing fraction solution number defines a solution to be part of the mixture mixing fraction positive decimal number which is multiplied times the concentrations of each ele ment in the specified solution 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 if the number of moles of sodium in solutions 5 6 and 7 were 0 1 0 2 and 0 3 the number of moles of sodium in the mixture would be 0 1 x 1 1 0 2 x 0 5 0 3 x 0 3 03 The moles of all elements are multiplied by the solution s mixing fraction including hydrogen and oxygen Thus the mass of water is effectively multiplied by the same fraction In the example 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 co
154. e saturated but they can not dissolve because they were given zero initial moles in the phase assem blage The amount of reaction that is calculated in this simulation is precisely enough to reach equilibrium with gibbsite possibly including precipitation of one or more of the other minerals No gibbsite will dissolve or precip itate Simulations A2 A4 perform the same calculations for kaolinite muscovite and microcline EXAMPLES 105 GN 0 01 0 0 93TUTTO M 0 OT 0 O e3rAcostn 0701 0 0 9SUT 2OJOT T SHSVHd WOIYdI TINO I uoranjos 4SN CONS 0701 0 0 93TSQqdT5 0701 0 0 93TUTTO PM 0 OT 070 93TAooSU I susvHd WnrugsITIDOS I uoranios ASN aNd Toun O 0S O0 O0r O cE O 9I O 8 0 v O c O I v9 O ZE O 91 0O 80 0 7070 OST eur 2O43OT T NOILOVWH 070 070 9SUT 2OJOT 0 0 0 0 9e3rTAoosn 070 070 sqqfo 070 0 0 93TUTTO 3 I SHSVHd W IHgITID S T uoranios ASN seradepunoq eseud usemjeq uaeqd go9 eTdwexg JTLIL GN O T 0 0 93TAoosn 001 80 TSTVM 0 0 93TUTTO M I SusvHd W IHSITIDnOS T uoranpos ASN ej3rTur oex ou mq quesedd ea4rAoosnu yytM qurod pur4 9v9 eTduexg TILIL GN O T 0 0 93TUTTO M 0 OT 80 TSTVM 0 0 qarsqqr5 I SusvHd W INSITIDn S T uorqnT1os usn e3rsqqrb ou mq q1uesedd e4rurT O X yytM qurod pur4 qv9 eTduexy AILIL GONH 001 0 0 SUTTOOJOT 0 0 0 0 aqtaoosn 0 0 0 0 93TUTTO M 070 0 0 ej4rsadqr5 I SHSVHd NWOTIWSGITIDO N T uorantos ASN uorqaeznaes zeds x yoe a oa
155. e spe cies line 1 is used to determine the mass action equation and the contribution of the species to each mole balance equation Alternatively the contribution of the species to each mole balance equation can be defined using the DESCRIPTION OF DATA INPUT 45 EXCHANGE SPECIES mole balance identifier See SOLUTION SPECIES and SURFACE SPECIES for an example If the no check identifier is needed then the mole balance identifier is also needed Example problems The keyword EXCHANGE SPECIES is not used in the example problems See listing of default database file in Attachment B for examples Related keywords EXCHANGE EXCHANGE MASTER SPECIES SAVE exchange and USE exchange 46 User s Guide to PHREEQC GAS PHASE GAS PHASE This keyword is used to define the composition of a fixed total pressure multicomponent gas phase A GAS PHASE data block is needed if a gas bubble with a volume that is not infinite at a fixed pressure equili brates with an aqueous phase A GAS PHASE data block is not needed if fixed partial pressures of gas compo nents are desired which corresponds to an infinite volume gas phase 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 and exchange assemblages As a consequence of reactions the gas phase may exist or not depending on the fixed pressure for the gas phase and the sum
156. e title or other comment or description fields DESCRIPTION OF DATA INPUT 35 Reducing Chemical Equations to a Standard Form The numerical algorithm of PHREEQC requires that chemical equations be written in a particular form Every equation must be written in terms of a minimum set of chemical species essentially one species for each element or valence state of an element In the program PHREEQE these species were called master species and the reactions for all aqueous complexes had to be written using only these species PHREEQC also needs reactions in terms of master species however the program contains the logic to rewrite the input equations into this form Thus it is possible to enter an association reaction and log K for an aqueous species in terms of any aqueous spe cies in the database not just master species and PHREEQC will internally rewrite the equation to the proper inter nal form PHREEQC will also rewrite reactions for phases exchange complexes and surface complexes Reactions are still required to be dissolution reactions for phases and association reactions for aqueous exchange or surface complexes There is one restriction on the rewriting capabilities 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 necessary for PHREEQC to be able to determine the valence state of an element in a species from the chem
157. ect only for the duration of the run to save results to a permanent file see SELECTED OUTPUT During reaction calculations the compositions of the solution exchange assemblage gas phase pure phase assemblage and surface assemblage vary to attain equilibrium The compositions at the end of all reaction steps exist only in temporary storage locations that 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 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 sub sequent simulations within the run The USE keyword can be used in subsequent simulations to use the saved com positions in equilibrium calculations Example problems The keyword SAVE is used in example problems 3 4 7 and 10 Related keywords EXCHANGE EQUILIBRIUM PHASES GAS PHASE SOLUTION SURFACE and USE DESCRIPTION OF DATA INPUT 65 SELECTED OUTPUT SELECTED OUTPUT This keyword data block is used to produce a file that is suitable for processing by spreadsheets and other data managemen
158. efers to either OQ Or Qo By default the value of M is 1000 The optimization method will try to minimize the difference between and 1000 and 1000 The number 1000 should be large enough for most calculations but it is possible that the method will fail causing to be equal to 1000 instead of a true maximum in some evaporation problems where a mixing fraction of greater than 1000 is conceivable The value of M may be changed with a parameter in the range identifier For data input to PHREEQC identifiers in the INVERSE MODELING keyword data block are used for the selection of aqueous solutions solutions uncertainties uncertainties and balances reactants phases mole balance equations balances range calculations range and minimal models minimal aqueous solu tion compositions are defined with the SOLUTION keyword data block and reactants must be defined with PHASES or EXCHANGE SPECIES keyword data blocks See Description of Data Input ORGANIZATION OF THE COMPUTER CODE The computer code for PHREEQC is arbitrarily divided into 16 files roughly corresponding to processing tasks All global variables and global structures are defined in the header file global h This file is included in all of the source code files those ending in c except cl c The main program is in the file main c It is very short and contains the logic for the sequence of calculations which occur in the following order 1 At the beg
159. egun if convergence has not been attained Application to Aqueous Speciation Calculations A limited set of equations is included in aqueous speciation calculations Assuming pH and pe are known the Newton Raphson equations are derived from the functions f y gt fy g and f which are equations for mole 2 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 and the total masses of hydrogen and oxygen are calculated after the speciation calculation has been completed An additional mole balance equation for alkalinity f may be included to calculate Ina y and the total molality of the element associated with alkalinity carbon in the default database A charge balance equation fz may be included to calculate the Ina that produces charge balance in H the solution or a phase equilibrium equation f may be included to calculate Ina that produces a target satu H ration index for the phase In either of these last two cases the pH of the solution is calculated and will not equal the input pH A charge balance equation fz may be included to calculate the Ina _ that produces charge balance e in the solution not recommended or a phase equilibrium equation f may be included to calculate Ina _ that e produc
160. ems eed ere eroi De tia e CR raV aE P SEP PEE EE EEEE CERRAR ER obi ere b rei Es sus 56 Iria M 56 PHASES M M Ur EE 57 Example sa E 57 Expla atiohu an aatscipcossaceevddvoescesvbessgescansenavesteleoudesesacs E EE 57 hnc Me sagu 58 Example problems u cessnsvonsnssvcessds supaveaaneebacnesascuzs capessesvacheutesvbascsuusensessueastanseevaestsanbeassovapsoeneees 58 Related keywords uy a 58 PRINTS 59 Example Q u HQ M 59 EX pl am ati On is u 59 Example problems 60 Related keywords u 60 REACTION pe sess 61 Example Ta seh sks a its Sassyyaysui 61 Explan ation uuu 61 Example pM apaysus 61 ExplapatioB 2 u uu 61 hnc pec 62 Example problems i treten e Eee HERE
161. ems 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 con verge and the second is that a singular matrix may arise in problems involving multiple phases if the number of phases exceeds the number allowed by the Gibbs Phase Rule PHREEQC uses an optimization technique devel oped by Barrodale and Roberts 1980 to solve the same Newton Raphson equations while avoiding some of the problems caused by singular matrices The technique also allows inequality constraints to be added to the problem which are useful for constraining the total amounts of phases that can react The selection of initial estimates for the master unknowns is described for each type of modeling in the fol lowing 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 if necessary before the Newton Raphson itera tions to produce approximate mole balance The procedure is as follows After the initial estimates are made the distribution of species is calculated and for each element except hydrogen and oxygen element valence state exchanger and surface Then the ratio of the calculated number of moles to the input number of moles is calcu lated If the ratio for a master species m is greater than 1 5 or le
162. ent 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 does not con tain a valence state in parentheses the master species is a primary master species If the element name does contain a valence state in parentheses the master species is a secondary master spe cies The master species must be one of the species defined in the SOLUTION SPECIES data block alkalinity alkalinity contribution of the master species The alkalinity contribution of other aqueous 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 Either gram formula weight or formula is required but items are mutu ally exclusive For alkalinity it is the gram equivalent weight formula chemical formula used to calculate gram formula weight used to convert input data from mass units to mole units for the element or element valence Either gram formula weight or for mula is required but items are mutually exclusive For alkalinity it is the formula for the gram equivalent weight gram formula weight for element required for primary master species and must be the gram formula weight for the pure element not for an aqueous species Notes Line 1 must be repeated for each element a
163. ential term from mass action expressions for surface species eliminates any charge balance equations for surfaces and eliminates 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 two 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 dif fuse layer effects All solutions should be charge balanced for transport calculations 78 User s Guide to PHREEQC SURFACE Example 2 Line 0 SURFACE 1 Measured surface composition Line 1a Surf wOH 0 3 660 0 25 Line 1b Surf_sOH 0 003 Explanation 2 Line 0 SURFACE number description Same as example 1 Line 1 formula sites specific area mass formula formula of the surface binding site in its OH form Surf_sOH and Surf_wOH in this example It is important to include the OH in the formula or hydrogen 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 specific area of surface in m g mass mass of surface in g Notes 2 A
164. eo se HHHH EHHH a AEA a aE HB aa aa aa a aa a a a A SNOILVO LSESESEKESKKSESKSESSSESARASSASSSKSHKUSKSSEKSSSSKSKKSAKKAQ aur zexd 6 8 x boT H OM OJH HOM OJH qut jTeyd 6Z X bot penunuoo 3033HHd W014 panuep ej eseqereq VT 2033HHd 8 Yieuugoenv 143 Attachment B Description of Database Files and Listing
165. er several limitations need to be considered Aqueous Model PHREEQC uses ion association and Debye H ckel 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 H ckel 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 to 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 The other limitation of the aqueous model is lack of internal consistency in the data in the database Most of 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 log K s or whether the aqueous model defined by the current database file is 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 t
166. er charge 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 element should be a constituent in the phase saturation index the concentration of the element will be adjusted to achieve this saturation index for the given pure phase Default 0 0 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 implicitly 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 car bonate be sure the correct gram equivalent weight is used to convert to equivalents 50 04 see as and gfw above After a reaction has been simulated it is possible to save the resulting solution composition with the SAVE keyword If the new composition is not saved
167. er is produced When diffuse layer is not used default to account for the charge that develops on the surface an equal but opposite amount of 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 surfaces is phys ically incorrect Consider the following where a charge balanced surface is brought together with a charge bal anced 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 imbal ance Z is associated with the solution In reality the charged surface plus the diffuse layer surrounding it would be electrically neutral and both should be removed when the surface is removed from 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 aqueous counter ions are not critical to the investigation 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 pot
168. erals cation exchanger and the surfaces in the cell The evolution of water chemistry in the cell represents the evolution of the water chemistry at a point within the saturated zone of the aquifer Initial conditions Parkhurst Christenson and Breit 1993 provide data from which it is possible to estimate the number of 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 assuming a rock density of 2 7 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 corre sponds 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 mos
169. es a target saturation index for the phase In either of these last two cases the pe of the solution is calculated and will not equal the input pe A charge balance equation fz may be specified to replace a mole balance equa tion f in which case Ina is adjusted to produce charge balance for the solution A phase equilibrium equa m m tion is may be specified to replace a mole balance equation f in which case Ina is adjusted to produce a target saturation index for the phase If a mole balance equation is replaced by either the charge balance equation or a phase equilibrium equation then the total amount of the element or valence state in the speciated solution will be calculated and will not equal the input concentration 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 a d for the default database 3 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 equation is included in the problem formulation it is included as the only optimization equation for the solver All other equations are included as equality con straints No inequality constraints are included for speciation calculations The redox options for aqueous speciation calculations are determined b
170. es in parse c Subroutines in the file tidy c check and organize the data read in 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 and inverse modeling are performed by the subroutines in this file Also the selected output file is prepared for writing 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 unknowns is allocated All mass action expressions are rewritten according to the master species and redox infor mation for the calculation Several lists of pointers are prepared that allow the residuals of equations the New ton Raphson array and the change in moles of elements due to mineral mole transfers to be calculated very 32 User s Guide to PHREEQC 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 memor
171. for calcium is set to 0 05 5 percent in solution 1 and 0 025 2 5 percent in solution 2 In addition to the mole balance equations the following equations are included for every inverse model charge balance for each solution electron balance for the system and water balance for the system The unknowns in these equations include the mole transfers for each phase the mole transfers of redox reac tions and the uncertainty unknowns for each element in each solution excluding hydrogen and oxygen An uncertainty unknown is included for each solution for alkalinity Finally an uncertainty unknown is included for pH for each solution containing carbon 4 Results for the two inverse models found in this example are shown in table 20 The results begin with a listing of three columns for each solution that is part of the model All columns are values in mol kg water The first column contains the original analytical data for the solution The second column contains any adjustments to the analytical data calculated for the model These adjustments must be within the specified uncertainties The third column contains the revised analytical data for the solution which is equal to the original data plus any adjustment After the listing of the solutions the relative fractions of each solution in the inverse model are printed With only two solutions in the model normally the fraction for each solution will be 1 0 If more than two solutions are included
172. h is in equilibrium with a specified solution composition The New ton Raphson equations for the initial exchange calculation are derived from f f T f H O and f which are equa 2 NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING 25 tions for mole balance for each exchanger mole balance for each element or element valence state activity of water and ionic strength For initial exchange calculations the values of T include only the aqueous concentra tions and the mole balance equations f do not contain terms for the contribution of the exchangers 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 exchanger present Essentially only the values of the master unknowns of the exchange assemblage Ina are adjusted to achieve mole balance for the exchanger mole balance equations Once mole bal ance is achieved the composition of each the exchanger is known All equations for initial exchanger calculations are included as equality constraints in the solver No equa tions are optimized and no inequality constraints are included An initial exchange calculation is performed only if the exchanger is defined to be in equilibrium with a spec ified solution The distribution of species for this solution has already been calculated either by an initial solution calculation or by a reaction or transport calculation Thus the initial est
173. has been defined or saved the exchange assem blage composition may be used in subsequent simulations through the USE keyword Example problems The keyword EXCHANGE is used in example problems 9 and 10 Related keywords EXCHANGE MASTER SPECIES EXCHANGE SPECIES SAVE exchange and USE exchange DESCRIPTION OF DATA INPUT 43 EXCHANGE MASTER SPECIES EXCHANGE MASTER SPECIES This keyword is used to define the correspondence between the name of an exchanger and its master species Normally this data block is included in the database file and only additions and modifications are included in the input file Example Line 0 EXCHANGE MASTER SPECIES Line 1a 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 exchanger X and Xa in this example 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 Notes All half reactions for the exchanger X and Xa in this example must be written in terms of the master exchange species X and Xa in this example Each exchange master species must be defined by an identity reac tion with log K of 0 0 in EXCHANGE SPECIES input Any exchange reactions for exchange name must be defined with EXCHANG
174. he 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 however the saturation indices calculated for these phases will be spurious The formula for plagioclase has been altered slightly from that in the previous table to achieve an exactly charge balanced reaction All phases used in inverse modeling must have a charge balanced reaction 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 If a solution can not be adjusted to charge balance using the given uncer tainties the solution will be noted in the output and no models will be found Because all of the solutions are EXAMPLES 121 122 Table 19 Input data set for example 11 TITLE Example 11 Inverse modeling of Sierra springs SOLUTION 1 units mmol l pH 6 2 Si 0 273 Ca 0 078 Mg 0 029 Na 0 134 K 0 028 Alkalinity 0 328 S 6 0 010 C1 0 014 SOLUTION 2 units mmol l pH 6 8 Si 0 41 Ca 05 26 Mg Oz Na 0 259 K 0 04 Alkalinity 0 895 S 6 0 025 CI 0 03 INVERSE MODELING 1 solutions 1 2 uncertainty 0 025 ALl OH 4 3H4Si04 range phases Halite Gypsum Kaolinite precip Ca montmorillonite precip CO2 g Calcite Chalcedony precip Biotite dissolve Plagioclase dis
175. he surface by the following equation involving the hyperbolic sine 0 1174 a n 54 S U H sin ORT where v is the valence of a symmetric electrolyte u is the ionic strength F is the Faraday constant in kilojoules per volt equivalent kJ y eq which equals C mol P is the potential at the surface in volts R is the gas constant 8 314 J mol 9K and T is in Kelvin The following assumptions apply to equation 54 1 Although strictly valid only at 25 C the constant 0 1174 is used at all temperatures and 2 the valence of the electrolyte is assumed to be 1 See the following sections Surface Charge Potential Equation with Explicit Calculation of the Diffuse Layer Composition and Non Electrostatic Surface Complexation Modeling for alternate formulations of surface complexation modeling The charge potential function is defined as follows fy DRT A S l 1 0 1174 72 FW FW Fy dfy u sinn 5 Jay 0 1174cosh 2 dinay iu dn 56 S S t s For data input to PHREEQC calculation without an explicit diffuse layer is the default Specific surface area A and mass of surface S y are defined in the SURFACE keyword data block The charge on a surface species EQUATIONS FOR SPECIATION AND FORWARD MODELING 19 is defined in the balanced chemical reaction that defines the species in the SURFACE SPECIES keyword data block See Description of Data Input Surface Charge Balance Equation with Expli
176. he temperature range 25 to 75 Celsius of the system with the given amounts of gypsum and anhydrite at 25 C is the first reaction step which is displayed after the heading Beginning of reaction calculations Immediately following this heading the 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 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 reaction step the final phase assemblage contains no anhy drite which is undersaturated with respect to the solution saturation index equals 0 22 and 1 985 mol of gyp sum 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 67 mmol kg water of calcium and sulfate remain in solution which defines the solubility of gypsum in pure water However the total number of moles of each constituent in the aqueous phase is only 15 11 because the mas
177. hen equilibrium may be restricted to obtain only among the species of each element valence state The unknowns for each aqueous species are the activity a activity coefficient Yi molality m and number of moles in solution n of each aqueous spe cies i The following relationships apply to all aqueous species except aqueous electrons and water itself a ym and n m W where W is the mass of water in the aqueous phase i i i i i aq aq PHREEQC rewrites all chemical equations in terms of master species There is one master aqueous species associated with each element for example Cat 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 For PHRE EQC the identity of each aqueous master species is defined with SOLUTION_MASTER_SPECIES keyword data block See Description of Data Input The numerical method reduces the number of unknowns to be a min imum 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 activ ities of master species the natural log of the activity of water a o the ionic strength u and the mass of solvent 2 water in an aqueous solution Wq Equilibrium among aqueous species in an ion association model requires that all ma
178. here are also many Fortran imposed limits such as limits on the numbers of elements aqueous species phases solutions and lengths of character strings mineral names for instance that are inconvenient and time consuming to modify Program Capabilities PHREEQC retains the capabilities of PHREEQE and eliminates many of the deficiencies and limitations Mole balances for speciation calculations can be defined for any valence state or combination of valence states Distribution of redox elements among their valence states can be based on a specified pe or any redox couple for which data are available A new capability with 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 com positions can be specified more easily with a larger selection of concentration units and a simple method for con verting mass units to molal units In reaction path calculations PHREEQC is oriented more toward system equilibrium than just aqueous equilibrium Essentially all of the moles of each element in the system are distributed among the aqueous phase pure phases exchange sites and surface sites to attain system equilibrium Mole balances on hydrogen and oxygen allow the calculation of pe and the mass of water in the aqueous phase which obviates the need for the special redox convention used in PHREEQE and allows water producing or consuming reac
179. hermodynamic 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 Other formulations use other definitions of activity mole fraction for example or additional activity coefficients to convert equivalent fraction to activity Appelo 1994 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 diffuse double layer and a non electrostatic sur face complexation model Davis and Kent 1990 Other models including isotherms and triple and quadru ple layer models have not been included in PHREEQC Davis and Kent 1990 reviewed surface complexation modeling and note theoretical problems with the standard state for sorbed species 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 mod eling requires experimental data on material from the study site for appropriate model application The capability of PHREEQC to calculate the composition of the diffuse layer diffuse layer option is ad hoc and should be used only as a preliminary sensitivity analysis INT
180. ical equation that defines the species To do this the program requires that at most one aqueous species of an element valence state contain electrons in its chemical reaction This aqueous species is defined to be a secondary master species there must be a one to one correspondence between valence states for which total concentrations can be defined 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 and total ferrous iron a primary master species must be defined for Fe and secondary master species must be defined for Fe 3 and Fe 2 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 species for Fe 3 is Fe The correspondence between master species and elements and element valence states is defined by the SOLUTION MASTER SPECIES keyword data block The chemical equations for the master species and all other aqueous species are defined by the SOLUTION SPECIES keyword data block Conventions for Documentation The descriptions of
181. imates of all master unknowns related to the aqueous phase are set equal to the values from the previous distribution of species The initial estimate of the master unknown for each exchanger is set equal to the number of moles of exchange sites for that exchanger For data input to PHREEQC definition of the initial exchange calculation is made with the EXCHANGE keyword data block See Description of Data Input Application to Initial Surface Calculations A limited set of equations is included in initial surface calculations that is when the composition of a surface assemblage is defined to be that which is in equilibrium with a specified solution composition The Newton Raph son equations for the initial surface calculation are derived from f fy or f o fn fI no and fu which are equa s 2 tions for mole balance equations for each type of surface site in the surface assemblage charge potential 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 calculations the val ues of T include only the aqueous concentrations and the corresponding mole balance equations f do not con tain terms for the contribution of the surfaces 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
182. in line 1 are ignored Line 2 exchanger name amount exchanger name name of an exchanger that is defined to the program 42 User s Guide to PHREEQC EXCHANGE amount quantity of exchanger in moles Notes 2 The order of lines 1 and 2 is not important Line 1 should occur only once within the data block Line 2 may be repeated to define the amounts of other exchangers if more than one exchanger is present in the assemblage Example 2 requires the program to make a calculation to determine the composition of the exchange assemblage The calculation will be performed before the any reaction calculations to determine the concentrations of each exchange component such as CaX5 MgX or NaX from the default database provided calcium magnesium and sodium are present in the solution that would exist in equilibrium with the specified solution solution 1 in this example The composition of the solution will not change during this calculation When an exchange assemblage defined as in example 1 or example 2 is placed in contact with a solution during a reaction calculation both the exchange composition and the solution composition will adjust to reach a new equilibrium After a reaction has been simulated it is possible to save the resulting exchange assemblage com position with the SAVE keyword If the new composition is not saved the exchange assemblage composition will remain the same as it was before the reaction calculation After it
183. ind a solution to the algebraic equations After a pure phase assemblage has reacted with the solution it is possible to save the resulting assemblage composition that is the identity and number of moles of each phase with the SAVE keyword If the new compo sition is not saved the assemblage composition will remain the same as it was before the reaction calculation After it has been defined or saved the assemblage may be used in subsequent simulations by the USE keyword Example problems The keyword EQUILIBRIUM PHASES is used in example problems 2 3 5 6 7 8 and 10 Related keywords PHASES SAVE equilibrium phases and USE equilibrium phases DESCRIPTION OF DATA INPUT 41 EXCHANGE EXCHANGE This keyword is used to define the amount and composition of an assemblage of exchangers The initial com position of the exchange assemblage can be defined in two ways 1 explicitly by listing the composition of each exchanger or 2 implicitly by specifying that each exchanger is in equilibrium with a solution of fixed composi tion The exchange master species stoichiometries and log K s for the exchange reactions are defined with the keywords EXCHANGE MASTER SPECIES and EXCHANGE SPECIES Example 1 Line 0 EXCHANGE 1 Measured exchange composition Line la CaX2 0 3 Line 1b MgX2 02 Line Ic NaX 0 5 Explanation 1 Line 0 EXCHANGE number description EXCHANGE is the keyword for the data block number positive number
184. ine 2 is not entered the default is one step of 1 0 mol Example 2 Line 0 REACTION 5 Add sodium chloride and calcite to reaction solution Line 1a NaCl 2 0 Line 1b Calcite 0 001 Line 2 1 0 moles in 4 steps Explanation 2 Line 0 REACTION number description Same as example 1 Line 1 phase name or formula relative stoichiometry Same as example 1 Line 2 reaction amount units in steps DESCRIPTION OF DATA INPUT 61 REACTION reaction amount a single reaction amount is entered This amount of reaction will be added in steps steps units same as example 1 in steps in indicates that the reaction will be divided into steps number of steps and must be lower case Example 2 performs exactly the same calculations as example 1 1 0 mol of reaction is divided into 4 steps 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 line 2 is not entered the default is one step of 1 0 mol Notes If a 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 solution ensuing calculations will probably fail It is possible to evaporate a solution by removing H O or dilute
185. inerals present in the solid phases and determine automatically the thermodynamically stable phase assemblage to simulate advective transport in combination with PHREEQC s reaction modeling capability and to make inverse modeling calculations that allow for uncertainties in the analytical data The user interface is improved through the use of a simplified approach to redox reactions which includes explicit mole balance equations for hydrogen and oxygen the use of a revised input that is modular and completely free format and the use of mineral names and standard chemical symbolism rather than index numbers The use of C eliminates nearly all limitations on array sizes including numbers of elements aqueous species solutions phases and lengths of character strings A new equation solver that optimizes a set of equalities subject to both equality and inequality constraints is used to determine the thermodynamically stable set of phases in equilibrium with a solution A more complete Newton Raphson formulation master species switching and scaling of the algebraic equations reduce the number of failures of the numerical method in PHREEQC relative to PHREEQE This report presents the equations that are the basis for chemical equilibrium and inverse modeling calcula tions in PHREEQC describes the input for the program and presents twelve examples that demonstrate most of the program s capabilities INTRODUCTION PHREEQE Parkhurst and others 19
186. inflow to an aquifer initially containing a brine calcite and dolomite a cation exchanger and a surface complexer Contamine MEME 119 TABLES 1 Elements and element valence states included in default database phreeqc dat including PHREEQC notation and default formula for gram formula weight esee 38 2 Seawater Composito u EE 92 3 Jnput data set for example cese tetas a PR Dr Da e EEUE o EUIS CI rods 93 4 Output for example v 94 5 Inputidata set for example 2 e L SRI EE E e Ere It IST REA a CE REED uY 97 6 Selected output Tor example 2 iere titer iet eter rese Rete sete E ERU SEES Eee AER speevagive caiesigubiwesneioeoserece 99 7 Jnputdata set for example 5 eer tete erre Ua ro SEE p e eR ERU RUE 100 8 Selected results for example 3 tiep n ettet irte eser ei be Hee hee tus obi cipia iere eoe EEE EEEE 101 9 Inputdata set for example serere e RE EROR EM P EE a SS e eere eb 102 10 Selected results Tor example 4 scire dete tesi tror ete dep erbe tae ee HERES EGER EUREN IN SUR ERRER E 103 11 Input data set for example Sa usa aan a e e PR ee RO Ue aD aaa 104 12 Selected results fof example J cresie iir tet petet teres eosam Pe etes e EE he guo stie CHEER In ass ese caeci eese renis 104 13 Input data set for example 6 eio Re toe aee e E E E LES TERRE EE SERERE REGES 106 14 Selected results Tor example 6 uu u Sa u tie meni ees pec sep tor eu e PE REGE reete uie Casson gend eee getF esc
187. ing number corre sponding to the cell number Note that ranges of numbers can be used to define multiple solutions exchange assem blages surface assemblages or gas phases simultaneously and that SAVE allows a range of numbers to be used REACTION can also be used to define a stoichiometric reaction that applies to each cell at each time step with the reaction number corresponding to the cell number This capability is not very useful because it represents only zero order kinetics Better definition of kinetic reactions is obviously needed The MIX keyword can be used in 84 User s Guide to PHREEQC TRANSPORT transport modeling to define simplistic dispersion or lateral inflow to the column At each shift solution ncell 1 is moved to cell ncell any stoichiometric reaction or mixing for cell ncell is added and the solution is equilibrated with the contents of cell ncell solution ncell 2 is moved to cell ncell 1 reaction or mixing for cell ncell 1 is added and equilibrated with the contents of cell ncell 1 and so on until solution 0 is moved to cell 1 The moles of pure phases and the compositions of the exchange assemblage surface assemblage and gas phase in each cell are updated with each shift By default the composition of the solution pure phase assemblage exchange assemblage surface assem blage and gas phase are printed for each cell for each shift Use of print will limit the amount of data written to the output file In the exam
188. inning of the run the database file is read The database file usu ally defines the elements and mass action expressions for all of the aqueous species and phases Definition of spe cies for exchangers and surfaces 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 calculations are performed 5 Any initial surface calculations are performed 6 Any reaction calculations mixing irreversible reaction mineral equilibration and others are performed 7 Any inverse modeling calculations are performed And 8 any trans port calculations are performed The sequence from 2 through 6 is repeated until the end of the input file is encountered The subroutines that perform tasks 3 through 6 are found in the file mainsubs c The file read c is used to read both the database file and the input file It is arranged in subroutines that read each keyword data block 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 phys ically 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 subroutin
189. input are needed for inverse modeling DESCRIPTION OF DATA INPUT 37 Table 1 Elements and element valence states included in default database phreeqc 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 PHREEGQC notation Formula used for default gram formula weight Alkalinity Aluminum Barium Boron Bromide Cadmium Calcium Carbon Carbon IV Carbon IV methane Chloride Copper Copper 1I Copper T Fluoride Hydrogen 0 dissolved hydrogen Iron Iron II Iron III Lead Lithium Magnesium Manganese Manganese II Manganese III Nitrogen Nitrogen V nitrate Nitrogen IID nitrite Nitrogen 0 dissolved nitrogen Nitrogen III ammonia Oxygen 0 dissolved oxygen Phosphorous Potassium Silica Sodium Strontium Sulfur Sulfur VD sulfate Sulfur ID sulfide Zinc Alkalinity Al Ba B Br Cd Ca C C 4 C 4 Cl Cu Cu 2 Cu 1 H 0 Fe Fe 2 Fe 3 Pb Li Mg Mn Mn 2 Mn 3 NO N 3 N 0 N 3 O 0 Si Na Sr S 6 S 2 Zn Cap 5 CO3 o Al Ba B Br Cd Ca HCO HCO CH Cl Cu Cu Cu F H Fe Fe Fe Pb Li mA S O Z Z Z Z Z ez N SO SO Zn User s Guide to PHREEQC END Keywords The following sections describe the data input requirements for the program Each type of data are input through a s
190. inted in descending order by concentration The blocks of output that are written are selected with the keywords PRINT and SELECTED OUTPUT 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 or surface assemblage is to be 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 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 are included in the list of elements with positive concentrations If an element is in a pure phase 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 is zero and one of its constituent elements is not present that pure phase is ignored in the calculations The subroutines that perform inverse modeling are found in inverse c and the subroutines that perform advective transport modeling are found in transport c If explicit diffuse layer calculations are made the integra tion of the Poisson equation is performed by the subroutines in integrate c A few functions that are used through out the code are found in utilities c Fin
191. ion 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 spe cies will result in a charged surface Similarly if exchange species are not electrically neutral all exchange species in the default database are electrically neutral the exchanger will accumulate a charge These charge imbalances must be included in the charge balance equation to calculate the correct pH in reaction and transport simulations EQUATIONS FOR SPECIATION AND FORWARD MODELING 17 In general the charge imbalance for a solution is calculated at the end of the initial solution calculation and at the end of each reaction and transport simulation with the following equation Nag T 4 Y ga 47 i where z is the charge on the aqueous species and T 4 is the charge imbalance for aqueous phase q If charged surfaces or exchangers are not present the charge imbalance for a solution at the end of a simulation will be the same as at the beginning of the simulation The charge imbalance on a surface is calculated at the end of the initial surface calculation and at the end of each reaction and transport simulation with the following equation N T jun 48 i where T_ is the charge imbalance for the surface and z is the charge on the surface species i of surface s If the composition of the diffuse
192. ionally selected_output or se lected_output This identifier has no effect if no SELECTED_OUTPUT keyword data block is included in the file If a SELECTED_OUTPUT keyword data block is included the selected_output identifier is used to include or exclude results from the selected output file When set to false no results will be written to the selected output file Writing to the selected output file can be resumed if selected_output is set to true in a PRINT keyword data block in a subsequent simulation Note the hyphen in the identifier is necessary to avoid a conflict with the keyword SELECTED_OUTPUT This print control option is not affected by reset Line 12 status True or False status Controls printing of information to the screen Default is true Optionally status or st atus 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 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 will remain in effect until the 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
193. is in the gas phase EXAMPLES 109 10 TT io T T o 4 Lu tc 1 LLI E s E 5 55 77 YUY iii GS j S m e d 9 m z z uj L NEM J 5 m pon 4 gw 0 01 m oc oe H tt E J E pei CO 25 lt I p NEN N I fr 0 001 d lt E E a z p L L L 1 l L Ll 0 001 0 01 0 1 6 ORGANIC MATTER DECOMPOSITION IN MOLES Figure 3 Composition of the gas phase during decomposition of organic matter with a composition of CH2ONg o in pure water The gas phase appears between 2 and 3 millimoles of the organic decomposition reaction Partial pressure of ammonia gas is less than 10 atmospheres throughout not shown Example 8 Surface Complexation PHREEQC contains three surface complexation models 1 By default an electrostatic double 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 diffuse double layer model described in Dzombak and Morel 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 ex
194. is invoked two files are used to define the thermodynamic model and the types of calculations that will be done the input file and the database 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 until the end of the file The formats for the keyword data blocks are the same between the input file and the database file 36 User s Guide to PHREEQC 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 SOLUTION MASTER SPECIES SOLUTION SPECIES SURFACE MASTER SPECIES SURFACE SPECIES and PHASES These key word data blocks define master species and the stoichiometric and thermodynamic properties of all of the aqueous phase species exchange species surface species and pure phases Two database files are provided with the pro gram a database file derived from PHREEQE Parkhurst and others 1980 and a database file derived from WATEQAF Ball and Nordstrom 1991 These files are described in more detail in Attachment B and the PHREEQE derived database file is listed The elements and element valence states that are included in phreeqc dat are listed in table 1 along with the PHREEQC notation and the default formula used to convert mass
195. ivalents surface site s and b is the number of surface sites occupied by the surface complex The total derivative of f is s N df b dn 38 l S For data input to PHREEQC the number of moles of each type of surface site is defined with the SURFACE keyword data block Surface species are defined with the SURFACE SPECIES keyword data block See Description of Data Input Mole Balance Equation for an Exchanger Mole balance for an exchange site is a special case of the general mole balance equation The total number of moles of each exchange site is specified by input to the model The sum of the moles of all of the exchange species for a site must equal the total number of moles of the exchange site The following function is derived from the mole balance relation for an exchange site e N Je u Dy nd 39 i where the value of the function f is zero when mole balance is achieved T is the total number of exchange sites for exchanger e and b is the number of exchange sites occupied by the exchange species The total e derivative of f is N df F b dn 40 i For data input to PHREEQC the number of moles of exchange sites is defined in the EXCHANGE keyword data block Exchange species are defined with the EXCHANGE SPECIES data block See Description of Data Input Mole Balance Equation for Alkalinity The mole balance equation for alkalinity is used only in speciation calculation
196. known For reasonable values of pH alkalinity is a minor contributor to charge balance and no alkalinity is con tributed by the reactive phases Thus setting the uncertainties to 100 percent allows the alkalinity balance equation effectively to be ignored Only one model is found in the inverse calculation This model indicates that Black Sea water solution 1 must be concentrated 62 fold to produce solution 2 as shown by the fractions of the two solutions in the inverse model output table 22 Thus approximately 62 kg of water in Black Sea water is reduced to 1 kg of water in solution 2 Halite precipitates 13 7 mol and gypsum precipitates 35 mol during the evaporation process Note that these numbers of moles are relative to 62 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 6 mol of water 0 0056 mol of gypsum and 0 22 mol of halite have been removed per kilogram of water This calculation could be accom plished by making solution 1 from solution 2 taking care to reverse the constraints on minerals from precipitation to dissolution All other ions are conservative within the 2 5 percent uncertainty that was specified The inverse modeling shows that evaporation and halite and gypsum precipitation are sufficient to account for all of the changes in major ion composition between the two solutions 126 User s Guide to PHREEQC Table
197. l is sequentially removed and the remaining set of aqueous solutions and phases is tested to see if a feasible model can be found If a feasible model is not found when excluding a particular phase then it is retained in the model else it is discarded After each phase has been tested the phases that remain constitute a minimal model that is none of the phases can be removed and still obtain a feasible model 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 1 phases is tested for feasible models as follows If the set of aqueous solutions and phases is a subset of an infeasible model or a subset of a minimal model the model is skipped If only minimal models are to be found minimal in INVERSE MODELING keyword data block the model is also skipped if it is a superset of a minimal model Otherwise the inverse problem is formulated and solved using the set of aque ous solutions and the P 1 phases in the same way as described above maintaining the three lists during the process Once all sets of P 1 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 set of phases tested is either a subset of an infeasible model or a subset of a minimal model At this point the entire pr
198. layer is explicitly included in the calculation diffuse layer in SURFACE keyword data block then each solution should be charge balanced using one of the charge balance options and Ts will 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 at the end of the initial exchange calculation and at the end of each reaction and transport simulation with the following equation N The Pa nia 49 i where T 15 the charge imbalance for the exchanger and z is the charge on the exchange species i of exchanger e The charge imbalance for the system is defined at the beginning of each reaction or transport simulation with the following equation Q S E T i aT T au T a 50 q e where T is the charge imbalance for the system Q is the number of aqueous phases that are mixed in the reaction or transport step a is the mixing fraction for aqueous phase q The charge balance function is Nag s N E N f T LAL zan 2 usns 51 i s i e i Ss e where f is zero when charge balance has been achieved and the double summation for surfaces is present only if the diffuse layer comp
199. le problems See the listing of the default database file in Attachment B for examples Related keywords SURFACE SURFACE SPECIES SAVE surface and USE surface 80 User s Guide to PHREEQC SURFACE SPECIES SURFACE SPECIES This keyword is used to define a reaction and log K for each surface species including surface master spe cies 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 mas ter species are Hfo_w and Hfo s for the weak and strong binding sites Example 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 Ic Surf_wOH Surf_wOH Line 2c log_k 0 0 Line 1d Surf_wOH H Surf_wOH2 Line 2d log_k 4 3 Line le Surf_sOH UO2 2 Surf s202 UO2 2H Line 2e log_k 2 57 Line 3 no_check Line 4 mole_balance Surf_sO 2U02 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 equal sign The association reaction must precede all identifiers related to the surface spe cies Line la is the master species identity reaction Line 2 log_k log K log_k identifier for log K at 25 C Opti
200. les is the same as equation 17 except the final term is absent For data input to PHREEQC the chemical equation for the mole balance and mass action expression and the log K and its temperature dependence of surface species are defined through the SURFACE SPECIES key word data block Surface master species or types of surface sites are defined with the SURFACE MASTER SPECIES keyword data block The number of sites the composition of the surface the specific surface area and the mass of the surface are defined with the SURFACE keyword data block See Description of Data Input Equations for the Newton Raphson Method A series of functions denoted by f are defined in this section These functions describe heterogeneous equi librium and are derived primarily by substituting the equations for the number of moles of species derived from mass action equations in the previous section into mole and charge balance equations Each function is presented along with the total derivative with respect to the master unknowns Activity of Water The activity of water is calculated from an approximation given by Garrels and Christ 1965 p 65 66 which is based on Raoult s law ay o 1 0017 18 l n i aq EQUATIONS FOR SPECIATION AND FORWARD MODELING 11 The function fy Q is defined as follows 2 fuo Wag 41 07 1 0017Y nj 19 L and the total derivative of this function is n dfg o Way odln ano mo 1 JW din
201. librium calculation is completed and provides all the information for aqueous exchange and surface spe cies for printing results to the output file The subroutines in model c actually solve the equations that have been set up in prep c Initial estimates for 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 conver gence if convergence is found the calculation is complete Otherwise 2 the Newton Raphson matrix is formu lated 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 this process new mass action equations are written and the lists for calcu lating 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 Following a calculation the subroutines in print c write data to the output file and to the selected output file Concentration data for species are sorted so that species are pr
202. llows ya e ar 81 m where T 2 is the charge imbalance in aqueous solution q calculated by a speciation calculation The summation ranges over all elements and element valence states with non zero concentrations and also includes a separate term for alkalinity For alkalinity z Aik 18 defined to be 1 0 For master species of an element or valence state m z 18 defined to be the charge on the master species plus the alkalinity assigned to the master species Zm z AIk Adding the alkalinity to the charge avoids double accounting of the charge contribution of the master species For example the contribution of the carbonate master species to charge imbalance is zero with this definition of D all of the contribution to charge imbalance for carbonate is included in the alkalinity term of the summation This formulation of the inverse problem makes sense only if the values of the 5 s are small meaning that the revised aqueous solution compositions original plus 6 s do not deviate much from the original data A set of inequalities insure that the values of the s are small The absolute value of each is constrained to be smaller than a specified value ug EQUATIONS AND NUMERICAL METHOD FOR INVERSE MODELING 29 lo d Su g 82 In addition the mixing fractions for the initial aqueous solutions q lt Q are constrained to be nonnegative 2 a 20 83 and the final aqueous solution mixing fraction is constrained to be
203. lls 1 shifts 200 SELECTED OUTPUT file ex10 pun totals Ca Mg Na Cl C S As Ei ND 118 User s Guide to PHREEQC Recharge water The water entering the saturated zone of the aquifer was assumed to be in equilibrium with calcite and dolo mite at a vadose zone Pc of 10712 The second simulation in the input set generates this water composition and 2 stores it as solution O table 18 Transport calculations The TRANSPORT keyword table 18 provides the necessary information to advect the recharge water into the cell representing the saturated zone A total of 200 shifts is specified which is equivalent to 200 pore volumes because there is only a single cell in this calculation The results of the calculations are plotted on figure 6 During the initial 5 pore volumes the large concentra tions of sodium calcium and magnesium decrease such that sodium is the dominant cation and calcium and mag nesium concentrations are small The pH increases to more than 9 0 and arsenic concentrations increase to more than 5 umol kg water 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 domi nant cations and the pH stabilizes at the pH of the infilling recharge water 10 T I Qa 10 T 9 x l O zl
204. lthough this example only defines one surface with two binding sites Surf_s and Surf_w other surfaces with one or more binding sites could be defined by repeating line 1 The diffuse_layer or no_edl identifier can also be included in this example After a reaction has been simulated it is possible to save the resulting surface composition with the SAVE keyword If the new composition is not saved the surface composition will remain the same as it was before the reaction After it has been defined or saved the surface composition may be used in subsequent simulations through the USE keyword Example problems The keyword SURFACE is used in example problems 8 and 10 Related keywords SURFACE_MASTER_SPECIES SURFACE_SPECIES SAVE surface and USE surface DESCRIPTION OF DATA INPUT 79 SURFACE MASTER SPECIES SURFACE MASTER SPECIES This keyword 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 Dzombak and Morel 1990 Example 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
205. m U 0 0033 pH standard units pH 8 22 pe unitless pe 8 451 Temperature C temperature 25 0 Density kilograms per liter density 1 023 92 User s Guide to PHREEQC TROY O TvT VvE u e3rep LlZ 6 x bor Z H Y Z ZON OCH Z v n 9 0 TOF Seroeds AZeqysew aepuoooes g Teo OCT IC u eqaT1 p c v 9 x bor H 7 20N OZH Z 74 Q zog Serioeds do3seu adepuooesi Teo 08S LC u eqI p LVI I x bor H G S HO n OZH S P O Teo 09L vZ u eiiep 8 G8 8 x bor H t P HO n OZH v P O 0 0 x bor P O r a vPe 3ojg Serioeds doj3seu adepuoooesj n 30g Seroeds zeqsew Azeuradg SS104dS NOILNTOS 0620 8 Z 0 0 c con 9 0 0620 8 Z 0 0 zon s 0 0620 8 c 0 0 ven b n anal 0620 8 2 0620 8 2 0 0 ven n 95 ears SHIOddS USLSVW NOILATOS dd Uer e k X Bor L 0 5 zO 0 I 0 0 OZH Z P n H p ZON N S N To eve n 83TUTUPSZTI PHN se 0 0 N O SASYHd EON se 62 0 S N Te 8L 8 y ediep O cILC 9 S reS Iz x bor OOH Se Z289 IVvI A3TUITPXIV p OD ZON Z EODE Z ZON 0 ESt6T T TeO 8p u eirep 8 lt v TS LL6 91 x BOT ed 7z000 0 uW z z 02 zon Z OOZ Z ZON 00 0 94 TeO P9 0 u e3rep l 66 3 p90 OT X BOT 0 89L0I eN goozon c 0OD Z ZON 8 Tl6cI SW Teox LZ vv u eirep EZI ep Iv9 GI X BOT 2 0 0 0 xopea HGS G HO E ZON OZHS Z c
206. mple pH pe and temperature are equal to the input 96 User s Guide to PHREEQC values The ionic strength total carbon alkalinity was the input datum total inorganic carbon Total CO2 and electrical balance of the solution 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 nitrate ammonium and dissolved oxygen water Under the subheading Distribution of species the molalities activities and activity coefficients of all spe cies of each element and element valence state are listed The lists are alphabetical by element name and descend ing 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 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 instead of S 6 or S 2 had been entered then a concentra
207. n element concentration 8 605e 01 Model contains minimum 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 4 Number of calls to cll 8 EXAMPLES 127 REFERENCES CITED Appelo C A J 1994 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 and Postma D 1993 Geochemistry 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 calculating 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 E 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 Carpenter A B 1978 Origin and chemical evolution of brines in sedimentary basins Thirteenth Annual Forum on the Geol ogy of Industrial Minerals eds Johnson K S and Russell J A Oklahoma Geological
208. n iteration but will be optimized in the sense given above Thus at a given iteration an approximate math NUMERICAL METHOD FOR SPECIATION AND FORWARD MODELING 23 ematical solution to the set of Newton Raphson equations can be found even if no exact equality solution exists for example when direct application of the Newton Raphson approach would result in unsolvable singular matri ces After a solution to the equations with equality and inequality constraints is returned by the solver the results which are the size of the changes to the master unknowns are checked to make sure that the values of the variables do not change too fast as specified by default criteria in the program or specified by the KNOBS key word If the criteria are not met then the changes to the unknowns except the mole transfers of pure phases are decreased proportionately to satisfy all the criteria Pure phase mole transfers are not altered except to produce nonnegative values for the total moles of the pure phases If all of the changes to the unknowns are small as spec ified by convergence criteria within the program the problem is solved Otherwise after suitable changes to the 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 and a new iteration is b
209. n the gas phase N Total number of moles of gas in the gas phase gas N Number of phases in the phase assemblage N Number of surface species for surface s n Number of moles of gas component g in the gas phase n Number of moles of aqueous species i in the system n Number of moles of aqueous species i the diffuse layer of surface s n Number of moles of exchange species i in the system e n Number of moles of surface species i in the system s n Number of moles of phase p in the phase assemblage E Partial pressure of gas component g atm Poa Total pressure in the gas phase atm p Index number for phases in phase assemblage 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 R Gas constant kJ mol K o Surface charge density for surface s C m S Number of surfaces s Index number for surfaces S Mass of surface s g SI Saturation index for phase p ST pude Specified target saturation index for phase p T Temperature K TAIk Total number of equivalents of alkalinity in solution T Total number of equivalents of exchange sites for exchanger e Li 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 electrons mol Tm q Total number of moles of an eleme
210. n the mass action equation except for elements hydrogen and oxygen 16 User s Guide to PHREEQC To avoid solving for small differences between large numbers the quantity in parenthesis in the previous function is not explicitly included in the solution algorithm and the value of T is never actually calculated Instead N p the quantity Tp Tm Y bn ph is used in the function f Initially 7 is calculated from the total concen p tration of m in the aqueous phase the exchange assemblage the surface assemblage and the gas phase T T T T T 44 q m e m s m m a m gas During the iterative solution to the equations T is updated by the mole transfers of the pure phases k 1 k T TQ jdn 45 P m where k refers to the iteration number It is possible for T to be negative in intermediate iterations but must be positive when equilibrium is attained The total derivative of the function f is Naq Ny EN df bm n Om idn Pm i dn p i e i 46 S Na s N N E YY5 jan n Ys dn bn jan s s d g s i For data input to PHREEQC total moles of elements are defined initially through keyword data input and speciation initial exchange and initial surface calculations Moles of elements are initially defined for an aqueous phase T up with the SOLUTION keyword data block for an exchange assemblage T with the EXCHANGE keyword data block for a surface assemblage T
211. ncentration of sodium would be approximately 0 16 molal 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 divid ing by the sum of the mixing fractions Other intensive properties of the mixture are calculated in the same way as temperature 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 actually made in terms of moles or mass and the volumes of solu tions are not known Similarly the formulation for mixing can approximate processes with varying volume for example a titration Example problems The keyword MIX is used in example problems 3 and 4 Related keywords SOLUTION SAVE solution USE solution and USE mix 56 User s Guide to PHREEQC PHASES PHASES This keyword is used to define a name chemical reaction and log K for each mineral and pure gas that is used for saturation index calculations reaction path transport or inverse modeling calculations Normally this data block is included in the database file and only additions and modifications are included in the
212. nd each element valence state to be used by the program Each element must have a primary master species If secondary master species are defined for an element then the pri mary master species additionally must be defined as a secondary master species for one of the valence states PHREEQC will reduce all 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 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 72 User s Guide to PHREEQC SOLUTION MASTER SPECIES The gram formula weight and formula are defined for convenience in converting units For example if your 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 or gfw options in the SOLUTION keyword 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 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 value of the variables i
213. ndicates a gram formula weight gfw will be entered 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 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 approximately 50 04 g eq redox couple redox couple to use for element or element valence states in element list A redox couple is specified by two valence states of an element separated by a No spaces are allowed If the element list is a redox element or if more than one valence state is listed 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 A redox couple is not needed for non redox active ele ments charge indicates the concentration of this element will be adjusted to achieve charge balance The element must have ionic species If charge is specified for one element it may not be specified User s Guide to PHREEQC SOLUTION for pH or any other element Note that it is possible to have a great
214. nditions 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 used in each of the reaction simulations to adjust pH to fixed values Finally the line USE surface none eliminates an implicitly defined reaction calculation for the first sim ulation 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 surface none removes the surface from any reaction calculated for the simulation with the effect that no reaction calculation is performed because nothing is defined with which the solution may react The same logic applies to the EXCHANGE GAS_PHASE EQUILIBRIUM_PHASES REACTION REACTION_TEMPERATURE keywords that are defined within the input for a simulation A reaction step is implicitly defined whenever a solu tion or mixture is defined in the simulation and any one of these keyword data blocks 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 Each of the simulations uses the
215. ne 0 Example 1 SURFACE number description equilibrate number surface name sites specific area mass diffuse layer thickness no edl Example 2 SURFACE number description Line 1 formula sites specific area mass Line 2 diffuse layer thickness Line 3 no edl SURFACE MASTER SPECIES Line 0 Line 1 SURFACE MASTER SPECIES surface binding site name surface master species SURFACE SPECIES Line 0 Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 TITLE Line 0 Line 1 SURFACE SPECIES Association reaction log k log K delta h enthalpy units analytical expression A A gt A5 Ay As no check mole balance formula TITLE comment comment TRANSPORT USE Line 0 Line 1 Line 2 Line 3 Line 4 Line 0 TRANSPORT cells ncell shifts nshift print modulus selected output modulus USE keyword number or none SUMMARY OF DATA INPUT 91 EXAMPLES In this section of the report several 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 man ual Parkhurst and others 1980 The input files for all examples are included in tables which should serve as tem plates for modeling other geochemical processes Only selected output from each of the example runs is presented Example 1 Speciation Calculation This example calculates the dist
216. ng cal cium and is eluted until it is exhausted at about 1 5 pore volumes Because potassium exchanges more strongly than sodium larger log K in the exchange reaction potassium is released after sodium Finally when all of the potassium has been released the concentration of calcium has increased to a steady state value equal to the con centration in the infilling solution The differences between the two model simulations are due entirely to the inclusion of dispersion in the PHREEOM calculations The breakthrough curve for chloride in the PHREEQM calculations coincides with an analytical solution to the advection dispersion equation for a conservative solute Appelo and Postma 1993 p 433 Without dispersion PHREEQC models the advection of chloride as a square wave front of chloride concen tration The characteristic smearing effects of dispersion are absent in the fronts calculated for the other elements as well although some curvature exits due to the effects of the exchange reactions Example 10 Advective Transport Cation Exchange Surface Complexation and Mineral Equilibria This example uses the phase equilibrium cation exchange and surface complexation reaction capabilities of PHREEQC in combination with transport capabilities to model the evolution of water in the central Oklahoma aquifer The geochemistry of the aquifer has been described in Parkhurst Christenson and Breit 1993 Two pre 116 User s Guide to PHREEQC d
217. nput file is named input the output file will be named input out and the default database file will be used phreeqc input output The input file is named input the output file is named output and the default database file will be used phreeqc input output database All file names are specified explicitly Example 1 could be run with the command phreeqc ex1 The results of the simulation then will be found in the file EX OUT Installation and Setup of the Unix Version The Unix source code is identical to the DOS source code Additional scripts 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 1 Transfer the compressed tar files to your home computer with ftp or obtain the Unix version on diskette as described above Be sure to use type binary for transferring the tar file 2 Uncompress the compressed tar file and extract the files with tar The files will automatically extract into subdirectories named bin data doc src and test Here x x represents a version number uncompress phreeqc x x tar Z tar xvof phreeqc x x tar 3 Change directory into src and 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 consis INTRODUCTION 5 tent with the C compiler on your system if necessary The
218. nput for the program and presentation of a series of examples 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 spe cies ion exchange species surface complexation species gas phase components and pure phases are presented A set of functions denoted f are defined that must be solved simultaneously to determine equilibrium for a given set of conditions Most of these functions are derived from mole balance equations for each element exchange site and surface site and from mass action equations for each pure phase Each function is reduced to contain a minimum number of variables usually one for each element exchange site surface site and pure phase The pro gram 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 the set of master vari ables For clarity the set of variables used in partial differentiation are referred to as master variables or master unknowns The total derivatives of each function f will be presented without derivation After all of the functions are presented the following section presents the solution algorithm for each type of speciation and forward model that can be sol
219. ns and charge potential relations PHREEQC allows multiple surface complexers 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 including an electrostatic potential term and 2 excluding any potential term 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 reac tions so the master species is a physically real species and appears in mole balance equations and surface species may be anionic cationic or neutral If the Dzombak and Morel 1990 model which includes an electrostatic effects is used additional equations and mass action terms are included because of surface charge and surface electrostatic potential The basic theory for surface complexation reactions including electrostatic potentials is presented in Dzom bak and Morel 1990 The theory assumes that the number of active sites T equivalents eq the specific area A meters squared per gram m g and the mass S g of the surface are known The activity of a surface species is assumed to be equal to its molality moles of surface species per kilogram of water even though surface specie
220. ns solution number 1 is pure water After the reaction calculations for the simulation are com pleted the composition of the water that is in equilibrium with calcite and CO replaces pure water 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 CO is calculated not specified The MIX key 2 word is used to define the solutions and mixing fractions 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 whatever fractions are specified The fractions need not sum to 1 0 If the fractions were 7 0 and 3 0 instead of 0 7 and 0 3 the mass of water in the mixture would be approximately 10 kg instead of approximately 1 kg but the concentrations in the mixture would be the same as in this example However during subsequent reactions it would take approximately 10 times more mole transfer to equilibrate with the phases that is to produce the same concentrations as in this example 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 equilibrate By defining the phase assemblage with EQUILIBRIUM PHASES 1 the phase assemblage replaces the previous assemblage number 1 that was defined in p
221. nt element valences or alkalinity m in solution q mol or for alkalinity eq T Total number of equivalents of surface sites for surface s User s Guide to PHREEQC MM M Charge imbalance for the system during reaction and transport calculations eq Charge imbalance for the exchanger e eq Charge imbalance for the aqueous phase q eq Charge imbalance for the surface s eq thickness of diffuse layer for surface s m Uncertainty assigned to element m in solution q mol Mass of water in the aqueous phase excluding any water in diffuse layer of surfaces kg Total mass of water in the system includes aqueous phase and water in the diffuse layer of surfaces kg Mass of water in the diffuse layer of surface s kg Charge imbalance in solution q in inverse modeling eq Charge on aqueous species i Charge on exchange species i Normally equal to zero Charge on surface species i Charge on aqueous master species minus alkalinity assigned to the master species Attachment A Listing of Notation 133 Attachment B Description of Database Files and Listing Two database files are distributed with the program Each of these database files contains SOLUTION MASTER SPECIES SOLUTION SPECIES PHASES EXCHANGE MASTER SPECIES EXCHANGE SPECIES SURFACE MASTER SPECIES and SUR FACE SPECIES keyword data blocks The file named phreeqc dat contains the thermodynamic data for aqueous species and gas and mineral phases that are esse
222. nt valence states must have been defined by SOLUTION MASTER SPECIES EXCHANGE MASTER SPECIES or SURFACE MASTER SPECIES input After each calculation of a solution composition the concentration mol kg water of each of the selected elements element valence states exchange sites and surface sites will be written into the flat file containing the selected output If a species is not defined or is not present in the calculation its concentration will be printed as 0 Line 3 molalities species list molalities identifier allows definition of a list of aqueous exchange or surface species for which concentrations will be written to the selected output file Optionally molalities or m olali ties species list list of aqueous exchange or surface species for which concentrations will be written to the selected output file Species must have been defined by SOLUTION SPECIES EXCHANGE SPECIES or SURFACE SPECIES input After each calculation of a solution composition the concentration mol kg water of each species in the list will be written into the flat file containing the selected output If a species is not defined or is not present in the calcu lation its concentration will be printed as 0 Line 4 activities species list activities identifier allows definition of a list of aqueous exchange or surface species for which log of activity will be written to the selected output file Optionally activities or a ctivities s
223. ntially 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 WATEQAF Ball and Nordstrom 1991 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 potas sium 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 The file named wateq4f dat contains thermodynamic data for the aqueous species and gas and mineral phases that are essentially the same as WATEQAF Ball and Nordstrom 1991 In addition to data for the elements in the database file phreeqc dat the database file wateq4f dat contains data for the elements arsenic cesium iodine nickel rubidium selenium silver and uranium The WATEQ4F derived database file also includes com plexation constants for two generalized organic ligands fulvate and humate Some additional gases are included som
224. nties One mode of operation finds minimal inverse models that is sets of minerals such that no min eral can be eliminated and still find mole transfers with the remaining minerals that satisfy all of the constraints another mode of operation finds all sets of minerals that can satisfy the constraints even if they are not minimal Optionally for each inverse model minimum and maximum mole transfers that are consistent with the uncertain ties are computed individually for each mineral in the inverse model 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 2 User s Guide to PHREEQC and pure phases which eliminates all use of indices At present no interactive version of the program is available However the free format structure of the data the use of order independent keyword data blocks and the rela tively simple syntax make it easy to generate 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 or surface complexers that can be defined to the program Program Limitations PHREEQC is a general geochemical program and is applicable to many hydrogeochemical environments Howev
225. nties follow on succeeding lines Optionally balances bal ance bal or b alances Line 6 element or valence state name list of uncertainties element or valence state name name of an element or element valence state to be included as a mole balance constraint in inverse modeling Mole balance equations for all elements that are found in the phases of phases input are automatically included in inverse modeling mole bal ance equations for all valence states of redox elements are included Elements element valences states or pH may be listed in balances input to override the default uncertainties or the uncer tainties defined with uncertainty The identifier balances may also be used to include mole balance equations for elements not contained in any of the phases phases list of uncertainties list of uncertainties for the specified element or element valence state constraint It is possible to input an uncertainty for element for each solution used in inverse modeling as defined by solutions If fewer uncertainties are entered than the number of solutions the final uncertainty in the list is used for the remaining solutions Thus if only one uncertainty is entered it is used for the given element or element valence state for all solutions The uncer tainty for pH must be given in standard units Thus the uncertainty in pH given on line 6a is 0 1 pH units for all solutions The uncertainties for elements and element valence s
226. o degree Celsius C by using the following equation C 5 0 F 32 viii User s Guide to PHREEQC a Computer Program for Speciation Reaction Path Advective Transport and Inverse Geochemical Calculations By David L Parkhurst Abstract PHREEQC is a computer program written in the C programming language that is designed to perform a wide variety of aqueous geochemical calculations PHREEQC is based on an ion association aqueous model and has capabilities for 1 speciation and saturation index calculations 2 reaction path and advective transport calcula tions involving specified irreversible reactions mixing of solutions mineral and gas equilibria surface complex ation reactions and ion exchange reactions and 3 inverse modeling which finds sets of mineral and gas mole transfers that account for composition differences between waters within specified compositional uncertainties PHREEQC is derived from the Fortran program PHREEQE but it has been completely rewritten in C with the addition many new capabilities New features include the capabilities to use redox couples to distribute redox elements among their valence states in speciation calculations to model ion exchange and surface complexation reactions to model reactions with a fixed pressure multicomponent gas phase that is a gas bubble to calculate the mass of water in the aqueous phase during reaction and transport calculations to keep track of the moles of m
227. ocess 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 eliminated by the subset and superset comparisons which are very fast 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 with the first invocation of the optimization procedure During all of the test ing 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 uncertainties For the range calculation EQUATIONS AND NUMERICAL METHOD FOR INVERSE MODELING 31 range in INVERSE MODELING keyword 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 calcula tions the s are not minimized instead the single objective function for maximization is simply u dz M 93 and in the minimization case a M 94 where o r
228. of maximum and the calculated mole transfer of the phase or the solution frac tion The minimum 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 evaporative concentration In these problems the default value is not large enough and a larger value of maximum should be entered Line 8 minimal minimal identifier that specifies that models be reduced to the minimum number of phases that can satisfy all of the constraints within the specified uncertainties Optionally minimal minimum m inimal or m inimum Note that two minimal models may have different numbers of phases minimal models imply that every one of the phases included is necessary to satisfy the constraints The minimal identifier minimizes the number of calculations that will be per formed and produces the models that contain the most essential geochemical reactions How ever 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 adequacy and geochemical consistency and then rerun without the minimal identifier Line 9 tolerance fol tolerance identifier that indicates a
229. 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 the following types of aqueous species are defined a a primary master species SO4 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 ss DESCRIPTION OF DATA INPUT 75 SOLUTION SPECIES By default equation checking for charge and elemental balance is in force for each equation that is pro cessed Checking can only be disabled by using no check for each equation that is to be excluded from the check ing process Example problems The keyword SOLUTION SPECIES is used in example problem 1 See also the listing of the default data base file in Attachment B Related keywords SOLUTION MASTER SPECIES and SOLUTION 76 User s Guide to PHREEQC SURFACE SURFACE This keyword is used to define 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 fo
230. of the partial pressures of the dis solved gases in solution The thermodynamic properties of the gas components are defined with PHASES input Example Line 0 GAS PHASE 1 5 Air Line 1 pressure 1 0 Line 2 volume 1 0 Line 3 temperature 25 0 Line 4a CH4 g 0 0 Line 4b CO2 g 0 000316 Line 4c O2 g 0 2 Line 4d N2 g 0 78 Explanation Line 0 GAS PHASE number description GAS PHASE is the keyword for the data block number positive number to designate this gas phase and its composition Default is 1 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 description is an optional character field that describes the gas phase Line 1 pressure pressure pressure identifier defining the fixed pressure of the gas phase that obtains during all reactions Optionally pressure or p ressure pressure the pressure of the gas phase in atmospheres Default is 1 0 atm Line 2 volume volume volume identifier defining the initial volume of the gas phase Optionally volume or v olume volume the initial volume of the gas phase in liters Default is 1 0 liter The volume and temperature are used to compute the initial number of moles present in the gas phase Line 3 temperature temp temperature identifier defining the initial temperature of the gas phase Optionally temperature or t emperature
231. ogram water Line 6 density value density indicates density will be entered on this line Optionally dens or d ensity value density of the solution kg L or g cm The density is used only if the input concentration units are per liter Default 1 0 Line 7 element list concentration units as formula or gfw gfw redox couple charge or phase name saturation index element list an element name or a list of element valences separated by white space see line 7d concentration concentration of element in solution or sum of concentrations of element valence states in solution units concentration unit for element see line 7g If units are not specified the default units units line 5 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 alkalinity the formula should give the gram equiva lent weight For alkalinity reported as calcium carbonate the formula for the gram equivalent weight is Cag s CO3 o s this is the default in database files distributed with this program gfw gfw i
232. ominant water types occur in the aquifer a calcium magnesium bicarbonate 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 pre sumably 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 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 and ini tially the cation exchanger and surfaces are in equilibrium with the brine The aquifer is assumed to be recharged with rain water 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 min
233. onally log_k logk I og_k or I ogk log K Log K at 25 C for the reaction Default 0 0 Log K for a master species is 0 0 Line 3 no_check no_check indicates the equation defining the aqueous species should not be checked for charge and elemental balance Optionally no check or n o check By default all equations are checked The only exceptions might be for bidentate surface sites However the identifier mole balance is needed to ensure that the proper number of atoms of each element and moles of surface sites are included in mole balance equations Line 4 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 stoichiome try and mass action expression for the species are determined from the chemical equation that defines the species Rarely it may be necessary to define the stoichiometry of the species sepa rately from the mass action equation Sorption of uranium on iron oxides as described by Waite and others 1994 provides an example They use different coefficients in the mass action equa tion than the mole balance equations The chemical equation defining the species Line 1e is used to obtain the mass action expression By default the formula for the species is derived from the sum of all the species in
234. one 0 SZ due3 Te X p0 9 u eirep 20 T Aqtsuep 929 6 x bor ISP s ed HZ Z Z HO Z ZON OZHZ Z ZONZ cc 8 Hd T OX GIO II u eqrI p udd sarun c8L G x BOT 6L61 TW LS NWOHISQHON NWONJ UALVMVHS T NOILNTOS H HOZON OZH Z ZON AI9jEMEOS Ueto ds pue unruezgn ppyv I eduex TLITI lduiex JO Jas ejep JO 1ndu qe L 93 EXAMPLES 89 0 660 S 9Iv v 90 8656 L S0 99 TLE O 60S v 6 v S0 9560 S0 9S8 Pe O 00 v tes GO SET0 S S0 89T 890 0 v86 IS0 v v 0 98 E0 1 S0 9Ss8 890 0 TIL E 6LL vP0 9Gv6 I 0 859 LEI 98L 699 E O0 SE9 T v0 906 ILl 0 066 z 028 2 0 9 20 T 0 8ST 000 0 600 0 600 0 10 9908 6 TO 9TS Zg 0 027 8 860 8 60 9920 9 60 9L8 9I2 0 88L G ZLS S 90 9629 1 90 98L euureo Aqtatqow A3TITPTION AqTATIOV AQTTEL bot bot bot Maaa s ro ds jo uorqnqra3asr EEL 0 68 Z L9LZ 0 0SL9 v 6 zO u3r unprzqr Thb3 p0 99 L 6L61 sqT0A ud d TO SLP0E9G S O ZO PTOTT TI H i su v0 99 6 L b 000 S2 2 0 e081 Z2 6 0 e081 2 5 00 8000 T 5 TO 90S 9 UA I860 ze IGb g8 ed ozz 8s Hd uorqanTos JO uorjdriaose 80 9LEV l 80 9L S0 ez8t L G0 9c8 z0 e926 2 Z0 897 v0 99v TO 8 S8 h IO 9vG 90 9L9 8 90 9Lv 90 9vZL l 90 9vZz 60 9ELL 60 9EL ZO 8L06 S Z0 9LO Z0 88S0 T J z0 98G 80 91IL 80 9II TO S9 S I0 9LG
235. one of the runs described by Appelo and Postma 1993 The solution filling each of the 40 cells of the column is defined with the SOLU TION 1 40 keyword data block The infilling solution for the column must be defined as SOLUTION 0 and it is 114 User s Guide to PHREEQC a calcium chloride solution The amount and composition of the exchanger in each of the 40 cells is defined by the EXCHANGE 1 40 keyword 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 that is the composition of solution 1 is not changed during the initial exchange calculation Table 17 Input data set for example 9 TITLE Example 9 Transport and ion exchange SOLUTION 0 CaCl2 units mmol kgw pH TO charge pe 8 temp 25 0 Ca 0 6 Cl 1 2 SOLUTION 1 40 Initial solution for column units mmol kgw pH 7 9 charge pe 8 temp 25 0 Na 1 K 0 N 5 T EXCHANGE 1 40 equilibrate 1 X 0 0011 USE exchange none TRANSPORT cells 40 shifts 120 0 a2 2 PRINT reset false SELECTED OUTPUT file ex9 pun totals Na Cl K Ca END The number of cells to be used in the transport simulation and the number of times to shift the contents of each cell to the next cell are defined with the TRANSPORT keywo
236. or Teo ZS6 ST u e3T9Pp 00H9e4 OOH Z 4 OPP TT x bor H HODW OZH Z4b5W 08 p x bor OO9d4 E O2 Z 4 Ie2x OZI b y e3I9p penunuoo 3033HHd W014 peauep ej aseqeleg VT 2O33HHd 8 juewYyoeny 137 Attachment B Description of Database Files and Listing 062 I X bor H bp P HO TV OZH b E TW H HOIS OZH Z 3S L6S L 8 LvVZ8I 0 0 vLE 9z2C oTqATeue 00L Z x bor Teox 68 6 u e3lep posed Z vOS Z eg 6 9T x HOT H HO TW OZH IV 0 0 0 0 0 0 699 I0 0 8 60 TeorjAqeue Ie2xX 9G6 G u ei ep I I LZ 9 16 6 0 0 00888 oTqATeue 286 0 X bor Teo 06 97 d eileP OOH H OOH Z eg tot x bot H Z Z HO TW OZH Z E IV TZL800 0 ETT ofg teue leox SGg u eilep LTE PT LZ 9S9 0 0 S2 8 oT3ATeue Th X bor TEX 6 l1I Y e3T P cooeg Z OO Z eg 00 S X bot H HOTW OZH 41V OLb ET X bor H HOPd OZH eq TeOX 008 SZ uU 3I9P 0IS Sz boT Teox 092 91 d e3T p 4UW Z UW 081 0 x bor OZH V Z 93IS 4 9 H VOTSTH 098 0 bor JUN d Z UW 0 6996111 99v81 801 6b VOCIT 0S92L0 0 v810 v6Zz oTqATeue TeoyY 96 0 uq eIqTEP Teoy 9 LT V ej ep 009 0 bo EZ X bor Z ON UN EON Z Z uHW H Z Z FPOTSZH POTSDH Teoy OLEE u e3 ep 0 6996TIT 0sz z bo 99781 801 69 699GT 869050 0 PELE ZOE oTqATeue POSUM Z vOS Z UNW Teo Zl 9 u eirep 8 6 x bor S6
237. osition is not explicitly calculated The total derivative of J is 18 User s Guide to PHREEQC Nag s N E N df Yan z dn 15 z an 52 i s i e i and again the double summation for surfaces is present only if the diffuse layer composition is not explicitly calculated For data input to PHREEQC charge imbalance is defined by data input for SOLUTION EXCHANGE and SURFACE keyword data blocks combined with speciation initial exchange and initial surface 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 keyword data blocks See Description of Data Input Surface Charge Potential Equation without Explicit Calculation of the Diffuse Layer Composition By default PHREEQC uses the approach described by Dzombak and Morel 1990 to relate the charge accu mulated on the surface 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 as follows N F uius O ui CR I where o is the charge density for surface s in coulombs per square meter C n F is the Faraday constant in coulomb per mole 96 485 C mol A is the specific area of the surface material m g and S is the mass of surface material g At 25 C the surface charge density is related to the electrical potential at t
238. ournal of Research U S Geological Survey v 2 p 233 274 Waite T D Davis J A Payne T E Waychunas G A and Xu N 1994 Uranium VI adsorption to ferrihydrite Applica tion of a surface complexation model Geochimica et Cosmochimica Acta v 59 p 5465 5478 Wolery T J 1979 Calculation of Chemical Equilibrium Between Aqueous Solution and Minerals The EQ3 6 Software Package Livermore CA Lawrence Livermore National Laboratory Report UCRL 52658 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 Society Symposium Series 416 p 104 116 REFERENCES CITED 129 Attachment A Listing of Notation Sb ros oc S 3 gt SS oO IS C m g 130 Temperature dependent constant in the activity coefficient equation Specific surface area of surface s m g Alkalinity contribution of master species m eq mol Temperature dependent constant for diffuse layer surface model 0 02931 L mol 2 C m at 25 C Mole transfer of phase p into positive or out of negative solution mol Mixing fraction for aqueous phase q Aqueous transfer of an element between valence states mol Activity of the master species for alkalinity Activity of the master species
239. pecies list list of aqueous exchange or surface species for which log of activity will be written to the selected output file Species must have been defined by SOLUTION SPECIES 66 User s Guide to PHREEQC SELECTED OUTPUT EXCHANGE SPECIES orSURFACE SPECIES input After each calculation of a solution composition the log base 10 of the activity of each of the species will be written into the flat file containing the selected output If a species is not defined or is not present in the calculation its log activity will be printed as 999 099 Line 5 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 mole transfer for the calculation will be written to the selected output file Optionally equilibrium phases eq uilibrium phases pure phases p ure phases pure or p ure phase list list of phases for which data will be written to the selected output file Each phase must have been defined by PHASES input After each calculation of a solution composition two val ues are written to the selected output file 1 the amount in moles of each of the phases in the current pure phase assemblage defined by EQUILIBRIUM PHASES and 2 the mole transfer in moles of the phase in the current reaction or transport calculation If the phase is not defined or is not present in the pure phase assemblage the amounts will be prin
240. pecific keyword data block The keywords are listed in alphabetical order 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 and the results printed Addi tional simulations may follow in the input data set each in turn will be terminated with an END keyword Example problems The keyword END is used in all example problems 1 through 12 DESCRIPTION OF DATA INPUT 39 EQUILIBRIUM PHASES EQUILIBRIUM PHASES This keyword is used to define the amounts of an assemblage of pure phases that can react reversibly with the aqueous phase Conceptually 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 com pletely Pure phases include fixed composition minerals 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 pres sure 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 40 Example Line 0 EQUILIBRIUM PHASES 1 Define amounts of phases in phase assemblage Line la Chalcedony 0 0 0 0 Line 1b CO2 g 3 5 1 0
241. pendence of solubility of gypsum and anhydrite SOLUTION 1 Pure water pH 7 0 temp 2540 EQUILIBRIUM PHASES 1 Gypsum Anhydrite EACTION TEMPERATURE 1 25 0 75 0 in 51 steps SELECTED OUTPUT file ex2 pun si anhydrite gypsum FB gt oo 0 0 0 0 J END 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 attain equilibrium if possible or until both phases are completely dissolved Finally SELECTED OUTPUT is used to write the saturation indices for gyp sum and anhydrite to the file ex2 pun after each calculation This file was then used to generate figure 1 The results of the initial solution calculation and the first reaction step are shown in table 6 The distribution of species for pure water is shown under the heading Beginning of initial solution calculations The equilibration EXAMPLES 97 0 1 0 E 5 ES _ Anhydrite ES z Gypsum T 6 lt 2 01 A lt S i T o s 0 2 0 3 l l l l l l l l l 25 30 35 40 45 50 55 60 65 70 75 TEMPERATURE IN DEGREES CELSIUS Figure 1 Saturation indices of gypsum and anhydrite in solutions that have equilibrated with the more stable of the two phases over t
242. ple results are written to the output file after each integer pore volume has passed through the column Data written to the output file can be further limited with the keyword PRINT see reset false If SELECTED OUTPUT has been defined recommended then each cell and each shift will produce an additional line in the selected output file Use of selected output will limit the frequency that data are written to the selected output file The setting for print does not affect the selected output file The capabilities provided with the TRANSPORT keyword are not intended to be a complete formulation of chemical reaction in flowing conditions It is however sufficient to make initial investigations and by compar ison to other programs it is computationally fast For many systems with limited data the kinds of calculations available with TRANSPORT are adequate and appropriate Example problems The keyword TRANSPORT is used in example problems 9 and 10 Related keywords EXCHANGE GAS PHASE MIX PRINT EQUILIBRIUM PHASES REACTION REACTION TEMPERATURE SAVE SELECTED OUTPUT SOLUTION and SURFACE DESCRIPTION OF DATA INPUT 85 USE USE This keyword data block is used to specify which solution surface assemblage exchange assemblage and pure phase assemblage are to be used in the reaction calculation of a simulation USE can also specify previously defined reaction parameters REACTION keyword reaction temperature parameters REACTI
243. plicitly calculates the com position 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 diffuse double 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 07 m and high zinc concentration a04 m in 0 1 m sodium nitrate electrolyte Surface complexation reactions derived from the summary of Dzombak and Morel 1990 are contained in the default database files for PHREEQC However many of the intrinsic stability constants used in this example differ from the values in the default database files and definitions are thus included in the input file table 16 Three keyword data blocks are requi
244. quations see mole balance 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 stoichiome try and mass action expression for the species are determined from the chemical equation that defines the species Rarely it may be necessary to define the stoichiometry of the species sepa rately from the mass action equation The polysulfide species provide an example These spe cies are traditionally assumed to be in equilibrium 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 gt species contains two atoms of sulfur but the chemical equation 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 other chemical formulas used in PHREEQC the valence state of 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 bal ance equation in any initial solution calculations Notes Line 1 must be entered first in the definition of a species Additional sets of lines lines 1 8 as needed may be added to define all
245. r 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 399 1 Si 4 28 Cl 19353 0 Alkalinity 141 682 as HCO3 S 6 2712 0 END TITLE Example 3 part C Mix 70 ground water 30 seawater IX 1 1 0 7 2 0 3 SAVE solution 3 END TITLE Example 3 part D Equilibrate mixture with calcite and dolomite EQUILIBRIUM PHASES 1 Calcite Dolomite USE solution 3 END TITLE Example 3 part E Equilibrate mixture with calcite only EQUILIBRIUM PHASES 2 Calcite O0 USE solution 3 END 0 0 0 0 100 User s Guide to PHREEQC The input for part A table 7 consists of the definition of pure water with SOLUTION input and the defi nition 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 reaction is implicitly defined to be the equili bration of the first solution defined in this simulation with the first pure phase assemblage defined in the simulation Explicit definition of reaction entities is done with the USE keyword The SAVE keyword instructs the program to save the solution following the final and only in this example reaction step as solution number 1 Thus when the simulation begi
246. r If the reservoir is essentially infinite as in the atmosphere and unsaturated zone then fixing the partial pressure of a gas is appropriate If the reservoir is finite as in gas bubbles in estuarine and lake sediments then fixing the total pressure of the gas phase is appropriate Here the GAS PHASE keyword is used to model the decomposition of organic matter in pure water with the assumption that only carbon and nitrogen are released by the decomposition reaction With no other electron acceptors available in pure water the pertinent microbiological decomposition reaction is methanogene sis The carbon and nitrogen released by organic decomposition are assumed to react to redox and gas solution equilibrium Aqueous carbon species are defined 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 gases considered are carbon dioxide CO2 methane CH4 nitrogen N and ammonia NH The initial water for this example is defined to be a ground water in equilibrium with calcite at a partial pres sure of carbon dioxide of 107 Pure water is defined with the SOLUTION keyword by using defaults for all val ues 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 15 The organic decomposition reaction with a carbon
247. ram is case insensitive The important exception to this rule regards chemical formulas The following con ventions are used for data input to 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 syn onym 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 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 hyphen is usually used except for identifiers of the SOLU TION keyword and the identifiers log k and delta h The hyphens are not used in these cases to avoid confusion about negative quantities The hyphen in the identifier never implies the negative of a quantity is entered For 34 User s Guide to PHREEQC example the identifier log_k does not mean the negative of the log K it is simply an alternate form for the iden tifier log k Chemical
248. rd data block In this example 40 cells are used 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 but this is not required Solu tions could be defined differently for each cell and could be defined by reactions in the current or preceding simu lations 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 then it is used in the calculations for that cell In this example an identical exchanger is defined for each cell The USE data block table 17 is necessary to eliminate an implicitly defined reaction after the initial solu tion and initial exchange composition have been calculated Such a reaction step would not be an error but the results would indicate no net reaction because the exchanger is already in equilibrium with last solution defined The PRINT keyword is used to eliminate all printing to the output file The SELECTED OUTPUT data block specifies that the total dissolved concentrations of sodium chloride potassium and calcium will be written to the file ex9 pun The selection of the master species for exchanger X occurs in the default database file in the EXCHANGE MASTER
249. red to define surface complexation data for a simulation 110 User s Guide to PHREEQC SURFACE MASTER SPECIES SURFACE SPECIES and SURFACE The SURFACE MASTER SPECIES data block in the default database files selects surface species to be the master species for the binding sites of Hfo hydrous ferric oxides The name of a binding site is composed of a name for the surface Hfo in the default database files 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 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 The chemical reactions and thermodynamic constants for all surface species including the surface master species are defined with the SURFACE SPECIES data block The mass action equations taken from Dzombak and Morel 1990 p 259 are given in the input data set table 16 under keyword SURFACE SPECIES Note the activity coefficient or potential term is not included as part of the mass action expression the potential term is added internally
250. res of all gas components as calculated from aqueous species Saturation index equation for phase p Mole balance equation for surface s Charge balance equation for aqueous solution Charge balance equation for surface s used in explicit diffuse layer calculation Equation for ionic strength in an aqueous solution Charge potential equation for surface s used when diffuse layer composition is not explicitly calculated Ratio of concentration of aqueous species i in surface excess for surface s to concentration in the bulk solution Total number of aqueous species Total number of exchange species for exchanger e Identifies the i aqueous species Identifies the i exchange species for exchanger e Identifies the i surface species for surface s Equilibrium constant for gas component g Equilibrium constant for aqueous species i Equilibrium constant for phase p Intrinsic equilibrium constant for association reaction for surface species i Attachment A Listing of Notation 131 H Ionic strength M Total number of aqueous master species m Index number for master species m Index number for aqueous master species excluding H i e H 0 and the alkalinity master species mi Molality of the aqueous species i mol kg H O m s Surface excess of aqueous species i mol kg HO V valence of a symmetric electrolyte Naq Number of aqueous species N Number of exchange species for exchanger e N Number of gas components i
251. reset in the data block will be reset when reset is encountered Thus reset should be the first identifier in the data block The identifiers species and saturation indices control the longest output data blocks and are the most likely to be excluded from long computer runs If transport calculations are being 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 printing to the output file every i time step by using the print identifier in the TRANSPORT data block Example problems The keyword PRINT is used in example problems 4 and 9 Related keywords SELECTED OUTPUT and TRANSPORT print 60 User s Guide to PHREEQC REACTION REACTION This keyword data block is used to define irreversible reactions that transfer specified amounts of elements to or from the aqueous solution during reaction calculations Example 1 Line 0 REACTION 5 Add sodium chloride and calcite to solution Line la NaCl 2 0 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 this reaction Default is 1 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 in
252. ribution 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 phreeqc dat The larger of the two database files included with the program distribu tion wateq4f dat is derived from WATEQAF Ball and Nordstrom 1991 and includes uranium A comment about the calculations performed in this simulation is included with the TITLE keyword The essential data needed for a speciation calculation are the temperature pH and concentrations of elements and or element valence states table 2 The input data set corresponding to the analytical data are shown in table 3 under the keyword SOLUTION Note that 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 default units are specified to be ppm in this data set This default can be overridden for any concentration as demonstrated by the uranium concentration which is specified to be ppb instead of ppm Table 2 Seawater composition PHREEQC Concentration Analysis notation ppm Calcium Ca 412 3 Magnesium Mg 1291 8 Sodium Na 10768 0 Potassium K 399 1 Iron Fe 0 002 Manganese Mn 0 0002 Silica as SiO Si 4 28 Chloride Cl 19353 0 Alkalinity as HCO Alkalinity 141 682 Sulfate as SO47 S 6 2712 0 Nitrate as NO4 N 5 0 290 Ammonium as NH4 N 3 0 03 Uraniu
253. rm 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 1 Line 0a SURFACE 1 Surface in equilibrium with solution 10 Line 1a equilibrate with solution 10 Line 2a Surfa w 1 0 1000 0 33 Line 2b Surfa s 0 01 Line 2c Surfb 0 5 1000 0 33 Line 3 diffuse layer 2e 8 Line Ob SURFACE 2 Ignore electrostatic double layer Line 1b equilibrate with solution 10 Line 2b Surfc 0 5 1000 0 33 Line 4 no edl Explanation 1 Line 0 SURFACE number description SURFACE is the keyword for the data block number positive number to designate this surface assemblage and its composition Default is 1 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 description optional character field that describes the surface assemblage Line 1 equilibrate number equilibrate indicates that the surface assemblage is defined to be in equilibrium with a given solu tion composition Optionally equil equilibrate or e quilibrate number solution number with which the surface assemblage is to be in equilibrium Any alphabetic characters following the identifier and preceding an integer with solution in line la are ignored Line 2 surface name sites specific area mass surface
254. s are conceptually in the solid phase The two additional master unknowns are 1 the quantity FY S ogr FY Ina In e ORT where F is the Faraday constant P is the potential at surface s R is the gas con Ss stant and T is temperature in Kelvin and 2 the natural log of the activity of the master surface species The iden tity of the master surface species is defined with SURFACE_MASTER_SPECIES keyword data block See Description of Data Input 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 equations are written to be consistent with this master unknown If HfoOH is used to represent a neutral surface complexation site Hfo Hydrous ferric oxide is used in the default database files the association reaction for the formation of a negatively charged site itis an association reaction in the sense that the defined species is on the right hand side of the equation can be written as follows HfoOH HfoO H 13 and the mass action expression including the electrostatic potential term is FW i 4 uoo HY CRT t me HD OH l 14 HfoO V HfoOH FY int T M RT where K _ is the intrinsic equilibrium constant for the reaction e is a factor that accounts for the work HfoO involved in moving a charged species H a
255. s not present in the gas phase the amount will be printed as 0 Before the data for the individual gases the flat file will contain the total number of moles and the volume of the gas phase Partial pressures of any gas including the gases in the gas phase can be obtained by use of the saturation indices identifier Notes The selected output file contains a column for each data item defined through the identifiers of SELECTED OUTPUT In the input for this keyword all element names species names and phase names must be spelled exactly including the charge for the species names One line containing an entry for each of the items will be written after each calculation of a solution composition that is after any initial solution initial exchange initial surface reaction step or transport step calculation The selected output identifier in the PRINT keyword data block can be used to selectively suspend and resume writing results to the selected output file In transport simulations the frequency by which results are written to the selected output file can be controlled by the selected output identifier TRANSPORT keyword Several integers are included at the beginning of each line in the selected output file to identify the type of calculation that has been performed These integers have the following meanings and are written in the following order 1 simulation number 2 state 1 initial solution calculation 2 initial exchange calcul
256. s 67 Example problems Rm 68 Ora e eae 68 SOLUTIONS I 69 Example a T eC aysa 69 EX pl am ata On iiss u uu M M TMT 69 hl as 71 Example problems e eer enin ib t e canes PE POR REED HERE IEEE FERRE EO ER e eai ere EO EEEE EEEE 71 Related Keywords c P 71 SOLUTION MASTER SPECIES jos iiiter tr trece t eet Per HERE E ETE aee EREEREER EEEE er eet eub dep 72 Incun c 72 Explanatio esserne aineena a EE eoa a A a En E AEE D EAEE E aE EA OEE EEREN E EEE ES Tai 72 N tf esu css nin 72 Example problems E EREET 73 Related Ta T 73 SOLUTION SPECIES ettari rr ehe Re eb bee E DRE PE CHEER EXE DH E 74 Examples aus s m M S unus 74 BxXpla atl li y u u u nauunawaan kiwata aasawa a ata avas 74 hcc m 75 Example problems oreet tst eH T te reb rr PEEL ORE ERE EE UC cb Dore th PR ESEE 76 Related Key Words so ies casei cues Shi M 76 SURFACE etn trot Char e ERR ds RERE OR E EEE EREET EERE UE T TA E EAEE
257. s and in inverse modeling Mole balance for alkalinity is a special case of the general mole balance equation but special definitions of coef ficients are needed Alkalinity is defined as an element in PHREEQC and a master species is associated with this element sce SOLUTION MASTER SPECIES keyword In the default databases for PHREEQC the master species for alkalinity is C Ol The master unknown for alkalinity is Ina or for the default databases Ina _ co 3 Alk The total number of equivalents of alkalinity is specified by input to the model The sum of the alkalinity contribution of each aqueous species must equal the total number of equivalents of alkalinity The following func tion is derived from the alkalinity balance equation N aq faik Tak y bu i i 41 l EQUATIONS FOR SPECIATION AND FORWARD MODELING 15 where the value of the function faz is zero when mole balance is achieved T4 is the number of equivalents of alkalinity in solution and 5 is alkalinity contribution of the aqueous species eq mol The total derivative of Salk 18 N aq dfi ban d 82 i The value of T may be positive or negative Conceptually a measured alkalinity differs from the alkalin ity calculated by PHREEQC In the default database files for PHREEQC the values of 5 have been chosen such that the reference state b 0 for each element or element valence state is the predominant species at Alk i a p
258. s by including a larger set of equations in the mole balance formulation and accounts 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 and 4 water which allows for evaporation and dilution and accounts for water gained or lost from minerals In addition because alkalinity is explicitly included in the formulation it is possible to include 5 a charge balance equation for each aqueous solution The unknowns for this set of equations are 1 the mixing fraction of each aqueous solution Qs 2 the aque ous mole transfers between valence states of each redox element o for each redox element the number of redox reactions is the number of valence states minus one 3 the mole transfers of minerals and gases into or out of the aqueous solution G and 4 a set of unknowns that account for uncertainties in the analytical data g Unlike previous approaches to inverse modeling uncertainties are assumed to be present in the analytical data as evi denced by the charge imbalances found in all water analyses Thus the unknowns j represent errors in the number of moles of each element element valence state or alkalinity m in each aqueous solution q The mole balance equations including the unknown 6 s for elements and valence states are defined as
259. s of water is only 0 9645 kg Description of solution In precipitating gypsum CaSO4 2H5O water has been removed from solution Thus the mass of solvent water is not constant in reaction calculations as it was in PHREEQE 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 reaction steps are plotted in figure 1 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 the stable phase 98 User s Guide to PHREEQC S 9L GE 9 8 69 Lv ingrng ZO ZI t8 69 v Eb 8E 5 zo SZH v9 lv 08 S0I 91 v9 5 SZH cH 00 0 S zZ GSE ZZ 6 ZH OZHZ vOS O 8S8 v 8S v 00 0 unsdA5 POSED 9 p 8S v c 0 e3rap uuv IM 60T dVI OT IS eseud LNMM S D puf uorjeganjeg 080 0 69 L 682 L 80 99L2 v 80 esrpl G vOSH v0070 T8Z Z S8Z Z 0 ecve G 0 9161 G poseo SI 0 S6z z 086 I 0 8SL0 S ZO SLPO T vOS Z0 L9S T 9 S TE 0 9v6 0L 9 0L 00 98000 0 00 8000 0 S t0070 8ST S9 Z91 G9 00 8000 0 00 000 0 SZH S80 0 060 S9 S00 S9 00 8000 0 00 8000 0 SH 00 8000 0 z S v00 0 88 IvP 6 Iv 00 8000
260. s unimportant 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 or SOLUTION keyword data block Example problems The keyword SOLUTION MASTER SPECIES is used in example problem 1 See also the listing of the default database file in Attachment B Related keywords SOLUTION and SOLUTION SPECIES DESCRIPTION OF DATA INPUT 73 SOLUTION SPECIES SOLUTION SPECIES This keyword is used to define chemical reaction log K and activity coefficient parameters for each aque ous species Normally this data block is included in the database file and only additions and modifications are included in the input file Example Line 0 SOLUTION SPECIES Line 1a SOA4 2 SO4 2 Line 2a log k 0 0 Line 5a gamma 5 0 0 04 Line 1b SO4 2 9H 8e HS AH20 Line 2b log k 33 652 Line 3b delta h 40 14 Line 5b gamma 3 5 0 0 Line Ic H20 OH H Line 2c log_k 14 000 Line 3c delta_h 13 362 kcal Line 4c analytical expression 283 971 0 05069842 13323 0 102 24447 1119669 0 Line 5c gamma 3 5000 0 0000 Line 1d HS 82 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
261. se eseud znd bursn ze em zna I korintose ursi I deas uor3oeeu 000 0 080 2v 000 0 USE SZ 000 0 000 0 000 0 000 4 000 0 000 L eure AYTATIOV bot Hoty ZO ZT 8 OOP ZI 6 6 Zo ZH 00 0 00 Z2 Q0 22 5 zH IM OT dVI OT IS seuda _ Seorpur uorqaeznges ccc ccce coco 080 Zv 00 8000 0 00 8000 0 ZO 00 8000 0 0 0 OST GZ O9Zz 96L0 L 9Zz 96L0 L ZH SZ 991v I 0 H 000 0 00 8000 T I0 9ISGS G OZH 000 1 L0 9000 1 L0 8000 T H 666 9 LO T00 T LO 8T00 T HO A3T eT1OW A3TAT3OV A3TIPTON s ro ds bot seroeds jo uor4nqriaj4sTQq TO ZZ90SS S O TeIOL ZO SPZTOTI LT H Teqor z suorqe32 qx1Ir OI 9z80 I b eoue eq T e92r4d399TH 000 GZ O bep eanqeaeduer 00 9000 0 bx row zoo TeIqOL 00 8000 0 bx row uogzeo eqol O0l 9e280 1 64 be AaTrurTexXIe TeIOL 00 9000 T bx Tejem go sseW LO0 9100 1 dU3buezas oruor 00071 2e7em Jo AAtAT IOV 000 ed 000 L Hd _ UGT3nTOS jo uorjdraosaeg ccc ccc cc Ze eM ng S TON A31l19IOW Squeue s _ uorjrsoduoo uorT3nrTog zeyem eund aqtapAyue pue wnsdAb jo KarrrqnTos jo eouepuedep ezana3eageduel z etdwexg TIIII ana unsdA6 ea3rap uue TS und zx eTts INdLNO Q3123T13S sd 3s Ig ut O SL 0 SZ I XunlvuudWal NOILOWaY e3T3pAuuv unsd s I SusVHd W IHdITID S3 0 Ssc due 0 L Hd zeyem ean
262. solve balance Ca 0 05 0 025 PHASES Halite NaCl Na Cl log_k 0 0 Biotite KMg3A1Si13010 0H 2 6H 4H20 K 3Mg 2 log_k 0 0 Plagioclase Na0 62Ca0 37A11 38812 62508 5 5 H 2 5H20 0 62Na 0 37Ca 2 1 38A1 3 2 625H4Si04 log_k 0 0 END User s Guide to PHREEQC uni jo pug Z uoraer nurs 4103 ejep ndup burpeeuy uorqernurs jo pus Z9 IT9 O3 STTeO jO zequnN oz peaes seseud go sjes e qrseegur Jo requnn Z punog sTepow eururu jo z qumN z punog sTepow jo zequnwN seseyd jo z qumu umururu surequoo 9poW burrepou eszeaut jo Az euums z0 9000 G uorqeaqu ouoo queue e ur I0II uor3oe3j umurxew 0049 LG8 G s enprsea jo ums seseud jo z qumu umnururu surequoo T pomW szojysuerzy e ou xopeu Z0 2000 S uorqezqu ouoo qu u T UT I0II 9UOI3293j UnUIXeWN 806729 ZES8E TTWLE 08229 OPN OO SELG S rsTenptsez jo ung v0 9St6 I vY0 928S I v0 98SL I eseqoorbe d p HO OTOETSTVEDIDI S0 90LE I S0 9LIE I S0 90L I 913r3o0rd STeysuezy eriou xopeu 0292 v0 9927t I v0 9820 T v0 98Sc T 93Io9T92 ZOO VO PEDS TE v0 99vt c v0 9606 2 5 zoo 80S829 Z1S8 ITVL 09229 OPN Z HO OTOL9 ETSEE ZTWS9T 029 PO 8SE6 T vO 8Z8S T PO S8SL T aseTootbeta S0 9 tIZ2 S v0 9LOI I S0 99GSI 8 UO IZOU1UON 9 K HO OTO TSTWELWA G0 90LE I S0 LTE T S0 90L 1 ei3r3org amp HO GOZTSCIV S0 90vI l S0 98T1S9 G S0 991E
263. solver cll calculation time is generally proportional to the number of calls to c11 The results of the example show that inverse models exist using the phases suggested by Garrels and Mack enzie 1967 The main reaction is dissolution of biotite calcite and plagioclase which consumes carbon dioxide kaolinite and montmorillonite or kaolinite and chalcedony precipitate 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 car bon dioxide This discrepancy is due to the fact that Garrels and Mackenzie 1967 did not account for the dissolved carbon dioxide in the spring waters Garrels and Mackenzie 1967 also ignored a small discrepancy in the mole balance for potassium PHREEQC accounts for this discrepancy in the adjustments to the concentrations of the elements PHREEQC shows that by altering the concentrations within the specified uncertainty 2 5 percent an inverse model can be found Without making the calculations with PHREEQC including uncertainties it is not obvious whether the discrepancy in potassium 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 21 Input data set for example 12 TITLE Example 12 Inverse modeling of Black Sea water evaporation SOLUTION 1 Black Sea water units mg L density 1 014 pH 8
264. species Example problems The keyword SURFACE SPECIES is used in example problems 8 and 10 See the listing of the default database file in Attachment B for additional examples Related keywords SURFACE SURFACE MASTER SPECIES SAVE surface SOLUTION SPECIES and USE sur face 82 User s Guide to PHREEQC TITLE TITLE This keyword data block is used to include a comment for a simulation in the output file The comment will appear in the echo of the input data and it will appear at the beginning of the simulation calculations Example Line 0 TITLE The title may begin on this line Line la or on this line Line 1b It continues until a keyword is encountered at the beginning of a line Line Ic or until the end of the file 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 keyword data block The TITLE keyword data block is intended to be used to identify each simulation in the output file If more than one title keyword is entered for a simulation each will appear in the output file as
265. ss action equations for aqueous species are satisfied For example the association reaction for the aqueous species CaSO is Cat S 0 CaS d The log K for this reaction at 25 C is 2 3 which results in the following mass action equation a 0 23 CaSO 1O 1 a a _ Ca so In general mass action equations can be written as follows C A K a E 2 m where c is the stoichiometric coefficient of master species m in species i The values of c may be positive or negative For PHREEQC 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 K is an equilibrium constant that is dependent on temperature and m ranges over all master species The same formalism applies to master species a m where the mass action equation is simply 1 2 m For aqueous species the equation derived from the mass action expression for the total number of moles of species i is Cm i m n mW KW 3 EQUATIONS FOR SPECIATION AND FORWARD MODELING 7 The Newton Raphson method uses the total derivative of the number of moles with respect to the master unknowns The total derivative is d dn s din Wag Fcm idin ap cin Qr dn 4 m Activity coefficients of aqueous species are defined with the following equations logy Aq soni 5 which is referred to as the Davies equation or logy
266. ss than 105 then the following equation is used to revise the value of the master unknown yb GR m i i k 1 j Indy Ind wln 70 m where w is 1 0 if the ratio is greater than 1 5 and 0 3 if the ratio is less than 10 and k is the iteration number 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 The optimization technique of Barrodale and Roberts 1980 is a modification of the simplex linear program ming algorithm that performs an L1 optimization minimize sum of absolute values on a set of linear equations subject to equality and inequality constraints The general problem can be posed with the following matrix equa tions AX B CX D 71 EX lt F The first matrix equation is minimized in the sense that Y b Ys P is a minimum where i is the index of i j rows and j is the index for columns 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 eq 69 in the optimiza tion equations first matrix equation above rather than include all of the Newton Raphson equations as equalities second matrix equation above Equations that are included in the A matrix may not be solved for exact equality at a give
267. st defines pure water with SOLUTION input and the thermodynamics of the phases with PHASES input Some of the minerals are defined in the database file phreeqc dat but inclusion in the input data set replaces any previous definitions for the duration of the run the database file is not altered In simulation Al SELECTED OUTPUT is used to produce a file of all the data that appear in table 14 and that were used to construct figure 2 SELECTED OUTPUT specifies that the activities of potassium ion hydrogen ion and silicic acid the saturation indices for gibbsite kaolinite muscovite and microcline and the total amounts in the phase assemblage and mole transfer for gibbsite kaolinite muscovite and microcline will be written to the file ex6 pun after each calculation The definitions for SELECTED OUTPUT remain in effect for all simulations in the run until a new SELECTED OUTPUT data block is read or until writing to the file is suspended with the identifier selected output in the PRINT keyword data block Simulation A1 allows microcline to react until equilibrium with gibbsite is reached This is set up in EQUILIBRIUM PHASES input by specifying equilibrium for gibbsite saturation index equals 0 0 and an alter native reaction to reach equilibrium KAISi3O8 the formula for microcline A large amount microcline 10 0 mol is present to assure equilibrium with gibbsite Kaolinite muscovite and microcline are allowed to precipitate if they becom
268. ster species c is the stoichiometric coefficient Tue of master species m in the association half reaction for exchange species i The values of c may be positive e or negative For PHREEQC 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 K is a half reaction selectivity e constant For an exchange species the equation for the total number of moles of species i is C os m i e n n K a 11 e e i e The natural log of the activity of the master species of the exchanger is an additional master unknown in the numerical method The total derivative of the number of moles of species i with respect to the master unknowns 1S dn hi oom pn 4 12 m EQUATIONS FOR SPECIATION AND FORWARD MODELING 9 For data input to PHREEQC the chemical equation for the mole balance and mass action expression and the log K and its temperature dependence for each exchange species are defined through the EXCHANGE SPECIES keyword data block Exchange master species are defined with the EXCHANGE MASTER SPECIES keyword data block Number of exchange sites and exchanger composition are defined with the EXCHANGE keyword data block See Description of Data Input Mass Action Equations for Surface Species Surface complexation processes are included in the model through additional heterogeneous mass action equatio
269. t uration index If alternative formula or alternative phase is entered phase name does not react the stoichiometry of alternative formula or the alternative phase is added or removed from the aqueous phase to attain the target saturation index Alternative formula must be a legitimate chemical formula composed of elements defined to the program Line 1c indicates that the sto ichiometry given by alternative formula KAISi3Og potassium feldspar will be added or removed from the aqueous phase until gibbsite equilibrium is attained alternative phase the chemical formula defined for alternative phase is added or removed to attain the target saturation index By default the mineral defined by phase name dissolves or precipi tates to attain the target saturation index If alternative phase or alternative formula is entered phase name does not react the stoichiometry of the alternative phase or alternative formula 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 simulations Line 1d indicates that the phase gypsum will be added to or removed from the aqueous phase until calcite equilibrium is attained amount moles of the phase in the phase assemblage or moles of the alternative reaction Default is 10 0 moles This number of moles is the maximum amount of the mineral or gas that can dis solve It may
270. t of master species m in the dissolution reaction for gas component g User s Guide to PHREEQC Cmp m q I total DART int Stoichiometric coefficient of master species m in the association reaction for aqueous 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 Estimate of the error in the number of moles of an element or element valence state m in solution q calculated in inverse modeling mol Number of exchangers Index number for exchangers dielectric constant for water 78 5 unitless dielectric permittivity of a vacuum 8 854x10 2 C V mr Faraday constant 96 485 Coulomb mol Alkalinity balance equation Mole balance equation for exchanger e Equation relating aqueous and gas phase partial pressures for gas component g Mole balance equation for hydrogen Equation for activity of water in an aqueous solution Mole balance equation for element or element valence state exchanger or surface m Mole balance equation for element or element valence state m excluding alkalinity hydrogen and oxygen Mole balance equation for oxygen Equation that sums the partial pressu
271. t of the iron is in goethite and hematite which have far fewer surface sites than hydrous ferric oxides The fraction of iron in hydrous ferric oxides was arbitrarily assumed to be 0 1 Thus a total of 0 34 mol of iron was assumed to be in hydrous ferric oxides and using a value of 0 2 for the number of sites per mole of iron a total of 0 7 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 oxides was 30 g L The specific surface area was assumed to be 600 m g The brine that initially fills the aquifer was taken from Parkhurst Christenson and Breit 1993 and is given as solution 1 in the input data set for this example table 18 The pure phase assemblage containing calcite and dolomite is defined with the EQUILIBRIUM PHASES 1 keyword The number of cation exchange sites is defined with EXCHANGE 1 keyword and the number of surface sites are defined with SURFACE 1 keyword Both the initial exchange and the initial surface composition are determined by equilibrium with the brine The concentration of arsenic in the brine was determined by trial and error to give a total of approximately 2 mmol arsenic on the surface complexer which is consistent with the sequential extraction data The default data base wateq4f dat was used for all thermodynamic data with the exception of two surface reactions After initial runs it was determined that much better results were obt
272. t software It is possible to print selected entities from solution exchange assemblage sur face assemblage pure phase assemblage and gas phase compositions after the completion of each equilibrium calculation Line 0 Line 1 Line 2 Line 2a Line 3 Line 4 Line 5 Line 6 Line 7 Example SELECTED OUTPUT file flat fil totals Hfo s 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 HCO3 CO3 2 equilibrium_phases Calcite Dolomite Sphalerite saturation_indices CO2 g Siderite gases CO2 g N2 g O2 g Explanation Line 0 SELECTED OUTPUT SELECTED OUTPUT is the keyword for the data block Optionally SELECT OUTPUT No additional data are read on this line Line 1 file file name file identifier allows definition of the name of the file where the selected results of simulations are written Optionally file or f ile File names must conform to operating system conventions file name file name for storing selected results If the file exists the contents will be overwritten Default is selected out Line 2 totals element list totals identifier allows definition of a list of elements for which total concentrations 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 Elements or eleme
273. tainties or u ncertainty The uncertainties defined with uncertainty do not apply to pH default for pH is 0 05 pH units and may be changed with the balances identifier In this example the default uncertainty is set to 0 02 which indicates that an uncertainty of 2 percent will be applied to each element and valence state in each aqueous solution If uncertainty is not entered the program uses 0 05 The default uncertainties can be overridden for individual elements or element valence states using bal ances identifier DESCRIPTION OF DATA INPUT 49 INVERSE MODELING 50 list of uncertainties list of default uncertainties that are applied to each solution in the order given by solutions The first uncertainty in the list is applied to all the element and element valence states in the first solution listed in solutions The second uncertainty in the list is applied to all the element and element valence states in the second solution listed in solutions and so on A default uncertainty may be entered for each solution used in inverse modeling If fewer uncer tainties are entered than the number of solutions the final uncertainty in the list is used for the remaining solutions Thus if only one uncertainty is entered it is applied to all solutions The uncertainty may have two forms 1 if the uncertainty is positive it is interpreted as a fraction to be used to calculate the uncertainties for each element or element valence state A
274. tates but not for pH may have two forms 1 if the uncertainty is positive it is interpreted as a fraction that when multiplied times the number of moles in solution gives the uncertainty in moles A value of 0 02 would indicate an uncertainty of 2 percent in the number of moles in solution and 2 if the uncertainty is negative it is interpreted as an absolute value in moles to use for the solution in the mole balance equation for element In the example line 6b the uncertainty for calcium in solution 1 is 1 percent of the moles of calcium in solution 1 The uncertainty for calcium in solu tion 2 and 5 is 0 005 moles The uncertainty for iron line 6d is 5 percent in solution 1 10 per cent in solution 2 and 20 percent in solution 5 Line 7 range maximum User s Guide to PHREEQC INVERSE MODELING range identifier that specifies that ranges in mole transfer minimum and maximum mole transfers that are consistent with the uncertainties for each phase in each model should be calculated Optionally ranges range or r anges The calculation of these ranges is time consuming but provides valuable information In the interest of expediency it is suggested that models are first identified without using the range identifier checked for adequacy and geochemical consis tency and then rerun with the range identifier maximum Default 1000 The maximum value for the range is calculated by minimizing the difference between the value
275. ted as 0 Line 6 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 aturataion 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 Each phase must have been defined by PHASES input either in the database or in the current or previous simulations in the input file After each cal culation of a solution composition the saturation index of each of the phases will be written to the file containing the selected output If the phase is not defined or if one or more of its constit uent elements is not in solution the saturation index will be printed as 999 999 Line 7 gases gas list gases identifier allows definition of a list of gases for which the amount in the gas phase will be writ ten to the selected output file Optionally gases or g ases gas list list of gases in the gas phase Each gas must have been defined by PHASES input This iden tifier is useful only if the GAS PHASE keyword data block has been defined After each cal culation of a solution composition the amount in moles of each of the selected gases in the gas phase will be written into the file containing the selected output If the phase is not defined or i
276. tervening spaces description optional character field that describes the 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 the chemical formula to be used in the irre versible reaction relative stoichiometry Amount of this reactant relative to other reactants it is a molar ratio between reactants In the example the reaction contains 2000 times more NaCl than calcite Line 2 list of reaction amounts units list of reaction amounts A separate calculation will be made for each listed amount In the example a solution composition will be calculated after adding 0 25 0 5 0 75 and 1 0 mol of the reaction to the initial solution The additions are not cumulative each reaction step begins with the same initial solution and adds only the amount of reaction specified The total amount of each reactant added at any step in the reaction is the reaction amount times the stoichiometric coefficient of the reactant Thus the total amount of sodium and chloride added at each reaction step is 0 5 1 0 1 5 and 2 0 mol the total amount of calcium and carbonate added at each step is 0 00025 0 0005 0 00075 and 0 001 mol Additional lines may be used to define all reactant amounts units units must be moles millimoles or micromoles Units must follow all reaction amounts Default is moles If l
277. th ammonium and nitrate but none for dissolved nitrogen Although nitrate and ammonium should not coexist at thermodynamic equilibrium the speciation calculation allows redox disequilibria and the concentrations of the nitrogen species are defined only by the input data In the reaction evaporation step redox equilibrium is attained for the aqueous phase which caused ammonium to be oxidized and nitrate to be reduced generating dissolved nitrogen The equilibrium solution solution 2 contains nitrate and dissolved nitrogen but virtually no ammonium table 10 This redox equilibration will occur in the reaction calculation because of the inherent redox disequilib rium in the definition of the rain water composition Nitrogen redox reactions would have occurred even if the REACTION keyword had specified that no water was to be removed Example 5 Irreversible Reactions This example demonstrates the irreversible reaction capabilities of PHREEQC in modeling the oxidation of pyrite Oxygen is added irreversibly to pure water in five varying amounts 0 0 1 0 5 0 10 0 and 50 0 mmol while pyrite calcite and goethite are allowed to dissolve to equilibrium In addition gypsum is allowed to precip itate if it becomes supersaturated Pure water is defined with SOLUTION input table 11 and the pure phase assemblage is defined with EQUILIBRIUM PHASES input Because gypsum has an initial amount of 0 0 mol gypsum can only precipitate EXAMPLES 103
278. tion equations PHREEQC allows multiple pure phases termed a pure phase assemblage to exist in equilibrium with the aqueous phase subject to the limi tations of the Gibbs Phase Rule The activity of a pure phase is assumed to be identically 1 0 The additional mas ter unknown for each pure phase is the number of 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 number of moles of each pure phase occur in the mole balance equations for elements EQUATIONS FOR SPECIATION AND FORWARD MODELING 13 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 chem ical equation For calcite the dissolution reaction may be written as CaCO Ca CO 31 and using log K of 10 548 and activity of the pure solid is 1 0 the resulting mass action expression is 8 48 calcite 10 gu ads i 32 In general pure phase equilibria can be represented with the following equation C m p K TI G3 m where Padi is the stoichiometric coefficient of master species m in the dissolution reaction The values of Cai s may be positive or negative For PHREEQC terms on the left hand side of a dissolution reaction are assigned negative coefficients and terms on the right hand side are assigned positive coefficients
279. tion is defined with the SOLUTION keyword data block See Description of Data Input Mass Action Equations for Exchange Species Ion exchange equilibria are included in the model through additional heterogeneous mass action equations PHREEQC allows multiple exchangers termed an exchange assemblage to exist in equilibrium with the aque ous phase The approach uses mass action expressions based on half reactions between aqueous species and a fic tive 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 keyword data block See Description of Data Input How ever the master species is not included in the mole balance equation for the exchanger forcing its physical con centration to be zero Its activity is also physically meaningless but is such that all of the exchange sites are filled by other exchange species 8 User s Guide to PHREEQC The unknowns for exchange calculations are the activity a which is defined to be the equivalent fraction e in PHREEQC and the number of moles n of each exchange species i of exchanger e The equivalent fraction is the number of moles of sites occupied by an exchange species divided by the total number of exchange sites b jn The activity of an exchange species is defined as follows a
280. tion 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 tem peratures The input data set is given in table 5 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 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 assem blage 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 phase is sufficient to reach equilibrium Table 5 Input data set for example 2 TITLE Example 2 Temperature de
281. tions to be modeled correctly The diffuse double layer model Dzombak and Morel 1990 and a non electrostatic model Davis and Kent 1990 have been incorporated for modeling surface complexation reactions Surface complexation constants from Dzombak and Morel 1990 are included in the default databases for the program The capability to model ion exchange reactions has been added and exchange reactions using the Gaines Thomas convention are included in the default databases of the program Exchange modeling with the Gapon convention is also possible It is possible to define independently any number of solution compositions gas phases or pure phase gas phase exchange or surface complexation assemblages During reaction calculations any combination of these solutions gas phases and assemblages can be brought together to define a system and can react to system equilibrium The determination of reaction paths and the stable phase assemblage has been simplified but the capability to solve for individual phase boundaries has been retained A new equation solver that allows both equality and inequality constraints is used to determine the stable phases among a list of candidate phases Mole transfers occur until each candidate phase is in equilibrium with the aqueous phase or is undersaturated with the solution and the total number of moles of the phase have been removed Conceptually it is not possible to produce a Gibbs phase rule violation A more
282. tiple solutions exchange assemblages surface assemblages pure phase assemblages and gas phases can be defined 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 surface assemblage a pure phase assemblage or a multicom ponent gas phase In addition mixtures irreversible reactions and reaction temperatures can be specified for reac tion calculations An entity in a reaction can be defined implicitly or explicitly For implicit definitions 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 in the reaction simulation That is the first solution or mixture will be equilibrated with the first defined of each of the following entities in the simulation exchange assemblage EXCHANGE gas phase GAS_PHASE pure phase assemblage EQUILIBRIUM_PHASES surface assemblage SURFACE irreversible reaction REACTION and reaction temperature REACTION TEMPERATURE Alternatively USE keyword number can be used to explicitly define an entity to be used in the reaction calculation from any previously defined entities See examples 3 6 7 8 and 9 USE keyword none can be used to eliminate an entity that was implicitly defined See examples 8 and 9 Any combination of entities can be used to define a reaction The composition
283. to designate this exchange assemblage and its composition Default is 1 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 description is an optional character field that describes the exchanger Line 1 chemical formula amount chemical formula component of the exchanger amount quantity of component in moles Notes 1 Line 1 may be repeated to define the entire composition of each exchanger Although this example only defines one exchanger X other exchangers could be included in the exchange assemblage In the example the total number of exchange sites of X is 1 5 mol and the total concentrations of calcium magnesium and sodium on the exchanger are 0 3 0 2 and 0 5 mol respectively Example 2 Line 0 EXCHANGE 1 Exchanger in equilibrium with solution 1 Line 1 equilibrate with solution 1 Line 2a X 10 Line 2b Xa 0 5 Explanation 2 Line 0 EXCHANGE number description As in example 1 Line 1 equilibrate number equilibrate This string at the beginning of the line indicates that the exchange assemblage is defined to be in equilibrium with a given solution composition Optionally equil equilibrate e quil ibrate number solution number with which the exchange assemblage is to be in equilibrium Any alphabetic characters following the identifier and preceding an integer with solution
284. to nitrogen ratio of approximately 15 1 is added irreversibly to this solution in increments ranging from 1 to 1000 mmol REACTION keyword A gas phase which initially has no moles present is allowed to form if the sum of the partial pressures exceeds 1 1 atm GAS PHASE keyword only CO CH4 N and NH are allowed to occur in the gas phase SELECTED OUTPUT is used to print to a file ex7 pun the partial pressures and the number of moles in the gas phase of each gas at each step of the reaction Table 15 Input data set for example 7 TITLE Example 7 Organic decomposition and bubble formation SOLUTION 1 EQUILIBRIUM PHASES 1 Calcite CO2 g 1 5 SAVE solution 1 SELECTED OUTPUT file ex7 pun si CO2 g CH4 g gas CO2 g CH4 N2 g N END USE solution 1 GAS PHASE 1 pressure 1 1 CO2 g 0 0 CH4 g 0 0 N2 g 0 0 NH3 g 0 0 REACTION 1 CH20 N0 07 149 1 2 3 4 8 16 32 64 125 250 500 1000 mmol The gas phase appears between 2 and 3 mmol of reaction have been added fig 3 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 1077 atm throughout the reaction calculation The volume of gas produced ranges from less than 1 mL at 3 mmol of reaction to more than 20 L after 1 mol of reaction After 1 mol of reaction is added nearly all of the carbon and nitrogen
285. total number of moles of an element in the system is the sum of the number of moles initially present in the pure phase assemblage aqueous phase exchange assemblage surface assemblage gas phase and diffuse lay ers of the surfaces The following function is derived from the general mole balance equation N Naq E Ne fm Li D Y b ii DIA Lr p i e i 43 N q s N N S Da i ba gle yen e s s d g s i where the value of the function f is zero when mole balance is achieved T is the total number of moles of the element in the system E is the number of exchangers in the exchange assemblage S is the number of surfaces in the surface assemblage N is the number of phases in the pure phase assemblage Naq is the number of aqueous species N is the number of exchange species for exchanger e N is the number of surface species for surface s and N is the number of gas components The number of moles of each entity in the system is represented by n for phases in the pure phase assemblage n for aqueous species ni for the exchange species of exchanger e te for surface species for surface s n for the gas components and n for the aqueous species in the diffuse layer of surface s The number of moles of element m per mole of each entity is represented by b with an additional m subscript to define the relevant entity b is usually but not always equal to c the coefficient of the master species for m i
286. ulations eesessesseeeeeeeeeer eene nennen nennen nennen retener terere 27 Equations and numerical method for inverse modeling esee nennen nennen nre 28 Organization of the computer code eed u u Saa arte Feet eese it Ser Ero Dae ae e LEE une tace ctia Bee eite KEKEE 32 Description Of data Ynp t iit tr ce e E Ee rH RE RRE REESE BEER RES He PERO CO REAPER Roe eee LEES ER ERR EEE XE ER EEE E eb ee ES casas 34 Conventions fordata IBput E M 34 Reducing chemical equations to a standard form esssseseeeseeeeeeeeeeneenne nenne eene nente nennen emen enne 36 Conventions for documentation ore teer nde sore EEEE EAEE EEEE EENE STRET vae pe apo Pru en a EE E gak Pa 66 36 Overview of data files and keyword data blocks eese nn nennen nente nennen nre 36 sun m Hes c 39 END 22 M ESEET 39 Example problems fp kus 39 EQUILIBRIUM PHASES rr rrr ri ten tie teh ti Po Ciro rer Or PR P Fe RR RR Ee rl ere EO S de HERR 40 Example E 40 EX pla ation E E E a 40 INGLES iis sists 41 Example problems uiii reet abt rbi e Eb REED
287. ulations may also be used The uncertainty identifier sets the default uncertainty for each analytical datum In this example a frac tional uncertainty of 0 025 2 5 percent is assumed for all of the analytical data except pH By default the uncer tainty in pH is 0 05 unit The uncertainty for pH and any datum for any of the solutions can be set explicitly to a fractional value or an absolute value in moles equivalents for alkalinity using the balances identifier The phases to be used in the inverse modeling calculations are defined with the phases identifier In addi tion this identifier can be used to specify any phases that only dissolve or only precipitate In this example kaolin ite montmorillonite and chalcedony SiO 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 montmorillonite and chalcedony Similarly 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 key word data blocks either in the database file or the input file Thus all phases defined in the default database file phreeqc dat or wateg4f dat are available for use in inverse modeling Halite biotite and plagioclase are not in the default database file phreeqc dat and so they are defined explicitly in t
288. um and maximum mole transfers of each phase that are consistent with the specified uncertainties These two columns are nonzero only if the range identifier is used These minima and maxima are not independent that is obtaining a maximum mole transfer of one phase places very strong con straints on the mole transfers for the other phases However the output does not show any linkages between the maximum value for one phase with maximum or minimum values for other phases No redox reactions occurred in this inverse model If they had the number of moles transferred between valence states of each element would be printed under the heading Redox mole transfers Next the sum of each uncertainty unknown divided by its uncertainty DUM m qm Um q residuals and the maximum percentage adjustment to any element in any solution are printed these two values apply to the model printed in the left hand column Finally if no inverse model can be found with any proper subset of the phases the statement Model contains minimum number of phases is printed After all models are printed a short summary of the calculations is printed which lists the number of models found the number of minimal models found models with a minimum number of phases the number of infeasible a standardized sum of 124 User s Guide to PHREEQC sets of phases for which inverse models were attempted but failed and the number of calls to the inequality equa tions
289. ure steps is slightly different than the implicit calculation of reaction steps If n implicit reaction steps are defined then the reaction is added in n equal DESCRIPTION OF DATA INPUT 63 REACTION TEMPERATURE increments If n implicit temperature steps are defined then the temperature of the first reaction step is equal to temp temperatures in the remaining steps are defined by n 1 equal increments Example problems The keyword REACTION TEMPERATURE is used in example problem 2 Related keywords REACTION 64 User s Guide to PHREEQC SAVE SAVE This keyword data block is used to save the composition of the solution exchange assemblage gas phase surface assemblage or pure phase assemblage following a reaction calculation Line Oa Line Ob Line Oc Line Oc Line Od Example SAVE equilibrium phases 2 SAVE exchange 2 SAVE gas phase 2 SAVE solution 2 SAVE surface 1 Explanation Line 0 SAVE keyword number SAVE is the keyword for the data block keyword one of five keywords exchange equilibrium phases gas phase 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 Notes 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 SAVE has eff
290. usn I uoranTos 4SN aNd O OT HOEN GZ 9 H XTA I SHSVHd WOIYAITINOG eoeyjains usn tr uoranjos usn ONU 0 0I HOEN 0 9 H X14 I SUSVHd W lNgdITIn S T 9oe9egjuans AS I uoranios 4SN aNa 0 0I HORN GgL GS H XI4 I SHSWHd WNIYAITINOG I 9SoeZjians usn TL uoranTqos usn aNd 0 0I HOEN G G H XI I SUSVHd WnIwgITInOs T eoegans usn I uoranios usn aNg 0 01 HOEN G G H XT I SHSVHd WO INSITID S I 9Soe9egjuns HSN T YUOTANTOS sn GN 0 0I HOLEN 0 S H XI4 I SHSWHd WNIYEITINOG I eoeguans usn I uot y4ntos usn s rqarreTou und gx e rj INdLNO dALOJTAS UZOM OJH C UZ Ltr uz ON 00 x bor H H H XT SQISVHd I Suorjrurjep TSPOW uou eoeguns us OOT S N ebzeyo HOT eN E O uz 0 8 Hd Mbx iouu sS3Tun C NOIILIIOS OOT S N obaeuo 00I eN T0000 uz 0 8 Hd Mbx iouu sqrun L NOILU IOS 7 982 HOM OJH 009 9 9G HOS OJH IT 4OVAHOQS c Z x BOT H UZOM OJH C UZ HOM OJH 2 8 8 x LOT H OM OJH HOM OTH 8ST L X BOT ZHOM OJH H HOM OJH 99 0 X SOT H UZOS OJH Z UZ HOS OJH Z8 8 x HOT H OS O3H HOS O3H 81 X BOT ZHOS OJH H HOS OTH SSIOHdS SHOV4H S Soprxo UOIT snozp u uo ourz jo uoraddog g e duexgy WwTILII 9 ejdujexe 104 1es gyep Indu 94 lq L User s Guide to PHREEQC 112
291. ut 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 equilibrium phases True or False equilibrium phases Prints composition of the pure phase assemblage if value is true excludes print if value is false Default is true Optionally equilibria equilibrium pure eq uilibrium phases eq uilibria p ure phases or p ure Note the hyphen is neces sary to avoid a conflict with the keyword EQUILIBRIUM PHASES and its synonym 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 necessary 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 necessary to avoid a conflict with the keyword GAS PHASE Line 6 other True or False other Controls all printing to the output file not controlled by any of the other identifiers including headings lines that identify the solution exchange assemblage surface assemblage pure phase assemblage and gas phase to be used in each reaction cal
292. utput file If the comment follows input data on a line the entire line including the comment is echoed to the output file The 4 is useful for adding comments explaining the source of various data or describing the problem set up In addi tion it is useful for temporarily removing lines from an input file 66 Logical line separator A semicolon is interpreted as a logical end of line character This allows mul tiple 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 is interpreted as a signal to ignore the character immediately following the backslash The primary use of this signal is to ignore the end of line character which allows a single logical line to be written on two physical lines For example a long chemical equation could be entered as Ca0 165A12 33813 67010 0OH 2 12 H20 V 0 165Ca 2 2 33 Al OH 4 3 67 H4Si04 2 H on two lines The program would interpret this sequence as a balanced equation entered on a single logical line Note that if a space follows the backslash and precedes the end of line the space will be ignored and the end of line will be interpreted as normal The backslash character should not be used in character fields such as th
293. ved by PHREEQC initial solution speciation initial exchanger initial surface and reaction or transport modeling A table of notation is included in Attachment A In general lack of a subscript or the subscript aq will refer to entities in the aqueous phase e refers to exchangers g refers to gases and s refers to surfaces Activities and Mass Action Equations In this section the activities of aqueous exchange and surface species are defined and the mass action rela tions for each species are presented Equations are derived from the mass action expression for the number of moles of each species in the chemical system in terms of the master variables These equations are then differen tiated with respect to the master variables Later these equations for the number of moles of a species and the par 6 User s Guide to PHREEQC tial derivatives will be substituted into the constituent mole balance charge balance and phase equilibria functions Mass Action and Activity Coefficient Equations for 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 data input section The dissolved species in the aqueous phase are assumed to be in thermodynamic equilibrium except in initial solution calculations w
294. water 78 5 unitless and is the dielectric permittivity of a vacuum 8 854x10 7 C Vv ml The value of at 25 C is 0 02931 L mol or m where L is liters mol is moles C is coulombs and m is meters The relation between the unknown X used by Borkovec and Westall 1983 and the master unknown used by PHREEQC is ay X The development of Borkovec and Westall 1983 calculates only the total excess concentration in the dif fuse layer of each aqueous species A problem arises in 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 number of moles that remain with the surface needs to be known In PHREEQC an arbi trary 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 number of moles of an aqueous species in the diffuse layer is then the sum of the con tribution from the surface excess plus the bulk solution in the diffuse layer 20 User s Guide to PHREEQC n n i i nr s n s axcass Mg saq 8i sWyukw tW 61 aq aq where Re cag refers to the number of moles of aqueous species i that is present in the diffuse layer due to the cadiribution from the bulk solution Ii perces refers to the number of moles that is added to the diffuse layer due to the surface excess calculation Wo is the
295. way from a charged surface In general the equation for surface species i is 10 User s Guide to PHREEQC FY Az int Cm is is RT K la e 15 m where i is the i surface species for surface s m varies over all master species including surface master species c 18 the stoichiometric coefficient of master species m in the association half reaction for surface species i i The values of c may be positive or negative For PHREEQC 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 K S is the intrinsic equilibrium constant and Az is the net change in surface charge due to the formation of the Ss surface species For a surface species the equation for the total number of moles of species i is 1 m K e I i i aq i aq m m 16 zy m i K Wag ain i m The total derivative of the number of moles of species i with respect to the master unknowns is dn n dn Wag 4 om j din a Az dina 17 m The second formulation of mass action equations for surface species excludes the electrostatic potential term in the mass action expression no edl identifier in the SURFACE keyword data block The equation for the number of moles of a surface species is the same as equation 16 except the factor involving ay does not appear Likewise the total derivative of the number of mo
296. y 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 printout is long and tedious Line 7 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 variables which occur in subroutine set are printed for each element or element valence state that fails the initial convergence criteria The initial revisions occur before the Newton Raphson method is invoked and provide good estimates of the master variables to the Newton Raphson method The printout is tedious Line 8 debug model True or False debug model includes debugging prints for subroutines called by subroutine model
297. y location The source datum is retrieved multiplied by the coefficient and added to the target memory location Thus for example the molality of the species CaSO 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 Ca SO In all three entries the source datum would be a pointer to the number of moles of the species 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 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 state ments are necessary The actual implementation uses several lists for each task to skip multiplication if the coeffi cient 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 equi
298. y the mass action expressions used for aqueous species 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 then the 24 User s Guide to PHREEQC 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 Fe Fe e 72 would be rewritten using the association reaction for sulfide SO 9H 8e HS 4H 0 73 to produce the following chemical reaction that does not include electrons 2 1 2 9 3 l 1 Fe 3504 gH Fe gQHS 5H 0 74 The mass action expression for this final reaction would be used as the mass action expression for the species F Tu and the differential for the change in the number of moles of F p dn would also be based on this Fe mass action expression However the original mass action expression based on equation 72 is used to 3 determine the mole balance equations in which the term dn appears that is the species Fe would appear Fe in the mol
Download Pdf Manuals
Related Search
Related Contents
Lincoln Electric 4.1 Welder User Manual Lenovo Storage Array 8332 User's Manual reference series Manual de Usuario / User`s Manual 33-1600 Cinema.SUB2 manual book Model UB-511 - A&D Company Ltd 2015 - Cicese Vet360-Chek - Reichert Technologies: Analytical Instruments Copyright © All rights reserved.
Failed to retrieve file