Skip to content

Commit a7fcad2

Browse files
Update SAM-EM accrued financing during construction to account for construction years
1 parent c30999b commit a7fcad2

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

src/geophires_x/Economics.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,14 @@ def __init__(self, model: Model):
19661966
PreferredUnits=PercentUnit.PERCENT,
19671967
CurrentUnits=PercentUnit.PERCENT
19681968
)
1969+
self.accrued_financing_during_construction_percentage = self.OutputParameterDict[
1970+
self.accrued_financing_during_construction_percentage.Name] = OutputParameter(
1971+
Name='Accrued financing during construction',
1972+
UnitType=Units.PERCENT,
1973+
PreferredUnits=PercentUnit.PERCENT,
1974+
CurrentUnits=PercentUnit.PERCENT,
1975+
# TODO TooltipText
1976+
)
19691977

19701978
self.after_tax_irr = self.OutputParameterDict[self.after_tax_irr.Name] = (
19711979
after_tax_irr_parameter())
@@ -2328,6 +2336,12 @@ def _warn(_msg: str) -> None:
23282336
self.sync_interest_rate(model)
23292337
self.sync_well_drilling_and_completion_capital_cost_adjustment_factor(model)
23302338

2339+
# SAM Economic Models recalculate accrued financing value based on construction years.
2340+
# TODO to determine whether the same logic should be applied for other economic models.
2341+
self.accrued_financing_during_construction_percentage.value = self.inflrateconstruction.quantity().to(
2342+
convertible_unit(self.accrued_financing_during_construction_percentage.CurrentUnits)
2343+
).magnitude
2344+
23312345
model.logger.info(f'complete {__class__!s}: {sys._getframe().f_code.co_name}')
23322346

23332347
def sync_interest_rate(self, model):

src/geophires_x/EconomicsSam.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
project_vir_parameter,
3939
project_payback_period_parameter,
4040
)
41-
from geophires_x.GeoPHIRESUtils import is_float, is_int, sig_figs
41+
from geophires_x.GeoPHIRESUtils import is_float, is_int, sig_figs, quantity
4242
from geophires_x.OptionList import EconomicModel, EndUseOptions
4343
from geophires_x.Parameter import Parameter, OutputParameter, floatParameter
4444
from geophires_x.Units import convertible_unit, EnergyCostUnit, CurrencyUnit, Units
@@ -357,12 +357,18 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
357357

358358
itc = econ.RITCValue.quantity()
359359
total_capex = econ.CCap.quantity() + itc
360-
ret['total_installed_cost'] = (
361-
(total_capex * math.pow(1 + econ.inflrateconstruction.value, model.surfaceplant.construction_years.value))
362-
.to('USD')
360+
361+
inflation_during_construction_factor = math.pow(
362+
1 + econ.inflrateconstruction.value, model.surfaceplant.construction_years.value
363+
)
364+
econ.accrued_financing_during_construction_percentage.value = (
365+
quantity(inflation_during_construction_factor - 1, 'dimensionless')
366+
.to(convertible_unit(econ.accrued_financing_during_construction_percentage.CurrentUnits))
363367
.magnitude
364368
)
365369

370+
ret['total_installed_cost'] = (total_capex * inflation_during_construction_factor).to('USD').magnitude
371+
366372
opex_musd = econ.Coam.value
367373
ret['om_fixed'] = [opex_musd * 1e6]
368374
# GEOPHIRES assumes O&M fixed costs are not affected by inflation

src/geophires_x/Outputs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ def PrintOutputs(self, model: Model):
268268
label = Outputs._field_label(field.Name, 49)
269269
f.write(f' {label}{field.value:10.2f} {field.CurrentUnits.value}\n')
270270

271-
f.write(f' Accrued financing during construction: {econ.inflrateconstruction.value:10.2f} {econ.inflrateconstruction.CurrentUnits.value}\n')
271+
acf: OutputParameter = econ.accrued_financing_during_construction_percentage
272+
acf_label = Outputs._field_label(acf.display_name, 49)
273+
f.write(f' {acf_label}{acf.value:10.2f} {acf.CurrentUnits.value}\n')
272274

273275
f.write(f' Project lifetime: {model.surfaceplant.plant_lifetime.value:10.0f} {model.surfaceplant.plant_lifetime.CurrentUnits.value}\n')
274276
f.write(f' Capacity factor: {model.surfaceplant.utilization_factor.value * 100:10.1f} %\n')

tests/examples/Fervo_Project_Cape-4.out

Lines changed: 3 additions & 3 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: 11:05
10-
Calculation Time: 1.723 sec
9+
Simulation Time: 12:02
10+
Calculation Time: 1.725 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -28,7 +28,7 @@ Simulation Metadata
2828
Real Discount Rate: 12.00 %
2929
Nominal Discount Rate: 14.58 %
3030
WACC: 8.30 %
31-
Accrued financing during construction: 4.77 %
31+
Accrued financing during construction: 15.00 %
3232
Project lifetime: 30 yr
3333
Capacity factor: 90.0 %
3434
Project NPV: 641.24 MUSD

0 commit comments

Comments
 (0)