Skip to content

Commit

Permalink
fix(hvac): Remove unused minimum operation time
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed May 24, 2024
1 parent e6fbfcd commit 687e499
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
Binary file modified honeybee_grasshopper_energy/icon/HB Radiant HVAC Properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 2 additions & 9 deletions honeybee_grasshopper_energy/json/HB_Radiant_HVAC_Properties.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.0",
"version": "1.8.1",
"nickname": "RadiantHVAC",
"outputs": [
[
Expand Down Expand Up @@ -27,13 +27,6 @@
"type": "string",
"default": null
},
{
"access": "item",
"name": "min_op_time_",
"description": "A number for the minimum number of hours of operation\nfor the radiant system before it shuts off. (Default: 1).",
"type": "double",
"default": null
},
{
"access": "item",
"name": "switch_time_",
Expand All @@ -43,7 +36,7 @@
}
],
"subcategory": "4 :: HVAC",
"code": "\ntry: # import the honeybee extension\n from honeybee.model import Model\n from honeybee.room import Room\nexcept ImportError as e:\n raise ImportError('\\nFailed to import honeybee:\\n\\t{}'.format(e))\n\ntry: # import the honeybee-energy extension\n from honeybee_energy.hvac.doas.radiant import RadiantwithDOAS\n from honeybee_energy.hvac.heatcool.radiant import Radiant\nexcept ImportError as e:\n raise ImportError('\\nFailed to import honeybee_energy:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs, give_warning\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\nif all_required_inputs(ghenv.Component):\n # extract any rooms from input Models and duplicate the rooms\n rooms = []\n for hb_obj in _rooms:\n if isinstance(hb_obj, Model):\n rooms.extend([room.duplicate() for room in hb_obj.rooms])\n elif isinstance(hb_obj, Room):\n rooms.append(hb_obj.duplicate())\n else:\n raise ValueError(\n 'Expected Honeybee Room or Model. Got {}.'.format(type(hb_obj)))\n\n # collect all of the rooms with radiant systems assigned to them\n rad_hvac_dict = {}\n for room in rooms:\n r_hvac = room.properties.energy.hvac\n if isinstance(r_hvac, (RadiantwithDOAS, Radiant)):\n try:\n rad_hvac_dict[r_hvac.identifier].append(room)\n except KeyError:\n rad_hvac_dict[r_hvac.identifier] = [room]\n\n # adjust the properties of each radiant HVAC that was found\n for r_hvac_rooms in rad_hvac_dict.values():\n new_r_hvac = r_hvac_rooms[0].properties.energy.hvac.duplicate()\n if min_op_time_:\n new_r_hvac.minimum_operation_time = min_op_time_\n if switch_time_:\n new_r_hvac.switch_over_time = switch_time_\n if radiant_type_:\n new_r_hvac.radiant_type = radiant_type_\n for new_r in r_hvac_rooms:\n new_r.properties.energy.hvac = new_r_hvac\n\n # raise a warning if no rooms with a radiant HVAC were found\n if len(rad_hvac_dict) == 0:\n msg = 'No Rooms with a Radiant HVAC were found among the connected _rooms.\\n' \\\n 'Make sure that a Radiant HVAC has been assigned with either the\\n' \\\n '\"HB DOAS HVAC\" or \"HB HeatCool HVAC\" component.'\n print(msg)\n give_warning(ghenv.Component, msg)\n",
"code": "\ntry: # import the honeybee extension\n from honeybee.model import Model\n from honeybee.room import Room\nexcept ImportError as e:\n raise ImportError('\\nFailed to import honeybee:\\n\\t{}'.format(e))\n\ntry: # import the honeybee-energy extension\n from honeybee_energy.hvac.doas.radiant import RadiantwithDOAS\n from honeybee_energy.hvac.heatcool.radiant import Radiant\nexcept ImportError as e:\n raise ImportError('\\nFailed to import honeybee_energy:\\n\\t{}'.format(e))\n\ntry:\n from ladybug_{{cad}}.{{plugin}} import all_required_inputs, give_warning\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\n\n\nif all_required_inputs(ghenv.Component):\n # extract any rooms from input Models and duplicate the rooms\n rooms = []\n for hb_obj in _rooms:\n if isinstance(hb_obj, Model):\n rooms.extend([room.duplicate() for room in hb_obj.rooms])\n elif isinstance(hb_obj, Room):\n rooms.append(hb_obj.duplicate())\n else:\n raise ValueError(\n 'Expected Honeybee Room or Model. Got {}.'.format(type(hb_obj)))\n\n # collect all of the rooms with radiant systems assigned to them\n rad_hvac_dict = {}\n for room in rooms:\n r_hvac = room.properties.energy.hvac\n if isinstance(r_hvac, (RadiantwithDOAS, Radiant)):\n try:\n rad_hvac_dict[r_hvac.identifier].append(room)\n except KeyError:\n rad_hvac_dict[r_hvac.identifier] = [room]\n\n # adjust the properties of each radiant HVAC that was found\n for r_hvac_rooms in rad_hvac_dict.values():\n new_r_hvac = r_hvac_rooms[0].properties.energy.hvac.duplicate()\n if switch_time_:\n new_r_hvac.switch_over_time = switch_time_\n if radiant_type_:\n new_r_hvac.radiant_type = radiant_type_\n for new_r in r_hvac_rooms:\n new_r.properties.energy.hvac = new_r_hvac\n\n # raise a warning if no rooms with a radiant HVAC were found\n if len(rad_hvac_dict) == 0:\n msg = 'No Rooms with a Radiant HVAC were found among the connected _rooms.\\n' \\\n 'Make sure that a Radiant HVAC has been assigned with either the\\n' \\\n '\"HB DOAS HVAC\" or \"HB HeatCool HVAC\" component.'\n print(msg)\n give_warning(ghenv.Component, msg)\n",
"category": "HB-Energy",
"name": "HB Radiant HVAC Properties",
"description": "Adjust the properties of a Radiant HVAC that has been assigned to Honeybee Rooms.\n_\nBecause Radiant HVAC systems interact with the conditioned rooms through the\nthermal mass of the constructions in which they are embedded, their design\noften requires\n-"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* FloorWithCarpet
* CeilingMetalPanel
* FloorWithHardwood
min_op_time_: A number for the minimum number of hours of operation
for the radiant system before it shuts off. (Default: 1).
switch_time_: A number for the minimum number of hours for when the system
can switch between heating and cooling. (Default: 24).
Expand All @@ -39,7 +37,7 @@

ghenv.Component.Name = 'HB Radiant HVAC Properties'
ghenv.Component.NickName = 'RadiantHVAC'
ghenv.Component.Message = '1.8.0'
ghenv.Component.Message = '1.8.1'
ghenv.Component.Category = 'HB-Energy'
ghenv.Component.SubCategory = '4 :: HVAC'
ghenv.Component.AdditionalHelpFromDocStrings = '0'
Expand Down Expand Up @@ -87,8 +85,6 @@
# adjust the properties of each radiant HVAC that was found
for r_hvac_rooms in rad_hvac_dict.values():
new_r_hvac = r_hvac_rooms[0].properties.energy.hvac.duplicate()
if min_op_time_:
new_r_hvac.minimum_operation_time = min_op_time_
if switch_time_:
new_r_hvac.switch_over_time = switch_time_
if radiant_type_:
Expand Down
Binary file not shown.

0 comments on commit 687e499

Please sign in to comment.