Tests to incorporate HVAC systems to EP workflow
This commit is contained in:
parent
a3c5219ccd
commit
cfd2586f80
|
@ -55,6 +55,7 @@ class Idf:
|
|||
_LOCATION = 'SITE:LOCATION'
|
||||
_SIMPLE = 'Simple'
|
||||
_EQUIPMENT_CONNECTIONS = 'ZONEHVAC:EQUIPMENTCONNECTIONS'
|
||||
_NODE_LIST = 'NODELIST'
|
||||
|
||||
idf_surfaces = {
|
||||
cte.WALL: 'wall',
|
||||
|
@ -118,7 +119,8 @@ class Idf:
|
|||
if levels_of_detail.construction is None:
|
||||
raise AttributeError('Level of detail of construction not assigned')
|
||||
if levels_of_detail.construction < 2:
|
||||
raise AttributeError(f'Level of detail of construction = {levels_of_detail.construction}. Required minimum level 2')
|
||||
raise AttributeError(
|
||||
f'Level of detail of construction = {levels_of_detail.construction}. Required minimum level 2')
|
||||
if levels_of_detail.usage is None:
|
||||
raise AttributeError('Level of detail of usage not assigned')
|
||||
if levels_of_detail.usage < 2:
|
||||
|
@ -368,6 +370,7 @@ 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(thermal_zone, name)
|
||||
|
||||
def _add_thermostat(self, thermal_zone):
|
||||
thermostat_name = f'Thermostat {thermal_zone.usage_name}'
|
||||
|
@ -382,17 +385,25 @@ class Idf:
|
|||
)
|
||||
|
||||
def _add_heating_system(self, thermal_zone, zone_name):
|
||||
for air_system in self._idf.idfobjects[self._IDEAL_LOAD_AIR_SYSTEM]:
|
||||
for air_system in self._idf.idfobjects[self._EQUIPMENT_CONNECTIONS]:
|
||||
if air_system.Zone_Name == zone_name:
|
||||
return
|
||||
thermostat = self._add_thermostat(thermal_zone)
|
||||
self._idf.newidfobject(self._EQUIPMENT_CONNECTIONS,
|
||||
Zone_Name=zone_name,
|
||||
Zone_Conditioning_Equipment_List_Name=f'{thermal_zone.usage_name} Equipment List',
|
||||
Zone_Air_Inlet_Node_or_NodeList_Name=f'{thermal_zone.usage_name} Inlet Node List',
|
||||
Zone_Conditioning_Equipment_List_Name=f'{zone_name} Equipment List',
|
||||
Zone_Air_Inlet_Node_or_NodeList_Name=f'{zone_name} Inlet Node List',
|
||||
Zone_Air_Node_Name=f'Node 1',
|
||||
Zone_Return_Air_Node_or_NodeList_Name=f'{thermal_zone.usage_name} Return Node List')
|
||||
Zone_Return_Air_Node_or_NodeList_Name=f'{zone_name} Return Node List')
|
||||
|
||||
def _add_nodelist_system(self, thermal_zone, zone_name):
|
||||
self._idf.newidfobject(self._NODE_LIST,
|
||||
Name=f'{zone_name} Inlet Node List',
|
||||
Node_Name='Node 2')
|
||||
|
||||
self._idf.newidfobject(self._NODE_LIST,
|
||||
Name=f'{zone_name} Return Node List',
|
||||
Node_Name='Node 3')
|
||||
|
||||
def _add_occupancy(self, thermal_zone, zone_name):
|
||||
number_of_people = thermal_zone.occupancy.occupancy_density * thermal_zone.total_floor_area
|
||||
|
@ -554,6 +565,7 @@ class Idf:
|
|||
self._add_schedules(usage, 'Activity Level', _new_schedules)
|
||||
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_infiltration(thermal_zone, building.name)
|
||||
self._add_ventilation(thermal_zone, building.name)
|
||||
self._add_occupancy(thermal_zone, building.name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user