PhreeqcUsers Discussion Forum

Please email phreeqcusers at gmail.com with your name and affiliation to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • KINETICS of Orgc
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: KINETICS of Orgc  (Read 11170 times)

gmgmgm

  • Frequent Contributor
  • Posts: 15
KINETICS of Orgc
« on: 13/05/24 14:21 »
What is the difference between these two, why can't the previous one perform operations while the latter can?
Thanks everyone
Code: [Select]
SOLUTION 1
    temp      25
    pH        5.1 charge
    pe        4
    redox     pe
    units     mg/l
    density   1
    Fe(2)     33.2
    Fe(3)     186.8
    Mn(2)     67.6
    S(6)      600
    C(4)      0
    C(-4)     0
    -water    1 # kg


SOLUTION_MASTER_SPECIES
Orgc_sed Orgc_sed    0.0 Orgc_sed        30.0

SOLUTION_SPECIES
Orgc_sed = Orgc_sed
    log_k     0

KINETICS 1
Orgc_sed
    -formula  C  1  Orgc_sed -1
    -m        0.5
    -m0       0.5
    -tol      0.000002
-steps       946000 in 15 steps # seconds
-step_divide 1
-runge_kutta 3
-bad_step_max 500

EQUILIBRIUM_PHASES 1
    CO2(g)    0 0
    Fe(OH)3(a) 0 0 precipitate_only
    FeS(ppt)  0 0 precipitate_only
    Goethite  0 0 precipitate_only
    Mackinawite 0 0 precipitate_only
    Pyrolusite 0 0 precipitate_only
    Manganite 0 0 precipitate_only


RATES
Orgc_sed
 -start
1   REM      Additive Monod kinetics for SOC (sediment organic carbon)
2   REM      Electron acceptors: O2, NO3, and SO4

10  if (M <= 0) THEN GOTO 200
20  mO2   = MOL("O2")
30  mNO3  = TOT("N(5)")
40  mSO4  = TOT("S(6)")
50  k_O2  = 15.7    # 1/sec
60  k_NO3 = 1.67e-1   # 1/sec
70  k_SO4 = 1.e-3     # 1/sec
80  rate  = k_O2 * mO2/(2.94e-4 + mO2)
90  rate  = rate + k_NO3 * mNO3/(1.55e-4 + mNO3)
100 rate  = rate + k_SO4 * mSO4/(1.e-4 + mSO4)
110 moles = rate * M * (M/M0) * TIME
200 SAVE moles
 -end

USE equilibrium_phases 1
USE kinetics 1
USE solution 1

USER_GRAPH 1
    -headings               C SO4 S(-2)  C
    -axis_titles            "Carbon added, mol/L" "S(6) Concentration, mol/L" "S(2) Concentration, mol/L"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y  tot("S(6)")
30 GRAPH_SY tot("S(-2)"), tot("C(+4)")
  -end
    -active                 true

USER_GRAPH 2
    -headings               C Fe(2) Fe(3)
    -axis_titles            "Carbon added, mol/L" "Fe(2) Concentration, mol/L" "Fe(3) Concentration, mol/L"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y  tot("Fe(2)")
30 GRAPH_SY tot("Fe(3)")
  -end
    -active                 true

END

Code: [Select]
SOLUTION 1
    temp      25
    pH        5.1 charge
    pe        4
    redox     pe
    units     mg/l
    density   1
    Fe(2)     33.2
    Fe(3)     186.8
    Mn(2)     67.6
    S(6)      600
    C(4)      0
    C(-4)     0
    -water    1 # kg


KINETICS 1
Orgc
    -formula  C  1 
    -m        0.5
    -m0       0.5
    -tol      0.000002
-steps       946000 in 15 steps # seconds
-step_divide 1
-runge_kutta 3
-bad_step_max 500

EQUILIBRIUM_PHASES 1
    CO2(g)    0 0
    Fe(OH)3(a) 0 0 precipitate_only
    FeS(ppt)  0 0 precipitate_only
    Goethite  0 0 precipitate_only
    Mackinawite 0 0 precipitate_only
    Pyrolusite 0 0 precipitate_only
    Manganite 0 0 precipitate_only


RATES
Orgc
 -start
1   REM      Additive Monod kinetics for SOC (sediment organic carbon)
2   REM      Electron acceptors: O2, NO3, and SO4

10  if (M <= 0) THEN GOTO 200
20  mO2   = MOL("O2")
30  mNO3  = TOT("N(5)")
40  mSO4  = TOT("S(6)")
50  k_O2  = 15.7    # 1/sec
60  k_NO3 = 1.67e-1   # 1/sec
70  k_SO4 = 1.e-3     # 1/sec
80  rate  = k_O2 * mO2/(2.94e-4 + mO2)
90  rate  = rate + k_NO3 * mNO3/(1.55e-4 + mNO3)
100 rate  = rate + k_SO4 * mSO4/(1.e-4 + mSO4)
110 moles = rate * M * (M/M0) * TIME
200 SAVE moles
 -end

USE equilibrium_phases 1
USE kinetics 1
USE solution 1

USER_GRAPH 1
    -headings               C SO4 S(-2)  C
    -axis_titles            "Carbon added, mol/L" "S(6) Concentration, mol/L" "S(2) Concentration, mol/L"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y  tot("S(6)")
30 GRAPH_SY tot("S(-2)"), tot("C(+4)")
  -end
    -active                 true

USER_GRAPH 2
    -headings               C Fe(2) Fe(3)
    -axis_titles            "Carbon added, mol/L" "Fe(2) Concentration, mol/L" "Fe(3) Concentration, mol/L"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y  tot("Fe(2)")
30 GRAPH_SY tot("Fe(3)")
  -end
    -active                 true

END


Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4336
Re: KINETICS of Orgc
« Reply #1 on: 13/05/24 16:12 »
There is no Orgc_sed in solution that can be removed. The calculation fails because a time step of any length would create a negative concentration of Orgc_sed.

You should use the moles of the kinetic reaction (-M) to keep track of the amount of sedimentary organic matter. If SAVE moles is positive, M decreases. if SAVE moles is negative M increases.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • KINETICS of Orgc
 

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