Hi,

I trying to model a reactive transport of uranium bioreduction. I wrote bioreactions and their rate laws under the RATES and KINETICS keywords but it is running so slow, and simulations don't proceed after a certain time and just freeze middle of the run. Is there any reason that causes to slows the run and prevent terminating the simulation? I tried to increase the step size and decrease the mesh size but it didn't work. The simulation was fast at the beginning and super slow after a while.

Thanks,

Ahmet

## HP2 running so slow

### Re: HP2 running so slow

Hi,

one possibility is that your system / rate equations become stiff. Sometimes this can be solved by using the cvode option in the KINETIC data block.

Did you test the rate equations for relevant geochemical conditions in batch mode (phreeqc) or 1D? this might give more insight in the stability of solving the rate equations for your particular problem

Diederik

one possibility is that your system / rate equations become stiff. Sometimes this can be solved by using the cvode option in the KINETIC data block.

Did you test the rate equations for relevant geochemical conditions in batch mode (phreeqc) or 1D? this might give more insight in the stability of solving the rate equations for your particular problem

Diederik

### Re: HP2 running so slow

I tried cvode but it is still slow and it doesn't converge after some point.

Also, I tried in HP1 but it is still the same. I am using the Monod type equation for uranium bioreduction and cell growth. I think I should try to modify the step_divide to find a value that runs fast and converge.

By the way, the Phreeqc script that I used in Hydrus doesn't work in Phreeqc GUI. OK keep increasing but the simulation doesn't proceed. The screenshot of the window is below.

Also, I tried in HP1 but it is still the same. I am using the Monod type equation for uranium bioreduction and cell growth. I think I should try to modify the step_divide to find a value that runs fast and converge.

By the way, the Phreeqc script that I used in Hydrus doesn't work in Phreeqc GUI. OK keep increasing but the simulation doesn't proceed. The screenshot of the window is below.

### Re: HP2 running so slow

Can you send the phreeqc script?

diederik

diederik

### Re: HP2 running so slow

Here is the script.

KNOBS

-iterations 450

-convergence_tolerance 1e-08

-tolerance 1e-18

-step_size 10

-pe_step_size 5

-diagonal_scale true

SOLUTION_MASTER_SPECIES

Ethoxide HEthoxide 0.0 46.0605 46.0605 #HEthoxide=Ethanol

SOLUTION_SPECIES

H2O + 0.01e- = H2O-0.01 #for convergence

log_k -9.0

HEthoxide = HEthoxide

log_k 0.0

HEthoxide=Ethoxide- + H+ # F Caldin, B. E., & Long, G. (1954).

log_k -15.5

SURFACE_SPECIES

Hfo_wOH + UO2(CO3)2-2 = Hfo_wOHUO2(CO3)2-2

log_k 5.0

-no_check

-mole_balance Hfo_wOHUO2(CO3)2

SOLUTION 0

temp 25

pH 7.933

pe 4

redox pe

units mol/kgw

density 1

Br 1.22e-06

Ethoxide 0.15

Cl 0.000586

Fe(3) 0.000133

N(5) 0.00119

S(-2) 1.26e-07

S(6) 0.00148

U(6) 1.25e-06

Alkalinity 3.854e-03

Ca 1.41E-03

K 4.79E-05

Mg 1.76E-03

Na 2.84E-03

-water 1 # kg

SOLUTION 1-10

temp 25

pH 7.933

pe 4

redox pe

units mol/kgw

density 1

Br 1e-19

Ethoxide 1e-19

Cl 0.000586

Fe(3) 0.000133

N(5) 0.00119

S(-2) 1.26e-07

S(6) 0.00148

U(6) 1.25e-06

Alkalinity 3.854e-03

Ca 1.41E-03

K 4.79E-05

Mg 1.76E-03

Na 2.84E-03

-water 1 # kg

SURFACE 1-10

-equilibrate with solution 1

Hfo_w 0.018975

-no_edl

END

RATES

u_reduction

# -formula UO2(CO3)2-2 -1 HEthoxide -0.167 H2O -0.833 HCO3- 2.33 H+ 0.33

-start

9 if (TOT("U")< 5e-10 and TOT("Ethoxide")=0.141) then goto 32

10 qm=0.5 #mol/day

11 stoi=0.167 #ethanol stoichiometric coefficient

12 Ks_etoh= 8.683e-07 #half saturation for ethanol

13 Ks_U= 5.000e-04 #half saturation for UO2+2

20 f1= TOT("Ethoxide")/(Ks_etoh + TOT("Ethoxide"))

21 f2= (TOT("U(6)")-(MOL("CaUO2(CO3)3-2") + MOL("Ca2UO2(CO3)3") + MOL("MgUO2(CO3)3-2")))/(Ks_U + TOT("U(6)")-(MOL("CaUO2(CO3)3-2") + MOL("Ca2UO2(CO3)3") + MOL("MgUO2(CO3)3-2"))) #bioavailable U

30 rate = qm*stoi*f1*f2*(1-EXP(-0.510665* KIN("CELL"))) #dUO2+2/dt = (1-exp(-p*X)*qm*X*S(C_etoh/(Ks_etoh+C_etoh)*(bioavailable_U/(Ks_U+bioavailable_U) # p is lag coefficient

31 moles = rate * TIME

32 SAVE moles

40 PUT(rate, 1)

41 PUT(moles, 2)

42 PUT(qm, 3)

-end

CELL #cell growth

-start

9 if (TOT("U")< 5e-10 and TOT("Ethoxide")=0.141) then goto 90

15 moles = -GET(3) * TIME *M

90 SAVE moles

91 PUT(rate1, 21)

92 PUT(rate, 22)

93 PUT(moles, 23)

-end

KINETICS 1-10

u_reduction

-formula UO2(CO3)2-2 -1 HEthoxide -0.167 H2O -0.833 HCO3- 2.33 H+ 0.33

-tol 1e-008

CELL

-formula H 0

-m0 0.00051 #initial cell mass

-tol 1e-008

INCREMENTAL_REACTIONS true

TRANSPORT

-cells 10

-shifts 807.4752986

-time_step 1802.848684

-lengths 10*0.01496

-dispersivities 10*0.1

-print_cells 10

-print_frequency 1000

-punch_cells 10

-punch_frequency 10

END

KNOBS

-iterations 450

-convergence_tolerance 1e-08

-tolerance 1e-18

-step_size 10

-pe_step_size 5

-diagonal_scale true

SOLUTION_MASTER_SPECIES

Ethoxide HEthoxide 0.0 46.0605 46.0605 #HEthoxide=Ethanol

SOLUTION_SPECIES

H2O + 0.01e- = H2O-0.01 #for convergence

log_k -9.0

HEthoxide = HEthoxide

log_k 0.0

HEthoxide=Ethoxide- + H+ # F Caldin, B. E., & Long, G. (1954).

log_k -15.5

SURFACE_SPECIES

Hfo_wOH + UO2(CO3)2-2 = Hfo_wOHUO2(CO3)2-2

log_k 5.0

-no_check

-mole_balance Hfo_wOHUO2(CO3)2

SOLUTION 0

temp 25

pH 7.933

pe 4

redox pe

units mol/kgw

density 1

Br 1.22e-06

Ethoxide 0.15

Cl 0.000586

Fe(3) 0.000133

N(5) 0.00119

S(-2) 1.26e-07

S(6) 0.00148

U(6) 1.25e-06

Alkalinity 3.854e-03

Ca 1.41E-03

K 4.79E-05

Mg 1.76E-03

Na 2.84E-03

-water 1 # kg

SOLUTION 1-10

temp 25

pH 7.933

pe 4

redox pe

units mol/kgw

density 1

Br 1e-19

Ethoxide 1e-19

Cl 0.000586

Fe(3) 0.000133

N(5) 0.00119

S(-2) 1.26e-07

S(6) 0.00148

U(6) 1.25e-06

Alkalinity 3.854e-03

Ca 1.41E-03

K 4.79E-05

Mg 1.76E-03

Na 2.84E-03

-water 1 # kg

SURFACE 1-10

-equilibrate with solution 1

Hfo_w 0.018975

-no_edl

END

RATES

u_reduction

# -formula UO2(CO3)2-2 -1 HEthoxide -0.167 H2O -0.833 HCO3- 2.33 H+ 0.33

-start

9 if (TOT("U")< 5e-10 and TOT("Ethoxide")=0.141) then goto 32

10 qm=0.5 #mol/day

11 stoi=0.167 #ethanol stoichiometric coefficient

12 Ks_etoh= 8.683e-07 #half saturation for ethanol

13 Ks_U= 5.000e-04 #half saturation for UO2+2

20 f1= TOT("Ethoxide")/(Ks_etoh + TOT("Ethoxide"))

21 f2= (TOT("U(6)")-(MOL("CaUO2(CO3)3-2") + MOL("Ca2UO2(CO3)3") + MOL("MgUO2(CO3)3-2")))/(Ks_U + TOT("U(6)")-(MOL("CaUO2(CO3)3-2") + MOL("Ca2UO2(CO3)3") + MOL("MgUO2(CO3)3-2"))) #bioavailable U

30 rate = qm*stoi*f1*f2*(1-EXP(-0.510665* KIN("CELL"))) #dUO2+2/dt = (1-exp(-p*X)*qm*X*S(C_etoh/(Ks_etoh+C_etoh)*(bioavailable_U/(Ks_U+bioavailable_U) # p is lag coefficient

31 moles = rate * TIME

32 SAVE moles

40 PUT(rate, 1)

41 PUT(moles, 2)

42 PUT(qm, 3)

-end

CELL #cell growth

-start

9 if (TOT("U")< 5e-10 and TOT("Ethoxide")=0.141) then goto 90

15 moles = -GET(3) * TIME *M

90 SAVE moles

91 PUT(rate1, 21)

92 PUT(rate, 22)

93 PUT(moles, 23)

-end

KINETICS 1-10

u_reduction

-formula UO2(CO3)2-2 -1 HEthoxide -0.167 H2O -0.833 HCO3- 2.33 H+ 0.33

-tol 1e-008

CELL

-formula H 0

-m0 0.00051 #initial cell mass

-tol 1e-008

INCREMENTAL_REACTIONS true

TRANSPORT

-cells 10

-shifts 807.4752986

-time_step 1802.848684

-lengths 10*0.01496

-dispersivities 10*0.1

-print_cells 10

-print_frequency 1000

-punch_cells 10

-punch_frequency 10

END

### Re: HP2 running so slow

what is database that you use?

### Re: HP2 running so slow

I used phreeqcU.dat with adding Ca and Mg uranyl species.

#calcium uranyl carbonates

1.000Ca+2 + 1.000UO2+2 + 3.000CO3-2 = CaUO2(CO3)3-2

#-llnl_gamma 4.7

log_k 27.180 #06DON/BRO, 2014 THO/HUM

# delta_h 0.000 #kJ/mol

# Enthalpy of formation: #kJ/mol

-analytic 2.718E+1 0E+0 0E+0 0E+0 0E+0

2.000Ca+2 + 1.000UO2+2 + 3.000CO3-2 = Ca2UO2(CO3)3

#-llnl_gamma 3.4

log_k 30.700 #06DON/BRO 2014 THO/HUM LOGK=29.22

# delta_h 0.000 #kJ/mol

# Enthalpy of formation: #kJ/mol

-analytic 3.07E+1 0E+0 0E+0 0E+0 0E+0

#magnesium uranyl carbonates

UO2+2 + Mg+2 + 3CO3-2 = MgUO2(CO3)3-2

log_k 26.11 # Dong and Brooks, 2006

#calcium uranyl carbonates

1.000Ca+2 + 1.000UO2+2 + 3.000CO3-2 = CaUO2(CO3)3-2

#-llnl_gamma 4.7

log_k 27.180 #06DON/BRO, 2014 THO/HUM

# delta_h 0.000 #kJ/mol

# Enthalpy of formation: #kJ/mol

-analytic 2.718E+1 0E+0 0E+0 0E+0 0E+0

2.000Ca+2 + 1.000UO2+2 + 3.000CO3-2 = Ca2UO2(CO3)3

#-llnl_gamma 3.4

log_k 30.700 #06DON/BRO 2014 THO/HUM LOGK=29.22

# delta_h 0.000 #kJ/mol

# Enthalpy of formation: #kJ/mol

-analytic 3.07E+1 0E+0 0E+0 0E+0 0E+0

#magnesium uranyl carbonates

UO2+2 + Mg+2 + 3CO3-2 = MgUO2(CO3)3-2

log_k 26.11 # Dong and Brooks, 2006