PhreeqcUsers Discussion Forum

Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • Bimass growth model
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Bimass growth model  (Read 1234 times)

Hamed

  • Frequent Contributor
  • Posts: 17
Bimass growth model
« on: 12/01/24 07:55 »
Hello all,
Hope you are well. I tried to build the -formula in the biomass kinetic part based on the stoichiometry coefficients of the SRB reaction (0.115SO42- + 0.125DOC + 0.004NH3 + 0.23H2O + 0.01H+ → 0.004C5H7O2NSRB + 0.23HCO3- + 0.115HS-) but the code does not converge. I am not sure where I am making the mistake. Could you please take a look at it?

Best,

SOLUTION 1  produced water
pH      7
temp    30
pressure   1
units   mol/kgw
Na              1
Cl              1 charge
Acetate         3.5e-3
S               1.72e-02
C               0.0001
N(-3)           0.0008
#N(+5)           0.035
#END

RATES

Acetate
    -start
10 mu_max=5.5/86400
20 K_acc=5500e-6
30 K_donor=4e-6
40 K_inh=0.1e-3
50 rate = mu_max*KIN("Biomass1")*(MOL("SO4-2")/(MOL("SO4-2")+K_acc))*(MOL("Acetate-")/(MOL("Acetate-")+K_donor))*(K_inh/(MOL("Acetate-")+K_inh))
60 moles = rate*TIME
70 PUT(rate, 1)
80 SAVE moles
    -end

Biomass1
     -start
10 rate = GET(1)
20 rate = rate*1
30 moles = -rate*TIME
40 SAVE moles
        -end

KINETICS 1

Acetate
    -formula Acetate -0.125 C2H3O2 0.125
    -M   3.5e-3
    -tol 1e-8

Biomass1
   -formula  C5H7O2N 0.004  C 0.23  S  0  H -0.262  O 0  N -0.004  Acetate -0.125
     -M   1.36e-4
     -tol  1e-8

-steps 40*1 day
-runge_kutta    6

INCREMENTAL_REACTIONS true
USER_GRAPH 1
    -headings               time KIN(Bimass1) KIN("Acetate") TOT("Acetate") TOT(S(6)) TOT(S(-2))
    -axis_titles            "Days" "Moles" "Molality"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X TOTAL_TIME/86400
20 GRAPH_Y KIN("Biomass1"), KIN("Acetate")
30 GRAPH_SY TOT("Acetate"), TOT("S(6)"), TOT("S(-2)")
  -end
    -active                 true
END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 3996
Re: Bimass growth model
« Reply #1 on: 12/01/24 16:35 »
I think your -formulas are giving you trouble. First, I would use coefficients of 1 for the Acetate reaction, so the RATES expression is simply the consumption of Acetate per second.

Presumably Acetate consumption is the energy producing step, and there is a consequent cell growth related to Acetate consumption. I think your formula for cell growth should not include Acetate or any of the energy-producing reaction; it should just be the elements that are incorporated in the bacterial cells, and you may not even need to do that (you could just account for cell growth assuming the effect on solution composition is small). In the following, I have assumed a cell composition of (CH2O)5(NH3)1. You will have to decide the composition of the bacteria and the proportionality relative to Acetate consumption.

Here is a script that you can work from:

Code: [Select]
SOLUTION 1  produced water
pH      7
temp    30
pressure   1
units   mol/kgw
Na              1
Cl              1 charge
Acetate         3.5e-3
S               1.72e-02
C               0.0001
N(-3)           0.0008
#N(+5)           0.035
#END

RATES

Acetate
    -start
10 mu_max=5.5/86400
20 K_acc=5500e-6
30 K_donor=4e-6
40 K_inh=0.1e-3
50 rate = mu_max*KIN("Biomass1")*(MOL("SO4-2")/(MOL("SO4-2")+K_acc))*(MOL("Acetate-")/(MOL("Acetate-")+K_donor))*(K_inh/(MOL("Acetate-")+K_inh))
60 moles = rate*TIME
70 PUT(rate, 1)
80 SAVE moles
    -end

Biomass1
     -start
10 rate = GET(1)
20 rate = rate*1
30 moles = -rate*TIME
40 SAVE moles
        -end

KINETICS 1

Acetate
    -formula Acetate -1 C2H3O2 1
    -M   3.5e-3
    -tol 1e-8

Biomass1
#   -formula  C5H7O2N 0.004  C 0.23  S  0  H -0.262  O 0  N -0.004  Acetate -0.125
     -formula (CH2O)5(NH3)1 0.004
     -M   1.36e-4
     -tol  1e-8

-steps 40*1 day
-runge_kutta    6

INCREMENTAL_REACTIONS true
USER_GRAPH 1
    -headings               time KIN(Bimass1) KIN("Acetate") TOT("Acetate") TOT(S(6)) TOT(S(-2))
    -axis_titles            "Days" "Moles" "Molality"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X TOTAL_TIME/86400
20 GRAPH_Y KIN("Biomass1"), KIN("Acetate")
30 GRAPH_SY TOT("Acetate"), TOT("S(6)"), TOT("S(-2)")
  -end
    -active                 true
END
Logged

Hamed

  • Frequent Contributor
  • Posts: 17
Re: Bimass growth model
« Reply #2 on: 13/01/24 22:58 »
Thank you for your guide. In the previous model, I added nitrate-reducing sulfate oxidizing bacteria to assess its effect on controlling the HS generation in the system (0.425NO3- + 0.0075NH3(aq) + 0.00375HCO3- + 0.125HS- → 0.0075C5H7O2NRSOB + 0.125SO42- + 0.425NO2- + 0.0825H+ + 0.0225H2O), however, the model does not show any sensitivity to that. I could not figure out what is wrong. Any help would be greatly appreciated.

 
RATES

#srb
Acetate1
    -start
10 mu_max1=5.5/86400  #0.2/86400
20 K_acc1=5500e-6     #3e-6
30 K_donor1=4e-6      #1.8e-6
40 K_inh=0.1e-3       #nitrite
50 rate1 = mu_max1*KIN("Biomass1")*(MOL("SO4-2")/(MOL("SO4-2")+K_acc1))*(MOL("Acetate-")/(MOL("Acetate-")+K_donor1))
60 moles = rate1*TIME
70 PUT(rate1, 1)
80 SAVE moles
    -end



#nrsob nitrate
NRSOB1
    -start
10 mu_max4=9e-4 
20 K_acc4=5e-4 
30 K_donor4=5e-4 
40 rate4 = mu_max4*KIN("Biomass4")*(MOL("NO3-")/(MOL("NO3-")+K_acc4))*(MOL("HS-")/(MOL("HS-")+K_donor4))
50 moles = rate4*TIME
60 PUT(rate4, 4)
70 SAVE moles
    -end

Biomass1
     -start
10 rate = GET(1)
20 rate = rate-1e-7*M
30 moles = -rate*TIME
40 SAVE moles
        -end


Biomass4
     -start
10 rate = GET(4)
20 rate = rate-1e-7*M
30 moles = -rate*TIME
40 SAVE moles
        -end

SOLUTION 1  PW
pH      7.5 
temp    20
pressure   1
units   mol/kgw
Ca              0.022830481
Mg              0.028430364
Na              0.797311187
K               0.010870038
Cl              8.817e-01  charge
C               0.00472
S(6)            0.015208
#Fe(2)          0.00005372
N(+5)            0.005
N(-3)             0.001
Acetate          0.01
EQUILIBRIUM_PHASES 1
calcite  0   1
SAVE solution 1
END

SOLUTION 2  Seawater
units   mol/kgw
pH      7.9
temp    20
pressure   1
Ca              0.0098807
Mg              0.0527463
Na              0.465076
K               0.0099748
Sr              0.0000798904
Cl              5.340e-01 charge
C               6.66e-5
S(6)            0.0331459

EQUILIBRIUM_PHASES 2
CO2(g) -3.44 1.0
SAVE solution 2
END

MIX 1
1 1
2 0

KINETICS 1

Acetate1
    -formula Acetate -1 C2H3O2 1
    -M   0.01

NRSOB1
    -formula N(5) -1 N(3) 1
    -M   0.01

Biomass1
     -formula (CH2O)5(NH3)1  0.032
     -M    7.5e-5

Biomass4
     -formula (CH2O)5(NH3)1  0.0176
     -M    4e-5

-steps 30*0.1 day
-runge_kutta   6

INCREMENTAL_REACTIONS true
USER_GRAPH 1
    -headings               time KIN(Bimass1) KIN("Acetate1") KIN(Bimass4) KIN("NRSOB") TOT("Acetate") TOT(S(6)) TOT(S(-2))
    -axis_titles            "Days" "Moles" "Molality"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X TOTAL_TIME/86400
20 GRAPH_Y KIN("Biomass1"), KIN("Acetate1"), KIN("Biomass4"), KIN("NRSOB1")
30 GRAPH_SY TOT("Acetate"), TOT("S(6)"), TOT("S(-2)")
  -end
    -active                 true
END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 3996
Re: Bimass growth model
« Reply #3 on: 14/01/24 19:22 »
Adding C2H3O2 to the solution with the Acetate -formula will cause reduction of something. Thermodynamics will determine which electron acceptor is used. In general, thermodynamics will cause3 NO3- to be used before NO2- before SO4-2 before CO3-2. So, you should not include the following kinetic reaction.

Code: [Select]
NRSOB1
    -formula N(5) -1 N(3) 1
    -M   0.01

The effect of this reaction is to remove N and add N, for zero net change. Neither the valence state, nor charge are considered in the -formula definition.

If you want complete control on which electron acceptor is used, it is necessary to define each desired redox state as a separate element, and then use KINETICS to convert among valence states. That simulation is much more difficult to set up; you can look at example 9 in the manual. There is also a completely decoupled database if you search the forum for redox.dat. I recommend letting thermodynamics determine the electron acceptors.

One simple thing that you should probably do is to use Amm.dat, which defines ammonium as a separate element. If you use that database, Nitrate will be reduced to N2(aq), but will not be further reduced to ammonium, which is general the sequence that is desired.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • Bimass growth model
 

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