Skip to content

Commit

Permalink
feature(exhaust): Add Exhaust Ventilation
Browse files Browse the repository at this point in the history
Add Exhaust Ventilation (Kitchen hoods, etc)
  • Loading branch information
ed-p-may committed Jan 12, 2023
1 parent d52a6d3 commit 04193d1
Show file tree
Hide file tree
Showing 18 changed files with 878 additions and 294 deletions.
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pytest
coverage
coverage
black
Binary file modified hbph_installer.gh
Binary file not shown.
79 changes: 79 additions & 0 deletions honeybee_grasshopper_ph/src/HBPH - Add Exhaust Ventilator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#
# Honeybee-PH: A Plugin for adding Passive-House data to LadybugTools Honeybee-Energy Models
#
# This component is part of the PH-Tools toolkit <https://github.com/PH-Tools>.
#
# Copyright (c) 2022, PH-Tools and bldgtyp, llc <[email protected]>
# Honeybee-PH is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
#
# Honeybee-PH is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# For a copy of the GNU General Public License
# see <https://github.com/PH-Tools/honeybee_ph/blob/main/LICENSE>.
#
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
#
"""
Add one or more Exhaust Ventilator devices to the Honeybee-Rooms. This is used
mainly for WUFI-Passive which has a separate input for dedicated exhaust equipment
such as that used for Kitchens, Dryers and other typical uses.
-
EM January 3, 2023
Args:
_exhaust_vent_devices: (List[_ExhaustVentilatorBase]) A list of the Exhaust
Ventilator objects that you would like to add to the Honeybee-rooms.
_hb_rooms: (List[room.Room]): A list of the rooms to add the Exhaust Ventilator
to. Note that each ventilator created will only show up once in the
WUFI-model. If you want more than one fan, you should create more than
one and add them to the approproate rooms.
Returns:
hb_rooms_: The Honeybee rooms with the new Exhaust Ventilators added.
"""

import scriptcontext as sc
import Rhino as rh
import rhinoscriptsyntax as rs
import ghpythonlib.components as ghc
import Grasshopper as gh


try:
from honeybee_ph_utils import preview
except ImportError as e:
raise ImportError('Failed to import honeybee_ph_utils:\t{}'.format(e))

try:
from honeybee_ph_rhino import gh_compo_io, gh_io
except ImportError as e:
raise ImportError('Failed to import honeybee_ph_rhino:\t{}'.format(e))


# -------------------------------------------------------------------------------------
import honeybee_ph_rhino._component_info_
reload(honeybee_ph_rhino._component_info_)
ghenv.Component.Name = "HBPH - Add Exhaust Ventilator"
DEV = honeybee_ph_rhino._component_info_.set_component_params(ghenv, dev=False)
if DEV:
reload(gh_compo_io)
reload(gh_io)
from honeybee_ph_rhino.gh_compo_io import ghio_validators
reload(ghio_validators)
from honeybee_ph_rhino.gh_compo_io import mech_add_exhaust_vent as gh_compo_io
reload(gh_compo_io)

# ------------------------------------------------------------------------------
# -- GH Interface
IGH = gh_io.IGH( ghdoc, ghenv, sc, rh, rs, ghc, gh )


# -------------------------------------------------------------------------------------
gh_compo_interface = gh_compo_io.GHCompo_AddExhaustVent(IGH, _exhaust_vent_devices, _hb_rooms)
hb_rooms_ = gh_compo_interface.run()
92 changes: 92 additions & 0 deletions honeybee_grasshopper_ph/src/HBPH - Create Exhaust Ventilator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#
# Honeybee-PH: A Plugin for adding Passive-House data to LadybugTools Honeybee-Energy Models
#
# This component is part of the PH-Tools toolkit <https://github.com/PH-Tools>.
#
# Copyright (c) 2022, PH-Tools and bldgtyp, llc <[email protected]>
# Honeybee-PH is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
#
# Honeybee-PH is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# For a copy of the GNU General Public License
# see <https://github.com/PH-Tools/honeybee_ph/blob/main/LICENSE>.
#
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
#
"""
Create a new HBPH Exhaust Ventilator for use in WUFI-Passive models. This device
can be added to one or more rooms using the "HBPH - Add Exhaust Ventilator" component
in order to simulate the effect of direct exhaust ventilation without heat-recovery.
This is useful for devices such as direct-vent dryers, kitchen hoods or other elements.
-
EM January 3, 2023
Args:
_name: (str) Name for the new HBPH Exhaust Ventilator
_type: (str) The type of device. Input either -
- "1-Dryer"
- "2-Kitchen Hood"
- "3-User Defined"
_flow_rate_m3s: (float) The total m3/s of airflow from the exhaust
ventilation device.
_annual_runtime_minutes: (float) Optional. If device type is 'User Defined'
input the annual runtime (minutes).
Returns:
exhaust_vent_device_: An HBPH Exhaust Ventilator object which can be
added to one or more honeybee-rooms.
"""

import scriptcontext as sc
import Rhino as rh
import rhinoscriptsyntax as rs
import ghpythonlib.components as ghc
import Grasshopper as gh


try:
from honeybee_ph_utils import preview
except ImportError as e:
raise ImportError('Failed to import honeybee_ph_utils:\t{}'.format(e))

try:
from honeybee_ph_rhino import gh_compo_io, gh_io
except ImportError as e:
raise ImportError('Failed to import honeybee_ph_rhino:\t{}'.format(e))


# -------------------------------------------------------------------------------------
import honeybee_ph_rhino._component_info_
reload(honeybee_ph_rhino._component_info_)
ghenv.Component.Name = "HBPH - Create Exhaust Ventilator"
DEV = honeybee_ph_rhino._component_info_.set_component_params(ghenv, dev=False)
if DEV:
from honeybee_energy_ph.hvac import ventilation
reload(ventilation)
reload(gh_compo_io)
reload(gh_io)
from honeybee_ph_rhino.gh_compo_io import ghio_validators
reload(ghio_validators)
from honeybee_ph_rhino.gh_compo_io import mech_create_exhaust_vent as gh_compo_io
reload(gh_compo_io)

# ------------------------------------------------------------------------------
# -- GH Interface
IGH = gh_io.IGH( ghdoc, ghenv, sc, rh, rs, ghc, gh )


# -------------------------------------------------------------------------------------
gh_compo_interface = gh_compo_io.GHCompo_CreateExhaustVent(
IGH, _name, _type, _flow_rate_m3s, _annual_runtime_minutes)
exhaust_vent_device_ = gh_compo_interface.run()

# -------------------------------------------------------------------------------------
preview.object_preview(exhaust_vent_device_)
Binary file not shown.
Binary file not shown.
Binary file not shown.
63 changes: 38 additions & 25 deletions honeybee_ph_rhino/_component_info_.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
These are called when the component is instantiated within the Grasshopper canvas.
"""

RELEASE_VERSION = "Honeybee-PH v1.0"
RELEASE_VERSION = "Honeybee-PH v1.0.1"
CATEGORY = "HB-PH"
SUB_CATEGORIES = {
0: "00 | Utils",
Expand Down Expand Up @@ -169,63 +169,77 @@
"Category": CATEGORY,
"SubCategory": 1,
},
# --
"HBPH - Create PH Equipment": {
"NickName": "Create PH Equipment",
# -- HVAC
"HBPH - Create Exhaust Ventilator": {
"NickName": "Create Exhaust Ventilator",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Add PH Equipment": {
"NickName": "Add PH Equipment",
"HBPH - Add Exhaust Ventilator": {
"NickName": "Create Exhaust Ventilator",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Set Res Occupancy": {
"NickName": "Set Res Occupancy",
"HBPH - Add Mech Systems": {
"NickName": "Add Mech",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Phius MF Res Calculator": {
"NickName": "Phius MF Res Calc",
"HBPH - Create Heating System": {
"NickName": "Create Heating",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Phius Program Finder": {
"NickName": "Phius Programs",
"HBPH - Create Cooling System": {
"NickName": "Create Cooling",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Create Conversion Factor": {
"NickName": "Factor",
"HBPH - Create Ventilation System": {
"NickName": "Create Vent",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Add Mech Systems": {
"NickName": "Add Mech",
# -- Elec Equipment
"HBPH - Create PH Equipment": {
"NickName": "Create PH Equipment",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Create Heating System": {
"NickName": "Create Heating",
"HBPH - Add PH Equipment": {
"NickName": "Add PH Equipment",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Create Cooling System": {
"NickName": "Create Cooling",
# --
"HBPH - Set Res Occupancy": {
"NickName": "Set Res Occupancy",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Create Ventilation System": {
"NickName": "Create Vent",
"HBPH - Phius MF Res Calculator": {
"NickName": "Phius MF Res Calc",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Phius Program Finder": {
"NickName": "Phius Programs",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
},
"HBPH - Create Conversion Factor": {
"NickName": "Factor",
"Message": RELEASE_VERSION,
"Category": CATEGORY,
"SubCategory": 1,
Expand Down Expand Up @@ -364,8 +378,7 @@

class ComponentNameError(Exception):
def __init__(self, _name, error):
self.message = 'Error: Cannot get Component Params for: "{}"'.format(
_name)
self.message = 'Error: Cannot get Component Params for: "{}"'.format(_name)
print(error)
super(ComponentNameError, self).__init__(self.message)

Expand Down Expand Up @@ -408,4 +421,4 @@ def set_component_params(ghenv, dev=False):
ghenv.Component.SubCategory = sub_cat_name
ghenv.Component.IconDisplayMode = ghenv.Component.IconDisplayMode.application

return dev
return dev
2 changes: 2 additions & 0 deletions honeybee_ph_rhino/gh_compo_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
from honeybee_ph_rhino.gh_compo_io.mech_create_heating_sys import GHCompo_CreateHeatingSystem
from honeybee_ph_rhino.gh_compo_io.mech_create_cooling_sys import GHCompo_CreateCoolingSystem
from honeybee_ph_rhino.gh_compo_io.mech_add_mech_systems import GHCompo_AddMechSystems
from honeybee_ph_rhino.gh_compo_io.mech_create_exhaust_vent import GHCompo_CreateExhaustVent
from honeybee_ph_rhino.gh_compo_io.mech_add_exhaust_vent import GHCompo_AddExhaustVent
# -- Program [Schedule / Load]
from honeybee_ph_rhino.gh_compo_io.prog_add_elec_equip import GHCompo_AddElecEquip
from honeybee_ph_rhino.gh_compo_io.prog_create_elec_equip import GHCompo_CreateElecEquip
Expand Down
Loading

0 comments on commit 04193d1

Please sign in to comment.