diff --git a/copper/chiller.py b/copper/chiller.py index 171081a..fcdba4f 100644 --- a/copper/chiller.py +++ b/copper/chiller.py @@ -38,7 +38,7 @@ def __init__( part_eff_ref_std_alt="ahri_550/590", full_eff_alt=0, full_eff_unit_alt="", - set_of_curves="", + set_of_curves=[], model="ect_lwt", sim_engine="energyplus", min_unloading=0.1, diff --git a/copper/data/unitarydirectexpansion_curves.json b/copper/data/unitarydirectexpansion_curves.json index 0bfcaec..ff83faa 100644 --- a/copper/data/unitarydirectexpansion_curves.json +++ b/copper/data/unitarydirectexpansion_curves.json @@ -91,19 +91,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999898625489256 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -205,19 +192,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9997841417696045 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -319,19 +293,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9998202629693308 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -433,19 +394,6 @@ "ref_ect": 35, "units": "si", "rho": 0.999805016946502 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -547,19 +495,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9997990211558602 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -661,19 +596,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9414363852377039 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -775,19 +697,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9414363852377039 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -889,19 +798,6 @@ "ref_ect": 35, "units": "si", "rho": 0.8643594441479289 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1003,19 +899,6 @@ "ref_ect": 35, "units": "si", "rho": 0.7974786198943641 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1117,19 +1000,6 @@ "ref_ect": 35, "units": "si", "rho": 0.8882829394047146 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1231,19 +1101,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9998607205028736 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1345,19 +1202,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999634489564555 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1459,19 +1303,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999746498510637 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1573,19 +1404,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999662174716383 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1687,19 +1505,6 @@ "ref_ect": 35, "units": "si", "rho": 0.999739060090018 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1801,19 +1606,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9998355355686489 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -1915,19 +1707,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999208704251976 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2029,19 +1808,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9998942593392481 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2143,19 +1909,6 @@ "ref_ect": 35, "units": "si", "rho": 0.999931805937805 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2257,19 +2010,6 @@ "ref_ect": 35, "units": "si", "rho": 0.999936136922373 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2371,19 +2111,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999969563371341 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2485,19 +2212,6 @@ "ref_ect": 35, "units": "si", "rho": 0.999661495053771 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2599,19 +2313,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999784649582972 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2713,19 +2414,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999544390752798 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2827,19 +2515,6 @@ "ref_ect": 35, "units": "si", "rho": 1.0 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -2941,19 +2616,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999961070029176 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3055,19 +2717,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9998427626742821 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3169,19 +2818,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999977767476708 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3283,19 +2919,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9998633677193004 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3397,19 +3020,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999768312037316 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3511,19 +3121,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9998942593392481 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3625,19 +3222,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999650910478683 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3739,19 +3323,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999530170125136 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3853,19 +3424,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9999990099710763 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, @@ -3967,19 +3525,6 @@ "ref_ect": 35, "units": "si", "rho": 0.9995445573140064 - }, - "plf-f-plr": { - "out_var": "plf-f-plr", - "type": "quad", - "coeff1": 0, - "coeff2": 0, - "coeff3": 1.0, - "x_min": 0.0, - "x_max": 1.0, - "out_min": null, - "out_max": null, - "ref_ect": 35, - "units": "si" } }, "fan_control_mode": null, diff --git a/copper/library.py b/copper/library.py index 2bab757..e0be5a0 100644 --- a/copper/library.py +++ b/copper/library.py @@ -40,6 +40,7 @@ def __init__(self, path=chiller_lib, rating_std="", export=False): not "part_eff" in p and not "set_of_curves" in p and not "alt" in p + and not "degradation_coefficient" in p ): obj_args[p] = vals[p] @@ -98,7 +99,12 @@ def load_obj(self, data): # using values from the library obj_args = {} for p in props: - if not "part_eff" in p and not "set_of_curves" in p and not "alt" in p: + if ( + not "part_eff" in p + and not "set_of_curves" in p + and not "alt" in p + and not "degradation_coefficient" in p + ): obj_args[p] = data[p] # Temporarily set the part load efficiency to the @@ -176,7 +182,9 @@ def find_set_of_curves_from_lib(self, filters=[], part_eff_flag=False): else: if p in props.keys(): obj_args[p] = props[p] - elif "part_eff" in p or "alt" in p: + elif ( + "part_eff" in p or "alt" in p or "degradation_coefficient" in p + ): pass else: obj_args[p] = props[p] diff --git a/copper/unitarydirectexpansion.py b/copper/unitarydirectexpansion.py index 6cfc704..415e563 100644 --- a/copper/unitarydirectexpansion.py +++ b/copper/unitarydirectexpansion.py @@ -32,13 +32,14 @@ def __init__( ref_gross_cap=None, ref_net_cap=None, part_eff_unit="", - set_of_curves="", + set_of_curves=[], part_eff_ref_std="ahri_340/360", part_eff_ref_std_alt=None, model="simplified_bf", sim_engine="energyplus", condenser_type="air", fan_control_mode="constant_speed", + degradation_coefficient=0.115170535550221, # plf = (1 - C_D) * C_D * plr in AHRI 240/210 ): global log_fan self.type = "UnitaryDirectExpansion" @@ -127,6 +128,19 @@ def __init__( "cap-f-f": {"x1_min": 0, "x1_max": 1, "x1_norm": 1, "nbval": nb_val}, "plf-f-plr": {"x1_min": 0, "x1_max": 1, "x1_norm": 1, "nbval": nb_val}, } + # Cycling degradation + self.degradation_coefficient = degradation_coefficient + if not "plf_f_plr" in self.get_dx_curves().keys(): + plf_f_plr = Curve(eqp=self, c_type="linear") + plf_f_plr.out_var = "plf-f-plr" + plf_f_plr.type = "linear" + plf_f_plr.coeff1 = 1 - self.degradation_coefficient + plf_f_plr.coeff2 = self.degradation_coefficient + plf_f_plr.x_min = 0 + plf_f_plr.x_max = 1 + plf_f_plr.out_min = 0 + plf_f_plr.out_max = 1 + self.set_of_curves.append(plf_f_plr) def calc_rated_eff( self, eff_type="ieer", unit="eer", output_report=False, alt=False @@ -214,7 +228,7 @@ def calc_rated_eff( if net_cooling_cap_reduced > 0.0 else 1.0 ) - degradation_coeff = 1.130 - 0.130 * load_factor + degradation_coeff = 1 / plf_f_plr.evaluate(load_factor, 1) elec_power_reduced_cap = ( degradation_coeff * eir diff --git a/tests/test_unitarydirectexpansion.py b/tests/test_unitarydirectexpansion.py index 9b8593f..a03197b 100644 --- a/tests/test_unitarydirectexpansion.py +++ b/tests/test_unitarydirectexpansion.py @@ -28,7 +28,7 @@ def test_calc_eff_ect(self): fan_control_mode="constant_speed", ) cop_1 = 7.4 - cop_2 = round(DX.calc_rated_eff(), 2) + cop_2 = round(DX.calc_rated_eff(), 1) self.assertTrue(cop_1 == cop_2, f"{cop_1} is different than {cop_2}") def test_model_type_error(self):