Skip to content

Commit

Permalink
Merge pull request #263 from RWTH-EBC/release_036
Browse files Browse the repository at this point in the history
Release 036
  • Loading branch information
MichaMans authored Jun 24, 2016
2 parents 47c09e0 + cad3b54 commit e798425
Show file tree
Hide file tree
Showing 42 changed files with 481 additions and 300 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ IEA-EBC [Annex60](https://github.com/iea-annex60/modelica-annex60).

### Version

The current version is 0.3.5, which is a pre-release.
The current version is 0.3.6, which is a pre-release.

### How to cite TEASER

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# The short X.Y version.
version = '0.3.'
# The full version, including alpha/beta/rc tags.
release = '0.3.5'
release = '0.3.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ IEA-EBC `Annex60 <https://github.com/iea-annex60/modelica-annex60>`_.
Version
==================

The current version is 0.3.5, which is a pre-release.
The current version is 0.3.6, which is a pre-release.

How to cite TEASER
==================
Expand Down
112 changes: 79 additions & 33 deletions doc/teaser.Examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ examples
=======================

You can find more examples in the example package of the TEASER distribution.
e.g.:

[PathOfYourPythonDistribution/Lib/site-packages/teaser]

example_archetype.py
archetype.py
-------------------------------------------

This module contains an example how to create an archetype Building, to retrofit
Expand Down Expand Up @@ -58,24 +60,40 @@ TEASER'S Output folder::
prj.used_library_calc = 'AixLib'
prj.number_of_elements_calc = 2
prj.merge_windows_calc = False
prj.calc_all_buildings()
prj.export_aixlib(
building_model="MultizoneEquipped",
zone_model="ThermalZoneEquipped",
corG=True,
internal_id=None,
path=None)

We could also use Annex60 models with same calculation method::
For OpenModelica you need to exclude the centralAHU (because it uses state machines). Therefore use the building_model "Multizone"::

prj.export_aixlib(building_model="Multizone",
zone_model="ThermalZoneEquipped",
corG=True,
internal_id=None,
path=None)

We could also use Annex60 models with same calculation method, which exports one model per zone::

prj.used_library_calc = "Annex60"
prj.export_annex()
prj.calc_all_buildings()
prj.export_annex(number_of_elements=2,
merge_windows=False,
internal_id=None,
path=None)

Now we retrofit all buildings in the year 2015 (EnEV2014). That includes new
insulation layer and new windows. The name is changed to Retrofit::

prj.name = "Project_Retrofit"
prj.retrofit_all_buildings(2015)
prj.export_record(

Again, we need to export the model, ou could also change the exports here as seen above::

prj.export_aixlib(
building_model="MultizoneEquipped",
zone_model="ThermalZoneEquipped",
corG=True,
Expand All @@ -89,16 +107,28 @@ XML file::



example_createbuilding.py
singlebuilding.py
---------------------------------------------

This module shows how to create a building from scratch (or arbitrary sources)
calculate parameters for a Modelica model and save this example building in a
XML based format. The used classes are imported one after another. Of course
you can import all the classes at the beginning::

from teaser.project import Project
from teaser.logic.buildingobjects.building import Building
from teaser.logic.buildingobjects.buildingphysics.groundfloor import\
GroundFloor
from teaser.logic.buildingobjects.buildingphysics.innerwall import InnerWall
from teaser.logic.buildingobjects.buildingphysics.layer import Layer
from teaser.logic.buildingobjects.buildingphysics.material import Material
from teaser.logic.buildingobjects.buildingphysics.outerwall import OuterWall
from teaser.logic.buildingobjects.buildingphysics.rooftop import Rooftop
from teaser.logic.buildingobjects.buildingphysics.window import Window
from teaser.logic.buildingobjects.thermalzone import ThermalZone
from teaser.logic.buildingobjects.boundaryconditions.boundaryconditions \
import BoundaryConditions
from teaser.project import Project

prj = Project(load_data=True)
bldg = Building(parent=prj)

Expand All @@ -109,11 +139,9 @@ Set some building parameters::
bldg.city = "46325 Fantastic Town"
bldg.year_of_construction = 1988

Instantiate a ThermalZone class, with building as parent and set
Instantiate a ThermalZone class, with building as parent and set
some parameters of the thermal zone::

from teaser.logic.buildingobjects.thermalzone import ThermalZone

tz = ThermalZone(parent=bldg)
tz.name = "Living Room"
tz.area = 45.0
Expand All @@ -122,12 +150,9 @@ some parameters of the thermal zone::

Instantiate UseConditionsOffice18599 class with thermal zone as parent, and load the use conditions for the usage 'Living'::

from teaser.logic.buildingobjects.boundaryconditions.boundaryconditions import \
BoundaryConditions

tz.use_conditions = BoundaryConditions(parent=tz)
tz.use_conditions.load_use_conditions("Living")

Define two elements representing a pitched roof and define Layers and
Materials explicitly::

Expand All @@ -150,11 +175,11 @@ Set coefficient of heat transfer::
roof_south.inner_radiation = 20.0
roof_south.outer_radiation = 5.0


Set layer and material. The id indicates the position
of the layer from inside to outside::

layer_1s = Layer(parent=roof_south, id=0)
layer_1s = Layer(parent=roof_south, id=0)
layer_1s.thickness = 0.15

material_1_2 = Material(layer_1s)
Expand Down Expand Up @@ -205,12 +230,12 @@ Set layer and material::
material_1_1.density = 1400.0
material_1_1.heat_capac = 0.6
material_1_1.thermal_conduc = 2.5


For the remaining Outer and Inner walls as well as Windows, we save the information
in python dicitonaries, iterate them and instantiate the corresponding classes. In addition we
are using the load_type_element function to determine the building physics from statistical data
The key of the dict is the walls's name, while the value is a list with parameters the
The key of the dict is the walls's name, while the value is a list with parameters the
[year of construciton, construction type, area, tilt,orientation]::

out_wall_dict = {"Outer Wall 1": [bldg.year_of_construction, 'heavy',
Expand Down Expand Up @@ -285,7 +310,7 @@ The key of the dict is the walls's name, while the value is a list with paramete
win_material.name = "GlasWindow"
win_material.thermal_conduc = 0.067
win_material.transmittance = 0.9

For a GroundFloor we are using the load_type_element function explicitly,
which needs the year of construction and the construction type ('heavy'
or 'light')::
Expand All @@ -295,30 +320,51 @@ or 'light')::
ground.load_type_element(year=1988, construction='heavy')
ground.area = 140.0

We calculate the RC Values according to AixLib procedure::

We need to set the projects calculation method. The library we want to
use is AixLib, we are using a two element model and want an extra resistance
for the windows. To export the parameters to a Modelica record, we use
the export_aixlib function. path = None indicates, that we want to store
the records in TEASER'S Output folder::

prj.used_library_calc = 'AixLib'
prj.number_of_elements_calc = 2
prj.merge_windows_calc = False

prj.calc_all_buildings()

Export the Modelica model::

prj.export_aixlib(
building_model="MultizoneEquipped",
zone_model="ThermalZoneEquipped",
corG=True,
internal_id=None,
path=None)
Export the Modelica Record. If you have a Dymola License you can export
the model with a central AHU (MultizoneEquipped) (only default for office
and institute buildings)::

prj.export_aixlib(building_model="MultizoneEquipped",
zone_model="ThermalZoneEquipped",
corG=True,
internal_id=None,
path=None)


For OpenModelica you need to exclude the centralAHU (because it is using
state machines). Therefore use the building_model "Multizone"::


prj.export_aixlib(building_model="Multizone",
zone_model="ThermalZoneEquipped",
corG=True,
internal_id=None,
path=None)


Or we use Annex60 method (e.g with four elements). Which exports one
Model per zone::

Or we use Annex60 method with for elements::
prj.used_library_calc = 'Annex60'
prj.number_of_elements_calc = 4
prj.merge_windows_calc = False

prj.calc_all_buildings(
number_of_elements=4,
merge_windows=False,
used_library='Annex60')
prj.export_annex()
prj.calc_all_buildings()
prj.export_annex()


Save teaserXML and CityGML::
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name='teaser',
version='0.3.5',
version='0.3.6',
description='Tool for Energy Analysis and Simulation for Efficient Retrofit ',
url='https://github.com/RWTH-EBC/TEASER',
author='RWTH Aachen University, E.ON Energy Research Center, Institute of Energy Efficient Buildings and Indoor Climate',
Expand Down
11 changes: 3 additions & 8 deletions teaser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@
else:
raise Exception('This software runs on python versions 2.7 or >=3.3 only!')

new_path = utilitis.get_full_path("OutputData\\")

dire = os.path.dirname(new_path)

try:
os.stat(dire)
except:
os.mkdir(dire)
new_path = utilitis.get_full_path("OutputData")
if not os.path.exists(new_path):
os.makedirs(new_path)

if sys.platform.startswith('win'):
def read_file(path, mode='r'):
Expand Down
8 changes: 4 additions & 4 deletions teaser/data/dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ def __init__(self, type_element_file=None):
'''
if type_element_file is None:
self.path_tb = utilitis.get_full_path(
"Data/Input/InputData/TypeBuildingElements.xml")
"data/input/inputdata/TypeBuildingElements.xml")
else:
self.path_tb = utilitis.get_full_path("Data/Input/InputData/"+str(
self.path_tb = utilitis.get_full_path("data/input/inputdata/"+str(
type_element_file))

__xml_file_tb = open(self.path_tb, 'r')
self.element_bind = tb_bind.CreateFromDocument(__xml_file_tb.read())
self.path_uc = utilitis.get_full_path(
"Data/Input/InputData/UseConditions.xml")
"data/input/inputdata/UseConditions.xml")
__xml_file_uc = open(self.path_uc, 'r')
self.conditions_bind = uc_bind.CreateFromDocument(__xml_file_uc.read())

__path_mat = utilitis.get_full_path(
"Data/Input/InputData/MaterialTemplates.xml")
"data/input/inputdata/MaterialTemplates.xml")
__xml_file_mat = codecs.open(__path_mat, 'r', encoding='utf-8')
self.material_bind = mat_bind.CreateFromDocument(__xml_file_mat.read())
Loading

0 comments on commit e798425

Please sign in to comment.