@@ -1219,3 +1219,49 @@ def test_exploration_cost(self):
1219
1219
1220
1220
self .assertEqual (exploration_cost_MUSD , result .result ['CAPITAL COSTS (M$)' ]['Exploration costs' ]['value' ])
1221
1221
self .assertEqual ('MUSD' , result .result ['CAPITAL COSTS (M$)' ]['Exploration costs' ]['unit' ])
1222
+
1223
+ def test_redrilling_costs (self ):
1224
+ total_capex_specified_result = GeophiresXClient ().get_geophires_result (
1225
+ ImmutableGeophiresInputParameters (
1226
+ from_file_path = self ._get_test_file_path ('examples/Fervo_Project_Cape-4.txt' ),
1227
+ params = {'Total Capital Cost' : 2500 },
1228
+ )
1229
+ )
1230
+
1231
+ for result in [
1232
+ GeophiresXResult (self ._get_test_file_path ('examples/Fervo_Project_Cape-4.out' )),
1233
+ total_capex_specified_result ,
1234
+ ]:
1235
+ result_redrills = result .result ['ENGINEERING PARAMETERS' ]['Number of times redrilling' ]['value' ]
1236
+ self .assertGreater (result_redrills , 0 )
1237
+
1238
+ result_opex = result .result ['OPERATING AND MAINTENANCE COSTS (M$/yr)' ]
1239
+ opex_sum = 0
1240
+ expected_opex_line_items = [
1241
+ 'Wellfield maintenance costs' ,
1242
+ 'Power plant maintenance costs' ,
1243
+ 'Water costs' ,
1244
+ 'Redrilling costs' ,
1245
+ ]
1246
+ for opex_line_item in expected_opex_line_items :
1247
+ opex_sum += result_opex [opex_line_item ]['value' ]
1248
+
1249
+ self .assertAlmostEqual (result_opex ['Total operating and maintenance costs' ]['value' ], opex_sum , places = 1 )
1250
+
1251
+ result_capex = result .result ['CAPITAL COSTS (M$)' ]
1252
+ if result_capex .get ('Drilling and completion costs' ) is not None :
1253
+ expected_annual_redrilling_cost = (
1254
+ (
1255
+ result_capex ['Drilling and completion costs' ]['value' ]
1256
+ + result_capex ['Stimulation costs' ]['value' ]
1257
+ )
1258
+ * result_redrills
1259
+ ) / result .result ['ECONOMIC PARAMETERS' ]['Project lifetime' ]['value' ]
1260
+
1261
+ self .assertAlmostEqual (
1262
+ expected_annual_redrilling_cost , result_opex ['Redrilling costs' ]['value' ], places = 2
1263
+ )
1264
+ else :
1265
+ # Individual capex line items are not calculated when user provides Total Capital Cost.
1266
+ # FIXME WIP output/check
1267
+ pass
0 commit comments