PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • USER_PUNCH/USER_GRAPH »
  • BASIC functions »
  • USER GRAPH function to model pe influence over different solutions
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: USER GRAPH function to model pe influence over different solutions  (Read 741 times)

frenzy_geochem

  • Contributor
  • Posts: 6
USER GRAPH function to model pe influence over different solutions
« 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!
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2508
Re: USER GRAPH function to model pe influence over different solutions
« Reply #1 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

Logged

frenzy_geochem

  • Contributor
  • Posts: 6
Re: USER GRAPH function to model pe influence over different solutions
« Reply #2 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
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2508
Re: USER GRAPH function to model pe influence over different solutions
« Reply #3 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.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • USER_PUNCH/USER_GRAPH »
  • BASIC functions »
  • USER GRAPH function to model pe influence over different solutions
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2