fithfoAsv.ppi
|
|
|
# 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" \
"EAs4" "EAs5" "EAs6" # used in turn for labelling points then curves in plot
FIT
dataFile "1eAsv.dat" # file containing observations and independent variables
dependentVariableColumnObs 6 # dep variable is in column 6
dependentVariableColumnCalc 4 # this where the calcd values are foudn in selected output - see below
fitFiniteDiffStepSize 1.0E-02 # size of initial shift in parameter values looking for response
fitConvergenceCriterion 1.0E-03 # controls when convergence has been achieved
fitMaxStepSize 1.0
fitWeightingMethod 2 # 2 = take weights from fit data file
weightColumn 7 # weights in column 7 in fit data file
blockRangeColumn 8 # column 8 defines which PHREEQC simulation (see below) to use for each point
numberOfFitParameters 3
fitParameterNames "log_K1" "log_K2" "log_K4"
fitLogParameters 0 0 0 # 0 = linear parameter values (ie don't use log param)
fitAdjustableParameters 1 1 1 # 1 = adjustable (0 = fixed)
fitParameterValues 29.31 23.51 10.58 # initial values
PLOT
plotTitle "Refitting As(V) sorption data for Hfo<br>(1eAsv.dat)"
xtitle pH
ytitle "% bound"
lines calculated # the 'calculated' column in the 'out' file is plotted as a line
points observed # the 'observed' column in the 'out' file is plotted as points
convertLabels F # prevents the labels being interpreted as species
changeColor T # give subsets a sequence of difft colours
useLineColorDictionary 0 # 0 = do NOT use the line colour dictionary for colours
pointSize 3.0 # symbols will be 3 mm (nominal)
customXcolumn 8 # x-axis variable is in column 8 of the 'out' file
plotFactor 1.0 # can use this to scale whole plot
extraText "extratextfithfoAsv.dat" # additional text for plot
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
-add_constant -10 # prevents Fe(OH)3(a) from dissolving
SURFACE_SPECIES
# Arsenate
Hfo_wOH + AsO4-3 + 3H+ = Hfo_wH2AsO4 + H2O
log_k <log_K1> # the first parameter is substituted here
Hfo_wOH + AsO4-3 + 2H+ = Hfo_wHAsO4- + H2O
log_k <log_K2>
Hfo_wOH + AsO4-3 = Hfo_wOHAsO4-3
log_k <log_K4>
SELECTED_OUTPUT
high_precision true
reset false
USER_PUNCH
-headings pH Hfo AsT %sorbed # fourth column (%sorbed) is compared with observations
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
Hfo_sOH Fe(OH)3(a) equilibrium_phase 0.005 53300 # D&M Hfo parameters
Hfo_wOH Fe(OH)3(a) equilibrium_phase 0.2
SOLUTION
units mol/kgw
Na <I> # <I>, <FeT> and <AsT> are from the fit data file
N(5) <I> charge
Fe <FeT>
As <AsT>
EQUILIBRIUM_PHASES
O2(g) -0.67 0.1
Fix_H+ -<pH> NaOH # <pH> from the fit data file
-force_equality true
Fe(OH)3(a) 0 0
END
|
|