Skip to content

Commit

Permalink
adjust format
Browse files Browse the repository at this point in the history
  • Loading branch information
Wan, Hanlong committed Sep 4, 2024
1 parent dafbeff commit b589221
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
22 changes: 15 additions & 7 deletions copper/unitarydirectexpansion.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,20 @@ def __init__(
sim_engine="energyplus",
condenser_type="air",
degradation_coefficient=0.115170535550221, # plf = (1 - C_D) * C_D * plr in AHRI 240/210
indoor_fan_control_mode = "constant_speed",
indoor_fan_speed_mapping= {
"1": {"fan_flow_fraction": 0.66, "fan_power_fraction": 0.4, "capacity_fraction": 0.5},
"2": {"fan_flow_fraction": 1.0, "fan_power_fraction": 1.0, "capacity_fraction": 1.0}
indoor_fan_control_mode="constant_speed",
indoor_fan_speed_mapping={
"1": {
"fan_flow_fraction": 0.66,
"fan_power_fraction": 0.4,
"capacity_fraction": 0.5,
},
indoor_fan_speed = "1"
"2": {
"fan_flow_fraction": 1.0,
"fan_power_fraction": 1.0,
"capacity_fraction": 1.0,
},
},
indoor_fan_speed="1",
):
global log_fan
self.type = "UnitaryDirectExpansion"
Expand Down Expand Up @@ -184,7 +192,7 @@ def calc_rated_eff(
plf_f_plr = self.plr_curve
else:
plf_f_plr = curves["plf_f_plr"]

if self.indoor_fan_control_mode == "constant_speed":
f = 1
else:
Expand Down Expand Up @@ -260,7 +268,7 @@ def calc_rated_eff(
eer_reduced = (load_factor * net_cooling_cap_reduced) / (
load_factor * elec_power_reduced_cap + self.indoor_fan_power
)
#other place to adjust?
# other place to adjust?
ieer += weighting_factor[red_cap_num] * eer_reduced
return ieer

Expand Down
6 changes: 4 additions & 2 deletions tests/test_unitarydirectexpansion.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def test_both_capacity_inputs_provided(self):
self.assertIn("ERROR", log.output[0])
self.assertIn("Input must be one and only one capacity input", log.output[0])


# Run the tests
import unittest
if __name__ == '__main__':
unittest.main()

if __name__ == "__main__":
unittest.main()

0 comments on commit b589221

Please sign in to comment.