From de066b25fbb235c201409abb311df9ae27e18236 Mon Sep 17 00:00:00 2001 From: jgavalda Date: Fri, 19 May 2023 16:57:35 -0400 Subject: [PATCH 1/2] Changes hub to incorporate change in distribution --- .../montreal_custom_systems.xml | 84 +++++++++++++++---- 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/hub/data/energy_systems/montreal_custom_systems.xml b/hub/data/energy_systems/montreal_custom_systems.xml index 99c073e9..ea525ec1 100644 --- a/hub/data/energy_systems/montreal_custom_systems.xml +++ b/hub/data/energy_systems/montreal_custom_systems.xml @@ -8,8 +8,8 @@ 0.85 10 - 1000000000 - 1000000000 + 2 + 2 false @@ -20,8 +20,8 @@ 1 10 - 1000000000 - 1000000000 + 2 + 2 true @@ -32,8 +32,8 @@ 0.85 25 - 1000000000 - 1000000000 + 13 + 13 false @@ -44,8 +44,8 @@ 1 25 - 1000000000 - 1000000000 + 13 + 13 false @@ -56,8 +56,8 @@ 0.85 10 - 1000000000 - 1000000000 + 2 + 2 false @@ -68,8 +68,8 @@ 1 0 - 1000000000 - 1000000000 + 4 + 4 false @@ -79,8 +79,8 @@ 3.23 0 - 1000000000 - 1000000000 + 4 + 4 false @@ -90,8 +90,8 @@ 3.23 10 - 1000000000 - 1000000000 + 4 + 4 false @@ -101,8 +101,8 @@ 3.23 0 - 1000000000 - 1000000000 + 4 + 4 false @@ -113,18 +113,50 @@ 0.22 true + + Water distribution and fancoils + + electricity + + 0 + 4 + 4 + false + + + Air distribution central + + electricity + + 0 + 4 + 4 + false + + + DX distribution central + + electricity + + 0 + 4 + 4 + false + 1 7 + 13 1 7 + 13 10 @@ -132,12 +164,14 @@ 2 7 + 13 2 7 + 13 10 @@ -145,12 +179,14 @@ 1 8 + 11 1 8 + 11 10 @@ -158,12 +194,14 @@ 2 8 + 11 2 8 + 11 10 @@ -171,12 +209,14 @@ 3 4 + 13 3 4 + 13 10 @@ -184,23 +224,27 @@ 4 4 + 13 4 4 + 13 10 8 + 11 8 + 11 10 @@ -208,12 +252,14 @@ 5 8 + 12 5 8 + 12 10 @@ -221,12 +267,14 @@ 6 8 + 12 6 8 + 12 10 From c77c03b759a6010fceb51027bd37703cbab60f2f Mon Sep 17 00:00:00 2001 From: jgavalda Date: Fri, 19 May 2023 18:05:36 -0400 Subject: [PATCH 2/2] Incorporation of ventilation that previously was not writing idf. Working. Incorporation of percentual losses in distribution --- .../montreal_custom_systems.xml | 48 ------------------- hub/exports/building_energy/idf.py | 47 +++++++++--------- 2 files changed, 24 insertions(+), 71 deletions(-) diff --git a/hub/data/energy_systems/montreal_custom_systems.xml b/hub/data/energy_systems/montreal_custom_systems.xml index ea525ec1..8e1b2db3 100644 --- a/hub/data/energy_systems/montreal_custom_systems.xml +++ b/hub/data/energy_systems/montreal_custom_systems.xml @@ -113,50 +113,18 @@ 0.22 true - - Water distribution and fancoils - - electricity - - 0 - 4 - 4 - false - - - Air distribution central - - electricity - - 0 - 4 - 4 - false - - - DX distribution central - - electricity - - 0 - 4 - 4 - false - 1 7 - 13 1 7 - 13 10 @@ -164,14 +132,12 @@ 2 7 - 13 2 7 - 13 10 @@ -179,14 +145,12 @@ 1 8 - 11 1 8 - 11 10 @@ -194,14 +158,12 @@ 2 8 - 11 2 8 - 11 10 @@ -209,14 +171,12 @@ 3 4 - 13 3 4 - 13 10 @@ -224,27 +184,23 @@ 4 4 - 13 4 4 - 13 10 8 - 11 8 - 11 10 @@ -252,14 +208,12 @@ 5 8 - 12 5 8 - 12 10 @@ -267,14 +221,12 @@ 6 8 - 12 6 8 - 12 10 diff --git a/hub/exports/building_energy/idf.py b/hub/exports/building_energy/idf.py index 058a4e8d..e0c25f7f 100644 --- a/hub/exports/building_energy/idf.py +++ b/hub/exports/building_energy/idf.py @@ -427,32 +427,32 @@ class Idf: for zone in self._idf.idfobjects["ZONE"]: if zone.Name == f'{zone_name}_infiltration': return - schedule = f'Infiltration schedules {thermal_zone.usage_name}' - if schedule not in self._idf.idfobjects[self._HOURLY_SCHEDULE]: - return - self._idf.newidfobject(self._INFILTRATION, - Name=f'{zone_name}_infiltration', - Zone_or_ZoneList_Name=zone_name, - Schedule_Name=schedule, - Design_Flow_Rate_Calculation_Method='AirChanges/Hour', - Air_Changes_per_Hour=thermal_zone.infiltration_rate_system_off - ) + schedule = f'Ventilation schedules {thermal_zone.usage_name}' + #if schedule not in self._idf.idfobjects[self._HOURLY_SCHEDULE]: + # return + self._idf.newidfobject(self._INFILTRATION, + Name=f'{zone_name}_infiltration', + Zone_or_ZoneList_Name=zone_name, + Schedule_Name=schedule, + Design_Flow_Rate_Calculation_Method='AirChanges/Hour', + Air_Changes_per_Hour=thermal_zone.infiltration_rate_system_off + ) def _add_ventilation(self, thermal_zone, zone_name): for zone in self._idf.idfobjects["ZONE"]: if zone.Name == f'{zone_name}_ventilation': return - schedule = f'Ventilation schedules {thermal_zone.usage_name}' - if schedule not in self._idf.idfobjects[self._HOURLY_SCHEDULE]: - return - # todo: revise ventilation with Pilar - self._idf.newidfobject(self._VENTILATION, - Name=f'{zone_name}_ventilation', - Zone_or_ZoneList_Name=zone_name, - Schedule_Name=schedule, - Design_Flow_Rate_Calculation_Method='AirChanges/Hour', - Flow_Rate_per_Zone_Floor_Area=thermal_zone.mechanical_air_change - ) + schedule = f'Ventilation schedules {thermal_zone.usage_name}' + #if schedule not in self._idf.idfobjects[self._HOURLY_SCHEDULE]: + # return + # todo: revise ventilation with Pilar + self._idf.newidfobject(self._VENTILATION, + Name=f'{zone_name}_ventilation', + 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 + ) def _add_dhw(self, thermal_zone, zone_name): peak_flow_rate = thermal_zone.domestic_hot_water.peak_flow * thermal_zone.total_floor_area @@ -510,8 +510,8 @@ class Idf: if building.name in self._target_buildings or building.name in self._adjacent_buildings: _new_schedules = self._create_infiltration_schedules(thermal_zone) self._add_schedules(usage, 'Infiltration', _new_schedules) - _new_schedules2 = self._create_ventilation_schedules(thermal_zone) - self._add_schedules(usage, 'Ventilation', _new_schedules2) + _new_schedules = self._create_ventilation_schedules(thermal_zone) + self._add_schedules(usage, 'Ventilation', _new_schedules) self._add_schedules(usage, 'Occupancy', thermal_zone.occupancy.occupancy_schedules) self._add_schedules(usage, 'HVAC AVAIL', thermal_zone.thermal_control.hvac_availability_schedules) self._add_schedules(usage, 'Heating thermostat', thermal_zone.thermal_control.heating_set_point_schedules) @@ -536,6 +536,7 @@ class Idf: self._add_zone(thermal_zone, building.name) self._add_heating_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) self._add_lighting(thermal_zone, building.name) self._add_appliances(thermal_zone, building.name)