Processes > Dissolution and precipitation
Desalination PHREEQpy applications -- ROSSpy
freiburgermsu:
Dear David,
1)
a) I updated the ICE table, and I noticed a slight discrepancy. The change between the [Ca] and [SO4] are identical, however, the moles of Gypsum precipitation deviates slightly from the changes in the ionic moles:
{'change': {'Ca': -0.018565196026999964, 'Gypsum': 0.019614, 'S': -0.018567569229999803},
'final': {'Ca': 0.335957721232, 'Gypsum': 0.019614, 'S': 1.7969614040000002},
'initial': {'Ca': 0.354522917259, 'Gypsum': 0, 'S': 1.81552897323}}
Is this ~7% deviation between d_[Ca] and d_[SO4] versus d_Gypsum within the error of the calculations, or is summing the d_Gypsum column in the SELECTED_OUTPUT file for this simulation (https://github.com/freiburgermsu/ROSSpy/blob/main/examples/other/ICE_table/selected_output.pqo) not the appropriate approach for determining the moles of Gypsum that precipitate in a timestep of the simulation? I confirmed that the sum of d_Gypsum columns were identical for all timestep shifts after SOLUTION 0 completely passes through the column.
3) Your explanation is very helpful. The approximation, to summarize, is that the least concentrated ion in a precipitation equilibrium is reduced in concentration with equal magnitude to all equilibrium ions collectively? Why is this approximation necessary relative to simultaneously reducing each equilibrium ion by its stoichiometric amount -- i.e. reduce [SO4] and [Ca] each by 1% instead of not reducing [SO4] and reducing [Ca] by 2%? I suppose that these mechanics are only important for intermediary predictions of concentrations, since all instances lead to the same final ionic concentrations.
Thank you for your assistance :)
Andrew
dlparkhurst:
(1) PHREEQC does not report the dispersive/diffusive fluxes, so it is difficult to calculate the mole balance if you have dispersion or diffusion. You would have to numerically estimate the derivatives in the transport equations if you want a complete mole balance.
Here are a couple of checks on mole balance.
(a) If you set -dispersion 0 (default) and -diffusion_coefficient to 0 (default 0.3e-9) in TRANSPORT, then you have a purely advective system. In that case the mass balance for cell n at time j is as follows:
--- Code: ---TOTMOL(n-1,j-1) = TOTMOL(n,j) + EQUI_DELTA(n,j)
--- End code ---
(b) With a dispersive system, if you run 6 shifts, corresponding to half of one pore volume, virtually all of the inflow will still be in the column. The sum of the flux in equals the sum of the dissolved S and gypsum in all cells. The following script makes that calculation.
--- Code: ---SOLUTION 1-12 Initial solution in the RO module
temp 25
pH 7 charge
-water 17.378153556381264
END
KNOBS
-conv 1e-10
SOLUTION 0 red_sea
temp 24.5 #average of Al-Taani et al., 2014 and Longinelli and Craig, 1967..
pH 8.22 charge #None
pe 0.2679 #Al-Taani et al., 2014 // 4.00 is the default (?) // 4.00 is the default (?)
units ppm
Mn 0.000306 #Al-Taani et al., 2014 for the Northern Gulf of Aqaba
Fe 0.006281 #Al-Taani et al., 2014 for the Northern Gulf of Aqaba
B 1.344 #Al-Taani et al., 2014
Cl 24756 #https://www.lenntech.com/composition-seawater.htm in the Red Sea, and Longinelli and Craig, 1967
Na 16417.2 #https://www.lenntech.com/composition-seawater.htm in the Red Sea, and Longinelli and Craig, 1967 describes [Na]=15834
S(6) 9500 #Longinelli and Craig, 1967 and Llyod, 1967
Ca 774 #Abdel-Aal et al., 2015
K 301 #Abdel-Aal et al., 2015
Mg 1646 #Abdel-Aal et al., 2015
Sr 8.3 #Bernat, Church, and Allegre, 1972 from the Mediterranean
Ba 0.011 #Bernat, Church, and Allegre, 1972 from the Mediterranean
Li 0.228 #Stoffyn-Egli and Mackenzie, 1984 for the Mediterranean Sea
-water 17.378153556381264
USER_PRINT
10 PUT(TOTMOL("S"), 1)
20 PUT(TOTMOL("Ca"), 2)
END
USER_PRINT
10 REM
END
EQUILIBRIUM_PHASES 1-12
Gypsum 0 0
END
REACTION 1
H2O -1; 9.057149147747937
REACTION 2
H2O -1; 8.952016761697115
REACTION 3
H2O -1; 8.846884375646292
REACTION 4
H2O -1; 8.74175198959547
REACTION 5
H2O -1; 8.636619603544647
REACTION 6
H2O -1; 8.531487217493824
REACTION 7
H2O -1; 8.426354831443
REACTION 8
H2O -1; 8.321222445392177
REACTION 9
H2O -1; 8.216090059341354
REACTION 10
H2O -1; 8.110957673290532
REACTION 11
H2O -1; 8.005825287239709
REACTION 12
H2O -1; 7.9006929011888865
#linear_permeate
#Effluent module 1:
#Estimated CF: 1.118E0
#Estimated solution mass: 15.545180409311685
END
USER_PRINT
10 IF CELL_NO = 1 THEN PUT(0, 3) # sum EQUI
20 IF CELL_NO = 1 THEN PUT(0, 4) # sum TOTMOL
30 PUT(GET(3) + EQUI("Gypsum"), 3)
40 PUT(GET(4) + TOTMOL("S"), 4)
50 IF (CELL_NO < 12) THEN GOTO 200
60 t_S_in = GET(1)*STEP_NO
70 PRINT "Flux of S into column, moles: ", STR_F$(t_S_in, 20, 10)
80 PRINT "Gypsum in column, moles: ", STR_F$(GET(3), 20, 10)
90 PRINT "Dissolved S, moles: ", STR_F$(GET(4), 20, 10)
100 PRINT "Flux - Gypsum - dissolved: ", STR_F$(t_S_in - GET(3) - GET(4), 20, 10)
200 END
TRANSPORT
-cells 12
-shifts 6
-lengths 0.08466666666666667
-time_step 3.946329703005324 # this satisfies the Courant condition with a feed velocity of 2.575E-1 m/s
-initial_time 0
-boundary_conditions flux flux
-punch_cells 1-12
-print_cells 1-12
-punch_frequency 1
-print_frequency 6
-disp 0.008
END
--- End code ---
3. I was only trying to answer your question as simply as possible. There are probably better ways, but in the end, I rely on the PHREEQC calculation. Here is a batch calculation showing the evolution of your Red Sea water as water is extracted. A concentration factor of 10 results in halite supersaturation.
--- Code: ---SOLUTION 1 red_sea
temp 24.5 #average of Al-Taani et al., 2014 and Longinelli and Craig, 1967..
pH 8.22 charge #None
pe 0.2679 #Al-Taani et al., 2014 // 4.00 is the default (?) // 4.00 is the default (?)
units ppm
Mn 0.000306 #Al-Taani et al., 2014 for the Northern Gulf of Aqaba
Fe 0.006281 #Al-Taani et al., 2014 for the Northern Gulf of Aqaba
B 1.344 #Al-Taani et al., 2014
Cl 24756 #https://www.lenntech.com/composition-seawater.htm in the Red Sea, and Longinelli and Craig, 1967
Na 16417.2 #https://www.lenntech.com/composition-seawater.htm in the Red Sea, and Longinelli and Craig, 1967 describes [Na]=15834
S(6) 9500 #Longinelli and Craig, 1967 and Llyod, 1967
Ca 774 #Abdel-Aal et al., 2015
K 301 #Abdel-Aal et al., 2015
Mg 1646 #Abdel-Aal et al., 2015
Sr 8.3 #Bernat, Church, and Allegre, 1972 from the Mediterranean
Ba 0.011 #Bernat, Church, and Allegre, 1972 from the Mediterranean
Li 0.228 #Stoffyn-Egli and Mackenzie, 1984 for the Mediterranean Sea
END
REACTION 1
H2O -1
48.5625 in 200 step
END
EQUILIBRIUM_PHASES 1
Gypsum 0 0
END
USER_GRAPH 1
-headings factor Cl S Ca Gyp
-axis_titles "Concentration factor" "Log molality" "Gypsum, moles"
-initial_solutions false
-connect_simulations true
-plot_concentration_vs x
-start
10 GRAPH_X (1 / TOT("water"))
20 GRAPH_Y log10(TOT("Cl"))
30 GRAPH_Y log10(TOT("S"))
40 GRAPH_Y log10(TOT("Ca"))
50 GRAPH_SY (EQUI("Gypsum"))
100 END
-end
-active true
END
INCREMENTAL_REACTIONS
USE solution 1
USE equilibrium_phases 1
USE reaction 1
END
--- End code ---
freiburgermsu:
Dear David,
1) I did not consider the affects of diffusion fluxes. I appreciate your explanations and the PQI files that exemplify the mole balance in each system. These are very helpful for my understanding.
3) I clearly see the trends in ionic concentrations and Gypsum moles that you described. I will trust the results from PHREEQ.
I just posted an inquiry about the use of PHREEQpy in unix operating systems to this forum (https://phreeqcusers.org/index.php/topic,1864.0.html), although, I am not certain whether you are familiar with the mechanics of this PHREEQ iteration. I will, nevertheless, contact you again as more questions emerge in the coming weeks.
Thank you for your assistance :)
Andrew
Navigation
[0] Message Index
[*] Previous page
Go to full version