Applications and Case Studies > Soil profile geochemistry

acid base titration with 2 binding sites in solution

(1/2) > >>

P.Merdy:
Hello.
I would like to simulate the acid-base titration of a lake containing natural organic matter in order to determine the pKa of two mean sites, called strong and weak, which will basically represent carboxylic and phenolic groups. I need to adjust the two pKa until the titration curve fits with the experimental one and this is why I used "selected output". I would like to draw pH=f(volume of titrant). Before the titration, I added NaOH to reach pH=12 and then I titrate with HNO3. The PhreeqC plot is showing only one initial volume point. The selected output is empy (I have the headings only). This is the script below and please if someone can help solving the problems, we will be very grateful. Thank you.     

SOLUTION_SPECIES   
     
#      strong site--Ha_s
   
      Ha_sOH = Ha_sOH
   log_k  0.0

      Ha_sOH = Ha_sO- + H+
   log_k  -4   

#   weak site--Ha_w

   Ha_wOH = Ha_wOH
   log_k  0.0

   Ha_wOH = Ha_wO- + H+
   log_k  -9   

END
SOLUTION 1   
   temp 25
   water 0.015 kg # volume of the lake sample that is titrated
        -units  mol/kgw   
        pH      9.1   
        N(5)      0.1   
        K      0.1    charge
   -units mg/kgw   
   Ha_s   637
   Ha_w   637

REACTION
KOH 0.1
1.067e-4 # initial NaOH added to raise the pH to 12 before acid titration
END
REACTION
HNO3 0.1 # concentration of acid titrant
1.5e-3 moles in 17 steps
H2O 0.8447
END 

USER_GRAPH 1
 -chart_title  "Titration Curve"
 -axis_titles "Acid Added (mL)", "pH"
 -axis_scale x_axis  0 15 1
 -axis_scale y_axis 0 12 1
 -start
10 VT=SOLN_VOL*1000 # volume of the acid titrant added
20 V=VT-15
30 pH = -LA("H+")
40 GRAPH_X V
50 GRAPH_Y pH
END

SELECTED_OUTPUT
-file titration_Ha
-reaction true
-step true
-molalities H+ Ha_wOH Ha_sOH Ha_wO- Ha_sO-


END

dlparkhurst:
Let's step back and consider your initial conditions. Ignoring the organic acids, the combination of solution volume and KOH addition generate a pH less than 11, rather than 12. Adding the organics would require additional base.


--- Code: ---SOLUTION 1
    temp      25
    pH        9.1
    units     mol/kgw
    density   1
    K         0.1 charge
    N(5)      0.1
    -water    0.015 # kg
REACTION
KOH 0.1
1.067e-4 # initial NaOH added to raise the pH to 12 before acid titration
END

--- End code ---

After you address the pH issue, the next question is what are the concentrations of Ha_s and Ha_w. You did not include SOLUTION_MASTER_SPECIES so I am not sure what you had in mind for molalities. Note that you cannot define -units twice in a SOLUTION definition; only the last definition will be used. If you want to mix mol/kgw and mg/kgw, you should define -units mol/kgw and then

Ha_s 637 mg/kgw gfw ???

Note that you are really defining the concentration of organic OH groups that can be deprotonated.

John Mahoney:
Once again This is another good application of PhreePlot and its fitting capabilities.  I have done this as an examples for a simple alkalinity titration to calculate the well known Ks for the the carbonate reactions. I have had troubles posting longer messages so send me a private message and I will provide more details. the posting issue might be relate to attaching PhreePlot input files not sure.

John Mahoney:
There is a little more discussion about this fitting application on my website Mahoney Geochemical,  go to philosophy page and scroll down.  In this case I ran a titration using PHREEQC and it produced a file of pH values for each step.  That became the observation file . I then set up a PhreePlot model to calculate the two log K values for the carbonate/bicarbonate reaction and the H2CO3/bicarbonate reaction.  the toughest part I see in your titration is getting the steps from the actual titration to match the acid additions in the model.  I assume you used an automatic titrator so that should be easy. 
Because there is a potential issue with PPI files, although Tom says he corrected it I have entered the file as a code block.
 
here is the input file for my titration.   I suppose you could also add the site concentrations as additional fitting parameters , but you would need to have good data and enough of if for some confidence in the fits.



--- Code: ---# Example of fitting speciation reactions
SPECIATION
  jobtitle                             "Fitting Carbonate equilibrium using alkalinity titration"
  calculationType                      fit
  calculationMethod                    1
  database                             "Wateq4f.DAT"
  #debug      1
 
 FIT
  fitMethod           nlls
  dataFile                            "titrations.dat"  # file containing observations and independent variables
  onepass                              true
  mainLoop                             1            # main (iterating) loop starts at first simulation (relative to start of block)
  dependentVariableColumnObs           pH   # column in onepoint.dat
  dependentVariableColumnCalc          calc_pH      # column in selected output
    fitMaxStepSize                       .1
  fitFiniteDiffStepSize                1.0E-03      # initial step size for parameter adjustment
  numberOfFitParameters            2
    fitParameterNames                    "k1fit"  "k2fit"
  fitLogParameters                     0   0
  fitAdjustableParameters              1  1        # 1 .= adjustable, 0 = fixed
  fitParameterValues                  10.0  11.0     # initial values
  fitConvergenceCriterion              1e-7
 
PLOT
  plotfactor 1  # 0 turns off Plotting
  plotTitle                            "Alkalinity titration fit <br> log K values 10.329 16.681 <br> fitted values <k1fit>  <k2fit>"
  xtitle                            step
    ytitle                               "pH"
    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
   lineColor  "blue"
   useLineColorDictionary                 0                                       # 0 = do NOT use the line colour dictionary for colours
    pointSize                            1.5      # 3.0                               # symbols will be 1.5  3 mm (nominal)
      plotFactor                           1.0                                     # can use this to scale whole plot
    png t
   pdf t
 
  trackSymbolColor   black
pointsSamecolor true
  gridLines true
CHEMISTRY
PRINT
    -reset     t

SOLUTION_SPECIES

#CO2     could be used instead of H2CO3
CO3-2 + 2 H+ = CO2 + H2O
log_k <k2fit>

#HCO3-               27
H+ + CO3-2 = HCO3-
log_k <k1fit>


SELECTED_OUTPUT 1
    -file                 titrations.dat
    -high_precision       true
    -reset                false

USER_PUNCH
-headings  calc_pH
-start
10 PUNCH -LA("H+")
-end

SOLUTION
units mg/L
Alkalinity 200
Ca 80
pH 11.3
REACTION
H2SO4
.005 moles in 50 steps
END
   
--- End code ---

John Mahoney:
I did not include the data from the original PHREEQC model, but you should be able to work that out from the chemistry portion of the PhreePlot input file. 

Navigation

[0] Message Index

[#] Next page

Go to full version