Skip to content

Commit 69669eb

Browse files
updated ProdPressureDropsAndPumpingPowerUsingImpedenceModel to handle SBT
1 parent adc7c09 commit 69669eb

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

src/geophires_x/WellBores.py

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ def InjectionWellPressureDrop(model: Model, Taverage: float, wellflowrate: float
326326

327327
return DPWell, f1, v, rhowater
328328

329-
330329
def ProdPressureDropsAndPumpingPowerUsingImpedenceModel(f3: float, vprod: float, rhowaterinj: float,
331330
rhowaterprod: float, rhowaterreservoir: float, depth: float,
332331
wellflowrate: float, prodwelldiam: float,
333332
impedance: float, nprod: int, waterloss: float,
334-
pumpeff: float) -> tuple:
333+
pumpeff: float, tilt: float = 90.0,
334+
trim_neg_to_zero: bool = True) -> tuple:
335335
"""
336336
Calculate Pressure Drops and Pumping Power needed for the production well using the Impedance Model
337337
:param f3: friction factor [-]
@@ -358,6 +358,10 @@ def ProdPressureDropsAndPumpingPowerUsingImpedenceModel(f3: float, vprod: float,
358358
:type waterloss: float
359359
:param pumpeff: pump efficiency [-]
360360
:type pumpeff: float
361+
:param tilt: tilt of the well from the junction box to the bottom of the laterals [degrees]
362+
:type tilt: float
363+
:param trim_neg_to_zero: whether to trim negative values of pumping power to zero
364+
:type trim_neg_to_zero: bool
361365
:return: tuple of DPOverall, PumpingPower, DPProdWell, DPReserv, DPBouyancy
362366
:rtype: tuple
363367
"""
@@ -368,7 +372,8 @@ def ProdPressureDropsAndPumpingPowerUsingImpedenceModel(f3: float, vprod: float,
368372
DPReserv = impedance * nprod * wellflowrate * 1000. / rhowaterreservoir
369373

370374
# buoyancy pressure drop [kPa]
371-
DPBouyancy = (rhowaterprod - rhowaterinj) * depth * 9.81 / 1E3 # /1E3 to convert from Pa to kPa
375+
gravity_tilt = 9.81 * np.sin(np.radians(tilt))
376+
DPBouyancy = (rhowaterprod - rhowaterinj) * depth * gravity_tilt / 1E3 # /1E3 to convert from Pa to kPa
372377

373378
# overall pressure drop
374379
DPOverall = DPReserv + DPProdWell + DPBouyancy
@@ -378,7 +383,8 @@ def ProdPressureDropsAndPumpingPowerUsingImpedenceModel(f3: float, vprod: float,
378383
PumpingPower = DPOverall * nprod * wellflowrate * (1 + waterloss) / rhowaterinj / pumpeff / 1E3
379384

380385
# in GEOPHIRES v1.2, negative pumping power values become zero (b/c we are not generating electricity)
381-
PumpingPower = [0. if x < 0. else x for x in PumpingPower]
386+
if trim_neg_to_zero:
387+
PumpingPower = [0. if x < 0. else x for x in PumpingPower]
382388

383389
return DPOverall, PumpingPower, DPProdWell, DPReserv, DPBouyancy
384390

@@ -1170,6 +1176,34 @@ def __init__(self, model: Model):
11701176
PreferredUnits=PressureUnit.KPASCAL,
11711177
CurrentUnits=PressureUnit.KPASCAL
11721178
)
1179+
self.total_drilled_length = self.OutputParameterDict[self.total_drilled_length.Name] = OutputParameter(
1180+
Name="Total length of all drilling",
1181+
value=-1.0,
1182+
UnitType=Units.LENGTH,
1183+
PreferredUnits=LengthUnit.KILOMETERS,
1184+
CurrentUnits=LengthUnit.KILOMETERS
1185+
)
1186+
self.tot_vert_m = self.OutputParameterDict[self.tot_vert_m.Name] = OutputParameter(
1187+
Name="Total length of vertical drilling",
1188+
value=-1.0,
1189+
UnitType=Units.LENGTH,
1190+
PreferredUnits=LengthUnit.METERS,
1191+
CurrentUnits=LengthUnit.METERS
1192+
)
1193+
self.tot_to_junction_m = self.OutputParameterDict[self.tot_to_junction_m.Name] = OutputParameter(
1194+
Name="Total length from lateral junction to base of vertical drilling",
1195+
value=-1.0,
1196+
UnitType=Units.LENGTH,
1197+
PreferredUnits=LengthUnit.METERS,
1198+
CurrentUnits=LengthUnit.METERS
1199+
)
1200+
self.tot_lateral_m = self.OutputParameterDict[self.tot_lateral_m.Name] = OutputParameter(
1201+
Name="Total length of lateral drilling",
1202+
value=-1.0,
1203+
UnitType=Units.LENGTH,
1204+
PreferredUnits=LengthUnit.METERS,
1205+
CurrentUnits=LengthUnit.METERS
1206+
)
11731207

11741208
def __str__(self):
11751209
return "WellBores"

0 commit comments

Comments
 (0)