Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RS/YJ/Rule 23-4 #1240

Merged
merged 9 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/section23/Rule23-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
**Mandatory Rule:** False
**Rule ID:** 23-4
**Rule Description:** Baseline systems 5 & 7 serving lab spaces per G3.1.1c shall reduce lab exhaust and makeup air during unoccupied periods to 50% of zone peak airflow, the minimum outdoor airflow, or rate required to comply with minimum accreditation standards whichever is larger.
**Rule Assertion:** B-RMR = expected value
**Rule Assertion:** B-RMD = expected value
**Appendix G Section:** Section 23 Air-side
**90.1 Section Reference:** Exception to G3.1.3.13 VAV Minimum Flow Set Points (Systems 5 and 7)
**Data Lookup:** None
**Evaluation Context:** Building

**Applicability Checks:**

1. B-RMR is modeled with at least one air-side system that is Type-5 or 7 and serves only lab spaces.
1. B-RMD is modeled with at least one air-side system that is Type-5 or 7 and serves only lab spaces.

**Function Calls:**

Expand All @@ -23,18 +23,20 @@

**Applicability Checks:**
- create a list of the target system types: `APPLICABLE_SYS_TYPES = [HVAC_SYS.SYS_5, HVAC_SYS.SYS_7]`
- Get B-RMR system types: `baseline_hvac_system_dict = get_baseline_system_types(B-RMR)`
- Get B-RMD system types: `baseline_hvac_system_dict = get_baseline_system_types(B-RMD)`
- Get climate zone: `climate_zone_b = ASHRAE229.weather.climate_zone`
- Get is_leap_year: `is_leap_year_b = ASHRAE229.calendar.is_leap_year`

- make a list of hvac system type ids for systems that are one of 5 or 7: `hvac_sys_5_or_7_list = []`
- loop through the applicable system types: `for target_sys_type in APPLICABLE_SYS_TYPES:`
- and loop through the baseline_system_types_dict to check the system types of the baseline systems: `for system_type in baseline_system_types_dict:`
- do baseline_system_type_compare to determine whether the baseline_system_type is the applicable_system_type: `if((baseline_system_type_compare(system_type, target_sys_type, false)):`
- the systems in the list: baseline_system_types_dict[system_type] are either sys-5 or 7, add them to hvac_sys_5_or_7_list: `hvac_sys_5_or_7_list.extend(baseline_system_types_dict[system_type])`
- use the function get_lab_zone_hvac_systems to get a list of systems serving lab zones: `hvac_systems_serving_lab_zones = get_lab_zone_hvac_systems(B-RMR)`
- use the function get_lab_zone_hvac_systems to get a list of systems serving lab zones: `hvac_systems_serving_lab_zones = get_lab_zone_hvac_systems(B-RMD, P-RMD, climate_zone, is_leap_year)`
- we'll iterate through the hvac systems serving labs. hvac_systems_serving_lab_zones has two keys - one indicating "LAB_ZONES_ONLY" and one indicating "LAB_AND_OTHER", because this rule references G3.1.1c, which requires systems to serve only lab zones, we will concern ourselves only with "LAB_ZONES_ONLY": `for hvac_system_id in hvac_systems_serving_lab_zones["LAB_ZONES_ONLY"]:`
- now check if this system is a System 5 or System 7 by looking for the hvac_system_id in hvac_sys_5_or_7_list, it is, the rule is applicable: `if(hvac_system_id in hvac_sys_5_or_7_list): UNDETERMINED`

- Else, rule is not applicable to B-RMR: `else: RULE_NOT_APPLICABLE`
- Else, rule is not applicable to B-RMD: `else: RULE_NOT_APPLICABLE`

**Notes:**

Expand Down
1 change: 1 addition & 0 deletions rct229/rulesets/ashrae9012019/section23/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"section23rule1",
"section23rule2",
"section23rule3",
"section23rule4",
"section23rule6",
"section23rule7",
"section23rule8",
Expand Down
99 changes: 99 additions & 0 deletions rct229/rulesets/ashrae9012019/section23/section23rule4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
from rct229.rule_engine.partial_rule_definition import PartialRuleDefinition
from rct229.rule_engine.rule_list_indexed_base import RuleDefinitionListIndexedBase
from rct229.rule_engine.ruleset_model_factory import produce_ruleset_model_instance
from rct229.rulesets.ashrae9012019 import BASELINE_0, PROPOSED
from rct229.rulesets.ashrae9012019.ruleset_functions.baseline_system_type_compare import (
baseline_system_type_compare,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.baseline_systems.baseline_system_util import (
HVAC_SYS,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_baseline_system_types import (
get_baseline_system_types,
)
from rct229.rulesets.ashrae9012019.ruleset_functions.get_lab_zone_hvac_systems import (
get_lab_zone_hvac_systems,
)

APPLICABLE_SYS_TYPES = [
HVAC_SYS.SYS_5,
HVAC_SYS.SYS_7,
]


class Section23Rule4(RuleDefinitionListIndexedBase):
"""Rule 4 of ASHRAE 90.1-2019 Appendix G Section 23 (Air-side)"""

def __init__(self):
super(Section23Rule4, self).__init__(
rmrs_used=produce_ruleset_model_instance(
USER=False, BASELINE_0=True, PROPOSED=True
),
each_rule=Section23Rule4.RuleSetModelInstanceRule(),
index_rmr=BASELINE_0,
id="23-4",
description="Baseline systems 5 & 7 serving lab spaces per G3.1.1c shall reduce lab exhaust and makeup air during unoccupied periods to 50% of zone peak airflow, the minimum outdoor airflow, or rate required to comply with minimum accreditation standards whichever is larger.",
ruleset_section_title="HVAC - Airside",
standard_section="Exception to G3.1.3.13 VAV Minimum Flow Set Points (Systems 5 and 7)",
is_primary_rule=False,
list_path="ruleset_model_descriptions[0]",
required_fields={
"$": ["calendar", "weather"],
"weather": ["climate_zone"],
"calendar": ["is_leap_year"],
},
data_items={
"climate_zone_b": (BASELINE_0, "weather/climate_zone"),
"is_leap_year_b": (BASELINE_0, "calendar/is_leap_year"),
},
)

class RuleSetModelInstanceRule(PartialRuleDefinition):
def __init__(self):
super(Section23Rule4.RuleSetModelInstanceRule, self).__init__(
rmrs_used=produce_ruleset_model_instance(
USER=False, BASELINE_0=True, PROPOSED=True
),
)

def get_calc_vals(self, context, data=None):
rmd_b = context.BASELINE_0
rmd_p = context.PROPOSED
climate_zone_b = data["climate_zone_b"]
is_leap_year_b = data["is_leap_year_b"]

baseline_system_types_dict = get_baseline_system_types(rmd_b)

hvac_sys_5_or_7_list = [
system_type
for system_type in baseline_system_types_dict
for applicable_sys_type in APPLICABLE_SYS_TYPES
if baseline_system_type_compare(
system_type, applicable_sys_type, False
)
]

hvac_systems_serving_lab_zones = get_lab_zone_hvac_systems(
rmd_b, rmd_p, climate_zone_b, is_leap_year_b
)

return {
"hvac_sys_5_or_7_list": hvac_sys_5_or_7_list,
"hvac_systems_serving_lab_zones": hvac_systems_serving_lab_zones,
}

def applicability_check(self, context, calc_vals, data):
hvac_sys_5_or_7_list = calc_vals["hvac_sys_5_or_7_list"]
hvac_systems_serving_lab_zones = calc_vals[
"hvac_systems_serving_lab_zones"
]

return any(
[
hvac_sys_id
for hvac_sys_id in hvac_systems_serving_lab_zones[
"lab_zones_only"
]
if hvac_sys_id in hvac_sys_5_or_7_list
]
)
Loading
Loading