2020-06-09 14:07:47 -04:00
|
|
|
"""
|
|
|
|
ThermalZone module
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
|
|
|
"""
|
2020-05-18 13:25:08 -04:00
|
|
|
from typing import List
|
|
|
|
from city_model_structure.thermal_boundary import ThermalBoundary
|
2020-06-04 12:47:48 -04:00
|
|
|
from city_model_structure.usage_zone import UsageZone
|
2020-05-18 13:25:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
class ThermalZone:
|
|
|
|
def __init__(self, surfaces, heated=True, cooled=True):
|
|
|
|
self._surfaces = surfaces
|
|
|
|
self._floor_area = None
|
|
|
|
self._bounded = None
|
|
|
|
self._heated = heated
|
|
|
|
self._cooled = cooled
|
|
|
|
self._additional_thermal_bridge_u_value = None
|
|
|
|
self._effective_thermal_capacity = None
|
|
|
|
self._indirectly_heated_area_ratio = None
|
|
|
|
self._infiltration_rate_system_on = None
|
|
|
|
self._infiltration_rate_system_off = None
|
2020-05-26 17:15:48 -04:00
|
|
|
self._usage_zones = None
|
2020-05-18 13:25:08 -04:00
|
|
|
|
|
|
|
@property
|
|
|
|
def heated(self):
|
|
|
|
return self._heated
|
|
|
|
|
|
|
|
@property
|
|
|
|
def cooled(self):
|
|
|
|
return self._cooled
|
|
|
|
|
|
|
|
@property
|
|
|
|
def floor_area(self):
|
|
|
|
if self._floor_area is None:
|
|
|
|
self._floor_area = 0
|
|
|
|
for s in self._surfaces:
|
|
|
|
if s.type == 'Ground':
|
|
|
|
self._floor_area += s.area
|
|
|
|
return self._floor_area
|
|
|
|
|
|
|
|
@property
|
|
|
|
def bounded(self) -> List[ThermalBoundary]:
|
|
|
|
return self._bounded
|
|
|
|
|
|
|
|
@bounded.setter
|
|
|
|
def bounded(self, value):
|
|
|
|
self._bounded = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def surfaces(self):
|
|
|
|
return self._surfaces
|
|
|
|
|
|
|
|
@property
|
|
|
|
def additional_thermal_bridge_u_value(self):
|
|
|
|
return self._additional_thermal_bridge_u_value
|
|
|
|
|
|
|
|
@additional_thermal_bridge_u_value.setter
|
|
|
|
def additional_thermal_bridge_u_value(self, value):
|
|
|
|
self._additional_thermal_bridge_u_value = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def effective_thermal_capacity(self):
|
|
|
|
return self._effective_thermal_capacity
|
|
|
|
|
|
|
|
@effective_thermal_capacity.setter
|
|
|
|
def effective_thermal_capacity(self, value):
|
|
|
|
self._effective_thermal_capacity = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def indirectly_heated_area_ratio(self):
|
|
|
|
return self._indirectly_heated_area_ratio
|
|
|
|
|
|
|
|
@indirectly_heated_area_ratio.setter
|
|
|
|
def indirectly_heated_area_ratio(self, value):
|
|
|
|
self._indirectly_heated_area_ratio = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def infiltration_rate_system_on(self):
|
|
|
|
return self._infiltration_rate_system_on
|
|
|
|
|
|
|
|
@infiltration_rate_system_on.setter
|
|
|
|
def infiltration_rate_system_on(self, value):
|
|
|
|
self._infiltration_rate_system_on = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def infiltration_rate_system_off(self):
|
|
|
|
return self._infiltration_rate_system_off
|
|
|
|
|
|
|
|
@infiltration_rate_system_off.setter
|
|
|
|
def infiltration_rate_system_off(self, value):
|
|
|
|
self._infiltration_rate_system_off = value
|
|
|
|
|
2020-05-28 12:07:36 -04:00
|
|
|
@property
|
2020-06-04 12:47:48 -04:00
|
|
|
def usage_zones(self) -> List[UsageZone]:
|
2020-05-26 17:15:48 -04:00
|
|
|
return self._usage_zones
|
|
|
|
|
2020-05-28 12:07:36 -04:00
|
|
|
@usage_zones.setter
|
|
|
|
def usage_zones(self, values):
|
|
|
|
self._usage_zones = values
|