Skip to content

Commit 48a6d5e

Browse files
Add Inflation Cost During Construction output parameter for SAM econ models - Total CAPEX can now be summed from displayed capital cost line items (yay)
1 parent 2e7bbf6 commit 48a6d5e

File tree

6 files changed

+30
-5
lines changed

6 files changed

+30
-5
lines changed

src/geophires_x/Economics.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from geophires_x.EconomicsSam import calculate_sam_economics, SamEconomicsCalculations
1010
from geophires_x.EconomicsUtils import BuildPricingModel, wacc_output_parameter, nominal_discount_rate_parameter, \
1111
real_discount_rate_parameter, after_tax_irr_parameter, moic_parameter, project_vir_parameter, \
12-
project_payback_period_parameter
12+
project_payback_period_parameter, inflation_cost_during_construction_output_parameter
1313
from geophires_x.GeoPHIRESUtils import quantity
1414
from geophires_x.OptionList import Configuration, WellDrillingCostCorrelation, EconomicModel, EndUseOptions, PlantType, \
1515
_WellDrillingCostCorrelationCitation
@@ -1980,6 +1980,9 @@ def __init__(self, model: Model):
19801980
f'if {self.inflrateconstruction.Name} is not provided.'
19811981
)
19821982

1983+
self.inflation_cost_during_construction = self.OutputParameterDict[
1984+
self.inflation_cost_during_construction.Name] = inflation_cost_during_construction_output_parameter()
1985+
19831986
self.after_tax_irr = self.OutputParameterDict[self.after_tax_irr.Name] = (
19841987
after_tax_irr_parameter())
19851988
self.real_discount_rate = self.OutputParameterDict[self.real_discount_rate.Name] = (

src/geophires_x/EconomicsSam.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
moic_parameter,
3838
project_vir_parameter,
3939
project_payback_period_parameter,
40+
inflation_cost_during_construction_output_parameter,
4041
)
4142
from geophires_x.GeoPHIRESUtils import is_float, is_int, sig_figs, quantity
4243
from geophires_x.OptionList import EconomicModel, EndUseOptions
@@ -370,6 +371,11 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
370371
.magnitude
371372
)
372373

374+
econ.inflation_cost_during_construction.value = (
375+
(total_capex * (inflation_during_construction_factor - 1))
376+
.to(econ.inflation_cost_during_construction.CurrentUnits)
377+
.magnitude
378+
)
373379
ret['total_installed_cost'] = (total_capex * inflation_during_construction_factor).to('USD').magnitude
374380

375381
opex_musd = econ.Coam.value

src/geophires_x/EconomicsUtils.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from geophires_x.Parameter import OutputParameter
4-
from geophires_x.Units import Units, PercentUnit, TimeUnit
4+
from geophires_x.Units import Units, PercentUnit, TimeUnit, CurrencyUnit
55

66

77
def BuildPricingModel(plantlifetime: int, StartPrice: float, EndPrice: float,
@@ -121,3 +121,13 @@ def wacc_output_parameter() -> OutputParameter:
121121
CurrentUnits=PercentUnit.PERCENT,
122122
PreferredUnits=PercentUnit.PERCENT,
123123
)
124+
125+
126+
def inflation_cost_during_construction_output_parameter() -> OutputParameter:
127+
return OutputParameter(
128+
Name='Inflation Cost During Construction',
129+
UnitType=Units.CURRENCY,
130+
PreferredUnits=CurrencyUnit.MDOLLARS,
131+
CurrentUnits=CurrencyUnit.MDOLLARS,
132+
ToolTipText='The calculated amount of cost escalation due to inflation over the construction period.'
133+
)

src/geophires_x/Outputs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,11 @@ def PrintOutputs(self, model: Model):
495495
# expenditure.
496496
pass
497497

498+
if model.economics.econmodel.value == EconomicModel.SAM_SINGLE_OWNER_PPA:
499+
# TODO calculate & display for other economic models
500+
icc_label = Outputs._field_label(econ.inflation_cost_during_construction.display_name, 48)
501+
f.write(f' {icc_label}{econ.inflation_cost_during_construction.value:10.2f} {econ.inflation_cost_during_construction.CurrentUnits.value}\n')
502+
498503
capex_label = Outputs._field_label(econ.CCap.display_name, 50)
499504
f.write(f' {capex_label}{econ.CCap.value:10.2f} {econ.CCap.CurrentUnits.value}\n')
500505

src/geophires_x_schema_generator/geophires-result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
},
9393
"Accrued financing during construction": {
9494
"type": "number",
95-
"description": "The total accrued inflation on total capital costs over the construction period, as defined by Inflation Rate During Construction. For SAM Economic Models, this is calculated automatically by compounding Inflation Rate over Construction Years if Inflation Rate During Construction is not provided.",
95+
"description": "The accrued inflation on total capital costs over the construction period, as defined by Inflation Rate During Construction. For SAM Economic Models, this is calculated automatically by compounding Inflation Rate over Construction Years if Inflation Rate During Construction is not provided.",
9696
"units": "%"
9797
},
9898
"Project lifetime": {},

tests/examples/Fervo_Project_Cape-4.out

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Simulation Metadata
66
----------------------
77
GEOPHIRES Version: 3.9.40
88
Simulation Date: 2025-07-26
9-
Simulation Time: 13:07
10-
Calculation Time: 1.733 sec
9+
Simulation Time: 13:51
10+
Calculation Time: 1.723 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -104,6 +104,7 @@ Simulation Metadata
104104
Field gathering system costs: 56.44 MUSD
105105
Total surface equipment costs: 1560.49 MUSD
106106
Exploration costs: 30.00 MUSD
107+
Inflation Cost During Construction: 344.27 MUSD
107108
Total CAPEX: 2639.39 MUSD
108109

109110

0 commit comments

Comments
 (0)