From ac6b02308055720ca905d80cb24df8584b0aaae2 Mon Sep 17 00:00:00 2001 From: jgavalda Date: Fri, 17 Nov 2023 08:55:37 -0500 Subject: [PATCH] Air terminal working, air distribution not yet --- hub/exports/building_energy/idf.py | 31 +++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/hub/exports/building_energy/idf.py b/hub/exports/building_energy/idf.py index 3def6344..81af47bf 100644 --- a/hub/exports/building_energy/idf.py +++ b/hub/exports/building_energy/idf.py @@ -56,6 +56,9 @@ class Idf: _SIMPLE = 'Simple' _EQUIPMENT_CONNECTIONS = 'ZONEHVAC:EQUIPMENTCONNECTIONS' _NODE_LIST = 'NODELIST' + _BASEBOARD ='ZONEHVAC:BASEBOARD:CONVECTIVE:ELECTRIC' + _AIR_TERMINAL_NO_REHEAT= 'AIRTERMINAL:SINGLEDUCT:CONSTANTVOLUME:NOREHEAT' + _AIR_DISTRIBUTION='ZONEHVAC:AIRDISTRIBUTIONUNIT' idf_surfaces = { cte.WALL: 'wall', @@ -370,7 +373,6 @@ class Idf: return self._idf.newidfobject(self._ZONE, Name=name, Volume=thermal_zone.volume) self._add_heating_system(thermal_zone, name) - #self._add_nodelist_system (name) def _add_thermostat(self, thermal_zone): thermostat_name = f'Thermostat {thermal_zone.usage_name}' @@ -402,6 +404,30 @@ class Idf: Name=f'{zone_name} Return Node List', Node_1_Name='Node 3') + def _add_baseboard_system(self, thermal_zone, zone_name): + for baseboard in self._idf.idfobjects[self._BASEBOARD]: + if baseboard.Zone_Name == zone_name: + return + self._idf.newidfobject(self._BASEBOARD, Name=f'Elec Baseboard',Availability_Schedule_Name='HVAC AVAIL') + + def _add_air_terminal_system(self, thermal_zone, zone_name): + """for air_terminal in self._idf.idfobjects[self._AIR_TERMINAL_NO_REHEAT]: + if air_terminal.Zone_Name == zone_name: + return""" + self._idf.newidfobject(self._AIR_TERMINAL_NO_REHEAT, Name=f'Diffuser', + Availability_Schedule_Name='HVAC AVAIL', + Air_Inlet_Node_Name='Node 4', + Air_Outlet_Node_Name='Node 2') + + + def _add_air_distribution_system(self, thermal_zone, zone_name): + """for air_distribution in self._idf.idfobjects[self._AIR_DISTRIBUTION]: + if air_distribution.Zone_Name == zone_name: + return""" + self._idf.newidfobject(self._AIR_DISTRIBUTION, + Air_Distribution_Outlet_Node_Name='Node 2', + Air_Terminal_Name=f'Diffuser', + Air_Terminal_Object_Type='AirTerminal:SingleDuct:ConstantVolume:NoReheat') def _add_occupancy(self, thermal_zone, zone_name): number_of_people = thermal_zone.occupancy.occupancy_density * thermal_zone.total_floor_area fraction_radiant = 0 @@ -563,6 +589,9 @@ class Idf: self._add_zone(thermal_zone, building.name) self._add_heating_system(thermal_zone, building.name) self._add_nodelist_system(thermal_zone,building.name) + self._add_baseboard_system(thermal_zone, building.name) + self._add_air_terminal_system(thermal_zone, building.name) + self._add_air_distribution_system(thermal_zone, building.name) self._add_infiltration(thermal_zone, building.name) self._add_ventilation(thermal_zone, building.name) self._add_occupancy(thermal_zone, building.name)