Skip to content

Commit 1c154f3

Browse files
WellBores - add units to some variable names
1 parent d52f662 commit 1c154f3

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/geophires_x/WellBores.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -373,32 +373,33 @@ def ProdPressureDropAndPumpingPowerUsingIndexes(
373373
Pprodwellhead = ppwellhead
374374
if Pprodwellhead < Pminimum_kPa:
375375
Pprodwellhead = Pminimum_kPa
376-
msg = ('Provided production wellhead pressure under minimum pressure. '
377-
'GEOPHIRES will assume minimum wellhead pressure')
376+
msg = (f'Provided production wellhead pressure ({Pprodwellhead}kPa) '
377+
f'under minimum pressure ({Pminimum_kPa}kPa). '
378+
f'GEOPHIRES will assume minimum wellhead pressure')
378379

379380
print(f'Warning: {msg}')
380381
model.logger.warning(msg)
381382

382-
PIkPa = PI / 100.0 # convert PI from kg/s/bar to kg/s/kPa
383+
PI_kPa = PI / 100.0 # convert PI from kg/s/bar to kg/s/kPa
383384

384385
# calculate pumping depth
385-
pumpdepth = depth_m + (Pminimum_kPa - Phydrostaticcalc_kPa + wellflowrate / PIkPa) / (
386+
pumpdepth_m = depth_m + (Pminimum_kPa - Phydrostaticcalc_kPa + wellflowrate / PI_kPa) / (
386387
f3 * (rhowaterprod * vprod ** 2 / 2.) * (1 / prodwelldiam) / 1E3 + rhowaterprod * 9.81 / 1E3)
387-
pumpdepthfinal = np.max(pumpdepth)
388-
if pumpdepthfinal < 0.0:
389-
pumpdepthfinal = 0.0
390-
msg = ('GEOPHIRES calculates negative production well pumping depth. '
391-
'No production well pumps will be assumed')
388+
pumpdepthfinal_m = np.max(pumpdepth_m)
389+
if pumpdepthfinal_m < 0.0:
390+
pumpdepthfinal_m = 0.0
391+
msg = (f'GEOPHIRES calculates negative production well pumping depth. ({pumpdepthfinal_m}m)'
392+
f'No production well pumps will be assumed')
392393
print(f'Warning: {msg}')
393394
model.logger.warning(msg)
394-
elif pumpdepthfinal > 600.0:
395-
msg = ('GEOPHIRES calculates production pump depth to be deeper than 600 m. '
396-
'Verify reservoir pressure, production well flow rate and production well dimensions')
395+
elif pumpdepthfinal_m > 600.0:
396+
msg = (f'GEOPHIRES calculates production pump depth to be deeper than 600m ({pumpdepthfinal_m}m). '
397+
f'Verify reservoir pressure, production well flow rate and production well dimensions')
397398
print(f'Warning: {msg}')
398399
model.logger.warning(msg)
399400

400401
# calculate production well pumping pressure [kPa]
401-
DPProdWell = Pprodwellhead - (Phydrostaticcalc_kPa - wellflowrate / PIkPa - rhowaterprod * 9.81 * depth_m / 1E3 - f3 *
402+
DPProdWell = Pprodwellhead - (Phydrostaticcalc_kPa - wellflowrate / PI_kPa - rhowaterprod * 9.81 * depth_m / 1E3 - f3 *
402403
(rhowaterprod * vprod ** 2 / 2.) * (depth_m / prodwelldiam) / 1E3)
403404
# [MWe] total pumping power for production wells
404405
PumpingPowerProd = DPProdWell * nprod * wellflowrate / rhowaterprod / pumpeff / 1E3
@@ -549,7 +550,7 @@ def __init__(self, model: Model):
549550
:type model: :class:`~geophires_x.Model.Model`
550551
:return: Nothing, and is used to initialize the class
551552
"""
552-
model.logger.info(f"Init {self.__class__.__name__}: {__name__}")
553+
model.logger.info(f'Init {self.__class__.__name__}: {__name__}')
553554
self.rhowaterprod = self.rhowaterinj = 0.0
554555

555556
# Set up all the Parameters that will be predefined by this class using the different types of parameter classes.

0 commit comments

Comments
 (0)