Skip to content

Commit

Permalink
Implementing a way to handle overpressure
Browse files Browse the repository at this point in the history
environments; adding better defaults and new comments where I can.
  • Loading branch information
malcolm-dsider committed Apr 16, 2024
1 parent 322b27a commit 6d807d4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
18 changes: 16 additions & 2 deletions src/geophires_x/WellBores.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def __init__(self, model: Model):
)
self.injection_reservoir_pressure = self.OutputParameterDict[self.injection_reservoir_pressure.Name] = OutputParameter(
Name="Calculated Injection Reservoir Pressure",
value=self.Phydrostatic.value,
value=-1,
UnitType=Units.PRESSURE,
PreferredUnits=PressureUnit.KPASCAL,
CurrentUnits=PressureUnit.KPASCAL
Expand Down Expand Up @@ -1092,7 +1092,21 @@ def Calculate(self, model: Model) -> None:
self.overpressure_depletion_rate.value)

if self.overpressure_percentage.Provided:
# calculate the injection reservoir pressure as a function of time if overpressure is provided
# if we are doing an overpressure calculation, it is possible that the user has chosen to
# split the reservoir into two parts - the deeper, overpressured Production Reservoir,
# and a shallower, lower pressure Injection Reservoir.
# If so, calculate the injection reservoir pressure as a function of time if overpressure is provided.
# If the injection reservoir temperature or pressure are not provided, calculate a default for them.
if self.injection_reservoir_depth.Provided: #this means they must be doing a split reservoir
if not self.injection_reservoir_temperature.Provided:
self.injection_reservoir_temperature.value = (model.reserv.averagegradient.value * self.injection_reservoir_depth.value) + model.reserv.Tsurf.value
if self.injection_reservoir_pressure.value < 0:
self.injection_reservoir_pressure.value = get_hydrostatic_pressure_kPa(self.injection_reservoir_temperature.value,
model.reserv.Tsurf.value,
self.injection_reservoir_depth.value,
model.reserv.averagegradient.value * 1000.0,
model.reserv.lithostatic_pressure(model.reserv.rhorock.value,
self.injection_reservoir_depth.value))
self.injection_reservoir_initial_pressure.value = self.injection_reservoir_pressure.value = get_hydrostatic_pressure_kPa(self.injection_reservoir_temperature.value,
model.reserv.Tsurf.value,
self.injection_reservoir_depth.value,
Expand Down
10 changes: 5 additions & 5 deletions tests/examples/example_overpressure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ is used in for electricity application with a reinjection temperature of 50deg.C
*************************************
Overpressure Percentage, 155.0
Overpressure Depletion Rate, 10.0
Injection Reservoir Temperature, 101.1
Injection Reservoir Depth, 1001.1
Injection Reservoir Inflation Rate, 202.2
Injection Reservoir Temperature, 101.1, degC
Injection Reservoir Depth, 1001.1, meters
Injection Reservoir Inflation Rate, 202.2, kPa/yr
Reservoir Model,1, ---Multiple Fractures reservoir model
Reservoir Depth,3, ---[km]
Number of Segments,1, ---[-]
Gradient 1,65, ---[deg.C/km]
Gradient 1,50, ---[deg.C/km]
Maximum Temperature,400, ---[deg.C]
Number of Production Wells,2, ---[-]
Number of Injection Wells,2, ---[-]
Expand All @@ -27,7 +27,7 @@ Injection Well Diameter,9, ---[inch]
Ramey Production Wellbore Model,1, ---0 if disabled 1 if enabled
Production Wellbore Temperature Drop,.5, ---[deg.C]
Injection Wellbore Temperature Gain,0, ---[deg.C]
Production Flow Rate per Well,80, ---[kg/s]
Production Flow Rate per Well,70, ---[kg/s]
Fracture Shape,3, ---[-] Should be 1 2 3 or 4. See manual for details
Fracture Height,900, ---[m]
Reservoir Volume Option,3, ---[-] Should be 1 2 3 or 4. See manual for details
Expand Down

0 comments on commit 6d807d4

Please sign in to comment.