PhreeqcUsers Discussion Forum

Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Convergence Problem
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Convergence Problem  (Read 794 times)

Rozeran

  • Frequent Contributor
  • Posts: 12
Convergence Problem
« on: 01/05/24 21:32 »
Hi everyone,

I am working on Cr(6) reduction with Fe(0). I have two kinetics and two rate blocks defined. One for iron corrosion and one for Cr(6) reduction.

The rate definiton for iron corrosion includes surface area update and this updated surface area is used in rate formula of Cr(6).

I am using minteq.v4 as a database.

During run I get this message:

ERROR: Bad RK steps > 1000 in cell 1. Please decrease (time)step or increase -bad_step_max.

After this message I changed the -bad_step_max to 1000 (it was 500 before). But it exceeded 1000 too. It seems like it is not converging.

How I can solve this?

Thanks in advance!

Code: [Select]
SOLUTION 0
       temp 25
units mmol/kgw
pH 7.0
       Cr(6) 0.385
Na  10.0 charge
       Cl  10.0
SOLUTION 1-15
       temp 25
units mmol/kgw
       pH  7.0
EQUILIBRIUM_PHASES 1-15
CO2(g) -3.5
       Calcite 0.0
END
RATES
ZVI_Corrosion
-start
20 f1 = 0.1
30 PUT(f1,1)
40 fC = (PHASE_VM("Calcite")*EQUI("Calcite"))/SOLN_VOL
50 SA = 65*EXP(-1*fC)   
75 PUT(SA, 2)
80 rate = f1 * SA * M
85 PUT(rate, 3)
90 moles = rate * TIME
200 SAVE moles
-end

Cr_Reduction
-start
10 Cr_six = TOT("Cr(6)")
20 if (Cr_six <= 0) then goto 200
30 Crk = 1e-6
35 PUT(Crk, 4)
40 K = 1e-5
50 f1 = Cr_six
55 S = GET(2)
60 rate = Crk * S * (f1/(K + f1))
65 PUT(rate, 5)
70 moles = rate * TIME
200 SAVE moles
-end

KINETICS 1-15
Cr_Reduction
-formula Fe+3 1.0 H2O 4.0 Cr+3 1.0 CrO4-2 -1.0  H+ -8.0 Fe -1.0
  -tol 1e-30
-bad_step_max 1000
ZVI_Corrosion
      -m0 29.10
      -formula Fe 1.0
-tol 1e-30
-bad_step_max 1000
END
TRANSPORT
 -cells 15
 -length 0.01 #meters
 -shifts 2310
 -time_step 561.2 #seconds
 -flow_direction forward
 -boundary_condition flux flux
 -dispersivity 0.0014
 -correct_disp true
 -diffusion_coef 0.595e-9 #####diffusion coeff for Cr3+ cation is used###
 -punch_cells 1-15
 -punch_frequency  1
 -print_cells 1-15
 -print_frequency 1

SELECTED_OUTPUT
 -file HOPE_1.sel
 -reset true

USER_PUNCH
 -headings ZVI_Corr_k ZVI_Corr_SA ZVI_Corr_rate Cr_reduction_k Cr_reduction_rate  Na_Conc Cl_Conc Cr(VI)_Conc Cr(III)_Conc Fe(II)_Conc Fe(III)_Conc Fe_Conc SI_Aragonite SI_Calcite SI_Siderite SI_Ferrihydrite KIN(Cr_reduction) KIN(ZVI_Corrosion)
10 ZVI_Corr_k = GET(1)
20 ZVI_Corr_SA = GET(2)
30 ZVI_Corr_rate = GET(3)
40 Cr_reduction_k = GET(4)
50 Cr_reduction_rate = GET(5)
60 PUNCH ZVI_Corr_k, ZVI_Corr_SA, ZVI_Corr_rate, Cr_reduction_k, Cr_reduction_rate, TOT("Na"), TOT("Cl"), TOT("Cr(6)"), TOT("Crtri"), TOT("Fe(2)"), TOT("Fe(3)"), TOT("Fe"), SI("Aragonite"), SI("Calcite"), SI("Siderite"), SI("Ferrihydrite"), KIN("Cr_Reduction"), KIN("ZVI_Corrosion")
END


Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 3996
Re: Convergence Problem
« Reply #1 on: 02/05/24 04:46 »
Kinetics adds the net change in element concentrations as defined by -formula. The net change for your Cr reaction is zero, so it has no effect.

I think you want to add ZVI kinetically. It will cause the reduction of Cr(6) , you need no other kinetic reactant. Using just ZVI kinetics still does not work, so I suspect there is also a problem with that rate.

Try a batch kinetic reaction for a very short time (say 1e-9) to see if that runs. Try longer time intervals and see if you can figure out what the problem is.

Use the defaults for the KINETIC parameters. 1e-30 is not possible for a tolerance.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Convergence Problem
 

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