PhreeqcUsers Discussion Forum

USER_PUNCH/USER_GRAPH => BASIC functions => Topic started by: frenzy_geochem on March 23, 2020, 05:09:08 PM

Title: USER GRAPH function to model pe influence over different solutions
Post by: frenzy_geochem on March 23, 2020, 05:09:08 PM
Hi all,

After searching the manual and various examples and topics, I still have not found how to use the USER GRAPH function on a set of different solutions where I only vary pe values:

SOLUTION 1
temp 25
pH 5.5
pe 5   
units mol/l
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1
END

SOLUTION 2
temp 25
pH 5.5
pe 10
units mol/l
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1
END

... and so on. I want to plot SI of the phases I create against pe. How would I do this?

Big thanks!
Title: Re: USER GRAPH function to model pe influence over different solutions
Post by: dlparkhurst on March 23, 2020, 06:42:20 PM
First, your solutions are independent of pe. When you define S(-2) and Fe(+2), you are specifying the redox state of S and Fe. pe is used if you when you define a total, S and (or) Fe, to distribute the total element among its redox states.

Here is a modification of your file with sulfate and total Fe that graphs the distribution of iron between ferrous and ferric iron as a function of pe. I did not use sulfide [S(-2)] because ferric iron and sulfide generally would not coexist.

Code: [Select]
USER_GRAPH 1
    -headings               pe Fe(2) Fe(3) Cl
    -axis_titles            "pe" "mol/kgw" ""
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x -la("e-")
20 graph_y TOT("Fe(2)"), TOT("Fe(3)"), TOT("Cl")
  -end
    -active                 true
SOLUTION 1
pH 5.5
pe 0   
Na 0.2
S(6) 0.1
Fe 0.5
Cl 1 charge
END
SOLUTION 1
pH 5.5
pe 5   
Na 0.2
S(6) 0.1
Fe 0.5
Cl 1 charge
END
SOLUTION 1
pH 5.5
pe 10   
Na 0.2
S(6) 0.1
Fe 0.5
Cl 1 charge
END
SOLUTION 1
pH 5.5
pe 15   
Na 0.2
S(6) 0.1
Fe 0.5
Cl 1 charge
END

Title: Re: USER GRAPH function to model pe influence over different solutions
Post by: frenzy_geochem on March 25, 2020, 08:19:19 AM
Thank you so much for the elaborate answer. I focussed on pe, as someone told me PHREEQC resets the equilibrium based on pe and that I needed to incorporate it. What I actually want to simulate is the formation of mackinawite (FeS) which I made in the lab using FeCl2 and Na2S in anaerobic circumstances. Yet, O2(g) appears as a phase in the output, which I don't understand. It might be from dissociated water due to the pH? Does it affect the rest of my phases? In the lab, no oxygen was released during my experiments. Can I get rid of this phase somehow?

I tried to rewrite your code to show the SI of phases against pH, but I am not there yet. Any tips?

Code: [Select]
USER_GRAPH 1
    -headings               pH Goethite Halite Ferrihydrite
    -axis_titles            "pH" "SI" ""
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x -la("e-")
20 graph_y TOT("Pyrite"), TOT("Mackinawite"), TOT("FeS(ppt)")
  -end
    -active                 true
SOLUTION 1
temp 25
pH 3.5
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1 charge
END
SOLUTION 1
temp 25
pH 4.5
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1 charge
END
SOLUTION 1
temp 25
pH 5.5
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1 charge
END
SOLUTION 1
temp 25
pH 6.5
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1 charge
END
SOLUTION 1
temp 25
pH 7.5
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1 charge
END
SOLUTION 1
temp 25
pH 8.5
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1 charge
END
SOLUTION 1
temp 25
pH 9.5
Na 0.2
S(-2) 0.1
Fe(+2) 0.5
Cl 1 charge
END
Title: Re: USER GRAPH function to model pe influence over different solutions
Post by: dlparkhurst on March 25, 2020, 01:53:03 PM
Thermodynamics says there is O2 in your solution, but if you look, it is a vanishingly small amount (1e-32 mol/kgw). It has no effect on your result.