Skip to content

Commit 4b9e4d4

Browse files
Merge branch 'NREL:main' into main
2 parents 42ca3eb + ba452ab commit 4b9e4d4

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

src/geophires_x/WellBores.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ def ProdPressureDropAndPumpingPowerUsingIndexes(
436436
Pexcess_kPa = 344.7 # = 50 psi
437437

438438
# Minimum production pump inlet pressure and minimum wellhead pressure
439-
Pminimum_kPa = vapor_pressure_water_kPa(Trock_degC) + Pexcess_kPa
439+
if Trock_degC < 373.9:
440+
Pminimum_kPa = vapor_pressure_water_kPa(Trock_degC) + Pexcess_kPa
441+
else: #above the critical water temperature, vapor no longer occurs and vapor pressure can no longer be calculated. A "dummy" vapor pressure can be assumed as the fluid phase no longer impacts the pump depth.
442+
Pminimum_kPa = 100 #setting artificially to 1 bar = 100 kPa
440443

441444
if usebuiltinppwellheadcorrelation:
442445
Pprodwellhead = Pminimum_kPa # production wellhead pressure [kPa]
@@ -557,8 +560,10 @@ def InjPressureDropAndPumpingPowerUsingIndexes(
557560
Pexcess_kPa = 344.7 # = 50 psi
558561

559562
# Minimum production pump inlet pressure and minimum wellhead pressure
560-
Pminimum_kPa = vapor_pressure_water_kPa(Trock_degC) + Pexcess_kPa
561-
563+
if Trock_degC < 373.9:
564+
Pminimum_kPa = vapor_pressure_water_kPa(Trock_degC) + Pexcess_kPa
565+
else: #above the critical water temperature, vapor no longer occurs and vapor pressure can no longer be calculated. A "dummy" vapor pressure can be assumed as the fluid phase no longer impacts the pump depth.
566+
Pminimum_kPa = 100 #setting artificially to 1 bar = 100 kPa
562567
if usebuiltinppwellheadcorrelation:
563568
Pprodwellhead = Pminimum_kPa # production wellhead pressure [kPa]
564569
else:

tests/test_geophires_x.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,22 @@ def get_fcr_lcoe(fcr: float) -> float:
347347
self.assertAlmostEqual(9.61, get_fcr_lcoe(0.05), places=1)
348348
self.assertAlmostEqual(3.33, get_fcr_lcoe(0.0001), places=1)
349349
self.assertAlmostEqual(104.34, get_fcr_lcoe(0.8), places=0)
350+
351+
def test_vapor_pressure_above_critical_temperature(self):
352+
"""https://github.com/NREL/GEOPHIRES-X/issues/214"""
353+
354+
input_params = GeophiresInputParameters(
355+
{
356+
'End-Use Option': 2,
357+
'Reservoir Depth': 6,
358+
'Gradient 1': 75,
359+
'Reservoir Model': 1,
360+
'Time steps per year': 1,
361+
'Maximum Temperature': 500,
362+
'Print Output to Console': 0,
363+
}
364+
)
365+
366+
result = GeophiresXClient().get_geophires_result(input_params)
367+
self.assertIsNotNone(result)
368+
self.assertIn('SUMMARY OF RESULTS', result.result)

0 commit comments

Comments
 (0)