PhreeqcUsers Discussion Forum

Processes => Dissolution and precipitation => Topic started by: cjbrown on August 17, 2018, 02:36:24 PM

Title: pyrite oxidation
Post by: cjbrown on August 17, 2018, 02:36:24 PM
I have a question about a PHREEQC model, in which I attempt to simulate pyrite oxidation over a series of reaction steps with O2 and CO2. Seems I might be using the SAVE and USE data blocks in the wrong places-- I want to save the solution after each step but the cation exchange complexes or the mineral rxns don't show up in the selected output. A more complex model runs okay where I start out by mixing the GW with deicer runoff. I'm using phreeq.dat.
Is there a simple explanation for this?

#react water with pyrite, goethite with atmosphere (O2 and CO2)  "nhdot_Fb_1_052218_b"
SOLUTION 1  GROUNDWATER
      pH      7.75
      temp    11
   units    mg/l
   O(0)      0.2
   Fe(2)      1.5
   Na      11
   Cl      9.9
   Ca      26
   Mg      5.9
   K      1.45
   S(6)      15
   Alkalinity   98
#react water with pyrite, goethite, in contact with atmosphere (O2 and CO2)
USE SOLUTION 1
EQUILIBRIUM_PHASES 1
    Pyrite    0      0.01   #begin with 0.01 moles of pyrite
   Goethite  0
SAVE SOLUTION 2
END
USE SOLUTION 2
EXCHANGE 1
    X       1
    -equilibrate with solution 2
SAVE SOLUTION 3
END
USE SOLUTION 3
REACTION 1
        O2      1.0
   CO2   1.0
        0.0     0.001   0.005   0.01    0.05
SELECTED_OUTPUT
    -file   NHdot_Fb_1_052218_b.sel
    -equilibrium_phases  pyrite goethite calcite
    -totals Fe(2) Fe(3) Na Cl S(6) C(4)
    -molalities CaX2 MgX2 NaX KX FeX2  Fe+2 Fe+3 Fe(OH)4- Fe(OH)3 Fe(OH)2+ FeOH+2 FeCl+ FeCl+2 FeSO4 FeSO4+ Fe(SO4)2- FeCO3 FeHCO3+
    -gas CO2(g) CH4(g)   O2(g)
END

Title: Re: pyrite oxidation
Post by: dlparkhurst on August 17, 2018, 04:19:34 PM
SELECTED_OUTPUT will only apply in the simulation it is defined and in subsequent simulations. Simulations are demarcated by END keywords. If you want the SELECTED_OUTPUT to apply to all simulations, move the definition up in the script.

You may want to put an END after the solution definition, and then define SELECTED_OUTPUT. Depends on if you want the initial solution in the selected output file or not.
Title: Re: pyrite oxidation
Post by: cjbrown on August 17, 2018, 05:19:13 PM
Thank you that solved the problem!
Best,
Craig