Skip to content

Commit

Permalink
Merge branch 'RS/YJ/Rule_16-1' of https://github.com/pnnl/ruleset-che…
Browse files Browse the repository at this point in the history
…cking-tool into RS/YJ/Rule_16-1
  • Loading branch information
weilixu committed Jun 21, 2024
2 parents 15edff0 + 951ade6 commit 5691d3d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
23 changes: 16 additions & 7 deletions rct229/rulesets/ashrae9012019/section16/section16rule1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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"
Expand All @@ -106,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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
]
}
Expand Down
1 change: 1 addition & 0 deletions rct229/utils/pint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5691d3d

Please sign in to comment.