PhreeqcUsers Discussion Forum

Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • Principles of changes in pH and O2
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Principles of changes in pH and O2  (Read 2405 times)

Rensburg

  • Frequent Contributor
  • Posts: 19
Principles of changes in pH and O2
« on: 07/04/26 13:34 »
Dear phreeqcuser,
  Continuing from my previous question, since I don’t have any measured data yet, I can only test my assumptions theoretically one by one. I have encountered two unexpected results. I have checked the database and tried some approaches, but couldn’t resolve them. I would like to seek your help again.

  First, regarding my denitrification setup: theoretically, denitrification is a process that generates alkalinity, i.e., increases pH. However, I don’t understand why my result shows a pH decrease. It seems to be related to carbon, but I think it’s unreasonable to simply omit carbon generation.
Code: [Select]
SOLUTION_MASTER_SPECIES
    Doc       Doc          0     CH2O         30.0271

SOLUTION_SPECIES
Doc = Doc
    log_k     0
    delta_h   0 kJ
2 NO3- + 12 H+ + 10 e- = N2 + 6 H2O
#-log_k 207.08
       -log_k 100

RATES
        Denitrification
        -start
10 k20c = 0.2/(3600*24)
20 k20t = 1.05^(TC-20)
30 Kno3 = 2
40 f1 = Kno3/(Kno3 + MOL("O2")*32*1000)
50 if MOL("Doc") <= 0 then rate = 0 else rate = k20c * k20t * f1 * TOT("N") * 14*1000
60 rate = rate/14
90 moles = rate * TIME
100 if (M + moles) < 0 then moles = -M
110 SAVE moles
        -end

SOLUTION 1
    temp      3.1
    pH        7.81
    pe        4.1
    redox     pe
    units     mg/l
    density   1
    O(0)      4.47
    N(5)      0.39
    N(3)      0
    Doc       2
    Na        1.4481
    Cl        1.4481 charge
    -water    1 # kg

SELECTED_OUTPUT
        -file   farmland_1.xlsx
        -high_precision true
USER_PUNCH
        -headings      Denitrification_t N3 N5 O2 Ntg Doc C OH- H+
        -start
  10 punch KIN_DELTA("Denitrification")
  20 punch TOT("N(3)") TOT("N(5)") MOL("O2") MOL("Ntg") TOT("Doc")  TOT("C(4)")
  30 punch  MOL("OH-") MOL("H+")
        -end
USER_GRAPH 1
    -headings               time N2 NO3- O2 Doc C pH
    -axis_titles            "time"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X TOTAL_TIME
20 GRAPH_Y TOT("Ntg"), TOT("N"), MOL("O2")/10,TOT("Doc")-60e-6,TOT("C(4)")
30 GRAPH_Y -LA("H+")*1E-6
  -end
    -active                 true
INCREMENTAL_REACTIONS true

KINETICS 1
Denitrification
    -formula  N -1 Doc -1.25  Ntg  0.5  CH2O 1.25
    -tol      1e-08
-steps       3600 in 60 steps
-step_divide 1
-runge_kutta 3
-bad_step_max 500
END
 
  Additionally, I performed the same step-by-step decomposition for nitrification, organic nitrogen mineralization, and organic carbon mineralization. I found a common change: although I did not explicitly include O₂ in the kinetics, there is still a change on the order of 1e-12 (while changes in other substances are on the order of 1e-8). I don't know what causes this.
  I have attached my test codes separately. Thank you very much for your help.
« Last Edit: 07/04/26 13:42 by Rensburg »
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4338
Re: Principles of changes in pH and O2
« Reply #1 on: 07/04/26 18:12 »
First, you have O2(aq) in your solution. By adding CH2O, you will reduce O2 and generate CO2, which lowers the pH. However, the stoichiometry of your kinetic reaction is incorrect under these conditions. Ntg should only be generated when O2(aq) is absent.


Initially, the reaction is Doc -1 CH2O +1, which produces

Code: [Select]
CH2O + O2 = CO2 + H2O


Denitrification, in the absence of O2(aq) has the following reaction:

Code: [Select]
1.25 CH2O + NO3- = 0.5N2(aq) + HCO3- + 0.25CO2 + 0.75H2O

Your initial solution has no  buffering capacity (and eliminating the O2(aq) from SOLUTION), the pH will be determined by the buffering produced by the denitrification reaction. In general, pH is related to the HCO3-/CO2 ratio, and the denitrification reaction alone should ultimately generate a pH of about 7 (ignoring activity coefficients and other reactions). Alkalinity does increase, even though the pH decreases.

Code: [Select]
pH = 6.35 + log(HCO3-/CO2) - log(H2O)
pH ~ 6.35 + log(4) ~ 7
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4338
Re: Principles of changes in pH and O2
« Reply #2 on: 07/04/26 22:22 »
I didn't notice you are working at a temperature of 3.1 C. The log K is 6.54 at that temperature with a resulting pH of ~7.14.

If the starting pH is less than 7.14, the pH should increase; if greater than 7.14, the pH should decrease as denitrification proceeds.
Logged

Rensburg

  • Frequent Contributor
  • Posts: 19
Re: Principles of changes in pH and O2
« Reply #3 on: 08/04/26 01:32 »
  Thank you for your help. I think I understand now. Could you please check whether my understanding is correct?

  You are right. When oxygen is present, organic carbon will be mineralized into inorganic carbon. However, I separated them out when I was checking the correctness of my reactions one by one. Additionally, I defined an inhibition factor for the denitrification rate. This might be what you meant by "the reaction only occurs when O₂(aq) is absent." But compared to that statement, I think a more accurate description is: the lower the oxygen concentration, the higher the extent of denitrification. Do you agree?

  When PHREEQC runs my initial solution, the thermodynamic tendency for organic matter oxidation is very strong at the beginning, so pH and O₂ both show a decreasing trend. As O₂ decreases, the denitrification kinetics I defined become increasingly dominant, producing Ntg. However, because there is no acid-base buffer capacity, even when denitrification becomes strong, the pH still keeps decreasing. Is that correct? Should I add some buffering substances, and how can I set that up?

  I observed that my pH indeed stopped decreasing around 7.14. This is the natural outcome of carbonate equilibrium, which I cannot change ,  in reality, alkalinity is increasing, right? But observing a decrease in pH is not due to a mistake in my setup, right?
« Last Edit: 08/04/26 02:14 by Rensburg »
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4338
Re: Principles of changes in pH and O2
« Reply #4 on: 08/04/26 06:22 »
>   You are right. When oxygen is present, organic carbon will be mineralized into inorganic carbon. However, I separated them out when I was checking the correctness of my reactions one by one. Additionally, I defined an inhibition factor for the denitrification rate. This might be what you meant by "the reaction only occurs when O₂(aq) is absent." But compared to that statement, I think a more accurate description is: the lower the oxygen concentration, the higher the extent of denitrification. Do you agree?

You did not remove O2 in the last script that you posted, nor add an inhibition factor. I'm assuming these are corrections you have made after your last post. I think it is a very good approximation that denitrification occurs after dissolved oxygen is essentially removed.

My statement about buffering capacity only emphasized that the denitrification reaction was the sole pH-determining reaction. The pH will tend toward pH 7.14 whether there is buffering capacity or not. Only add buffering if it is pertinent to the system that you are modeling.

You can look at the output to see if alkalinity is increasing. I have explained that the pH effect is due entirely to the ratio HCO3-:CO2 produced in the simulated reactions.

Enough questions.
Logged

Rensburg

  • Frequent Contributor
  • Posts: 19
Re: Principles of changes in pH and O2
« Reply #5 on: 08/04/26 13:32 »
  Thank you very much for your patient explanation.
  Your responses have helped me understand the reasons behind the pH changes. I think I don't need to worry about acid-base buffering. My inhibition factor is “Kno3/(Kno3 + MOL("O2")*32*1000)”, which is defined in RATES. I indeed haven't removed O₂; I isolated it, but I will combine it by myself.
  Thank you again, and I wish you a pleasant life.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • Principles of changes in pH and O2
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2