Skip to content

Commit a8aa8e6

Browse files
Re-implement previous behavior to display drilling/stimulation costs for redrilling when total capex is provided
1 parent 00846f8 commit a8aa8e6

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

src/geophires_x/Outputs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,12 @@ def PrintOutputs(self, model: Model):
475475
f.write(f' District Heating System Cost: {model.economics.dhdistrictcost.value:10.2f} {model.economics.dhdistrictcost.CurrentUnits.value}\n')
476476
f.write(f' Total surface equipment costs: {(model.economics.Cplant.value+model.economics.Cgath.value):10.2f} ' + model.economics.Cplant.CurrentUnits.value + NL)
477477
f.write(f' {model.economics.Cexpl.display_name}: {model.economics.Cexpl.value:10.2f} {model.economics.Cexpl.CurrentUnits.value}\n')
478+
479+
if model.economics.totalcapcost.Valid and model.wellbores.redrill.value > 0:
480+
f.write(f' Drilling and completion costs (for redrilling):{econ.Cwell.value:10.2f} {econ.Cwell.CurrentUnits.value}\n')
481+
f.write(f' Drilling and completion costs per redrilled well: {(econ.Cwell.value/(model.wellbores.nprod.value+model.wellbores.ninj.value)):10.2f} {econ.Cwell.CurrentUnits.value}\n')
482+
f.write(f' Stimulation costs (for redrilling): {econ.Cstim.value:10.2f} {econ.Cstim.CurrentUnits.value}\n')
483+
478484
if model.economics.RITCValue.value:
479485
f.write(f' {model.economics.RITCValue.display_name}: {-1*model.economics.RITCValue.value:10.2f} {model.economics.RITCValue.CurrentUnits.value}\n')
480486

tests/test_geophires_x.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,19 +1249,15 @@ def test_redrilling_costs(self):
12491249
self.assertAlmostEqual(result_opex['Total operating and maintenance costs']['value'], opex_sum, places=1)
12501250

12511251
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
1252+
capex_field_suffix = (
1253+
'' if result_capex.get('Drilling and completion costs') is not None else ' (for redrilling)'
1254+
)
1255+
expected_annual_redrilling_cost = (
1256+
(
1257+
result_capex[f'Drilling and completion costs{capex_field_suffix}']['value']
1258+
+ result_capex[f'Stimulation costs{capex_field_suffix}']['value']
12631259
)
1264-
else:
1265-
# Individual capex line items are not calculated when user provides Total Capital Cost.
1266-
# FIXME WIP output/check
1267-
pass
1260+
* result_redrills
1261+
) / result.result['ECONOMIC PARAMETERS']['Project lifetime']['value']
1262+
1263+
self.assertAlmostEqual(expected_annual_redrilling_cost, result_opex['Redrilling costs']['value'], places=2)

0 commit comments

Comments
 (0)