Skip to content

Commit d91b514

Browse files
Move well drilling cost correlation coefficients in Economics to WellDrillingCostCorrelation enum. WIP - TODO to consolidate coefficients in SUTRAEconomics
1 parent 4ba73e8 commit d91b514

File tree

2 files changed

+44
-103
lines changed

2 files changed

+44
-103
lines changed

src/geophires_x/Economics.py

Lines changed: 8 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -95,43 +95,13 @@ def calculate_cost_of_one_vertical_well(model: Model, depth_m: float, well_corre
9595
)
9696

9797
if well_correlation is WellDrillingCostCorrelation.SIMPLE:
98-
cost_of_one_well = vertical_drilling_cost_per_m * depth_m * 1E-6
99-
100-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL:
101-
cost_of_one_well = (0.30212 * depth_m ** 2 + 584.91124 * depth_m + 751368.47270) * 1E-6
102-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE:
103-
cost_of_one_well = (0.28180 * depth_m ** 2 + 1275.52130 * depth_m + 632315.12640) * 1E-6
104-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL:
105-
cost_of_one_well = (0.28977 * depth_m ** 2 + 882.15067 * depth_m + 680562.50150) * 1E-6
106-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE:
107-
cost_of_one_well = (0.25528 * depth_m ** 2 + 1716.71568 * depth_m + 500866.89110) * 1E-6
108-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL_INT1:
109-
cost_of_one_well = (0.13710 * depth_m ** 2 + 129.61033 * depth_m + 1205587.57100) * 1E-6
110-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE_INT1:
111-
cost_of_one_well = (0.18927 * depth_m ** 2 + 293.45174 * depth_m + 1326526.31300) * 1E-6
112-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL_INT1:
113-
cost_of_one_well = (0.15340 * depth_m ** 2 + 120.31700 * depth_m + 1431801.54400) * 1E-6
114-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE_INT1:
115-
cost_of_one_well = (0.19950 * depth_m ** 2 + 296.13011 * depth_m + 1697867.70900) * 1E-6
116-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL_INT2:
117-
cost_of_one_well = (0.00804 * depth_m ** 2 + 455.60507 * depth_m + 921007.68680) * 1E-6
118-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE_INT2:
119-
cost_of_one_well = (0.00315 * depth_m ** 2 + 782.69676 * depth_m + 983620.25270) * 1E-6
120-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL_INT2:
121-
cost_of_one_well = (0.00854 * depth_m ** 2 + 506.08357 * depth_m + 1057330.39000) * 1E-6
122-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE_INT2:
123-
cost_of_one_well = (0.00380 * depth_m ** 2 + 838.90249 * depth_m + 1181947.04400) * 1E-6
124-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL_IDEAL:
125-
cost_of_one_well = (0.00252 * depth_m ** 2 + 439.44503 * depth_m + 590611.90110) * 1E-6
126-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE_IDEAL:
127-
cost_of_one_well = (-0.00240 * depth_m ** 2 + 752.93946 * depth_m + 524337.65380) * 1E-6
128-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL_IDEAL:
129-
cost_of_one_well = (0.00719 * depth_m ** 2 + 455.85233 * depth_m + 753377.73080) * 1E-6
130-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE_IDEAL:
131-
cost_of_one_well = (0.00376 * depth_m ** 2 + 762.52696 * depth_m + 765103.07690) * 1E-6
98+
cost_of_one_well = vertical_drilling_cost_per_m * depth_m * 1E-6
99+
else:
100+
cost_of_one_well = well_correlation.calculate_cost_USD(depth_m)
132101

133102
# account for adjustment factor
134103
cost_of_one_well = well_cost_adjustment_factor * cost_of_one_well
104+
135105
return cost_of_one_well
136106

137107

@@ -195,60 +165,16 @@ def calculate_cost_of_non_vertical_section(model: Model, length_m: float, well_c
195165
if not NonverticalsCased:
196166
# assume that casing & cementing costs 50% of drilling costs
197167
casing_factor = 0.5
168+
198169
if model.economics.Nonvertical_drilling_cost_per_m.Provided or well_correlation is WellDrillingCostCorrelation.SIMPLE:
199170
cost_of_non_vertical_section = casing_factor * ((num_nonvertical_sections * nonvertical_drilling_cost_per_m * length_per_section_m)) * 1E-6
200-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL:
201-
cost_per_section = (0.30212 * length_per_section_m ** 2 + 584.91124 * length_per_section_m + 751368.47270) * 1E-6
202-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
203-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE:
204-
cost_per_section = (0.28180 * length_per_section_m ** 2 + 1275.52130 * length_per_section_m + 632315.12640) * 1E-6
205-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
206-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL:
207-
cost_per_section = (0.28977 * length_per_section_m ** 2 + 882.15067 * length_per_section_m + 680562.50150) * 1E-6
208-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
209-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE:
210-
cost_per_section = (0.25528 * length_per_section_m ** 2 + 1716.71568 * length_per_section_m + 500866.89110) * 1E-6
211-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
212-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL_INT1:
213-
cost_per_section = (0.13710 * length_per_section_m ** 2 + 129.61033 * length_per_section_m + 1205587.57100) * 1E-6
214-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
215-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE_INT1:
216-
cost_per_section = (0.18927 * length_per_section_m ** 2 + 293.45174 * length_per_section_m + 1326526.31300) * 1E-6
217-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
218-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL_INT1:
219-
cost_per_section = (0.15340 * length_per_section_m ** 2 + 120.31700 * length_per_section_m + 1431801.54400) * 1E-6
220-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
221-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE_INT1:
222-
cost_per_section = (0.19950 * length_per_section_m ** 2 + 296.13011 * length_per_section_m + 1697867.70900) * 1E-6
223-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
224-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL_INT2:
225-
cost_per_section = (0.00804 * length_per_section_m ** 2 + 455.60507 * length_per_section_m + 921007.68680) * 1E-6
226-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
227-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE_INT2:
228-
cost_per_section = (0.00315 * length_per_section_m ** 2 + 782.69676 * length_per_section_m + 983620.25270) * 1E-6
229-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
230-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL_INT2:
231-
cost_per_section = (0.00854 * length_per_section_m ** 2 + 506.08357 * length_per_section_m + 1057330.39000) * 1E-6
232-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
233-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE_INT2:
234-
cost_per_section = (0.00380 * length_per_section_m ** 2 + 838.90249 * length_per_section_m + 1181947.04400) * 1E-6
235-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
236-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_SMALL_IDEAL:
237-
cost_per_section = (0.00252 * length_per_section_m ** 2 + 439.44503 * length_per_section_m + 590611.90110) * 1E-6
238-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
239-
elif well_correlation is WellDrillingCostCorrelation.VERTICAL_LARGE_IDEAL:
240-
cost_per_section = (-0.00240 * length_per_section_m ** 2 + 752.93946 * length_per_section_m + 524337.65380) * 1E-6
241-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
242-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_SMALL_IDEAL:
243-
cost_per_section = (0.00719 * length_per_section_m ** 2 + 455.85233 * length_per_section_m + 753377.73080) * 1E-6
244-
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
245-
elif well_correlation is WellDrillingCostCorrelation.DEVIATED_LARGE_IDEAL:
246-
cost_per_section = (0.00376 * length_per_section_m ** 2 + 762.52696 * length_per_section_m + 765103.07690) * 1E-6
171+
else:
172+
cost_per_section = well_correlation.calculate_cost_USD(length_per_section_m)
247173
cost_of_non_vertical_section = casing_factor * num_nonvertical_sections * cost_per_section
248174

249175
# account for adjustment factor
250-
251176
cost_of_non_vertical_section = well_cost_adjustment_factor * cost_of_non_vertical_section
177+
252178
return cost_of_non_vertical_section
253179

254180

src/geophires_x/OptionList.py

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,42 @@ class ReservoirVolume(str, Enum):
5151

5252

5353
class WellDrillingCostCorrelation(str, Enum):
54-
"""Note: order must be retained since input is read as an int"""
55-
56-
VERTICAL_SMALL = "vertical small diameter, baseline"
57-
DEVIATED_SMALL = "deviated small diameter, baseline"
58-
VERTICAL_LARGE = "vertical large diameter, baseline"
59-
DEVIATED_LARGE = "deviated large diameter, baseline"
60-
61-
SIMPLE = "Simple"
62-
63-
VERTICAL_SMALL_INT1 = "vertical small diameter, intermediate1"
64-
VERTICAL_SMALL_INT2 = "vertical small diameter, intermediate2"
65-
DEVIATED_SMALL_INT1 = "deviated small diameter, intermediate1"
66-
DEVIATED_SMALL_INT2 = "deviated small diameter, intermediate2"
67-
VERTICAL_LARGE_INT1 = "vertical large diameter, intermediate1"
68-
VERTICAL_LARGE_INT2 = "vertical large diameter, intermediate2"
69-
DEVIATED_LARGE_INT1 = "deviated large diameter, intermediate1"
70-
DEVIATED_LARGE_INT2 = "deviated large diameter, intermediate2"
71-
VERTICAL_SMALL_IDEAL = "vertical open-hole, small diameter, ideal"
72-
DEVIATED_SMALL_IDEAL = "deviated liner, small diameter, ideal"
73-
VERTICAL_LARGE_IDEAL = "vertical open-hole, large diameter, ideal"
74-
DEVIATED_LARGE_IDEAL = "deviated liner, large diameter, ideal"
54+
"""Note: order must be retained since input is read as an int; first int arg is duplicative of order"""
55+
56+
VERTICAL_SMALL = 1, "vertical small diameter, baseline", 0.30212, 584.91124, 751368.47270
57+
DEVIATED_SMALL = 2, "deviated small diameter, baseline", 0.28977, 882.15067, 680562.50150
58+
VERTICAL_LARGE = 3, "vertical large diameter, baseline", 0.28180, 1275.52130, 632315.12640
59+
DEVIATED_LARGE = 4, "deviated large diameter, baseline", 0.25528, 1716.71568, 500866.89110
60+
61+
SIMPLE = 5, "Simple", 0, 1846*1E6, 0 # Based on Fervo Project Cape cost per meter (~$1846/m)
62+
63+
VERTICAL_SMALL_INT1 = 6, "vertical small diameter, intermediate1", 0.13710, 129.61033, 1205587.57100
64+
VERTICAL_SMALL_INT2 = 7, "vertical small diameter, intermediate2", 0.00804, 455.60507, 921007.68680
65+
DEVIATED_SMALL_INT1 = 8, "deviated small diameter, intermediate1", 0.15340, 120.31700, 1431801.54400
66+
DEVIATED_SMALL_INT2 = 9, "deviated small diameter, intermediate2", 0.00854, 506.08357, 1057330.39000
67+
VERTICAL_LARGE_INT1 = 10, "vertical large diameter, intermediate1", 0.18927, 293.45174, 1326526.31300
68+
VERTICAL_LARGE_INT2 = 11, "vertical large diameter, intermediate2", 0.00315, 782.69676, 983620.25270
69+
DEVIATED_LARGE_INT1 = 12, "deviated large diameter, intermediate1", 0.19950, 296.13011, 1697867.70900
70+
DEVIATED_LARGE_INT2 = 13, "deviated large diameter, intermediate2", 0.00380, 838.90249, 1181947.04400
71+
VERTICAL_SMALL_IDEAL = 14, "vertical open-hole, small diameter, ideal", 0.00252, 439.44503, 590611.90110
72+
DEVIATED_SMALL_IDEAL = 15, "deviated liner, small diameter, ideal", 0.00719, 455.85233, 753377.73080
73+
VERTICAL_LARGE_IDEAL = 16, "vertical open-hole, large diameter, ideal", -0.00240, 752.93946, 524337.65380
74+
DEVIATED_LARGE_IDEAL = 17, "deviated liner, large diameter, ideal", 0.00376, 762.52696, 765103.07690
75+
76+
77+
def __new__(cls, *args, **kwds):
78+
obj = str.__new__(cls)
79+
obj._value_ = args[1]
80+
return obj
81+
82+
# ignore the first param since it's already set by __new__
83+
def __init__(self, idx: int, _: str, c2:float, c1:float, c0:float):
84+
self._c2 = c2
85+
self._c1 = c1
86+
self._c0 = c0
87+
88+
def calculate_cost_USD(self, meters) -> float:
89+
return (self._c2 * meters ** 2 + self._c1 * meters + self._c0) * 1E-6
7590

7691

7792

0 commit comments

Comments
 (0)