PhreeqcUsers Discussion Forum

Conceptual Models => Kinetics and rate controlling factors => Topic started by: sama.k on August 24, 2020, 12:27:22 AM

Title: The initial mole value of the precipitating substance
Post by: sama.k on August 24, 2020, 12:27:22 AM
Hello;
According to the previous posts and the program manuals about the rate expression, I modeled the Hydrotalcite precipitation kinetically as the following code.
As I noticed, the SAVEd quantity in RATES must be moles. So, specific surface area (with units of m^2/g) should be multiplied by the initial value of Hydrotalcite (with units of g) however, the initial value of Hydrotalcite is zero. could you please guide me in this regard.
And one more question, what should I consider for the two parameters M and M0 in KINETICS keywords? Zero or a very small amount?
Any help or advice will be greatly appreciated.
Many thanks

Code: [Select]
PHASES
Hydrotalcite
    Mg4Al2(OH)14:3H2O + 14H+ = 2Al+3 + 4Mg+2 + 17H2O
    log_k     75.97
    delta_h   -607.91 kJ
RATES
    Hydrotalcite
-start
10 REM   PARM(1) = A,  mineral specific reactive surface area, (m^2/g)
20 REM   PARM(2) = rate constant (rf), (mol.m-2.s-1)
30 si_Ht = SI("Hydrotalcite")
40 IF M0 > 0 THEN t = M/M0
50 IF t = 0 THEN t = 1
60 area = PARM(1)*(t)^(2/3)
70 a_rate = area*PARM(2)*(1-10^(si_Ht))
80 SAVE rate * time
-end
KINETICS 1
Hydrotalcite
    -formula  Mg4Al2(OH)14:3H2O  -1
    -m        1
    -m0       1
    -parms    9.8 1e-009
    -tol      1e-008
-steps       864000 in 10 steps # seconds
-step_divide 1
-runge_kutta 3
-bad_step_max 500

Title: Re: The initial mole value of the precipitating substance
Post by: dlparkhurst on August 24, 2020, 12:58:22 AM
To be honest, I've never dealt with the issue of precipitation in the absence of mineral. You probably need to go to the literature to see how people have tried to simulate the process. My uninformed thought would be to have two terms, one that is dependent on (1 - SR),  and one that is dependent on moles of mineral (M) and (1 - SR).
Title: Re: The initial mole value of the precipitating substance
Post by: Charlie on August 24, 2020, 03:19:41 PM
you can try adding a nucleation rate in the RATE block to initiate some moles if there are none to start with but the solution is saturated with respect to the mineral
 e.g.


20 If (m <= 0) and (SI("INSERT MINERAL") > 0)          then GoTo 120  ## nucleation


########## start nucleation       ##########
120 rate = 1E-8                            ##### a small amount as a seed
125 GOTO 133

133 moles = rate * TIME
140 SAVE moles
-end
Title: Re: The initial mole value of the precipitating substance
Post by: Charlie on August 24, 2020, 04:08:34 PM
Also- I found that to get RATES to precipitate mineral it needs a - sign in the rate expression (as I think RATES is designed for dissolution mainly)
Title: Re: The initial mole value of the precipitating substance
Post by: dlparkhurst on August 24, 2020, 04:25:02 PM
The sign convention is confusing, but dissolution or precipitation depends on both the value that is SAVEd and the coefficient in -formula of KINETICS. If the product of these two numbers is positive, the reactant will be added to solution. If the product is negative, the reactant will be removed. However, the change in the value of M, the amount of kinetic reactant depends only on the SAVEd value.

Dissolution, M decreases:

Code: [Select]
RATES
...
100 SAVE 1
KINETICS
...
-formula Mineral 1

Also dissolution, but M increases:

Code: [Select]
RATES
...
100 SAVE -1
KINETICS
...
-formula Mineral -1

Precipitation, M decreases:

Code: [Select]
RATES
...
100 SAVE 1
KINETICS
...
-formula Mineral -1

Also precipitation, but M increases:

Code: [Select]
RATES
...
100 SAVE -1
KINETICS
...
-formula Mineral 1
Title: Re: The initial mole value of the precipitating substance
Post by: MichaelZ20 on August 24, 2020, 06:45:59 PM
Hello!
Could you please explain how it is possible that the current moles of the kinetic reactant decrease (the negative sign of the rate) at its precipitation.
Title: Re: The initial mole value of the precipitating substance
Post by: dlparkhurst on August 24, 2020, 08:22:31 PM
You are thinking of it conceptually. All I am saying is how the program makes the calculations. If you have

Code: [Select]
RATES
...
100 SAVE moles

then the change in moles of reactant, M, is as follows, whether moles is positive or negative:

M = M - moles
Title: Re: The initial mole value of the precipitating substance
Post by: MichaelZ20 on August 24, 2020, 09:59:36 PM
Thank you for the explanation
Title: Re: The initial mole value of the precipitating substance
Post by: sama.k on August 28, 2020, 04:34:34 PM
Hello;

Thanks for your help

I simulated the Hydrotalcite precipitation rate according to your recommendation as the following code.
Do you have any comments on this code?
Also, I do not understand the difference between the two diagrams 1 and 2 (equi("-") and KIN("-")) in this model. Could you please explain the output of these two diagrams.

Any help or advice will be greatly appreciated.
Many thanks

Code: [Select]
PHASES
Hydrotalcite
    Mg4Al2(OH)14:3H2O + 14H+ = 2Al+3 + 4Mg+2 + 17H2O
    log_k     75.97
    delta_h   -607.91 kJ
RATES
    Hydrotalcite
-start
10 REM   PARM(1) = A,  mineral specific reactive surface area, (m^2/g)
20 REM   PARM(2) = rate constant (rf), (mol.m-2.s-1)
30 REM   PARM(3) = molecular weight, (g/mol)
40 si_ht = SI("Hydrotalcite")
50 IF (M <= 0) and (si_ht > 0) THEN rate = 1E-8
60 IF (M <= 0) and (si_ht > 0) THEN goto 90
70 area = PARM(1)*PARM(3)* M
80 rate = area*PARM(2)*(1-10^(si_Ht))
90 SAVE mole= -rate*TIME
-end
KINETICS 1
Hydrotalcite
    -formula  Mg4Al2(OH)14:3H2O  1
    -m        0
    -m0       0
    -parms    9.8 1e-09 603.98
    -tol      1e-08
-steps       2419200 in 28 steps # seconds
-step_divide 1
-runge_kutta 3
-bad_step_max 5000
-cvode true
-cvode_steps 100
-cvode_order 5
INCREMENTAL_REACTIONS True

USER_GRAPH 2
    -axis_titles            "Time (days)" "Hydrotalcite (mol)" ""
    -chart_title            "KIN of Hydrotalcite"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X total_time/86400
20 GRAPH_Y KIN("Hydrotalcite")
  -end
    -active                 true
USER_GRAPH 1
    -headings               Time Hydrotalcite
    -axis_titles            "Time (days)" "Hydrotalcite (mol)" ""
    -chart_title            "equi of Hydrotalcite"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X total_time/86400
20 GRAPH_Y equi("Hydrotalcite")
  -end
    -active                 true
Title: Re: The initial mole value of the precipitating substance
Post by: dlparkhurst on August 28, 2020, 04:49:27 PM
You did not include a complete script, so I can't look at results.

If the question is what is the difference between EQUI and KIN, the EQUI is the amount of an EQUILIBRIUM_PHASE, and  KIN is the amount of a KINETIC reactant. Normally, you would use either KINETICS or EQUILIBRIUM_PHASES for a mineral, Hydrotalcite in your case. If you use KINETICS, your solution should approach equilibrium with Hydrotalcite over a period of time determined by the RATES definition. If you use EQUILIBRIUM_PHASES, the solution will instantly be in equilibrium with Hydrotalcite and remain in equilibrium (or dissolve completely) as reactions occur.