PhreePlot (468 636)
PhreePlot (468 636)
PhreePlot (468 636)
SPECIATION
calculationType custom
calculationMethod 1
xmin 2.0
xmax 12.0
# determines the number of ‘points’ on the curves (i.e. PHREEQC runs)
resolution 101
PLOT
# <br> causes a line break
plotTitle “Al solubility vs pH<br>(plotting named spe-
cies)”
xtitle pH
ytitle “log concn (mol/kgw)”
# force the y-axis range
pymin -10.0
pymax 2.0
# in the units currently in force
lineWidth 0.4
# x-axis variable -’pH’ must match the name of one of the punched columns below
customXcolumn pH
# y-axis variables in legend order
lines Al+3 AlF+2 Al(OH)4- SI<sub>Gibbs</sub>
Al<sub>T</sub> Gibbsite
extraText “extratextAlvsph.dat”
# turns off the little red label ‘anchors’
trackSymbolSize 0
CHEMISTRY
SELECTED_OUTPUT
reset false
high_precision true
PHASES
Fix_H+
H+ = H+
log_K 0.0
SOLUTION 1 Total Al
units mol/kgw
Al 1e-3
F 1e-3
S(6) 1e-3
Na 1e-1
Cl 1e-1
USER_PUNCH
# this is where ‘pH’ and all the y-axis variables are defined
headings pH Al+3 AlF+2 Al(OH)4- SI<sub>Gibbs</sub> Al<sub>T</sub> Gibbsite
-start
10 totel = SYS(“Al”,n,n$,t$,c)
20 mol_gibbsite = equi(“Gibbsite”)
30 REM -99999 is PhreePlot’s UNDEFINED value
40 IF (mol_gibbsite > 0) THEN log_gibbsite = log10(mol_gibbsite) ELSE log_gibbsite
= -99999
50 PUNCH -la(“H+”), lm(“Al+3”), lm(“AlF+2”), lm(“Al(OH)4-”), SI(“Gibbsite”),
log10(tot(“Al”)), log_gibbsite
-end
END
USE solution 1
EQUILIBRIUM_PHASES 1
Fix_H+ -<x_axis> NaOH 10
-force_equality true
# these are the possible minerals considered
Gibbsite 0 0
# Al(OH)3(a) 0 0
Basaluminite 0 0
Boehmite 0 0
Jurbanite 0 0
END
Examples 451
Examples 452
Gran
pH
6
pH
2
Closed system
0
0.0 0.5 1.0 1.5 2.0 2.5 3.0
ml 0.16M HCl
C:\PhreePlot\demo\titration\titration.ps
This example demonstrates how a single iteration of Phreeqc can generate a multiline
SELECTED_OUTPUT file. Each of the REACTION steps produces a line of output. RXN gives the
moles of reactant used at each step and this is converted to mmoles for plotting. resolution has
been set to 1 because only iteration is used.
The selectedOutputLines setting has been set to auto which signals that all lines in the
selected output are transferred to the ‘out’ file rather than just the last line.
The labels normally attached to each line have been suppressed by setting labelSize to 0. The
legend has been moved inside the plot with the <legend> tag in the extraText file.
It is much faster to use Phreeqc’s internal looping like this compared with PhreePlot’s looping
mechanisms. Having said that, calculation times are often so short that speed is not an issue
for simple calculations like this.
Examples 453
SPECIATION
calculationType custom
calculationMethod 1
# get as many lines as there are -> out file
selectedOutputLines auto
PLOT
plotTitle “Acid titration of 50 mL of groundwa-
ter<br>(using REACTION keyword)”
xtitle “ml 0.16M HCl”
ytitle pH
customXcolumn ml
pxmax 3
# from selected output
lines pH Gran
# from selected output
points Gran
# suppress curve labels inside plot
labelSize 0
lineColor blue
pointColor green
extraText extratexttitration.dat
CHEMISTRY
SELECTED_OUTPUT
-reset false
USER_PUNCH
-headings ml pH water Gran
# assumes density = 1
10 VT = TOT(“water”)*1000
20 V = VT-50
30 pH = -la(“H+”)
40 Gran = VT*(10^-pH)*30
50 punch V, pH, VT, Gran
GAS_PHASE
-fixed_volume
# 10 mL gas + 50 mL solution
-volume 0.01
# equilibrate with solution 1 to begin with - this leads to some initial degassing
-equilibrate 1
CO2(g)
END
Examples 454
Gran
pH
6
pH
2
Closed system
0
0.0 0.5 1.0 1.5 2.0 2.5 3.0
ml 0.16M HCl
C:\PhreePlot\demo\titration\titration2.ps
This is essentially the same example as the previous example but has been calculated using one
of PhreePlot’s own looping mechanisms. This involves using a 1 mol/kgw solution of HCl to
titrate the groundwater. The titration is achieved using the MIX keyword.
This approach includes the dilution brought about by the titration (the REACTION approach
essentially titrates with ‘solid’ HCl). In this case, the dilution is very small.
Examples 455
SPECIATION
calculationType custom
calculationMethod 1
xmin 0.0
xmax 3.0E-03
resolution 50
numericTags <titre> = “<x_axis>”
PLOT
plotTitle “Acid titration of 50
mL of groundwater<br>(using MIX keyword)”
xtitle “ml 0.16M HCl”
ytitle pH
lineColor blue
customXcolumn ml
lines pH Gran
points Gran
pointColor green
labelSize 0
extraText “extratexttitration.dat”
CHEMISTRY
SELECTED_OUTPUT
-reset false
SOLUTION 1 # Groundwater
pH 7.05
units mg/L
temp 10.5
water 0.050 kg
Na 6
K 0.6
Ca 124
Mg 1.6
Cl 11
Alkalinity 348 as HCO3
S(6) 3 as SO4
Si 5.8
Examples 456
SOLUTION 2
units mol/kgw
pH 1 charge # 0.16 mol/
kgw HCl
Cl 0.16
END
USER_PUNCH
-headings ml pH VT Gran
1 pH = -la(“H+”)
10 V = <titre>*1000
11 VT = (0.05 + <titre>)*1000
20 Gran = VT*(10^-pH)*30
30 punch V, pH, VT, Gran
GAS_PHASE
-fixed_volume
-volume 0.01 # 10 mL gas
+ 50 mL solution
-equilibrate 1 # equilibrate
with solution 1 to begin with - this leads to some initial
degassing
CO2(g)
END
Examples 457
Examples 458
58 Redox sequence
0.10 O2
NO3-
Mn2+
As(V)
0.08 As(III)
Concentration (mmol/L)
•
As(III) Fe2+
SO42-
•
0.06 As(V) S2-
• CH4
S2- CH4
• •
NO3- SO42-
•
Mn2+
0.04 •
O
• 2
0.02
Fe2+•
0.00
0.0 0.1 0.2 0.3 0.4 0.5 0.6
Carbon added (mmol/L)
C:\PhreePlot\demo\redox\redox.ps
This example (from Appelo and Postma, 2005, Fig. 9.17) shows how a single iteration of
Phreeqc (using the REACTION keyword) can generate a series of points that can be assembled to
give the ‘redox ladder’ plot indicated. The REACTION keyword generates its own internal loop-
ing and so there is no need for PhreePlot loops.
The curves show the successive reduction of various solutes as the groundwater is titrated with
C (as in organic matter) in the presence of a small amount of goethite and pyrolusite.
The label names have been set explicitly by making them the names for the headings in the
selected output. These names get passed to the ‘out’ file which is then used for plotting. Note
that the default assumes that all labels are species names and so are interpreted with super-
scripts etc. accordingly. This behaviour can be suppressed by setting convertLabels to FALSE.
The order of species plotted and in the legend is determined from the order PUNCHed to the
selected output. FeS(ppt) is the only mineral that is allowed to form.
The script could be generalised by using tags to define the number of steps used, the mol of C
Examples 459
added and the initial solution concentrations. For example, to define just the first two of these,
the following changes could be made:
(i) add to the PhreePlot section
numericTags <steps> = 100 \
<molCadded> = 0.572e-3
(ii) change line 10 in the USER_PUNCH data block
10 addedc=step_no*<molCadded>*1e3/<steps>
(iii) change the REACTION data block
REACTION 1
CH2O; <molCadded> in <steps> steps
INCREMENTAL_REACTIONS true
END
Examples 460
SPECIATION
jobTitle “Development of redox zones (A&P, Fig 9.17)”
calculationType custom
calculationMethod 1
# just one iteration since REACTION has its own looping mechanism
resolution 1
# copy all lines in selected.out to out file
selectedOutputLines auto
PLOT
plotTitle “Development of redox zones<br>(using REAC-
TION)”
xtitle “Carbon added (mmol/L)”
ytitle “Concentration (mmol/L)”
# heading from out file (derived from selected.out)
customXcolumn C
# headings from out file (derived from selected.out)
lines O2 NO3- Mn+2 As(V) As(III) Fe+2 SO4-2 S-2 CH4
CHEMISTRY
SELECTED_OUTPUT
-reset false
-high_precision true
USER_PUNCH
headings C O2 NO3- Mn+2 Fe+2 SO4-2 S-2 CH4 As(V) As(III)
-start
10 addedc=step_no*0.572/100
20 punch addedc, 1000*tot(“O(0)”)/2, 1000*tot(“N(5)”), 1000*tot(“Mn”),
1000*tot(“Fe(2)”),\
1000*tot(“S(6)”), 1000*tot(“S(-2)”), 1000*tot(“C(-4)”), 1000*tot(“As(5)”),
1000*tot(“As(3)”)
-end
SOLUTION 1
pH 7.1
Na 1.236
K 0.041
Mg 0.115
Ca 0.067
Cl 1.467
N(5) 0.058
S(6) 0.085
As(5) 0.075
Alkalinity 0.26
O(0) 0.124
EQUILIBRIUM_PHASES
# start with some
Goethite 0 2.5e-3
# start with none
FeS(ppt) 0 0
# start with some
Pyrolusite 0 4e-5
REACTION 1
# internal looping by REACTION data block
CH2O; 0.572e-3 in 100 steps
INCREMENTAL_REACTIONS true
END
Examples 461
Examples 462
4 KdU
KdZn
KdCd
Distribution coefficient, Kd
KdU
•
2 KdZn
•
1
KdCd
•
0
2 4 6 8 10
pH
C:\PhreePlot\demo\kd\kd.ps
This example (from Appelo and Postma, 2005, Fig. 11.19) also uses the REACTION keyword to
generate a series of curves showing the variation of solid/solution partition coefficient (Kd) as
a function of pH for U, Zn and Cd.
It uses the SURF() function to get the total number of moles of each element adsorbed to a
particular mineral surface (here Hfo) and TOT() to get the total number of moles of each ele-
ment remaining in solution. Cd and Zn are also bound by ion exchange reactions on kaolin-
ite. The total bound includes both adsorbed and exchanged species so these must be added
together to calculate the Kd.
The initial solution is a sample of acid mine drainage in equilibrium with a quartz-rich sedi-
ment. This is progressively neutralized with NaOH. The trace metals are bound to Hfo and
kaolinite and the Kd’s reflect how binding to these two surfaces changes with pH. Cd and Zn
are mostly bound to kaolinite at low pH and this is modelled as a simple pH-independent cat-
ion exchange reaction. At high pH, binding to ferrihydrite becomes important. U sorption is
out-competed by other trace metals on ferrihydrite at low pH. At high pH, various negatively
charged U species dominate in solution which works against their sorption at high pH.
Examples 463
# plots the solid/solution partition coefft (Kd) for the sorption of metals by HFO
as a function of pH
SPECIATION
jobTitle “Kd’s of trace metals in neutralized AMD (A&P,
Fig 11.19)”
calculationType custom
calculationMethod 1 # 1 = calculate
and plot
resolution 1 # just one
iteration of x- and y-axis variables
selectedOutputLines auto # auto = results
will be on the last line of the selected output
PLOT
plotTitle “Kd’s of trace metals in neutralized AMD”
xtitle pH
ytitle “Distribution coefficient, Kd”
customXcolumn pH # from the out file
lines KdU KdZn KdCd # from the out
file - plot these three as lines
extraText “extratextkd.dat” # additional
text on/by plot
CHEMISTRY
SELECTED_OUTPUT
reset false
high_precision true
USER_PUNCH
headings pH KdU KdZn KdCd # these columns
of data accumulate in the out file
-start
10 IF (STEP_NO = 0) THEN 70 # don’t output
any data for plotting for initial solution calculations
20 PUNCH -la(“H+”)
30 KdU = SURF(“U”,”Hfo”)/TOT(“U”) # NB TOT(“U”)
is total dissolved U
40 KdZn = (SURF(“Zn”,”Hfo”) + mol(“ZnX2”))/TOT(“Zn”) # solid phase
= adsorbed + cation exchanged
50 KdCd = (SURF(“Cd”,”Hfo”) + mol(“CdX2”))/TOT(“Cd”)
60 PUNCH KdU,KdZn,KdCd # this outputs
the data to selected output and then the out file
70 END
-end
SOLUTION 1 AMD
-temp 10
-units mmol/kgw
pH 2.3 # analysis from
some Acid Mine Drainage
Na 23.8
K 0.1
Mg 2.0
Ca 11.6
C 1.7e-4
Cl 13
P 0.08
S(6) 52.8
Al 6.5
Cd 0.01
Fe(3) 10.7
Fe(2) 0.27
U(6) 0.18
Zn 1.5
SURFACE 1
Hfo_w 2e-3 600 0.89
Hfo_s 5e-5
-equil 1
Examples 464
EXCHANGE_SPECIES
H+ + X- = HX
log_k 1.0
-gamma 9.0 0.0
EXCHANGE 1
X 50e-3
-equil 1
REACTION 1
NaOH 1
105e-3 in 100 steps # the number of
steps controls the resolution of the plot
INCREMENTAL_REACTIONS
END
Examples 465
Examples 466
60 Cd speciation vs pH
Cd-Cl-H2O speciation vs pH
100 Cd(OH)2
Cd(OH)3-
Cd(OH)42
Cd2+
80 CdCl+
CdNO3+
CdOH+
Cd(OH)2
•
% species
60 CdOHCl
•
Cd2+
40
CdOH+•
Cd(OH)3-
•
20
2-
CdOHCl Cd(OH)4 •
CdNO3+ •
•
•
CdCl+
0
6 7 8 9 10 11 12 13
pH
C:\PhreePlot\demo\Cdspeciation\Cdspeciation.ps
Phreeqc cannot automatically generate columns headings containing the species names. This
means that it is not possible to automatically write the correct header in the ‘out’ file when
writing species that are generated automatically, for example, by the SYS() function.
However, a custom plot needs to be able to pick up the correct label names from the header
line in order to be able to label the plot properly. Communicating the species names to the
plot file therefore becomes a problem. There are two ways round this: (i) put the label names
explicitly (manually) in the -headings line of a USER_PUNCH block, or (ii) write them as a sepa-
rate data column in the ‘out’ file, i.e. as name-value pairs.
The first approach is illustrated in this example. This requires that you know which species
will be output in the first place. The SYS() function in the Cdvsph.inc file makes it easy to
output all of the species involved automatically. These are output in descending amount order
(largest amounts first) and so this order will change with pH. The species therefore need to be
sorted. This is done with the sort.inc file. The species will then always be output in ascend-
ing alphabetic order (ignoring parentheses) and the -heading list should reflect this order. It is
normally necessary to run a problem like this twice: firstly to get the species involved, and sec-
Examples 467
ondly to make the plot. This example also illustrates the use of nested include files. The mini-
mumYValueForPlotting keyword eliminates all curves which do not rise above 5%.
The next example illustrates the second approach which is normally easier to implement.
Examples 468
SPECIATION
jobTitle “Cd speciation vs pH<br>(using \
explicit \
naming of species to plot)”
calculationType custom
calculationMethod 1
xmin -13.0
xmax -6.0
# determines the number of points at which speciation is calculated
resolution 100
PLOT
plotTitle “Cd-Cl-H<sub>2</sub>O \
speciation vs pH”
xtitle pH
ytitle “% species”
pxmax 13
# explicit naming of species - order defined in user_punchCd.inc
lines Cd(OH)2 Cd(OH)3- Cd(OH)4-2 Cd+2 Cd2OH+3 \
CdCl+ CdCl2 CdCl3- CdNO3+ CdOH+ CdOHCl
lineColor “blue”
pointSize 5.0
# use first column as defined by include files - this is pH
customXcolumn 1
# this prevents minor species being plotted
minimumYValueForPlotting 5.0
extraText “extratextCdspeciation.dat”
CHEMISTRY
include ‘Cdvsph.inc’ # nested includes
Examples 469
Examples 470
%sorbed vs pH curves
(split into two PHREEQC simulations)
100
ZnT
1 10-6M
2 10-5M
80 3 10-4M
4 10-3M
5 10-2M
60
%sorbed
2
1 •
•
40
3
•
20
4
•
5
•
0
5.0 5.5 6.0 6.5 7.0 7.5 8.0
pH
C:\PhreePlot\demo\example8\pcsorption.ps
This example, based on Example 8 in the Phreeqc distribution, demonstrates the use of the
<x_axis> tag to loop over a range of pH and the loop variable to loop over a range of Zn con-
centrations. The logLoopVar has been used to transform the loop variable to 10^z. The plot
shows the percentage of Zn adsorbed as a function of pH in 0.1M NaNO3.
The <x_axis> tag and the resolution determine the range and step size for the x-axis variable
(pH). The USER_PUNCH data block produces a block of selected output for each pH-Zn combi-
nation. With the default setting of selectedOutputLines, the last line of this block of output is
copied to the ‘out’ file for plotting. A blank line is written to the ‘out’ file for each new value
of the loop variable but not for each new value of the x-axis variable. The data are therefore
plotted as a series of curves with a new curve after each change of the loop variable.
The normal legend or key has been suppressed by setting legendTextSize to zero. A new legend
has been placed in the top-left corner using a line of the extraText file. The new ‘legend’ text
has been placed on a series of lines using the continuation character, \, to concatenate lines
and give the single text string required. Note that the maximum total length of the text string,
Examples 471
including any text enhancement tags such as <sub>, is 200 characters. labels have been used to
number the curves.
Examples 472
SPECIATION
calculationType custom
calculationMethod 1
# x-axis (pH) range
xmin 5.0
xmax 8.0
# z-loop (log ZnT), one curve for each ZnT
loopMin -6.0
# from -6 to -2 in steps of +1
loopMax -2.0
loopInt 1.0
# 1 = value of loop variable is exponentiated (=10^<loop>) before use
loopLogVar 1
# number of calculations (PHREEQC simulations) for each curve
resolution 100
PLOT
plotTitle “%sorbed vs pH curves<br>(split into two PHRE-
EQC simulations)”
xtitle pH
ytitle “%sorbed”
# this variable in the ‘out’ file is plotted as a line (%sorbed is a valid column
header)
lines %sorbed
lineWidth 0.4
changeColor T
# used in order for label names on the plots
labels 1 2 3 4 5
labelSize 2.0
legendTextSize 0.0
customXcolumn pH
# adds customised legend text
extraText “extratextpcsorption.dat”
CHEMISTRY
Hfo_sOH = Hfo_sO- + H+
log_k -8.82
Hfo_wOH + H+ = Hfo_wOH2+
log_k 7.18
Hfo_wOH = Hfo_wO- + H+
log_k -8.82
PHASES
Fix_H+
H+ = H+
log_k 0.0
# first simulation
Examples 473
SELECTED_OUTPUT
-reset false
USER_PUNCH
# determines column headers in the ‘out’ file
-heading pH %sorbed sorbed
10 sorbed = SURF(“Zn”,”Hfo”)
20 totZn = SYS(“Zn”)
30 pcsorbed = 100*sorbed/totZn
40 punch -la(“H+”), pcsorbed, sorbed
END
# simulation 2 - loops on this simulation to produce the output required for graph-
ing
USE surface 1
SOLUTION 1
-units mol/kgw
pH 8.0
# ZnT
Zn <loop>
Na 0.1
N(5) 0.1 charge
EQUILIBRIUM_PHASES 1
# fixes the pH
Fix_H+ -<x_axis> NaOH 10.0
-force_equality true
END
Examples 474
-4 • Zn2+_1
Zn2+_2
Zn2+_2
Hfo_sOZn+_1
-5 Hfo_sOZn+_2 Hfo_sOZn+_2
•
Hfo_wOZn+_1
-6 Hfo_wOZn+_2
log conc (mol/kgw)
•
Hfo_wOZn+_2
-7 •
Zn2+_1
•
Hfo_sOZn+_1
-8
Hfo_wOZn+_1
•
-9
-10
-11
5 6 7 8
pH
C:\PhreePlot\demo\example8\speciation.ps
This example shows the surface speciation for Zn adsorbed to Hfo in the same system as that
of the previous example. Curves are produced for total Zn concentrations of 10-7M and 10-
4M. Adsorbed speciation is calculated by PUNCHing the log concentrations of the adsorbed spe-
cies directly. A similar plot could also be made using the ‘species plot’ procedure (see the
demo\example8 directory) with the logadsspeciesvsph.inc include file.
Since there are two loops for each species, the labelling appends an underscore and the loop
number to the species name to help to differentiate between the curves.
pxmajor has been set to one since the auto setting would produce major tick marks (and axis
labels) at every 0.5 pH unit.
The legend has been suppressed by setting the legend text size to 0 and the colour to ‘nd’ in
the <legend> line of the extraText file. It could also have omitted by setting the legendTextSize
to 0.
changeColor is by default false and useLineColorDictionary has been set to 0 (the default) so
that the default colour sequence is automatically used starting at red2, blue2 etc as given by
Examples 475
their respective positions in the lineColor list in the input file. On the second loop, the colours
are kept the same but the density is increased to 4, e.g. red4, blue4, ... .
Examples 476
SPECIATION
calculationType custom
calculationMethod 1
xmin 5.0
xmax 8.0
# minimum value of <loop> tag
loopMin -7.0
# maximum value of <loop> tag
loopMax -4.0
# increment of <loop> tag per iteration
loopInt 3.0
# 1 = antilog loop value, ie <loop> = 10^<loop>
loopLogVar 1
resolution 100
PLOT
plotTitle “Speciation of zinc sorbed on HFO”
xtitle pH
ytitle “log conc (mol/kgw)”
pxmajor 1.0
customXcolumn pH
# lines to plot from out file - headings defined below
lines Zn+2 Hfo_sOZn+ Hfo_wOZn+
lineWidth 0.6
# starting colours and colour densities
lineColor red2 blue2 green2
labelSize 1.8
trackSymbolSize 2.0
CHEMISTRY
SELECTED_OUTPUT
-reset false
-high_precision true
SURFACE_SPECIES
Hfo_sOH + H+ = Hfo_sOH2+
log_k 7.18
Hfo_sOH = Hfo_sO- + H+
log_k -8.82
Hfo_wOH + H+ = Hfo_wOH2+
log_k 7.18
Hfo_wOH = Hfo_wO- + H+
log_k -8.82
Na 0.1 charge
N(5) 0.1
USER_PUNCH
-heading pH Zn+2 Hfo_wOZn+ Hfo_sOZn+
10 punch -la(“H+”), lm(“Zn+2”), lm(“Hfo_wOZn+”), lm(“Hfo_sOZn+”)
END
5000
Initial conditions
1 g/kgw HFO equilibrated with 1 μg/kgw As
3000
As
2000 •
1000
No phosphate
0
100 200 300 400 500 600
Surface area (m2 g-1)
C:\PhreePlot\demo\surfacearea\surfacearea.ps
This example shows how the dissolved As concentration could evolve as the surface area of
HFO declines (ageing). The example demonstrates the use of user-defined tags to pass infor-
mation from one simulation to the next. An alternative approach involves using the PUT() and
GET() BASIC functions
The total amount of As is defined by the first simulation and then the adsorbed As (and any
adsorbed P) is redistributed in the second simulation assuming closed conditions (apart from
H+). The dissolved As (and P) from the first simulation is discarded and the adsorbed As redis-
tributed as the surface area decreases. It is assumed that while the surface area of the HFO
decreases, the surface properties of the HFO remain unchanged (unlikely to be true in prac-
tice).
The various tag definitions in numericTags calculate the number of sites at any particular stage
based on the given initial surface characteristics. These values are substituted in the Phreeqc
code during each iteration.
The PhreePlot looping is only over the second (final) simulation.
Examples 479
# calculates how the solution concn of As changes as the surface area of Hfo
# (but not the surface properties) is reduced in a closed system.
SPECIATION
JobTitle “Diagenesis”
calculationType custom
calculationMethod 1
xmin 10.0 # minimum surface area, see below
xmax 600.0 # maximum surface area
resolution 100
numericTags <mass> = 1 \
<molecular_wt> = 89 \
<initial_site_density_per_mol> = 0.2 \
\
<initial_surface_area> = 600 \
<initial_site_density_per_g> = \
<initial_site_density_per_mol>/<molecular_wt> \
<initial_sites> = \
<initial_site_density_per_g>*<mass> \
<site_density_per_m2> = \
<initial_site_density_per_g>/<initial_surface_area> \
<surface_area> = <x_axis> \
<sites> = \
<surface_area>*<site_density_per_m2>*<mass>
PLOT
plotTitle “As desorption as the surface area \
decreases”
xtitle “Surface area (m<sup>2</sup> \
g<sup>-1</sup>)”
ytitle “As (\mg L<sup>-1</sup>)”
pymax 5000.0 # truncate the highest values
customxColumn surface_area
lines As
lineWidth 0.6
lineColor red
legendTextSize 0.0
extraText “extratextsurfacearea.dat”
CHEMISTRY
PRINT
# -reset false
PHASES
Fix_H+
H+ = H+
log_k 0.0
SELECTED_OUTPUT
-high_precision true
-reset false
USER_PUNCH
-headings totAs totP
-start
10 totAs=SYS(“As”,n,n$,t$,c)
20 totP=SYS(“P”,n,n$,t$,c)
30 punch totAs, totP
-end
EQUILIBRIUM_PHASES 1
Fix_H+ -7.0 NaOH 10
-force_equality true
O2(g) -0.67 10
SURFACE 1
Hfo_w <initial_sites> <initial_surface_area> <mass>
-equilibrate 1
END
# second simulation - now start reducing surface area always starting from the \
initial state
USER_PUNCH
-headings surface_area As
-start
10 As=tot(“As”)*74.9216*1e6
20 punch <surface_area> As
-end
SOLUTION 1
temp 25
pH 7.0
units mol/kgw
density 1
Na 1e-2
N(5) 1e-2
As <totAs> # tag name from selected output file headings above
P <totP> # mol/kgw
-water 1 # kg
EQUILIBRIUM_PHASES 1
Fix_H+ -7.0 NaOH 10 # keep a constant pH
O2(g) -0.67 10
SURFACE 1
Hfo_w <sites> <surface_area> <mass>
END
Examples 481
Examples 482
-6
10 g/L, 0.67 mM AsT
•
•
10 g/L, 0.55 mM AsT
-7
3 6 9 12
pH
C:\PhreePlot\demo\As-cd-music\As3-shvrfig4.ps
This example shows the calculated concentration of As(III) remaining in solution after
adsorption of As(III) on goethite (98 m2/g) as a function of pH. Calculations are based on the
CD-MUSIC model and parameters of Stachowicz et al. (2006) and reproduces their Figure 4.
As(III) loadings were varied by varying the solid/solution ratio and the initial As(III) concen-
tration.
Thermodynamic data for the aqueous As species are retrieved from the ecosat.inc include
file. The arsenic species in the default database have been removed from consideration by
defining all As(III) reactions in terms of a new element, [As3]. The CD-MUSIC model is
defined in the cdmusic.inc include file. Many parameter values are set with tags in the main
input file for convenience.
pxmin and pxmajor override the default x-axis scaling which would give an x-axis ranging
from 2 to 12 with labelling every 2 units. pxmin forces the x-axis to start at 3 while pxmajor
forces the axis labelling to be every 3 pH units. Similarly pymin and pymax force the y-axis
scaling to the desired range.
The label names are derived from the loop names which themselves are defined in column 1 of
the loopfile. changeColor has been set to TRUE to ensure that the different curves of the same
data column have different colours.
Examples 483
SPECIATION
calculationType custom
calculationMethod 1
xmin 3.0
xmax 12.0
resolution 100
loopFile “loopfig4.dat”
numericTags <mass> = <loop1> \
<AsT> = <loop2>
PLOT
plotTitle “CD-MUSIC: As(III) remaining in solu-
tion<br>(after Stachowicz et al., 2006, Fig. 4)”
xtitle pH
ytitle “As(III) in solution, log (mol/L)”
pxmin 3
pxmajor 3
pymin -7
pymax -3
customxcolumn pH
lines As3
changeColor T
labelsize 1.5
extratext “extratextfig4.dat”
CHEMISTRY
include ‘cdmusic_hiemstra.dat’
SELECTED_OUTPUT
-reset false
SOLUTION 1
Temp 25
pH 2.9
units mol/kgw
# total As
As(3) <AsT> mmol/kgw
# background electrolyte
Na 1e-1
# N(5) is not thermodynamically stable with As(3)
[N5] 1e-1
USER_PUNCH
-headings pH As3
10 PUNCH -la(“H+”), log10(tot(“As”))
SURFACE 1
# sites/nm2 m2/g g
Goe_uniOHH0.5 3.45 98 <mass>
# C1 C2 (in F/m2)
-cap 0.85 0.75
Goe_triOH0.5 2.7
-cd_music
-sites_units density
EQUILIBRIUM_PHASES 1
# to ensure all As(3)
O2(g) -70
Fix_H+ -<x_axis> NaOH
-force_equality true
END
Examples 484
-3
0.5 mM As(V)
0.1M NaNO3
As(V) in solution, log (mol/L)
-4
3 g/L
•
-5
5 g/L
•
-6 10 g/L
•
-7
3 5 7 9 11
pH
C:\PhreePlot\demo\As-cd-music\As5-shvrfig6.ps
This is similar to the previous example except it is for the adsorption of As(V) rather than
As(III). The figure shows the calculated amount of As(V) remaining in solution after adsorp-
tion on goethite (98 m2/g) as a function of pH. The calculated curves were based on the CD-
MUSIC model and the parameters of Stachowicz et al. (2006). This figure replicates the cal-
culated curves of their Fig. 6.
Examples 485
SPECIATION
calculationType custom
calculationMethod 1
xmin 3.0
xmax 12.0
resolution 100
# defines <loop1> and <loop2> tags for mass and AsT
loopfile “loopfig6.dat”
numericTags <mass> = <loop1> \
<AsT> = <loop2>
PLOT
plotTitle “CD-MUSIC: As(V) remaining in solution (3
species)<br>(after Stachowicz et al., 2006, Fig. 6)”
xtitle pH
ytitle “As(V) in solution, log (mol/L)”
# plot limits
pxmin 3
pxmax 12
pymin -7
pymax -3
# column name from selected output file: see below
customxcolumn pH
# ibid
lines As5
changeColor T
# removes legend (key) from plot
legendTextSize 0
# additional text for plot
extratext “extratextfig6.dat”
CHEMISTRY
SELECTED_OUTPUT
-reset false
SOLUTION 1
Temp 25
pH 3
units mol/kgw
As(5) <AsT> mmol/kgw
Na 1e-1
N(5) 1e-1
# the results here differ slightly from the published ones due to small differences
in the databases used
# note particularly the sensitivity of the 3 g/L curve at low pH
include ‘cdmusic_hiemstra.dat’
USER_PUNCH
# column names used above
-headings pH As5
10 PUNCH -la(“H+”), log10(tot(“As”))
SURFACE 1
# sites/nm2 m2/g g
Goe_uniOHH0.5 3.45 98 <mass>
# C1 C2 (in F/m2)
-cap 0.85 0.75
Goe_triOH0.5 2.7
-cd_music
-sites_units density
EQUILIBRIUM_PHASES 1
Fix_H+ -<x_axis> NaOH
-force_equality true
# As(5) please
O2(g) -0.67
Examples 486
END
Examples 487
Examples 488
8I
PO2(g) or PCO2(g) (%)
6
O (g)
I
• 2
4
I
I J J
2 CO2(g)
•
J J
I J
J
J I I
I
0J
0 2 4 6 8 10 12 14
Time ( /102 hours)
C:\PhreePlot\demo\pyritekinetics\pyritekinetics.ps
This example shows the kinetics of the oxidation of pyrite from Appelo and Postma (2005), p
455-456, Fig. 9.28 (the calculated O2(g) curve here does not quite agree with A&P’s because
of small changes in the Phreeqc.dat database used).
The resolution only has to be set to 1 since the KINETICS data block has an internal looping
mechanism (like REACTION) which produces a multi-lined selected output ‘file’. selectedOut-
putLines has therefore been set to auto so that all the lines in the selected output are picked
up.
The calculated points are plotted as a continuous curve using the lines keyword with two vari-
able (column) names, namely O2(g) and CO2(g). These names are defined in the USER_PUNCH
headings line and are automatically passed through to the ‘out’ file which is then used for the
plotting.
The data points are plotted using an extra file. legendTextSize has been set to 0 to eliminate
the legend. The Times-Roman font has been selected with the font keyword.
The x-axis scaling and title includes a scaling factor (x102) which indicates that the true scale
actually varies from 0–1400 hours.
Examples 489
SPECIATION
jobTitle “Pyrite oxidation kinetics, A&P (2005) p 455-6”
database phreeqc.dat
calculationType custom
calculationMethod 1
# only need to do one calculation as KINETICS block has its own looping
resolution 1
# multiline selected.out so copy all the lines produced into the out file
selectedOutputLines auto
PLOT
plotTitle “Pyrite oxidation kinetics<br>(Appelo and
Postma, 2005)”
xtitle “Time (“ “ hours)”
ytitle “<i>P</i><sub>O2(g)</sub> or <i>P</
i><sub>CO2(g)</sub> (%)”
# fix upper limit of y-axis
pymax 9
# omit legend
legendTextSize 0.0
# from out file
customXcolumn Time
# modelled results - labels from USER_PUNCH block -> out file
lines CO2(g) O2(g)
# plot experimental data points
extraSymbolsLines “pyritekineticsdata.dat”
CHEMISTRY
SELECTED_OUTPUT
-reset false
-high_precision true
USER_PUNCH
# defines column heading in out file
-headings Time CO2(g) O2(g)
-start
10 PUNCH total_time/3600
20 PUNCH 100*10^si(“CO2(g)”), 100*10^si(“O2(g)”)
-end
RATES
# the kinetic model
Pyrite
-start
1 A=15e3*m0
10 if SI(“Pyrite”)>0 then goto 100
20 fH=mol(“H+”)
30 fFe2=(1+tot(“Fe(2)”)/1e-6)
40 if mol(“O2”)<1e-6 then goto 80
# rate with oxygen
50 rO2=10^-8.19*mol(“O2”)*fH^-0.11
60 rO2_Fe3=6.3e-4*tot(“Fe(3)”)^0.92*fFe2^-0.43
70 goto 90
80 rem
# rate without oxygen
81 rFe3=1.9e-6*tot(“Fe(3)”)^0.28*fFe2^-0.52*fH^-0.3
90 rate=A*(m/m0)^0.67*(rO2+rO2_Fe3+rFe3)*(1-SR(“Pyrite”))
# must include this
100 save rate*time
-end
SOLUTION_SPECIES
# force one way - dissolved N2(g) does not make nitric acid!
2NO3- + 12H+ + 10e- = N2 +6H2O; log_k 500
SOLUTION 1
# kg
-water 0.0069239
-temp 20
Examples 490
EQUILIBRIUM_PHASES
Goethite 2; Calcite 0; Gypsum 0 0
GAS_PHASE 1
-fixed_pressure
-volume 0.02127; temp 20
CO2(g) 0.0025; O2(g) 0.0817; N2(g) 0.9157
KINETICS 1
Pyrite; -m0 1.32e-4; -step 0 5e5 5e5 5e5 5e5 5e5 5e5 5e5 5e5 5e5 5e5
INCREMENTAL_REACTIONS true
END
Examples 491
Examples 492
0.12
0.10
0.08
Si (mmol/kgw)
0.06
0.04
Rate equation:
0.02 dQtz/dt = -k * (1 - ΩQuartz)
k = 10-13.7 mol/m2/s (25 C)
0.00
0 1 2 3 4 5
Time (year)
C:\PhreePlot\demo\kineticsSi\kineticsSi.ps
This example demonstrates how a single iteration of the KINETICS data block generates a mul-
tiline selected output file which is read in with selectedOutputLines set to auto.
The label in the plot and the key to the right of the plot have been suppressed with labelSize
and legendTextSize both set to 0.
The extraText file also includes the use of various text enhancements – italics, subscripts,
superscripts and a Greek character.
Examples 493
# plot of the dissolution of quartz vs time based on the PHREEQC kinetics model
SPECIATION
calculationType custom
calculationMethod 1
selectedOutputLines auto
PLOT
plotTitle “Kinetics of quartz dissolution<br>(from Appelo
‘Get-going’ sheet 11)”
xtitle “Time (year)”
ytitle “Si (mmol/kgw)”
# plot x = time
customXColumn time
# plot y(line) = Si
lines Si
linecolor blue
linewidth 0.6
# suppresses label
labelSize 0
# suppresses key
legendTextSize 0
numericTags <log_k> = -13.7
# additional text (including some Greek symbols)
extraText extratextkinetics.dat
CHEMISTRY
# Kinetics of quartz dissolution
# from Appelo ‘Get-going sheet #11’
RATES
#1 dQu/dt = -k * (1 - SR(Quartz). k = 10^-13.7 mol/m2/s (25 C)
#2 parm(1) = A (m2), parm(2) = V (dm3) recalculate to mol/dm3/s
# rate name
Quartz
-start
10 moles = parm(1) / parm(2) * (m/m0)^0.67 * 10^<log_k> * (1 - SR(“Quartz”))
# integrate. save and time must be in rate definition
20 save moles * time
# moles count positive when added to solution
-end
# Sediment: 100% qu, grain size 0.1 mm, por 0.3, rho_qu 2.65 kg/dm3
KINETICS
# rate name
Quartz
-formula SiO2
# initial moles of quartz
-m0 102.7
# parameters for rate eqn. Here:
-parms 22.7 0.162
# Quartz surface area (m2/kg sediment), water filled porosity (dm3/kg sediment)
SOLUTION 1
SELECTED_OUTPUT
-reset FALSE
USER_PUNCH
# these are accumulated in the out file ready for plotting
-heading time Si SIQtz
Examples 494
-start
10 IF (step_no>0) THEN punch total_time/3.1536e7, tot(“Si”)*1e3, SI(“Quartz”)
-end
END
Examples 495
Examples 496
0 1 2 3 4 5 6 7 8 9
# % ∗ + − . ? ⊥ _
10 11 12 13 14 15 16 17 18 19
⎯ | ′ ≤ ♣ ♦ ♥ ♠ ↔ ←
20 21 22 23 24 25 26 27 28 29
↑ → ↓ ∼ ©
30 31 32 33 34 35 36 37 38 39
Ê w v u
40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57
i
60 61 62 63 64 65 66 67 70 71 72 73 74 75 76 77
! " # $ % & ' ( ) *
100 101 102 103 104 105 106 107 110 111 112 113 114 115 116 117
+ , - . / 0 1 2 3 4 5 6 7 8 9 :
120 121 122 123 124 125 126 127 130 131 132 133 134 135 136 137
; < = > ? @ A B C D E F G H I J
140 141 142 143 144 145 146 147 150 151 152 153 154 155 156 157
Ë K Ì L M N O Q R S T a b c d
160 161 162 163 164 165 166 167 170 171 172 173 174 175 176 177
200 201 202 203 204 205 206 207 210 211 212 213 214 215 216 217
220 221 222 223 224 225 226 227 230 231 232 233 234 235 236 237
e f g h j k l p o n m x y z {
240 241 242 243 244 245 246 247 250 251 252 253 254 255 256 257
| } ~
260 261 262 263 264 265 266 267 270 271 272 273 274 275 276 277
300 301 302 303 304 305 306 307 310 311 312 313 314 315 316 317
¡ £ ¤ Ä ¥ À ¦ § ¨ © ª
320 321 322 323 324 325 326 327 330 331 332 333 334 335 336 337
« ¬ ¢ ® ¯ ° ± ² ³ Á ´ Ç µ È ¶
340 341 342 343 344 345 346 347 350 351 352 353 354 355 356 357
É · ¸ Å ¹ Â Æ º Ã » ¼ ½ ¾ ¿
360 361 362 363 364 365 366 367 370 371 372 373 374 375 376 377
C:\PhreePlot\demo\symbols\symbols.ps
This example does no geochemistry but simply plots a grid of symbols with their codes. The
symbols are defined on an invisible grid in the extraSymbolsLines file called symbols.dat
while the code numbers printed below are defined in the extraText file called extratextsym-
bols.dat.
The surrounding box is drawn with four gray lines specified at the end of the extra file.
axisNumberSize and axis have been set to 0 to suppress the plotting of the axis numbering and
the axis lines.
Examples 497
SPECIATION
calculationType custom
calculationMethod 1
PLOT
# make bigger
plotfactor 2
xaxislength 90
yaxislength 110
units “mm”
plotTitle “Symbols, dingbats and lines”
# it should not look like an x-y plot
xtitle “”
ytitle “”
# plot area large enough not clipped gray border
pxmin -2
pxmax 17
pxmajor 1
pxminor 1
pymin -100
pymax 120
pymajor 10
pyminor 5
xoffset 7.5
yoffset 10
tickSize 0
axisNumberSize 0
axisLineWidth 0
# contains the list of symbols and their positions etc
extraSymbolsLines “symbols.dat”
# number the positions
extraText “extratextsymbols.dat”
# gridlines t
# axislinewidth 0.05
Examples 498
2.0
•
SIAl(OH)3(a)*
0
concentration (mmol kgw-1)
1.5
• -2
SIfluorite*
Saturation index
1.0 SIcalcite*
•
AlT -4
•
Ca
0.5 •
• -6
Ca(HCO3)2
Alk
•
0.0 -8
-0.5 -10
5.0 5.5 6.0 6.5 7.0 7.5 8.0
pH
C:\PhreePlot\demo\symbols\plotsymbols.ps
This example demonstrates how different lines and sets of points of custom plots can have dif-
ferent attributes associated with them. Some acidic, Al-F-containing water is titrated with
Ca(HCO3)2. Eight variables are PUNCHed to the selected output. pH is used as the x-axis and
the other variables are plotted on the y- and 2y-axes according to the lists given in points, lines
and lines2y. Attributes are pulled off the associated lists (pointColor, pointType, pointSize
etc.) until exhausted in which case the list is automatically extended (colours) or recycled
(other attributes). There is a default sequence of 15 colours (red, blue, green, orange, cyan,
magenta, brown, sky, purple, gray, yellow, maroon, lawn, spring, black) for each type of list
(points and lines, y and 2y axes). These lists are rearranged according to the individual input
colour lists which effectively promote their members to the top of the respective sequence. If
there are more than one subsets of data, the colour density is cycled (not here).
The attributes chosen for a particular dataset depend on the position of that dataset in the
input list. For example, Alk is third in the points list so will pick up the third pointColor, third
pointType, third pointSize, and so on. Symbol types are defined either by number (see the
preceding Example) or name (see Appendix 3). The first six symbols can have a separate rim-
Color. The width of the rim is defined in terms of the fraction of the overall symbol width
(rimFactor). Dashed lines are signified by negative line widths and here are on the 2y axis (*).
Examples 499
This is the basic method of assigning attributes. Colour selection can be modified from this by
using changeColor, pointsSameColor and restartColorSequence. The colours and other attrib-
utes can also be set using the line colour dictionary and ensuring its use with lineColorDic-
tionary 1 or 2.
Examples 500
# demonstrates the use of different symbols, colours and line types in a plot.
SPECIATION
calculationMethod 1
calculationType custom
xmin 5
xmax 8
resolution 20
PLOT
xtitle pH
ytitle “concentration (mmol kgw<sup>-1</sup>)”
2ytitle “Saturation index”
# this is used as the x-axis
customXcolumn pH
p2ymax 1
# these will be plotted as points
points Ca(HCO3)2 Al<sub>T</sub> Alk Ca
# these will be plotted as lines
lines Ca(HCO3)2 Al<sub>T</sub> Alk Ca
lines2y SI<sub>calcite</sub> SI<sub>fluorite</sub> SI<sub>Al(OH)3(a)</
sub>
# symbols to use in sequence for ‘points’ datasets, recycled
pointType 1 2 6
# colors to use in sequence for ‘points’
pointColor gray2 green2 red2 sky2
# size of symbols, recycled
pointSize 3
# explicit rim color for first 2 datasets then recycle
rimColor black green6
# fractional rim width, recycled
rimFactor 0.08
# colors to use in sequence for ‘lines’
lineColor black green6 red blue
# colors to use in sequence for ‘lines2y’ then auto sequence
lineColor2y purple brown6
# line width to use for ‘lines2y’, negative for dashed, recycled
lineWidth2y -0.4
changecolor f
CHEMISTRY
PHASES
Fixed_H+
H+ = H+
log_k 0.
SOLUTION
-units mmol/kgw
pH 4.5
Al1
F2
Cl3 charge
SAVE solution 1
END
USE solution 1
EQUILIBRIUM_PHASES
Fixed_H+ -<x_axis> Ca(HCO3)2
Al(OH)3(a) 0 0
Fluorite 0 0
Calcite 0 0
CO2(g) -3.5
Examples 501
SELECTED_OUTPUT
-reset FALSE
USER_PUNCH
-headings Ca(HCO3)2 pH Al<sub>T</sub> Alk Ca SI<sub>calcite</sub> SI<sub>fluo-
rite</sub> SI<sub>Al(OH)3(a)</sub>
10 IF (STEP_NO = 1) THEN PUNCH (10-EQUI(“Fixed_H+”))/TOT(“water”)*1e3, -la(“H+”),
TOT(“Al”)*1e3, \
Alk*1e3, TOT(“Ca”)*1e3, SI(“Calcite”), SI(“Fluorite”), SI(“Al(OH)3(a)”)
END
Examples 502
70 Text
k
45
123123
ea
:
123123
su
br
sup
p su
κ
italicsboldΓρεεκSingle
εε
b
su ub
γρ
s
p it
ke
al
re
ic
sub subitalicsboldΓρεεκSingle
G
sb
e
ol
gl
dΓ
n
k Si
sup sup
0: sub subitalicsboldΓρεεκSingle
ea εκ εbreak
180:
ρ
break
sup sup
dΓ
in
break
gl
ol
e
sb
G
ic
re
al
ek
Greek γρεεκ break
b it
su p
b su
γρ
εε
su
κ
p
sup
su
br
ea
5:
-4
C:\PhreePlot\demo\symbols\text.ps
This example also does no geochemistry but demonstrates some of the capabilities of justify-
ing and rotating text as well as enhancing it with subscripts and superscripts and Greek charac-
ters and text. These are all defined in the extraText file extratexttext.dat.
The light yellow background colour has been set with the backgroundColor setting. It only
occupies the ‘plot’ area.
Examples 503
SPECIATION
calculationType custom
calculationMethod 1
PLOT
backgroundColor “yellow0”
plotTitle “<b>Text: demonstrating <i>justification</i>,
<i>orientation</i> and <i>character sets</i></b>”
# not supposed to look like an x-y plot
xtitle “”
ytitle “”
xoffset 60
pxmin -2.0
pxmax 12.0
pxmajor 1.0
pymin -20.0
pymax 100.0
pymajor 10.0
tickSize 0.0
axisNumberSize 2
axisLineWidth 0.05
pointSize 0.0
# file containing special text
extraText “extratexttext.dat”
gridlines T
gridlinecolor gray4
font Bookman
# font Latin-1
CHEMISTRY
Examples 504
PhreePlot does not have to be used to produce plots. It also provides a simple way of looping
around a Phreeqc input file automtically substituting a different value during each iteration.
The input file in demo\Phreeqc_looping\Fespecies demonstrates this. It speciates a trace Fe-
containing solution that is adjusted to various pHs. It is split into two simulations so that the
initial solution calculations can be omitted from the PRINT output.
The pH is generated from xmin, xmax and resolution. There are always resolution iterations
of PhreePlot during looping of the x or y axes. Hence with xmin = -10, xmax = -4 and resolu-
tion = 3, the x-values of -10, -7 and -4 will be generated. These values are automatically asso-
ciated with the <x_axis> tag which is used in the penultimate line of code to ‘fix’ the pH.
USE solution 1
PRINT
-equilibrium_phases true
-species TRUE
EQUILIBRIUM_PHASES
Fe(OH)3(a) 0 0
Fix_H+ <x_axis> NaOH
END
and the output from the three iterations of Phreeqc are accumulated in *.all which, when
using the wateq4f.dat database looks like this:
------------------------------------
Reading input data for simulation 1.
------------------------------------
PRINT
reset FALSE # don't output initial solution calculation
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
----------------------------Distribution of species----------------------------
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
----------------------------Distribution of species----------------------------
-------------------------------Phase assemblage--------------------------------
Moles in assemblage
Phase SI log IAP log KT Initial Final Delta
----------------------------Distribution of species----------------------------
The output for pH 10, 7 and 4 shows that Fe(OH)3(a) is precipitated at pH 10 and 7 but not
at pH 4.
More flexible control of the <loop> variable can be had by reading in the values from a file
using the loopFile keyword. The FespeciesLoopFile.ppi example in the demo directory pro-
vides an example of this approach.
Examples 507
Examples 508
By default and for good reason, Phreeqc does not automatically precipitate all minerals for
which the saturation index exceeds zero. Nor is it possible easily to encourage it to do so. The
mineral species must be explicitly included in an EQUILIBRIUM_PHASES block. The actual min-
eral species that need to be considered will depend on the database being used (even the name
of the same mineral species can vary between databases).
The following input file from demo\Phreeqc_minerals\FeZnminerals demonstrates how a list
of all possible minerals can be created in the normal Phreeqc output file and used for pasting
into the input file. The printphases.inc include file is used. This makes use of the Phreeqc
SYS() function for enquiring about the status of the system:
PRINT
reset false
-------------------User print-------------------------
#Fe(OH)2.7Cl.3 0 0
#Halite 0 0
#Goethite 0 0
#Hematite 0 0
#Fe(OH)3(a) 0 0
#Magnetite 0 0
Examples 509
#Zincite(c) 0 0
#ZnO(a) 0 0
#Zn(OH)2-e 0 0
#Zn(OH)2-g 0 0
#Zn(OH)2-b 0 0
#Zn(OH)2-c 0 0
#Zn(OH)2-a 0 0
#ZnCl2 0 0
#Maghemite 0 0
#Zn2(OH)3Cl 0 0
#Fe3(OH)8 0 0
#ZnMetal 0 0
#Zn5(OH)8Cl2 0 0
The output for the minerals given above can be pasted into an input file and the required min-
erals un-commented. ‘0 0’ indicates that the mineral should precipitate when the saturation
index exceeds 0 (first 0) but will not dissolve since the initial abundance is 0 (second 0) in all
cases.
Therefore in order to find out all the possible mineral species in your system, edit the SOLU-
TION block of this file to include the components of interest, rename and run. Then look at
the Phreeqc.out file.
Examples 510
Species plots
It is often useful to know the relative abundance of all the chemical species in a system. ‘spe-
cies’ plots are a special type of custom plot that produce plots of the distribution or abun-
dance of all the species for a particular element as a function of some master variable, often set
to pH.
There are two variants of this plot in PhreePlot, one produces a percentage distribution and
the other plots the log concentration. While these plots could be produced using the normal
custom plot approach, the species plot approach does not require any prior knowledge of the
names of the species present and is therefore usually easier to setup.
Examples 511
Examples 512
Cd speciation
(using speciesvsph.inc)
Cd2+
Cd2+ Cd(OH)2 CdCl+
80 CdNO3+
CdOH+
Cd(OH)2
Cd(OH)3-
Cd(OH)42-
60 CdOHCl
% in species
Cd(OH)3-
40
CdOH+
20
CdNO3+ CdOHCl
CdCl+
0
Cd(OH)42-
6 8 10 12
pH
C:\Program Files\PhreePlot\0.01\demo\Cdspeciation(species1)\Cdspeciation(species1).ps
This produces similar output to the previous example but uses the ‘species’ calculationType to
label the curves automatically. It uses the species-value paired output approach.
A speciesplot automatically generates a % species versus pH plot. This is a special type of
custom plot in which PhreePlot expects the ‘out’ file to contain a succession of species name-
%distribution pairs. It ignores any headings. Rather it gets the species name from the preceding
column. It also expects the x-axis variable to be sent as the first pair of values. This is pH in this
example but by changing the include file, any variable can be used.
The speciesvsph.inc include file specifies the ‘out’ or plot file. Pure phases (assumed to be
mineral species) are appended with ‘(s)’ to distinguish them from aqueous species.
In order to generate the above type of plot, it is necessary to specify: (i) “species” as the plot
type; (ii) a main species, here ‘Cd’; (iii) an initial chemistry and any equilibrium phases, and (iv)
the x-axis variable and its range. It is also necessary to indicate with an <x_axis> tag how the x-
axis variable changes the chemistry (here pH) and point customXcolumn to the pH column.
If any of the following plot titles are blank, they are set as follows: (i) xtitle = name accompany-
ing the x-axis value (position defined by customXcolumn); (ii) ytitle = “% species”, and (iii)
plotTitle = “Distribution of <mainspecies> with <xtitle>” where the angle brackets indicate the
substitutions to be made. To omit, set the appropriate colour to ‘nd’.
Examples 513
SPECIATION
jobTitle “Speciation vs pH using ‘species’ plot \
type”
calculationType species
calculationMethod 1
mainSpecies Cd
# logH range
xmin -13.0
xmax -6.0
resolution 100
PLOT
plotTitle “Cd speciation<br>(using \
speciesvsph.inc)”
# x-axis value is the second column - the first column is ‘pH’ (see out file)
customXcolumn 2
# default is 14
pxmax 13
# eliminates minor species
minimumYValueForPlotting 5.0
legendTitle “Cd species”
extraText “extratextCdspeciation.dat”
CHEMISTRY
# contains the logic for outputting the expected x-axis, y-axis (%distr) pairs
# expected by ‘species’ plot type
include ‘speciesvsph.inc’
PHASES
Fix_H+
H+ = H+
log_k 0.0
SOLUTION 1
temp 25
pH 7
units mol/kgw
density 1
Cd 1e-4
Cl 2e-3
Na 0.1
N(5) 0.1 charge
END
USE solution 1
EQUILIBRIUM_PHASES
O2(g) -0.677 0.1
Fix_H+ <x_axis> NaOH 10
-force_equality true
END
Examples 514
Cd2+ Cd(OH)2
CdNO3+ • •
-5 • •
log concentration (mol/kgw)
CdCl+ CdOH+
•
•
CdOHCl •
Cd2OH3+
•
-10 CdCl2
•
• CdCl3-
Cd(OH)3-
•
-15 Cd(OH)42-
Cd2+
Cd2OH3+
CdCl+
CdCl2
-20 CdCl3-
CdNO3+
CdOH+
Cd(OH)2
-25 Cd(OH)3-
Cd(OH)42-
CdOHCl
-30
6 7 8 9 10 11 12 13
pH
C:\PhreePlot\demo\Cdspeciation(log)\Cdspeciation(logspecies)_Cd.ps
This is a variant of the previous example but plots the log of the species concentrations vs pH
rather than the %distribution. This change is made entirely within the include file which con-
trols the values sent to the ‘out’ file.. The include file has been changed to output log concen-
trations (see logspeciesvspH.inc) and ytitle has been given explicitly to override the default
‘% species’ title.
The size of the legend (key) text has been reduced using legendTextSize and its placement has
been set in the extraText file.
Examples 515
Examples 516
100 UO22+
log P O2 = -0.7 atm (UO2)3(OH)5+
log P CO2 = -3.5 atm UO2CO3
UO2(CO3)22-
80 UO2(CO3)34-
UO2OH+
• UO2(OH)3-
% in species
UO2(CO3)34-
60
UO2(CO3)22-•
UO 2+
• 2
40 UO2OH+
•
20
UO2CO3 UO (OH)3-
• • 2
(UO2)3(OH)5•+
0
3 4 5 6 7 8 9 10
pH
C:\PhreePlot\demo\Uspeciation\Uspeciationox_U.ps
Another example of a ‘species’ plot. Oxidising conditions have been maintained by equilibrat-
ing with a high partial pressure of oxygen. This is set by the <pO2> tag. Similarly the CO2(g)
partial pressure is set with the <pCO2> tag.
The U speciation is dominated by U(VI) species under these conditions. Note the carbonate
species at high pH.
useLineColorDictionary has been set to 1 to force the colour dictionary (linecolor.dat) to
be read. This is where the colour of each of the lines is defined.
The minimumYValueForPlotting has been set to 5% so that minor species are not plotted.
The labelSize has been set to 1.5 mm. The label anchors shown as red dots by each of the
labels can be removed by setting trackSymbolColor to ‘nd’.
Examples 517
SPECIATION
jobTitle “Speciation vs pH using ‘species’ plot type”
calculationType species
calculationMethod 1
mainSpecies “U”
xmin 3.0
xmax 10.0
resolution 100
numericTags <pCO2> = “-3.5” \
# atmospheric PO2
<pO2> = “-0.677”
PLOT
plotTitle “U speciation vs pH (oxidizing condi-
tions)<br>(using speciesvsph.inc)”
pxmin 3.0
pxmajor 1.0
labelSize 1.5
# only plot species with max(conc)>5%
minimumYValueForPlotting 5.0
extraText “extratextUspeciation_ox.dat”
CHEMISTRY
PHASES
Fix_H+
H+ = H+
log_k 0.0
SELECTED_OUTPUT
# omit all default output
-reset false
SOLUTION 1
temp 25
pH 7
pe 4
units mol/kgw
# total U
U 1e-6
# background electrolyte
Cl 0.01
Na 0.01
END
100 •
UO2+
log P O2 = -70 atm U(OH)4 UO22+
log P CO2 = -3.5 atm UO2(CO3)34
U(OH)22+
80 U(OH)3+
U(OH)4
% in species
60 UO +
• 2
UO2(CO3)34-•
40
20
U(OH)3+
•
UO 2+ 2+
• 2 •U(OH)2
0
3 4 5 6 7 8 9 10
pH
C:\PhreePlot\demo\Uspeciation\Uspeciationred_U.ps
This is similar to the previous plot but <pO2> has been set to a low oxygen fugacity log PO2(g)
= -70. Most of the plotted species are U(IV) species but UO2(CO3)34- is a U(VI) species and
UO2+ is a U(V) species.
It would be necessary to go to an even lower <pO2> value (-75) to ensure that no U(VI) species
are plotted.
Examples 519
SPECIATION
jobTitle “Speciation vs pH using ‘species’ plot type”
calculationType species
calculationMethod 1
mainSpecies “U”
xmin 3.0
xmax 10.0
resolution 100
numericTags <pCO2> = “-3.5” \
# quite strongly reducing
<pO2> = “-70”
PLOT
plotTitle “U speciation vs pH (reducing condi-
tions)<br>(using speciesvspH.inc)”
pxmin 3.0
pxmajor 1.0
labelSize 1.5
# only plot species with max(conc)>5%
minimumYValueForPlotting 5.0
extraText “extratextUspeciation_red.dat”
CHEMISTRY
PHASES
Fix_H+
H+ = H+
log_k 0.0
SELECTED_OUTPUT
# omit all default output
-reset false
SOLUTION 1
temp 25
pH 7
pe 4
units mol/kgw
# total U
U 1e-6
# background electrolyte
Cl 0.01
Na 0.01
END
77 Carbon speciation vs pH
This uses a ‘species’ plot to show the variation in carbon species with pH in an oxidising
environment. It uses the ‘speciesvspH.inc’ include file and so plots % in species vs pH.
The Phreeqc output is accumulated in ‘species name, species concentration’ pairs, one line per
pH. The order of the species output is based on decreasing C concentration (i.e. highest con-
centration first) and so the order changes as the pH changes. Because it is a ‘species’ plot,
PhreePlot expects this type of paired output and sorts the data so that the column positions
for all species are fixed. This enables them to be plotted.
With the given include file and input file setup, the first column is defined as the x-axis varia-
ble and so the value of customXcolumn is ignored.
C speciation vs pH
using speciesvsph.inc
100 CH4
log C(4)T= 1e-1 mol/kgw CO2
CO32-
HCO3-
80 NaCO3-
NaHCO3
% in species
60
•
HCO3-
•
CO32-
40 NaCO3-
•
CO2
•
20
NaHCO3
•
CH4
0 •
2 4 6 8 10 12 14
pH
C:\PhreePlot\demo\carbonspeciation\carbonspeciationvsph(species1)_C.ps
Examples 521
SPECIATION
# plot %C species vs pH
calculationType species
calculationMethod 1
mainSpecies C
# controls the range of pH plotted
xmin 2
xmax 13
# controls the number of points on each curve
resolution 100
PLOT
plotTitle “C speciation vs pH<br>using \
speciesvsph.inc”
extraText “extratextcarbonspeciation.dat”
# pxmax 13
CHEMISTRY
# this file exports the required x-axis(pH), y-axis (%) value pairs. Edit as
# required.
include ‘speciesvsph.inc’
PHASES
Fix_H+
H+ = H+
log_k 0.0
SOLUTION 1
# carbonate speciation at least depends on temperature
temp 10
pH 7
units mol/kgw
# total C
C(4) 1e-1 as HCO3
# background electrolyte
Na 0.1 charge
Cl 0.1
END
USE solution 1
EQUILIBRIUM_PHASES
Fix_H+ -<x_axis> NaOH 10
-force_equality true
END
Examples 522
-6
10 g/L, 0.67 mM AsT
•
•
10 g/L, 0.55 mM AsT
-7
3 6 9 12
pH
C:\PhreePlot\demo\As-cd-music\As3-shvrfig4.ps
This figure shows the surface speciation of As(V) adsorbed on goethite as a function of pH.
The calculated curves were based on the CD-MUSIC model and the parameters of Stachow-
icz et al. (2006). This figure replicates the calculated curves of their Fig. 7 for one of the three
surface loadings (1.70 µm/m2, 3 g/L) studied. The input file generates plots for the other two
surface loadings as separate files and the extraText file picks off the appropriate text based on
the plot number.
In the other plots, the contribution of several of the species is everywhere less than 10%.
These curves could be omitted by setting the minimumYValueForPlotting setting to 10.
Examples 523
SPECIATION
# plot all As species f(pH) including adsorbed species
calculationType species
calculationMethod 1
#
mainSpecies “As”
xmin 3.0
xmax 12.0
# controls the number of points at which speciation is calculated
resolution 100
# defines <loop1> and <loop2> which are used below
loopFile “loopfig7.dat”
numericTags <AsT> = <loop1> \
<mass> = <loop2>
PLOT
plotTitle “CD-MUSIC: As(V) surface speciation<br>(after
Stachowicz et al., 2006, Fig. 7)”
xtitle pH
# 2nd column in selected output created by adsspeciesvsph.inc
customxcolumn 2
# plot xmin
pxmin 3
labelSize 1.5
# can be used to omit plotting of species that are always below this value
minimumyvalueforplotting 0.1
# here the As(3) species
extratext “extratextfig7.dat”
# turn off legend to the right of the plot
legendTextSize 0
CHEMISTRY
# this controls exactly what is plotted (see the system directory for the file)
include ‘adsspeciesvsph.inc’
# must ‘punch’ x-axis, y-axis pairs
SELECTED_OUTPUT
-reset false
SOLUTION 1
Temp 25
pH 2.9
units mol/kgw
# total As(5) concn
As(5) <AsT> mmol/kgw
# background electrolyte
Na 1e-1
# N(5) only stable in oxidising environments
N(5) 1e-1
include ‘cdmusic_hiemstra.dat’
#
# Arsenate - these are the actual figures used in the SHR2006 paper and change the
speciation from the above database slightly
#
SURFACE_SPECIES
PHASES
Fix_H+; H+ = H+ ; log_k 0
SURFACE 1
# sites/nm2 m2/g g
Goe_uniOHH0.5 3.45 98 <mass>
# C1 C2 (in F/m2)
-cap 0.85 0.75
Goe_triOH0.5 2.7
-cd_music
-sites_units density
EQUILIBRIUM_PHASES 1
Fix_H+ -<x_axis> NaOH
-force_equality true
O2(g) -0.67
END
Examples 525
Examples 526
Fe-H2O species vs pH
(using logspeciesvsph.inc)
0 Fe2+
Fe3+
Fe2(OH)24+
• FeOH2+ Fe3(OH)45+
log concentration (mol/kgw)
Fe(OH)3
•
Fe(OH)2 +•
FeCl2+
-10 • FeCl2+
Fe2+ •
Fe3+
• FeCl3
FeCl3 •
• FeCl2+ FeOH2+
Fe(OH)4- •
FeCl2+
Fe(OH)2+
-20 Fe(OH)3
• Fe(OH)4-
Fe2(OH)24+•
Fe3(OH)45+
-30
-40
2 4 6 8 10 12
pH
C:\PhreePlot\demo\testplotformats\testplotformats_Fe.ps
This example is primarily to demonstrate how plot files can be created in different formats: ps,
eps, epsi, jpg, pdf and ai. The conversions from the native ps format are all carried out by
Ghostscript and so can only be produced if Ghostscript is properly installed and the pdf-
Maker setting is pointing to a valid directory and file.
The example shows a species distribution plot for aqueous Fe species in the Fe-Cl-H2O system
as a function of pH.
The minimumYValueForPlotting has been set to -10 to eliminate minor species from the plot.
Examples 527
SPECIATION
jobTitle “log speciation vs pH using ‘species’ plot type”
# plots concn/% of all species containing the main species
calculationType species
calculationMethod 1
mainSpecies Fe
xmin -12.0
xmax -2.0
resolution 100
minimumYValueForPlotting -10
pdf T
png T
epsi T
jpg T
eps T
PLOT
plotTitle “Fe-H<sub>2</sub>O species vs pH<br>(using logspeciesvsph.inc)”
CHEMISTRY
# this controls exactly what is plotted (see the system directory for the file)
include ‘logspeciesvsph.inc’
# must ‘punch’ x-axis, y-axis pairs
PHASES
Fix_H+
H+ = H+
log_k 0.0
SOLUTION 1
temp 10
# pH for initial solution calculations only. Changed by <x_axis>
pH 7
units mol/kgw
# background electrolyte
Na 0.1 charge
Cl 0.1
# total concn of element
Fe(3) 1e-3
END
USE solution 1
EQUILIBRIUM_PHASES
O2(g) -0.677 0.1
# controls logH from xmin to xmax
Fix_H+ <x_axis> NaOH 10
-force_equality true
END
Examples 528
PhreePlot provides quite a versatile method for fitting chemical models to data (observa-
tions). This is sometimes called ‘optimization’ or ‘parameter identification’.
Other methods of optimizing Phreeqc models have been used, e.g. PEST, but the integration
within PhreePlot is tight and the additional learning step is a relatively small one once the
basics of producing custom plots have been mastered.
Nevertheless successful optimization, whatever the software used, is always a bit of an art that
takes some time and experimentation to become proficient. The examples included here can
be used as a starting point to experiment with. The golden rule is to start out simple.
Examples 529
Examples 530
5
Zn sorbed (mmol Zn/mol Fe)
1 pH 5.5
0
0.0 0.1 0.2 0.3 0.4 0.5 0.6
Zn concn (mmol/L)
C:\PhreePlot\demo\fit\iso.ps
This example demonstrates the fitting of adsorption data to a Langmuir isotherm. Only one
point is calculated per speciation calculation. This approach therefore requires ndata x nitera-
tions Phreeqc runs. The onePass setting is set to FALSE in order to tell PhreePlot that it will
require more than pass through the Phreeqc code in order to calculate dependent variable val-
ues for the complete set of data. The next example shows how to calculate all data points in
one Phreeqc run thus reducing the number of Phreeqc runs to niterations. This latter
approach speeds up the calculations at the expense of a more complex input file.
The input file must describe how to read in values for the dependent variable and all inde-
pendent variables from the fit data file. The columns can be specified by column number or
column name (from the header).
Fine tuning of the fitting parameters often helps convergence. The choice of fitFiniteDiffStep-
Size is often critical to get the fitting started. It is also important to decide how the residuals
are going to be weighted (the error model), here unit weighting has been used.
The plot can use any column from the ‘pts’ file. This includes special columns labelled
‘observed’, ‘calculated’, ‘residuals’ and ‘weightedResiduals’ as well as all the columns
from the fit data file and from the selected output.
Examples 531
SPECIATION
jobTitle “Test fitting: absolute errors (unit weight-
ing)”
calculationType fit
calculationMethod 1
FIT
# contains a list of observations and independent variables
dataFile iso.dat
# does a separate PHREEQC simulation for each observation -
onepass FALSE
# slow but easy to set up
# name of column in fit data file containing the observations (dep variable)
dependentVariableColumnObs Znsorbed
# name of column in selected output file containing the calcd values of the dep
variable
dependentVariableColumnCalc sorbZn
# 0 = unit weights
fitWeightingMethod 0
# initial step size for each adjustable parameter
fitFiniteDiffStepSize 1.0E-3
# column header in fit data file for which PHREEQC simulation(s) to use for each
observation
mainLoopColumn sim
numberOfFitParameters 2
fitParameterNames log_k M1
# 0 = parameters on a linear scale, 1 = log10 parameters before fitting
fitLogParameters 0 0
# 1 = adjustable
fitAdjustableParameters 1 1
# initial values (starting point)
fitParameterValues 3.0 1.0
PLOT
plotTitle “Zn sorption on Hfo”
xtitle “Zn concn (mmol/L)”
ytitle “Zn sorbed (mmol Zn/mol Fe)”
# plot isotherm (x = Znconcn, y = sorbed)
# y = line from calculated values from out file with column heading = ‘calculated’
lines calculated
# y = points from observed values from out file with column heading = ‘observed’
points observed
lineWidth 0.4
lineColor red
# no labels on plot
labelSize 0.0
# no legend (key)
legendTextSize 0.0
pointSize 4.0
# x = Znconcn column in out file
customXcolumn Znconcn
# extra text on plot
extraText “extratextiso.dat”
CHEMISTRY
PHASES
Fix_H+
H+ = H+
log_k 0.0
SURFACE_MASTER_SPECIES
Surf Surf
SURFACE_SPECIES
Examples 532
Surf = Surf
log_k 0.0
# Langmuir model
Surf + Zn+2 = SurfZn+2
# this is where log_k (updated parameter value) is substituted
log_K <log_k>
SELECTED_OUTPUT
-high_precision true
-reset false
PRINT
-reset false
USER_PUNCH
# fit Langmuir isotherm
# these are the column headings used for tag names: NB this is the output pH not the
input pH
-headings sorbZn pH mmolZn step_no
10 sorbedZn=SURF(“Zn”,”Surf”)
# NB variable name (used internally) is distinct from column header
20 if sorbedZn>0 THEN punch sorbedZn, -la(“H+”), tot(“Zn”)*1e3, step_no
SOLUTION 1
-pH <pHobs>
-units mmol/L
# 1 M NaNO3 background electrolyte
Na 1000
N(5) 1000
# <Znconcn> from iso.dat
Zn <Znconcn>
SURFACE
# this is where the max number of sites (updated parameter) is substituted
Surf <M1>
-equil 1
-no_edl
EQUILIBRIUM_PHASES
# pHobs from the fit data file
Fix_H+ -<pHobs> NaOH
-force_equality true
END
Examples 533
Examples 534
5
Zn sorbed (mmol Zn/mol Fe)
1 pH 5.5
0
0.0 0.1 0.2 0.3 0.4 0.5 0.6
Zn concn (mmol/L)
C:\PhreePlot\demo\fit\ison.ps
This is exactly the same as the previous example except that all 10 points are calculated in a
single pass of Phreeqc. This requires the onePass setting to be set TRUE. It also requires some
rearrangement of the way that the input data are presented. There are two critical differences
compared with the ‘one point per pass’ approach:
(i) in the ‘one point per pass’ approach, the CHEMISTRY part of the input file has just
one Phreeqc simulation (one END at the end of the file) whereas in the ‘calculate all
points in one pass’ approach there is one simulation for each data point, i.e. multiple
END’s;
(ii) in the first approach, selectedOutputLines points to just the last line, e.g.
selectedOutputLines 1
whereas with the ‘calculate all points at once’ it points to many lines with the ‘auto’
selectedOutputLines auto
where ‘auto’ selects all the lines found in the selected output which should therefore
contain one line per point. Each line of output represents one simulation.
Note that the Phreeqc setup in the input file contains many simulations which are
near-repeats. This could become tedious to setup for large datasets and would probably
require some form of automatic generation. PhreePlot includes a simple input file pre-
Examples 535
processor which can generate the necessary input file (see demo\fitpreproc-
esser\ppiso.ppi)from a simplified skeleton file.
536 PhreePlot Guide
SPECIATION
jobTitle “Test fitting”
calculationType fit
calculationMethod 1
FIT
# fit data file
dataFile ison.dat
# says that all dependent variable values output in one PHREEQC pass (see below)
onePass TRUE
# NB no half way house - either one calculation per pass or the whole lot
mainloop 2
# selectedOutputLines 0 1 1 1 1 1 1 1 1 1 1 # not necessary
since pre-loop doesn’t write selected output
# observations from the fit data file
dependentVariableColumnObs Znsorbed
# from selected output
dependentVariableColumnCalc sorbZn
# initial step size
fitFiniteDiffStepSize 1.0E-3
# from the fit data file
weightColumn wt
# blockRangeColumn sim # from the fit
data file - defaults ok
# mainLoopColumn main # from the fit
data file - defaults ok
numberOfFitParameters 2
fitParameterNames log_k M1
# 0 = linear parameters
fitLogParameters 0 0
# 1 = adjustable, 0 = fixed
fitAdjustableParameters 1 1
# starting values
fitParameterValues 3.0 1.0
PLOT
plotTitle “Zn sorption on Hfo<br>(onePass = TRUE)”
xtitle “Zn concn (mmol/L)”
ytitle “Zn sorbed (mmol Zn/mol Fe)”
# from the out file
lines calculated
# from the out file
points observed
lineWidth 0.4
lineColor red
labelSize 0.0
legendTextSize 0.0
pointSize 4.0
# from the out file
customXcolumn Znconcn
extraText extratextiso.dat
CHEMISTRY
#1
PHASES
Fix_H+
H+ = H+
log_k 0.0
SURFACE_MASTER_SPECIES
Surf Surf
SURFACE_SPECIES
Surf = Surf
log_k 0
END
#2
Examples 537
SURFACE_SPECIES
Surf + Zn+2 = SurfZn+2
# <log_k> is binding constant - substituted from the parameters defined above
log_K <log_k>
PRINT
-selected_output true
# -reset false
SELECTED_OUTPUT
-high_precision true
-reset false
# -state true
# -m Zn+2 SurfZn+2
SOLUTION_SPREAD
-pH <pHobs>
# this is an easy way to put in data - paste in here from a spreadsheet etc
-units mmol/L
# strictly PHREEQC names, separated by tabs
NumberNaN(5)ZnpH
# this is the pH used
1100010000.035.5
# data separated by tabs
2100010000.0695.5
3100010000.1185.5
4100010000.1665.5
5100010000.2175.5
6100010000.275.5
7100010000.3255.5
8100010000.3885.5
9100010000.4535.5
10100010000.5125.5
USER_PUNCH
# fit Langmuir isotherm
# this is the output pH
-headings sorbZn pH molZn step
# dependent variable calculated here
10 sorbedZn=SURF(“Zn”,”Surf”)
20 if sorbedZn>0 THEN punch sorbedZn, -la(“H+”), tot(“Zn”)*1e3, step_no
END
#3
SURFACE
# <M1> is the number of sites - substituted from the parameters defined above
Surf <M1>
-no_edl
# this uses solution Number 1 above
-equil 1
END
#4
SURFACE
Surf <M1>
-no_edl
# this uses solution Number 2 above etc
-equil 2
END
#5
SURFACE
Surf <M1>
-no_edl
-equil 3
END
#6
SURFACE
Surf <M1>
-no_edl
538 PhreePlot Guide
-equil 4
END
#7
SURFACE
Surf <M1>
-no_edl
-equil 5
END
#8
SURFACE
Surf <M1>
-no_edl
-equil 6
END
#9
SURFACE
Surf <M1>
-no_edl
-equil 7
END
#10
SURFACE
Surf <M1>
-no_edl
-equil 8
END
#11
SURFACE
Surf <M1>
-no_edl
-equil 9
END
#12
EQUILIBRIUM_PHASES
Fix_H+ -<pHobs> NaOH
SURFACE
Surf <M1>
-no_edl
-equil 10
END
Examples 539
540 PhreePlot Guide
Zn sorption on Hfo
(all in one pass of the input preprocessor)
5
Zn sorbed (mmol Zn/mol Fe)
0
0.0 0.1 0.2 0.3 0.4 0.5 0.6
Zn concn (mmol/L)
C:\PhreePlot\demo\fitpreprocessor\isopp.ps
This is similar to the \demo\iso\ison.ppi except that the near-repetitive blocks are generated
automatically by invoking the PhreePlot pre-processor (Section 13) to expand the various
blocks containing <repeatStartn> and <repeatEndn> tags where n is a positive integer.
SPECIATION
jobTitle “Test fitting”
calculationType “fit”
calculationMethod 1
Examples 541
FIT
# fit data file - has observations
dataFile “isopp.dat”
# this produces a block of selected output with 10 lines of data (not 1)
onePass TRUE
mainLoop 1
# column in isopp.dat
dependentVariableColumnObs sorbed
# column in selected output
dependentVariableColumnCalc Znsorbed
# initial step size for parameter adjustment
fitFiniteDiffStepSize 1.0E-03
# column in fit data file with the weights
weightColumn wt
numberOfFitParameters 2
fitParameterNames “log_k” “M1”
fitLogParameters 0 0
# 1= adjustable, 0 = fixed
fitAdjustableParameters 1 1
# initial values
fitParameterValues 3. 1.
PLOT
plotTitle “Zn sorption on Hfo<br>(all in one pass of
the input preprocessor)”
xtitle “Zn concn (mmol/L)”
ytitle “Zn sorbed (mmol Zn/mol Fe)”
# plot this column from the out file as lines
lines calculated
points observed
lineWidth 0.4
lineColor “red”
labelSize 0.0
legendTextSize 0.0
pointSize 4.0
customXcolumn Znconcn
CHEMISTRY
PRINT
-reset false
-selected_output false
SURFACE_MASTER_SPECIES
Surf Surf
SURFACE_SPECIES
Surf = Surf
log_k 0
SELECTED_OUTPUT
-high_precision true
USER_PUNCH
-headings Znsorbed pH molZn step
10 sorbedZn=SURF(“Zn”,”Surf”)
20 if (step_no = 0) THEN punch sorbedZn, -la(“H+”), tot(“Zn”)*1e3, step_no
SOLUTION_SPREAD
DescriptionZnpHNaN(5)
mmol/kgwmmol/kgwmmol/kgw
13.00E-025.510001000
26.90E-025.510001000
31.18E-015.510001000
41.66E-015.510001000
52.17E-015.510001000
542 PhreePlot Guide
62.70E-015.510001000
73.25E-015.510001000
83.88E-015.510001000
94.53E-015.510001000
105.12E-015.510001000
END
PRINT
-selected_output true
<repeatStart1> 1 10
SURFACE
# from fitParameterNames
Surf <M1>
-no_edl
-equil <repeatValue1>
END
<repeatEnd1>
Examples 543
544 PhreePlot Guide
83 Ni sorption by goethite
0.0005
observed
calculated
0.0004
soln Ni (mol/L)
0.0003
0.0002
0.0001
0.0000
4 5 6 7 8 9
pH
C:\PhreePlot\demo\fitNi\Niedl.ps
This example fits sorption data for Ni sorption by goethite from data by Sherman and Peacock
(unpublished). Ni sorption was measured as a function of pH at a constant solid solution ratio
of goethite and constant background electrolyte concentration (0.1M NaNO3). The depend-
ent variable was the final solution Ni concentration after sorption. The independent variable
was the final pH.
The data were fitted to the Dzombak and Morel (1990) diffuse double layer model as imple-
mented in Phreeqc (surface activities are defined in terms of mole fractions). The Ni was
assumed to bind to two types of bidentate surface sites as inferred from EXAFS data. The edl
SURFACE option was used. Two log K values were fitted.
The finiteDiffStepSize was set to 1e-2 which is a large enough shift in the log K’s to give a
small but significant change in the objective function while still giving reliable derivatives.
The fit is good but there is really not enough data to provide a convincing test of the model.
The line colour (blue) and points colour (red) are both determined by the line colour diction-
ary since useLineColorDictionary has been set to 1. This means ‘use the dictionary if present
and if the species are defined’, which they are.
Examples 545
SPECIATION
calculationType fit
calculationMethod 1
FIT
# fit data file - fit the final Ni concn not the amount sorbed
dataFile “Nisolnfresh.dat”
# final Ni concn is in column 2 of fit data file
dependentVariableColumnObs 2
# NB this is often a good way of fitting sorption data where possible
CHEMISTRY
SURFACE_MASTER_SPECIES
Fes_ Fes_OH-0.5
SURFACE_SPECIES
# surface charging
Fes_OH-0.5 = Fes_OH-0.5
log_k 0.0
546 PhreePlot Guide
Fes_OH-0.5 + H+ = Fes_OH2+0.5
log_k 8.50
# bidentate model
2Fes_OH-0.5 + Ni+2 = (Fes_OH)2Ni+
log_k <log_k1>
SELECTED_OUTPUT
high_precision true
reset false
USER_PUNCH
headings pH Ni
-start
# pH and total dissolved Ni (calcd)
10 punch -la(“H+”), TOT(“Ni”)
# fitting compares TOT(“Ni”) with obsd total, eg by ICP-AES
-end
SURFACE 1
# -diffuse_layer
# -no_edl
# goethite parameters
Fes_OH-0.5 1.09e-3 32.7 3.33
SOLUTION 1
units mol/kgw
# NiT
Ni 0.4258e-3
# background electrolyte
Na 0.1
N(5) 0.1 charge
EQUILIBRIUM_PHASES
O2(g) -0.67 0.1
Fix_H+ -<pHobs> NaOH
-force_equality true
Ni(OH)2 0 0
END
Examples 547
548 PhreePlot Guide
100 EAs1
•
EAs3 EAs2
EAs2 EAs3
•
80 EAs4
EAs5
EAs1 EAs6
•
60 EAs1
% bound
•
EAs4 EAs2
EAs3
•
EAs5 EAs4
40 EAs5
EAs6
•
EAs6
20
0
2 4 6 8 10 12
pH
C:\PhreePlot\demo\fithfoAs\fithfoAsv.ps
This example uses the As data used by Dzombak and Morel (1990) to fit the three surface log
K’s for As(V) sorption by HFO. A global fit has been used. The weighting factors have all
been set to one.
Line breaks in the input data file are used to defined line breaks in the plots – essentially six
different data sets. The line and point colours are read from the line colour dictionary.
Some of the fits are not very good - EAs4 (orange points, orange line), for example, shows
quite a large deviation between observations and fitted values.
Note that the in-plot labels are only plotted for the lines not the points. The lines and points
for each dataset could be given the same colour by editing the line colour dictionary and
replotting. convertLabels has been set to false to prevent the labels being interpreted as species
names and therefore subscripting the final number.
changeColor has been set to TRUE to ensure that the various curves, which are all subsets of
data from the same column, are given separate colours. This applies equally to both the points
and lines sets of data – hence they follow the same colour sequence.
Examples 549
# Example of fitting some As sorption on Hfo data from Dzombak and Morel (1991)
SPECIATION
calculationType fit
calculationMethod 1
labels “EAs1” “EAs2” “EAs3” “EAs4” “EAs5” “EAs6”
“EAs1” “EAs2” “EAs3” \
# used in turn for labelling points then curves in plot
“EAs4” “EAs5” “EAs6”
FIT
# file containing observations and independent variables
dataFile “1eAsv.dat”
# dep variable is in column 6
dependentVariableColumnObs 6
# this where the calcd values are foudn in selected output - see below
dependentVariableColumnCalc 4
# size of initial shift in parameter values looking for response
fitFiniteDiffStepSize 1.0E-02
# controls when convergence has been achieved
fitConvergenceCriterion 1.0E-03
fitStepSize 1.0
# 2 = take weights from fit data file
fitWeightingMethod 2
# weights in column 7 in fit data file
weightColumn 7
# column 8 defines which PHREEQC simulation (see below) to use for each point
blockRangeColumn 8
numberOfFitParameters 3
fitParameterNames “log_K1” “log_K2” “log_K4”
# 0 = linear parameter values (ie don’t use log param)
fitLogParameters 0 0 0
# 1 = adjustable (0 = fixed)
fitAdjustableParameters 1 1 1
# initial values
fitParameterValues 29.31 23.51 10.58
PLOT
plotTitle “Refitting As(V) sorption data for
Hfo<br>(1eAsv.dat)”
xtitle pH
ytitle “% bound”
# the ‘calculated’ column in the ‘out’ file is plotted as a line
lines calculated
# the ‘observed’ column in the ‘out’ file is plotted as points
points observed
# prevents the labels being interpreted as species
convertLabels F
# give subsets a sequence of difft colours
changeColor T
# 0 = do NOT use the line colour dictionary for colours
useLineColorDictionary 0
# symbols will be 3 mm (nominal)
pointSize 3.0
# x-axis variable is in column 8 of the ‘out’ file
customXcolumn 8
# can use this to scale whole plot
plotFactor 1.0
# additional text for plot
extraText “extratextfithfoAsv.dat”
CHEMISTRY
PHASES
Fix_H+
H+ = H+
log_k 0.
Fe(OH)3(a) 112
Fe(OH)3 + 3H+ = Fe+3 + 3H2O
log_k 4.891
550 PhreePlot Guide
SURFACE_SPECIES
# Arsenate
Hfo_wOH + AsO4-3 + 3H+ = Hfo_wH2AsO4 + H2O
# the first parameter is substituted here
log_k <log_K1>
SELECTED_OUTPUT
high_precision true
reset false
USER_PUNCH
# fourth column (%sorbed) is compared with observations
-headings pH Hfo AsT %sorbed
10 Hfo=equi(“Fe(OH)3(a)”)
20 totAs=SYS(“As”)
30 pcsorb=100*SURF(“As”,”Hfo”)/totAs
40 PUNCH -la(“H+”), Hfo, totAs, pcsorb
SURFACE 1
# D&M Hfo parameters
Hfo_sOH Fe(OH)3(a) equilibrium_phase 0.005 53300
Hfo_wOH Fe(OH)3(a) equilibrium_phase 0.2
SOLUTION
units mol/kgw
# <I>, <FeT> and <AsT> are from the fit data file
Na <I>
N(5) <I> charge
Fe <FeT>
As <AsT>
EQUILIBRIUM_PHASES
O2(g) -0.67 0.1
# <pH> from the fit data file
Fix_H+ -<pH> NaOH
-force_equality true
Fe(OH)3(a) 0 0
END
Examples 551
Contour plots
Contour plots provide a way of viewing the variation of some factor in two dimensions. The
contour plots generated by Phreeplot are simple, classical 2D views of the surface. The view-
ing angle of the generated surface is always looking down directly from above.
The user has control over many of the plotting parameters such as the choice of the contour
levels, and the size and colour of many of the plot attributes.
The challenge is to generate a set of data and choose a set of contour levels that produces a
good-looking plot while avoiding trying to trace numerical noise. This is largely controlled by
the choice of resolution used to generate the regular grid of values, and the choice of the con-
tour values. Plots based on geochemical data can produce areas with both extremely large and
extremely low gradients, both of which can be challenging to contour.
552 PhreePlot Guide
#$%
&'$'( #,'$%
&'$'(
&%
)*
+ &%
)*
+
!"! "
!"! "
,'
#$%
&'$'( #,'$%
&'$'(
&%
)*
+ &%
)*
+
!"! "
!"! "
,'
#$%
&'$'( #,'$%
&'$'(
&%
)*
+ &%
)*
+
!"! "
!"! "
,'
Figure
Ex85. Contour
plots of
percentage
the
for and
adsorbed
Zn
Pb function
HFO
by
a aspH
and
flog
of
O2(g)
for
three
total
metal
concentrations.Figure Ex85.
554 PhreePlot Guide
# produces a contour plot for the Fe-H2O system with FeT = 0.01 mol/kg
# and Fe(OH)3(a) as a possible mineral phase
SPECIATION
loopfile loopmetalx.dat
calculationType “contour”
calculationMethod 1
# see USER_PUNCH
contourZvariable %s
mainspecies Zn Pb
xmin 2.0
xmax 12.0
ymin -90
ymax 0
# updated from loop file once per z-loop
resolution <res>
CHEMISTRY
# one simulation
PHASES
Fix_H+; H+ = H+; log_k 0.
SELECTED_OUTPUT
-reset FALSE
-high_precision TRUE
USER_PUNCH
-headings pH %s
10 PUNCH -la(“H+”), 100*(1 - TOT(“<mainspecies>”)*TOT(“water”)/(SYS(“<mainspe-
cies>”)))
SOLUTION 1
pH 1.8
units mol/kgw
Fe(3) <Fet>
<mainspecies> <mt>
Na 1e-1
Cl 1e-1
EQUILIBRIUM_PHASES 1
Fix_H+ -<x_axis> NaOH 10
-force_equality true
O2(g) <y_axis>
Fe(OH)3(a) 0 0
END
Examples 555
556 PhreePlot Guide
It is possible to produce a contour plot with Eh-pH axes rather like a predominance plot. It
provides a useful alternative view of the behaviour over the domain of interest. As with pre-
dominance plots, it is best to vary the redox by varying the O2(g) fugacity and to use the yscale
setting to convert from the O2(g) fugacity to the Eh scale.
The main requirements are that the parameter being contoured is output with a USER_PUNCH
block and identified with the contourZvariable setting. In order to convert from O2(g) fugac-
ity to Eh, it is also necessary to explicitly output fields with the headings ‘pe’ for pe and ‘TC’ for
temperature (Celsius). Also the yscale setting should be set to ‘Eh’. The following example can
be found in demo\contour\contour_hfo_Eh_basic.ppi.
SPECIATION
calculationType "contour"
calculationMethod 1
contourZvariable FeT # plot is for FeT defined in USER_PUNCH
xmin 2.0 # pH range
xmax 12.0
ymin -90 # fO2(g) range (controls the Eh)
ymax 1
resolution 100 # calculate with a 100 x 100 grid
PLOT
xtitle "pH"
ytitle "Eh (V)"
yscale Eh
contours auto 8 p
pdf t
CHEMISTRY
# first simulation
PHASES
Fix_H+; H+ = H+; log_k 0.
SELECTED_OUTPUT 1
-reset FALSE
-high_precision TRUE
USER_PUNCH 1
-headings FeT pH O2(g) pe Eh TC
10 R = 8.314462
20 F = 96485.33
30 pe = -LA("e-")
40 eh = pe*LOG(10)*R*TK/F
50 IF(TOT("Fe") > 0) THEN PUNCH LOG10(TOT("Fe")) ELSE PUNCH -99
60 PUNCH -LA("H+"), SI("O2(g)"), pe, eh, TC
70 END
SOLUTION 1
pH 1.8
units mol/kgw
Fe(3) 1e-2
Na 1e-1
Cl 1e-1
END
−7.23
Eh (V)
−6.47
−5.61
−4.75
−2
.95
0.0
−0.5 −2
−1.0
2 4 6 8 10 12
pH
The above figure shows the output with maximum Fe solubility as expected at low pH and
low Eh. The data were generated over the pH domain 2–12 and log10(f O2(g)) from -90 to +1
with 8 auto-generated classes based on percentiles. Two of these classes were deemed too close
together and so have been removed. The white area is the area outside the original calculating
domain before yscale transformation. Notice how the required output, FeT, pe and TC have
been supplemented with columns pH, O2(g) and Eh. These are just for additional information
and can be seen in the ‘out’ file. The Eh is calculated internally from pe and TC in the same
way as indicated in the USER_PUNCH block and so does not have to be output here.
The plot is sufficient to show the principal features but can be improved in the following
ways: (i) add the ‘water limits’ of choice; (ii) choose a more uniform set of contour values; (iii)
change the y-scale to make better use of the plot area; (iv) add a plot title and a legend title.
See \demo\contour\contoure_hfo_Eh_pretty.ppi for the revised plot.
The main challenge is to show the water limits properly bearing in mind that the contouring
routine does not accept missing data. One approach would be to specify the calculation
domain to be very close to the chosen water limits (best not to be the exact value as this would
create the dilemma of is it in or out, subject to the usual numerical uncertainties). The data in
the ‘out’ file generated above can help to identify the limiting f O2(g) values required, the
greater the resolution, the more accurate these estimates will be. Alternatively it can be calcu-
lated by Phreeqc explicitly, e.g for the lower limit by using H2(g) <log_lower_limit> O2(g)
within an EQUILIBRIUM_PHASES block where <log_lower_limit> would be 0.0 for 1 atm
H2(g).
Alternatively, the f O2(g) can be tested by Phreeqc within the Basic code and a very small
dummy FeT value (far below a realistic minimum value) inserted, e.g. -999, -99999, etc, for all
values outside the water limits. This maintains the appearance of a continuous set of data over
the whole domain but will produce a ‘cliff’ edge in the contour plot that will be easily identifi-
able. The lower water limit was set at 1 atm H2(g) and the upper one at 1 atm O2(g).
The ‘pretty’ file shows the basics of both of these approaches as well as the other minor adjust-
ments. The critical changes for the calculations are:
ymin -82.7
ymax -0.01
and
USER_PUNCH 1
-headings FeT pH O2(g) pe Eh TC
# Calculate Eh (optional - it is calculated from pe & TC internally)
558 PhreePlot Guide
log10(Fe)
(mol/kgw)
< −8
1.0 O2 (g)
>1a −8 to −7
tm
−7 to −6
−6 to −5
−5 to −4
0.5 −4 to −3
−3 to −2
Eh (V)
−7
> −2
−6
−3
−4
−5
0.0
H2 (g)
−0.5 >1a
tm
0.1 mol/kgw NaCl
2 4 6 8 10 12
pH
10 R = 8.314462
20 F = 96485.33
30 pe = -la("e-")
40 eh = pe * log(10)*R*TK/F
# artificially add a 'cliff' at the water limits
50 IF (SI("O2(g)") > 0 OR SI("H2(g)") > 0) THEN PUNCH -999, -la("H+"),
SI("O2(g)"), pe, eh, TC : GOTO 100
60 IF (TOT("Fe") > 0) THEN PUNCH log10(TOT("Fe")) ELSE PUNCH -99999
70 PUNCH -la("H+"), SI("O2(g)"), pe, eh, TC
100 END
and to add the dashed lines and the text for the water limits:
log f O2-pH predominance diagrams were calculated using the ht1 approach for each of the
32 components (excluding H, O and Humate) in the wateq4f.dat database.
Humate was not included since Fulvate was included and all of the entries for Humate match
those of Fulvate.
The total amount of each of the 32 components was set to 1e-2 mol/kgw.
Each of the possible 311 mineral species present in the database was allowed to precipitate if
its saturation index indicated such. In practice, only 54 minerals actually did so.
The calculation is not meant to be particularly significant in terms of environmental chemis-
try. However, it is a fairly demanding test for the speciation program (Phreeqc) since the
whole sequence of diagrams originally needed more than one week of continuous computing
to calculate (more recent runs are considerably faster due to improvements in processor speed
and in the PhreePlot and Phreeqc code).
These calculations also provide a unique insight into the essential character of the
wateq4f.dat database, something that is remarkably difficult to achieve by simply staring at a
table of numbers.
The following 32 components were considered: Ag, Al, As, B, Ba, Br, C, Ca, Cd, Cl,
Cs, Cu, F, Fe, Fulvate, I, K, Li, Mg, Mn, N, Na, Ni, P, Pb, Rb, S, Se, Si, Sr, U
and Zn.
The following 311 minerals were considered: Acanthite, Adularia, Ag2CO3, Ag2O,
Ag2SO4, Ag3PO4, AgF:4H2O, AgMetal, Al(OH)3(a), AlAsO4:2H2O, Albite, AlumK, Alu-
nite, Analcime, Anglesite, Anhydrite, Anilite, Annite, Anorthite, Antlerite,
Aragonite, Arsenolite, Artinite, As_native, As2O5(cr), As2S3(am), AsI3, Ata-
camite, Autunite, Azurite, Ba3(AsO4)2, BaF2, Barite, Basaluminite, BaSeO3, Bas-
setite, Beidellite, Bianchite, Birnessite, Bixbyite, BlaubleiI, BlaubleiII,
Boehmite, Brochantite, Bromyrite, Brucite, Bunsenite, B-UO2(OH)2, Ca3(AsO4)2:4w,
Calcite, CaSeO3, Cd(BO2)2, Cd(gamma), Cd(OH)2(a), Cd(OH)2, Cd3(OH)2(SO4)2,
Cd3(OH)4SO4, Cd3(PO4)2, Cd4(OH)6SO4, CdBr2:4H2O, CdCl2, CdCl2:2.5H2O, CdCl2:H2O,
CdF2, CdI2, CdMetal, CdOHCl, CdSiO3, CdSO4, CdSO4:2.7H2O, CdSO4:H2O, Celestite,
Cerargyrite, Cerrusite, Chalcanthite, Chalcedony, Chalcocite, Chalcopyrite,
Chlorite14A, Chlorite7A, Chrysotile, Claudetite, Clinoenstatite, Clpyromorphite,
Coffinite, Cotunnite, Covellite, Cristobalite, Cu(OH)2, Cu2(OH)3NO3, Cu2SO4,
Cu3(AsO4)2:6w, Cu3(PO4)2, Cu3(PO4)2:3H2O, CuBr, CuCO3, CuF, CuF2, CuF2:2H2O,
CuI, CuMetal, CuOCuSO4, CupricFerrite, Cuprite, CuprousFerrite, CuSO4, Diaspore,
Diopside, Dioptase, Djurleite, Dolomite(d), Dolomite, Epsomite, FCO3Apatite,
Fe(OH)2.7Cl.3, Fe(OH)3(a), Fe2(SeO3)3, Fe3(OH)8, FeS(ppt), FeSe2, Fluorapatite,
Fluorite, Forsterite, Galena, Gibbsite, Goethite, Goslarite, Greenalite, Green-
ockite, Greigite, Gummite, Gypsum, Halite, Halloysite, Hausmannite, H-Autunite,
Hematite, Hinsdalite, Huntite, Hxypyromorphite , Hydrocerrusite, Hydromagnesite,
Hydroxyapatite, Illite, Iodyrite, Jarosite(ss), JarositeH, Jarosite-K, Jarosite-
Na, Jurbanite, Kaolinite, K-Autunite, Kmica, Langite, Larnakite, Laumontite,
Laurionite, Leonhardite, Litharge, Mackinawite, Magadiite, Maghemite, Magnesite,
Magnetite, Malachite, Manganite, Massicot, Matlockite, Melanothallite, Melanter-
ite, Millerite, Minium, Mirabilite, Mn2(SO4)3, Mn3(AsO4)2:8H2O , Mn3(PO4)2,
MnCl2:4H2O, MnHPO4, MnS(Green), MnSO4, Monteponite, Montmorillonite-Aberdeen,
Montmorillonite-BelleFourche, Montmorillonite-Ca, Morenosite, Na4UO2(CO3)3, Na-
560 PhreePlot Guide
The usual ‘water limits’ of 0.21 atm O2(g) and 1 atm H2(g) were used. All calculations were
carried out for a temperature of 25oC.
In practice, given the conditions used, only 54 of the 311 possible minerals precipitated some-
where within the range of conditions imposed. Inclusion of the other 257 minerals therefore
has no impact on the predominance diagrams produced and in principle could be excluded.
This results in approximately a four-fold increase in calculation speed illustrating that the
number of pure phases considered can have a strong impact on the speed of Phreeqc calcula-
tions.
In these examples, we found that on average, about half the time was spent hunting along the
domain boundaries and half was spent tracking along the internal boundaries. Of course this
varies considerably from diagram to diagram.
The wateq4f.dat database 561
1 Ag
All elements
Ag
-20
Iodyrite
log f O2(g)
-40
-60
AgMetal
-80
2 4 6 8 10
pH
562 PhreePlot Guide
2 Al
All elements
Al
-20
Alunite
AlF2+
log f O2(g)
-60
-80
2 4 6 8 10
pH
The wateq4f.dat database 563
3 As
All elements
As
-20 H2AsO4-
H3AsO4
log f O2(g)
Ba3(AsO4)2
-40
-60 H3AsO3
As_native
-80
2 4 6 8 10
pH
564 PhreePlot Guide
4 B
All elements
B
-20
log f O2(g)
-60
-80
2 4 6 8 10
pH
The wateq4f.dat database 565
5 Ba
All elements
Ba
-20
log f O2(g)
Ba3(AsO4)2
-40
-60 Barite
Ba2+
-80
2 4 6 8 10
pH
566 PhreePlot Guide
6 Br
All elements
Br
-20
log f O2(g)
-40 Br-
-60
-80
2 4 6 8 10
pH
The wateq4f.dat database 567
7 C
All elements
C
-20
UO2(CO3)34-
log f O2(g)
Otavite
CO2 NaCO3-
-40
-60
HCO3-
NiCO3
Rhodochrosite
CH4
-80
2 4 6 8 10
pH
568 PhreePlot Guide
8 Ca
All elements
Ca
-20
log f O2(g)
FCO3Apatite
-40 Ca2+
-60
Fluorite
-80
2 4 6 8 10
pH
The wateq4f.dat database 569
9 Cd
All elements
Cd
-20
Cd2+
log f O2(g)
Otavite
-40
CdFulvate
-60
Greenockite
-80
2 4 6 8 10
pH
570 PhreePlot Guide
10 Cl
All elements
Cl
-20
log f O2(g)
-40 Cl-
-60
-80
2 4 6 8 10
pH
The wateq4f.dat database 571
11 Cs
All elements
Cs
-20
log f O2(g)
-40 Cs+
-60
-80
2 4 6 8 10
pH
572 PhreePlot Guide
12 Cu
All elements
Cu
Tenorite
CuFulvate
-20
log f O2(g)
-40
CuprousFerrite
-60
Djurleite
Chalcocite
CuMetal
-80
2 4 6 8 10
pH
The wateq4f.dat database 573
13 F
All elements
F
-20
log f O2(g)
AlF2+ F-
-40 AlF2+ AlF3 Fluorite
-60
-80
2 4 6 8 10
pH
574 PhreePlot Guide
14 Fe
All elements
Fe
Hematite
-20
log f O2(g)
-40
CuprousFerrite
-60
Fe2+
Magnetite
-80
2 4 6 8 10
pH
The wateq4f.dat database 575
15 Fulvate
All elements
Fulvate
CuFulvate
-20
log f O2(g)
CdFulvate
-40
Fulvate2-
-60 HFulvate-
-80
2 4 6 8 10
pH
576 PhreePlot Guide
16 I
All elements
I
-20
Iodyrite
log f O2(g)
-40
-60
I-
-80
2 4 6 8 10
pH
The wateq4f.dat database 577
17 K
All elements
K
-20
log f O2(g)
-40 K+
-60
-80
2 4 6 8 10
pH
578 PhreePlot Guide
18 Li
All elements
Li
-20
log f O2(g)
-40 Li+
-60
-80
2 4 6 8 10
pH
The wateq4f.dat database 579
19 Mg
All elements
Mg
-20
log f O2(g)
Magnesite
-40 Mg2+
-60
Chlorite14A
-80
2 4 6 8 10
pH
580 PhreePlot Guide
20 Mn
All elements
Pyrolusite
Mn
-20 Bixbyite
log f O2(g)
Mn3(AsO4)2.8H2O
-40 MnHPO4
Mn2+
Rhodochrosite
-60
MnHPO4
-80
2 4 6 8 10
pH
The wateq4f.dat database 581
21 N
All elements
N2
-40
-60
NH4+
NH3
-80
2 4 6 8 10
pH
582 PhreePlot Guide
22 Na
All elements
Na
-20
log f O2(g)
-40 Na+
-60
-80
2 4 6 8 10
pH
The wateq4f.dat database 583
23 Ni
All elements
Ni
-20
log f O2(g)
Ni(CO3)22-
-40 Ni2+ Ni(OH)2
-60
-80
2 4 6 8 10
pH
584 PhreePlot Guide
24 P
All elements
P
-20
log f O2(g)
FCO3Apatite
-40 Clpyromorphite Clpyromorphite
-60
MnHPO4
-80
2 4 6 8 10
pH
The wateq4f.dat database 585
25 Pb
All elements
Pb
-20
log f O2(g)
-40 Clpyromorphite
-60
Pb(OH)2
PbMetal
-80
2 4 6 8 10
pH
586 PhreePlot Guide
26 Rb
All elements
Rb
-20
log f O2(g)
-40 Rb+
-60
-80
2 4 6 8 10
pH
The wateq4f.dat database 587
27 S
All elements
S
-20
Celestite
log f O2(g)
SO42-
-40
-60 Barite
Chalcocite Greenockite
-80
2 4 6 8 10
pH
588 PhreePlot Guide
28 Se
All elements
SeO42-
Se
-20
H2SeO3
HSeO3-
log f O2(g)
SeO32-
-40
-60 Se(s)
-80
2 4 6 8 10
pH
The wateq4f.dat database 589
29 Si
All elements
Si
-20
log f O2(g)
-60
Chlorite14A
-80
2 4 6 8 10
pH
590 PhreePlot Guide
30 Sr
All elements
Sr
-20
Celestite
log f O2(g)
Strontianite
-40
-60 Sr2+
-80
2 4 6 8 10
pH
The wateq4f.dat database 591
31 U
All elements
U
-20 Schoepite
Na-Autunite
UO22+ UO2(CO3)34-
log f O2(g)
-40 U3O8(c)
U4O9(c)
-60
Uraninite(c)
-80
2 4 6 8 10
pH
592 PhreePlot Guide
32 Zn
All elements
Zn
-20
log f O2(g)
-60
Zincite(c)
-80
2 4 6 8 10
pH
593
References
Agans, D.J. 2002. Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Soft-
ware and Hardware Problems. AMACOM, New York.
Appelo, C.A.J. and Postma, D. 2005. Geochemistry, groundwater and pollution. 2nd edition.
A.A. Balkema, Leiden.
Bethke, C. M. 2005. The Geochemist’s Workbench. Rockware, Inc.
Bourke, P. 1987. CONREC: A Contouring Subroutine. http://paulbourke.net/papers/conrec/.
Charlton, S.R. and Parkhurst, D. L. 2011. Modules based on the geochemical model Phreeqc
for use in scripting and programming languages. Computers & Geosciences 37, 1653-1663.
doi:10.1016/j.cageo.2011.02.005.
CoHort Software, 2004. CoPlot. Monterey, California.
Dzombak, D.A. and Morel, F.M.M. 1990. Surface Complexation Modeling: Hydrous Ferric
Oxide. John Wiley, New York.
Kinniburgh, D.G. and Cooper, D.M. 2004. Predominance and mineral stability diagrams revis-
ited. Environmental Science and Technology, 38, 3641–3648.
Kohler, K.E. 2005. PSPLOT: PostScript for Technical Drawings. A free Fortran-callable PostScript
Plotting Library. Nova Southeastern University Oceanographic Center, Dania Beach, FL, USA.
https://cnso.nova.edu//psplot/index.html.
Luo, J., Weber F-A., Cirpka, O.A., Wu, W-M., Nyman, J.L., Carley, J., Jardine, P.M., Criddle,
C.S. and Kitanidis, P.K. 2007. Journal Contaminant Hydrol. 92, 129–148.
Moré, J.J., Garbow, B.S. and Hillstrom, K.E. 1980. User Guide for MINPACK-1. Technical
Report ANL-80-74. Argonne National Laboratory, 1980. http://cds.cern.ch/record/126569/
files/CM-P00068642.pdf.
Müller M., Parkhurst D.L., Charlton S.R. (2011) Programming PHREEQC Calculations with
C++ and Python - A Comparative Study, In: Maxwell R., Poeter E., Hill M., Zheng C. (2011)
MODFLOW and More 2011 - Integrated Hydrological Modeling, Proceedings, pp. 632 - 636.
Parkhurst, D.L. and Appelo, C.A.J. 2013. Description of Input and Examples for Phreeqc Version
3—A Computer Program for Speciation, Batch-Reaction, One-Dimensional Transport, and
Inverse Geochemical Calculations: U.S. Geological Survey Water-Resources Investigations.
Chapter 43 of Section A, Groundwater Book 6, Modeling Techniques: Techniques and Meth-
ods 6–A43, U.S. Department of the Interior, U.S. Geological Survey, pp 437.
Post, V. 2011. Phreeqc for Windows. http://pfw.antipodes.nl/index.html.
Powell, M.J.D. 1965. A method for minimizing a sum of squares of non-linear functions without
calculating derivatives. The Computer Journal 7, 303–307. Also see VA05 in the HSL
Archive.
Powell, M.J.D. 2007. Developments of NEWUOA for minimization without derivatives.
DAMTP 2007/NA05. http://www.damtp.cam.ac.uk/user/na/NA_papers/NA2007_05.pdf.
Powell, M.J.D. 2009. The BOBYQA algorithm for bound constrained optimization without
derivatives. DAMTP 2009/NA06. http://www.damtp.cam.ac.uk/user/na/NA_papers/
NA2009_06.pdf.
R Development Core Team 2020. R: A language and environment for statistical computing. R
Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL https://
www.r-project.org/.
Rowan, T. 1990. Functional stability analysis of numerical algorithms. Ph.D. Thesis, University of
Austin, Texas.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.31.5708&rep=rep1&type=pdf
Stachowicz, M., Hiemstra T., W. H. van Riemsdijk. 2006. Surface speciation of As(III) and As(V) in relation to
charge distribution. J. Colloid Interface Sci. 302, 62–75.
Wheeler, D.A. Review of Debugging by David J. Agans. http://www.dwheeler.com/essays/debugging-agans.html
595
Acknowledgements
PhreePlot inherits most of the hard work from others. Phreeqc does all of the geochemical
calculations and is the work of David Parkhurst, Tony Appelo and Scott Charlton. Scott
Charlton and David Parkhurst prepared the Phreeqc module that is embedded in PhreePlot.
Phreeqc has become ever more powerful over the years and is a model of stability and reliabil-
ity. It also comes with its own excellent documentation and databases.
The Postscript plotting library embedded in PhreePlot is from the late Kevin Kohler. This
library enables PhreePlot to produce high quality, fully scalable plots. Ghostscript and
GSview provide the perfect companions for rendering these files. Ghostscript provides a
range of format conversions (pdf, png etc.) and can be configured to run directly from within
PhreePlot.
Three of the fitting routines are by the late Mike Powell. The non-linear least squares routine
(‘nlls’) has proved an invaluable and reliable assistant over many years, and his two newer
routines are expected to be equally reliable and helpful. We also thank Tom Rowan for his
‘subplx’ code.
The contouring routine is from Paul Bourke. After quite a lot of testing, we found that this
rather simple and elegant algorithm proved the most reliable for contouring geochemical data.
It has been slightly modified here to enable the contour regions to be filled with colour.
Geochemical modelling is nothing without the databases that go with it and so we would like
to thank all of those who have helped to painstakingly prepare these for use in Phreeqc and
elsewhere. David Parkhurst deserves special praise here for designing the Phreeqc database
format and for converting several important databases to this format. The Phreeqc format is
now a standard format for many thermodynamic databases.
A number of smaller contributions have also been included. These are listed below with details
of the sources and Conditions of Use.
Development of PhreePlot was begun while dgk was a full-time member of the British Geo-
logical Survey (Wallingford) and dmc was a member of the Centre of Ecology and Hydrology
(Wallingford), both NERC Research Centres. We are grateful to these two institutions for
their early support.
We are also grateful to the many users who have sent in bug reports and recommendations. In
particular, many thanks to John Mahoney for his many useful contributions.
596 PhreePlot Guide
Phreeqc David Parkhurst, Scott Charlton (USGS), Tony Appelo, Free source code, libraries and
binaries; license file. https://www.usgs.gov/software/phreeqc-version-3/.
Fitting Harwell Subroutine Library (HSL Archive), VA05 routine by M J D Powell, http://
www.hsl.rl.ac.uk/archive/index.html/. Free source code after registering; can freely distrib-
ute binaries derived from this but not the source itself; license file. Also from Powell:
BOBYQA (http://www.damtp.cam.ac.uk/user/na/NA_papers/NA2009_06.pdf ) and
NEWUOA (http://www.damtp.cam.ac.uk/user/na/NA_papers/NA2004_08.pdf). For
original sources see Zhang (https://www.zhangzk.net/software.html). For reformulated
BOBYQA source, also see https://github.com/jacobwilliams/PowellOpt/blob/master/src/
bobyqa.f90. Also thanks to Tom Rowan for SUBPLX from https://www.netlib.org/opt/
subplex.tgz.
Postscript plotting Kevin Kohler. PSPLOT subroutine plotting library. Available for download from http://
www.nova.edu/ocean/psplot/. Egon Szondi has updated (2012) and ported the library to
Fortran 95; follow the PSPLOT link given here.
Simulated annealing William L Goffe (1996) subroutine simann.f, http://www.netlib.no/netlib/opt/simann.f.
Free source code.
Douglas-Peuker line P R Wade (1984), Department of Computer Science, University of Hull. Also see
simplification Whyatt, J D and Wade P R (1988) "The Douglas-Peucker Line Simplification Algo-
rithm", Society of University Cartographers Bulletin 22 (1), 17 - 25. Free source code.
https://hull-repository.worktribe.com/OutputFile/459247.
Function parser Roland Schmehl, University of Karlsruhe, Germany. Open source code. http://source-
forge.net/projects/fparser/.
Hash function Rich Townsend, groups.google.com/group/comp.lang.fortran/browse_frm/thread/
456a07645b77f678. Free source code.
Contouring Paul Bourke, CONREC, http://paulbourke.net/papers/conrec/. Free source code.
The following may be used but are not necessarily embedded in PhreePlot:
Windows installer Inno Setup, Copyright © 1997-2020 Jordan Russell. All rights reserved.
http://www.jrsoftware.org/isinfo.php. Open source code (Delphi) and binaries; license
file. Free to use but copyrighted.
Ghostscript Peter Deutsch, Ralph Levien and the Ghostscript team, https://www.ghostscript.com/
(optional install) download/gsdnld.html. Opensource code and binary distributed under GPL conditions.
GSview Russell Lang, http://www.ghostgum.com.au/. Very useful and reliable but new registra-
(user install) tions are no longer being accepted. (P.S. GSView was a different program from Aladdin
but it is no longer available).
wget for Windows wget.exe is used to check the PhreePlot server for the date of the latest version (see check-
ForUpdate). It is part of the GnuWin package and is distributed under the GNU GPL
(http://www.gnu.org/copyleft/gpl.html).
agrep agrep.exe is used as an ‘approximate’ grep to assist with correcting keyword entry errors. It
was developed by Sun Wu and Udi Manber at the University of Arizona. It is distributed
with its own license conditions (http://www.tgries.de/agrep/#COPYRIGHT) as given
below:
Copyright 1996, Arizona Board of Regents
on behalf of The University of Arizona.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.
===============================================================================
libiomp5md.dll This is the OMP runtime library distributed by Intel (used by the compiler).
597
Term Meaning
a text file containing batch commands that is executed by the command line
batch file
interpreter (e.g. cmd.exe)
all statements in the main input file following the line containing the word
Chemistry section
CHEMISTRY. This is made up of slightly modified Phreeqc code
custom plot a type of xy-plot that is fully defined by the user
a variable that is set and retrieved through the operating system and can be used
by programs such as PhreePlot to configure the way in which they run. Phree-
environment vari-
Plot uses environment variables to define where the PhreePlot system directory
able
is located and for defining the Paths to certain executable files such as the Phree-
Plot executable and Ghostscript executable
a data file in tabular format that provides data (observations, independent varia-
(fit) data file
bles) used in fit and simulate calculations
Long-standing open source software for interpreting Postscript files under a
Ghostscript
number of operating systems and in many popular graphic file formats
a way of calculating predominance and stability diagrams that simply calculates
grid approach
the speciation on a square grid of points
software that provides a pleasant user interface for running Ghostscript under
GSview
Windows
hunt and track a way of calculating predominance and stability diagrams that works by finding
approach and then tracking the field boundaries from the domain boundaries inwards
a file containing text that will be inserted into the Chemistry section at the point
include file
given by the include ‘filename’ statement
input file a file containing PhreePlot keywords and settings
the result of pressing the ‘Esc’ key during calculations. This enables the calcula-
interrupt
tions to be paused, stopped or a keyword setting to be changed
job a block of one or more runs
a file that is normally generated by a PhreePlot run containing details of the run.
log file
The level of detail is controlled by the debug keyword
a data file in tabular format in which a row of data is read from the file for every
loop file iteration of the z-loop. Tags based on the column headings are generated from
the line of data and may be used in the Chemistry section.
the principal file containing PhreePlot keywords and settings. It will also contain
main input file the Chemistry section, if present. It normally has the extension .ppi and is used
to launch a job
main loop simula- all simulations numbered mainLoop or greater. Used for iterating with the least
tions overheads and with constant updating of the <x_axis> and <y_axis> tags
a character string representing a main species variable that is controlled by the
main species main species loop. Often used for a list of elements but can be used for a list of
any character strings
the outermost alphanumeric loop controlled by the <mainspecies> tag and list of
mainspecies loop
mainspecies
the selected output file. It is the default file used by custom calculations to make
outfile or ‘out’ file
a plot
an input file that contains PhreePlot keywords that is read immediately after the
override file
main input file and will override any settings in force at that point
the PhreePlot environment variable (PHREEPLOT) is required to tell your
PhreePlot envi- computer where to find the PhreePlot system directory. It is set during installa-
ronment variable tion, through the Control Panel or with a program such as setx.exe. It should
end in a backslash
PhreePlot execut-
the file that contains the executable code for PhreePlot, normally called pp.exe
able
598 PhreePlot Guide
Term Meaning
The directory containing many of the files needed by PhreePlot to run. It is nor-
PhreePlot system mally called something like ...\PhreePlot\x.xx\system\ where x.xx is the Phree-
directory Plot version number; it is normally stored in the PHREEPLOT environment
variable
a popular geochemical speciation program (pH-redox equilibrium calculations
Phreeqc
in C) from the USGS that does all the geochemical calculations in PhreePlot
a page description language noted for its ability to produce scalable text and vec-
tor graphics of high quality. Postscript is the code that PhreePlot uses to define
its plots. It can be rendered with the Ghostscript/GSview software combination
Postscript
and is readily converted to other formats. pdf is a popular descendant of Post-
script and was also developed by Adobe. Postscript files normally have the exten-
sion .ps
a file that contains a one-line entry for each PhreePlot run. It is automatically
pp.log file
generated and is located in the PhreePlot system directory
an input file that contains user-defined default settings for all the PhreePlot key-
pp.set file
words. This is the first input file to be read and overwrites the program defaults
pre-loop simula- All simulations preceding the main loop simulation(s). Used for initialization
tions calculations. Not repeated during execution of the x- and y-axis loops
a diagram, normally in two-dimensions, that shows the dominant chemical spe-
predominance cies for a particular ‘component’ over the domain of interest. The ‘predominant’
diagram species is defined in PhreePlot as the most abundant species in terms of moles of
component, irrespective of whether it is a solution, mineral or adsorbed species
run a block of one or more simulations that are executed in a single call to Phreeqc
tabular output generated by Phreeqc following some calculations. The output
selected output can be controlled using keywords such as SELECTED_OUTPUT and
USER_PUNCH
a ‘file’ created by Phreeqc that is used to communicate between Phreeqc and
PhreePlot. The actual name of the file is defined by the -file identifier in the
selected output
SELECTED_OUTPUT keyword data block of Phreeqc. The default name is
file
selected_1.0.out but it can be an unnamed virtual file in PhreePlot when there is
minimal debugging taking place
simulation a block of one or more Phreeqc keywords ending with an END or the end-of-file
simulation
the sequence number of a simulation counted from the top
number
similar to a predominance diagram except that a mineral species, if present,
stability diagram
always take precedence over any solution species
a character string (here 30 characters or less) that is enclosed by angle brackets,
e.g. <x_axis>. Tags are used as placeholders in the Chemistry section and in cer-
tain PhreePlot keyword settings such as the plot title. They can be defined in a
tag
number of ways and can refer to either numeric or character variables. Tags are
substituted by their current values before code is submitted either to Phreeqc for
processing or to the in-built plotting routines for writing the plot file
x-axis loop the third innermost loop controlled by the <x_axis> tag
the fourth innermost (and most rapidly changing) loop controlled by the
y-axis loop
<y_axis> tag
z-loop the second innermost loop controlled by the <loop> tag
599
The following tables show which elements are found in the various Phreeqc-format thermo-
dynamic databases distributed with PhreePlot. The included elements are shown in red.
Additional elements may be added by editing the databases or including the necessary code in
an input file.
These database files can be found in the PhreePlot ‘system’ directory.
The ‘Summary of inorganic species’ for each database has been generated with the
demo.
count_database_species
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† These files are included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† This file is included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/.
This database is similar to the original Phreeqc.dat except that Amm.dat also includes Amm as a
master species and so breaks the assumed redox equilibrium between ammonium (N(-3)) and
other N species. Unlike the latest (2.17) version of Phreeqc.dat, it also excludes diffusion coef-
ficients for some aqueous species.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† This file is included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/.
Table A2d. Elements available in the llnl.dat (Lawrence Livermore National Laboratory) database.†
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† This file is included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† This file is included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/.
This database includes cyanide, DOM and some 30 organic ligands including EDTA, citrate
and acetate.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† This file is included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/.
This database includes cyanide, cyanate and some 31 organic ligands including EDTA, citrate
and acetate.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† This file is included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/.
This database includes Pitzer coefficients and is designed to be used with the Pitzer model.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† See http://les.web.psi.ch/TDBbook/index.htm for a description of the associated publication and here for down-
loading the data. Also see Duro L., Grivé M., Cera E., Domènech C., Bruno J. Update of a thermodynamic data-
base for radionuclides to assist solubility limits calculation for performance assessment.Technical Report TR-06-
17 (2006), Svensk Kärnbränslehantering AB (Swedish Nuclear Fuel and Waste Management Co.).
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† This file is included with the standard Phreeqc distribution. See http://wwwbrr.cr.usgs.gov/projects/
GWC_coupled/Phreeqc/. It is based on the ThermoChimie v.7.b database, developed by Amphos 21, BRGM
and HydrAsa for ANDRA, the French National Radioactive Waste Management Agency.
This database has been especially prepared for dealing with problems in radioactive waste
management. It includes a table of SIT epsilon parameters for use with the Specific Interac-
tion Theory (SIT) activity coefficient model of Grenthe et al. (1997).
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† See http://migrationdb.jaea.go.jp/english.html for the download home page and links to the privacy policy and
copyright, and here for downloading this data. A variety of other related Phreeqc-format databases are available
from the home page.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† See http://migrationdb.jaea.go.jp/english.html for the home page and links to the privacy policy and copyright,
and here for downloading this data. A variety of other databases are available from the home page.
This database also includes definitions for the organic ligands: oxalate, citrate and EDTA.
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
† See http://migrationdb.jaea.go.jp/english.html for the home page and links to the privacy policy and copyright,
and here for downloading this data. A variety of other databases are available from the home page.
This database also includes definitions for the organic ligands: oxalate, citrate and EDTA.
Table A2l. Elements available in the PCHatches.dat (NEA18, formerly Serco now Amec) database.†
Group 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1 2
H He
2 3 4 5 6 7 8 9 10
Li Be B C N O F Ne
3 11 12 13 14 15 16 17 18
Na Mg Al Si P S Cl Ar
4 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
5 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
6 55 56 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
*
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
7 87 88
**
Fr Ra
* Lanthanoids 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
** Actinoids 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
Although originally compiled for use in radiochemical modelling work, the HATCHES database
also includes data suitable for many other applications e.g. toxic waste disposal, effluent treat-
ment, chemical processing. It contains data for nearly 40 organic ligands.
The following symbols are available for use in PhreePlot. Symbols can be specified either by
their symbol code or by their name (case independent). Enclose the name in quotes if it con-
tains a space. See Figure 7.5 for a display of all of the symbols.
Table A3. Table showing the symbols available for plotting arranged by symbol code and name.
The following tables show the characters, and their decimal and octal codings, that are availa-
ble with the Latin-1 (ISO-8859-1) (default in PhreePlot) and ‘Standard’ encodings. The
Latin-1 encoding is often named ‘ANSI’ (c.f. ASCII) although it is not actually a proper ANSI
standard. These character sets are enabled with the font keyword either
font Standard
or
font Latin-1
The following tables show the character sets available on a ‘typical’ PC (mine!). It is possible to
reproduce the tables to show your particular setup by setting plotTitle to ‘character set’ and
using ‘A4’ or ‘letter’ size paper and using the font keyword to select the encoding. The fol-
lowing input should produce a character table for Latin-1:
calculationType custom
plotTitle "character set" # special case
labelsize 2 # sets text size in mm
font Latin-1 # or Standard
See “Accented and other ‘foreign’ characters - the Latin-1 encoding”, p. 84 for how to enter
characters not present on your keyboard.
The ASCII encoding points to the 7-bit ASCII character set and consists of only the first two
columns in the tables below (decimal codes 0-127). This was the character set used in earlier
versions of PhreePlot.
The extended characters with decimal codes 129-137 are used internally by PhreePlot to code
subscripts, superscripts etc and should not be used in text strings.
Greek characters
There are a couple of Greek characters in the Latin-1 character set but a full set can be found
in the symbols font. These are entered singly with the backslash-character format, e.g. \p for
, or using the Greek pair of tags, <g>....</g>, for one or more characters. The codes used
to specify the Greek characters are given below.
‘Standard’ encoding
dec oct chr dec oct chr dec oct chr dec oct chr
000 000 064 100 @ 128 200 192 300
001 001 065 101 A 129 201 193 301 `
002 002 066 102 B 130 202 194 302 ´
003 003 067 103 C 131 203 195 303 ˆ
004 004 068 104 D 132 204 196 304 ˜
005 005 069 105 E 133 205 197 305 ¯
006 006 070 106 F 134 206 198 306 ˘
007 007 071 107 G 135 207 199 307 ˙
008 010 072 110 H 136 210 200 310 ¨
009 011 073 111 I 137 211 201 311
010 012 074 112 J 138 212 202 312 ˚
011 013 075 113 K 139 213 203 313 ¸
012 014 076 114 L 140 214 204 314
013 015 077 115 M 141 215 205 315 ˝
014 016 078 116 N 142 216 206 316 ˛
015 017 079 117 O 143 217 207 317 ˇ
016 020 080 120 P 144 220 208 320 —
017 021 081 121 Q 145 221 209 321
018 022 082 122 R 146 222 210 322
019 023 083 123 S 147 223 211 323
020 024 084 124 T 148 224 212 324
021 025 085 125 U 149 225 213 325
022 026 086 126 V 150 226 214 326
023 027 087 127 W 151 227 215 327
024 030 088 130 X 152 230 216 330
025 031 089 131 Y 153 231 217 331
026 032 090 132 Z 154 232 218 332
027 033 091 133 [ 155 233 219 333
028 034 092 134 \ 156 234 220 334
029 035 093 135 ] 157 235 221 335
030 036 094 136 ^ 158 236 222 336
031 037 095 137 _ 159 237 223 337
032 040 096 140 ‘ 160 240 224 340
033 041 ! 097 141 a 161 241 ¡ 225 341 Æ
034 042 " 098 142 b 162 242 ¢ 226 342
035 043 # 099 143 c 163 243 £ 227 343 ª
036 044 $ 100 144 d 164 244 ⁄ 228 344
037 045 % 101 145 e 165 245 ¥ 229 345
038 046 & 102 146 f 166 246 ƒ 230 346
039 047 ’ 103 147 g 167 247 § 231 347
040 050 ( 104 150 h 168 250 ¤ 232 350 Ł
041 051 ) 105 151 i 169 251 ' 233 351 Ø
042 052 * 106 152 j 170 252 “ 234 352 Œ
043 053 + 107 153 k 171 253 « 235 353 º
044 054 , 108 154 l 172 254 ‹ 236 354
045 055 - 109 155 m 173 255 › 237 355
046 056 . 110 156 n 174 256 fi 238 356
047 057 / 111 157 o 175 257 fl 239 357
048 060 0 112 160 p 176 260 240 360
049 061 1 113 161 q 177 261 – 241 361 æ
050 062 2 114 162 r 178 262 † 242 362
051 063 3 115 163 s 179 263 ‡ 243 363
052 064 4 116 164 t 180 264 · 244 364
053 065 5 117 165 u 181 265 245 365 ı
054 066 6 118 166 v 182 266 ¶ 246 366
055 067 7 119 167 w 183 267 • 247 367
056 070 8 120 170 x 184 270 ‚ 248 370 ł
057 071 9 121 171 y 185 271 „ 249 371 ø
058 072 : 122 172 z 186 272 ” 250 372 œ
059 073 ; 123 173 { 187 273 » 251 373 ß
060 074 < 124 174 | 188 274 … 252 374
061 075 = 125 175 } 189 275 ‰ 253 375
062 076 > 126 176 ~ 190 276 254 376
063 077 ? 127 177 191 277 ¿ 255 377
618 PhreePlot Guide
‘Latin-1’
‘
‘
dec oct chr dec oct chr dec oct chr dec oct chr
L
000 000 064 100 @ 128 200 192 300 À
001 001 065 101 A 129 201 193 301 Á
002 002 066 102 B 130 202 194 302 Â
a
t
003 003 067 103 C 131 203 195 303 Ã
004 004 068 104 D 132 204 196 304 Ä
005 005 069 105 E 133 205 197 305 Å
i
006 006 070 106 F 134 206 198 306 Æ
n
-
007 007 071 107 G 135 207 199 307 Ç
008 010 072 110 H 136 210 200 310 È
009 011 073 111 I 137 211 201 311 É
1
’
010 012 074 112 J 138 212 202 312 Ê
011 013 075 113 K 139 213 203 313 Ë
012 014 076 114 L 140 214 204 314 Ì
e
n
013 015 077 115 M 141 215 205 315 Í
014 016 078 116 N 142 216 206 316 Î
015 017 079 117 O 143 217 207 317 Ï
c
016
017
020
021
080
081
120
121
P
Q
144 220 ı 208 320 Ð
o
d
145 221 ` 209 321 Ñ
018 022 082 122 R 146 222 ´ 210 322 Ò
019 023 083 123 S 147 223 ˆ 211 323 Ó
i
n
020 024 084 124 T 148 224 ˜ 212 324 Ô
021 025 085 125 U 149 225 ¯ 213 325 Õ
022
023
024
026
027
030
086
087
088
126
127
130
V
W
X
150
151
152
226
227
230
˘
˙
¨
214
215
216
326
327
330
Ö
×
Ø
g
025 031 089 131 Y 153 231 217 331 Ù
026 032 090 132 Z 154 232 ˚ 218 332 Ú
027 033 091 133 [ 155 233 ¸ 219 333 Û
028 034 092 134 \ 156 234 220 334 Ü
029 035 093 135 ] 157 235 ˝ 221 335 Ý
030 036 094 136 ^ 158 236 ˛ 222 336 Þ
031 037 095 137 _ 159 237 ˇ 223 337 ß
032 040 096 140 ‘ 160 240 224 340 à
033 041 ! 097 141 a 161 241 ¡ 225 341 á
034 042 " 098 142 b 162 242 ¢ 226 342 â
035 043 # 099 143 c 163 243 £ 227 343 ã
036 044 $ 100 144 d 164 244 ¤ 228 344 ä
037 045 % 101 145 e 165 245 ¥ 229 345 å
038 046 & 102 146 f 166 246 ¦ 230 346 æ
039 047 ’ 103 147 g 167 247 § 231 347 ç
040 050 ( 104 150 h 168 250 ¨ 232 350 è
041 051 ) 105 151 i 169 251 © 233 351 é
042 052 * 106 152 j 170 252 ª 234 352 ê
043 053 + 107 153 k 171 253 « 235 353 ë
044 054 , 108 154 l 172 254 ¬ 236 354 ì
045 055 − 109 155 m 173 255 - 237 355 í
046 056 . 110 156 n 174 256 ® 238 356 î
047 057 / 111 157 o 175 257 ¯ 239 357 ï
048 060 0 112 160 p 176 260 ° 240 360 ð
049 061 1 113 161 q 177 261 ± 241 361 ñ
050 062 2 114 162 r 178 262 ² 242 362 ò
051 063 3 115 163 s 179 263 ³ 243 363 ó
052 064 4 116 164 t 180 264 ´ 244 364 ô
053 065 5 117 165 u 181 265 µ 245 365 õ
054 066 6 118 166 v 182 266 ¶ 246 366 ö
055 067 7 119 167 w 183 267 · 247 367 ÷
056 070 8 120 170 x 184 270 ¸ 248 370 ø
057 071 9 121 171 y 185 271 ¹ 249 371 ù
058 072 : 122 172 z 186 272 º 250 372 ú
059 073 ; 123 173 { 187 273 » 251 373 û
060 074 < 124 174 | 188 274 ¼ 252 374 ü
061 075 = 125 175 } 189 275 ½ 253 375 ý
062 076 > 126 176 ~ 190 276 ¾ 254 376 þ
063 077 ? 127 177 191 277 ¿ 255 377 ÿ