Skip to content

Commit 0224932

Browse files
WIP - display redrilling costs in O&M
1 parent 710cdd7 commit 0224932

File tree

4 files changed

+30
-11
lines changed

4 files changed

+30
-11
lines changed

src/geophires_x/Economics.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,14 @@ def __init__(self, model: Model):
17751775
UnitType=Units.CURRENCYFREQUENCY,
17761776
PreferredUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
17771777
CurrentUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR
1778+
# TODO TooltipText to document how this is calculated
1779+
)
1780+
self.redrilling_annual_cost = self.OutputParameterDict[self.redrilling_annual_cost.Name] = OutputParameter(
1781+
Name="Redrilling costs",
1782+
UnitType=Units.CURRENCYFREQUENCY,
1783+
PreferredUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
1784+
CurrentUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
1785+
# FIXME WIP TooltipText
17781786
)
17791787
self.Cplant = self.OutputParameterDict[self.Cplant.Name] = OutputParameter(
17801788
Name="Surface Plant cost",
@@ -1809,7 +1817,7 @@ def __init__(self, model: Model):
18091817
UnitType=Units.CURRENCYFREQUENCY,
18101818
PreferredUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
18111819
CurrentUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
1812-
ToolTipText='Assumes $3.5/1,000 gallons of water'
1820+
ToolTipText='Assumes $3.5/1,000 gallons of water' # TODO parameterize
18131821
)
18141822
self.CCap = self.OutputParameterDict[self.CCap.Name] = OutputParameter(
18151823
Name="Total Capital Cost",
@@ -2521,8 +2529,10 @@ def Calculate(self, model: Model) -> None:
25212529

25222530
if model.wellbores.redrill.value > 0:
25232531
# account for well redrilling
2524-
self.Coam.value = self.Coam.value + \
2525-
(self.Cwell.value + self.Cstim.value) * model.wellbores.redrill.value / model.surfaceplant.plant_lifetime.value
2532+
redrilling_costs: PlainQuantity = self.calculate_redrilling_costs(model)
2533+
self.redrilling_annual_cost.value = redrilling_costs.to(self.redrilling_annual_cost.CurrentUnits).magnitude
2534+
self.Coam.value += redrilling_costs.to(self.Coam.CurrentUnits).magnitude
2535+
25262536

25272537
# Add in the AnnualLicenseEtc and TaxRelief
25282538
self.Coam.value = self.Coam.value + self.AnnualLicenseEtc.value - self.TaxRelief.value
@@ -2751,6 +2761,11 @@ def calculate_stimulation_costs(self, model: Model) -> PlainQuantity:
27512761

27522762
return quantity(stimulation_costs, self.Cstim.CurrentUnits)
27532763

2764+
def calculate_redrilling_costs(self, model) -> PlainQuantity:
2765+
return ((self.Cwell.quantity() + self.Cstim.quantity())
2766+
* model.wellbores.redrill.quantity()
2767+
/ model.surfaceplant.plant_lifetime.quantity())
2768+
27542769
def calculate_field_gathering_costs(self, model: Model) -> None:
27552770
if self.ccgathfixed.Valid:
27562771
self.Cgath.value = self.ccgathfixed.value
@@ -3164,5 +3179,7 @@ def _calculate_derived_outputs(self, model: Model) -> None:
31643179
(model.wellbores.nprod.value + model.wellbores.ninj.value)
31653180
)
31663181

3182+
3183+
31673184
def __str__(self):
31683185
return "Economics"

src/geophires_x/Outputs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,6 @@ 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-
if model.economics.totalcapcost.Valid and model.wellbores.redrill.value > 0:
479-
f.write(f' Drilling and completion costs (for redrilling):{model.economics.Cwell.value:10.2f} ' + model.economics.Cwell.CurrentUnits.value + NL)
480-
f.write(f' Drilling and completion costs per redrilled well: {(model.economics.Cwell.value/(model.wellbores.nprod.value+model.wellbores.ninj.value)):10.2f} ' + model.economics.Cwell.CurrentUnits.value + NL)
481-
f.write(f' Stimulation costs (for redrilling): {econ.Cstim.value:10.2f} {econ.Cstim.CurrentUnits.value}\n')
482478
if model.economics.RITCValue.value:
483479
f.write(f' {model.economics.RITCValue.display_name}: {-1*model.economics.RITCValue.value:10.2f} {model.economics.RITCValue.CurrentUnits.value}\n')
484480

@@ -506,6 +502,10 @@ def PrintOutputs(self, model: Model):
506502
f.write(f' Annual District Heating O&M Cost: {model.economics.dhdistrictoandmcost.value:10.2f} {model.economics.dhdistrictoandmcost.CurrentUnits.value}\n')
507503
f.write(f' Average Annual Peaking Fuel Cost: {model.economics.averageannualngcost.value:10.2f} {model.economics.averageannualngcost.CurrentUnits.value}\n')
508504

505+
if model.wellbores.redrill.value > 0:
506+
redrill_label = Outputs._field_label(econ.redrilling_annual_cost.display_name, 47)
507+
f.write(f' {redrill_label}{econ.redrilling_annual_cost.value:10.2f} {econ.redrilling_annual_cost.CurrentUnits.value}\n')
508+
509509
f.write(f' {econ.Coam.display_name}: {(econ.Coam.value + econ.averageannualpumpingcosts.value + econ.averageannualheatpumpelectricitycost.value):10.2f} {econ.Coam.CurrentUnits.value}\n')
510510
else:
511511
f.write(f' {econ.Coam.display_name}: {econ.Coam.value:10.2f} {econ.Coam.CurrentUnits.value}\n')

src/geophires_x_client/geophires_x_result.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ class GeophiresXResult:
290290
# SUTRA
291291
'Average annual auxiliary fuel cost',
292292
'Average annual pumping cost',
293+
'Redrilling costs',
293294
'Total average annual O&M costs',
294295
],
295296
'SURFACE EQUIPMENT SIMULATION RESULTS': [

tests/examples/Fervo_Project_Cape-4.out

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.9.28
8-
Simulation Date: 2025-07-02
9-
Simulation Time: 12:19
10-
Calculation Time: 1.773 sec
7+
GEOPHIRES Version: 3.9.36
8+
Simulation Date: 2025-07-25
9+
Simulation Time: 10:59
10+
Calculation Time: 1.734 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -113,6 +113,7 @@ Simulation Metadata
113113
Wellfield maintenance costs: 6.20 MUSD/yr
114114
Power plant maintenance costs: 25.43 MUSD/yr
115115
Water costs: 24.86 MUSD/yr
116+
Redrilling costs: 70.46 MUSD/yr
116117
Total operating and maintenance costs: 126.95 MUSD/yr
117118

118119

0 commit comments

Comments
 (0)