/
LB PMV Comfort Parameters.py
57 lines (50 loc) 路 2.29 KB
/
LB PMV Comfort Parameters.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
# Ladybug: A Plugin for Environmental Analysis (GPL)
# This file is part of Ladybug.
#
# Copyright (c) 2024, Ladybug Tools.
# You should have received a copy of the GNU Affero General Public License
# along with Ladybug; If not, see <http://www.gnu.org/licenses/>.
#
# @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>
"""
Create a set of parameters that define the acceptable conditions of the
Predicted Mean Vote (PMV) thermal comfort model.
-
These parameters can be plugged into any of the components that compute
PMV thermal comfort.
-
Args:
_ppd_thresh_: A number between 5 and 100 that represents the upper
threshold of PPD that is considered acceptable.
Default is 10, which charcterizes most buildings in the
ASHRAE-55 and EN-15251 standards.
_hr_upper_: A number between 0 and 1 indicating the upper limit of
humidity ratio that is considered acceptable.
Default is 1 for essentially no limit.
_hr_lower_: A number between 0 and 1 indicating the lower limit of
humidity ratio considered acceptable.
Default is 0 for essentially no limit.
_still_air_thresh_: The air speed threshold in m/s at which the standard
effective temperature (SET) model will be used to correct for the
cooling effect of elevated air speeds.
Default is 0.1 m/s, which is the limit according to ASHRAE-55.
Returns:
pmv_par: A PMV comfort parameter object that can be plugged into
any of the components that compute PMV thermal comfort.
"""
ghenv.Component.Name = 'LB PMV Comfort Parameters'
ghenv.Component.NickName = 'PMVPar'
ghenv.Component.Message = '1.8.0'
ghenv.Component.Category = 'Ladybug'
ghenv.Component.SubCategory = '4 :: Extra'
ghenv.Component.AdditionalHelpFromDocStrings = '4'
try:
from ladybug_comfort.parameter.pmv import PMVParameter
except ImportError as e:
raise ImportError('\nFailed to import ladybug_comfort:\n\t{}'.format(e))
try:
from ladybug_rhino.grasshopper import turn_off_old_tag
except ImportError as e:
raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
turn_off_old_tag(ghenv.Component)
pmv_par = PMVParameter(_ppd_thresh_, _hr_upper_, _hr_lower_, _still_air_thresh_)