TITLE Example 14.--Transport with equilibrium_phases, exchange, and surface reactions
#
# Use phreeqc.dat
# Dzombak and Morel (1990) aqueous and surface complexation models for arsenic
# are defined here
#
SURFACE_MASTER_SPECIES
        Surf    SurfOH
SURFACE_SPECIES
        SurfOH = SurfOH
                log_k   0.0
        SurfOH  + H+ = SurfOH2+
                log_k   7.29
        SurfOH = SurfO- + H+
                log_k   -8.93
        SurfOH + AsO4-3 + 3H+ = SurfH2AsO4 + H2O
                log_k   29.31
        SurfOH + AsO4-3 + 2H+ = SurfHAsO4- + H2O
                log_k   23.51
        SurfOH + AsO4-3 = SurfOHAsO4-3
                log_k   10.58
SOLUTION_MASTER_SPECIES
        As       H3AsO4        -1.0     74.9216    74.9216
SOLUTION_SPECIES
        H3AsO4 = H3AsO4
                log_k           0.0
        H3AsO4 = AsO4-3 + 3H+
                log_k   -20.7
        H+ + AsO4-3 = HAsO4-2
                log_k   11.50
        2H+ + AsO4-3 = H2AsO4-
                log_k           18.46
SOLUTION 1 Brine
        pH      5.713
        pe      4.0     O2(g)   -0.7
        temp    25.
        units   mol/kgw
        Ca      .4655
        Mg      .1609
        Na      5.402
        Cl      6.642           charge
        C       .00396
        S       .004725
        As      .025 umol/kgw
END
USE solution 1
EQUILIBRIUM_PHASES 1
        Dolomite        0.0     1.6
        Calcite         0.0     0.1
SAVE solution 1
# prints initial condition to the selected-output file
SELECTED_OUTPUT
        -file ex14.sel
        -reset false
        -step
USER_PUNCH
        -head  m_Ca m_Mg m_Na umol_As pH mmol_sorbedAs
  10 PUNCH TOT("Ca"), TOT("Mg"), TOT("Na"), TOT("As")*1e6, -LA("H+"), SURF("As", "Surf")*1000
END
PRINT
# skips print of initial exchange and initial surface to the selected-output file
        -selected_out false
EXCHANGE 1
        -equil with solution 1
        X       1.0
SURFACE 1
        -equil solution 1
# assumes 1/10 of iron is HFO
        SurfOH           0.07    600.    30.
END
SOLUTION 0 20 x precipitation
        pH      4.6
        pe      4.0     O2(g)   -0.7
        temp    25.
        units   mmol/kgw
        Ca      .191625
        Mg      .035797
        Na      .122668
        Cl      .133704
        C       .01096
        S       .235153         charge
EQUILIBRIUM_PHASES 0
        Dolomite        0.0     1.6
        Calcite         0.0     0.1
        CO2(g)          -1.5    10.
SAVE solution 0
END
PRINT
        -selected_out true
		-status false
ADVECTION
        -cells 1
        -shifts 200
        -print_frequency 200
USER_GRAPH 1 Example 14
        -headings PV As(ppb) Ca(M) Mg(M) Na(M) pH
        -chart_title "Chemical Evolution of the Central Oklahoma Aquifer"
        -axis_titles "Pore volumes or shift number" "Log(Concentration, in ppb or molal)" "pH"
        -axis_scale x_axis 0 200
        -axis_scale y_axis 1e-6 100 auto auto Log
  10 GRAPH_X STEP_NO
  20 GRAPH_Y TOT("As") * 74.92e6, TOT("Ca"), TOT("Mg"), TOT("Na")
  30 GRAPH_SY -LA("H+")
END
