-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathG36ReturnAirDamperPositionForReturnFanAirflowTracking.py
71 lines (60 loc) · 1.44 KB
/
G36ReturnAirDamperPositionForReturnFanAirflowTracking.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
"""
G36 2021
### Description
Section 5.16.2.3
### Verification Logic
```
if heating_output > 0
if abs(ra_p - max_ra_p) < ra_p_tol
pass
else
fail
end
else if cooling_output > 0
if abs(ra_p - 0) < ra_p_tol
pass
else
fail
end
else if abs(ra_p - (1 - rea_p) * max_ra_p) < ra_p_tol
pass
else
fail
end
```
"""
from constrain.checklib import RuleCheckBase
class G36ReturnAirDamperPositionForReturnFanAirflowTracking(RuleCheckBase):
points = [
"heating_output",
"cooling_output",
"ra_p",
"max_ra_p",
"ra_p_tol",
"rea_p",
]
def return_air_damper(self, data):
if data["heating_output"] > 0:
if abs(data["ra_p"] - data["max_ra_p"]) < data["ra_p_tol"]:
return True
else:
return False
elif data["cooling_output"] > 0:
if data["ra_p"] < data["ra_p_tol"]:
return True
else:
return False
elif (
abs(data["ra_p"] - (1 - data["rea_p"]) * data["max_ra_p"])
< data["ra_p_tol"]
):
return True
else:
return False
def verify(self):
self.result = self.df.apply(lambda d: self.return_air_damper(d), axis=1)
def check_bool(self):
if len(self.result[self.result == False] > 0):
return False
else:
return True