Skip to content

Commit 12b172d

Browse files
add interest during construction (IDC) output parameter
1 parent bc746b4 commit 12b172d

11 files changed

+62
-19
lines changed

src/geophires_x/Economics.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from geophires_x.EconomicsUtils import BuildPricingModel, wacc_output_parameter, nominal_discount_rate_parameter, \
1414
real_discount_rate_parameter, after_tax_irr_parameter, moic_parameter, project_vir_parameter, \
1515
project_payback_period_parameter, inflation_cost_during_construction_output_parameter, \
16-
total_capex_parameter_output_parameter
16+
interest_during_construction_output_parameter, total_capex_parameter_output_parameter
1717
from geophires_x.GeoPHIRESUtils import quantity
1818
from geophires_x.OptionList import Configuration, WellDrillingCostCorrelation, EconomicModel, EndUseOptions, PlantType, \
1919
_WellDrillingCostCorrelationCitation
@@ -2232,6 +2232,9 @@ def __init__(self, model: Model):
22322232
self.inflation_cost_during_construction = self.OutputParameterDict[
22332233
self.inflation_cost_during_construction.Name] = inflation_cost_during_construction_output_parameter()
22342234

2235+
self.interest_during_construction = self.OutputParameterDict[
2236+
self.interest_during_construction.Name] = interest_during_construction_output_parameter()
2237+
22352238
self.after_tax_irr = self.OutputParameterDict[self.after_tax_irr.Name] = (
22362239
after_tax_irr_parameter())
22372240
self.real_discount_rate = self.OutputParameterDict[self.real_discount_rate.Name] = (
@@ -3498,7 +3501,7 @@ def calculate_cashflow(self, model: Model) -> None:
34983501

34993502
def _calculate_sam_economics(self, model: Model) -> None:
35003503
non_calculated_output_placeholder_val = -1
3501-
self.sam_economics_calculations = calculate_sam_economics(model)
3504+
self.sam_economics_calculations: SamEconomicsCalculations = calculate_sam_economics(model)
35023505

35033506
# Setting capex_total distinguishes capex from CCap's display name of 'Total capital costs',
35043507
# since SAM Economic Model doesn't subtract ITC from this value.
@@ -3507,6 +3510,11 @@ def _calculate_sam_economics(self, model: Model) -> None:
35073510
self.CCap.value = (self.sam_economics_calculations.capex.quantity()
35083511
.to(self.CCap.CurrentUnits.value).magnitude)
35093512

3513+
self.interest_during_construction.value = quantity(
3514+
self.sam_economics_calculations.pre_revenue_costs_and_cash_flow.interest_during_construction_usd,
3515+
'USD'
3516+
).to(self.interest_during_construction.CurrentUnits.value).magnitude
3517+
35103518

35113519
if self.royalty_rate.Provided:
35123520
# ignore pre-revenue year(s) (e.g. Year 0)

src/geophires_x/EconomicsUtils.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ def inflation_cost_during_construction_output_parameter() -> OutputParameter:
147147
)
148148

149149

150+
def interest_during_construction_output_parameter() -> OutputParameter:
151+
return OutputParameter(
152+
Name='Interest during construction (IDC)',
153+
UnitType=Units.CURRENCY,
154+
PreferredUnits=CurrencyUnit.MDOLLARS,
155+
CurrentUnits=CurrencyUnit.MDOLLARS,
156+
ToolTipText='The sum of interest paid during construction.', # WIP/TODO
157+
)
158+
159+
150160
def total_capex_parameter_output_parameter() -> OutputParameter:
151161
return OutputParameter(
152162
Name='Total CAPEX',
@@ -172,6 +182,7 @@ def royalty_cost_output_parameter() -> OutputParameter:
172182

173183

174184
_TOTAL_AFTER_TAX_RETURNS_CASH_FLOW_ROW_NAME = 'Total after-tax returns ($)'
185+
_IDC_CASH_FLOW_ROW_NAME = 'Debt interest payment ($)'
175186

176187

177188
@dataclass
@@ -210,6 +221,12 @@ def pre_revenue_cash_flow_profile_dict(self) -> dict[str, list[float]]:
210221

211222
return ret
212223

224+
@property
225+
def interest_during_construction_usd(self) -> float:
226+
return sum(
227+
[float(it) for it in self.pre_revenue_cash_flow_profile_dict[_IDC_CASH_FLOW_ROW_NAME] if is_float(it)]
228+
)
229+
213230

214231
def calculate_pre_revenue_costs_and_cashflow(model: 'Model') -> PreRevenueCostsAndCashflow:
215232
econ = model.economics
@@ -351,7 +368,7 @@ def _append_row(row_name: str, row_vals: list[float | str]) -> None:
351368
debt_balance_usd_vec,
352369
)
353370

354-
_append_row(f'Debt interest payment ($)', interest_accrued_vec)
371+
_append_row(_IDC_CASH_FLOW_ROW_NAME, interest_accrued_vec)
355372

356373
_append_row(f'Cash flow from financing activities ($)', [e + d for e, d in zip(equity_spend_vec, debt_draw_vec)])
357374

src/geophires_x/Outputs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,15 @@ def PrintOutputs(self, model: Model):
514514
# expenditure.
515515
pass
516516

517-
display_inflation_during_construction_in_capital_costs = is_sam_econ_model
518-
if display_inflation_during_construction_in_capital_costs:
517+
display_inflation_and_interest_during_construction_in_capital_costs = is_sam_econ_model
518+
if display_inflation_and_interest_during_construction_in_capital_costs:
519519
icc_label = Outputs._field_label(econ.inflation_cost_during_construction.display_name, 47)
520520
f.write(f' {icc_label}{econ.inflation_cost_during_construction.value:10.2f} {econ.inflation_cost_during_construction.CurrentUnits.value}\n')
521521

522+
idc_label = Outputs._field_label(econ.interest_during_construction.display_name, 47)
523+
f.write(
524+
f' {idc_label}{econ.interest_during_construction.value:10.2f} {econ.interest_during_construction.CurrentUnits.value}\n')
525+
522526
if econ.DoAddOnCalculations.value:
523527
# Non-SAM econ models print this in Extended Economics profile
524528
aoc_label = Outputs._field_label(model.addeconomics.AddOnCAPEXTotal.display_name, 47)

src/geophires_x_client/geophires_x_result.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ class GeophiresXResult:
268268
'Investment Tax Credit',
269269
# Displayed for economic models that treat inflation costs as capital costs (SAM-EM)
270270
'Inflation costs during construction',
271+
'Interest during construction (IDC)',
271272
'Total Add-on CAPEX',
272273
'Total capital costs',
273274
'Annualized capital costs',

tests/examples/Fervo_Project_Cape-4.out

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Simulation Metadata
66
----------------------
77
GEOPHIRES Version: 3.10.10
88
Simulation Date: 2025-11-24
9-
Simulation Time: 09:00
9+
Simulation Time: 09:38
1010
Calculation Time: 1.727 sec
1111

1212
***SUMMARY OF RESULTS***
@@ -105,6 +105,7 @@ Simulation Metadata
105105
Total surface equipment costs: 1560.49 MUSD
106106
Exploration costs: 30.00 MUSD
107107
Inflation costs during construction: 59.82 MUSD
108+
Interest during construction (IDC): 0.00 MUSD
108109
Total CAPEX: 2660.87 MUSD
109110

110111

tests/examples/example_SAM-single-owner-PPA-2.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.10.10
88
Simulation Date: 2025-11-24
9-
Simulation Time: 09:00
10-
Calculation Time: 0.971 sec
9+
Simulation Time: 09:38
10+
Calculation Time: 0.983 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -106,6 +106,7 @@ Simulation Metadata
106106
Total surface equipment costs: 969.26 MUSD
107107
Exploration costs: 30.00 MUSD
108108
Inflation costs during construction: 76.64 MUSD
109+
Interest during construction (IDC): 0.00 MUSD
109110
Total CAPEX: 1609.42 MUSD
110111

111112

tests/examples/example_SAM-single-owner-PPA-3.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.10.10
88
Simulation Date: 2025-11-24
9-
Simulation Time: 09:00
10-
Calculation Time: 1.154 sec
9+
Simulation Time: 09:38
10+
Calculation Time: 1.156 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -107,6 +107,7 @@ Simulation Metadata
107107
Total surface equipment costs: 150.23 MUSD
108108
Exploration costs: 3.89 MUSD
109109
Inflation costs during construction: 13.12 MUSD
110+
Interest during construction (IDC): 0.00 MUSD
110111
Total Add-on CAPEX: 50.00 MUSD
111112
Total CAPEX: 275.47 MUSD
112113

tests/examples/example_SAM-single-owner-PPA-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.10.10
88
Simulation Date: 2025-11-24
9-
Simulation Time: 09:00
10-
Calculation Time: 1.159 sec
9+
Simulation Time: 09:38
10+
Calculation Time: 1.161 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -108,6 +108,7 @@ Simulation Metadata
108108
Total surface equipment costs: 152.93 MUSD
109109
Exploration costs: 3.89 MUSD
110110
Inflation costs during construction: 10.75 MUSD
111+
Interest during construction (IDC): 0.00 MUSD
111112
Total CAPEX: 225.81 MUSD
112113

113114

tests/examples/example_SAM-single-owner-PPA-5.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.10.10
88
Simulation Date: 2025-11-24
9-
Simulation Time: 08:52
10-
Calculation Time: 1.725 sec
9+
Simulation Time: 09:38
10+
Calculation Time: 1.754 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -106,6 +106,7 @@ Simulation Metadata
106106
Total surface equipment costs: 298.30 MUSD
107107
Exploration costs: 120.00 MUSD
108108
Inflation costs during construction: 82.70 MUSD
109+
Interest during construction (IDC): 18.90 MUSD
109110
Total CAPEX: 701.02 MUSD
110111

111112

tests/examples/example_SAM-single-owner-PPA.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.10.10
88
Simulation Date: 2025-11-24
9-
Simulation Time: 09:00
10-
Calculation Time: 1.157 sec
9+
Simulation Time: 09:38
10+
Calculation Time: 1.164 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -108,6 +108,7 @@ Simulation Metadata
108108
Total surface equipment costs: 152.93 MUSD
109109
Exploration costs: 3.89 MUSD
110110
Inflation costs during construction: 10.75 MUSD
111+
Interest during construction (IDC): 0.00 MUSD
111112
Total CAPEX: 225.81 MUSD
112113

113114

0 commit comments

Comments
 (0)