## Batch reactor of MgCl2 with initial Calcite##PHASESMagnesite MgCO3 = CO3-2 + Mg+2 -log_k -7.8 -delta_h -7.048 kcal -analytic 7.267 -0.033918 -1476.604 -Vm 28.018 cm3/mol #RATESCalcite-start10 si_cc=si("Calcite") # log(Q/K)20 omega = sr("Calcite") # Q/K == sr("Calcite")...30 if (m <= 0 and si_cc < 0) then goto 20040 k1 = parm(1)50 k2 = parm(2)60 term = k1 + k2*act("H+")70 moles = term*ABS(1.0-omega)80 fac=1.090 moles=moles*fac*time100 if(omega > 1.0) then moles=-moles # # precipitation has negative sign?110 if (moles > m) then moles = m # cannot dissolve more than already present200 save moles-endMagnesite-start10 si_cc=si("Magnesite") # log(Q/K)20 omega = sr("Magnesite") # Q/K == sr("Calcite")...30 if (m <= 0 and si_cc < 0) then goto 20040 k1 = parm(1)50 k2 = parm(2)60 term = k1 + k2*act("H+")70 moles = term*ABS(1.0-omega)80 fac=1.090 moles=moles*fac*time100 if(omega > 1.0) then moles=-moles # # precipitation has negative sign?110 if (moles > m) then moles = m # cannot dissolve more than already present200 save moles-endSOLUTION 1temp 130unit mol/LMg 0.1095Cl 0.219-water 1 # kgKINETICS 1Calcite -tol 1e-8 -m0 1.181997677 -m 1.181997677 -parms 1.08426E-05 0.35088432Magnesite -tol 1e-8 -m0 0.0 -m 0.0 -parms 4.74168E-12 0-step 13824000 in 16-bad_step_max 10000#-cvode trueINCREMENTAL_REACTIONS trueEND

USE SOLUTION 200USE EQUILIBRIUM_PHASES 200SAVE SOLUTION 200SAVE EQUILIBRIUM_PHASES 200SAVE SOLUTION 1-100SELECTED_OUTPUT-file temp_test.dat-reset false-high_precision trueUSER_PUNCH-start10 a$ = a$ + "pH=" + STR$(-log10(ACT("H+")))+ EOL$20 punch a$-endEND

ENDUSE solution 200REACTIONSELECTED_OUTPUT 200...SELECTED_OUTPUT 1-active falseENDSELECTED_OUTPUT 200-active falseSELECTED_OUTPUT 1-active true