minstab.ppi

# an example of a classical mineral stability diagram - diagram only includes minerals (not aqueous etc species)


SPECIATION
  jobTitle                             "Clay mineral stability diagram"
  Database                             "phreeqc.dat"
  calculationType                      ht1                           # use this approach for finding field boundaries of most abundant minerals
  calculationMethod                    1
  mainSpecies                          "minerals"                    # NB "minerals" is a special case that invokes this type of plot
  xmin                                 -5.0
  xmax                                 -1.0
  ymin                                 -2.0
  ymax                                 8.0
  resolution                           200
PLOT
  plotTitle                            "Clay mineral stability diagram<br>(using mainSpecies = minerals)"
  xtitle                               "log H<sub>4</sub>SiO<sub>4</sub>"
  ytitle                               "log (K/H)"
  extraText                            "extratextminstab.dat"

CHEMISTRY

# first simulation - initial solution calculation

include 'minstab1.inc'                                                   # special file for generating mineral stability diagrams

PHASES
Fix_Si                                                               # used for driving the x-axis variable
   H4SiO4 = H4SiO4
   log_k 0.0

Fix_H/K                                                              # used for driving the y-axis variable
   KOH = K+ + H2O - H+
   log_k 0.0

PRINT
  reset FALSE
SOLUTION 1
   pH        4
   units     mol/kgw
   K         0    # added by reaction
   Na        1e-2
   Cl        1e-2
   Al        1e-2
   Si        0    #added by reaction
   Ca        1e-0
END


# second (final) simulation - iterates on this simulation when driving the x- and y-axes

USE solution 1
EQUILIBRIUM_PHASES 1
   Fix_Si <x_axis> H4SiO4 10                                         # fix H4SiO4 activity
   Fix_H/K <y_axis> KOH 10                                           # fix H/K activity ratio

   Kaolinite          0 0                                            # list of minerals considered
   K-feldspar         0 0
   K-mica             0 0
   Gibbsite           0 0
#  SiO2(a)            0 0                                            # can't add this cos Si activity fixed by Fix_Si
   Ca-Montmorillonite 0 0
END