From 616ae8701dfd2a738fda6a5e070d6cf048759fad Mon Sep 17 00:00:00 2001 From: jgavalda Date: Wed, 14 Feb 2024 16:01:33 -0500 Subject: [PATCH] Updated classes for infiltration per area ub thermal archetype and thermal zone --- .../building_demand/thermal_archetype.py | 34 +++++++++++++++++++ .../building_demand/thermal_zone.py | 20 +++++++++++ .../energy_building_exports_factory.py | 4 ++- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/hub/city_model_structure/building_demand/thermal_archetype.py b/hub/city_model_structure/building_demand/thermal_archetype.py index cd70912a..56b39c47 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]: @@ -132,3 +134,35 @@ class ThermalArchetype: :param value: float """ self._infiltration_rate_for_ventilation_system_on = value + + @property + def infiltration_rate_area_for_ventilation_system_off(self): + """ + Get infiltration rate for ventilation system off in ACH + :return: float + """ + return self._infiltration_rate_area_for_ventilation_system_off + + @infiltration_rate_area_for_ventilation_system_off.setter + def infiltration_rate_area_for_ventilation_system_off(self, value): + """ + Set infiltration rate for ventilation system off in ACH + :param value: float + """ + self._infiltration_rate_area_for_ventilation_system_off = value + + @property + def infiltration_rate_area_for_ventilation_system_on(self): + """ + Get infiltration rate for ventilation system on in ACH + :return: float + """ + return self._infiltration_rate_area_for_ventilation_system_on + + @infiltration_rate_area_for_ventilation_system_on.setter + def infiltration_rate_area_for_ventilation_system_on(self, value): + """ + Set infiltration rate for ventilation system on in ACH + :param value: float + """ + self._infiltration_rate_area_for_ventilation_system_on = value diff --git a/hub/city_model_structure/building_demand/thermal_zone.py b/hub/city_model_structure/building_demand/thermal_zone.py index 386e8c4b..2d79d79b 100644 --- a/hub/city_model_structure/building_demand/thermal_zone.py +++ b/hub/city_model_structure/building_demand/thermal_zone.py @@ -44,6 +44,8 @@ class ThermalZone: self._indirectly_heated_area_ratio = None self._infiltration_rate_system_on = None self._infiltration_rate_system_off = None + self._infiltration_rate_area_system_on = None + self._infiltration_rate_area_system_off = None self._volume = volume self._ordinate_number = None self._view_factors_matrix = None @@ -166,6 +168,24 @@ class ThermalZone: self._infiltration_rate_system_off = self._parent_internal_zone.thermal_archetype.infiltration_rate_for_ventilation_system_off return self._infiltration_rate_system_off + @property + def infiltration_rate_area_system_on(self): + """ + Get thermal zone infiltration rate system on in air changes per second (1/s) + :return: None or float + """ + self._infiltration_rate_system_on = self._parent_internal_zone.thermal_archetype.infiltration_rate_area_for_ventilation_system_on + return self._infiltration_rate_system_on + + @property + def infiltration_rate_area_system_off(self): + """ + Get thermal zone infiltration rate system off in air changes per second (1/s) + :return: None or float + """ + self._infiltration_rate_system_off = self._parent_internal_zone.thermal_archetype.infiltration_rate_area_for_ventilation_system_off + return self._infiltration_rate_system_off + @property def volume(self): """ diff --git a/hub/exports/energy_building_exports_factory.py b/hub/exports/energy_building_exports_factory.py index 952e4a12..00cf5155 100644 --- a/hub/exports/energy_building_exports_factory.py +++ b/hub/exports/energy_building_exports_factory.py @@ -73,4 +73,6 @@ class EnergyBuildingsExportsFactory: Export the city given to the class using the given export type handler :return: None """ - return getattr(self, self._export_type, lambda: None) + # return getattr(self, self._export_type, lambda: None) + + return InselMonthlyEnergyBalance(self._city, self._path, self._custom_insel_block)