PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Dissolution and precipitation »
  • Diagram plot
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Diagram plot  (Read 1772 times)

yahya2021

  • Contributor
  • Posts: 2
Diagram plot
« on: 26/01/21 16:19 »
Hi everyone,

Can someone please show me how to get the same plot in the figure (line of phreeqC),

Thank you so much in advance,

Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4036
Re: Diagram plot
« Reply #1 on: 26/01/21 18:04 »
If you want all the fields drawn out, you may want to use PhreePlot.

Here is a plot of the solubility and dominant aqueous species (using phreeqc.dat). The fields would be defined by vertical lines at the intersections of the aqueous species plots. Your plot evidently has a different log_k for ferrihydrite, or the Fe aqueous model.

The input is a little obscure. It writes a series of input for each pH to a file name phsteps.pqi. USER_GRAPH is defined, and then phsteps.pqi is inserted and run.

Another trick is shown in example 8 of the manual. It is not known which pH requires addition of acid and which addition of base. Here HNO3 or NaOH is added by using a fictitious phase NaNO3 in EQUILIBRIUM_PHASES to avoid trial and error for acid or base addition.

Code: [Select]
PHASES
Fix_H+
  H+ = H+
  log_k 0
NaNO3
  NaNO3 = Na+ + NO3-
  log_k 0
Ferrihydrite
  Fe(OH)3 + 3H+ = Fe+3 + 3H2O
  log_k   4.891
END
SOLUTION
SELECTED_OUTPUT 2
-file phsteps.pqi
USER_PUNCH 2
10 FOR ph = 3 to 12 step 0.25
20   l$ = l$ + "USE solution 1" + EOL$
30   l$ = l$ + "EQUILIBRIUM_PHASES 1" + EOL$
40   l$ = l$ + "  Fix_H+ " + STR$(-ph) + " NaOH 10" + EOL$
50   l$ = l$ + "  Ferrihydrite 0 10" + EOL$
60   l$ = l$ + "  NaNO3 -20 100" + EOL$
70   l$ = l$ + "END" + EOL$
80 NEXT ph
90 PUNCH l$
END
SELECTED_OUTPUT 2
-active false
END
USER_GRAPH 1
    -headings               pH TOT(Fe) Fe+3 FeOH+2 Fe(OH)2+2 Fe(OH)3 Fe(OH)4-
    -axis_titles            "pH" "Molality of Fe" ""
    -axis_scale x_axis      3 12 auto auto
    -axis_scale y_axis      -10 -2 auto auto
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X -LA("H+")
20 GRAPH_Y LOG10(TOT("Fe"))
30 GRAPH_Y LM("Fe+3"), LM("FeOH+2"), LM("Fe(OH)2+"), LM("Fe(OH)3"), LM("Fe(OH)4-")
  -end
    -active                 true
END
INCLUDE$ phsteps.pqi
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4036
Re: Diagram plot
« Reply #2 on: 29/03/21 16:17 »
You should contact David Kinniburgh; check the PhreePlot site for how to contact him.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Dissolution and precipitation »
  • Diagram plot
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2