Skip to content

Commit efefa76

Browse files
Add 'Drilling and completion costs per well' as derived output (adds to schema)
1 parent c6957ea commit efefa76

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

src/geophires_x/Economics.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,18 +1633,29 @@ def __init__(self, model: Model):
16331633
f'Provide {self.ccexplfixed.Name} to override the default correlation and set your own cost.'
16341634
)
16351635

1636+
# noinspection SpellCheckingInspection
16361637
self.Cwell = self.OutputParameterDict[self.Cwell.Name] = OutputParameter(
16371638
Name="Wellfield cost",
16381639
display_name='Drilling and completion costs',
16391640
UnitType=Units.CURRENCY,
16401641
PreferredUnits=CurrencyUnit.MDOLLARS,
16411642
CurrentUnits=CurrencyUnit.MDOLLARS,
16421643

1643-
# See TODO re:parameterizing indirect costs at src/geophires_x/Economics.py:652
1644-
# (https://github.com/NREL/GEOPHIRES-X/issues/383)
1644+
# TODO https://github.com/NREL/GEOPHIRES-X/issues/383?title=Parameterize+indirect+cost+factor
16451645
ToolTipText="Includes total drilling and completion cost of all injection and production wells and "
16461646
"laterals, plus 5% indirect costs."
16471647
)
1648+
self.drilling_and_completion_costs_per_well = self.OutputParameterDict[
1649+
self.drilling_and_completion_costs_per_well.Name] = OutputParameter(
1650+
Name='Drilling and completion costs per well',
1651+
UnitType=Units.CURRENCY,
1652+
PreferredUnits=CurrencyUnit.MDOLLARS,
1653+
CurrentUnits=CurrencyUnit.MDOLLARS,
1654+
1655+
# TODO https://github.com/NREL/GEOPHIRES-X/issues/383?title=Parameterize+indirect+cost+factor
1656+
ToolTipText='Includes total drilling and completion cost per well, '
1657+
'including injection and production wells and laterals, plus 5% indirect costs.'
1658+
)
16481659
self.Coamwell = self.OutputParameterDict[self.Coamwell.Name] = OutputParameter(
16491660
Name="O&M Wellfield cost",
16501661
display_name='Wellfield maintenance costs',
@@ -2313,7 +2324,9 @@ def Calculate(self, model: Model) -> None:
23132324
else:
23142325
self.cost_lateral_section.value = 0.0
23152326
# cost of the well field
2316-
# 1.05 for 5% indirect costs - see TODO re:parameterizing at src/geophires_x/Economics.py:652
2327+
2328+
# 1.05 for 5% indirect costs
2329+
# TODO https://github.com/NREL/GEOPHIRES-X/issues/383?title=Parameterize+indirect+cost+factor
23172330
self.Cwell.value = 1.05 * ((self.cost_one_production_well.value * model.wellbores.nprod.value) +
23182331
(self.cost_one_injection_well.value * model.wellbores.ninj.value) +
23192332
self.cost_lateral_section.value)
@@ -2988,5 +3001,10 @@ def _calculate_derived_outputs(self, model: Model) -> None:
29883001
self.real_discount_rate.value = self.discountrate.quantity().to(convertible_unit(
29893002
self.real_discount_rate.CurrentUnits)).magnitude
29903003

3004+
self.drilling_and_completion_costs_per_well.value = (
3005+
self.Cwell.value /
3006+
(model.wellbores.nprod.value + model.wellbores.ninj.value)
3007+
)
3008+
29913009
def __str__(self):
29923010
return "Economics"

src/geophires_x/Outputs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ def PrintOutputs(self, model: Model):
458458
f.write(f' Drilling and completion costs per production well: {econ.cost_one_production_well.value:10.2f} ' + econ.cost_one_production_well.CurrentUnits.value + NL)
459459
f.write(f' Drilling and completion costs per injection well: {econ.cost_one_injection_well.value:10.2f} ' + econ.cost_one_injection_well.CurrentUnits.value + NL)
460460
else:
461-
f.write(f' Drilling and completion costs per well: {model.economics.Cwell.value/(model.wellbores.nprod.value+model.wellbores.ninj.value):10.2f} ' + model.economics.Cwell.CurrentUnits.value + NL)
461+
cpw_label = Outputs._field_label(econ.drilling_and_completion_costs_per_well.display_name, 47)
462+
f.write(f' {cpw_label}{econ.drilling_and_completion_costs_per_well.value:10.2f} {econ.Cwell.CurrentUnits.value}\n')
462463
f.write(f' {econ.Cstim.display_name}: {econ.Cstim.value:10.2f} {econ.Cstim.CurrentUnits.value}\n')
463464
f.write(f' Surface power plant costs: {model.economics.Cplant.value:10.2f} ' + model.economics.Cplant.CurrentUnits.value + NL)
464465
if model.surfaceplant.plant_type.value == PlantType.ABSORPTION_CHILLER:

src/geophires_x_schema_generator/geophires-result.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,11 @@
333333
"description": "Wellfield cost. Includes total drilling and completion cost of all injection and production wells and laterals, plus 5% indirect costs.",
334334
"units": "MUSD"
335335
},
336-
"Drilling and completion costs per well": {},
336+
"Drilling and completion costs per well": {
337+
"type": "number",
338+
"description": "Includes total drilling and completion cost per well, including injection and production wells and laterals, plus 5% indirect costs.",
339+
"units": "MUSD"
340+
},
337341
"Drilling and completion costs per production well": {},
338342
"Drilling and completion costs per injection well": {},
339343
"Drilling and completion costs per vertical production well": {},

0 commit comments

Comments
 (0)