Skip to content

Commit df2c9b4

Browse files
support Inflation Rate During Construction
1 parent 9739b46 commit df2c9b4

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

docs/SAM-Economic-Models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following table describes how GEOPHIRES parameters are transformed into SAM
2828
| `Max Net Electricity Production` | Generation Profile | `Nameplate capacity` | `Singleowner` | `system_capacity` | .. N/A |
2929
| `Utilizaton Factor` | Generation Profile | `Nominal capacity factor` | `Singleowner` | `user_capacity_factor` | .. N/A |
3030
| `Net Electricity Production` | AC Degradation | `Annual AC degradation rate` schedule | `Utilityrate5` | `degradation` | Percentage difference of each year's `Net Electricity Production` from `Max Net Electricity Production` is input as SAM as the degradation rate schedule in order to match SAM's generation profile to GEOPHIRES |
31-
| `Total Capital Cost` + `Investment Tax Credit Value` | Installation Costs | `Total Installed Cost` | `Singleowner` | `total_installed_cost` | .. N/A |
31+
| `Total Capital Cost` + `Investment Tax Credit Value` + (`Inflation Rate During Construction` × `Total Capital Cost`) | Installation Costs | `Total Installed Cost` | `Singleowner` | `total_installed_cost` | ITC, if present, is added to GEOPHIRES total capital cost since SAM handles ITC credits in cash flow analysis. Inflation during construction is treated as an indirect EPC capital cost percentage. |
3232
| `Total O&M Cost`, `Inflation Rate` | Operating Costs | `Fixed operating cost`, `Escalation rate` set to `Inflation Rate` × -1 | `Singleowner` | `om_fixed`, `om_fixed_escal` | .. N/A |
3333
| `Plant Lifetime` | Financial Parameters → Analysis Parameters | `Analysis period` | `CustomGeneration`, `Singleowner` | `CustomGeneration.analysis_period`, `Singleowner.term_tenor` | .. N/A |
3434
| `Inflation Rate` | Financial Parameters → Analysis Parameters | `Inflation rate` | `Utilityrate5` | `inflation_rate` | .. N/A |

src/geophires_x/EconomicsSam.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,15 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
181181

182182
ret['analysis_period'] = model.surfaceplant.plant_lifetime.value
183183

184-
itc = econ.RITCValue.value
185-
total_capex_musd = econ.CCap.value + itc
186-
ret['total_installed_cost'] = total_capex_musd * 1e6
184+
itc = econ.RITCValue.quantity()
185+
total_capex = econ.CCap.quantity() + itc
186+
# ret['total_installed_cost'] = total_capex_musd * 1e6
187+
188+
# 'Inflation Rate During Construction'
189+
construction_additional_cost = econ.inflrateconstruction.value * total_capex
190+
191+
ret['total_installed_cost'] = (total_capex + construction_additional_cost).to('USD').magnitude
192+
187193
# TODO break out indirect costs (instead of lumping all into direct cost)
188194

189195
opex_musd = econ.Coam.value
@@ -193,8 +199,6 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
193199

194200
# TODO construction years
195201

196-
# TODO 'Inflation Rate During Construction'
197-
198202
# Note generation profile is generated relative to the max in _get_utility_rate_parameters
199203
ret['system_capacity'] = _get_max_net_generation_MW(model) * 1e3
200204

tests/geophires_x_tests/test_economics_sam.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,16 @@ def get_single_value(name: str) -> list[float]:
175175
@staticmethod
176176
def _get_cash_flow_row(cash_flow, name):
177177

178+
def r_0(r):
179+
if r is not None and len(r) > 0:
180+
return r[0]
181+
182+
return None
183+
178184
return next(
179185
[GeophiresXResult._get_sam_cash_flow_profile_entry_display_to_entry_val(ed) for ed in r]
180186
for r in cash_flow
181-
if r[0] == name
187+
if r_0(r) == name
182188
)[1:]
183189

184190
def test_only_electricity_end_use_supported(self):
@@ -258,6 +264,20 @@ def get_row(name: str):
258264

259265
assert_incentives({'One-time Grants Etc': 100, 'Other Incentives': 0.1}, 100_100_000)
260266

267+
def test_inflation_rate_during_construction(self):
268+
infl_rate = 0.05
269+
r_no_infl = self._get_result({'Inflation Rate During Construction': 0})
270+
r_infl = self._get_result({'Inflation Rate During Construction': infl_rate})
271+
272+
cash_flow_no_infl = r_no_infl.result['SAM CASH FLOW PROFILE']
273+
cash_flow_infl = r_infl.result['SAM CASH FLOW PROFILE']
274+
275+
tic = 'Total installed cost ($)'
276+
tic_no_infl = EconomicsSamTestCase._get_cash_flow_row(cash_flow_no_infl, tic)[0]
277+
tic_infl = EconomicsSamTestCase._get_cash_flow_row(cash_flow_infl, tic)[0]
278+
279+
self.assertAlmostEqual(tic_no_infl * (1 + infl_rate), tic_infl, places=0)
280+
261281
def test_ptc(self):
262282
def assert_ptc(params, expected_ptc_usd_per_kWh):
263283
m: Model = EconomicsSamTestCase._new_model(self._egs_test_file_path(), additional_params=params)

0 commit comments

Comments
 (0)