@@ -84,7 +84,7 @@ def calculate_sam_economics(model: Model) -> dict[str, dict[str, Any]]:
8484 module .value (k , v )
8585
8686 for k , v in _get_custom_gen_parameters (model ).items ():
87- single_owner .value (k , v )
87+ custom_gen .value (k , v )
8888
8989 for k , v in _get_utility_rate_parameters (model ).items ():
9090 single_owner .value (k , v )
@@ -151,7 +151,8 @@ def _get_custom_gen_parameters(model: Model) -> dict[str, Any]:
151151 # fmt:off
152152 ret : dict [str , Any ] = {
153153 # Project lifetime
154- 'analysis_period' : model .surfaceplant .plant_lifetime .value
154+ 'analysis_period' : model .surfaceplant .plant_lifetime .value ,
155+ 'user_capacity_factor' : _pct (model .surfaceplant .utilization_factor ),
155156 }
156157 # fmt:on
157158
@@ -178,8 +179,7 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
178179
179180 ret : dict [str , Any ] = {}
180181
181- def pct (econ_value : Parameter ) -> float :
182- return econ_value .quantity ().to (convertible_unit ('%' )).magnitude
182+ ret ['analysis_period' ] = model .surfaceplant .plant_lifetime .value
183183
184184 itc = econ .RITCValue .value
185185 total_capex_musd = econ .CCap .value + itc
@@ -189,7 +189,7 @@ def pct(econ_value: Parameter) -> float:
189189 opex_musd = econ .Coam .value
190190 ret ['om_fixed' ] = [opex_musd * 1e6 ]
191191 # GEOPHIRES assumes O&M fixed costs are not affected by inflation
192- ret ['om_fixed_escal' ] = - 1.0 * pct (econ .RINFL )
192+ ret ['om_fixed_escal' ] = - 1.0 * _pct (econ .RINFL )
193193
194194 # TODO construction years
195195
@@ -198,8 +198,6 @@ def pct(econ_value: Parameter) -> float:
198198 # Note generation profile is generated relative to the max in _get_utility_rate_parameters
199199 ret ['system_capacity' ] = _get_max_net_generation_MW (model ) * 1e3
200200
201- # TODO utilization factor = nominal capacity factor
202-
203201 geophires_ctr_tenths = Decimal (econ .CTR .value )
204202 fed_ratio = 0.75
205203 fed_rate_tenths = geophires_ctr_tenths * (Decimal (fed_ratio ))
@@ -217,7 +215,7 @@ def pct(econ_value: Parameter) -> float:
217215 ret ['ptc_fed_term' ] = econ .PTCDuration .quantity ().to (convertible_unit ('yr' )).magnitude
218216
219217 if econ .PTCInflationAdjusted .value :
220- ret ['ptc_fed_escal' ] = pct (econ .RINFL )
218+ ret ['ptc_fed_escal' ] = _pct (econ .RINFL )
221219
222220 # 'Property Tax Rate'
223221 geophires_ptr_tenths = Decimal (econ .PTR .value )
@@ -232,14 +230,14 @@ def pct(econ_value: Parameter) -> float:
232230 )
233231
234232 # Debt/equity ratio ('Fraction of Investment in Bonds' parameter)
235- ret ['debt_percent' ] = pct (econ .FIB )
233+ ret ['debt_percent' ] = _pct (econ .FIB )
236234
237235 # Interest rate
238- ret ['real_discount_rate' ] = pct (econ .discountrate )
236+ ret ['real_discount_rate' ] = _pct (econ .discountrate )
239237
240238 # Project lifetime
241239 ret ['term_tenor' ] = model .surfaceplant .plant_lifetime .value
242- ret ['term_int_rate' ] = pct (econ .BIR )
240+ ret ['term_int_rate' ] = _pct (econ .BIR )
243241
244242 # TODO 'Inflated Equity Interest Rate' (may not have equivalent in SAM...?)
245243
@@ -248,6 +246,10 @@ def pct(econ_value: Parameter) -> float:
248246 return ret
249247
250248
249+ def _pct (econ_value : Parameter ) -> float :
250+ return econ_value .quantity ().to (convertible_unit ('%' )).magnitude
251+
252+
251253def _ppa_pricing_model (
252254 plant_lifetime : int , start_price : float , end_price : float , escalation_start_year : int , escalation_rate : float
253255) -> list :
0 commit comments