Skip to content

Commit 7ae2df7

Browse files
Separate function for stimulation cost calculation. Clarify that Reservoir Stimulation Capital Cost includes contingency and indirect cost (meaning they won't be applied)
1 parent a471792 commit 7ae2df7

File tree

2 files changed

+30
-23
lines changed

2 files changed

+30
-23
lines changed

src/geophires_x/Economics.py

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
import sys
33
import numpy as np
44
import numpy_financial as npf
5+
from pint.facets.plain import PlainQuantity
6+
57
import geophires_x.Model as Model
68
from geophires_x import EconomicsSam
79
from geophires_x.EconomicsSam import calculate_sam_economics, SamEconomicsCalculations
810
from geophires_x.EconomicsUtils import BuildPricingModel, wacc_output_parameter, nominal_discount_rate_parameter, \
911
real_discount_rate_parameter, after_tax_irr_parameter, moic_parameter, project_vir_parameter, \
1012
project_payback_period_parameter
13+
from geophires_x.GeoPHIRESUtils import quantity
1114
from geophires_x.OptionList import Configuration, WellDrillingCostCorrelation, EconomicModel, EndUseOptions, PlantType, \
1215
_WellDrillingCostCorrelationCitation
1316
from geophires_x.Parameter import intParameter, floatParameter, OutputParameter, ReadParameter, boolParameter, \
@@ -583,7 +586,7 @@ def __init__(self, model: Model):
583586
CurrentUnits=CurrencyUnit.MDOLLARS,
584587
Provided=False,
585588
Valid=False,
586-
ToolTipText="Total reservoir stimulation capital cost"
589+
ToolTipText="Total reservoir stimulation capital cost, including contingency and indirect costs."
587590
)
588591

589592
max_stimulation_cost_per_well_MUSD = 100
@@ -2390,26 +2393,7 @@ def Calculate(self, model: Model) -> None:
23902393
(self.cost_one_injection_well.value * model.wellbores.ninj.value) +
23912394
self.cost_lateral_section.value)
23922395

2393-
# reservoir stimulation costs (M$/injection well). These are calculated whether totalcapcost.Valid = 1
2394-
if self.ccstimfixed.Valid:
2395-
self.Cstim.value = self.ccstimfixed.value
2396-
else:
2397-
stim_cost_per_injection_well = self.stimulation_cost_per_injection_well.quantity().to(
2398-
self.Cstim.CurrentUnits).magnitude
2399-
stim_cost_per_production_well = self.stimulation_cost_per_production_well.quantity().to(
2400-
self.Cstim.CurrentUnits).magnitude
2401-
2402-
stimulation_indirect_cost_fraction = (self.stimulation_indirect_capital_cost.quantity()
2403-
.to('dimensionless').magnitude)
2404-
self.Cstim.value = (
2405-
(
2406-
stim_cost_per_injection_well * model.wellbores.ninj.value
2407-
+ stim_cost_per_production_well * model.wellbores.nprod.value
2408-
)
2409-
* self.ccstimadjfactor.value
2410-
* (1 + stimulation_indirect_cost_fraction)
2411-
* 1.15 # 15% contingency TODO https://github.com/NREL/GEOPHIRES-X/issues/383
2412-
)
2396+
self.Cstim.value = self.calculate_stimulation_costs(model).to(self.Cstim.CurrentUnits).magnitude
24132397

24142398
# field gathering system costs (M$)
24152399
if self.ccgathfixed.Valid:
@@ -2714,7 +2698,30 @@ def Calculate(self, model: Model) -> None:
27142698
self._calculate_derived_outputs(model)
27152699
model.logger.info(f'complete {__class__!s}: {sys._getframe().f_code.co_name}')
27162700

2717-
def calculate_plant_costs(self, model:Model) -> None:
2701+
def calculate_stimulation_costs(self, model: Model) -> PlainQuantity:
2702+
if self.ccstimfixed.Valid:
2703+
stimulation_costs = self.ccstimfixed.quantity().to(self.Cstim.CurrentUnits).magnitude
2704+
else:
2705+
stim_cost_per_injection_well = self.stimulation_cost_per_injection_well.quantity().to(
2706+
self.Cstim.CurrentUnits).magnitude
2707+
stim_cost_per_production_well = self.stimulation_cost_per_production_well.quantity().to(
2708+
self.Cstim.CurrentUnits).magnitude
2709+
2710+
stimulation_indirect_cost_fraction = (self.stimulation_indirect_capital_cost.quantity()
2711+
.to('dimensionless').magnitude)
2712+
stimulation_costs = (
2713+
(
2714+
stim_cost_per_injection_well * model.wellbores.ninj.value
2715+
+ stim_cost_per_production_well * model.wellbores.nprod.value
2716+
)
2717+
* self.ccstimadjfactor.value
2718+
* (1 + stimulation_indirect_cost_fraction)
2719+
* 1.15 # 15% contingency TODO https://github.com/NREL/GEOPHIRES-X/issues/383
2720+
)
2721+
2722+
return quantity(stimulation_costs, self.Cstim.CurrentUnits)
2723+
2724+
def calculate_plant_costs(self, model: Model) -> None:
27182725
# plant costs
27192726
if (model.surfaceplant.enduse_option.value == EndUseOptions.HEAT
27202727
and model.surfaceplant.plant_type.value not in [PlantType.ABSORPTION_CHILLER, PlantType.HEAT_PUMP, PlantType.DISTRICT_HEATING]): # direct-use

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@
13871387
]
13881388
},
13891389
"Reservoir Stimulation Capital Cost": {
1390-
"description": "Total reservoir stimulation capital cost",
1390+
"description": "Total reservoir stimulation capital cost, including contingency and indirect costs.",
13911391
"type": "number",
13921392
"units": "MUSD",
13931393
"category": "Economics",

0 commit comments

Comments
 (0)