From 206ab691a09d5cb594516078271af42f47e61d09 Mon Sep 17 00:00:00 2001 From: "Jeremy L." <5149279+lymereJ@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:21:11 -0700 Subject: [PATCH] Remove duplicate information. (#123) --- copper/data/equipment_references.json | 5 +--- copper/unitarydirectexpansion.py | 34 +++++++++++++++------------ tests/test_unitarydirectexpansion.py | 2 +- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/copper/data/equipment_references.json b/copper/data/equipment_references.json index ef72c15..9b2aad7 100644 --- a/copper/data/equipment_references.json +++ b/copper/data/equipment_references.json @@ -62,10 +62,7 @@ "numofreducedcap": 4, "reducedplr": [1.0, 0.75, 0.5, 0.25], "weightingfactor": [0.02, 0.617, 0.238, 0.125] - }, - "outdoor_unit_inlet_air_dry_bulb_rated": 35, - "outdoor_unit_inlet_air_dry_bulb_reduced": 18.3, - "cooling_coil_inlet_air_wet_bulb_rated": 19.44 + } }, "ahri_341/361": {} } diff --git a/copper/unitarydirectexpansion.py b/copper/unitarydirectexpansion.py index 5bf45a5..1b4db91 100644 --- a/copper/unitarydirectexpansion.py +++ b/copper/unitarydirectexpansion.py @@ -344,12 +344,12 @@ def calc_rated_eff( "weightingfactor" ] tot_cap_temp_mod_fac = cap_f_t.evaluate( - equipment_references[eqp_type][std][ - "cooling_coil_inlet_air_wet_bulb_rated" - ], - equipment_references[eqp_type][std][ - "outdoor_unit_inlet_air_dry_bulb_rated" - ], + Equipment.convert_to_deg_c( + value=equipment_references[eqp_type][std][self.condenser_type]["aew"] + ), + Equipment.convert_to_deg_c( + value=equipment_references[eqp_type][std][self.condenser_type]["ect"][0] + ), ) # Calculate NET rated capacity @@ -372,15 +372,19 @@ def calc_rated_eff( 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"] + outdoor_unit_inlet_air_dry_bulb_temp_reduced = ( + Equipment.convert_to_deg_c( + equipment_references[eqp_type][std][self.condenser_type]["ect"][ + -1 + ] + ) + ) # Calculate capacity at rating conditions tot_cap_temp_mod_fac = cap_f_t.evaluate( - equipment_references[eqp_type][std][ - "cooling_coil_inlet_air_wet_bulb_rated" - ], + Equipment.convert_to_deg_c( + equipment_references[eqp_type][std][self.condenser_type]["aew"] + ), outdoor_unit_inlet_air_dry_bulb_temp_reduced, ) load_factor_gross = min( @@ -394,9 +398,9 @@ def calc_rated_eff( # Calculate efficency at rating conditions eir_temp_mod_fac = eir_f_t.evaluate( - equipment_references[eqp_type][std][ - "cooling_coil_inlet_air_wet_bulb_rated" - ], + Equipment.convert_to_deg_c( + equipment_references[eqp_type][std][self.condenser_type]["aew"] + ), outdoor_unit_inlet_air_dry_bulb_temp_reduced, ) if rated_cop > 0.0: diff --git a/tests/test_unitarydirectexpansion.py b/tests/test_unitarydirectexpansion.py index 8dec0b1..d4e0668 100644 --- a/tests/test_unitarydirectexpansion.py +++ b/tests/test_unitarydirectexpansion.py @@ -361,7 +361,7 @@ def test_NN_wght_avg(self): assert len(set_of_curves) == 5 # Check normalization - assert round(set_of_curves[0].evaluate(19.44, 35), 2) == 1.0 + assert round(set_of_curves[0].evaluate(19.44, 35), 2) == 0.99 assert round(set_of_curves[1].evaluate(19.44, 35), 2) == 1.0 assert round(set_of_curves[2].evaluate(1.0, 0), 2) == 1.0 assert round(set_of_curves[3].evaluate(1.0, 0), 2) == 1.0