@@ -1125,17 +1125,17 @@ def __init__(self, model: Model):
11251125 ErrMessage = "assume default peaking boiler efficiency (85%)" ,
11261126 ToolTipText = "Peaking boiler efficiency"
11271127 )
1128- self ._default_peaking_boiler_cost_USD_per_kw = 65
1129- self .peaking_boiler_cost_per_kw = self .ParameterDict [self .peaking_boiler_cost_per_kw .Name ] = floatParameter (
1130- "Peaking Boiler Cost per KW " ,
1131- DefaultValue = self ._default_peaking_boiler_cost_USD_per_kw ,
1128+ self ._default_peaking_boiler_cost_USD_per_kW = 65
1129+ self .peaking_boiler_cost_per_kW = self .ParameterDict [self .peaking_boiler_cost_per_kW .Name ] = floatParameter (
1130+ "Peaking Boiler Cost per kW " ,
1131+ DefaultValue = self ._default_peaking_boiler_cost_USD_per_kW ,
11321132 Min = 0 ,
11331133 Max = 1000 ,
11341134 UnitType = Units .ENERGYCOST ,
11351135 PreferredUnits = EnergyCostUnit .DOLLARSPERKW ,
11361136 CurrentUnits = EnergyCostUnit .DOLLARSPERKW ,
11371137 Required = False ,
1138- ToolTipText = "Peaking boiler cost per KW of maximum peaking boiler demand"
1138+ ToolTipText = "Peaking boiler cost per kW of maximum peaking boiler demand"
11391139 )
11401140 self .dhpipingcostrate = self .ParameterDict [self .dhpipingcostrate .Name ] = floatParameter (
11411141 "District Heating Piping Cost Rate" ,
@@ -1633,18 +1633,29 @@ def __init__(self, model: Model):
16331633 f'Provide { self .ccexplfixed .Name } to override the default correlation and set your own cost.'
16341634 )
16351635
1636+ # noinspection SpellCheckingInspection
16361637 self .Cwell = self .OutputParameterDict [self .Cwell .Name ] = OutputParameter (
16371638 Name = "Wellfield cost" ,
16381639 display_name = 'Drilling and completion costs' ,
16391640 UnitType = Units .CURRENCY ,
16401641 PreferredUnits = CurrencyUnit .MDOLLARS ,
16411642 CurrentUnits = CurrencyUnit .MDOLLARS ,
16421643
1643- # See TODO re:parameterizing indirect costs at src/geophires_x/Economics.py:652
1644- # (https://github.com/NREL/GEOPHIRES-X/issues/383)
1644+ # TODO https://github.com/NREL/GEOPHIRES-X/issues/383?title=Parameterize+indirect+cost+factor
16451645 ToolTipText = "Includes total drilling and completion cost of all injection and production wells and "
16461646 "laterals, plus 5% indirect costs."
16471647 )
1648+ self .drilling_and_completion_costs_per_well = self .OutputParameterDict [
1649+ self .drilling_and_completion_costs_per_well .Name ] = OutputParameter (
1650+ Name = 'Drilling and completion costs per well' ,
1651+ UnitType = Units .CURRENCY ,
1652+ PreferredUnits = CurrencyUnit .MDOLLARS ,
1653+ CurrentUnits = CurrencyUnit .MDOLLARS ,
1654+
1655+ # TODO https://github.com/NREL/GEOPHIRES-X/issues/383?title=Parameterize+indirect+cost+factor
1656+ ToolTipText = 'Includes total drilling and completion cost per well, '
1657+ 'including injection and production wells and laterals, plus 5% indirect costs.'
1658+ )
16481659 self .Coamwell = self .OutputParameterDict [self .Coamwell .Name ] = OutputParameter (
16491660 Name = "O&M Wellfield cost" ,
16501661 display_name = 'Wellfield maintenance costs' ,
@@ -1722,9 +1733,9 @@ def __init__(self, model: Model):
17221733 UnitType = Units .CURRENCY ,
17231734 PreferredUnits = CurrencyUnit .MDOLLARS ,
17241735 CurrentUnits = CurrencyUnit .MDOLLARS ,
1725- ToolTipText = f'Default cost: ${ self ._default_peaking_boiler_cost_USD_per_kw } /KW '
1736+ ToolTipText = f'Default cost: ${ self ._default_peaking_boiler_cost_USD_per_kW } /KW '
17261737 f'of maximum peaking boiler demand. '
1727- f'Provide { self .peaking_boiler_cost_per_kw .Name } override the default.'
1738+ f'Provide { self .peaking_boiler_cost_per_kW .Name } override the default.'
17281739 )
17291740
17301741 self .dhdistrictcost = self .OutputParameterDict [self .dhdistrictcost .Name ] = OutputParameter (
@@ -2313,7 +2324,9 @@ def Calculate(self, model: Model) -> None:
23132324 else :
23142325 self .cost_lateral_section .value = 0.0
23152326 # cost of the well field
2316- # 1.05 for 5% indirect costs - see TODO re:parameterizing at src/geophires_x/Economics.py:652
2327+
2328+ # 1.05 for 5% indirect costs
2329+ # TODO https://github.com/NREL/GEOPHIRES-X/issues/383?title=Parameterize+indirect+cost+factor
23172330 self .Cwell .value = 1.05 * ((self .cost_one_production_well .value * model .wellbores .nprod .value ) +
23182331 (self .cost_one_injection_well .value * model .wellbores .ninj .value ) +
23192332 self .cost_lateral_section .value )
@@ -2685,7 +2698,7 @@ def calculate_plant_costs(self, model:Model) -> None:
26852698 model .surfaceplant .HeatExtracted .value ) * 1000.
26862699
26872700 # add 65$/KW for peaking boiler
2688- self .peakingboilercost .value = (self .peaking_boiler_cost_per_kw .quantity ()
2701+ self .peakingboilercost .value = (self .peaking_boiler_cost_per_kW .quantity ()
26892702 .to ('USD / kilowatt' ).magnitude
26902703 * model .surfaceplant .max_peaking_boiler_demand .value / 1000 )
26912704
@@ -2972,6 +2985,7 @@ def calculate_cashflow(self, model: Model) -> None:
29722985 for i in range (1 , model .surfaceplant .plant_lifetime .value + model .surfaceplant .construction_years .value , 1 ):
29732986 self .TotalCummRevenue .value [i ] = self .TotalCummRevenue .value [i - 1 ] + self .TotalRevenue .value [i ]
29742987
2988+ # noinspection SpellCheckingInspection
29752989 def _calculate_derived_outputs (self , model : Model ) -> None :
29762990 """
29772991 Subclasses should call _calculate_derived_outputs at the end of their Calculate methods to populate output
@@ -2988,5 +3002,11 @@ def _calculate_derived_outputs(self, model: Model) -> None:
29883002 self .real_discount_rate .value = self .discountrate .quantity ().to (convertible_unit (
29893003 self .real_discount_rate .CurrentUnits )).magnitude
29903004
3005+ if hasattr (self , 'Cwell' ) and hasattr (model .wellbores , 'nprod' ) and hasattr (model .wellbores , 'ninj' ):
3006+ self .drilling_and_completion_costs_per_well .value = (
3007+ self .Cwell .value /
3008+ (model .wellbores .nprod .value + model .wellbores .ninj .value )
3009+ )
3010+
29913011 def __str__ (self ):
29923012 return "Economics"
0 commit comments