Skip to content

Commit 2cc8918

Browse files
Fix Well Separation default and max allowed values to apparent original intentions of 1km and 10km. Retain likely-unintended default unit of inches instead of switching to meters for backwards compatibility and update tooltip text to note the discrepancy.
1 parent 3561220 commit 2cc8918

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/geophires_x/WellBores.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -824,17 +824,28 @@ def __init__(self, model: Model):
824824
'production well, this parameter specifies the overall pressure drop in the reservoir between '
825825
'injection well and production well (see docs)'
826826
)
827+
828+
well_separation_default_value_m = 1000
829+
well_separation_default_unit = LengthUnit.INCHES
830+
well_separation_preferred_unit = LengthUnit.METERS
831+
well_separation_unit_mismatch_note = (f'. (Note that the default unit is '
832+
f'{well_separation_default_unit.name.lower()}.)'
833+
if well_separation_default_unit != well_separation_preferred_unit else '')
834+
# noinspection SpellCheckingInspection
827835
self.wellsep = self.ParameterDict[self.wellsep.Name] = floatParameter(
828836
"Well Separation",
829-
DefaultValue=1000.0,
837+
DefaultValue=int(quantity(well_separation_default_value_m, 'm')
838+
.to(well_separation_default_unit.value).magnitude),
830839
Min=10.,
831-
Max=10000.,
840+
Max=int(quantity(10000, 'm').to(well_separation_default_unit.value).magnitude),
832841
UnitType=Units.LENGTH,
833-
PreferredUnits=LengthUnit.METERS,
834-
CurrentUnits=LengthUnit.INCHES,
835-
ErrMessage="assume default well separation (1000 m)",
836-
ToolTipText="Well separation for built-in TOUGH2 doublet reservoir model"
842+
PreferredUnits=well_separation_preferred_unit,
843+
CurrentUnits=well_separation_default_unit,
844+
ErrMessage=f'assume default well separation ({well_separation_default_value_m} m)',
845+
ToolTipText=f'Well separation for built-in TOUGH2 doublet reservoir model'
846+
f'{well_separation_unit_mismatch_note}'
837847
)
848+
838849
self.Tinj = self.ParameterDict[self.Tinj.Name] = floatParameter(
839850
"Injection Temperature",
840851
DefaultValue=70.0,

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,13 +710,13 @@
710710
"maximum": 10000.0
711711
},
712712
"Well Separation": {
713-
"description": "Well separation for built-in TOUGH2 doublet reservoir model",
713+
"description": "Well separation for built-in TOUGH2 doublet reservoir model. (Note that the default unit is inches.)",
714714
"type": "number",
715715
"units": "in",
716716
"category": "Well Bores",
717-
"default": 1000.0,
717+
"default": 39370,
718718
"minimum": 10.0,
719-
"maximum": 10000.0
719+
"maximum": 393700
720720
},
721721
"Injection Temperature": {
722722
"description": "Constant geofluid injection temperature at injection wellhead.",

0 commit comments

Comments
 (0)