diff --git a/.gitignore b/.gitignore
index d2f0d1029..f44985816 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@
#####################
.cache/
__pycache__/
+.coverage
#pip install #
#####################
@@ -48,4 +49,4 @@ dist
#ignore docs#
#####################
-doc/_build
\ No newline at end of file
+doc/_build
diff --git a/teaser/data/dataclass.py b/teaser/data/dataclass.py
index 6fbaacf51..9d7f32b7b 100644
--- a/teaser/data/dataclass.py
+++ b/teaser/data/dataclass.py
@@ -123,7 +123,7 @@ def load_mat_binding(self):
"""
try:
__xml_file_mat = open(self.path_mat, 'r+')
- version_parse = et.parse(self.path_tb)
+ version_parse = et.parse(self.path_mat)
except:
__xml_file_mat = open(self.path_mat, 'w')
version_parse = False
diff --git a/teaser/data/input/teaserxml_input.py b/teaser/data/input/teaserxml_input.py
index 367618b05..95ad70b32 100644
--- a/teaser/data/input/teaserxml_input.py
+++ b/teaser/data/input/teaserxml_input.py
@@ -135,10 +135,14 @@ def _load_building(prj, pyxb_bld, type, project_bind):
pyxb_ahu.by_pass_dehumidification
bldg.central_ahu.efficiency_recovery = pyxb_ahu.efficiency_recovery
- if float(project_bind.version) >= 0.5:
- bldg.central_ahu.efficiency_recovery_false = \
- pyxb_ahu.efficiency_recovery_false
- else:
+ try:
+ if float(project_bind.version) >= 0.5:
+ bldg.central_ahu.efficiency_recovery_false = \
+ pyxb_ahu.efficiency_recovery_false
+ else:
+ bldg.central_ahu.efficiency_recovery_false = \
+ pyxb_ahu.efficiency_revocery_false
+ except AttributeError:
bldg.central_ahu.efficiency_recovery_false = \
pyxb_ahu.efficiency_revocery_false
@@ -191,10 +195,14 @@ def _load_building(prj, pyxb_bld, type, project_bind):
zone.use_conditions.daily_operation_heating = \
pyxb_use.UsageOperationTime.daily_operation_heating
- if float(project_bind.version) >= 0.4:
- zone.use_conditions.maintained_illuminance = \
- pyxb_use.Lighting.maintained_illuminance
- else:
+ try:
+ if float(project_bind.version) >= 0.4:
+ zone.use_conditions.maintained_illuminance = \
+ pyxb_use.Lighting.maintained_illuminance
+ else:
+ zone.use_conditions.maintained_illuminance = \
+ pyxb_use.Lighting.maintained_illuminace
+ except AttributeError:
zone.use_conditions.maintained_illuminance = \
pyxb_use.Lighting.maintained_illuminace
diff --git a/teaser/examples/e5_load.py b/teaser/examples/e5_load.py
index 9247d10ed..86f5a5687 100644
--- a/teaser/examples/e5_load.py
+++ b/teaser/examples/e5_load.py
@@ -19,7 +19,8 @@ def example_save():
# To load data from *.teaserXML we can use a simple API function. So
# first we need to instantiate our API (similar to example
# e1_generate_archetype). The XML file is called
- # `ArchetypeExample.teaserXML` and saved in the default path.
+ # `ArchetypeExample.teaserXML` and saved in the default path. You need to
+ # run e4 first before you can load this example file.
from teaser.project import Project
@@ -31,6 +32,11 @@ def example_save():
prj.load_project(
path=load_xml)
+ prj = Project()
+ prj.load_project(utilities.get_full_path(
+ "examples/examplefiles/new.teaserXML"))
+ prj.save_project(file_name="new", path=None)
+
# To reload data from a pickle file, we do not need to instantiate an
# API, as pickle will automatically instantiate all classes as they have
@@ -44,6 +50,23 @@ def example_save():
pickle_prj = pickle.load(open(load_pickle, "rb"))
+ # The last option to import data into TEASER is using a CityGML file. The
+ # import of CityGML underlies some limitations e.g. concerning data
+ # given in the file and the way the buildings are modeled.
+
+ prj_gml = Project()
+
+ load_gml = utilities.get_full_path(os.path.join(
+ 'examples',
+ 'examplefiles',
+ 'CityGMLSample.gml'))
+
+ prj_gml.load_citygml(path=load_gml)
+
+ # After you imported your teaser project one or another way into you
+ # python environment you can access variables and functions.
+
+
if __name__ == '__main__':
example_save()
diff --git a/teaser/examples/examplefiles/CityGMLSample.gml b/teaser/examples/examplefiles/CityGMLSample.gml
new file mode 100644
index 000000000..88fcb2bd3
--- /dev/null
+++ b/teaser/examples/examplefiles/CityGMLSample.gml
@@ -0,0 +1,622 @@
+
+
+ Simple 3D city model LOD2 without Appearance
+
+
+ 458868.0 5438343.0 112.0
+ 458892.0 5438362.0 117.0
+
+
+
+
+ BSO_Office_lod20
+ 1120
+ 1985
+ 24.0
+ 6
+ 4.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291473.5 5630136.0 172.0 291473.5 5630181.0 172.0 291613.5 5630181.0 172.0 291613.5 5630136.0 172.0 291473.5 5630136.0 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291473.5 5630136.0 196.0 291613.5 5630136.0 196.0 291613.5 5630181.0 196.0 291473.5 5630181.0 196.0 291473.5 5630136.0 196.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291473.5 5630181.0 172.0 291473.5 5630181.0 196.0 291613.5 5630181.0 196.0 291613.5 5630181.0 172.0 291473.5 5630181.0 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291473.5 5630136.0 172.0 291613.5 5630136.0 172.0 291613.5 5630136.0 196.0 291473.5 5630136.0 196.0 291473.5 5630136.0 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291613.5 5630136.0 172.0 291613.5 5630181.0 172.0 291613.5 5630181.0 196.0 291613.5 5630136.0 196.0 291613.5 5630136.0 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291473.5 5630136.0 172.0 291473.5 5630136.0 196.0 291473.5 5630181.0 196.0 291473.5 5630181.0 172.0 291473.5 5630136.0 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+ BSO_Office_lod21
+ 1120
+ 1985
+ 24.0
+ 6
+ 4.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291496.0 5630193.5 172.0 291496.0 5630228.5 172.0 291566.0 5630228.5 172.0 291566.0 5630193.5 172.0 291496.0 5630193.5 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291496.0 5630193.5 196.0 291566.0 5630193.5 196.0 291566.0 5630228.5 196.0 291496.0 5630228.5 196.0 291496.0 5630193.5 196.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291496.0 5630228.5 172.0 291496.0 5630228.5 196.0 291566.0 5630228.5 196.0 291566.0 5630228.5 172.0 291496.0 5630228.5 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291496.0 5630193.5 172.0 291566.0 5630193.5 172.0 291566.0 5630193.5 196.0 291496.0 5630193.5 196.0 291496.0 5630193.5 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291566.0 5630193.5 172.0 291566.0 5630228.5 172.0 291566.0 5630228.5 196.0 291566.0 5630193.5 196.0 291566.0 5630193.5 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291496.0 5630193.5 172.0 291496.0 5630193.5 196.0 291496.0 5630228.5 196.0 291496.0 5630228.5 172.0 291496.0 5630193.5 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+ BSO_Office_lod10
+ 1120
+ 1985
+ 36.0
+ 9
+ 4.0
+
+
+
+
+
+
+
+
+ 291496.0 5630240.5 172.0 291496.0 5630285.5 172.0 291566.0 5630285.5 172.0 291566.0 5630240.5 172.0 291496.0 5630240.5 172.0
+
+
+
+
+
+
+
+
+ 291496.0 5630240.5 208.0 291566.0 5630240.5 208.0 291566.0 5630285.5 208.0 291496.0 5630285.5 208.0 291496.0 5630240.5 208.0
+
+
+
+
+
+
+
+
+ 291496.0 5630285.5 172.0 291496.0 5630285.5 208.0 291566.0 5630285.5 208.0 291566.0 5630285.5 172.0 291496.0 5630285.5 172.0
+
+
+
+
+
+
+
+
+ 291496.0 5630240.5 172.0 291566.0 5630240.5 172.0 291566.0 5630240.5 208.0 291496.0 5630240.5 208.0 291496.0 5630240.5 172.0
+
+
+
+
+
+
+
+
+ 291566.0 5630240.5 172.0 291566.0 5630285.5 172.0 291566.0 5630285.5 208.0 291566.0 5630240.5 208.0 291566.0 5630240.5 172.0
+
+
+
+
+
+
+
+
+ 291496.0 5630240.5 172.0 291496.0 5630240.5 208.0 291496.0 5630285.5 208.0 291496.0 5630285.5 172.0 291496.0 5630240.5 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+ BSO_Office_lod11
+ 1120
+ 1985
+ 32.0
+ 8
+ 4.0
+
+
+
+
+
+
+
+
+ 291581.0 5630202.5 172.0 291581.0 5630272.5 172.0 291616.0 5630272.5 172.0 291616.0 5630202.5 172.0 291581.0 5630202.5 172.0
+
+
+
+
+
+
+
+
+ 291581.0 5630202.5 204.0 291616.0 5630202.5 204.0 291616.0 5630272.5 204.0 291581.0 5630272.5 204.0 291581.0 5630202.5 204.0
+
+
+
+
+
+
+
+
+ 291581.0 5630272.5 172.0 291581.0 5630272.5 204.0 291616.0 5630272.5 204.0 291616.0 5630272.5 172.0 291581.0 5630272.5 172.0
+
+
+
+
+
+
+
+
+ 291581.0 5630202.5 172.0 291616.0 5630202.5 172.0 291616.0 5630202.5 204.0 291581.0 5630202.5 204.0 291581.0 5630202.5 172.0
+
+
+
+
+
+
+
+
+ 291616.0 5630202.5 172.0 291616.0 5630272.5 172.0 291616.0 5630272.5 204.0 291616.0 5630202.5 204.0 291616.0 5630202.5 172.0
+
+
+
+
+
+
+
+
+ 291581.0 5630202.5 172.0 291581.0 5630202.5 204.0 291581.0 5630272.5 204.0 291581.0 5630272.5 172.0 291581.0 5630202.5 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+ BSO_Residential_lod20
+ 1000
+ 1950
+ 12.0
+ 2
+ 4.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291659.4951905284 5630160.4198729815 172.0 291646.5048094716 5630152.9198729815 172.0 291641.5048094716 5630161.5801270185 172.0 291654.4951905284 5630169.0801270185 172.0 291659.4951905284 5630160.4198729815 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291654.4951905284 5630169.0801270185 179.0 291641.5048094716 5630161.5801270185 179.0 291644.0048094716 5630157.25 184.0 291656.9951905284 5630164.75 184.0 291654.4951905284 5630169.0801270185 179.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291659.4951905284 5630160.4198729815 179.0 291656.9951905284 5630164.75 184.0 291644.0048094716 5630157.25 184.0 291646.5048094716 5630152.9198729815 179.0 291659.4951905284 5630160.4198729815 179.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291646.5048094716 5630152.9198729815 172.0 291646.5048094716 5630152.9198729815 179.0 291644.0048094716 5630157.25 184.0 291641.5048094716 5630161.5801270185 179.0 291641.5048094716 5630161.5801270185 172.0 291646.5048094716 5630152.9198729815 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291659.4951905284 5630160.4198729815 172.0 291654.4951905284 5630169.0801270185 172.0 291654.4951905284 5630169.0801270185 179.0 291656.9951905284 5630164.75 184.0 291659.4951905284 5630160.4198729815 179.0 291659.4951905284 5630160.4198729815 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291654.4951905284 5630169.0801270185 172.0 291641.5048094716 5630161.5801270185 172.0 291641.5048094716 5630161.5801270185 179.0 291654.4951905284 5630169.0801270185 179.0 291654.4951905284 5630169.0801270185 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 291659.4951905284 5630160.4198729815 172.0 291659.4951905284 5630160.4198729815 179.0 291646.5048094716 5630152.9198729815 179.0 291646.5048094716 5630152.9198729815 172.0 291659.4951905284 5630160.4198729815 172.0
+
+
+
+
+
+
+
+
+
+
+
+
+ BSO_Residential_lod10
+ 1000
+ 1950
+ 12.0
+ 2
+ 4.0
+
+
+
+
+
+
+
+
+ 291645.5 5630243.5 172.0 291645.5 5630258.5 172.0 291655.5 5630258.5 172.0 291655.5 5630243.5 172.0 291645.5 5630243.5 172.0
+
+
+
+
+
+
+
+
+ 291645.5 5630243.5 184.0 291655.5 5630243.5 184.0 291655.5 5630258.5 184.0 291645.5 5630258.5 184.0 291645.5 5630243.5 184.0
+
+
+
+
+
+
+
+
+ 291645.5 5630258.5 172.0 291645.5 5630258.5 184.0 291655.5 5630258.5 184.0 291655.5 5630258.5 172.0 291645.5 5630258.5 172.0
+
+
+
+
+
+
+
+
+ 291645.5 5630243.5 172.0 291655.5 5630243.5 172.0 291655.5 5630243.5 184.0 291645.5 5630243.5 184.0 291645.5 5630243.5 172.0
+
+
+
+
+
+
+
+
+ 291655.5 5630243.5 172.0 291655.5 5630258.5 172.0 291655.5 5630258.5 184.0 291655.5 5630243.5 184.0 291655.5 5630243.5 172.0
+
+
+
+
+
+
+
+
+ 291645.5 5630243.5 172.0 291645.5 5630243.5 184.0 291645.5 5630258.5 184.0 291645.5 5630258.5 172.0 291645.5 5630243.5 172.0
+
+
+
+
+
+
+
+
+
+
+
diff --git a/teaser/examples/examplefiles/VDI6007_Room1.teaserXML b/teaser/examples/examplefiles/VDI6007_Room1.teaserXML
index d21078885..b4ad542bf 100644
--- a/teaser/examples/examplefiles/VDI6007_Room1.teaserXML
+++ b/teaser/examples/examplefiles/VDI6007_Room1.teaserXML
@@ -1,5 +1,5 @@
-
+
VDI6007_1_TEASER_Matlab
none
diff --git a/teaser/examples/examplefiles/VDI6007_Room10.teaserXML b/teaser/examples/examplefiles/VDI6007_Room10.teaserXML
index 2400d7e2e..f31d9e13f 100644
--- a/teaser/examples/examplefiles/VDI6007_Room10.teaserXML
+++ b/teaser/examples/examplefiles/VDI6007_Room10.teaserXML
@@ -1,5 +1,5 @@
-
+
VDI6007_10_TEASER_Matlab
none
diff --git a/teaser/examples/examplefiles/VDI6007_Room3.teaserXML b/teaser/examples/examplefiles/VDI6007_Room3.teaserXML
index 14f0cbe5c..2d5060f48 100644
--- a/teaser/examples/examplefiles/VDI6007_Room3.teaserXML
+++ b/teaser/examples/examplefiles/VDI6007_Room3.teaserXML
@@ -1,5 +1,5 @@
-
+
VDI6007_2_TEASER_Matlab
none
diff --git a/teaser/examples/examplefiles/VDI6007_Room8.teaserXML b/teaser/examples/examplefiles/VDI6007_Room8.teaserXML
index 0af6f0636..3cba1b9d1 100644
--- a/teaser/examples/examplefiles/VDI6007_Room8.teaserXML
+++ b/teaser/examples/examplefiles/VDI6007_Room8.teaserXML
@@ -1,5 +1,5 @@
-
+
VDI6007_3_TEASER_Matlab
none
diff --git a/teaser/examples/examplefiles/new.teaserXML b/teaser/examples/examplefiles/new.teaserXML
index 03160a89e..5321c7863 100644
--- a/teaser/examples/examplefiles/new.teaserXML
+++ b/teaser/examples/examplefiles/new.teaserXML
@@ -1,5 +1,5 @@
-
+
B1988
Templergraben 55
diff --git a/teaser/project.py b/teaser/project.py
index 24372148d..85445c52f 100644
--- a/teaser/project.py
+++ b/teaser/project.py
@@ -33,12 +33,8 @@
from teaser.logic.archetypebuildings.bmvbs.singlefamilydwelling import \
SingleFamilyDwelling
from teaser.logic.simulation.modelicainfo import ModelicaInfo
-
-try:
- import teaser.data.output.citygml_output as citygml_out
- import teaser.data.input.citygml_input as citygml_in
-except UserWarning:
- warnings.warn("No CityGML module found, no CityGML import/export")
+import teaser.data.output.citygml_output as citygml_out
+import teaser.data.input.citygml_input as citygml_in
class Project(object):
@@ -153,13 +149,12 @@ def calc_all_buildings(self, raise_errors=False):
number_of_elements=self._number_of_elements_calc,
merge_windows=self._merge_windows_calc,
used_library=self._used_library_calc)
- except UserWarning:
+ except ZeroDivisionError:
warnings.warn(
"Following building can't be calculated and is "
"removed from buildings list. Use raise_errors=True "
"to get python errors and stop TEASER from deleting "
- "this building:",
- bldg, bldg.name)
+ "this building:" + bldg.name)
def retrofit_all_buildings(
self,
@@ -1200,8 +1195,7 @@ def export_aixlib(
buildings=[bldg],
prj=self,
path=path)
- else:
- pass
+
def export_annex(
self,
@@ -1245,8 +1239,7 @@ def export_annex(
buildings=[bldg],
prj=self,
path=path)
- else:
- pass
+
def export_parameters_txt(self, path=None):
"""Exports parameters of all buildings in a readable text file
@@ -1379,10 +1372,6 @@ def name(self, value):
regex = re.compile('[^a-zA-z0-9]')
self._name = regex.sub('', value)
else:
- try:
- value = str(value)
- regex = re.compile('[^a-zA-z0-9]')
- self._name = regex.sub('', value)
-
- except ValueError:
- print("Can't convert name to string")
+ value = str(value)
+ regex = re.compile('[^a-zA-z0-9]')
+ self._name = regex.sub('', value)
diff --git a/tests/helptest.py b/tests/helptest.py
index 4c50a5042..ae840b98e 100644
--- a/tests/helptest.py
+++ b/tests/helptest.py
@@ -15,7 +15,7 @@ def building_test2(prj):
"""
building which is hardcoded for testing
"""
- bldg = Building(parent = prj)
+ bldg = Building(parent=prj)
'''Set some building parameters'''
@@ -29,7 +29,7 @@ def building_test2(prj):
'''Instantiate a ThermalZone class, with building as parent and set some
parameters of the thermal zone'''
- tz = ThermalZone(parent = bldg)
+ tz = ThermalZone(parent=bldg)
tz.name = "Living Room"
tz.area = 140.0
tz.volume = tz.area * bldg.number_of_floors * bldg.height_of_floors
@@ -37,13 +37,13 @@ def building_test2(prj):
tz.use_conditions = BoundaryConditions(tz)
tz.use_conditions.usage = "Living"
- tz.use_conditions.cooling_time = [5,18]
- tz.use_conditions.heating_time = [5,18]
+ tz.use_conditions.cooling_time = [5, 18]
+ tz.use_conditions.heating_time = [5, 18]
tz.use_conditions.set_temp_heat = 288.15
tz.use_conditions.set_temp_cool = 298.15
- tz.use_conditions.temp_set_back= 4.0
- tz.use_conditions.min_air_exchange= 0.0
- tz.use_conditions.min_ahu= 0.0
+ tz.use_conditions.temp_set_back = 4.0
+ tz.use_conditions.min_air_exchange = 0.0
+ tz.use_conditions.min_ahu = 0.0
tz.use_conditions.max_ahu = 2.6
tz.use_conditions.with_ahu = True
tz.use_conditions.persons = 3
@@ -82,7 +82,7 @@ def building_test2(prj):
#out_wall_dict = collections.OrderedDict(sorted(out_wall_dict.items(), key=lambda t: t[0]))
for value in out_wall_dict:
'''instantiate OuterWall class'''
- out_wall = OuterWall(parent = tz)
+ out_wall = OuterWall(parent=tz)
out_wall.name = value[0]
out_wall.year_of_construction = value[1][0]
out_wall.construction_type = value[1][1]
@@ -121,7 +121,7 @@ def building_test2(prj):
for value in in_wall_dict:
'''instantiate OuterWall class'''
- in_wall = InnerWall(parent = tz)
+ in_wall = InnerWall(parent=tz)
in_wall.name = value[0]
in_wall.year_of_construction = value[1][0]
in_wall.construction_type = value[1][1]
@@ -156,7 +156,7 @@ def building_test2(prj):
5.0, 90.0, 270.0]]]
for value in win_dict:
- win = Window(parent = tz)
+ win = Window(parent=tz)
win.construction_type = "Window"
win.name = value[0]
win.area = value[1][1]
@@ -172,7 +172,7 @@ def building_test2(prj):
win.a_conv = 0.03
win.shading_g_total = 1.0
win.shading_max_irr = 180.0
- win_layer = Layer(parent = win)
+ win_layer = Layer(parent=win)
win_layer.id = 1
win_layer.thickness = 0.024
@@ -181,7 +181,7 @@ def building_test2(prj):
win_material.thermal_conduc = 0.067
win_material.transmittance = 0.9
- roof = Rooftop(parent = tz)
+ roof = Rooftop(parent=tz)
roof.name = "Roof"
roof.year_of_construction = bldg.year_of_construction
roof.construction_type = "heavy"
@@ -205,7 +205,7 @@ def building_test2(prj):
roof_material.thermal_conduc = 2.0
roof_material.heat_capac = 0.84
- ground = GroundFloor(parent = tz)
+ ground = GroundFloor(parent=tz)
ground.name = "ground"
ground.year_of_construction = bldg.year_of_construction
ground.construction_type = "heavy"
diff --git a/tests/test_data.py b/tests/test_data.py
index a5c44fdee..3c59d89e3 100644
--- a/tests/test_data.py
+++ b/tests/test_data.py
@@ -1,13 +1,13 @@
-'''
+"""
Created July 2015
@author: TEASER 4 Development Team
-'''
+"""
from teaser.logic import utilities
from teaser.project import Project
import math
-
+import os
import helptest
prj = Project(True)
@@ -18,7 +18,7 @@ class Test_teaser(object):
global prj
def test_calc_vdi_room1(self):
- '''Parameter Verification for rouvel room1'''
+ """Parameter Verification for rouvel room1"""
import teaser.examples.verification.verification_room1 as room1
room1_prj = room1.parameter_room1()
@@ -43,7 +43,7 @@ def test_calc_vdi_room1(self):
assert round(zone_attr.alpha_comb_outer_ow, 1) == 25.0
def test_calc_vdi_room3(self):
- '''Parameter Verification for room 3'''
+ """Parameter Verification for room 3"""
import teaser.examples.verification.verification_room3 as room3
room3_prj = room3.parameter_room3()
@@ -68,7 +68,7 @@ def test_calc_vdi_room3(self):
assert round(zone_attr.alpha_comb_outer_ow, 1) == 25.0
def test_calc_vdi_room8(self):
- '''Parameter Verification for room 8'''
+ """Parameter Verification for room 8"""
import teaser.examples.verification.verification_room8 as room8
room8_prj = room8.parameter_room8()
@@ -93,10 +93,10 @@ def test_calc_vdi_room8(self):
# EBC Calculation Verification, with parameters from TEASER3
def test_calc_ebc(self):
- '''
+ """
Parameter Verification for ebc calculation method. Values are compared
with TEASER3 values.
- '''
+ """
prj.set_default()
prj.load_project(utilities.get_full_path("examples/examplefiles"
"/new.teaserXML"))
@@ -129,10 +129,10 @@ def test_calc_ebc(self):
assert round(zone_attr.weightfactor_ground, 5) == 0.54398
def test_type_bldg_office_with_calc(self):
- '''
+ """
Verification of the type building generation of an office building.
Values are compared with TEASER3 values.
- '''
+ """
from teaser.logic.archetypebuildings.bmvbs.office import Office
prj.set_default()
@@ -257,10 +257,10 @@ def test_type_bldg_office_with_calc(self):
assert round(test_office.get_window_area(270), 0) == 315
def test_type_bldg_institute4_with_calc(self):
- '''
+ """
Verification of the type building generation of an office building.
Values are compared with TEASER3 values.
- '''
+ """
from teaser.logic.archetypebuildings.bmvbs.custom.institute4 import \
Institute4
@@ -313,10 +313,10 @@ def test_type_bldg_institute4_with_calc(self):
assert round(test_institute4.get_window_area(270), 0) == 28
def test_type_bldg_institute8_with_calc(self):
- '''
+ """
Verification of the type building generation of an office building.
Values are compared with TEASER3 values.
- '''
+ """
from teaser.logic.archetypebuildings.bmvbs.custom.institute8 import \
Institute8
@@ -369,10 +369,10 @@ def test_type_bldg_institute8_with_calc(self):
assert round(test_institute8.get_window_area(270), 0) == 28
def test_type_bldg_institute_with_calc(self):
- '''
+ """
Verification of the type building generation of an office building.
Values are compared with TEASER3 values.
- '''
+ """
from teaser.logic.archetypebuildings.bmvbs.custom.institute import \
Institute
@@ -425,10 +425,10 @@ def test_type_bldg_institute_with_calc(self):
assert round(test_institute.get_window_area(270), 0) == 28
def test_type_bldg_residential_with_calc(self):
- '''
+ """
Verification of the type building generation of an office building.
Values are compared with TEASER3 values.
- '''
+ """
from teaser.logic.archetypebuildings.bmvbs.singlefamilydwelling \
import SingleFamilyDwelling
@@ -556,7 +556,7 @@ def test_type_bldg_residential_with_calc(self):
# not if it produces reliable results.
def test_load_save_project(self):
- '''test of load_project and save_project'''
+ """test of load_project and save_project"""
prj.load_project(utilities.get_full_path(("examples/examplefiles"
"/new.teaserXML")))
@@ -565,37 +565,44 @@ def test_load_save_project(self):
tz_area = sum([tz.area for tz in prj.buildings[
-1].thermal_zones])
assert prj.buildings[-1].net_leased_area == tz_area
- prj.save_project("unitTest")
+ prj.save_project(file_name="unitTest", path=None)
+ prj.save_project(file_name=None, path=utilities.get_default_path())
prj.set_default()
- # commented until we find solution for opengis PyXB bindings
def test_save_citygml(self):
- '''test of save_gml'''
+ """test of save_gml"""
helptest.building_test2(prj)
- prj.save_citygml("unitTest")
+ prj.save_citygml(file_name="unitTest", path=None)
+ prj.save_citygml(file_name=None, path=utilities.get_default_path())
+ prj.set_default()
+
+ def test_load_citygml(self):
+ """test of load_gml"""
prj.set_default()
+ prj.load_citygml(utilities.get_full_path(
+ "examples/examplefiles/CityGMLSample.gml"))
def test_calc_all_buildings(self):
- '''test of calc_all_buildings, no calculation verification'''
+ """test of calc_all_buildings, no calculation verification"""
helptest.building_test2(prj)
helptest.building_test2(prj)
prj.number_of_elements_calc = 2
- prj.merge_windows_calc = True
+ prj.merge_windows_calc = False
prj.used_library_calc = 'AixLib'
prj.calc_all_buildings()
prj.number_of_elements_calc = 2
prj.merge_windows_calc = False
prj.used_library_calc = 'AixLib'
- prj.calc_all_buildings()
+ prj.calc_all_buildings(raise_errors=True)
def test_retrofit_all_buildings(self):
- '''test of retrofit_all_buildings, no calculation verification'''
+ """test of retrofit_all_buildings, no calculation verification"""
prj.retrofit_all_buildings(2015)
def test_export_aixlib(self):
- '''test of export_aixlib, no calculation verification'''
+ """test of export_aixlib, no calculation verification"""
prj.number_of_elements_calc = 1
prj.merge_windows_calc = False
@@ -621,8 +628,28 @@ def test_export_aixlib(self):
prj.calc_all_buildings()
prj.export_aixlib()
+ prj.number_of_elements_calc = 4
+ prj.merge_windows_calc = False
+ prj.used_library_calc = 'AixLib'
+ prj.calc_all_buildings()
+ prj.export_aixlib(building_model="Test",
+ zone_model="Test",
+ corG="Test")
+
+ prj.number_of_elements_calc = 4
+ prj.merge_windows_calc = False
+ prj.used_library_calc = 'AixLib'
+ prj.calc_all_buildings()
+ prj.buildings.append(prj.buildings[-1])
+
+ prj.number_of_elements_calc = 4
+ prj.merge_windows_calc = False
+ prj.used_library_calc = 'AixLib'
+ prj.calc_all_buildings()
+ prj.export_aixlib(path=utilities.get_default_path())
+
def test_export_annex(self):
- '''test of export_annex, no calculation verification'''
+ """test of export_annex, no calculation verification"""
prj.number_of_elements_calc = 1
prj.merge_windows_calc = True
@@ -664,10 +691,21 @@ def test_export_annex(self):
prj.used_library_calc = 'Annex60'
prj.calc_all_buildings()
prj.export_annex()
+ prj.number_of_elements_calc = 4
+ prj.merge_windows_calc = False
+ prj.used_library_calc = 'Annex60'
+ prj.calc_all_buildings()
+ prj.export_annex(internal_id=prj.buildings[-1].internal_id)
+ prj.number_of_elements_calc = 4
+ prj.merge_windows_calc = False
+ prj.used_library_calc = 'Annex60'
+ prj.calc_all_buildings()
+ prj.export_annex(path=utilities.get_default_path())
prj.set_default()
def test_export_parameters_txt(self):
- '''test of the export of the readable parameter output'''
+ """test of the export of the readable parameter output"""
+ helptest.building_test2(prj)
prj.number_of_elements_calc = 1
prj.merge_windows_calc = True
prj.used_library_calc = 'AixLib'
@@ -708,16 +746,21 @@ def test_export_parameters_txt(self):
prj.used_library_calc = 'AixLib'
prj.calc_all_buildings()
prj.export_parameters_txt()
+ prj.number_of_elements_calc = 4
+ prj.merge_windows_calc = False
+ prj.used_library_calc = 'AixLib'
+ prj.calc_all_buildings()
+ prj.export_parameters_txt(path=utilities.get_default_path())
prj.set_default()
def test_instantiate_data_class(self):
- '''test of instantiate_data_class'''
+ """test of instantiate_data_class"""
prj.instantiate_data_class()
def test_type_bldg_office(self):
- '''test of type_bldg_office, no calculation verification
- '''
+ """test of type_bldg_office, no calculation verification
+ """
prj.type_bldg_office(name="TestBuilding",
year_of_construction=1988,
@@ -742,7 +785,7 @@ def test_type_bldg_office(self):
construction_type="heavy")
def test_type_bldg_institute(self):
- '''test of type_bldg_institute, no calculation verification'''
+ """test of type_bldg_institute, no calculation verification"""
prj.type_bldg_institute(name="TestBuilding",
year_of_construction=1988,
@@ -767,7 +810,7 @@ def test_type_bldg_institute(self):
construction_type="heavy")
def test_type_bldg_institute4(self):
- '''test of type_bldg_institute4, no calculation verification'''
+ """test of type_bldg_institute4, no calculation verification"""
prj.type_bldg_institute4(name="TestBuilding",
year_of_construction=1988,
@@ -792,7 +835,7 @@ def test_type_bldg_institute4(self):
construction_type="heavy")
def test_type_bldg_institute8(self):
- '''test of type_bldg_institute8, no calculation verification'''
+ """test of type_bldg_institute8, no calculation verification"""
prj.type_bldg_institute8(name="TestBuilding",
year_of_construction=1988,
@@ -817,7 +860,7 @@ def test_type_bldg_institute8(self):
construction_type="heavy")
def test_type_bldg_residential(self):
- '''test of type_bldg_residential, no calculation verification'''
+ """test of type_bldg_residential, no calculation verification"""
prj.type_bldg_residential(name="TestBuilding",
year_of_construction=1988,
@@ -848,7 +891,17 @@ def test_type_bldg_residential(self):
construction_type="heavy")
def test_est_bldgs(self):
- '''test of type_bldg_residential, no calculation verification'''
+ """test of type_bldg_est, no calculation verification"""
+
+ prj.type_bldg_est1a(
+ name="TestBuilding",
+ year_of_construction=1988,
+ number_of_floors=7,
+ height_of_floors=1,
+ net_leased_area=1988,
+ with_ahu=False,
+ neighbour_buildings=None,
+ construction_type=None)
prj.add_residential(
method='urbanrenet',
@@ -867,6 +920,17 @@ def test_est_bldgs(self):
construction_type="heavy",
number_of_apartments=1)
+ prj.type_bldg_est1b(
+ name="TestBuilding",
+ year_of_construction=1988,
+ number_of_floors=7,
+ height_of_floors=1,
+ net_leased_area=1988,
+ with_ahu=False,
+ neighbour_buildings=None,
+ construction_type=None,
+ number_of_apartments=2)
+
prj.add_residential(
method='urbanrenet',
usage='est1b',
@@ -935,6 +999,17 @@ def test_est_bldgs(self):
construction_type="heavy",
number_of_apartments=1)
+ prj.type_bldg_est4b(
+ name="TestBuilding",
+ year_of_construction=1988,
+ number_of_floors=7,
+ height_of_floors=1,
+ net_leased_area=1988,
+ with_ahu=False,
+ neighbour_buildings=None,
+ construction_type=None,
+ number_of_apartments=2)
+
prj.add_residential(
method='urbanrenet',
usage='est4b',
@@ -986,6 +1061,17 @@ def test_est_bldgs(self):
construction_type="heavy",
number_of_apartments=1)
+ prj.type_bldg_est7(
+ name="TestBuilding",
+ year_of_construction=1988,
+ number_of_floors=7,
+ height_of_floors=1,
+ net_leased_area=1988,
+ with_ahu=False,
+ neighbour_buildings=None,
+ construction_type=None,
+ number_of_apartments=2)
+
prj.add_residential(
method='urbanrenet',
usage='est7',
@@ -1040,14 +1126,14 @@ def test_est_bldgs(self):
# methods in Building
def test_get_inner_wall_area(self):
- '''test of get_inner_wall_area'''
+ """test of get_inner_wall_area"""
prj.set_default()
helptest.building_test2(prj)
sum_area = prj.buildings[-1].get_inner_wall_area()
assert round(sum_area, 1) == 34.0
def test_set_outer_wall_area(self):
- '''test of set_outer_wall_area'''
+ """test of set_outer_wall_area"""
print(prj.buildings[-1].thermal_zones[-1].outer_walls[1].area)
prj.buildings[-1].set_outer_wall_area(2.0, 0.0)
@@ -1057,26 +1143,26 @@ def test_set_outer_wall_area(self):
assert round(therm_zone.outer_walls[1].area, 3) == 14.0
def test_get_outer_wall_area(self):
- '''test of get_outer_wall_area'''
+ """test of get_outer_wall_area"""
prj.buildings[-1].get_outer_wall_area(0.0)
therm_zone = prj.buildings[-1].thermal_zones[-1]
assert round(therm_zone.outer_walls[0].area, 3) == 2.0
assert round(therm_zone.outer_walls[1].area, 3) == 14.0
def test_set_window_area(self):
- '''test of set_window_area'''
+ """test of set_window_area"""
prj.buildings[-1].set_window_area(1.0, 90.0)
therm_zone = prj.buildings[-1].thermal_zones[-1]
assert round(therm_zone.windows[0].area, 3) == 1.0
def test_get_window_area(self):
- '''test of get_window_area'''
+ """test of get_window_area"""
prj.buildings[-1].get_window_area(90.0)
therm_zone = prj.buildings[-1].thermal_zones[-1]
assert round(therm_zone.windows[0].area, 3) == 1.0
def test_fill_outer_wall_area_dict(self):
- '''test of fill_outer_wall_area_dict'''
+ """test of fill_outer_wall_area_dict"""
prj.buildings[-1].fill_outer_area_dict()
outwall_dict_round = {key: round(value, 2) for key, value in
@@ -1089,14 +1175,14 @@ def test_fill_outer_wall_area_dict(self):
270.0: 14.0}
def test_fill_window_area_dict(self):
- '''test of fill_window_area_dict'''
+ """test of fill_window_area_dict"""
prj.buildings[-1].fill_window_area_dict()
assert prj.buildings[-1].window_area == {90.0: 1.0,
180.0: 8.0,
270.0: 5.0}
def test_calc_building_parameter(self):
- '''test of calc_building_parameter'''
+ """test of calc_building_parameter"""
prj.set_default()
helptest.building_test2(prj)
@@ -1111,7 +1197,7 @@ def test_calc_building_parameter(self):
# methods in therm_zone
def test_calc_zone_parameters(self):
- '''test of calc zone parameter, no calculation verification'''
+ """test of calc zone parameter, no calculation verification"""
prj.buildings[-1].thermal_zones[-1].calc_zone_parameters(
number_of_elements=2, merge_windows=False)
@@ -1119,7 +1205,7 @@ def test_calc_zone_parameters(self):
number_of_elements=2, merge_windows=True)
def test_heat_load(self):
- '''test of heating_load'''
+ """test of heating_load"""
prj.set_default()
helptest.building_test2(prj)
prj.buildings[-1].thermal_zones[-1].infiltration_rate = 0.5
@@ -1131,17 +1217,99 @@ def test_heat_load(self):
prj.buildings[-1].thermal_zones[-1].model_attr.heat_load,
4) == 6659.6256
- def test_sum_building_elements(self):
- '''test of combine_building_elements'''
+ def test_sum_building_elements_one(self):
+ """test of combine_building_elements"""
prj.set_default()
helptest.building_test2(prj)
- from teaser.logic.buildingobjects.calculation.four_element import\
- FourElement
+ from teaser.logic.buildingobjects.calculation.one_element import\
+ OneElement
therm_zone = prj.buildings[-1].thermal_zones[-1]
- calc_attr = FourElement(therm_zone, merge_windows=True, t_bt=5)
+ calc_attr = OneElement(therm_zone, merge_windows=False, t_bt=5)
+
+ helplist = therm_zone.outer_walls + therm_zone.rooftops +\
+ therm_zone.ground_floors + therm_zone.inner_walls +\
+ therm_zone.ceilings + therm_zone.floors + therm_zone.windows
+
+ for element in helplist:
+ element.calc_equivalent_res()
+ element.calc_ua_value()
+
+ calc_attr._sum_outer_wall_elements()
+ calc_attr._sum_window_elements()
+
+ # outerwall
+ assert round(calc_attr.ua_value_ow, 16) == 135.5818558809656
+ assert round(calc_attr.area_ow, 1) == 328.0
+ assert round(calc_attr.r_conv_inner_ow, 19) == 0.0016512549537648611
+ assert round(calc_attr.r_rad_inner_ow, 18) == 0.000609756097560976
+ assert round(calc_attr.r_comb_inner_ow, 20) == 0.00044531528322052017
+ assert round(calc_attr.r_conv_outer_ow, 20) == 0.00026595744680851064
+ assert round(calc_attr.r_rad_outer_ow, 18) == 0.001063829787234043
+ assert round(calc_attr.r_comb_outer_ow, 20) == 0.0002127659574468085
+ assert round(calc_attr.alpha_conv_inner_ow, 5) == 1.84634
+ assert round(calc_attr.alpha_rad_inner_ow, 5) == 5.0
+ assert round(calc_attr.alpha_comb_inner_ow, 5) == 6.84634
+ assert round(calc_attr.alpha_conv_outer_ow, 1) == 20.0
+ assert round(calc_attr.alpha_rad_outer_ow, 5) == 5.0
+ assert round(calc_attr.alpha_comb_outer_ow, 1) == 25.0
+
+ # window
+ assert round(calc_attr.ua_value_win, 16) == 32.87895310796074
+ assert round(calc_attr.area_win, 1) == 18.0
+ assert round(calc_attr.r_conv_inner_win, 19) == 0.032679738562091505
+ assert round(calc_attr.r_rad_inner_win, 4) == 0.0111
+ assert round(calc_attr.r_comb_inner_win, 19) == 0.008291873963515755
+ assert round(calc_attr.r_conv_outer_win, 5) == 0.00278
+ assert round(calc_attr.r_rad_outer_win, 4) == 0.0111
+ assert round(calc_attr.r_comb_outer_win, 4) == 0.0022
+ assert round(calc_attr.alpha_conv_inner_win, 1) == 1.7
+ assert round(calc_attr.alpha_comb_outer_win, 1) == 25.0
+ assert round(calc_attr.alpha_conv_outer_win, 1) == 20.0
+ assert round(calc_attr.weighted_g_value, 3) == 0.789
+
+ def test_calc_chain_matrix_one(self):
+ """test of calc_chain_matrix"""
+
+ from teaser.logic.buildingobjects.calculation.one_element import \
+ OneElement
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+
+ calc_attr = OneElement(therm_zone, merge_windows=False, t_bt=5)
+
+ helplist = therm_zone.outer_walls + therm_zone.rooftops + \
+ therm_zone.ground_floors + therm_zone.inner_walls + \
+ therm_zone.ceilings + therm_zone.floors + therm_zone.windows
+
+ for element in helplist:
+ element.calc_equivalent_res()
+ element.calc_ua_value()
+
+ omega = (2 * math.pi / 86400 / 5)
+
+ helplist_outer_walls = therm_zone.outer_walls + therm_zone.rooftops +\
+ therm_zone.ground_floors + therm_zone.windows
+
+ r1_ow, c1_ow = calc_attr._calc_parallel_connection(
+ element_list=helplist_outer_walls,
+ omega=omega)
+ assert round(r1_ow, 14) == 0.00100751548411
+ assert round(c1_ow, 5) == 3648580.59312
+
+ def test_sum_building_elements_two(self):
+ """test of combine_building_elements"""
+ prj.set_default()
+ helptest.building_test2(prj)
+
+ from teaser.logic.buildingobjects.calculation.two_element import\
+ TwoElement
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+
+ calc_attr = TwoElement(therm_zone, merge_windows=False, t_bt=5)
helplist = therm_zone.outer_walls + therm_zone.rooftops +\
therm_zone.ground_floors + therm_zone.inner_walls +\
@@ -1152,8 +1320,6 @@ def test_sum_building_elements(self):
element.calc_ua_value()
calc_attr._sum_outer_wall_elements()
- calc_attr._sum_ground_floor_elements()
- calc_attr._sum_rooftop_elements()
calc_attr._sum_inner_wall_elements()
calc_attr._sum_window_elements()
@@ -1169,47 +1335,21 @@ def test_sum_building_elements(self):
assert round(calc_attr.alpha_comb_inner_iw, 1) == 7.7
# outerwall
- assert round(calc_attr.ua_value_ow, 16) == 19.83577523748189
- assert round(calc_attr.area_ow, 1) == 48.0
- assert round(calc_attr.r_conv_inner_ow, 19) == 0.007716049382716048
- assert round(calc_attr.r_rad_inner_ow, 18) == 0.004166666666666667
- assert round(calc_attr.r_comb_inner_ow, 20) == 0.0027056277056277055
- assert round(calc_attr.r_conv_outer_ow, 20) == 0.0010416666666666667
- assert round(calc_attr.r_rad_outer_ow, 18) == 0.004166666666666667
- assert round(calc_attr.r_comb_outer_ow, 20) == 0.0008333333333333334
- assert round(calc_attr.alpha_conv_inner_ow, 5) == 2.7
+ assert round(calc_attr.ua_value_ow, 16) == 135.5818558809656
+ assert round(calc_attr.area_ow, 1) == 328.0
+ assert round(calc_attr.r_conv_inner_ow, 19) == 0.0016512549537648611
+ assert round(calc_attr.r_rad_inner_ow, 18) == 0.000609756097560976
+ assert round(calc_attr.r_comb_inner_ow, 20) == 0.00044531528322052017
+ assert round(calc_attr.r_conv_outer_ow, 20) == 0.00026595744680851064
+ assert round(calc_attr.r_rad_outer_ow, 18) == 0.001063829787234043
+ assert round(calc_attr.r_comb_outer_ow, 20) == 0.0002127659574468085
+ assert round(calc_attr.alpha_conv_inner_ow, 5) == 1.84634
assert round(calc_attr.alpha_rad_inner_ow, 5) == 5.0
- assert round(calc_attr.alpha_comb_inner_ow, 5) == 7.7
+ assert round(calc_attr.alpha_comb_inner_ow, 5) == 6.84634
assert round(calc_attr.alpha_conv_outer_ow, 1) == 20.0
assert round(calc_attr.alpha_rad_outer_ow, 5) == 5.0
assert round(calc_attr.alpha_comb_outer_ow, 1) == 25.0
- # groundfloor
- assert round(calc_attr.ua_value_gf, 16) == 58.351477449455686
- assert round(calc_attr.area_gf, 1) == 140.0
- assert round(calc_attr.r_conv_inner_gf, 19) == 0.004201680672268907
- assert round(calc_attr.r_rad_inner_gf, 18) == 0.001428571428571429
- assert round(calc_attr.r_comb_inner_gf, 20) == 0.0010660980810234541
- assert round(calc_attr.alpha_conv_inner_gf, 5) == 1.7
- assert round(calc_attr.alpha_rad_inner_gf, 5) == 5.0
- assert round(calc_attr.alpha_comb_inner_gf, 5) == 6.7
-
- # outerwall
- assert round(calc_attr.ua_value_rt, 16) == 57.394603194028036
- assert round(calc_attr.area_rt, 1) == 140.0
- assert round(calc_attr.r_conv_inner_rt, 19) == 0.004201680672268907
- assert round(calc_attr.r_rad_inner_rt, 18) == 0.001428571428571429
- assert round(calc_attr.r_comb_inner_rt, 20) == 0.0010660980810234541
- assert round(calc_attr.r_conv_outer_rt, 20) == 0.00035714285714285714
- assert round(calc_attr.r_rad_outer_rt, 18) == 0.001428571428571429
- assert round(calc_attr.r_comb_outer_rt, 20) == 0.00028571428571428574
- assert round(calc_attr.alpha_conv_inner_rt, 5) == 1.7
- assert round(calc_attr.alpha_rad_inner_rt, 5) == 5.0
- assert round(calc_attr.alpha_comb_inner_rt, 5) == 6.7
- assert round(calc_attr.alpha_conv_outer_rt, 1) == 20.0
- assert round(calc_attr.alpha_rad_outer_rt, 5) == 5.0
- assert round(calc_attr.alpha_comb_outer_rt, 1) == 25.0
-
# window
assert round(calc_attr.ua_value_win, 16) == 32.87895310796074
assert round(calc_attr.area_win, 1) == 18.0
@@ -1224,13 +1364,23 @@ def test_sum_building_elements(self):
assert round(calc_attr.alpha_conv_outer_win, 1) == 20.0
assert round(calc_attr.weighted_g_value, 3) == 0.789
- def test_calc_chain_matrix(self):
- '''test of calc_chain_matrix'''
- from teaser.logic.buildingobjects.calculation.two_element import\
+ def test_calc_chain_matrix_two(self):
+ """test of calc_chain_matrix"""
+ from teaser.logic.buildingobjects.calculation.two_element import \
TwoElement
therm_zone = prj.buildings[-1].thermal_zones[-1]
+ calc_attr = TwoElement(therm_zone, merge_windows=False, t_bt=5)
+
+ helplist = therm_zone.outer_walls + therm_zone.rooftops + \
+ therm_zone.ground_floors + therm_zone.inner_walls + \
+ therm_zone.ceilings + therm_zone.floors + therm_zone.windows
+
+ for element in helplist:
+ element.calc_equivalent_res()
+ element.calc_ua_value()
+
omega = (2 * math.pi / 86400 / 5)
calc_attr = TwoElement(therm_zone, merge_windows=True, t_bt=5)
@@ -1253,95 +1403,588 @@ def test_calc_chain_matrix(self):
assert round(r1_iw, 13) == 0.0097195611408
assert round(c1_iw, 6) == 319983.518743
- def test_calc_weightfactor(self):
- '''test of calc_weightfactor'''
+ def test_sum_building_elements_three(self):
+ """test of combine_building_elements"""
prj.set_default()
helptest.building_test2(prj)
- prj.buildings[-1].calc_building_parameter(number_of_elements=2,
- merge_windows=True,
- used_library='AixLib')
-
- calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
- print(calc_attr.weightfactor_ow)
- weightfactors_test_list = [
- 0.024530650180761254,
- 0.03434291025306576,
- 0.024530650180761254,
- 0.03434291025306576,
- 0.3407000330729792]
- assert calc_attr.weightfactor_ow.sort() == \
- weightfactors_test_list.sort()
- weightfactors_test_list = [
- 0.0,
- 0.054214642472656345,
- 0.08674342795625017,
- 0.054214642472656345,
- 0.0]
- assert calc_attr.weightfactor_win.sort() ==\
- weightfactors_test_list.sort()
+ from teaser.logic.buildingobjects.calculation.three_element import\
+ ThreeElement
- prj.buildings[-1].thermal_zones[-1].weightfactor_ow = []
- prj.buildings[-1].thermal_zones[-1].weightfactor_win = []
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
- prj.buildings[-1].calc_building_parameter(number_of_elements=2,
- merge_windows=False,
- used_library='AixLib')
- calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+ calc_attr = ThreeElement(therm_zone, merge_windows=False, t_bt=5)
- weightfactors_test_list = [
- 0.03047939672771178,
- 0.04267115541879649,
- 0.03047939672771178,
- 0.04267115541879649,
- 0.423320678280269]
+ helplist = therm_zone.outer_walls + therm_zone.rooftops +\
+ therm_zone.ground_floors + therm_zone.inner_walls +\
+ therm_zone.ceilings + therm_zone.floors + therm_zone.windows
- assert calc_attr.weightfactor_ow.sort() ==\
- weightfactors_test_list.sort()
+ for element in helplist:
+ element.calc_equivalent_res()
+ element.calc_ua_value()
- weightfactors_test_list = [
- 0.0,
- 0.27777777777777778,
- 0.44444444444444453,
- 0.27777777777777778,
- 0.0]
- assert calc_attr.weightfactor_win.sort() ==\
- weightfactors_test_list.sort()
+ calc_attr._sum_outer_wall_elements()
+ calc_attr._sum_ground_floor_elements()
+ calc_attr._sum_inner_wall_elements()
+ calc_attr._sum_window_elements()
- def test_calc_two_element(self):
- '''test of calc_two_element'''
- prj.set_default()
- helptest.building_test2(prj)
+ # innerwall
- therm_zone = prj.buildings[-1].thermal_zones[-1]
- therm_zone.calc_zone_parameters(
- number_of_elements=2,
- merge_windows=True)
+ assert round(calc_attr.ua_value_iw, 16) == 14.286493860845841
+ assert round(calc_attr.area_iw, 1) == 34.0
+ assert round(calc_attr.r_conv_inner_iw, 18) == 0.010893246187363833
+ assert round(calc_attr.r_rad_inner_iw, 19) == 0.0058823529411764705
+ assert round(calc_attr.r_comb_inner_iw, 19) == 0.003819709702062643
+ assert round(calc_attr.alpha_conv_inner_iw, 1) == 2.7
+ assert round(calc_attr.alpha_rad_inner_iw, 1) == 5.0
+ assert round(calc_attr.alpha_comb_inner_iw, 1) == 7.7
- zone_attr = therm_zone.model_attr
- assert round(zone_attr.area_ow, 1) == 328.0
- assert round(zone_attr.ua_value_ow, 16) == 135.5818558809656
- assert round(zone_attr.r_conv_inner_ow, 16) == 0.0016512549537649
- assert round(zone_attr.r_rad_inner_ow, 16) == 0.000609756097561
- outer_conv_roof_temp = sum(
- 1 / roof.r_outer_conv for roof in therm_zone.rooftops)
- # old calc was only ow, in the new core we calc outer walls plus
- # rooftops, therefore we need to subtract it.
- r_outer_conv_ow_temp = 1 / (
- (1 / zone_attr.r_conv_outer_ow) - outer_conv_roof_temp)
- assert round(r_outer_conv_ow_temp, 9) == 0.001041667
- assert round(zone_attr.alpha_conv_inner_ow, 5) == 1.84634
- assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
- assert round(zone_attr.r1_win, 15) == 0.003316749585406
- assert round(zone_attr.r1_ow, 15) == 0.000772773294534
- assert round(zone_attr.r1_iw, 15) == 0.009719561140816
- # old calc core was without inner window radiation and without
- # combined alpha
- r_rest = zone_attr.r_rest_ow + 1 / (zone_attr.alpha_comb_outer_ow *
- zone_attr.area_ow)
- assert round(r_rest, 15) == 0.004740706924836
+ # outerwall
+ assert round(calc_attr.ua_value_ow, 16) == 77.23037843150993
+ assert round(calc_attr.area_ow, 1) == 188.0
+ assert round(calc_attr.r_conv_inner_ow, 19) == 0.0027203482045701846
+ assert round(calc_attr.r_rad_inner_ow, 18) == 0.001063829787234043
+ assert round(calc_attr.r_comb_inner_ow, 20) == 0.0007647598654022638
+ assert round(calc_attr.r_conv_outer_ow, 20) == 0.00026595744680851064
+ assert round(calc_attr.r_rad_outer_ow, 18) == 0.001063829787234043
+ assert round(calc_attr.r_comb_outer_ow, 20) == 0.0002127659574468085
+ assert round(calc_attr.alpha_conv_inner_ow, 5) == 1.95532
+ assert round(calc_attr.alpha_rad_inner_ow, 5) == 5.0
+ assert round(calc_attr.alpha_comb_inner_ow, 5) == 6.95532
+ assert round(calc_attr.alpha_conv_outer_ow, 1) == 20.0
+ assert round(calc_attr.alpha_rad_outer_ow, 5) == 5.0
+ assert round(calc_attr.alpha_comb_outer_ow, 1) == 25.0
- therm_zone = prj.buildings[-1].thermal_zones[-1]
+ # groundfloor
+ assert round(calc_attr.ua_value_gf, 16) == 58.351477449455686
+ assert round(calc_attr.area_gf, 1) == 140.0
+ assert round(calc_attr.r_conv_inner_gf, 19) == 0.004201680672268907
+ assert round(calc_attr.r_rad_inner_gf, 18) == 0.001428571428571429
+ assert round(calc_attr.r_comb_inner_gf, 20) == 0.0010660980810234541
+ assert round(calc_attr.alpha_conv_inner_gf, 5) == 1.7
+ assert round(calc_attr.alpha_rad_inner_gf, 5) == 5.0
+ assert round(calc_attr.alpha_comb_inner_gf, 5) == 6.7
+
+ # window
+ assert round(calc_attr.ua_value_win, 16) == 32.87895310796074
+ assert round(calc_attr.area_win, 1) == 18.0
+ assert round(calc_attr.r_conv_inner_win, 19) == 0.032679738562091505
+ assert round(calc_attr.r_rad_inner_win, 4) == 0.0111
+ assert round(calc_attr.r_comb_inner_win, 19) == 0.008291873963515755
+ assert round(calc_attr.r_conv_outer_win, 5) == 0.00278
+ assert round(calc_attr.r_rad_outer_win, 4) == 0.0111
+ assert round(calc_attr.r_comb_outer_win, 4) == 0.0022
+ assert round(calc_attr.alpha_conv_inner_win, 1) == 1.7
+ assert round(calc_attr.alpha_comb_outer_win, 1) == 25.0
+ assert round(calc_attr.alpha_conv_outer_win, 1) == 20.0
+ assert round(calc_attr.weighted_g_value, 3) == 0.789
+
+ def test_calc_chain_matrix_three(self):
+ """test of calc_chain_matrix"""
+ from teaser.logic.buildingobjects.calculation.three_element import \
+ ThreeElement
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+
+ calc_attr = ThreeElement(therm_zone, merge_windows=False, t_bt=5)
+
+ helplist = therm_zone.outer_walls + therm_zone.rooftops + \
+ therm_zone.ground_floors + therm_zone.inner_walls + \
+ therm_zone.ceilings + therm_zone.floors + therm_zone.windows
+
+ for element in helplist:
+ element.calc_equivalent_res()
+ element.calc_ua_value()
+
+ omega = (2 * math.pi / 86400 / 5)
+
+ helplist_outer_walls = therm_zone.outer_walls + therm_zone.rooftops +\
+ therm_zone.windows
+
+ r1_ow, c1_ow = calc_attr._calc_parallel_connection(
+ element_list=helplist_outer_walls,
+ omega=omega)
+ assert round(r1_ow, 14) == 0.00175779297228
+ assert round(c1_ow, 5) == 2091259.60825
+
+ helplist_inner_walls = therm_zone.inner_walls +\
+ therm_zone.ceilings + therm_zone.floors
+
+ r1_iw, c1_iw = calc_attr._calc_parallel_connection(
+ element_list=helplist_inner_walls,
+ omega=omega)
+ assert round(r1_iw, 13) == 0.0097195611408
+ assert round(c1_iw, 6) == 319983.518743
+
+ def test_sum_building_elements_four(self):
+ """test of combine_building_elements"""
+ prj.set_default()
+ helptest.building_test2(prj)
+
+ from teaser.logic.buildingobjects.calculation.four_element import\
+ FourElement
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+
+ calc_attr = FourElement(therm_zone, merge_windows=True, t_bt=5)
+
+ helplist = therm_zone.outer_walls + therm_zone.rooftops +\
+ therm_zone.ground_floors + therm_zone.inner_walls +\
+ therm_zone.ceilings + therm_zone.floors + therm_zone.windows
+
+ for element in helplist:
+ element.calc_equivalent_res()
+ element.calc_ua_value()
+
+ calc_attr._sum_outer_wall_elements()
+ calc_attr._sum_ground_floor_elements()
+ calc_attr._sum_rooftop_elements()
+ calc_attr._sum_inner_wall_elements()
+ calc_attr._sum_window_elements()
+
+ # innerwall
+
+ assert round(calc_attr.ua_value_iw, 16) == 14.286493860845841
+ assert round(calc_attr.area_iw, 1) == 34.0
+ assert round(calc_attr.r_conv_inner_iw, 18) == 0.010893246187363833
+ assert round(calc_attr.r_rad_inner_iw, 19) == 0.0058823529411764705
+ assert round(calc_attr.r_comb_inner_iw, 19) == 0.003819709702062643
+ assert round(calc_attr.alpha_conv_inner_iw, 1) == 2.7
+ assert round(calc_attr.alpha_rad_inner_iw, 1) == 5.0
+ assert round(calc_attr.alpha_comb_inner_iw, 1) == 7.7
+
+ # outerwall
+ assert round(calc_attr.ua_value_ow, 16) == 19.83577523748189
+ assert round(calc_attr.area_ow, 1) == 48.0
+ assert round(calc_attr.r_conv_inner_ow, 19) == 0.007716049382716048
+ assert round(calc_attr.r_rad_inner_ow, 18) == 0.004166666666666667
+ assert round(calc_attr.r_comb_inner_ow, 20) == 0.0027056277056277055
+ assert round(calc_attr.r_conv_outer_ow, 20) == 0.0010416666666666667
+ assert round(calc_attr.r_rad_outer_ow, 18) == 0.004166666666666667
+ assert round(calc_attr.r_comb_outer_ow, 20) == 0.0008333333333333334
+ assert round(calc_attr.alpha_conv_inner_ow, 5) == 2.7
+ assert round(calc_attr.alpha_rad_inner_ow, 5) == 5.0
+ assert round(calc_attr.alpha_comb_inner_ow, 5) == 7.7
+ assert round(calc_attr.alpha_conv_outer_ow, 1) == 20.0
+ assert round(calc_attr.alpha_rad_outer_ow, 5) == 5.0
+ assert round(calc_attr.alpha_comb_outer_ow, 1) == 25.0
+
+ # groundfloor
+ assert round(calc_attr.ua_value_gf, 16) == 58.351477449455686
+ assert round(calc_attr.area_gf, 1) == 140.0
+ assert round(calc_attr.r_conv_inner_gf, 19) == 0.004201680672268907
+ assert round(calc_attr.r_rad_inner_gf, 18) == 0.001428571428571429
+ assert round(calc_attr.r_comb_inner_gf, 20) == 0.0010660980810234541
+ assert round(calc_attr.alpha_conv_inner_gf, 5) == 1.7
+ assert round(calc_attr.alpha_rad_inner_gf, 5) == 5.0
+ assert round(calc_attr.alpha_comb_inner_gf, 5) == 6.7
+
+ # outerwall
+ assert round(calc_attr.ua_value_rt, 16) == 57.394603194028036
+ assert round(calc_attr.area_rt, 1) == 140.0
+ assert round(calc_attr.r_conv_inner_rt, 19) == 0.004201680672268907
+ assert round(calc_attr.r_rad_inner_rt, 18) == 0.001428571428571429
+ assert round(calc_attr.r_comb_inner_rt, 20) == 0.0010660980810234541
+ assert round(calc_attr.r_conv_outer_rt, 20) == 0.00035714285714285714
+ assert round(calc_attr.r_rad_outer_rt, 18) == 0.001428571428571429
+ assert round(calc_attr.r_comb_outer_rt, 20) == 0.00028571428571428574
+ assert round(calc_attr.alpha_conv_inner_rt, 5) == 1.7
+ assert round(calc_attr.alpha_rad_inner_rt, 5) == 5.0
+ assert round(calc_attr.alpha_comb_inner_rt, 5) == 6.7
+ assert round(calc_attr.alpha_conv_outer_rt, 1) == 20.0
+ assert round(calc_attr.alpha_rad_outer_rt, 5) == 5.0
+ assert round(calc_attr.alpha_comb_outer_rt, 1) == 25.0
+
+ # window
+ assert round(calc_attr.ua_value_win, 16) == 32.87895310796074
+ assert round(calc_attr.area_win, 1) == 18.0
+ assert round(calc_attr.r_conv_inner_win, 19) == 0.032679738562091505
+ assert round(calc_attr.r_rad_inner_win, 4) == 0.0111
+ assert round(calc_attr.r_comb_inner_win, 19) == 0.008291873963515755
+ assert round(calc_attr.r_conv_outer_win, 5) == 0.00278
+ assert round(calc_attr.r_rad_outer_win, 4) == 0.0111
+ assert round(calc_attr.r_comb_outer_win, 4) == 0.0022
+ assert round(calc_attr.alpha_conv_inner_win, 1) == 1.7
+ assert round(calc_attr.alpha_comb_outer_win, 1) == 25.0
+ assert round(calc_attr.alpha_conv_outer_win, 1) == 20.0
+ assert round(calc_attr.weighted_g_value, 3) == 0.789
+
+ def test_calc_chain_matrix_four(self):
+ """test of calc_chain_matrix"""
+ from teaser.logic.buildingobjects.calculation.four_element import \
+ FourElement
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+
+ calc_attr = FourElement(therm_zone, merge_windows=False, t_bt=5)
+
+ helplist = therm_zone.outer_walls + therm_zone.rooftops + \
+ therm_zone.ground_floors + therm_zone.inner_walls + \
+ therm_zone.ceilings + therm_zone.floors + therm_zone.windows
+
+ for element in helplist:
+ element.calc_equivalent_res()
+ element.calc_ua_value()
+
+ omega = (2 * math.pi / 86400 / 5)
+
+ helplist_outer_walls = therm_zone.outer_walls + therm_zone.windows
+
+ r1_ow, c1_ow = calc_attr._calc_parallel_connection(
+ element_list=helplist_outer_walls,
+ omega=omega)
+ assert round(r1_ow, 14) == 0.00688468914141
+ assert round(c1_ow, 5) == 533938.62338
+
+ helplist_inner_walls = therm_zone.inner_walls +\
+ therm_zone.ceilings + therm_zone.floors
+
+ r1_iw, c1_iw = calc_attr._calc_parallel_connection(
+ element_list=helplist_inner_walls,
+ omega=omega)
+ assert round(r1_iw, 13) == 0.0097195611408
+ assert round(c1_iw, 6) == 319983.518743
+
+ def test_calc_weightfactor_one(self):
+ """test of calc_weightfactor"""
+ prj.set_default()
+ helptest.building_test2(prj)
+ prj.buildings[-1].calc_building_parameter(number_of_elements=1,
+ merge_windows=True,
+ used_library='Annex60')
+
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+
+ weightfactors_test_list = [
+ 0,
+ 0.024530650180761254,
+ 0.03434291025306576,
+ 0.024530650180761254,
+ 0.03434291025306576,
+ 0.3407000330729792]
+
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+
+ assert calc_attr.weightfactor_ow == \
+ weightfactors_test_list
+
+ weightfactors_test_list = [
+ 0.08674342795625017,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.054214642472656345,
+ 0.054214642472656345]
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+
+ assert calc_attr.weightfactor_win ==\
+ weightfactors_test_list
+ assert calc_attr.weightfactor_ground == \
+ 0.34638013315780397
+
+ prj.buildings[-1].thermal_zones[-1].weightfactor_ow = []
+ prj.buildings[-1].thermal_zones[-1].weightfactor_win = []
+
+ prj.buildings[-1].calc_building_parameter(number_of_elements=1,
+ merge_windows=False,
+ used_library='AixLib')
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+
+ weightfactors_test_list = [
+ 0.03047939672771178,
+ 0.423320678280269,
+ 0.03047939672771178,
+ 0.0,
+ 0.04267115541879649,
+ 0.04267115541879649]
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+
+ assert calc_attr.weightfactor_ow ==\
+ weightfactors_test_list
+
+
+ weightfactors_test_list = [
+ 0.44444444444444453,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.2777777777777778,
+ 0.2777777777777778]
+
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_win.sort() ==\
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_ground == \
+ 0.4303782174267145
+
+ def test_calc_weightfactor_two(self):
+ """test of calc_weightfactor"""
+ prj.set_default()
+ helptest.building_test2(prj)
+ prj.buildings[-1].calc_building_parameter(number_of_elements=2,
+ merge_windows=True,
+ used_library='Annex60')
+
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+
+ weightfactors_test_list = [
+ 0.0,
+ 0.024530650180761254,
+ 0.03434291025306576,
+ 0.024530650180761254,
+ 0.03434291025306576,
+ 0.3407000330729792]
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+
+ assert calc_attr.weightfactor_ow == \
+ weightfactors_test_list
+ weightfactors_test_list = [
+ 0.0,
+ 0.0,
+ 0.054214642472656345,
+ 0.08674342795625017,
+ 0.054214642472656345,
+ 0.0]
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_win ==\
+ weightfactors_test_list
+ assert calc_attr.weightfactor_ground == \
+ 0.34638013315780397
+
+ prj.buildings[-1].thermal_zones[-1].weightfactor_ow = []
+ prj.buildings[-1].thermal_zones[-1].weightfactor_win = []
+
+ prj.buildings[-1].calc_building_parameter(number_of_elements=2,
+ merge_windows=False,
+ used_library='AixLib')
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+
+ weightfactors_test_list = [
+ 0.0,
+ 0.03047939672771178,
+ 0.04267115541879649,
+ 0.03047939672771178,
+ 0.04267115541879649,
+ 0.423320678280269]
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_ow ==\
+ weightfactors_test_list
+
+ weightfactors_test_list = [
+ 0.0,
+ 0.0,
+ 0.27777777777777778,
+ 0.44444444444444453,
+ 0.27777777777777778,
+ 0.0]
+
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_win ==\
+ weightfactors_test_list
+ assert calc_attr.weightfactor_ground == \
+ 0.4303782174267145
+
+ def test_calc_weightfactor_three(self):
+ """test of calc_weightfactor"""
+ prj.set_default()
+ helptest.building_test2(prj)
+ prj.buildings[-1].calc_building_parameter(number_of_elements=3,
+ merge_windows=True,
+ used_library='Annex60')
+
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+ weightfactors_test_list = [
+ 0.03753045374718346,
+ 0.5212510365068732,
+ 0.05254263524605685,
+ 0.03753045374718346,
+ 0.05254263524605685]
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+
+ assert calc_attr.weightfactor_ow == \
+ weightfactors_test_list
+ weightfactors_test_list = [
+ 0.13271234911406493,
+ 0.0,
+ 0.08294521819629057,
+ 0.0,
+ 0.08294521819629057]
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_win ==\
+ weightfactors_test_list
+ assert calc_attr.weightfactor_ground == \
+ 0
+
+ prj.buildings[-1].thermal_zones[-1].weightfactor_ow = []
+ prj.buildings[-1].thermal_zones[-1].weightfactor_win = []
+
+ prj.buildings[-1].calc_building_parameter(number_of_elements=3,
+ merge_windows=False,
+ used_library='AixLib')
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+
+ weightfactors_test_list = [
+ 0.05350813058801943,
+ 0.7431609731775066,
+ 0.07491138282322722,
+ 0.05350813058801943,
+ 0.07491138282322722]
+
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+
+ assert calc_attr.weightfactor_ow ==\
+ weightfactors_test_list
+
+ weightfactors_test_list = [
+ 0.44444444444444453,
+ 0.0,
+ 0.2777777777777778,
+ 0.0,
+ 0.2777777777777778]
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_win ==\
+ weightfactors_test_list
+ assert calc_attr.weightfactor_ground == \
+ 0
+
+ def test_calc_weightfactor_four(self):
+ """test of calc_weightfactor"""
+ prj.set_default()
+ helptest.building_test2(prj)
+ prj.buildings[-1].calc_building_parameter(number_of_elements=4,
+ merge_windows=True,
+ used_library='Annex60')
+
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+
+ weightfactors_test_list = [
+ 0.07839276240589141, 0.10974986736824797, 0.07839276240589141,
+ 0.10974986736824797]
+
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+
+ assert calc_attr.weightfactor_ow == \
+ weightfactors_test_list
+ weightfactors_test_list = [
+ 0.27720655131187616, 0.17325409456992255, 0.0, 0.17325409456992255]
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_win ==\
+ weightfactors_test_list
+ assert calc_attr.weightfactor_ground == \
+ 0
+ assert calc_attr.weightfactor_rt == \
+ [1]
+
+ prj.buildings[-1].thermal_zones[-1].weightfactor_ow = []
+ prj.buildings[-1].thermal_zones[-1].weightfactor_win = []
+
+ prj.buildings[-1].calc_building_parameter(number_of_elements=4,
+ merge_windows=False,
+ used_library='AixLib')
+ calc_attr = prj.buildings[-1].thermal_zones[-1].model_attr
+
+ weightfactors_test_list = [
+ 0.20833333333333331, 0.29166666666666663, 0.20833333333333331,
+ 0.29166666666666663]
+ calc_attr.weightfactor_ow.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_ow ==\
+ weightfactors_test_list
+
+ weightfactors_test_list = [
+ 0.44444444444444453, 0.2777777777777778, 0.0, 0.2777777777777778]
+
+ calc_attr.weightfactor_win.sort()
+ weightfactors_test_list.sort()
+ assert calc_attr.weightfactor_win ==\
+ weightfactors_test_list
+ assert calc_attr.weightfactor_ground == \
+ 0
+ assert calc_attr.weightfactor_rt == \
+ [1]
+
+ def test_calc_one_element(self):
+ """test of calc_two_element"""
+ prj.set_default()
+ helptest.building_test2(prj)
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ therm_zone.calc_zone_parameters(
+ number_of_elements=1,
+ merge_windows=True)
+
+ zone_attr = therm_zone.model_attr
+ assert round(zone_attr.area_ow, 1) == 328.0
+ assert round(zone_attr.ua_value_ow, 16) == 135.5818558809656
+ assert round(zone_attr.r_conv_inner_ow, 16) == 0.0016512549537649
+ assert round(zone_attr.r_rad_inner_ow, 16) == 0.000609756097561
+
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.000265957
+ assert round(zone_attr.alpha_conv_inner_ow, 5) == 1.84634
+ assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
+ assert round(zone_attr.r1_ow, 15) == 0.000772773294534
+ assert round(zone_attr.c1_ow, 5) == 3648580.59312
+ assert round(zone_attr.r_rest_ow, 14) == 0.00461875570532
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ therm_zone.calc_zone_parameters(
+ number_of_elements=1,
+ merge_windows=False)
+
+ zone_attr = therm_zone.model_attr
+ assert round(zone_attr.area_ow, 1) == 328.0
+ assert round(zone_attr.ua_value_ow, 16) == 135.5818558809656
+ assert round(zone_attr.r_conv_inner_ow, 16) == 0.0016512549537649
+ assert round(zone_attr.r_rad_inner_ow, 16) == 0.000609756097561
+
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.000265957
+ assert round(zone_attr.alpha_conv_inner_ow, 5) == 1.84634
+ assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
+ assert round(zone_attr.r1_win, 13) == 0.0199004975124
+ assert round(zone_attr.r1_ow, 15) == 0.001007515484109
+ assert round(zone_attr.c1_ow, 5) == 3648580.59312
+ assert round(zone_attr.r_rest_ow, 14) == 0.00585224061345
+
+ def test_calc_two_element(self):
+ """test of calc_two_element"""
+ prj.set_default()
+ helptest.building_test2(prj)
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ therm_zone.calc_zone_parameters(
+ number_of_elements=2,
+ merge_windows=True)
+
+ zone_attr = therm_zone.model_attr
+ assert round(zone_attr.area_ow, 1) == 328.0
+ assert round(zone_attr.ua_value_ow, 16) == 135.5818558809656
+ assert round(zone_attr.r_conv_inner_ow, 16) == 0.0016512549537649
+ assert round(zone_attr.r_rad_inner_ow, 16) == 0.000609756097561
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.000265957
+ assert round(zone_attr.alpha_conv_inner_ow, 5) == 1.84634
+ assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
+ assert round(zone_attr.r1_ow, 15) == 0.000772773294534
+ assert round(zone_attr.c1_ow, 5) == 3648580.59312
+ assert round(zone_attr.r1_iw, 15) == 0.009719561140816
+ assert round(zone_attr.c1_iw, 5) == 319983.51874
+
+ assert round(zone_attr.r_rest_ow, 14) == 0.00461875570532
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
therm_zone.calc_zone_parameters(
number_of_elements=2,
merge_windows=False)
@@ -1351,39 +1994,170 @@ def test_calc_two_element(self):
assert round(zone_attr.ua_value_ow, 16) == 135.5818558809656
assert round(zone_attr.r_conv_inner_ow, 16) == 0.0016512549537649
assert round(zone_attr.r_rad_inner_ow, 16) == 0.000609756097561
- outer_conv_roof_temp = sum(
- 1 / roof.r_outer_conv for roof in therm_zone.rooftops)
- # old calc was only ow, in the new core we calc outer walls plus
- # rooftops, therefore we need to subtract it.
- r_outer_conv_ow_temp = 1 / (
- (1 / zone_attr.r_conv_outer_ow) - outer_conv_roof_temp)
- assert round(r_outer_conv_ow_temp, 9) == 0.001041667
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.000265957
assert round(zone_attr.alpha_conv_inner_ow, 5) == 1.84634
assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
- # old r1_win
- sum_r1_win = 0
- for win_count in therm_zone.windows:
- sum_r1_win += 1 / (win_count.r1 + win_count.r_outer_comb)
- r1_win_temp = 1 / sum_r1_win
- # new r1_win
- assert round(r1_win_temp, 15) == 0.02212271973466
- assert round(zone_attr.r1_win, 15) == 0.019900497512438001
+ assert round(zone_attr.r1_win, 13) == 0.0199004975124
assert round(zone_attr.r1_ow, 15) == 0.001007515484109
+ assert round(zone_attr.c1_ow, 5) == 3648580.59312
+ assert round(zone_attr.r1_iw, 15) == 0.009719561140816
+ assert round(zone_attr.r_rest_ow, 14) == 0.00585224061345
+
+ def test_calc_three_element(self):
+ """test of calc_two_element"""
+ prj.set_default()
+ helptest.building_test2(prj)
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ therm_zone.calc_zone_parameters(
+ number_of_elements=3,
+ merge_windows=True)
+
+ zone_attr = therm_zone.model_attr
+ assert round(zone_attr.area_ow, 1) == 188.0
+ assert round(zone_attr.ua_value_ow, 16) == 77.23037843150993
+ assert round(zone_attr.r_conv_inner_ow, 16) == 0.0027203482045702
+ assert round(zone_attr.r_rad_inner_ow, 16) == 0.001063829787234
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.000265957
+ assert round(zone_attr.alpha_conv_inner_ow, 5) == 1.95532
+ assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
+ assert round(zone_attr.r1_ow, 14) == 0.00114890338306
+ assert round(zone_attr.c1_ow, 5) == 2091259.60825
+ assert round(zone_attr.r1_iw, 15) == 0.009719561140816
+ assert round(zone_attr.c1_iw, 5) == 319983.51874
+ assert round(zone_attr.r_rest_ow, 11) == 0.00702003101
+ assert round(zone_attr.area_gf, 1) == 140.0
+ assert round(zone_attr.ua_value_gf, 16) == 58.351477449455686
+ assert round(zone_attr.r_conv_inner_gf, 16) == 0.0042016806722689
+ assert round(zone_attr.r_rad_inner_gf, 16) == 0.0014285714285714
+ assert round(zone_attr.alpha_conv_inner_gf, 5) == 1.7
+ assert round(zone_attr.alpha_rad_inner_gf, 1) == 5.0
+ assert round(zone_attr.r1_gf, 14) == 0.00236046484848
+ assert round(zone_attr.c1_gf, 5) == 1557320.98487
+ assert round(zone_attr.r_rest_gf, 13) == 0.0137109637229
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ therm_zone.calc_zone_parameters(
+ number_of_elements=3,
+ merge_windows=False)
+
+ zone_attr = therm_zone.model_attr
+ assert round(zone_attr.area_ow, 1) == 188.0
+ assert round(zone_attr.ua_value_ow, 16) == 77.23037843150993
+ assert round(zone_attr.r_conv_inner_ow, 16) == 0.0027203482045702
+ assert round(zone_attr.r_rad_inner_ow, 16) == 0.001063829787234
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.000265957
+ assert round(zone_attr.alpha_conv_inner_ow, 5) == 1.95532
+ assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
+ assert round(zone_attr.r1_win, 13) == 0.0199004975124
+ assert round(zone_attr.r1_ow, 13) == 0.0017577929723
+ assert round(zone_attr.c1_ow, 5) == 2091259.60825
assert round(zone_attr.r1_iw, 15) == 0.009719561140816
- # old r_rest
- r_rest_ow = zone_attr.r_total_ow - zone_attr.r1_ow -\
- 1 / (1 / zone_attr.r_conv_inner_ow + 1 / zone_attr.r_rad_inner_ow)
- assert round(r_rest_ow, 15) == 0.005922787404456
- assert round(zone_attr.r_rest_ow, 15) == 0.005852240613452
+ assert round(zone_attr.c1_iw, 5) == 319983.51874
+ assert round(zone_attr.r_rest_ow, 13) == 0.0102102921341
+ assert round(zone_attr.area_gf, 1) == 140.0
+ assert round(zone_attr.ua_value_gf, 16) == 58.351477449455686
+ assert round(zone_attr.r_conv_inner_gf, 16) == 0.0042016806722689
+ assert round(zone_attr.r_rad_inner_gf, 16) == 0.0014285714285714
+ assert round(zone_attr.alpha_conv_inner_gf, 5) == 1.7
+ assert round(zone_attr.alpha_rad_inner_gf, 1) == 5.0
+ assert round(zone_attr.r1_gf, 14) == 0.00236046484848
+ assert round(zone_attr.c1_gf, 5) == 1557320.98487
+ assert round(zone_attr.r_rest_gf, 13) == 0.0137109637229
+
+ def test_calc_four_element(self):
+ """test of calc_two_element"""
+ prj.set_default()
+ helptest.building_test2(prj)
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ therm_zone.calc_zone_parameters(
+ number_of_elements=4,
+ merge_windows=True)
+
+ zone_attr = therm_zone.model_attr
+ assert round(zone_attr.area_ow, 1) == 48.0
+ assert round(zone_attr.ua_value_ow, 16) == 19.83577523748189
+ assert round(zone_attr.r_conv_inner_ow, 16) == 0.007716049382716
+ assert round(zone_attr.r_rad_inner_ow, 16) == 0.0041666666666667
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.001041667
+ assert round(zone_attr.alpha_conv_inner_ow, 5) == 2.7
+ assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
+ assert round(zone_attr.r1_ow, 14) == 0.00223838915931
+ assert round(zone_attr.c1_ow, 5) == 533938.62338
+ assert round(zone_attr.r1_iw, 14) == 0.00971956114082
+ assert round(zone_attr.c1_iw, 5) == 319983.51874
+ assert round(zone_attr.r_rest_ow, 13) == 0.0138583242416
+ assert round(zone_attr.area_gf, 1) == 140.0
+ assert round(zone_attr.ua_value_gf, 16) == 58.351477449455686
+ assert round(zone_attr.r_conv_inner_gf, 16) == 0.0042016806722689
+ assert round(zone_attr.r_rad_inner_gf, 16) == 0.0014285714285714
+ assert round(zone_attr.alpha_conv_inner_gf, 5) == 1.7
+ assert round(zone_attr.alpha_rad_inner_gf, 1) == 5.0
+ assert round(zone_attr.r1_gf, 14) == 0.00236046484848
+ assert round(zone_attr.c1_gf, 5) == 1557320.98487
+ assert round(zone_attr.r_rest_gf, 13) == 0.0137109637229
+
+ assert round(zone_attr.area_rt, 1) == 140.0
+ assert round(zone_attr.ua_value_rt, 16) == 57.394603194028036
+ assert round(zone_attr.r_conv_inner_rt, 16) == 0.0042016806722689
+ assert round(zone_attr.r_rad_inner_rt, 16) == 0.0014285714285714
+ assert round(zone_attr.r_conv_outer_rt, 9) == 0.000357143
+ assert round(zone_attr.alpha_conv_inner_rt, 5) == 1.7
+ assert round(zone_attr.alpha_rad_inner_rt, 1) == 5.0
+ assert round(zone_attr.r1_rt, 14) == 0.00236046484848
+ assert round(zone_attr.c1_rt, 5) == 1557320.98487
+ assert round(zone_attr.r_rest_rt, 13) == 0.0137109637229
+
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ therm_zone.calc_zone_parameters(
+ number_of_elements=4,
+ merge_windows=False)
+
+ zone_attr = therm_zone.model_attr
+ assert round(zone_attr.area_ow, 1) == 48.0
+ assert round(zone_attr.ua_value_ow, 16) == 19.83577523748189
+ assert round(zone_attr.r_conv_inner_ow, 16) == 0.007716049382716
+ assert round(zone_attr.r_rad_inner_ow, 16) == 0.0041666666666667
+ assert round(zone_attr.r_conv_outer_ow, 9) == 0.001041667
+ assert round(zone_attr.alpha_conv_inner_ow, 5) == 2.7
+ assert round(zone_attr.alpha_rad_inner_ow, 1) == 5.0
+ assert round(zone_attr.r1_win, 13) == 0.0199004975124
+ assert round(zone_attr.r1_ow, 14) == 0.00688468914141
+ assert round(zone_attr.c1_ow, 5) == 533938.62338
+ assert round(zone_attr.r1_iw, 14) == 0.00971956114082
+ assert round(zone_attr.c1_iw, 5) == 319983.51874
+ assert round(zone_attr.r_rest_ow, 13) == 0.0399903108586
+
+ assert round(zone_attr.area_gf, 1) == 140.0
+ assert round(zone_attr.ua_value_gf, 16) == 58.351477449455686
+ assert round(zone_attr.r_conv_inner_gf, 16) == 0.0042016806722689
+ assert round(zone_attr.r_rad_inner_gf, 16) == 0.0014285714285714
+ assert round(zone_attr.alpha_conv_inner_gf, 5) == 1.7
+ assert round(zone_attr.alpha_rad_inner_gf, 1) == 5.0
+ assert round(zone_attr.r1_gf, 14) == 0.00236046484848
+ assert round(zone_attr.c1_gf, 5) == 1557320.98487
+ assert round(zone_attr.r_rest_gf, 13) == 0.0137109637229
+
+ assert round(zone_attr.area_rt, 1) == 140.0
+ assert round(zone_attr.ua_value_rt, 16) == 57.394603194028036
+ assert round(zone_attr.r_conv_inner_rt, 16) == 0.0042016806722689
+ assert round(zone_attr.r_rad_inner_rt, 16) == 0.0014285714285714
+ assert round(zone_attr.r_conv_outer_rt, 9) == 0.000357143
+ assert round(zone_attr.alpha_conv_inner_rt, 5) == 1.7
+ assert round(zone_attr.alpha_rad_inner_rt, 1) == 5.0
+ assert round(zone_attr.r1_rt, 14) == 0.00236046484848
+ assert round(zone_attr.c1_rt, 5) == 1557320.98487
+ assert round(zone_attr.r_rest_rt, 13) == 0.0137109637229
def test_volume_zone(self):
- '''test of volume_zone'''
+ """test of volume_zone"""
prj.buildings[-1].thermal_zones[-1].set_volume_zone()
assert prj.buildings[-1].thermal_zones[-1].volume == 490.0
def test_set_inner_wall_area(self):
- '''test of set_inner_wall_area'''
+ """test of set_inner_wall_area"""
prj.buildings[-1].thermal_zones[-1].set_inner_wall_area()
for wall in prj.buildings[-1].thermal_zones[-1].inner_walls:
@@ -1392,13 +2166,13 @@ def test_set_inner_wall_area(self):
# methods in UseConditions18599()
def test_load_use_conditions(self):
- '''test of load_use_conditions, no parameter checking'''
+ """test of load_use_conditions, no parameter checking"""
use_cond = prj.buildings[-1].thermal_zones[-1].use_conditions
use_cond.load_use_conditions("Living",
data_class=prj.data)
def test_save_use_conditions(self):
- '''test of save_use_conditions, no parameter checking'''
+ """test of save_use_conditions, no parameter checking"""
import os
path = os.path.join(utilities.get_default_path(),
@@ -1411,7 +2185,7 @@ def test_save_use_conditions(self):
# methods in BuildingElement
def test_ua_value(self):
- '''test of ua_value'''
+ """test of ua_value"""
prj.set_default()
helptest.building_test2(prj)
@@ -1423,7 +2197,7 @@ def test_ua_value(self):
15) == 4.132453174475393
def test_gather_element_properties(self):
- '''test of gather_element_properties'''
+ """test of gather_element_properties"""
outerWalls = prj.buildings[-1].thermal_zones[-1].outer_walls[0]
number_of_layer, density, thermal_conduc, heat_capac, thickness = \
outerWalls.gather_element_properties()
@@ -1434,7 +2208,7 @@ def test_gather_element_properties(self):
assert (thickness == [5., 2.]).all()
def test_load_type_element(self):
- '''test of load_type_element, no parameter checking'''
+ """test of load_type_element, no parameter checking"""
# test load function
therm_zone = prj.buildings[-1].thermal_zones[-1]
@@ -1446,7 +2220,7 @@ def test_load_type_element(self):
prj.data)
def test_save_type_element(self):
- '''test of save_type_element, no parameter checking'''
+ """test of save_type_element, no parameter checking"""
import os
# test load function
therm_zone = prj.buildings[-1].thermal_zones[-1]
@@ -1458,10 +2232,23 @@ def test_save_type_element(self):
therm_zone.inner_walls[0].save_type_element(data_class=prj.data)
therm_zone.windows[0].save_type_element(data_class=prj.data)
+ def test_delete_type_element(self):
+ """test of save_type_element, no parameter checking"""
+ import os
+ # test load function
+ therm_zone = prj.buildings[-1].thermal_zones[-1]
+ path = os.path.join(utilities.get_default_path(),
+ 'unitTestTB.xml')
+ prj.data.path_tb = path
+ prj.data.load_tb_binding()
+ therm_zone.outer_walls[0].delete_type_element(data_class=prj.data)
+ therm_zone.inner_walls[0].delete_type_element(data_class=prj.data)
+ therm_zone.windows[0].delete_type_element(data_class=prj.data)
+
# methods in Wall
def test_calc_equivalent_res_wall(self):
- '''test of calc_equivalent_res, wall'''
+ """test of calc_equivalent_res, wall"""
prj.set_default()
helptest.building_test2(prj)
therm_zone = prj.buildings[-1].thermal_zones[-1]
@@ -1478,13 +2265,13 @@ def test_calc_equivalent_res_wall(self):
assert round(therm_zone.outer_walls[0].c1_korr, 6) == 111237.213205
def test_insulate_wall(self):
- '''test of insulate_wall'''
+ """test of insulate_wall"""
therm_zone = prj.buildings[-1].thermal_zones[-1]
therm_zone.outer_walls[0].insulate_wall("EPS035", 0.04)
assert round(therm_zone.outer_walls[0].ua_value, 6) == 2.806838
def test_retrofit_wall(self):
- '''test of retrofit_wall'''
+ """test of retrofit_wall"""
prj.set_default()
helptest.building_test2(prj)
therm_zone = prj.buildings[-1].thermal_zones[-1]
@@ -1517,7 +2304,7 @@ def test_retrofit_wall(self):
assert round(therm_zone.outer_walls[0].ua_value, 2) == 4.13
def test_calc_equivalent_res_win(self):
- '''test of calc_equivalent_res, win'''
+ """test of calc_equivalent_res, win"""
prj.set_default()
helptest.building_test2(prj)
therm_zone = prj.buildings[-1].thermal_zones[-1]
@@ -1526,8 +2313,8 @@ def test_calc_equivalent_res_win(self):
assert round(therm_zone.windows[0].r1, 3) == 0.072
def test_change_infiltration_rate(self):
- '''test for change of infiltration_rate'''
- prj.set_default()
+ """test for change of infiltration_rate"""
+ prj.set_default(load_data=True)
helptest.building_test2(prj)
therm_zone = prj.buildings[-1].thermal_zones[-1]
assert therm_zone.infiltration_rate == 0.2
@@ -1537,3 +2324,91 @@ def test_change_infiltration_rate(self):
therm_zone.use_conditions.base_ach = 0.5
assert therm_zone.infiltration_rate == 0.5
+
+ def test_load_save_material(self):
+ """test of load_material_template and save_material_template,
+ no parameter checking"""
+
+ from teaser.logic.buildingobjects.buildingphysics.material import \
+ Material
+
+ path = os.path.join(utilities.get_default_path(),
+ 'MatUT.xml')
+
+ mat = Material(parent=None)
+ mat.load_material_template(mat_name='Tiledroof',
+ data_class=prj.data)
+
+ from teaser.data.dataclass import DataClass
+
+ dat = DataClass()
+ dat.path_mat = path
+ dat.load_mat_binding()
+
+ mat.save_material_template(data_class=dat)
+
+ def test_properties_project(self):
+ """Tests properties of project class"""
+ prj.number_of_elements_calc
+ prj.merge_windows_calc
+ prj.used_library_calc
+ prj.name = 123
+
+ def test_warnings_prj(self):
+ """Tests misc parts in project.py"""
+
+ from teaser.logic.buildingobjects.building import Building
+ from teaser.logic.buildingobjects.thermalzone import ThermalZone
+ # warnings for not calculated buidlings
+ bld = Building(parent=prj)
+ tz = ThermalZone(parent=bld)
+ prj.calc_all_buildings()
+ prj.set_default()
+ # warning if iwu and number_of_apartments is used
+ prj.add_residential(method='iwu',
+ usage="single_family_dwelling",
+ name="test",
+ year_of_construction=1988,
+ number_of_floors=1,
+ height_of_floors=7,
+ net_leased_area=1988,
+ number_of_apartments=1)
+ # not all buildings if internal id is passed over
+ prj.add_residential(method='iwu',
+ usage="single_family_dwelling",
+ name="test1",
+ year_of_construction=1988,
+ number_of_floors=15,
+ height_of_floors=6,
+ net_leased_area=1988)
+ prj.calc_all_buildings()
+ prj.export_aixlib(internal_id=prj.buildings[-1].internal_id)
+ prj.number_of_elements_calc = 1
+ prj.merge_windows_calc = True
+ prj.used_library_calc = 'Annex60'
+ prj.calc_all_buildings()
+ prj.export_annex(internal_id=prj.buildings[-1].internal_id)
+
+ prj.set_default(load_data="Test")
+
+ def test_v4_bindings(self):
+ """
+ Tests the old v4 project bindings
+ """
+ prj.set_default()
+ prj.load_project(
+ os.path.join(
+ os.path.dirname(__file__),
+ 'testfiles',
+ 'teaser_v4.teaserXML'))
+
+ def test_v39_bindings(self):
+ """
+ Tests the old v39 project bindings
+ """
+ prj.set_default()
+ prj.load_project(
+ os.path.join(
+ os.path.dirname(__file__),
+ 'testfiles',
+ 'teaser_v39.teaserXML'))
diff --git a/tests/testfiles/teaser_v39.teaserXML b/tests/testfiles/teaser_v39.teaserXML
new file mode 100644
index 000000000..c8f2f9c51
--- /dev/null
+++ b/tests/testfiles/teaser_v39.teaserXML
@@ -0,0 +1,593 @@
+
+
+
+ 1988
+ Templergraben 55
+ 52062 Aachen
+ Wohngebaeude
+ 5
+ None
+ 5
+ 4.0
+ 2000.0
+
+ Wohngebaeude
+ 2000.0
+ 8000.0
+ 0.5
+ 123.0
+ 123.0
+
+
+ Living
+
+ 7 18
+ 11
+ 250
+ 2543
+ 207
+ 13
+ 250
+ 250
+ 250
+ 13
+
+
+ 500.0
+ 0.8
+ 0.84
+ 0.3
+ 0.9
+ 0.7
+ 0.5
+
+
+ 21.0
+ 24.0
+ 4.0
+ 20.0
+ 26.0
+ 45.0
+ 5 18
+ 5 18
+ 0.5
+ 0.3
+ 1.0
+
+
+ 0.0
+ 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.4 0.6 0.8 0.8 0.4 0.6 0.8 0.8 0.4 0.2 0.0 0.0 0.0 0.0 0.0 0.0
+ 0.0
+ 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.4 0.6 0.8 0.8 0.4 0.6 0.8 0.8 0.4 0.2 0.1 0.1 0.1 0.1 0.1 0.1
+ 11.1
+ 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0
+
+
+ 0.0
+ 0.5
+ false
+ false
+ 0.2
+ 1.0
+ 3.0 2.0
+ 1.0 283.15 290.15
+ 0.2 273.15 283.15
+
+
+
+
+ 1988
+ massiv
+ 40.0
+ 90.0
+ 0.0
+ 2.7
+ 5.0
+ 20.0
+ 5.0
+
+ 0
+ 0.175
+
+ Stahlbeton
+ 2400.0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