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 »
  • Beginners »
  • PHREEQC basics »
  • Add gas to solution to get gas solubility at high pressures
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Add gas to solution to get gas solubility at high pressures  (Read 225 times)

ekeskin

  • Contributor
  • Posts: 8
Add gas to solution to get gas solubility at high pressures
« on: November 07, 2022, 02:44:34 PM »
Dear all,

I am trying to model the gas solubility of our brine in the production well of a geothermal power plant. I tried writing an input file, but the resulting solubility doesn't decrease with decreasing pressure, like it should. Instead the solubilities just stay the same. I was wondering, if you could help me on how to add the gas analysis correctly into the solution to get the right solubilities.

Below you can find my input file. This is what I did:

1. I defined the solution composition that was sampled at the well head of the production well
2. I included the gas analysis from the wellhead (CO2(g), Ntg(g) and Mtg(g)) in SOLUTION 1. I am not really sure what numbers to put behind C(4), Ntg and Mtg, as our analysis do not show the dissolved gases I think? But it seems we need to define it in the solution to include the gases.
3. I saved the resulting solution and put them under the pressure and temperature conditions from the reservoir to the surface (decreasing pressure of 400 to 10 atm).
4. I graphed the solubility of the gases

My question is: Why is the gas solubility staying the same? Even if I use another way to put the gas into the solution (e.g. EQUILIBRIUM_PHASES or GAS_SOLUTION) the solubility stays the same. The only way I got changing solubilities was through adding CO2 with a REACTION. But in our case there is no source of new CO2. Only the original gas composition, which probably degasses during the ascending brine because of the decreasing pressure.



Code: [Select]

DATABASE c:\phreeqc\database\phreeqc.dat

##### Initial solution at the wellhead #####

SOLUTION 1             

temp 160                # temperature wellhead
pressure 21             # pressure wellhead
pH 5.23
density 1 calculate
Alkalinity 113 as HCO3

units mg/L
Na 29900
K  3816
Ca 7254
Mg 99.4
Cl 64900 charge
S(6) 131
Si 167 as SiO2 #SiO2
Br 185
B  41.1
Li 168
Sr 456
Ba 8.270
Mn 25.16
Fe 25.06

##### Put gas analysis in solution composition at wellhead ######

C(4)  0.001 CO2(g) -0.069050968  # SI_gas=log10(CO2_vol%)    vol%=0.853       
Ntg   0.001 Ntg(g)  -1.050609993   #                                  vol%=0.089
Mtg  0.001 Mtg(g) -1.647817482  #                                  vol%=0.0225

# EQUILIBRIUM_PHASES 1           # pH increases as CO2 dissolves in the solution
# CO2(g) 0.853 0                               
# N2(g)  0.089 0
# CH4(g) 0.0225 0

END

####### CO2 solubility from the reservoir to the wellhead at the production site ########

USE SOLUTION 1
#USE EQUILIBRIUM_PHASES 1
   
REACTION_PRESSURE 1
10 400 in 50 steps                # pressure decrease at produciton well
REACTION_TEMPERATURE 1
160                                     # reservoir temperature
   
USER_GRAPH 1
     -chart_title "CO2 solubility at high pressures"
     -axis_titles "Pressure / atm" "Solubility / (mol/kgw)"
     -headings P CO2 CH4 N2
     -connect_simulations false
     -start
     10 graph_x pressure                                         # solution pressure (atm)
     20 graph_y tot("C(4)"), tot("C(-4)"), tot("N(0)") # Solubility (mol/kgw)
     -end

END



Thank you very much in advance for your help!!

Kind regards
« Last Edit: November 24, 2022, 09:41:09 AM by ekeskin »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: Add gas to solution to get gas solubility at high pressures
« Reply #1 on: November 07, 2022, 05:20:24 PM »
Here is my take on your description. I have assumed that the solution at 21 atm and 160 C is in equilibrium with a gas phase that has the given proportions of CO2, methane, and nitrogen gases.

At 21 atm, the partial pressures of the gases are roughly the mole fraction times 21. I used these values to calculate log10 partial pressures to define C(4), Mtg, and Ntg. Now, if you define both Alkalinity and C(4) in SOLUTION, the pH of the solution will be adjusted.  That might be OK, but I chose to keep the pH, specify the PCO2, and not define Alkalinity. The result is a higher alkalinity in solution 1, but within a factor of 2. If you specify both Alkalinity and C(4) the pH of the solution is about 4. I used Mtg and Ntg (defined in phreeqc.dat) to represent methane and N2 that cannot react to other C or N species.

I used the calculated partial pressures to define 1 L of gas at 21 atm and 160 C in GAS_PHASE.

The defined solution and gas phase should be more or less at equilibrium at 21 atm. The partial pressures are an approximation, so the equilibrium is not exact.

The remaining reaction increases the pressure from 21 to 400 atm and tracks the moles of GAS_PHASE components and the moles dissolved in solution. For Mtg and Ntg you could call the dissolved moles in solution the solubility. For CO2, the solubility is a little ambiguous. I have plotted the total dissolved inorganic carbon [C(4)], rather than CO2(aq) or perhaps CO2(aq) + 2*(CO2)2(aq). [(CO2)2(aq) is used to fit data more closely, but is probably not a real aqueous species.]

Note that I started with 1 L of gas and approximately 1 L of water. You should use the volume of gas released per liter of water to simulate your system.

This approach may not be what you had in mind, but perhaps it gives you some ideas.

Code: [Select]
##### Initial solution at the wellhead #####
SOLUTION 1             
temp 160                # temperature wellhead
pressure 21             # pressure wellhead
pH 5.23
density 1 calculate
##Alkalinity 113 as HCO3

units mg/L
Na 29900
K  3816
Ca 7254
Mg 99.4
Cl 64900 charge
S(6) 131
Si 167 as SiO2 #SiO2
Br 185
B  41.1
Li 168
Sr 456
Ba 8.270
Mn 25.16
Fe 25.06
C(4)  0.001 CO2(g)  1.253  # -0.069050968  # SI_gas=log10(CO2_vol%)    vol%=0.853       
Ntg   0.001 Ntg(g)  0.272  # -1.050609993   #                                  vol%=0.089
Mtg   0.001 Mtg(g)  -0.326 # -1.647817482  #                                  vol%=0.0225
END

GAS_PHASE 1
-temp 160
-pressure 21
-volume 1
-fixed_pressure
CO2(g) 17.913 # 0.853   #  vol%=0.853  * 21   atm 
Ntg(g) 1.869  # 0.089   #  vol%=0.089  * 21   atm
Mtg(g) 0.4725 # 0.0225  #  vol%=0.0225 * 21   atm
END

# 1 L of gas per liter of solution pressurized
USE solution 1
USE gas_phase 1    
REACTION_PRESSURE 1
21 400 in 20  steps                # pressure decrease at produciton well
REACTION_TEMPERATURE 1
160                                     # reservoir temperature
   
USER_GRAPH 1
     -axis_titles "Pressure, atm" "Moles in gas phase"
     -headings P CO2(g) Mtg(g) Ntg(g)
     -connect_simulations false
     -start
     10 graph_x pressure                                         # solution pressure (atm)
     20 graph_y GAS("CO2(g)"), GAS("Mtg(g)"), GAS("Ntg(g)") # Solubility (mol/kgw)
     -end
USER_GRAPH 2
     -axis_titles "Pressure, atm" "Total concentration, mol/kgw"
     -headings P C(4) Mtg Ntg
     -connect_simulations false
     -start
     10 graph_x pressure                                         # solution pressure (atm)
     20 graph_y TOT("C(4)"), TOT("Mtg"), TOT("Ntg") # Solubility (mol/kgw)
     -end

END
Logged

ekeskin

  • Contributor
  • Posts: 8
Re: Add gas to solution to get gas solubility at high pressures
« Reply #2 on: November 08, 2022, 02:55:07 PM »
Dear David,

thank you very much for your help! This definitely is more to my expectations. I was wondering, if there is a way to find out what the bubble point pressure is, i.e. at what pressure (when decreasing the pressure from 400 atm) the first CO2 gas bubbles appear. Basically at which pressures the gases start to degass. I was hoping, that in the plot you could see an abrupt decrease in the total concentrtaion of the gases at lower pressures, but there is none. This probably is also because of the high temperature. At lower temperatures (e.g. 25°C) the CO2 concentration decreases faster at pressures lower than 50 atm. But is there a way to find the exact bubble point pressure with PHREEQC? Could I use the saturation index for CO2 to find this out? Does a CO2 saturation index si>0 mean, that the gas is dissolved?

Thank you very much!
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: Add gas to solution to get gas solubility at high pressures
« Reply #3 on: November 08, 2022, 03:19:11 PM »
In the calculation I included in the last post, a bubble exists even at 400 atm pressure. If you increase the maximum pressure to 500 atm, there is a point at about 420 atm where the bubble disappears, and the moles in the gas phase go to zero.

Another factor that determines the bubble point in this calculation is the amount of gas at 21 atm. If there is only 0.5 L gas per liter of liquid, the bubble disappears at pressures above 190 atm.

(The bubble point occurs when the sum of the partial pressures of the gas components exceeds the ambient pressure.)
« Last Edit: November 08, 2022, 03:33:37 PM by dlparkhurst »
Logged

ekeskin

  • Contributor
  • Posts: 8
Re: Add gas to solution to get gas solubility at high pressures
« Reply #4 on: November 08, 2022, 04:16:40 PM »
This helped me a lot :) Thank you very much!
Logged

MichaelZ20

  • Top Contributor
  • Posts: 101
Re: Add gas to solution to get gas solubility at high pressures
« Reply #5 on: November 08, 2022, 07:02:39 PM »
I would use pitzer.dat
Logged

ekeskin

  • Contributor
  • Posts: 8
Re: Add gas to solution to get gas solubility at high pressures
« Reply #6 on: November 09, 2022, 08:56:07 AM »
But if I use pitzer.dat I can't use methane and nitrogen right? Because they are not in the database I think. Or do I just need to define them myself by adding them to PHASES?

Logged

MichaelZ20

  • Top Contributor
  • Posts: 101
Re: Add gas to solution to get gas solubility at high pressures
« Reply #7 on: November 09, 2022, 08:59:50 AM »
They are included in pitzer.dat.
Logged

ekeskin

  • Contributor
  • Posts: 8
Re: Add gas to solution to get gas solubility at high pressures
« Reply #8 on: November 10, 2022, 09:06:17 AM »
Thank you very much!
Logged

ekeskin

  • Contributor
  • Posts: 8
Re: Add gas to solution to get gas solubility at high pressures
« Reply #9 on: November 24, 2022, 09:46:15 AM »
Hi again,

I still have a question regarding the bubble point pressure. How does PHREEQC calculate the bubble point pressure for a GAS_PHASE that consists of multiple gases? For example if you have CO2, Mtg and Ntg, shouldn't the bubble point pressure be different for each of the gases, as they have different solubilities? PHREEQC shows us that they all start to degass at the same pressure. If I include "H20(g) 0" in the GAS_PHASE, even H2O starts to degass when the other gases do. Is there a way to get seperate bubble point pressures for each gas?

Thanks for your help!
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: Add gas to solution to get gas solubility at high pressures
« Reply #10 on: November 25, 2022, 02:18:47 PM »
For a fixed-pressure gas phase, a bubble appears when the sum of the partial pressures of the gas components are equal to the specified pressure. If reactions continue to produce one or more of the gas components, the gas bubble will expand to cause the sum of the gas  component partial pressures to remain at the specified pressure. You do not get there different bubbles, you physically only have one bubble.

At any point,  the partial pressure of each component is given in the gas-phase printout and in the saturation index section of the output file.

I don't think it is relevant, but you can always define the gas phase with only one of the components to determine when a one-component gas phase would form.
Logged

ekeskin

  • Contributor
  • Posts: 8
Re: Add gas to solution to get gas solubility at high pressures
« Reply #11 on: January 10, 2023, 03:43:02 PM »
Dear David,

thank you very much for your very helpful replys! I now understand how to calculate the bubble point pressure with PHREEQC.

Next I wanted to know how the bubble point pressure changes with temperature. For this I changed the input file every time to a different REACTION_TEMPERATURE (from 50 to 190°C) and noted down the pressure where the first bubbles form. In the end I plotted the bubble point pressure (y-axis) against the temperature(x-axis) and I noticed a maximum at between 160-180°C and about 12.3 atm (I tried to attach the graph, but sadly there was some error). This seems really strange to me. To understand this better I plotted the CO2 solubility against the temeprature. I used the pitzer database and a simple 2M NaCl brine to exclude any kind of error because of a too complicated system. The gas solubility looks strange as well. When using a REACTION_PRESSURE higher than the before calculated bubble point maximum (e.g. 13 atm) the CO2 solubility has a maximum at about 70°C. When using a REACTION_PRESSURE lower than the bubble point maximum (e.g. 12 atm) the gas solubility has a minimum at about 160°C. I am really confused why I see this behaviour. I know from Duan and Sun (2003) that there is a CO2 solubilty minimum with increasing temperature in pure water, but only at high pressures above 200 bar. Do you know why I see these results with PHREEQC?

Code: [Select]
DATABASE c:\phreeqc\database\pitzer.dat

SOLUTION 1               

temp 29.8               
pressure 1               
pH 4.88                   
density 1 calculate
Alkalinity 158.6 as HCO3                               

units mg/L               
Na 29900
Cl 64040 charge         

GAS_PHASE 1   
-pressure 1
-volume 1.2
-fixed_pressure
CO2(g) 1
   
REACTION_TEMPERATURE 1
30 200 in 100 steps
REACTION_PRESSURE 1
13   
 
USER_GRAPH 1
     -chart_title "Gas solubility at 13 atm and GLR=1.2"
     -axis_titles "Temperature [°C]" "Total concentration, mol/kgw"
     -axis_scale x_axis 30 200
     -headings T C(4)
     -connect_simulations false
     -start
     10 graph_x tc                 
     20 graph_y TOT("C(4)")
     -end

END

When using a gas mixture (e.g. CO2=0.87, Ntg=0.1, Mtg=0.03) this "maximum" of the bubble point pressure with varying temperature is at lower temperatures of about 120°C.

I would appreciate your help! Thank you very much

Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: Add gas to solution to get gas solubility at high pressures
« Reply #12 on: January 10, 2023, 04:38:59 PM »
First, the changes in concentration (mol/kgw) are very small, in the range of 1e-8. Further, if you look at the output, the gas phase has completely dissolved in all cases, so there is no CO2(g) in the gas phase, and you are not calculating the solubility of CO2(g).

The total moles of C(4) in the aqueous phase is exactly the same at all temperatures (which is all of the C in the system). However, the mass of H2O changes slightly with temperature due to changes in the log Ks for reactions like CO2 + H2O = HCO3- + H+. Constant moles of C(4) plus varying mass of water causes the concentration of CO2 (mol/kgw) to vary.

Code: [Select]
USER_GRAPH 1
    -headings               T C(4)_mol  C(4)_mol/kgw H2O_kg
    -axis_titles            "Temperature [°C]" "mol or mol/kgw" "Mass of water"
    -chart_title            "Gas solubility at 13 atm and GLR=1.2"
    -axis_scale x_axis      30 200 auto auto
    -initial_solutions      false
    -connect_simulations    false
    -plot_concentration_vs  x
  -start
10 graph_x tc                 
20 graph_y TOTMOL("C(4)"), TOT("C(4)"),
30 graph_sy TOT("water")
  -end
    -active                 true
Logged

ekeskin

  • Contributor
  • Posts: 8
Re: Add gas to solution to get gas solubility at high pressures
« Reply #13 on: January 12, 2023, 10:50:20 AM »
Thanks! I didn't think about the H2O.This makes more sense now.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • Add gas to solution to get gas solubility at high pressures
 

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