From 227685695ad6a3c5bcc83bad77d3d10612a0563b Mon Sep 17 00:00:00 2001 From: jgavalda Date: Fri, 17 Nov 2023 15:08:57 -0500 Subject: [PATCH] All working, missing Sizing:Zone and DesignSpecification:OutdoorAir --- hub/exports/building_energy/idf.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/hub/exports/building_energy/idf.py b/hub/exports/building_energy/idf.py index 81af47bf..f35f55a3 100644 --- a/hub/exports/building_energy/idf.py +++ b/hub/exports/building_energy/idf.py @@ -59,6 +59,7 @@ class Idf: _BASEBOARD ='ZONEHVAC:BASEBOARD:CONVECTIVE:ELECTRIC' _AIR_TERMINAL_NO_REHEAT= 'AIRTERMINAL:SINGLEDUCT:CONSTANTVOLUME:NOREHEAT' _AIR_DISTRIBUTION='ZONEHVAC:AIRDISTRIBUTIONUNIT' + _EQUIPMENT_LIST='ZONEHVAC:EQUIPMENTLIST' idf_surfaces = { cte.WALL: 'wall', @@ -421,13 +422,26 @@ class Idf: def _add_air_distribution_system(self, thermal_zone, zone_name): - """for air_distribution in self._idf.idfobjects[self._AIR_DISTRIBUTION]: + for air_distribution in self._idf.idfobjects[self._AIR_DISTRIBUTION]: if air_distribution.Zone_Name == zone_name: - return""" + 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') + Name='ADU Diffuser', + Air_Distribution_Unit_Outlet_Node_Name='Node 2', + Air_Terminal_Object_Type='AirTerminal:SingleDuct:ConstantVolume:NoReheat', + Air_Terminal_Name='Diffuser') + def _add_equipment_list_system(self, thermal_zone, zone_name): + for air_distribution in self._idf.idfobjects[self._EQUIPMENT_LIST]: + if air_distribution.Zone_Name == zone_name: + return + self._idf.newidfobject(self._EQUIPMENT_LIST, + Name=f'{zone_name} Equipment List', + Load_Distribution_Scheme='SequentialLoad', + Zone_Equipment_1_Object_Type='ZoneHVAC:Baseboard:Convective:Electric', + Zone_Equipment_1_Name='Elec Baseboard', + Zone_Equipment_1_Heating_or_NoLoad_Sequence='1', + Zone_Equipment_2_Object_Type='ZoneHVAC:AirDistributionUnit', + Zone_Equipment_2_Name ='ADU Diffuser') def _add_occupancy(self, thermal_zone, zone_name): number_of_people = thermal_zone.occupancy.occupancy_density * thermal_zone.total_floor_area fraction_radiant = 0 @@ -592,6 +606,7 @@ class Idf: 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_equipment_list_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)