Coverage for teaser/logic/buildingobjects/buildingphysics/interzonalwall.py: 83%
81 statements
« prev ^ index » next coverage.py v7.4.4, created at 2025-04-29 16:01 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2025-04-29 16:01 +0000
1# created April 2023
2# by TEASER4 Development Team
5from teaser.logic.buildingobjects.buildingphysics.wall\
6 import Wall
7from teaser.logic.buildingobjects.buildingphysics.buildingelement\
8 import BuildingElement
11class InterzonalWall(Wall):
12 """InterzonalWall class
14 This class holds information for an interzonal wall and is a child of Wall()
16 Note that interzonal elements have to be created twice for each zone they
17 connect and are not semantically connected afterwards. For an
18 InterzonalWall of one zone, an InterzonalWall has to be created for the
19 zone on the other side.
21 Parameters
22 ----------
24 parent : ThermalZone()
25 The parent class of this object, the ThermalZone the BE belongs to.
26 Allows for better control of hierarchical structures. If not None it
27 adds this InterzonalWall to ThermalZone.interzonal_walls.
28 Default is None.
30 Attributes
31 ----------
33 internal_id : float
34 Random id for the distinction between different elements.
35 name : str
36 Individual name
37 construction_data : str
38 Type of construction (e.g. "heavy" or "light"). Needed for
39 distinction between different constructions types in the same
40 building age period.
41 year_of_retrofit : int
42 Year of last retrofit
43 year_of_construction : int
44 Year of first construction
45 building_age_group : list
46 Determines the building age period that this building
47 element belongs to [begin, end], e.g. [1984, 1994]
48 area : float [m2]
49 Area of building element
50 tilt : float [degree]
51 Tilt against horizontal, default is 90.0
52 orientation : float [degree]
53 Azimuth direction of building element (0 : north, 90: east, 180: south,
54 270: west)
55 inner_convection : float [W/(m2*K)]
56 Constant heat transfer coefficient of convection inner side (facing
57 the zone), default 1.7
58 inner_radiation : float [W/(m2*K)]
59 Constant heat transfer coefficient of radiation inner side (facing
60 the zone), default 5.0
61 outer_convection : float [W/(m2*K)]
62 Constant heat transfer coefficient of convection outer side (facing
63 the ambient or adjacent zone), default 1.7
64 outer_radiation : float [W/(m2*K)]
65 Constant heat transfer coefficient of radiation outer side (facing
66 the ambient or adjacent zone), default 5.0
67 layer : list
68 List of all layers of a building element (to be filled with Layer
69 objects). Use element.layer = None to delete all layers of the building
70 element
71 other_side : ThermalZone()
72 the thermal zone on the other side of the interzonal wall
73 interzonal_type_material : str
74 one of (None (default), 'inner', 'outer_ordered', 'outer_reversed')
75 describes as which kind of element the element is treated when loading
76 type elements. Caution: Make sure that the complimentary element of
77 the other zone is also changed accordingly if this is adapted manually
78 None: treatment based on project.method_interzonal_export_enrichment
79 'inner': InterzonalWall treated as InnerWall,
80 InterzonalFloor treated as Floor,
81 InterzonalCeiling treated as Ceiling
82 'outer_ordered': InterzonalWall treated as Wall,
83 InterzonalFloor treated as GroundFloor,
84 InterzonalCeiling treated as Rooftop
85 'outer_reversed': InterzonalWall treated as Wall,
86 InterzonalFloor treated as Rooftop,
87 InterzonalCeiling treated as GroundFloor, but with
88 reversed layers, resulting in the reversed
89 sequence of layers as for the complimentary
90 element declared as 'outer_ordered'
91 interzonal_type_export : str
92 one of (None (default), 'inner', 'outer_ordered', 'outer_reversed')
93 describes as which kind of element the element is treated when exporting
94 to Modelica. Caution: Make sure that the complimentary element of
95 the other zone is also changed accordingly if this is adapted manually
96 'inner': element will be lumped with InnerWall. No heat flow to the
97 zone on the other side will be modelled.
98 'outer_ordered': element will be lumped with OuterWall (OneElement
99 to FourElement export) or treated as border to an
100 adjacent zone (FiveElement export). Borders to the
101 same adjacent zone will be lumped.
102 'outer_reversed': like 'outer_ordered', but the lumping follows
103 VDI 6007-1 in reversed order, resulting in the
104 reversed order of resistances and capacitors as
105 for the complimentary element declared as
106 'outer_ordered'
108 Calculated Attributes
110 r1 : float [K/W]
111 equivalent resistance R1 of the analogous model given in VDI 6007
112 r2 : float [K/W]
113 equivalent resistance R2 of the analogous model given in VDI 6007
114 r3 : float [K/W]
115 equivalent resistance R3 of the analogous model given in VDI 6007
116 c1 : float [J/K]
117 equivalent capacity C1 of the analogous model given in VDI 6007
118 c2 : float [J/K]
119 equivalent capacity C2 of the analogous model given in VDI 6007
120 c1_korr : float [J/K]
121 corrected capacity C1,korr for building elements in the case of
122 asymmetrical thermal load given in VDI 6007
123 ua_value : float [W/K]
124 UA-Value of building element (Area times U-Value)
125 r_inner_conv : float [K/W]
126 Convective resistance of building element on inner side (facing the
127 zone)
128 r_inner_rad : float [K/W]
129 Radiative resistance of building element on inner side (facing the
130 zone)
131 r_inner_conv : float [K/W]
132 Combined convective and radiative resistance of building element on
133 inner side (facing the zone)
134 r_outer_conv : float [K/W]
135 Convective resistance of building element on outer side (facing
136 the ambient or adjacent zone). Currently for all InnerWalls and
137 GroundFloors this value is set to 0.0
138 r_outer_rad : float [K/W]
139 Radiative resistance of building element on outer side (facing
140 the ambient or adjacent zone). Currently for all InnerWalls and
141 GroundFloors this value is set to 0.0
142 r_outer_conv : float [K/W]
143 Combined convective and radiative resistance of building element on
144 outer side (facing the ambient or adjacent zone). Currently for all
145 InnerWalls and GroundFloors this value is set to 0.0
146 wf_out : float
147 Weightfactor of building element ua_value/ua_value_zone
148 """
150 def __init__(self, parent=None, other_side=None):
151 """
152 """
153 super(InterzonalWall, self).__init__(parent, other_side)
155 self._tilt = 90.0
156 self._inner_convection = 1.7
157 self._inner_radiation = 5.0
158 self._outer_convection = 1.7
159 self._outer_radiation = 5.0
161 def load_type_element(
162 self,
163 year,
164 construction,
165 data_class=None,
166 element_type=None,
167 reverse_layers=False,
168 type_element_key=None
169 ):
170 """Typical element loader.
172 Loads typical interzonal wall elements according to their construction
173 year and their construction type from a json.
175 This function will only work if the parents to Building are set.
177 Parameters
178 ----------
179 year : int
180 Year of construction
182 construction : str
183 Construction type, code list ('heavy', 'light')
185 data_class : DataClass()
186 DataClass containing the bindings for TypeBuildingElement and
187 Material (typically this is the data class stored in prj.data,
188 but the user can individually change that. Default is
189 self.parent.parent.parent.data (which is data_class in current
190 project)
192 element_type : str
193 Element type to load - only to specify if the json entry for a
194 different type than type(element) is to be loaded, e.g. InnerWall
195 instead of OuterWall. Default: depends on interzonal_type_material.
197 reverse_layers : bool
198 defines if layer list should be reversed
200 type_element_key : str
201 Element to load - specify the full json entry
203 """
204 if element_type is None:
205 if self.interzonal_type_material == 'inner':
206 if type(self).__name__ == "InterzonalWall":
207 element_type = 'InnerWall'
208 elif type(self).__name__ == "InterzonalCeiling":
209 element_type = 'Ceiling'
210 elif type(self).__name__ == "InterzonalFloor":
211 element_type = 'Floor'
212 else:
213 raise ValueError('Instance of InterzonalWall not known')
214 else:
215 if type(self).__name__ == "InterzonalWall":
216 if self.interzonal_type_material == 'outer_reversed':
217 reverse_layers = True
218 element_type = 'OuterWall'
219 elif type(self).__name__ == "InterzonalCeiling":
220 if self.interzonal_type_material == 'outer_reversed':
221 reverse_layers = True
222 element_type = 'GroundFloor'
223 else:
224 element_type = 'Rooftop'
225 elif type(self).__name__ == "InterzonalFloor":
226 if self.interzonal_type_material == 'outer_reversed':
227 reverse_layers = True
228 element_type = 'Rooftop'
229 else:
230 element_type = 'GroundFloor'
231 else:
232 raise ValueError('Instance of InterzonalWall not known')
234 if (element_type in ("InnerWall", "Ceiling", "Floor")
235 and "tabula" in construction):
236 # there is no adv_retrofit / retrofit version of inner elements
237 construction = 'tabula_standard'
239 BuildingElement.load_type_element(
240 self,
241 year=year,
242 construction=construction,
243 data_class=data_class,
244 element_type=element_type,
245 reverse_layers=reverse_layers,
246 type_element_key=type_element_key
247 )
249 def retrofit_wall(self,
250 year_of_retrofit,
251 material=None,
252 add_at_position=None):
253 """Retrofits wall to German refurbishment standards.
255 This function adds an additional layer of insulation and sets the
256 thickness of the layer according to the retrofit standard in the
257 year of refurbishment. Refurbishment year must be newer then 1977
259 Note: To Calculate thickness and U-Value, the standard TEASER
260 coefficients for outer and inner heat transfer are used.
262 The used Standards are namely the Waermeschutzverordnung (WSVO) and
263 Energieeinsparverordnung (EnEv)
265 Parameters
266 ----------
267 material : string
268 Type of material, that is used for insulation
269 year_of_retrofit : int
270 Year of the retrofit of the wall/building
271 add_at_position : int
272 position at which to insert the insulation layer.
273 0 inside, None (default) or -1 outside/other side
275 """
276 if self.interzonal_type_material == 'inner':
277 return
278 elif add_at_position is None:
279 if self.interzonal_type_material == 'outer_reversed':
280 add_at_position = 0
281 elif self.interzonal_type_material == 'outer_ordered':
282 add_at_position = -1
284 material, year_of_retrofit, ins_layer = self.initialize_retrofit(
285 material, year_of_retrofit, add_at_position
286 )
288 calc_u = None
290 if 1977 <= year_of_retrofit <= 1981:
291 calc_u = 1.06
292 elif 1982 <= year_of_retrofit <= 1994:
293 calc_u = 0.6
294 elif 1995 <= year_of_retrofit <= 2001:
295 calc_u = 0.5
296 elif 2002 <= year_of_retrofit <= 2008:
297 calc_u = 0.45
298 elif 2009 <= year_of_retrofit <= 2013:
299 calc_u = 0.24
300 elif year_of_retrofit >= 2014:
301 calc_u = 0.24
303 self.set_insulation(material, calc_u, year_of_retrofit,
304 ins_layer_index=ins_layer)
307 @property
308 def parent(self):
309 return self.__parent
311 @parent.setter
312 def parent(self, value):
313 if value is not None:
315 ass_error_1 = "Parent has to be an instance of ThermalZone()"
317 assert type(value).__name__ == "ThermalZone", ass_error_1
319 self.__parent = value
321 if type(self).__name__ == "InterzonalWall":
322 self.__parent.interzonal_walls.append(self)
323 elif type(self).__name__ == "InterzonalCeiling":
324 self.__parent.interzonal_ceilings.append(self)
325 elif type(self).__name__ == "InterzonalFloor":
326 self.__parent.interzonal_floors.append(self)
327 else:
328 raise ValueError('Instance of InterzonalWall not known')
330 if self.parent.parent is not None:
331 self.year_of_construction = \
332 self.parent.parent.year_of_construction
333 else:
334 pass
335 else:
337 self.__parent = None