diff --git a/DISCLAMER.md b/DISCLAMER.md new file mode 100644 index 0000000..b3ea641 --- /dev/null +++ b/DISCLAMER.md @@ -0,0 +1,8 @@ +This material was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor the Contractor, nor any or their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights. +Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof. +PACIFIC NORTHWEST NATIONAL LABORATORY +operated by +BATTELLE +for the +UNITED STATES DEPARTMENT OF ENERGY +under Contract DE-AC05-76RL01830 \ No newline at end of file diff --git a/copper/chiller.py b/copper/chiller.py index 79d2149..af2a657 100644 --- a/copper/chiller.py +++ b/copper/chiller.py @@ -528,17 +528,33 @@ def get_ranges(self): """ norm_val = {"ect_lwt": self.ref_ect, "lct_lwt": self.ref_lct}[self.model] - ranges = { - "eir-f-t": { - "vars_range": [(4, 10), (10.0, 40.0)], - "normalization": (self.ref_lwt, norm_val), - }, - "cap-f-t": { - "vars_range": [(4, 10), (10.0, 40.0)], - "normalization": (self.ref_lwt, norm_val), - }, - "eir-f-plr": {"vars_range": [(0.0, 1.0)], "normalization": (1.0)}, - } + if self.model == "ect_lwt": + ranges = { + "eir-f-t": { + "vars_range": [(4, 10), (10.0, 40.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "cap-f-t": { + "vars_range": [(4, 10), (10.0, 40.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "eir-f-plr": {"vars_range": [(0.0, 1.0)], "normalization": (1.0)}, + } + elif self.model == "lct_lwt": + ranges = { + "eir-f-t": { + "vars_range": [(4, 10), (10.0, 45.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "cap-f-t": { + "vars_range": [(4, 10), (10.0, 45.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "eir-f-plr": { + "vars_range": [(10, 45.0), (0, 1)], + "normalization": (norm_val, 1.0), + }, + } return ranges @@ -666,4 +682,4 @@ def get_seed_curves(self, lib=None, filters=None, csets=None): return curves def get_ref_vars_for_aggregation(self): - return ["ref_cap", "full_eff"] + return ["ref_cap", "full_eff"] \ No newline at end of file diff --git a/fasd b/fasd new file mode 100644 index 0000000..beca6c7 --- /dev/null +++ b/fasd @@ -0,0 +1,215 @@ +diff --git a/DISCLAMER.md b/DISCLAMER.md +deleted file mode 100644 +index b3ea641..0000000 +--- a/DISCLAMER.md ++++ /dev/null +@@ -1,8 +0,0 @@ +-This material was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor the Contractor, nor any or their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights. +-Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof. +-PACIFIC NORTHWEST NATIONAL LABORATORY +-operated by +-BATTELLE +-for the +-UNITED STATES DEPARTMENT OF ENERGY +-under Contract DE-AC05-76RL01830 +\ No newline at end of file +diff --git a/copper/chiller.py b/copper/chiller.py +index 43dcde6..79d2149 100644 +--- a/copper/chiller.py ++++ b/copper/chiller.py +@@ -528,33 +528,17 @@ class Chiller(Equipment): + """ + norm_val = {"ect_lwt": self.ref_ect, "lct_lwt": self.ref_lct}[self.model] +  +- if self.model == "ect_lwt": +- ranges = { +- "eir-f-t": { +- "vars_range": [(4, 10), (10.0, 40.0)], +- "normalization": (self.ref_lwt, norm_val), +- }, +- "cap-f-t": { +- "vars_range": [(4, 10), (10.0, 40.0)], +- "normalization": (self.ref_lwt, norm_val), +- }, +- "eir-f-plr": {"vars_range": [(0.0, 1.0)], "normalization": (1.0)}, +- } +- elif self.model == "lct_lwt": +- ranges = { +- "eir-f-t": { +- "vars_range": [(4, 10), (10.0, 45.0)], +- "normalization": (self.ref_lwt, norm_val), +- }, +- "cap-f-t": { +- "vars_range": [(4, 10), (10.0, 45.0)], +- "normalization": (self.ref_lwt, norm_val), +- }, +- "eir-f-plr": { +- "vars_range": [(10, 45.0), (0, 1)], +- "normalization": (norm_val, 1.0), +- }, +- } ++ ranges = { ++ "eir-f-t": { ++ "vars_range": [(4, 10), (10.0, 40.0)], ++ "normalization": (self.ref_lwt, norm_val), ++ }, ++ "cap-f-t": { ++ "vars_range": [(4, 10), (10.0, 40.0)], ++ "normalization": (self.ref_lwt, norm_val), ++ }, ++ "eir-f-plr": {"vars_range": [(0.0, 1.0)], "normalization": (1.0)}, ++ } +  + return ranges +  +diff --git a/copper/library.py b/copper/library.py +index 83c3ac2..eec294d 100644 +--- a/copper/library.py ++++ b/copper/library.py +@@ -46,6 +46,8 @@ class Library: + and not "indoor_fan_curve_coef" in p + and not "indoor_fan_curve" in p + and not "indoor_fan_power_unit" in p ++ and not "compressor_stage" in p ++ and not "compressor_stage_input" in p + ): + obj_args[p] = vals[p] + elif ( +@@ -123,6 +125,8 @@ class Library: + and not "indoor_fan_curve_coef" in p + and not "indoor_fan_curve" in p + and not "indoor_fan_power_unit" in p ++ and not "compressor_stage" in p ++ and not "compressor_stage_input" in p + ): + obj_args[p] = data[p] +  +@@ -199,6 +203,8 @@ class Library: + "indoor_fan_speeds", + "indoor_fan_curve_coef", + "indoor_fan_power_unit", ++ "compressor_stage", ++ "compressor_stage_input", + ] +  + # Set the equipment properties +diff --git a/copper/unitarydirectexpansion.py b/copper/unitarydirectexpansion.py +index 5bf45a5..f80f083 100644 +--- a/copper/unitarydirectexpansion.py ++++ b/copper/unitarydirectexpansion.py +@@ -61,6 +61,8 @@ class UnitaryDirectExpansion(Equipment): + indoor_fan_speeds=1, + indoor_fan_curve=False, + indoor_fan_power_unit="kW", ++ compressor_stage_input=False, ++ compressor_stage=[0.3, 0.6], + ): + global log_fan + self.type = "UnitaryDirectExpansion" +@@ -172,6 +174,8 @@ class UnitaryDirectExpansion(Equipment): + self.indoor_fan_curve_coef = indoor_fan_curve_coef + self.indoor_fan_power_unit = indoor_fan_power_unit + self.indoor_fan_curve = indoor_fan_curve ++ self.compressor_stage = compressor_stage ++ self.compressor_stage_input = compressor_stage_input + # Define rated temperatures + # air entering drybulb, air entering wetbulb, entering condenser temperature, leaving condenser temperature + aed, self.aew, ect, lct = self.get_rated_temperatures() +@@ -365,17 +369,9 @@ class UnitaryDirectExpansion(Equipment): +  + # Iterate through the different sets of rating conditions to calculate IEER + ieer = 0 +- for red_cap_num in range(num_of_reduced_cap): +- # Determine the outdoor air conditions based on AHRI Standard +- if reduced_plr[red_cap_num] > 0.444: +- outdoor_unit_inlet_air_dry_bulb_temp_reduced = ( +- 5.0 + 30.0 * reduced_plr[red_cap_num] +- ) +- else: +- outdoor_unit_inlet_air_dry_bulb_temp_reduced = equipment_references[ +- eqp_type +- ][std]["outdoor_unit_inlet_air_dry_bulb_reduced"] +  ++ def cal_reduced_eer(ratio, outdoor_unit_inlet_air_dry_bulb_temp_reduced): ++ """inner function to calculate reduced eer.""" + # Calculate capacity at rating conditions + tot_cap_temp_mod_fac = cap_f_t.evaluate( + equipment_references[eqp_type][std][ +@@ -384,7 +380,7 @@ class UnitaryDirectExpansion(Equipment): + outdoor_unit_inlet_air_dry_bulb_temp_reduced, + ) + load_factor_gross = min( +- 1.0, (reduced_plr[red_cap_num] / tot_cap_temp_mod_fac) ++ 1.0, (ratio / tot_cap_temp_mod_fac) + ) # Load percentage * Rated gross capacity / Available gross capacity + indoor_fan_power = self.calc_fan_power(load_factor_gross) / 1000 + net_cooling_cap_reduced = ( +@@ -407,9 +403,9 @@ class UnitaryDirectExpansion(Equipment): + raise ValueError("Input COP is 0!") +  + # "Load Factor" (as per AHRI Standard) which is analogous to PLR +- if reduced_plr[red_cap_num] < 1.0: ++ if ratio < 1.0: + load_factor = ( +- reduced_plr[red_cap_num] ++ ratio # reduced_plr[red_cap_num] + * net_cooling_cap_rated + / net_cooling_cap_reduced + if net_cooling_cap_reduced > 0.0 +@@ -432,14 +428,54 @@ class UnitaryDirectExpansion(Equipment): + eer_reduced = (load_factor * net_cooling_cap_reduced) / ( + load_factor * elec_power_reduced_cap + indoor_fan_power + ) ++ return eer_reduced +  ++ for red_cap_num in range(num_of_reduced_cap): ++ # Determine the outdoor air conditions based on AHRI Standard ++ if reduced_plr[red_cap_num] > 0.444: ++ outdoor_unit_inlet_air_dry_bulb_temp_reduced = ( ++ 5.0 + 30.0 * reduced_plr[red_cap_num] ++ ) ++ else: ++ outdoor_unit_inlet_air_dry_bulb_temp_reduced = equipment_references[ ++ eqp_type ++ ][std]["outdoor_unit_inlet_air_dry_bulb_reduced"] ++ if ( ++ self.compressor_stage_input ++ and (reduced_plr[red_cap_num] > min(self.compressor_stage)) ++ and (reduced_plr[red_cap_num] < max(self.compressor_stage)) ++ ): ++ lower_value = None ++ upper_value = None ++ for value in self.compressor_stage: ++ if value <= red_cap_num: ++ lower_value = value ++ elif value > red_cap_num and upper_value is None: ++ upper_value = value ++ # interpolation ++ eer_reduced = ( ++ ( ++ cal_reduced_eer( ++ lower_value, outdoor_unit_inlet_air_dry_bulb_temp_reduced ++ ) ++ - cal_reduced_eer( ++ upper_value, outdoor_unit_inlet_air_dry_bulb_temp_reduced ++ ) ++ ) ++ / (lower_value - upper_value) ++ ) * (reduced_plr[red_cap_num] - upper_value) + cal_reduced_eer( ++ upper_value, outdoor_unit_inlet_air_dry_bulb_temp_reduced ++ ) ++ else: ++ eer_reduced = cal_reduced_eer( ++ reduced_plr[red_cap_num], ++ outdoor_unit_inlet_air_dry_bulb_temp_reduced, ++ ) + if eff_type == "full": + ieer = eer_reduced + break +- + # Update IEER + ieer += weighting_factor[red_cap_num] * eer_reduced +- + # Convert efficiency to original unit unless specified + if unit != "cop": + ieer = Units(value=ieer, unit="cop")