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 »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • Geothermal Well Modeling
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Geothermal Well Modeling  (Read 507 times)

serhatttt

  • Frequent Contributor
  • Posts: 13
Geothermal Well Modeling
« on: September 23, 2022, 11:20:54 PM »
Hello Dr. Parkhurst;

I am a Ph.D. student in the Energy Engineering department. I am interested in Reactive transport modeling in PhreeqC.
I am looking to design a reaction. I want to simulate Silica (SiO2) and Calcite (CaCO3) concentration changes with respect to temperature and geothermal well depth using the reaction transport equation.

Actually, a simulation that I need;

X axis is depth in meter (distance) (total depth of well is 539 m)
Y1 axis is concentration in mg/l
Y2 axis is the temperature
But I don’t know how to discretize 539 m geothermal well depth in PhreeqC. And also, the geothermal field I study has a huge amount of Na and Cl concentrations. Is this a problem for simulation?

Solution inputs:
pH: 5.6
EC: 85340 uS/cm
Well Depth: 579 m
Wellhead temperature: 164.47 degrees (reinjection well is 100 degrees)
Reservoir temperature : 180 C
Wellhead pressure: average 2 bar
Ca: 2920
Mg: 122
Na: 17250
K:1815
Cl: 34560
HCO3: 135
SO4: 206.6
Si: 195
Li: 21.6
(Concentrations are in mg/l)

I have run the code up to a point, but from here I can't do the simulation I want to do.
Here is the code that I prepared;

DATABASE c:\phreeqc\database\Pitzer.dat

TITLE M21 Geothermal well

SOLUTION 1
         temp           25
         pH             5.6
    units mg/L
    Ca             2920
    Mg             122
    Na             17250
    K              1745
    Cl             34560
    Alkalinity     110.659 as HCO3
    S(6)           136 as SO4       #also 83.3 S measured
    Si             195 as SiO2        #between 160-200
    Ba             6.23               #6.01
    Sr             136
    Li             21.6
    #Fe            5.49               #added LW
   
GAS_PHASE 1
         -fixed_pressure
    -pressure         3.56             #average wellhead pressure
    -volume           0.0542
    -temperature      166.3            #average wellhead temperature
             CO2(g)    1.68             #0.472 #NCG=50% of steam (NCG analyses: 0.944)
        Mtg(g)    0.03             #0.008 #NCG=50% of steam (NCG analyses: 0.016)
        Ntg(g)    0.07             #0.02  #NCG=50% of steam (NCG analyses: 0.04)
        H2O(g)    1.78             #0.5   #water is 50% of steam flow

EQUILIBRIUM_PHASES 1
Gypsum
Quartz
SiO2(a)
Calcite
Dolomite
Chalcedony
Halite
Anhydrite
Magnesite
Diopside
Celestite

REACTION_TEMPERATURE 1
         100.0 180.0 in 65 steps

REACTION_PRESSURE 1
         2.0 50.0 in 20 steps

SELECTED_OUTPUT
     -file T9.sel
     -reset true
          -molalities Si Ca+2 Cl- HCO3- Li+ Na+ Mg+2 CO3-2 SO4-2 H4SiO4 Sr+2

Thank you for helping.
Best regards,
« Last Edit: September 23, 2022, 11:37:08 PM by serhatttt »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2928
Re: Geothermal Well Modeling
« Reply #1 on: September 24, 2022, 06:52:23 PM »
I'm not sure whether you are trying to model the water moving from the formation to the surface, or reinjecting water from the surface to the formation.

The simplest would be from the surface to the formation, in which case, I think you would not need to consider formation of a gas. I have just considered the transit down the borehole, where there are no minerals to dissolve. You can argue about which minerals might form. Quartz is the most stable silica phase, but may not be the first to form, and it in unlikely that dolomite would precipitate. Talc is a possibility that is not included in your phases. Once the water is in the formation, I think that is a different calculation at constant temperature and pressure, with the possibility of dissolution of formation minerals.

Here is a script that pressurizes and heats water from the surface to the formation. Note that it is important to have the same number of steps for pressure and temperature. If say temperature has fewer steps than pressure, the temperature would increase in the specified number of steps, and then stay constant as pressure continued to change.

Code: [Select]
SOLUTION 1
         temp           25
         pH             5.6
    units mg/L
    Ca             2920
    Mg             122
    Na             17250
    K              1745
    Cl             34560
    Alkalinity     110.659 as HCO3
    S(6)           136 as SO4       #also 83.3 S measured
    Si             195 as SiO2        #between 160-200
    Ba             6.23               #6.01
    Sr             136
    Li             21.6
    #Fe            5.49               #added LW
END
USE SOLUTION 1

EQUILIBRIUM_PHASES 1
Gypsum 0 0
Quartz 0 0
SiO2(a) 0 0
Calcite 0 0
Dolomite 0 0
Chalcedony 0 0
Halite 0 0
Anhydrite 0 0
Magnesite 0 0
Diopside 0 0
Celestite 0 0
#Talc 0 0
REACTION_TEMPERATURE 1
         164.5 180.0 in 155 steps

REACTION_PRESSURE 1
         2.0 50.0 in 155 steps
USER_GRAPH 1
    -headings               Depth Si Ca Mg C Qtz TC
    -axis_titles            "Depth, m" "Molality" "Temperature, C"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 a = (180 - 164.5)/579
20 b = 164.5
30 depth = (TC - b)/a
40 GRAPH_X depth
50 GRAPH_Y LOG10[TOT("Si")], LOG10[TOT("Ca")], LOG10[TOT("Mg")], LOG10[TOT("C")]
55 GRAPH_Y LOG10[EQUI("Quartz")]
60 GRAPH_SY TC
  -end
    -active                 true
END
Logged

serhatttt

  • Frequent Contributor
  • Posts: 13
Re: Geothermal Well Modeling
« Reply #2 on: September 24, 2022, 09:30:51 PM »
Hello Dr. Parkhurst,

Sorry for not explaining exactly what I want to do. This code is very useful for me. Thank you so much for your kind effort and corrections, and sorry for taking your time.

Firtst, actually I want to simulate a production well (the water moving from the formation/reservoir to the surface). In this production well at a power plant, we observe some scale problems in this geothermal well due to temperature and pressure variation. For example, calcite and silica scaling are some of them.

actually following that i want to do;

1) concentration profiles of the minerals (Y1 axis) along the geothermal well depth (579 m) (x axis) versus temperature (Y2 axis)

2) Grain size change depending on the geothermal well depth. I would like to know at which depth the grain sizes of the minerals begin to grow, in short, at which depth precipitation of minerals begin to form.
(Here, the x axis of the graph may be geothermal well depth (m), the Y1 axis is the grain size of the minerals (mm), and the Y2 axis is temperature).

In this case, do I need to use the transport and kinetic reactions keyword data block? I am not sure.

Thank you so much for your kind answers.
« Last Edit: September 24, 2022, 09:33:31 PM by serhatttt »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2928
Re: Geothermal Well Modeling
« Reply #3 on: September 25, 2022, 10:53:38 PM »
I think it is difficult to determine the water composition at depth when there is precipitation and gas loss on the way up the borehole. Here is an attempt.

If you heat and pressurize the solution, calcite becomes oversaturated. I added CO2 to the solution to come to equilibrium with calcite at depth. I also assumed that anhydrite, barite, and chalcedony were in equilibrium at depth.

The next part of the script decreases the temperature and pressure while allowing a gas phase of CO2 and H2O to form if the sum of the partial pressures exceeds the specified pressure. The calculation makes sense up to a depth of about  100 m. At that point the water vapor in the gas phase begins to exceed the CO2, which is inconsistent with your stated gas composition. At a depth of 50 m, the simulation breaks down further as the liquid phase becomes negligible. (I raised the surface pressure to 4 atm to avoid convergence issues, but the simulation is not reasonable at that point anyway.)

Silica and barite precipitate continuously as the water moves up the borehole. A gas phase forms at about 200 m , and after a sufficient loss of CO2 from solution, calcite begins to precipitate at about 140 m bls.

The simulation has a lot of assumptions and uncertainties. For example any calcite that precipitated before the water was analyzed are not considered in reconstituting the down-hole water; other gas constituents are ignored; near-surface processes are inconsistent with your observations, etc. You can consider whether the results are useful or not.

Code: [Select]
SOLUTION 1
         temp           25
         pH             5.6
    units mg/L
    Ca             2920
    Mg             122
    Na             17250
    K              1745
    Cl             34560
    Alkalinity     110.659 as HCO3 #135?
    S(6)           136 as SO4      #206.6  #also 83.3 S measured
    Si             195 as SiO2        #between 160-200
    Ba             6.23               #6.01
    Sr             136
    Li             21.6
    #Fe            5.49               #added LW
END

# Raise temperature and pressure
# Equilibrate selected minerals if undersaturated
USE solution 1
REACTION_TEMPERATURE
180
REACTION_PRESSURE
50
EQUILIBRIUM_PHASES 1
    Anhydrite 0 10
    Barite    0 10
    Calcite   0 CO2(g)    10
    Chalcedony 0 10
SAVE solution 1
END

# Lower temperature and pressure
# Allow gas phase to form
# Precipitate minerals
INCREMENTAL_REACTIONS
USE SOLUTION 1
EQUILIBRIUM_PHASES 1
Gypsum 0 0
Anhydrite 0 0
Barite 0 0
Celestite 0 0
Chalcedony 0 0
#Quartz 0 0
#SiO2(a) 0 0
Calcite 0 0
#Dolomite 0 0
#Magnesite 0 0
#Halite 0 0
#Diopside 0 0
GAS_PHASE 1
    -fixed_pressure
    -pressure         3.56             #average wellhead pressure
    -volume           0.0542
    -temperature      166.3            #average wellhead temperature
        CO2(g)    0.             #0.472 #NCG=50% of steam (NCG analyses: 0.944)
        H2O(g)    0.             #0.5   #water is 50% of steam flow
REACTION_TEMPERATURE 1
         180.0 164.5 in 156 steps
REACTION_PRESSURE 1
         50.0 4.0 in 156 steps # minimum pressure 4 atm to allow convergence
USER_GRAPH 1
    -headings               Depth Calcite Chalcedony Barite CO2(g) H2O(g) TC Pressure
    -axis_titles            "Depth, m" "Log10 Cumulative Moles" " Celsius or atm"
    -axis_scale x_axis      -600 0 auto auto
    -axis_scale y_axis      -8 auto auto auto
    -axis_scale sy_axis      -10 auto auto auto
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 a = (180 - 164.5)/579
20 b = 164.5
30 depth = (TC - b)/a
40 GRAPH_X -depth
50 GRAPH_Y LOG10[EQUI("Calcite")], LOG10[EQUI("Chalcedony")], LOG10[EQUI("Barite")]
60 GRAPH_Y LOG10[GAS("CO2(g)")], LOG10[GAS("H2O(g)")]
70 GRAPH_SY TC, PRESSURE
  -end
END

Logged

serhatttt

  • Frequent Contributor
  • Posts: 13
Re: Geothermal Well Modeling
« Reply #4 on: September 26, 2022, 09:45:33 PM »
Dear Dr. Parkhurst,

Thank you so much for your kind effort. The results from the simulations are very useful for me. However, I have some questions.

1) How did we understand that a gas phase forms at about 200 m and calcite begins to precipitate at about 140 m by looking simulation graph?

2) If I simulate the same geothermal well (approximate 580 m depth) for one year period (for kinetic simulation), should I use the Transport keyword data block? If so, how can I discretize the well for 580 m depth? For example, in the transport data block, if I chose the lengths are 5 m, the cells should be 116. Am I right?

with my best regards,
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2928
Re: Geothermal Well Modeling
« Reply #5 on: September 26, 2022, 11:59:33 PM »
No Dr. please.

Really? CO2(g) and H2O(g) appear on the graph about -180 m. The script uses the GAS function, which is the amount of a gas component in the gas phase. If the gas phase is absent, for numerical reasons, the gas components are set to about 1e-25.

Similarly, positive moles of calcite appear on the graph at about -140 m. Below that depth, calcite is zero and does not appear on the graph.

You can always look at the output file to see the results of each temperature and pressure. It will indicate when the gas phase is absent or present and the moles of calcite present. Note the graph shows at each point the result when the formation water is brought from the bottom to the specified depth and reacted to equilibrium.

Yes, you would have 116 5-m cells. The velocity depends on the time step (v = 5 / time step). However, I do not think you want to do TRANSPORT calculations with PHREEQC. There is no gas transport capability, so gas would simply accumulate in each cell. I also do not know what more you would learn from a transport calculation than from the current type of calculation.

Logged

dlparkhurst

  • Top Contributor
  • Posts: 2928
Re: Geothermal Well Modeling
« Reply #6 on: September 27, 2022, 06:28:07 PM »
Make sure you are running a recent version of PHREEQC (3.7.3, if you are using PhreeqcI, click Help->about), and the pitzer.dat database.
Logged

serhatttt

  • Frequent Contributor
  • Posts: 13
Re: Geothermal Well Modeling
« Reply #7 on: September 27, 2022, 07:28:01 PM »
Hi David,

Thank you so much; the code now works using pitzer.dat and the recent version.

Thanks a lot for this nice discussion forum.
Logged

MichaelZ20

  • Top Contributor
  • Posts: 113
Re: Geothermal Well Modeling
« Reply #8 on: September 27, 2022, 07:53:15 PM »
David, thank you!
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Kinetics and rate controlling factors »
  • Geothermal Well Modeling
 

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