diff --git a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_FourElement b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_FourElement index 2e39a2c27..47e948ae1 100644 --- a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_FourElement +++ b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_FourElement @@ -15,7 +15,7 @@ record ${zone.parent.name}_${zone.name} "${zone.parent.name}_${zone.name}" alphaWin = ${zone.model_attr.alpha_conv_inner_win}, RWin = ${zone.model_attr.r1_win}, gWin = ${zone.model_attr.weighted_g_value}, - UWin= ${zone.model_attr.ua_value_win/zone.model_attr.area_win}, + UWin= ${zone.model_attr.u_value_win}, ratioWinConRad = ${zone.model_attr.ratio_conv_rad_inner_win}, AExt = ${get_list(zone.model_attr.facade_areas)}, alphaExt = ${zone.model_attr.alpha_conv_inner_ow}, diff --git a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_OneElement b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_OneElement index 0b08a9f25..b0d3eff7a 100644 --- a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_OneElement +++ b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_OneElement @@ -14,7 +14,7 @@ record ${zone.parent.name}_${zone.name} "${zone.parent.name}_${zone.name}" alphaWin = ${zone.model_attr.alpha_conv_inner_win}, RWin = ${zone.model_attr.r1_win}, gWin = ${zone.model_attr.weighted_g_value}, - UWin= ${zone.model_attr.ua_value_win/zone.model_attr.area_win}, + UWin= ${zone.model_attr.u_value_win}, ratioWinConRad = ${zone.model_attr.ratio_conv_rad_inner_win}, AExt = ${get_list(zone.model_attr.facade_areas)}, alphaExt = ${zone.model_attr.alpha_conv_inner_ow}, diff --git a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_ThreeElement b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_ThreeElement index 3b49042b2..407c4a5e9 100644 --- a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_ThreeElement +++ b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_ThreeElement @@ -14,7 +14,7 @@ record ${zone.parent.name}_${zone.name} "${zone.parent.name}_${zone.name}" alphaWin = ${zone.model_attr.alpha_conv_inner_win}, RWin = ${zone.model_attr.r1_win}, gWin = ${zone.model_attr.weighted_g_value}, - UWin= ${zone.model_attr.ua_value_win/zone.model_attr.area_win}, + UWin= ${zone.model_attr.u_value_win}, ratioWinConRad = ${zone.model_attr.ratio_conv_rad_inner_win}, AExt = ${get_list(zone.model_attr.facade_areas)}, alphaExt = ${zone.model_attr.alpha_conv_inner_ow}, diff --git a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_TwoElement b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_TwoElement index dd7c01f2a..c1cce2861 100644 --- a/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_TwoElement +++ b/teaser/data/output/modelicatemplate/AixLib/AixLib_ThermalZoneRecord_TwoElement @@ -14,7 +14,7 @@ record ${zone.parent.name}_${zone.name} "${zone.parent.name}_${zone.name}" alphaWin = ${zone.model_attr.alpha_conv_inner_win}, RWin = ${zone.model_attr.r1_win}, gWin = ${zone.model_attr.weighted_g_value}, - UWin= ${zone.model_attr.ua_value_win/zone.model_attr.area_win}, + UWin= ${zone.model_attr.u_value_win}, ratioWinConRad = ${zone.model_attr.ratio_conv_rad_inner_win}, AExt = ${get_list(zone.model_attr.facade_areas)}, alphaExt = ${zone.model_attr.alpha_conv_inner_ow}, diff --git a/teaser/data/output/modelicatemplate/Annex60/Annex60_FourElements b/teaser/data/output/modelicatemplate/Annex60/Annex60_FourElements index ca19bbaf8..f01612998 100644 --- a/teaser/data/output/modelicatemplate/Annex60/Annex60_FourElements +++ b/teaser/data/output/modelicatemplate/Annex60/Annex60_FourElements @@ -24,7 +24,7 @@ model ${zone.parent.name}_${zone.name} "Calculates direct solar radiation on titled surface for all directions" annotation (Placement(transformation(extent={{-68,52},{-48,72}}))); Annex60.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer}, - UWin=${zone.model_attr.ua_value_win/zone.model_attr.area_win}) + UWin=${zone.model_attr.u_value_win}) "Correction factor for solar transmission" annotation (Placement(transformation(extent={{6,54},{26,74}}))); Annex60.ThermalZones.ReducedOrder.RC.FourElements diff --git a/teaser/data/output/modelicatemplate/Annex60/Annex60_OneElement b/teaser/data/output/modelicatemplate/Annex60/Annex60_OneElement index 7e918345d..b93b5caba 100644 --- a/teaser/data/output/modelicatemplate/Annex60/Annex60_OneElement +++ b/teaser/data/output/modelicatemplate/Annex60/Annex60_OneElement @@ -24,7 +24,7 @@ model ${zone.parent.name}_${zone.name} "Calculates direct solar radiation on titled surface for all directions" annotation (Placement(transformation(extent={{-68,52},{-48,72}}))); Annex60.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer}, - UWin=${zone.model_attr.ua_value_win/zone.model_attr.area_win}) + UWin=${zone.model_attr.u_value_win}) "Correction factor for solar transmission" annotation (Placement(transformation(extent={{6,54},{26,74}}))); Annex60.ThermalZones.ReducedOrder.RC.OneElement diff --git a/teaser/data/output/modelicatemplate/Annex60/Annex60_ThreeElements b/teaser/data/output/modelicatemplate/Annex60/Annex60_ThreeElements index 48f2c7855..e33722702 100644 --- a/teaser/data/output/modelicatemplate/Annex60/Annex60_ThreeElements +++ b/teaser/data/output/modelicatemplate/Annex60/Annex60_ThreeElements @@ -24,7 +24,7 @@ model ${zone.parent.name}_${zone.name} "Calculates direct solar radiation on titled surface for all directions" annotation (Placement(transformation(extent={{-68,52},{-48,72}}))); Annex60.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer}, - UWin=${zone.model_attr.ua_value_win/zone.model_attr.area_win}) + UWin=${zone.model_attr.u_value_win}) "Correction factor for solar transmission" annotation (Placement(transformation(extent={{6,54},{26,74}}))); Annex60.ThermalZones.ReducedOrder.RC.ThreeElements diff --git a/teaser/data/output/modelicatemplate/Annex60/Annex60_TwoElements b/teaser/data/output/modelicatemplate/Annex60/Annex60_TwoElements index 747e62c10..6489dc9de 100644 --- a/teaser/data/output/modelicatemplate/Annex60/Annex60_TwoElements +++ b/teaser/data/output/modelicatemplate/Annex60/Annex60_TwoElements @@ -24,7 +24,7 @@ model ${zone.parent.name}_${zone.name} "Calculates direct solar radiation on titled surface for all directions" annotation (Placement(transformation(extent={{-68,52},{-48,72}}))); Annex60.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer}, - UWin=${zone.model_attr.ua_value_win/zone.model_attr.area_win}) + UWin=${zone.model_attr.u_value_win}) "Correction factor for solar transmission" annotation (Placement(transformation(extent={{6,54},{26,74}}))); Annex60.ThermalZones.ReducedOrder.RC.TwoElements diff --git a/teaser/logic/buildingobjects/calculation/four_element.py b/teaser/logic/buildingobjects/calculation/four_element.py index 7ecdc43c6..2dbb7f0e4 100644 --- a/teaser/logic/buildingobjects/calculation/four_element.py +++ b/teaser/logic/buildingobjects/calculation/four_element.py @@ -288,6 +288,8 @@ class FourElement(object): the ambient. ua_value_win : float [W/K] U-Value times outer wall area. + u_value_win : float [W/(m2K)] + Area weighted U-Value of windows. r_conv_inner_win : float [K/W] Sum of convective resistances for all windows facing the inside of this thermal zone. @@ -530,6 +532,7 @@ def __init__(self, thermal_zone, merge_windows, t_bt): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0 @@ -583,15 +586,41 @@ def calc_attributes(self): win.calc_ua_value() self.set_calc_default() + if len(self.thermal_zone.outer_walls) < 1: + warnings.warn("No walls are defined as outer walls for thermal " + + "zone " + self.thermal_zone.name + " in building " + + self.thermal_zone.parent.name + + ", please be careful with results. In addition " + + "this might lead to RunTimeErrors") self._sum_outer_wall_elements() - self._sum_ground_floor_elements() - self._sum_rooftop_elements() - self._sum_inner_wall_elements() - self._sum_window_elements() - self._calc_outer_elements() - self._calc_ground_floor_elements() + if len(self.thermal_zone.inner_walls) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no inner walls have been defined.') + else: + self._sum_inner_wall_elements() + self._calc_inner_elements() + if len(self.thermal_zone.windows) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no windows have been defined.') + else: + self._sum_window_elements() + if len(self.thermal_zone.ground_floors) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no ground floors have been defined.') + else: + self._sum_ground_floor_elements() + self._calc_ground_floor_elements() + if len(self.thermal_zone.ground_floors) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no rooftops have been defined.') + else: + self._sum_rooftop_elements() self._calc_rooftop_elements() - self._calc_inner_elements() + self._calc_outer_elements() self._calc_wf() self._calc_mean_values() self._calc_number_of_elements() @@ -958,6 +987,7 @@ def _sum_window_elements(self): self.area_win = sum(win.area for win in self.thermal_zone.windows) self.ua_value_win = sum( win.ua_value for win in self.thermal_zone.windows) + self.u_value_win = self.ua_value_win/self.area_win # values facing the inside of the thermal zone @@ -1048,8 +1078,9 @@ def _calc_outer_elements(self): if self.merge_windows is False: try: - self.r1_win = (1 / sum((1 / win.r1) for - win in self.thermal_zone.windows)) + if len(self.thermal_zone.windows) > 0: + self.r1_win = (1 / sum((1 / win.r1) for win in + self.thermal_zone.windows)) conduction = (1 / sum((1 / element.r_conduc) for element in outer_walls)) @@ -1063,17 +1094,20 @@ def _calc_outer_elements(self): if self.merge_windows is True: try: - self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in - self.thermal_zone.windows) - - self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) - self.r_total_ow = 1 / (self.ua_value_ow + self.ua_value_win) - self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( - ((1 / self.r_conv_inner_ow) - + (1 / self.r_conv_inner_win) - + (1 / self.r_rad_inner_ow) - + (1 / self.r_rad_inner_win)))) - 1 / ( - self.alpha_comb_outer_ow * self.area_ow) + if len(self.thermal_zone.windows) > 0: + self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in + self.thermal_zone.windows) + + self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) + + self.r_total_ow = 1 / (self.ua_value_ow + + self.ua_value_win) + self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( + ((1 / self.r_conv_inner_ow) + + (1 / self.r_conv_inner_win) + + (1 / self.r_rad_inner_ow) + + (1 / self.r_rad_inner_win)))) - 1 / ( + self.alpha_comb_outer_ow * self.area_ow) self.ir_emissivity_inner_ow = ( (self.ir_emissivity_inner_ow * self.area_ow @@ -1558,6 +1592,7 @@ def set_calc_default(self): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0 diff --git a/teaser/logic/buildingobjects/calculation/one_element.py b/teaser/logic/buildingobjects/calculation/one_element.py index 1eb5a3e0c..188a26e1e 100644 --- a/teaser/logic/buildingobjects/calculation/one_element.py +++ b/teaser/logic/buildingobjects/calculation/one_element.py @@ -141,7 +141,9 @@ class OneElement(object): Area-weighted combined coefficient of heat transfer of windows facing the ambient. ua_value_win : float [W/K] - U-Value times outer wall area. + U-Value times window wall area. + u_value_win : float [W/(m2K)] + Area weighted U-Value of windows. r_conv_inner_win : float [K/W] Sum of convective resistances for all windows facing the inside of this thermal zone. @@ -278,6 +280,7 @@ def __init__(self, thermal_zone, merge_windows, t_bt): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0 @@ -328,8 +331,19 @@ def calc_attributes(self): win.calc_ua_value() self.set_calc_default() + if len(outer_walls) < 1: + warnings.warn("No walls are defined as outer walls for thermal " + + "zone " + self.thermal_zone.name + " in building " + + self.thermal_zone.parent.name + + ", please be careful with results. In addition " + + "this might lead to RunTimeErrors") self._sum_outer_wall_elements() - self._sum_window_elements() + if len(self.thermal_zone.windows) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no windows have been defined.') + else: + self._sum_window_elements() self._calc_outer_elements() self._calc_wf() self._calc_mean_values() @@ -545,6 +559,7 @@ def _sum_window_elements(self): self.area_win = sum(win.area for win in self.thermal_zone.windows) self.ua_value_win = sum( win.ua_value for win in self.thermal_zone.windows) + self.u_value_win = self.ua_value_win/self.area_win self.r_total_win = 1 / self.ua_value_win # values facing the inside of the thermal zone @@ -630,16 +645,13 @@ def _calc_outer_elements(self): # more than one outer wall, calculate chain matrix self.r1_ow, self.c1_ow = self._calc_parallel_connection(outer_walls, omega) - else: - warnings.warn("No walls are defined as outer walls, please be " - "careful with results. In addition this might lead " - "to RunTimeErrors") if self.merge_windows is False: try: - self.r1_win = (1 / sum((1 / win.r1) for - win in self.thermal_zone.windows)) + if len(self.thermal_zone.windows) > 0: + self.r1_win = (1 / sum((1 / win.r1) for win in + self.thermal_zone.windows)) conduction = (1 / sum((1 / element.r_conduc) for element in outer_walls)) @@ -654,17 +666,20 @@ def _calc_outer_elements(self): try: - self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in - self.thermal_zone.windows) + if len(self.thermal_zone.windows) > 0: + self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in + self.thermal_zone.windows) + + self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) - self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) - self.r_total_ow = 1 / (self.ua_value_ow + self.ua_value_win) - self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( - ((1 / self.r_conv_inner_ow) - + (1 / self.r_conv_inner_win) - + (1 / self.r_rad_inner_ow) - + (1 / self.r_rad_inner_win)))) - 1 / ( - self.alpha_comb_outer_ow * self.area_ow) + self.r_total_ow = 1 / (self.ua_value_ow + + self.ua_value_win) + self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( + ((1 / self.r_conv_inner_ow) + + (1 / self.r_conv_inner_win) + + (1 / self.r_rad_inner_ow) + + (1 / self.r_rad_inner_win)))) - 1 / ( + self.alpha_comb_outer_ow * self.area_ow) self.ir_emissivity_inner_ow = ( (self.ir_emissivity_inner_ow * self.area_ow @@ -931,6 +946,7 @@ def set_calc_default(self): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0 diff --git a/teaser/logic/buildingobjects/calculation/three_element.py b/teaser/logic/buildingobjects/calculation/three_element.py index 882264aa9..d3441b6a0 100644 --- a/teaser/logic/buildingobjects/calculation/three_element.py +++ b/teaser/logic/buildingobjects/calculation/three_element.py @@ -217,6 +217,8 @@ class ThreeElement(object): the ambient. ua_value_win : float [W/K] U-Value times outer wall area. + u_value_win : float [W/(m2K)] + Area weighted U-Value of windows. r_conv_inner_win : float [K/W] Sum of convective resistances for all windows facing the inside of this thermal zone. @@ -410,6 +412,7 @@ def __init__(self, thermal_zone, merge_windows, t_bt): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0 @@ -462,13 +465,34 @@ def calc_attributes(self): win.calc_ua_value() self.set_calc_default() + if len(outer_walls) < 1: + warnings.warn("No walls are defined as outer walls for thermal " + + "zone " + self.thermal_zone.name + " in building " + + self.thermal_zone.parent.name + + ", please be careful with results. In addition " + + "this might lead to RunTimeErrors") self._sum_outer_wall_elements() - self._sum_ground_floor_elements() - self._sum_inner_wall_elements() - self._sum_window_elements() + if len(self.thermal_zone.inner_walls) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no inner walls have been defined.') + else: + self._sum_inner_wall_elements() + self._calc_inner_elements() + if len(self.thermal_zone.windows) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no windows have been defined.') + else: + self._sum_window_elements() + if len(self.thermal_zone.ground_floors) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no ground floors have been defined.') + else: + self._sum_ground_floor_elements() + self._calc_ground_floor_elements() self._calc_outer_elements() - self._calc_ground_floor_elements() - self._calc_inner_elements() self._calc_wf() self._calc_mean_values() self._calc_number_of_elements() @@ -785,6 +809,7 @@ def _sum_window_elements(self): self.area_win = sum(win.area for win in self.thermal_zone.windows) self.ua_value_win = sum( win.ua_value for win in self.thermal_zone.windows) + self.u_value_win = self.ua_value_win/self.area_win # values facing the inside of the thermal zone @@ -868,16 +893,13 @@ def _calc_outer_elements(self): # more than one outer wall, calculate chain matrix self.r1_ow, self.c1_ow = self._calc_parallel_connection(outer_walls, omega) - else: - warnings.warn("No walls are defined as outer walls, please be " - "careful with results. In addition this might lead " - "to RunTimeErrors") if self.merge_windows is False: try: - self.r1_win = (1 / sum((1 / win.r1) for - win in self.thermal_zone.windows)) + if len(self.thermal_zone.windows) > 0: + self.r1_win = (1 / sum((1 / win.r1) for win in + self.thermal_zone.windows)) conduction = (1 / sum((1 / element.r_conduc) for element in outer_walls)) @@ -891,17 +913,20 @@ def _calc_outer_elements(self): if self.merge_windows is True: try: - self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in - self.thermal_zone.windows) - - self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) - self.r_total_ow = 1 / (self.ua_value_ow + self.ua_value_win) - self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( - ((1 / self.r_conv_inner_ow) - + (1 / self.r_conv_inner_win) - + (1 / self.r_rad_inner_ow) - + (1 / self.r_rad_inner_win)))) - 1 / ( - self.alpha_comb_outer_ow * self.area_ow) + if len(self.thermal_zone.windows) > 0: + self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in + self.thermal_zone.windows) + + self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) + + self.r_total_ow = 1 / (self.ua_value_ow + + self.ua_value_win) + self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( + ((1 / self.r_conv_inner_ow) + + (1 / self.r_conv_inner_win) + + (1 / self.r_rad_inner_ow) + + (1 / self.r_rad_inner_win)))) - 1 / ( + self.alpha_comb_outer_ow * self.area_ow) self.ir_emissivity_inner_ow = ( (self.ir_emissivity_inner_ow * self.area_ow @@ -943,10 +968,6 @@ def _calc_ground_floor_elements(self): # more than one outer wall, calculate chain matrix self.r1_gf, self.c1_gf = self._calc_parallel_connection( self.thermal_zone.ground_floors, omega) - else: - warnings.warn("No walls are defined as ground floors, please be " - "careful with results. In addition this might lead " - "to RunTimeErrors") try: conduction = (1 / sum((1 / element.r_conduc) for element in self.thermal_zone.ground_floors)) @@ -991,10 +1012,6 @@ def _calc_inner_elements(self): self.r1_iw, self.c1_iw = self._calc_parallel_connection( inner_walls, omega) - else: - warnings.warn("No walls are defined as outer walls, please be " - "careful with results. In addition this might lead " - "to RunTimeErrors") def _calc_wf(self): """Weightfactors for outer elements(walls, roof, ground floor, windows) @@ -1284,6 +1301,7 @@ def set_calc_default(self): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0 diff --git a/teaser/logic/buildingobjects/calculation/two_element.py b/teaser/logic/buildingobjects/calculation/two_element.py index 744afc717..4cf479a9b 100644 --- a/teaser/logic/buildingobjects/calculation/two_element.py +++ b/teaser/logic/buildingobjects/calculation/two_element.py @@ -177,7 +177,9 @@ class TwoElement(object): Area-weighted combined coefficient of heat transfer of windows facing the ambient. ua_value_win : float [W/K] - U-Value times outer wall area. + U-Value times window wall area. + u_value_win : float [W/(m2K)] + Area weighted U-Value of windows. r_conv_inner_win : float [K/W] Sum of convective resistances for all windows facing the inside of this thermal zone. @@ -341,6 +343,7 @@ def __init__(self, thermal_zone, merge_windows, t_bt): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0 @@ -391,11 +394,28 @@ def calc_attributes(self): win.calc_ua_value() self.set_calc_default() + if len(outer_walls) < 1: + warnings.warn("No walls are defined as outer walls for thermal " + "zone " + str(self.thermal_zone.name) + + " in building " + + str(self.thermal_zone.parent.name) + + ", please be careful with results. In addition " + + "this might lead to RunTimeErrors") self._sum_outer_wall_elements() - self._sum_inner_wall_elements() - self._sum_window_elements() + if len(self.thermal_zone.inner_walls) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name, + ' in building ' + self.thermal_zone.parent.name + + ', no inner walls have been defined.') + else: + self._sum_inner_wall_elements() + self._calc_inner_elements() + if len(self.thermal_zone.windows) < 1: + warnings.warn('For thermal zone ' + self.thermal_zone.name + + ' in building ' + self.thermal_zone.parent.name + + ', no windows have been defined.') + else: + self._sum_window_elements() self._calc_outer_elements() - self._calc_inner_elements() self._calc_wf() self._calc_mean_values() self._calc_number_of_elements() @@ -686,6 +706,7 @@ def _sum_window_elements(self): self.area_win = sum(win.area for win in self.thermal_zone.windows) self.ua_value_win = sum( win.ua_value for win in self.thermal_zone.windows) + self.u_value_win = self.ua_value_win/self.area_win self.r_total_win = 1 / self.ua_value_win # values facing the inside of the thermal zone @@ -771,16 +792,13 @@ def _calc_outer_elements(self): # more than one outer wall, calculate chain matrix self.r1_ow, self.c1_ow = self._calc_parallel_connection(outer_walls, omega) - else: - warnings.warn("No walls are defined as outer walls, please be " - "careful with results. In addition this might lead " - "to RunTimeErrors") if self.merge_windows is False: try: - self.r1_win = (1 / sum((1 / win.r1) for - win in self.thermal_zone.windows)) + if len(self.thermal_zone.windows) > 0: + self.r1_win = (1 / sum((1 / win.r1) for win in + self.thermal_zone.windows)) conduction = (1 / sum((1 / element.r_conduc) for element in outer_walls)) @@ -795,18 +813,20 @@ def _calc_outer_elements(self): try: - self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in - self.thermal_zone.windows) + if len(self.thermal_zone.windows) > 0: + self.r1_win = 1 / sum(1 / (win.r1 / 6) for win in + self.thermal_zone.windows) - self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) - self.r_total_ow = 1 / (self.ua_value_ow + self.ua_value_win) + self.r1_ow = 1 / (1 / self.r1_ow + 1 / self.r1_win) - self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( - ((1 / self.r_conv_inner_ow) - + (1 / self.r_conv_inner_win) - + (1 / self.r_rad_inner_ow) - + (1 / self.r_rad_inner_win)))) - 1 / ( - self.alpha_comb_outer_ow * self.area_ow) + self.r_total_ow = 1 / (self.ua_value_ow + + self.ua_value_win) + self.r_rest_ow = (self.r_total_ow - self.r1_ow - 1 / ( + ((1 / self.r_conv_inner_ow) + + (1 / self.r_conv_inner_win) + + (1 / self.r_rad_inner_ow) + + (1 / self.r_rad_inner_win)))) - 1 / ( + self.alpha_comb_outer_ow * self.area_ow) self.ir_emissivity_inner_ow = ( (self.ir_emissivity_inner_ow * self.area_ow @@ -862,10 +882,6 @@ def _calc_inner_elements(self): self.r1_iw, self.c1_iw = self._calc_parallel_connection( inner_walls, omega) - else: - warnings.warn("No walls are defined as outer walls, please be " - "careful with results. In addition this might lead " - "to RunTimeErrors") def _calc_wf(self): """Weightfactors for outer elements(walls, roof, ground floor, windows) @@ -1139,6 +1155,7 @@ def set_calc_default(self): # UA-Value self.ua_value_win = 0.0 + self.u_value_win = 0.0 # resistances for heat transfer facing the inside of this thermal zone self.r_conv_inner_win = 0.0