PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • USER_PUNCH/USER_GRAPH »
  • BASIC functions »
  • Where or How to introduce the following composition of water
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Where or How to introduce the following composition of water  (Read 166 times)

benji

  • Contributor
  • Posts: 7
Where or How to introduce the following composition of water
« on: February 28, 2023, 02:53:21 PM »
Hello dear PHREEQC users,
I'm new to PHREEQC, just found out. However, I have a water quality study project to reduce the fouling phenomenon. I have a composition of water as follows:
NaCl                         500 mg/l
CaCO3                      390 mg/l
MgSO4                     100 mg/l
FeO/Fe2O3                   1 mg/l
Al2Si2O5(OH)4       1000 mg/l
HCl                             0 mg/l

In a volume of 150 l of water of which I do not know the pH, the pe and the temperature for the moment, I take them to the default values.

Now, I don't know in which block (SOLUTION, PHASES, REACTION, EXCHANGE, EQUILIBRIUM_PHASES ...) I will introduce them since:
--> In SOLUTION, I just find the ionic elements and not the way to input the water componnent
--> In EQUILIBRIUM_PHASES, the simulation says error, elements not found...

Please, I ask for your help.
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Where or How to introduce the following composition of water
« Reply #1 on: February 28, 2023, 03:34:11 PM »
Here is a script to get you started. It takes pure water and adds the compounds that you list with a REACTION. REACTION requires moles of reactants to be defined, not milligrams, so the USER_PRINT data block calculates mmol of reactants and writes the REACTION data block. I then inserted it into the file by hand.

The resulting solution composition (solution 2) is supersaturated (Saturation index greater than zero) with a lot of minerals, which means if you just added the reactants to water, they would not dissolve to the extent that you list. The last calculation, limits the dissolution of the reactants based on mineral saturation for a set of minerals that I think are plausible. So, solution 2 is the solution you specified, but solution 3 is more chemically realistic (at 25 C and 1 atm).


Code: [Select]
SOLUTION
USER_PRINT 1
#NaCl                500 mg/l
#CaCO3               390 mg/l
#MgSO4               100 mg/l
#FeO/Fe2O3           1 mg/l
#Al2Si2O5(OH)4       1000 mg/l
#HCl                 0 mg/l
-start
20 nacl = 500 / GFW("NaCl")
30 caco3 = 390 / GFW("CaCO3")
40 mgso4 = 100 / GFW("MgSO4")
50 feo = 0.5 / GFW("FeO")
60 fe2O3 = 0.5 / GFW("Fe2O3")
70 kaol = 1000 / GFW("Al2Si2O5(OH)4")
100 PRINT "REACTION 1"
110 PRINT "NaCl          ", STR_F$(nacl, 12, 5)
120 PRINT "CaCO3         ", STR_F$(caco3, 12, 5)
130 PRINT "MgSO4         ", STR_F$(mgso4, 12, 5)
140 PRINT "FeO           ", STR_F$(feo, 12, 5)
150 PRINT "Fe2O3         ", STR_F$(fe2O3, 12, 5)
160 PRINT "Al2Si2O5(OH)4 ", STR_F$(kaol, 12, 5)
170 PRINT "1 mmol"
-end
END
USE solution 1
REACTION 1
NaCl                8.55537
CaCO3               3.89645
MgSO4               0.83073
FeO                 0.00696
Fe2O3               0.00313
Al2Si2O5(OH)4       3.87351
1 mmol
SAVE solution 2
END
USE solution 2
EQUILIBRIUM_PHASES
Kaolinite  0   0
Goethite   0   0
Calcite    0   0
CO2(g)    -3.4 10
SAVE solution 3
END
Logged

benji

  • Contributor
  • Posts: 7
Re: Where or How to introduce the following composition of water
« Reply #2 on: February 28, 2023, 03:50:44 PM »
I am really delighted with your answer.
I will analyze it and come back to you tomorrow with questions that will prove that I have understood and perhaps questions even more.

Thank you !
Logged

benji

  • Contributor
  • Posts: 7
Re: Where or How to introduce the following composition of water
« Reply #3 on: March 01, 2023, 08:54:34 AM »
Hello Mr @ Dlparkhurst  (and to other people also who want and can help me), I analyzed and compiled the script you sent me. However, I still have misunderstanding questions, as I had explained, I'm really new to this software. The questions are:

1) By analyzing I understood that we just used 1 l of pure water for the simulation, so for example 500 mg for NaCl which would make 0.0085558 mol. But I saw that you use mmol. I don't understand why, can you please explain?

2) I got the Output file, but frankly, I can't interpret it. There are several results whereas I wanted the parameters which are at the origin of the fouling. I ask for help to understand the output file: Description of solution, Distribution of species and especially  Saturation indices.
Thank you in advance and if you have any other advice for me, I really want it. This is my PFE graduation project.
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Where or How to introduce the following composition of water
« Reply #4 on: March 01, 2023, 02:28:43 PM »
Sorry, I missed the volume. Change the SOLUTION definition as follows.

Code: [Select]
SOLUTION
-water 0.150

However, decreasing the volume only makes the solution more concentrated and more supersaturated. You give no information about the fouling phenomenon, but the last calculation considers how many moles of minerals would precipitate if you had a solution of the composition you specified. See the section "Phase assemblage"  in the output.

Description of solution is pretty straightforward. pe may be new, it is an indication of the redox state of the solution. The rest are standard characteristics of the system.

Distribution of species gives the calculated dissolved concentrations and activities for the species defined in the aqueous model--SOLUTION_SPECIES definitions in the database.

If you don't know what a saturation index is, it is time to get a geochemistry text. Geochemistry, groundwater and pollution by Appelo and Postma is especially good because it is thorough and uses PHREEQC calculations as examples.

Logged

benji

  • Contributor
  • Posts: 7
Re: Where or How to introduce the following composition of water
« Reply #5 on: March 02, 2023, 09:12:47 AM »
Good morning,
Thank you for your great contribution.
I would like to ask two more things:

1) Given the large number of output values at the level of the saturation indices (SI), on which main parameters should I focus to know that my cooling water will be fouling (scaling) or corrosive or good composition for cooling towers ??

2) I do not understand why at the level of EQUILIBRIUM_PHASES, you have set the values of calcite, Goethite and Kaolinite to 0 and for CO2(g) to -3.4. What is it to have as an output or what is it to control?
 
I'm talking about the code below
Code: [Select]
EQUILIBRIUM_PHASES
Kaolinite  0   0
Goethite   0   0
Calcite    0   0
CO2(g)    -3.4 10

3) If I want to force the output state (concentration and saturation) of certain phases like calcite and argonite, how should I do? in which blocks of keywords should I act?

I apologize for these questions which may sound basic to you.
Thank you again and in advance for your very clear answers worthy of a pedagogue.
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Where or How to introduce the following composition of water
« Reply #6 on: March 02, 2023, 02:37:03 PM »
This is not my expertise, but I think scaling is usually calcite or silica. There are multiple SiO2 phases, but chalcedony has an intermediate log K.

A target SI of zero indicates the mineral will react to equilibrium. However, if the mineral is undersaturated and the number of moles is defined as zero, then the mineral cannot dissolve. In the definitions I set, the minerals can only precipitate. As for CO2(g), -3.4 is log partial pressure of CO2 in the atmosphere. With 10 moles available to react, the resulting solution will have an atmospheric partial pressure.

If you put Calcite and Calcedony, and CO2(g) in EQUILIBRIUM_PHASES, you will get a first estimate of how much calcite and silica could precipitate from your solution.

Logged

benji

  • Contributor
  • Posts: 7
Re: Where or How to introduce the following composition of water
« Reply #7 on: March 03, 2023, 08:07:58 AM »
Good morning,
Thank you so much. Your help was very valuable, thanks to you, I understood a lot of things about the PHREEQC software and how it can help me solve my problem.
Again Thank you very much.
Logged

benji

  • Contributor
  • Posts: 7
Re: Where or How to introduce the following composition of water
« Reply #8 on: March 07, 2023, 01:47:47 PM »
Good morning,
I come back to you for the same problem.
I) I have pure (distilled) water
II) I have a quantity of the following compounds in the lab:
NaCl
CaCO3
MgSO4
Kaolinite (Al2Si2O5(OH)4
FeO
1) I would like to know if with PHREEQC, I can know at what concentrations of these different compounds I should add to have an optimal precipitation rate (lowest possible, less clogging) of the phases: calcite, aragonite, kaolinite, gypsium?
I mean an optimal combination of these concentrations for optimal fouling?

2) If (1) is not possible, then as with equilibrium_phases we can force the phases (calcite, aragnite, gypsium, kaolinite) not to precipitate, I would like to know, if we force them not to precipitate, with PHREEQC, is possible to know the concentrations that were used so that these phases do not precipitate? If yes, I ask how? I mean the concentration of the different elements to form the solution without precipitation.

3) If (1) and (2) are not possible, can you recommend another software to solve my problem?

My Problem: Start with distilled water and add the elements mentioned above to arrive at water with an optimal fouling rate.

I hope you will allow me to have another track of analysis. Thank you in advance for your time
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Where or How to introduce the following composition of water
« Reply #9 on: March 07, 2023, 04:13:34 PM »
You can add as much NaCl as you want, without affecting the solubilities of the other minerals too much. I have added 1 mol/kgw in the script below.

The script adds MgSO4 incrementally while maintaining equilibrium with calcite and kaolinite. Ultimately, gypsum starts to form. So the graph shows how much MgSO4 is added. Molality of Ca indicates the maximum amount of calcite that can remain in solution, and Si indicates the maximum amount of kaolinite that can be in solution.

If Fe is Fe(3), then its solubility is quite small. If Fe(2), then it is a question of how fast it oxidizes and precipitates.

There are lots of permutations, but maybe the script will give you some ideas.

Code: [Select]
SOLUTION
-units mol/kgw
Na 1
Cl 1
REACTION
MgSO4 1
4 in 100 steps
EQUILIBRIUM_PHASES
Calcite 0 10
CO2(g) -3.4 10
Gypsum 0 0
Kaolinite 0 10
CO2(g) -3.4 10
USER_GRAPH 1
    -headings               rxn Gypsum Ca_molality
    -axis_titles            "MgSO4 added, moles" "Gypsum precipitated" "Ca and Si, mol/kgw"
    -axis_scale sy_axis     auto auto auto auto log
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X RXN
20 GRAPH_Y EQUI("Gypsum")
30 GRAPH_SY TOT("Ca")
40 GRAPH_SY TOT("Si")
  -end
    -active                 true
END
« Last Edit: March 07, 2023, 04:16:12 PM by dlparkhurst »
Logged

benji

  • Contributor
  • Posts: 7
Re: Where or How to introduce the following composition of water
« Reply #10 on: March 08, 2023, 08:29:51 AM »
Good morning,
Thank you very much for your invaluable help.

I saw that you added MgSO4, is it the same way, I can add CaCO3 and Kaolinite?

Thank you so much !!!
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • USER_PUNCH/USER_GRAPH »
  • BASIC functions »
  • Where or How to introduce the following composition of water
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2