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 »
  • Processes »
  • Mixing »
  • Gypsum precipitation by seawater and formation water mixture
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Gypsum precipitation by seawater and formation water mixture  (Read 836 times)

Sinaatalebi

  • Frequent Contributor
  • Posts: 10
Gypsum precipitation by seawater and formation water mixture
« on: October 15, 2020, 11:14:23 PM »
Hi all,

I want to predict the scale formation with PHREEQC, but there is not any output for scale precipitated in [ppm]. The only useful output is Saturation Index.
One friend told me that I have to use EQUILIBRIUM_PHASES keyword and he told me for my problem the mineral scale would be about 228.64 mg/100c.
I tried:
EQUILIBRIUM_PHASES
Gypsum 0 0
Anhydrite 0 0
before MIX1, but the gypsum precipitation I got was about 142.31 mg/100c , In contrast with what my friend said.

HERE is my code:

SOLUTION 1    #formation water
temp 22
pH 6
units ppm
Na 69863
Ca 19000
Mg 2916
S 280
Cl 149650
-water 0.05

SOLUTION 2    #Sea water
temp 22
pH 5.5
units ppm
Na 18328
Ca 650
Mg 2210
S  4290
Cl 32695
-water 0.05
END

EQUILIBRIUM_PHASES
Gypsum   0 0
Anhydrite 0 0

MIX 1
1 0.5   #FRACTION 0.5 OF Formation water
2 0.5   #FRACTION 0.5 OF Sea water
END


It would help me a lot if you can guide me through it.
Appreciate your help
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2509
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #1 on: October 16, 2020, 12:42:11 AM »
I'm going to go with your friend. It depends on which database you use, and how picky you want to be about the difference between mg/kgw and mg/L. I got 204.9 by using pitzer.dat and adjusting the result to mg/100cc. The USER_PRINT block shows my calculation.

Code: [Select]
SOLUTION 1    #formation water
temp 22
pH 6
units ppm
Na 69863
Ca 19000
Mg 2916
S 280
Cl 149650
-water 0.05

SOLUTION 2    #Sea water
temp 22
pH 5.5
units ppm
Na 18328
Ca 650
Mg 2210
S  4290
Cl 32695
-water 0.05
END

USER_PRINT
10 gyp_mol = EQUI("Gypsum")
20 gyp_mg_100cc = (gyp_mol * GFW("CaSO4:2H2O") * 1000 / SOLN_VOL) * 0.1
30 anh_mol = EQUI("Anhydrite")
40 anh_mg_100cc = (anh_mol * GFW("CaSO4") * 1000 / SOLN_VOL) * 0.1
50 PRINT "Gypsum scale, mg/100cc:    ", STR_F$(gyp_mg_100cc, 10, 1)
60 PRINT "Anhydrite scale, mg/100cc: ", STR_F$(anh_mg_100cc, 10, 1)

EQUILIBRIUM_PHASES
Gypsum   0 0
Anhydrite 0 0

MIX 1
1 0.5   #FRACTION 0.5 OF Formation water
2 0.5   #FRACTION 0.5 OF Sea water
END
Logged

Sinaatalebi

  • Frequent Contributor
  • Posts: 10
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #2 on: October 16, 2020, 11:05:41 AM »
Dear dlparkhurst,
Thank you for your response.
That was very helpful.
I still have another problem.
I want to create two graphs.
First, plot amount of both mineral scale versus temperature (from 20 to 85 C).
Second, plot amount of both mineral scale versus different brine blends (i.e. 10/90, 20/80, 70/30,...90/10).
or is there any chance to merge two plots into one or that would be two crowded?
If you can guide me through them, that would be a big help to me.
Thank you in advance.
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2509
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #3 on: October 16, 2020, 03:42:25 PM »
The data block USER_GRAPH allows you to plot results.

For temperature, you can use the data block REACTION_TEMPERATURE to define reactions for a series of temperatures.

Without getting complicated, you will have to define a series of MIX data blocks to produce a series of mixing ratios.

You are on your own for aesthetics.
Logged

MichaelZ20

  • Top Contributor
  • Posts: 90
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #4 on: October 16, 2020, 03:50:16 PM »
See also a code in https://phreeqcusers.org/index.php/topic,1089.msg3247/topicseen.html#msg3247
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2509
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #5 on: October 16, 2020, 05:32:56 PM »
Another comment. Your formation water is a brine, so the volume of solution is significantly different from the mass of water in solution. For your formation water, a solution with 1 kg of water has a volume of 1.11 L at 22 C; 1 L of solution has 0.903 kg water.

You wanted results per 100 cc, so it makes a difference how you do the mixing. If you mix by volume, you need to account for the density at the temperature that you create your mixture. Note that the volume of the mixture may not be the sum of the volumes of the end members added. Also, the solution volume will change with temperature, which means you need to be careful how you report the results; is it per 100 cc at 22 C, or per 100 cc at 85 c?
Logged

Sinaatalebi

  • Frequent Contributor
  • Posts: 10
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #6 on: October 17, 2020, 03:29:14 PM »
Dear dlparkhurst
I have created the first plot ( amount of precipitation and SI vs. Temperature ) with the assistance you gave.
But for the second plot (amount of precipitation vs. mixing ratio(SW/TOTAL)), I couldn't define X (MIXING RATIO).
As you said, for simplification, I wrote 9 MIXes, but I'm getting confused about defining the X-axis in PLOT_XY.
Can you help me with that?

And for the solution volume, thank you for the tip. I'm working on it to get it fixed.
Logged

Sinaatalebi

  • Frequent Contributor
  • Posts: 10
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #7 on: October 17, 2020, 04:05:12 PM »
For the Solution volume you said, is the code below correct?

USER_PRINT
10 PRINT "Density, kg/L: ", rho
20 PRINT "Volume, L:     ", soln_vol
30 PRINT "Mass of soln:  ", rho*soln_vol
40 mass = rho*soln_vol
50 gyp_mol = EQUI("Gypsum")
60 gyp_mg_100cc = (gyp_mol * GFW("CaSO4:2H2O") * 1000 / mass) * 0.1
70 anh_mol = EQUI("Anhydrite")
80 anh_mg_100cc = (anh_mol * GFW("CaSO4") * 1000 / mass) * 0.1
90 PRINT "Gypsum scale, mg/100cc:    ", STR_F$(gyp_mg_100cc, 10, 1)
100 PRINT "Anhydrite scale, mg/100cc: ", STR_F$(anh_mg_100cc, 10, 1)
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2509
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #8 on: October 17, 2020, 04:18:29 PM »
I think I calculated mg in 0.1 liter of solution in USER_PRINT. You are calculating per 0.1 kg of solution.
Logged

Sinaatalebi

  • Frequent Contributor
  • Posts: 10
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #9 on: October 17, 2020, 05:28:48 PM »
Of course, I get it now.
Can you help me with the X_Axis of the chart I mentioned above?
Thank you in advance
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2509
Re: Gypsum precipitation by seawater and formation water mixture
« Reply #10 on: October 17, 2020, 09:22:07 PM »
This script mixes by volume at 22 C. However, the unit of mg/100cc is still ambiguous because the mixture will not be exactly 1 L, even at 22 C, and the volume will change with temperature. The plot shows mg precipitate per kg solution.
 
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Mixing »
  • Gypsum precipitation by seawater and formation water mixture
 

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