Skip to content

Commit e79e582

Browse files
committed
fixes vapor pressure error above critical temperature
1 parent b926e63 commit e79e582

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-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:

0 commit comments

Comments
 (0)