Skip to content

Commit 21c16e3

Browse files
Support for psi units (for pressure parameters that are converted during output)
1 parent 8057a73 commit 21c16e3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/geophires_x/Units.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ class PressureUnit(str, Enum):
220220
PASCAL = "Pa"
221221
BAR = "bar"
222222
KBAR = "kbar"
223+
PSI = "psi"
223224

224225

225226
class AvailabilityUnit(str, Enum):

tests/test_geophires_x.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,15 @@ def test_project_red_larger_fractures(self):
473473

474474
self.assertEqual(result.result['RESERVOIR PARAMETERS']['Fracture width']['value'], 320.0)
475475
self.assertEqual(result.result['RESERVOIR PARAMETERS']['Fracture width']['unit'], 'meter')
476+
477+
def test_convert_output_psi_to_kpa(self):
478+
GeophiresXClient().get_geophires_result(
479+
GeophiresInputParameters(
480+
from_file_path=self._get_test_file_path(Path('examples/example_SHR-2.txt')),
481+
params={
482+
'Production Wellhead Pressure': '64.69 psi',
483+
},
484+
)
485+
)
486+
487+
# TODO validate output values (for now we are just testing an exception isn't thrown)

0 commit comments

Comments
 (0)