From a50be39f1ec7726cd5ffad2985cb6b5fd2c07912 Mon Sep 17 00:00:00 2001 From: yunjoonjung Date: Fri, 21 Jun 2024 13:23:57 -0700 Subject: [PATCH 1/2] Corrected the wrong parts in the rule and ruletest --- .../ashrae9012019/section16/section16rule1.py | 21 +++++++++++++------ .../ashrae9012019/section16/rule_16_1.json | 18 +++++++++------- rct229/utils/pint_utils.py | 1 + 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/rct229/rulesets/ashrae9012019/section16/section16rule1.py b/rct229/rulesets/ashrae9012019/section16/section16rule1.py index 25a14b0acb..15455c08f9 100644 --- a/rct229/rulesets/ashrae9012019/section16/section16rule1.py +++ b/rct229/rulesets/ashrae9012019/section16/section16rule1.py @@ -8,7 +8,7 @@ from rct229.schema.config import ureg from rct229.utils.assertions import assert_, getattr_ from rct229.utils.jsonpath_utils import find_all -from rct229.utils.pint_utils import CalcQ +from rct229.utils.pint_utils import ZERO, CalcQ from rct229.utils.std_comparisons import std_equal @@ -88,14 +88,23 @@ def get_calc_vals(self, context, data=None): # Pm: peak elevator motor power, W motor_brake_horsepower_b = ( ( - elevator_cab_weight_b * ureg("lb") - + elevator_design_load_b * ureg("lb") - - elevator_cab_counterweight_b * ureg("lb") + elevator_cab_weight_b.to("lb") + + elevator_design_load_b.to("lb") + - elevator_cab_counterweight_b.to("lb") ) - * elevator_speed_b - * ureg("ft/min") + * elevator_speed_b.to("ft/min") / (33000 * elevator_mechanical_efficiency_b) ).m * ureg("hp") + + assert_( + elevator_cab_weight_b + + elevator_design_load_b + - elevator_cab_counterweight_b + > ZERO.WEIGHT, + "Elevator cab counter weight shall be smaller than the sum of cab weight and design load. A " + "typical cab counter weight is the sum of cab weight and 40% of design load.", + ) + elevator_motor_efficiency_b = ( table_G3_9_1_lookup(motor_brake_horsepower_b)[ "full_load_motor_efficiency_for_modeling" diff --git a/rct229/ruletest_engine/ruletest_jsons/ashrae9012019/section16/rule_16_1.json b/rct229/ruletest_engine/ruletest_jsons/ashrae9012019/section16/rule_16_1.json index f8a4b89c5f..9d1323a367 100644 --- a/rct229/ruletest_engine/ruletest_jsons/ashrae9012019/section16/rule_16_1.json +++ b/rct229/ruletest_engine/ruletest_jsons/ashrae9012019/section16/rule_16_1.json @@ -156,9 +156,8 @@ "elevators": [ { "id": "Elevator 1", - "number_of_floors_served": 4, - "motor_power": 15000, - "cab_counterweight": 1814.4000000000003, + "motor_power": 11185500.0, + "cab_counterweight": 1360.8000000000002, "cab_weight": 680.4000000000001, "design_load": 907.2000000000002, "speed": 0.5079999999999999 @@ -498,7 +497,7 @@ { "id": "Elevator 1", "number_of_floors_served": 4, - "motor_power": 24984.593950111193, + "motor_power": 18631011.708597917, "cab_counterweight": 226.80000000000004, "cab_weight": 680.4000000000001, "design_load": 1814.4000000000003, @@ -671,7 +670,7 @@ { "id": "Elevator 1", "number_of_floors_served": 4, - "motor_power": 20000, + "motor_power": 14914000.0, "cab_counterweight": 226.80000000000004, "cab_weight": 680.4000000000001, "design_load": 1814.4000000000003, @@ -838,7 +837,7 @@ { "id": "Elevator 1", "number_of_floors_served": 4, - "motor_power": 20000, + "motor_power": 14914000.0, "cab_counterweight": 226.80000000000004, "cab_weight": 680.4000000000001, "design_load": 1814.4000000000003, @@ -936,7 +935,12 @@ "elevators": [ { "id": "Elevator 1", - "number_of_floors_served": 4 + "number_of_floors_served": 4, + "motor_power": 20000, + "cab_counterweight": 500, + "cab_weight": 1500, + "design_load": 4000, + "speed": 100 } ] } diff --git a/rct229/utils/pint_utils.py b/rct229/utils/pint_utils.py index 8f9f165b9b..0a247319e5 100644 --- a/rct229/utils/pint_utils.py +++ b/rct229/utils/pint_utils.py @@ -88,6 +88,7 @@ class ZERO: """Class holding zero values for various pint quantities""" LENGTH: Quantity = 0 * ureg("ft") + WEIGHT: Quantity = 0 * ureg("lb") AREA: Quantity = LENGTH * LENGTH VOLUME: Quantity = AREA * LENGTH From 951ade6ff5436818c3fdb2f3b8303ad35920b508 Mon Sep 17 00:00:00 2001 From: yunjoonjung Date: Fri, 21 Jun 2024 14:34:05 -0700 Subject: [PATCH 2/2] delete 746 since it's a conversion factor hp-W --- rct229/rulesets/ashrae9012019/section16/section16rule1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rct229/rulesets/ashrae9012019/section16/section16rule1.py b/rct229/rulesets/ashrae9012019/section16/section16rule1.py index 15455c08f9..063ffacb0e 100644 --- a/rct229/rulesets/ashrae9012019/section16/section16rule1.py +++ b/rct229/rulesets/ashrae9012019/section16/section16rule1.py @@ -115,7 +115,7 @@ def get_calc_vals(self, context, data=None): ] ) expected_peak_motor_power_b = ( - motor_brake_horsepower_b * 746 / elevator_motor_efficiency_b + motor_brake_horsepower_b / elevator_motor_efficiency_b ) return {