Skip to content

Commit ed4d02b

Browse files
committed
UPDATE 23-1 based on modification in #1434
1 parent c4f2d81 commit ed4d02b

File tree

1 file changed

+26
-66
lines changed

1 file changed

+26
-66
lines changed

rct229/rulesets/ashrae9012019/section23/section23rule1.py

Lines changed: 26 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
get_baseline_system_types,
1313
)
1414
from rct229.schema.config import ureg
15+
from rct229.schema.schema_enums import SchemaEnums
1516
from rct229.utils.assertions import getattr_
1617
from rct229.utils.pint_utils import CalcQ
1718

@@ -20,9 +21,10 @@
2021
HVAC_SYS.SYS_4,
2122
]
2223

23-
HEATPUMP_LOW_SHUTOFF_LOWER = 17 * ureg("F")
24-
HEATPUMP_LOW_SHUTOFF_HIGH = 25 * ureg("F")
25-
HEATPUMP_LOW_SHUTOFF_LOWER_SYS4 = 10 * ureg("F")
24+
HEATPUMP_AUX_HEAT_HIGH_SHUTOFF_THRESHOLD = 40 * ureg("F")
25+
HeatpumpAuxilliaryHeatOptions = SchemaEnums.schema_enums[
26+
"HeatpumpAuxilliaryHeatOptions"
27+
]
2628

2729

2830
class Section23Rule1(RuleDefinitionListIndexedBase):
@@ -36,7 +38,7 @@ def __init__(self):
3638
each_rule=Section23Rule1.HVACRule(),
3739
index_rmd=BASELINE_0,
3840
id="23-1",
39-
description="System 2 and 4 - Electric air-source heat pumps shall be modeled with electric auxiliary heat and an outdoor air thermostat. The systems shall be controlled to energize auxiliary heat only when the outdoor air temperature is less than 40°F. The air-source heat pump shall be modeled to continue to operate while auxiliary heat is energized.",
41+
description="System 2 and 4 - Electric air-source heat pumps shall be modeled with electric auxiliary heat and an outdoor air thermostat. The systems shall be controlled to energize auxiliary heat only when the outdoor air temperature is less than 40°F.",
4042
ruleset_section_title="HVAC - Airside",
4143
standard_section="G3.1.3.1 Heat Pumps (Systems 2 and 4)",
4244
is_primary_rule=True,
@@ -91,7 +93,7 @@ def __init__(self):
9193
"$": ["heating_system"],
9294
},
9395
precision={
94-
"heatpump_low_shutoff_b": {
96+
"heatpump_auxilliary_heat_high_shutoff_temperature": {
9597
"precision": 0.1,
9698
"unit": "K",
9799
},
@@ -103,74 +105,32 @@ def get_calc_vals(self, context, data=None):
103105
baseline_system_types_dict = data["baseline_system_types_dict"]
104106

105107
heating_system_b = hvac_b["heating_system"]
106-
heatpump_low_shutoff_b = getattr_(
107-
heating_system_b, "HeatingSystem", "heatpump_low_shutoff_temperature"
108+
heatpump_aux_high_temp_shutoff = getattr_(
109+
heating_system_b,
110+
"HeatingSystem",
111+
"heatpump_auxilliary_heat_high_shutoff_temperature",
108112
)
109-
110-
hvac_type_b = next(
111-
(
112-
key
113-
for key, values in baseline_system_types_dict.items()
114-
if hvac_b["id"] in values
115-
),
116-
None,
113+
heatpump_aux_heat_energy_source = getattr_(
114+
heating_system_b, "HeatingSystem", "heatpump_auxilliary_heat_type"
117115
)
118116
return {
119-
"heatpump_low_shutoff_temperature": CalcQ(
120-
"temperature", heatpump_low_shutoff_b
117+
"heatpump_aux_high_temp_shutoff": CalcQ(
118+
"temperature", heatpump_aux_high_temp_shutoff
121119
),
122-
"hvac_type": hvac_type_b,
120+
"heatpump_aux_heat_energy_source": heatpump_aux_heat_energy_source,
123121
}
124122

125-
def manual_check_required(self, context, calc_vals=None, data=None):
126-
heatpump_low_shutoff_b = calc_vals["heatpump_low_shutoff_temperature"]
127-
hvac_type_b = calc_vals["hvac_type"]
128-
129-
return (
130-
hvac_type_b == HVAC_SYS.SYS_2
131-
and HEATPUMP_LOW_SHUTOFF_LOWER
132-
< heatpump_low_shutoff_b
133-
<= HEATPUMP_LOW_SHUTOFF_HIGH
134-
)
135-
136-
def get_manual_check_required_msg(self, context, calc_vals=None, data=None):
137-
heatpump_low_shutoff_b = calc_vals["heatpump_low_shutoff_temperature"]
138-
139-
return (
140-
f"Undetermined because the low temperature shutoff is between 17F and 25F for System Type 2. "
141-
f"Check with the rating authority to ensure correct shutoff temperature. Low shutoff temperature "
142-
f"is currently modeled at: {heatpump_low_shutoff_b}."
143-
)
144-
145123
def rule_check(self, context, calc_vals=None, data=None):
146-
heatpump_low_shutoff_b = calc_vals["heatpump_low_shutoff_temperature"].to(
147-
ureg.kelvin
148-
)
149-
hvac_type_b = calc_vals["hvac_type"]
150-
151-
return (
152-
hvac_type_b == HVAC_SYS.SYS_2
153-
and (
154-
heatpump_low_shutoff_b < HEATPUMP_LOW_SHUTOFF_LOWER
155-
or self.precision_comparison["heatpump_low_shutoff_b"](
156-
heatpump_low_shutoff_b,
157-
HEATPUMP_LOW_SHUTOFF_LOWER.to(ureg.kelvin),
158-
)
159-
)
160-
) or (
161-
hvac_type_b == HVAC_SYS.SYS_4
162-
and (
163-
heatpump_low_shutoff_b < HEATPUMP_LOW_SHUTOFF_LOWER_SYS4
164-
or self.precision_comparison["heatpump_low_shutoff_b"](
165-
heatpump_low_shutoff_b,
166-
HEATPUMP_LOW_SHUTOFF_LOWER_SYS4.to(ureg.kelvin),
167-
)
168-
)
169-
)
124+
heatpump_aux_high_temp_shutoff = calc_vals[
125+
"heatpump_aux_high_temp_shutoff"
126+
].to(ureg.kelvin)
127+
heatpump_aux_heat_energy_source = calc_vals[
128+
"heatpump_aux_heat_energy_source"
129+
]
170130

171-
def get_fail_msg(self, context, calc_vals=None, data=None):
172-
heatpump_low_shutoff_b = calc_vals["heatpump_low_shutoff_temperature"]
173131
return (
174-
f"Fail because low temperature heat pump shutoff is above 25F for system 2. The modeled low "
175-
f"temperature heat pump shutoff value is {heatpump_low_shutoff_b}. "
132+
heatpump_aux_high_temp_shutoff
133+
<= HEATPUMP_AUX_HEAT_HIGH_SHUTOFF_THRESHOLD
134+
and heatpump_aux_heat_energy_source
135+
== HeatpumpAuxilliaryHeatOptions.ELECTRIC_RESISTANCE
176136
)

0 commit comments

Comments
 (0)