From bc0c1fc0f37dc2630a09e38060f80a2bf63b3340 Mon Sep 17 00:00:00 2001 From: jgavalda Date: Fri, 31 Mar 2023 12:25:13 -0400 Subject: [PATCH] Revision of infiltration parameters --- hub/exports/building_energy/idf.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/hub/exports/building_energy/idf.py b/hub/exports/building_energy/idf.py index 6e44d104..1feb6185 100644 --- a/hub/exports/building_energy/idf.py +++ b/hub/exports/building_energy/idf.py @@ -188,6 +188,7 @@ class Idf: _schedule.Minutes_per_Item = 60 def _add_infiltration_schedules(self, thermal_zone): + #todo: clean the way infiltration is hardcoded _infiltration_schedules = [] if thermal_zone.thermal_control is None: return @@ -201,9 +202,9 @@ class Idf: _infiltration_values = [] for hvac_value in hvac_availability_schedule.values: if hvac_value == 0: - _infiltration_values.append(thermal_zone.infiltration_rate_system_off) + _infiltration_values.append(1) else: - _infiltration_values.append(thermal_zone.infiltration_rate_system_on) + _infiltration_values.append(1) _schedule.values = _infiltration_values _infiltration_schedules.append(_schedule) for schedule in self._idf.idfobjects[self._HOURLY_SCHEDULE]: @@ -377,7 +378,7 @@ class Idf: # print(vars(_object)) self._idf.newidfobject(self._APPLIANCES, Fuel_Type=fuel_type, - Name=f'{zone_name}_appliances', + Name=f'{zone_name}_appliance', Zone_or_ZoneList_Name=zone_name, Schedule_Name=f'Appliance schedules {thermal_zone.usage_name}', Design_Level_Calculation_Method=method, @@ -399,7 +400,7 @@ class Idf: Zone_or_ZoneList_Name=zone_name, Schedule_Name=schedule, Design_Flow_Rate_Calculation_Method='AirChanges/Hour', - Air_Changes_per_Hour=thermal_zone.mechanical_air_change + Air_Changes_per_Hour=thermal_zone.infiltration_rate_system_off ) def _rename_building(self, city_name): @@ -449,7 +450,7 @@ class Idf: self._add_schedules(usage, 'Heating thermostat', thermal_zone.thermal_control.heating_set_point_schedules) self._add_schedules(usage, 'Cooling thermostat', thermal_zone.thermal_control.cooling_set_point_schedules) self._add_schedules(usage, 'Lighting', thermal_zone.lighting.schedules) - self._add_schedules(usage, 'Appliances', thermal_zone.appliances.schedules) + self._add_schedules(usage, 'Appliance', thermal_zone.appliances.schedules) self._add_people_activity_level_schedules(thermal_zone) @@ -479,6 +480,8 @@ class Idf: Variable_Name="Zone Ideal Loads Supply Air Total Heating Energy", Reporting_Frequency="Hourly", ) + #_object = self._idf.newidfobject("OUTPUT:VARIABLE") + #print(vars(_object)) self._idf.newidfobject( "OUTPUT:VARIABLE", @@ -486,10 +489,10 @@ class Idf: Reporting_Frequency="Hourly", ) - self._idf.newidfobject( - "OUTPUTCONTROL:TABLE:STYLE", - Variable_Name="CommaAndHTML, JtoKWH", - ) + #self._idf.newidfobject( + # "OUTPUTCONTROL:TABLE:STYLE", + # Variable_Name="CommaAndHTML, JtoKWH", + #) self._idf.match() try: