From 15b96fe1546eec994a7735f3f4aee0386255666c Mon Sep 17 00:00:00 2001 From: ogavalda <33801000+ogavalda@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:41:27 -0400 Subject: [PATCH] Changing the full structure to incorporate a second way of entering infiltration (infiltration per outdoor area) --- .../construction/nrcan_catalog.py | 12 +++++++-- .../data_models/construction/archetype.py | 25 ++++++++++++++++++- .../building_demand/thermal_archetype.py | 2 ++ hub/exports/building_energy/idf.py | 4 +-- hub/helpers/constants.py | 1 + .../construction/nrcan_physics_parameters.py | 2 ++ 6 files changed, 41 insertions(+), 5 deletions(-) diff --git a/hub/catalog_factories/construction/nrcan_catalog.py b/hub/catalog_factories/construction/nrcan_catalog.py index 19690b0a..599d5908 100644 --- a/hub/catalog_factories/construction/nrcan_catalog.py +++ b/hub/catalog_factories/construction/nrcan_catalog.py @@ -128,6 +128,12 @@ class NrcanCatalog(Catalog): infiltration_rate_for_ventilation_system_on = ( archetype['infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS ) + infiltration_rate_area_for_ventilation_system_off = ( + archetype['infiltration_rate_area_for_ventilation_system_off'] * 1 + ) + infiltration_rate_area_for_ventilation_system_on = ( + archetype['infiltration_rate_area_for_ventilation_system_on'] * 1 + ) archetype_constructions = [] for archetype_construction in archetype['constructions']: @@ -153,7 +159,6 @@ class NrcanCatalog(Catalog): _window) archetype_constructions.append(_construction) break - _catalog_archetypes.append(Archetype(archetype_id, name, function, @@ -165,7 +170,10 @@ class NrcanCatalog(Catalog): extra_loses_due_to_thermal_bridges, None, infiltration_rate_for_ventilation_system_off, - infiltration_rate_for_ventilation_system_on)) + infiltration_rate_for_ventilation_system_on, + infiltration_rate_area_for_ventilation_system_off, + infiltration_rate_area_for_ventilation_system_on + )) return _catalog_archetypes def names(self, category=None): diff --git a/hub/catalog_factories/data_models/construction/archetype.py b/hub/catalog_factories/data_models/construction/archetype.py index 3397c4bf..def81c3a 100644 --- a/hub/catalog_factories/data_models/construction/archetype.py +++ b/hub/catalog_factories/data_models/construction/archetype.py @@ -23,7 +23,10 @@ class Archetype: extra_loses_due_to_thermal_bridges, indirect_heated_ratio, infiltration_rate_for_ventilation_system_off, - infiltration_rate_for_ventilation_system_on): + infiltration_rate_for_ventilation_system_on, + infiltration_rate_area_for_ventilation_system_off, + infiltration_rate_area_for_ventilation_system_on + ): self._id = archetype_id self._name = name self._function = function @@ -36,6 +39,8 @@ class Archetype: self._indirect_heated_ratio = indirect_heated_ratio self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on + self._infiltration_rate_area_for_ventilation_system_off = infiltration_rate_area_for_ventilation_system_off + self._infiltration_rate_area_for_ventilation_system_on = infiltration_rate_area_for_ventilation_system_on @property def id(self): @@ -133,6 +138,22 @@ class Archetype: """ return self._infiltration_rate_for_ventilation_system_on + @property + def infiltration_rate_area_for_ventilation_system_off(self): + """ + Get archetype infiltration rate for ventilation system off in m3/sm2 + :return: float + """ + return self._infiltration_rate_area_for_ventilation_system_off + + @property + def infiltration_rate_area_for_ventilation_system_on(self): + """ + Get archetype infiltration rate for ventilation system on in m3/sm2 + :return: float + """ + return self._infiltration_rate_for_ventilation_system_on + def to_dictionary(self): """Class content to dictionary""" _constructions = [] @@ -149,6 +170,8 @@ class Archetype: 'indirect heated ratio': self.indirect_heated_ratio, 'infiltration rate for ventilation off [1/s]': self.infiltration_rate_for_ventilation_system_off, 'infiltration rate for ventilation on [1/s]': self.infiltration_rate_for_ventilation_system_on, + 'infiltration rate area for ventilation off [m3/sm2]': self.infiltration_rate_area_for_ventilation_system_off, + 'infiltration rate area for ventilation on [m3/sm2]': self.infiltration_rate_area_for_ventilation_system_on, 'constructions': _constructions } } diff --git a/hub/city_model_structure/building_demand/thermal_archetype.py b/hub/city_model_structure/building_demand/thermal_archetype.py index bbe9d428..242e5104 100644 --- a/hub/city_model_structure/building_demand/thermal_archetype.py +++ b/hub/city_model_structure/building_demand/thermal_archetype.py @@ -20,6 +20,8 @@ class ThermalArchetype: self._indirect_heated_ratio = None self._infiltration_rate_for_ventilation_system_off = None self._infiltration_rate_for_ventilation_system_on = None + self._infiltration_rate_area_for_ventilation_system_off=None + self._infiltration_rate_area_for_ventilation_system_on=None @property def constructions(self) -> [Construction]: diff --git a/hub/exports/building_energy/idf.py b/hub/exports/building_energy/idf.py index d1422fe2..eafb67e9 100644 --- a/hub/exports/building_energy/idf.py +++ b/hub/exports/building_energy/idf.py @@ -466,13 +466,13 @@ class Idf: def _add_infiltration_surface(self, thermal_zone, zone_name): schedule = f'INF_CONST schedules {thermal_zone.usage_name}' - _infiltration = thermal_zone.infiltration_rate_area_system_off*2 + _infiltration = thermal_zone.infiltration_rate_area_system_off*1 self._idf.newidfobject(self._INFILTRATION, Name=f'{zone_name}_infiltration', Zone_or_ZoneList_or_Space_or_SpaceList_Name=zone_name, Schedule_Name=schedule, Design_Flow_Rate_Calculation_Method='Flow/ExteriorWallArea', - Air_Changes_per_Hour=_infiltration + Flow_Rate_per_Exterior_Surface_Area=_infiltration ) def _add_ventilation(self, thermal_zone, zone_name): diff --git a/hub/helpers/constants.py b/hub/helpers/constants.py index ad32c835..39586c54 100644 --- a/hub/helpers/constants.py +++ b/hub/helpers/constants.py @@ -25,6 +25,7 @@ KILO_WATTS_HOUR_TO_JULES = 3600000 WATTS_HOUR_TO_JULES = 3600 GALLONS_TO_QUBIC_METERS = 0.0037854117954011185 + # time SECOND = 'second' MINUTE = 'minute' diff --git a/hub/imports/construction/nrcan_physics_parameters.py b/hub/imports/construction/nrcan_physics_parameters.py index e57aa22e..c65bd2da 100644 --- a/hub/imports/construction/nrcan_physics_parameters.py +++ b/hub/imports/construction/nrcan_physics_parameters.py @@ -67,6 +67,8 @@ class NrcanPhysicsParameters: thermal_archetype.indirect_heated_ratio = 0 thermal_archetype.infiltration_rate_for_ventilation_system_on = catalog_archetype.infiltration_rate_for_ventilation_system_on thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off + thermal_archetype.infiltration_rate_area_for_ventilation_system_on = catalog_archetype.infiltration_rate_area_for_ventilation_system_on + thermal_archetype.infiltration_rate_area_for_ventilation_system_off = catalog_archetype.infiltration_rate_area_for_ventilation_system_off _constructions = [] for catalog_construction in catalog_archetype.constructions: construction = Construction()