Skip to content

Commit 80299df

Browse files
Plant Lifetime -> Analysis period, Term tenor
1 parent 852a28e commit 80299df

File tree

7 files changed

+46
-22
lines changed

7 files changed

+46
-22
lines changed

docs/SAM-Economic-Models.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
## SAM Single-Owner PPA
44

5-
| GEOPHIRES Parameter(s) | SAM Category | SAM Input(s) | SAM Module | SAM Parameter Name(s) | Comment |
6-
|------------------------------------------------------|--------------------------------------------------------|----------------------------------------------------------------------------------|----------------|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7-
| `Max Net Electricity Production` | Generation Profile | `Nameplate capacity` | `Singleowner` | `system_capacity` | |
8-
| `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 |
9-
| `Total Capital Cost` + `Investment Tax Credit Value` | Installation Costs | `Total Installed Cost` | `Singleowner` | `total_installed_cost` | |
10-
| `Total O&M Cost`, `Inflation Rate` | Operating Costs | `Fixed operating cost`, `Escalation rate` set to `Inflation Rate` × -1 | `Singleowner` | `om_fixed`, `om_fixed_escal` | |
11-
| `Inflation Rate` | Financial Parameters → Analysis Parameters | `Inflation rate` | `Utilityrate5` | `inflation_rate` |
12-
| `Discount Rate` | Financial Parameters → Analysis Parameters | `Real discount rate` | `Singleowner` | `real_discount_rate` | |
13-
| `Combined Income Tax Rate` | Financial Parameters → Project Tax and Insurance Rates | `Federal income tax rate` (75% of CTR) and `State income tax rate` (25% of CTR) | `Singleowner` | `federal_tax_rate`, `state_tax_rate` | GEOPHIRES does have separate parameters for federal and state income tax so the rates are split from the combined rate based on the ratio of SAM's default values of 21% and 7%, respectively. |
14-
| `Property Tax Rate` | Financial Parameters | `Property tax rate` | `Singleowner` | `property_tax_rate` | |
15-
| `Fraction of Investment in Bonds` | Financial Parameters → Project Term Debt | `Debt percent` | `Singleowner` | `debt_percent` | |
16-
| `Inflated Bond Interest Rate` | Financial Parameters → Project Term Debt | `Annual interest rate` | `Singleowner` | `debt_percent` | |
17-
| `Starting Electricity Sale Price` | Revenue | `PPA price` | `Singleowner` | `ppa_price_input` | |
18-
| `Electricity Escalation Rate Per Year` × 0.745 | Revenue | `PPA price escalation` | `Singleowner` | `ppa_escalation` | Approximates GEOPHIRES escalation rate into escalation percentage (does not exactly match GEOPHIRES amount-based pricing model) |
19-
| `Investment Tax Credit Rate` | Incentives → Investment Tax Credit (ITC) | `Federal``Percentage (%)` | `Singleowner` | `itc_fed_percent` | |
20-
| `Other Incentives` + `One-time Grants Etc` | Incentives → Investment Based Incentive (IBI) | `Other``Amount ($)` | `Singleowner` | `ibi_oth_amount` | |
5+
| GEOPHIRES Parameter(s) | SAM Category | SAM Input(s) | SAM Module(s) | SAM Parameter Name(s) | Comment |
6+
|------------------------------------------------------|--------------------------------------------------------|----------------------------------------------------------------------------------|-----------------------------------|--------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7+
| `Max Net Electricity Production` | Generation Profile | `Nameplate capacity` | `Singleowner` | `system_capacity` | |
8+
| `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 |
9+
| `Total Capital Cost` + `Investment Tax Credit Value` | Installation Costs | `Total Installed Cost` | `Singleowner` | `total_installed_cost` | |
10+
| `Total O&M Cost`, `Inflation Rate` | Operating Costs | `Fixed operating cost`, `Escalation rate` set to `Inflation Rate` × -1 | `Singleowner` | `om_fixed`, `om_fixed_escal` | |
11+
| `Plant Lifetime` | Financial Parameters → Analysis Parameters | `Analysis period` | `CustomGeneration`, `Singleowner` | `CustomGeneration.analysis_period`, `Singleowner.term_tenor` |
12+
| `Inflation Rate` | Financial Parameters → Analysis Parameters | `Inflation rate` | `Utilityrate5` | `inflation_rate` |
13+
| `Discount Rate` | Financial Parameters → Analysis Parameters | `Real discount rate` | `Singleowner` | `real_discount_rate` | |
14+
| `Combined Income Tax Rate` | Financial Parameters → Project Tax and Insurance Rates | `Federal income tax rate` (75% of CTR) and `State income tax rate` (25% of CTR) | `Singleowner` | `federal_tax_rate`, `state_tax_rate` | GEOPHIRES does have separate parameters for federal and state income tax so the rates are split from the combined rate based on the ratio of SAM's default values of 21% and 7%, respectively. |
15+
| `Property Tax Rate` | Financial Parameters | `Property tax rate` | `Singleowner` | `property_tax_rate` | |
16+
| `Fraction of Investment in Bonds` | Financial Parameters → Project Term Debt | `Debt percent` | `Singleowner` | `debt_percent` | |
17+
| `Inflated Bond Interest Rate` | Financial Parameters → Project Term Debt | `Annual interest rate` | `Singleowner` | `debt_percent` | |
18+
| `Starting Electricity Sale Price` | Revenue | `PPA price` | `Singleowner` | `ppa_price_input` | |
19+
| `Electricity Escalation Rate Per Year` × 0.745 | Revenue | `PPA price escalation` | `Singleowner` | `ppa_escalation` | Approximates GEOPHIRES escalation rate into escalation percentage (does not exactly match GEOPHIRES amount-based pricing model) |
20+
| `Investment Tax Credit Rate` | Incentives → Investment Tax Credit (ITC) | `Federal``Percentage (%)` | `Singleowner` | `itc_fed_percent` | |
21+
| `Other Incentives` + `One-time Grants Etc` | Incentives → Investment Based Incentive (IBI) | `Other``Amount ($)` | `Singleowner` | `ibi_oth_amount` | |
2122

2223
[Implementation in source code](https://github.com/softwareengineerprogrammer/GEOPHIRES/blob/274786e6799d32dad3f42a2a04297818b811f24c/src/geophires_x/EconomicsSam.py#L135-L195)

src/geophires_x/EconomicsSam.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def calculate_sam_economics(model: Model) -> dict[str, dict[str, Any]]:
5454
if k != 'number_inputs':
5555
module.value(k, v)
5656

57+
for k, v in _get_custom_gen_parameters(model).items():
58+
single_owner.value(k, v)
59+
5760
for k, v in _get_utility_rate_parameters(model).items():
5861
single_owner.value(k, v)
5962

@@ -122,6 +125,12 @@ def get_entry_display(entry: Any) -> str:
122125
return tabulate(profile_display, **_tabulate_kw_args)
123126

124127

128+
def _get_custom_gen_parameters(model: Model) -> dict[str, Any]:
129+
ret: dict[str, Any] = {'analysis_period': model.surfaceplant.plant_lifetime.value}
130+
131+
return ret
132+
133+
125134
def _get_utility_rate_parameters(model: Model) -> dict[str, Any]:
126135
econ = model.economics
127136

@@ -195,6 +204,8 @@ def pct(econ_value: Parameter) -> float:
195204

196205
# Interest rate
197206
ret['real_discount_rate'] = pct(econ.discountrate)
207+
208+
ret['term_tenor'] = model.surfaceplant.plant_lifetime.value
198209
ret['term_int_rate'] = pct(econ.BIR)
199210

200211
# TODO 'Inflated Equity Interest Rate' (may not have equivalent in SAM...?)

src/geophires_x/sam_economics/Generic_400_MWe/Generic_400_MWe.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"conv_eff" : 34.118048447628794,
88
"energy_output_array" : [ 0 ],
99
"system_use_lifetime_output" : 0,
10-
"analysis_period" : 20,
10+
"analysis_period" : 30,
1111
"adjust_constant" : 0,
1212
"adjust_en_timeindex" : 0,
1313
"adjust_en_periods" : 0,
@@ -17,7 +17,7 @@
1717
"enable_interconnection_limit" : 0,
1818
"grid_interconnection_limit_kwac" : 20000,
1919
"inflation_rate" : 2,
20-
"degradation" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
20+
"degradation" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
2121
"en_electricity_rates" : 0,
2222
"rate_escalation" : [ 0 ],
2323
"ur_metering_option" : 4,
@@ -220,7 +220,7 @@
220220
"pbi_oth_escal" : 0,
221221
"pbi_oth_tax_fed" : 1,
222222
"pbi_oth_tax_sta" : 1,
223-
"term_tenor" : 20,
223+
"term_tenor" : 30,
224224
"term_int_rate" : 5,
225225
"dscr" : 1.05,
226226
"dscr_limit_debt_fraction" : 0,

src/geophires_x/sam_economics/Generic_400_MWe/Generic_400_MWe_custom_generation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"conv_eff" : 34.118048447628794,
88
"energy_output_array" : [ 0 ],
99
"system_use_lifetime_output" : 0,
10-
"analysis_period" : 20,
10+
"analysis_period" : 30,
1111
"adjust_constant" : 0,
1212
"adjust_en_timeindex" : 0,
1313
"adjust_en_periods" : 0,

src/geophires_x/sam_economics/Generic_400_MWe/Generic_400_MWe_singleowner.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
"pbi_oth_escal" : 0,
173173
"pbi_oth_tax_fed" : 1,
174174
"pbi_oth_tax_sta" : 1,
175-
"term_tenor" : 20,
175+
"term_tenor" : 30,
176176
"term_int_rate" : 5,
177177
"dscr" : 1.05,
178178
"dscr_limit_debt_fraction" : 0,

src/geophires_x/sam_economics/Generic_400_MWe/Generic_400_MWe_utilityrate5.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"inflation_rate" : 2,
3-
"degradation" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
3+
"degradation" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
44
"en_electricity_rates" : 0,
55
"rate_escalation" : [ 0 ],
66
"ur_metering_option" : 4,

tests/geophires_x_tests/test_economics_sam.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ def get_row(name: str) -> list[float]:
6969
self.assertGreater(elec_net_kWh[16], elec_net_kWh[15])
7070
self.assertLess(elec_net_kWh[20], elec_net_kWh[16])
7171

72+
def test_plant_lifetime(self):
73+
r = self._get_result({'Plant Lifetime': 30})
74+
75+
cash_flow = r.result['SAM CASH FLOW PROFILE']
76+
77+
def get_row(name: str) -> list[float]:
78+
return EconomicsSamTestCase._get_cash_flow_row(cash_flow, name)
79+
80+
self.assertEqual(32, len(cash_flow[0]))
81+
self.assertEqual('Year 30', cash_flow[0][-1])
82+
self.assertEqual(31, len(get_row('Electricity to grid net (kWh)')))
83+
7284
def test_npv(self):
7385
def _npv(r: GeophiresXResult) -> float:
7486
return r.result['ECONOMIC PARAMETERS']['Project NPV']['value']

0 commit comments

Comments
 (0)