@@ -1887,10 +1887,8 @@ def __init__(self, model: Model):
18871887 )
18881888
18891889 # local variable initialization
1890- self .CAPEX_cost_electricity_plant_musd = 0.0 # TODO should be proper output parameter
1891- self .CAPEX_cost_heat_plant_musd = 0.0 # TODO should be proper output parameter
1892- self .OPEX_cost_electricity_plant = 0.0
1893- self .OPEX_cost_heat_plant = 0.0
1890+ self .OPEX_cost_electricity_plant = 0.0 # TODO should be proper output parameter
1891+ self .OPEX_cost_heat_plant = 0.0 # TODO should be proper output parameter
18941892 # self.CAPEX_heat_electricity_plant_ratio.value = 0.0
18951893 self .Claborcorrelation = 0.0
18961894 self .Cpumps = 0.0
@@ -2035,6 +2033,7 @@ def __init__(self, model: Model):
20352033 f'The total is then divided over { model .surfaceplant .plant_lifetime .Name } years to calculate '
20362034 f'Redrilling costs per year.'
20372035 )
2036+
20382037 # noinspection SpellCheckingInspection
20392038 self .Cplant = self .OutputParameterDict [self .Cplant .Name ] = OutputParameter (
20402039 Name = "Surface Plant cost" ,
@@ -2076,6 +2075,20 @@ def __init__(self, model: Model):
20762075 'their specific application. Beckers and Young (2017) collected several cost figures to '
20772076 'estimate the surface equipment cost for geothermal district-heating systems.'
20782077 )
2078+
2079+ self .CAPEX_cost_electricity_plant = self .OutputParameterDict [self .CAPEX_cost_electricity_plant .Name ] = OutputParameter (
2080+ Name = "Electricity Plant cost" , # WIP...
2081+ UnitType = Units .CURRENCY ,
2082+ PreferredUnits = CurrencyUnit .MDOLLARS ,
2083+ CurrentUnits = CurrencyUnit .MDOLLARS ,
2084+ )
2085+ self .CAPEX_cost_heat_plant = self .OutputParameterDict [self .CAPEX_cost_heat_plant .Name ] = OutputParameter (
2086+ Name = "Heat Plant cost" , # WIP...
2087+ UnitType = Units .CURRENCY ,
2088+ PreferredUnits = CurrencyUnit .MDOLLARS ,
2089+ CurrentUnits = CurrencyUnit .MDOLLARS ,
2090+ )
2091+
20792092 self .Coamplant = self .OutputParameterDict [self .Coamplant .Name ] = OutputParameter (
20802093 Name = "O&M Surface Plant costs" ,
20812094 display_name = 'Power plant maintenance costs' ,
@@ -2492,6 +2505,15 @@ def __init__(self, model: Model):
24922505
24932506 model .logger .info (f'Complete { __class__ !s} : { sys ._getframe ().f_code .co_name } ' )
24942507
2508+ @property
2509+ def CAPEX_cost_electricity_plant_musd (self ) -> float :
2510+ return self .CAPEX_cost_electricity_plant .quantity ().to ('MUSD' ).magnitude
2511+
2512+ @property
2513+ def CAPEX_cost_heat_plant_musd (self ) -> float :
2514+ return self .CAPEX_cost_heat_plant .quantity ().to ('MUSD' ).magnitude
2515+
2516+
24952517 def read_parameters (self , model : Model ) -> None :
24962518 """
24972519 read_parameters read and update the Economics parameters and handle the special cases
@@ -3293,8 +3315,8 @@ def calculate_plant_costs(self, model: Model) -> None:
32933315 # TODO enhance message user-friendliness
32943316 raise RuntimeError (f'{ self .CAPEX_heat_electricity_plant_ratio .Name } is required.' )
32953317
3296- self .CAPEX_cost_electricity_plant_musd = self .Cplant .quantity ().to ('MUSD' ).magnitude * self .CAPEX_heat_electricity_plant_ratio .value
3297- self .CAPEX_cost_heat_plant_musd = self .Cplant .quantity ().to ('MUSD' ).magnitude * (1.0 - self .CAPEX_heat_electricity_plant_ratio .value )
3318+ self .CAPEX_cost_electricity_plant . value = self .Cplant .quantity ().to (self . CAPEX_cost_electricity_plant . CurrentUnits ).magnitude * self .CAPEX_heat_electricity_plant_ratio .quantity (). to ( 'dimensionless' ). magnitude
3319+ self .CAPEX_cost_heat_plant . value = self .Cplant .quantity ().to (self . CAPEX_cost_heat_plant . CurrentUnits ).magnitude * (1.0 - self .CAPEX_heat_electricity_plant_ratio .quantity (). to ( 'dimensionless' ). magnitude )
32983320 else :
32993321 if self .Power_plant_cost_per_kWe .Provided :
33003322 nameplate_capacity_kW = np .max (model .surfaceplant .ElectricityProduced .quantity ().to ('kW' ))
@@ -3307,7 +3329,7 @@ def calculate_plant_costs(self, model: Model) -> None:
33073329 direct_plant_cost_MUSD = self .ccplantadjfactor .value * self .Cplantcorrelation * 1.02 * 1.10
33083330
33093331 self .Cplant .value = self ._indirect_cost_factor * self ._contingency_factor * direct_plant_cost_MUSD
3310- self .CAPEX_cost_electricity_plant_musd = self .Cplant .quantity ().to ('MUSD' ).magnitude
3332+ self .CAPEX_cost_electricity_plant . value = self .Cplant .quantity ().to (self . CAPEX_cost_electricity_plant . CurrentUnits ).magnitude
33113333
33123334 # add direct-use plant cost of co-gen system to Cplant (only if no total Cplant was provided)
33133335 if not self .ccplantfixed .Valid :
@@ -3316,25 +3338,26 @@ def calculate_plant_costs(self, model: Model) -> None:
33163338 EndUseOptions .COGENERATION_TOPPING_EXTRA_ELECTRICITY ,
33173339 EndUseOptions .COGENERATION_TOPPING_EXTRA_HEAT
33183340 ]:
3319- self .CAPEX_cost_heat_plant_musd = (
3341+ self .CAPEX_cost_heat_plant . value = quantity (
33203342 self ._indirect_cost_factor
33213343 * self ._contingency_factor
33223344 * self .ccplantadjfactor .value
33233345 * 250E-6
33243346 * np .max (model .surfaceplant .HeatProduced .value / model .surfaceplant .enduse_efficiency_factor .value )
3325- * 1000.
3326- )
3347+ * 1000. ,
3348+ 'MUSD'
3349+ ).to (self .CAPEX_cost_heat_plant .CurrentUnits ).magnitude
33273350 elif model .surfaceplant .enduse_option .value in [
33283351 # enduse_option = 4*: cogen bottoming cycle
33293352 EndUseOptions .COGENERATION_BOTTOMING_EXTRA_HEAT ,
33303353 EndUseOptions .COGENERATION_BOTTOMING_EXTRA_ELECTRICITY
33313354 ]:
3332- self .CAPEX_cost_heat_plant_musd = self ._indirect_cost_factor * self ._contingency_factor * self .ccplantadjfactor .value * 250E-6 * np .max (
3333- model .surfaceplant .HeatProduced .value / model .surfaceplant .enduse_efficiency_factor .value ) * 1000.
3355+ self .CAPEX_cost_heat_plant . value = quantity ( self ._indirect_cost_factor * self ._contingency_factor * self .ccplantadjfactor .value * 250E-6 * np .max (
3356+ model .surfaceplant .HeatProduced .value / model .surfaceplant .enduse_efficiency_factor .value ) * 1000. , 'MUSD' ). to ( self . CAPEX_cost_heat_plant . CurrentUnits ). magnitude
33343357 elif model .surfaceplant .enduse_option .value in [EndUseOptions .COGENERATION_PARALLEL_EXTRA_ELECTRICITY ,
33353358 EndUseOptions .COGENERATION_PARALLEL_EXTRA_HEAT ]: # cogen parallel cycle
3336- self .CAPEX_cost_heat_plant_musd = self ._indirect_cost_factor * self ._contingency_factor * self .ccplantadjfactor .value * 250E-6 * np .max (
3337- model .surfaceplant .HeatProduced .value / model .surfaceplant .enduse_efficiency_factor .value ) * 1000.
3359+ self .CAPEX_cost_heat_plant . value = quantity ( self ._indirect_cost_factor * self ._contingency_factor * self .ccplantadjfactor .value * 250E-6 * np .max (
3360+ model .surfaceplant .HeatProduced .value / model .surfaceplant .enduse_efficiency_factor .value ) * 1000. , 'MUSD' ). to ( self . CAPEX_cost_heat_plant . CurrentUnits ). magnitude
33383361
33393362 self .Cplant .value = self .Cplant .value + quantity (self .CAPEX_cost_heat_plant_musd , 'MUSD' ).to (self .Cplant .CurrentUnits .value ).magnitude
33403363
0 commit comments