Skip to content

Commit

Permalink
Merge pull request #432 from RWTH-EBC/issue431_ibpsa
Browse files Browse the repository at this point in the history
Issue431 ibpsa
  • Loading branch information
PRemmen authored Apr 3, 2017
2 parents 9a23fbe + 973f491 commit 3cba671
Show file tree
Hide file tree
Showing 27 changed files with 139 additions and 141 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
TEASER (Tool for Energy Analysis and Simulation for Efficient Retrofit) allows
fast generation of archetype buildings with low input requirements and the
export of individual dynamic simulation models for Modelica libraries [AixLib](https://github.com/RWTH-EBC/AixLib) and
[IEA-EBC Annex60](https://github.com/iea-annex60/modelica-annex60). It is being
[Modelica IBPSA library](https://github.com/ibpsa/modelica). It is being
developed at the [RWTH Aachen University, E.ON Energy Research Center, Institute
for Energy Efficient Buildings and Indoor Climate](https://www.ebc.eonerc.rwth-aachen.de/cms/~dmzz/E-ON-ERC-EBC/?lidx=1).

Expand Down Expand Up @@ -41,12 +41,12 @@ present the TEASER tool, an open framework for urban energy modeling of
building stocks. TEASER provides an easy interface for multiple data sources,
data enrichment (where necessary) and export of ready-to-run Modelica simulation
models for [AixLib](https://github.com/RWTH-EBC/AixLib) and
[IEA-EBC Annex60](https://github.com/iea-annex60/modelica-annex60).
[Modelica IBPSA library](https://github.com/ibpsa/modelica).


## Version

TEASER is a ongoing research project, the current version is 0.5.0, which is
TEASER is a ongoing research project, the current version is 0.5.0, which is
still a pre-release.

## How to use TEASER
Expand Down Expand Up @@ -95,7 +95,7 @@ The workflow for changes is described in our [Wiki](https://github.com/RWTH-EBC/

## How to cite TEASER

+ TEASER: an open tool for urban energy modelling of building stocks. Remmen P., Lauster M., Mans M., Fuchs M., Osterhage T., Müller D.. Journal of Building Performance Simulation, February 2017,
+ TEASER: an open tool for urban energy modelling of building stocks. Remmen P., Lauster M., Mans M., Fuchs M., Osterhage T., Müller D.. Journal of Building Performance Simulation, February 2017,
[pdf](http://dx.doi.org/10.1080/19401493.2017.1283539),
[bibtex](https://github.com/RWTH-EBC/TEASER/tree/master/doc/cite_jbps.bib)

Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TEASER

TEASER (Tool for Energy Analysis and Simulation for Efficient Retrofit) allows
fast generation of archetype buildings with low input requirements and the
export of individual dynamic simulation models for Modelica libraries `AixLib <https://github.com/RWTH-EBC/AixLib>`_ and `IEA-EBC Annex60 <https://github.com/iea-annex60/modelica-annex60>`_. It is being
export of individual dynamic simulation models for Modelica libraries `AixLib <https://github.com/RWTH-EBC/AixLib>`_ and `Modelica IBPSA library <https://github.com/ibpsa/modelica>`_. It is being
developed at the `RWTH Aachen University, E.ON Energy Research Center, Institute
for Energy Efficient Buildings and Indoor Climate <https://www.ebc.eonerc.rwth-aachen.de/cms/~dmzz/E-ON-ERC-EBC/?lidx=1>`_.

Expand Down
4 changes: 2 additions & 2 deletions doc/teaser.Data.Output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Export AixLib models
:members:
:show-inheritance:

Export Annex60 models
Export IBPSA models
--------------------

.. automodule:: teaser.data.output.annex60_output
.. automodule:: teaser.data.output.ibpsa_output
:members:
:show-inheritance:

Expand Down
4 changes: 2 additions & 2 deletions doc/teaser.Logic.BuildingObjects.Calculation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ AixLib specific building class
:members:
:show-inheritance:

Annex specific building class
IBPSA specific building class
----------------------------------

.. automodule:: teaser.logic.buildingobjects.calculation.annex60
.. automodule:: teaser.logic.buildingobjects.calculation.ibpsa
:members:
:show-inheritance:

Expand Down
2 changes: 1 addition & 1 deletion doc/teaser.Logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ logic
The logic package holds python modules for the representation of general
building objects and archetypes. In addition the simulation package holds
modules to sort and calculate model syntax specific parameters for AixLib and
Annex60 (e.g. in AixLib we need to define orientations and tilts for the
IBPSA (e.g. in AixLib we need to define orientations and tilts for the
whole building) The utility module helps us to do path handling.

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion doc/teaser_api_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Example 2: Export Modelica models for AixLib library using TEASER API
Example 3: Export Modelica models for AixLib library using TEASER API
---------------------------------------------------------------------

.. literalinclude:: ../teaser/examples/e3_export_annex_models.py
.. literalinclude:: ../teaser/examples/e3_export_ibpsa_models.py

Example 4: Save information
---------------------------
Expand Down
4 changes: 2 additions & 2 deletions teaser/data/output/aixlib_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def export_multizone(buildings, prj, path=None):
glazing (corG) and decoupled heat conduction through windows (
merge_windows=False). In contrast to versions < 0.5 TEASER now does not
support any other model options, as we observed no need, since single
ThermalZones are identical with Annex60 models. If you miss one of the
ThermalZones are identical with IBPSA models. If you miss one of the
old options please contact us.
This function uses Mako Templates specified in
Expand Down Expand Up @@ -104,7 +104,7 @@ def export_multizone(buildings, prj, path=None):

for i, bldg in enumerate(buildings):

ass_error = "You chose Annex60 calculation, " \
ass_error = "You chose IBPSA calculation, " \
"but want to export AixLib models, " \
"this is not possible"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Created May 2016
# TEASER Development Team

"""annex60_output
"""ibpsa_output
This module contains function to call Templates for Annex60 model generation
This module contains function to call Templates for IBPSA model generation
"""

import teaser.data.output.aixlib_output as aixlib_output
Expand All @@ -13,20 +13,20 @@
from mako.lookup import TemplateLookup


def export_annex60(
def export_ibpsa(
buildings,
prj,
path=None):
"""Exports models for Annex60 library
"""Exports models for IBPSA library
Export a building to several models for
Annex60.ThermalZones.ReducedOrder. Depending on the chosen calculation
IBPSA.ThermalZones.ReducedOrder. Depending on the chosen calculation
method models for 1, 2, 3, or 4 element model are exported. In addition
you can specify if windows should be lumped into the walls, like it is
done in VDI 6007 (merge_windows=True) or not. For each zone, one model is
exported, if you want to combine all thermal zones into one model, consider
using AixLib. The export includes internal gains from use conditions (
calculated in teaser.logic.calculation.annex60) but does not include any
calculated in teaser.logic.calculation.ibpsa) but does not include any
heating or cooling equipment.
Expand Down Expand Up @@ -62,25 +62,25 @@ def export_annex60(

uses = uses = [
'Modelica(version="' + prj.modelica_info.version + '")',
'Annex60(version="' + prj.buildings[-1].library_attr.version + '")']
'IBPSA(version="' + prj.buildings[-1].library_attr.version + '")']

lookup = TemplateLookup(directories=[utilities.get_full_path(
os.path.join('data', 'output', 'modelicatemplate'))])
model_template_1 = Template(
filename=utilities.get_full_path(
"data/output/modelicatemplate/Annex60/Annex60_OneElement"),
"data/output/modelicatemplate/IBPSA/IBPSA_OneElement"),
lookup=lookup)
model_template_2 = Template(
filename=utilities.get_full_path(
"data/output/modelicatemplate/Annex60/Annex60_TwoElements"),
"data/output/modelicatemplate/IBPSA/IBPSA_TwoElements"),
lookup=lookup)
model_template_3 = Template(
filename=utilities.get_full_path(
"data/output/modelicatemplate/Annex60/Annex60_ThreeElements"),
"data/output/modelicatemplate/IBPSA/IBPSA_ThreeElements"),
lookup=lookup)
model_template_4 = Template(
filename=utilities.get_full_path(
"data/output/modelicatemplate/Annex60/Annex60_FourElements"),
"data/output/modelicatemplate/IBPSA/IBPSA_FourElements"),
lookup=lookup)

aixlib_output._help_package(
Expand All @@ -97,10 +97,10 @@ def export_annex60(
for i, bldg in enumerate(buildings):

ass_error = "You chose AixLib calculation, " \
"but want to export Annex60 models, " \
"but want to export IBPSA models, " \
"this is not possible"

assert bldg.used_library_calc == 'Annex60', ass_error
assert bldg.used_library_calc == 'IBPSA', ass_error

bldg_path = os.path.join(path, bldg.name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ within ${zone.parent.parent.name}.${zone.parent.name}.${zone.parent.name}_Models
model ${zone.parent.name}_${zone.name}
"This is the simulation model of ${zone.name} within building ${zone.parent.name} with traceable ID ${zone.parent.building_id}"

Annex60.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
calTSky=Annex60.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
IBPSA.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
calTSky=IBPSA.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
computeWetBulbTemperature=false,
filNam="${zone.parent.parent.weather_file_path.replace("\\", "/")}")
"Weather data reader"
annotation (Placement(transformation(extent={{-98,52},{-78,72}})));
Annex60.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${zone.model_attr.n_outer}](
IBPSA.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${zone.model_attr.n_outer}](
each outSkyCon=true,
each outGroCon=true,
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi = ${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates diffuse solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,20},{-48,40}})));
Annex60.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${zone.model_attr.n_outer}](
IBPSA.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${zone.model_attr.n_outer}](
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates direct solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,52},{-48,72}})));
Annex60.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer},
IBPSA.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer},
UWin=${zone.model_attr.u_value_win})
"Correction factor for solar transmission"
annotation (Placement(transformation(extent={{6,54},{26,74}})));
Annex60.ThermalZones.ReducedOrder.RC.FourElements
IBPSA.ThermalZones.ReducedOrder.RC.FourElements
thermalZoneFourElements(
redeclare package Medium = Modelica.Media.Air.DryAirNasa,
% if zone.parent.library_attr.consider_heat_capacity is True:
Expand Down Expand Up @@ -74,7 +74,7 @@ model ${zone.parent.name}_${zone.name}
"Thermal zone"
annotation (Placement(transformation(extent={{44,-2},{92,34}})));
% if zone.model_attr.merge_windows is True:
Annex60.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007 eqAirTemp(
IBPSA.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007 eqAirTemp(
n=${zone.model_attr.n_outer},
wfGro=${zone.model_attr.weightfactor_ground},
wfWall=${get_list(zone.model_attr.weightfactor_ow)},
Expand All @@ -86,7 +86,7 @@ model ${zone.parent.name}_${zone.name}
TGro=${zone.t_ground}) "Computes equivalent air temperature"
annotation (Placement(transformation(extent={{-24,-14},{-4,6}})));
% else:
Annex60.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007WithWindow eqAirTemp(
IBPSA.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007WithWindow eqAirTemp(
n=${zone.model_attr.n_outer},
wfGro=${zone.model_attr.weightfactor_ground},
wfWall=${get_list(zone.model_attr.weightfactor_ow)},
Expand Down Expand Up @@ -119,7 +119,7 @@ model ${zone.parent.name}_${zone.name}
Modelica.Blocks.Sources.Constant const[${zone.model_attr.n_outer}](each k=0)
"Sets sunblind signal to zero (open)"
annotation (Placement(transformation(extent={{-20,14},{-14,20}})));
Annex60.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
IBPSA.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
annotation (Placement(
transformation(extent={{-100,-10},{-66,22}}),iconTransformation(
extent={{-70,-12},{-50,8}})));
Expand Down Expand Up @@ -171,7 +171,7 @@ model ${zone.parent.name}_${zone.name}
rotation=180,
origin={84,-22})));

Annex60.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007 eqAirTempVDI(
IBPSA.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007 eqAirTempVDI(
aExt=${zone.model_attr.solar_absorp_rt},
wfGro=0,
alphaWallOut=${zone.model_attr.alpha_conv_outer_rt},
Expand Down Expand Up @@ -201,13 +201,13 @@ model ${zone.parent.name}_${zone.name}
Modelica.Blocks.Math.Add solRadRoof[${zone.model_attr.n_rt}]
"Sums up solar radiation of both directions"
annotation (Placement(transformation(extent={{4,76},{14,86}})));
Annex60.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTilRoof[${zone.model_attr.n_rt}](
IBPSA.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTilRoof[${zone.model_attr.n_rt}](
til=${get_list(deg_to_rad(zone.model_attr.tilt_rt))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_rt))})
"Calculates direct solar radiation on titled surface for both directions"
annotation (Placement(transformation(extent={{-68,74},{-48,94}})));
Annex60.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTilRoof[${zone.model_attr.n_rt}](
IBPSA.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTilRoof[${zone.model_attr.n_rt}](
til=${get_list(deg_to_rad(zone.model_attr.tilt_rt))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_rt))})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ within ${zone.parent.parent.name}.${zone.parent.name}.${zone.parent.name}_Models
model ${zone.parent.name}_${zone.name}
"This is the simulation model of ${zone.name} within building ${zone.parent.name} with traceable ID ${zone.parent.building_id}"

Annex60.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
calTSky=Annex60.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
IBPSA.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
calTSky=IBPSA.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
computeWetBulbTemperature=false,
filNam="${zone.parent.parent.weather_file_path.replace("\\", "/")}")
"Weather data reader"
annotation (Placement(transformation(extent={{-98,52},{-78,72}})));
Annex60.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${zone.model_attr.n_outer}](
IBPSA.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[${zone.model_attr.n_outer}](
each outSkyCon=true,
each outGroCon=true,
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi = ${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates diffuse solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,20},{-48,40}})));
Annex60.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${zone.model_attr.n_outer}](
IBPSA.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[${zone.model_attr.n_outer}](
til=${get_list(deg_to_rad(zone.model_attr.tilt_facade))},
each lat = ${deg_to_rad(zone.parent.latitude)},
azi=${get_list(azmiut_conv(zone.model_attr.orientation_facade))})
"Calculates direct solar radiation on titled surface for all directions"
annotation (Placement(transformation(extent={{-68,52},{-48,72}})));
Annex60.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer},
IBPSA.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDoublePane(n=${zone.model_attr.n_outer},
UWin=${zone.model_attr.u_value_win})
"Correction factor for solar transmission"
annotation (Placement(transformation(extent={{6,54},{26,74}})));
Annex60.ThermalZones.ReducedOrder.RC.OneElement
IBPSA.ThermalZones.ReducedOrder.RC.OneElement
thermalZoneOneElement(
redeclare package Medium = Modelica.Media.Air.DryAirNasa,
% if zone.parent.library_attr.consider_heat_capacity is True:
Expand All @@ -54,7 +54,7 @@ model ${zone.parent.name}_${zone.name}
"Thermal zone"
annotation (Placement(transformation(extent={{44,-2},{92,34}})));
% if zone.model_attr.merge_windows is True:
Annex60.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007 eqAirTemp(
IBPSA.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007 eqAirTemp(
n=${zone.model_attr.n_outer},
wfGro=${zone.model_attr.weightfactor_ground},
wfWall=${get_list(zone.model_attr.weightfactor_ow)},
Expand All @@ -66,7 +66,7 @@ model ${zone.parent.name}_${zone.name}
TGro=${zone.t_ground}) "Computes equivalent air temperature"
annotation (Placement(transformation(extent={{-24,-14},{-4,6}})));
% else:
Annex60.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007WithWindow eqAirTemp(
IBPSA.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007WithWindow eqAirTemp(
n=${zone.model_attr.n_outer},
wfGro=${zone.model_attr.weightfactor_ground},
wfWall=${get_list(zone.model_attr.weightfactor_ow)},
Expand Down Expand Up @@ -99,7 +99,7 @@ model ${zone.parent.name}_${zone.name}
Modelica.Blocks.Sources.Constant const[${zone.model_attr.n_outer}](each k=0)
"Sets sunblind signal to zero (open)"
annotation (Placement(transformation(extent={{-20,14},{-14,20}})));
Annex60.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
IBPSA.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
annotation (Placement(
transformation(extent={{-100,-10},{-66,22}}),iconTransformation(
extent={{-70,-12},{-50,8}})));
Expand Down
Loading

0 comments on commit 3cba671

Please sign in to comment.