diff --git a/src/geophires_x/WellBores.py b/src/geophires_x/WellBores.py index 90ae0349..f0633ebf 100644 --- a/src/geophires_x/WellBores.py +++ b/src/geophires_x/WellBores.py @@ -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 @@ -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, diff --git a/tests/examples/example_overpressure.txt b/tests/examples/example_overpressure.txt index a6a27193..aa8c9672 100644 --- a/tests/examples/example_overpressure.txt +++ b/tests/examples/example_overpressure.txt @@ -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, ---[-] @@ -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