Skip to content

Commit 208af1b

Browse files
WellDrillingCostCorrelation default value fix
1 parent 36f35f2 commit 208af1b

File tree

4 files changed

+13
-22
lines changed

4 files changed

+13
-22
lines changed

src/geophires_x/Economics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ def __init__(self, model: Model):
991991
)
992992
self.wellcorrelation = self.ParameterDict[self.wellcorrelation.Name] = intParameter(
993993
"Well Drilling Cost Correlation",
994-
DefaultValue=WellDrillingCostCorrelation.VERTICAL_LARGE_INT1,
994+
DefaultValue=WellDrillingCostCorrelation.VERTICAL_LARGE_INT1.int_value,
995995
AllowableRange=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
996996
ValuesEnum=WellDrillingCostCorrelation,
997997
UnitType=Units.NONE,

src/geophires_x/OptionList.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ def from_input_string(input_string: str):
195195

196196
raise ValueError(f'Unknown Well Drilling Cost Correlation input value: {input_string}')
197197

198+
@staticmethod
199+
def from_int(int_val):
200+
for member in __class__:
201+
if member.int_value == int_val:
202+
return member
203+
198204

199205
class FractureShape(GeophiresInputEnum):
200206
CIRCULAR_AREA = 1, "Circular fracture with known area"

src/geophires_x/SUTRAEconomics.py

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -136,28 +136,13 @@ def __init__(self, model: Model):
136136
)
137137
self.wellcorrelation = self.ParameterDict[self.wellcorrelation.Name] = intParameter(
138138
"Well Drilling Cost Correlation",
139-
DefaultValue=WellDrillingCostCorrelation.VERTICAL_LARGE_INT1,
140-
AllowableRange=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], # Range updated to include all options
139+
DefaultValue=WellDrillingCostCorrelation.VERTICAL_LARGE_INT1.int_value,
140+
AllowableRange=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
141+
ValuesEnum=WellDrillingCostCorrelation,
141142
UnitType=Units.NONE,
142143
ErrMessage="assume default well drilling cost correlation (10)",
143-
ToolTipText="""Select the built-in well drilling and completion cost correlation:
144-
1. vertical small diameter, baseline;
145-
2. deviated small diameter, baseline;
146-
3. vertical large diameter, baseline;
147-
4. deviated large diameter, baseline;
148-
5. Simple;
149-
6. vertical small diameter, intermediate1;
150-
7. vertical small diameter, intermediate2;
151-
8. deviated small diameter, intermediate1;
152-
9. deviated small diameter, intermediate2;
153-
10. vertical large diameter, intermediate1;
154-
11. vertical large diameter, intermediate2;
155-
12. deviated large diameter, intermediate1;
156-
13. deviated large diameter, intermediate2;
157-
14. vertical open-hole, small diameter, ideal;
158-
15. deviated liner, small diameter, ideal;
159-
16. vertical open-hole, large diameter, ideal;
160-
17. deviated liner, large diameter, ideal;"""
144+
ToolTipText="Select the built-in well drilling and completion cost correlation: " +
145+
'; '.join([f'{it.int_value}: {it.value}' for it in WellDrillingCostCorrelation])
161146
)
162147

163148
self.timestepsperyear = self.ParameterDict[self.timestepsperyear.Name] = intParameter(

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@
14261426
"type": "integer",
14271427
"units": null,
14281428
"category": "Economics",
1429-
"default": "",
1429+
"default": 10,
14301430
"minimum": 1,
14311431
"maximum": 17,
14321432
"enum_values": [

0 commit comments

Comments
 (0)