# PhreeqcUsers Discussion Forum

## Processes => Mixing => Topic started by: dlparkhurst on May 05, 2014, 04:42:09 PM

Title: REACTION increments
Post by: dlparkhurst on May 05, 2014, 04:42:09 PM
Q. I came across this code at one of your website. I would to understand the numbers in the REACTION data block.

REACTION
H2O -1; 0 36 3*4 6*1 2*0.25 0.19 4*0.1 2*0.05 0.04
INCREMENTAL_REACTIONS true

(See below for entire input file).

A.

The values following the semicolon are moles of reaction. The reaction is H2O -1, which indicates H2O is removed from solution by the reaction, which represents evaporation.

Because INCREMENTAL_REACTIONS is true, the moles of reaction are sequential, meaning that first, 0 moles are removed; then 36 moles are removed from that result; then 4 moles are removed (for a total of 40); then 4 moles (44); 4 moles (48), then 1 mole (49); etc. The "*" notation is the number of times that moles are removed (6*1, means 1 mole is removed 6 times).

If INCREMENTAL_REACTIONS is false (default), the amounts of reaction are cumulative. To do the same calculation with incremental reactions false, you would use

H2O -1; 0 36 40 44 48, 49 ...

Complete input file:

DATABASE c:\phreeqc\database\pitzer.dat
SOLUTION 1
pH 8.22
Na 485; K 10.6;         Mg 55.1;  Ca 10.7
Cl 566; Alkalinity 2.4; S(6) 29.3
EQUILIBRIUM_PHASES
# carbonates...
CO2(g) -3.5 10; Calcite 0 0
# sulfates...
Gypsum 0 0;     Anhydrite 0 0;  Glauberite 0 0;  Polyhalite 0 0
Epsomite 0 0;   Kieserite 0 0;  Hexahydrite 0 0
# chlorides...
Halite 0 0;     Bischofite 0 0; Carnallite 0 0
USER_GRAPH
-head H2O Na K Mg Ca Cl SO4 Calcite Gypsum Anhydrite Halite\
Glauberite Polyhalite Epsomite Hexahydrite Kieserite\
Carnallite Bischoffite
-init false
-axis_scale x_axis -2 1 0.5
-axis_scale y_axis -5 1.2 1
-axis_scale sy_axis -5 20 5 100
-axis_titles "(negative of) moles of water, -log(H2O / mol)" "log( i / (mol/kgw))"  "log( solid / mol)"
-chart_title "Evaporating 1 L Seawater"
-start
10 graph_x -log10(tot("water") / 18e-3)
20 graph_y log10(tot("Na")), log10(tot("K")), log10(tot("Mg")), log10(tot("Ca")), log10(tot("Cl")), log10(tot("S"))
30 if equi("Calcite") > 1e-10 then graph_sy log10(equi("Calcite")) else graph_sy -5
35 if equi("Gypsum") > 1e-10 then graph_sy log10(equi("Gypsum")) else graph_sy -5
40 if equi("Anhydrite") > 1e-10 then graph_sy log10(equi("Anhydrite")) else graph_sy -5
50 if equi("Halite") > 1e-10 then graph_sy log10(equi("Halite")) else graph_sy -5
60 if equi("Glauberite") > 1e-10 then graph_sy log10(equi("Glauberite")) else graph_sy -5
70 if equi("Polyhalite") > 1e-10 then graph_sy log10(equi("Polyhalite")) else graph_sy -5
80 if equi("Epsomite") > 1e-10 then graph_sy log10(equi("Epsomite")) else graph_sy -5
90 if equi("Hexahydrite") > 1e-10 then graph_sy log10(equi("Hexahydrite")) else graph_sy -5
100 if equi("Kieserite") > 1e-10 then graph_sy log10(equi("Kieserite")) else graph_sy -5
110 if equi("Carnallite") > 1e-10 then graph_sy log10(equi("Carnallite")) else graph_sy -5
120 if equi("Bischofite") > 1e-10 then graph_sy log10(equi("Bischofite")) else graph_sy -5
-end
REACTION
H2O -1; 0 36 3*4 6*1 2*0.25 0.19 4*0.1 2*0.05 0.04
INCREMENTAL_REACTIONS true
PRINT; -reset false; -status false
END