This user guide explains the use of the Modelica library BuildingSystems (http://www.modelica-buildingsystems.de),
which is being developed for the dynamic simulation of the energetic behavior of single rooms, buildings and whole districts.
One important part of the library consists of an adaptive building model, which is able to adapt its spatial resolution
(0D, 1D, 3D modelling approach) and also its physical model (e.g. pure thermal or a hygro-thermal calculation) to the
respective problem of the simulation analysis.
Application of the simplified building model (0D modelling approach) for district modeling: 39 buildings
of the Campus Berlin-Charlottenburg are connected by a district heating grid (ATES project).¶
0D modelling approach: The adaptive building model works in a strongly simplified and abstracted configuration
(low-order or gray box model), which leads to numerically fast calculations. A typical case study is the
simultaneous calculation of the thermal energy demand of a large number of single buildings of a district
in combination with a district heating network (compare with Figure 1.1).
The Rooftop building, which was designed for placement on the roof of a Gründerzeit building in Berlin (UdK Berlin/TU Berlin
contribution to the competition Solar Decathlon Europe 2014)¶
1D modelling approach: In this case the adaptive building model uses more spatially resolved algorithms and models
and also more simulation time for a single building. A typical application is multi-zone-building models,
which calculate the heating and cooling energy demand, the air temperatures and air moistures for each thermal zone as well as
the air exchange between the single thermal zones of a complex building. The Rooftop building in Figure 1.2, for example, has
two air-conditioned and two not air-conditioned rooms, so it could be modelled with four thermal zones.
Spatially resolved room model of the Aachen Model Room AMoR modelled with the 3D zonal approach
of the BuildingSystems library (left) and with ANSYS CFD (right) (project UCaHS)¶
3D modelling approach: The most advanced configuration consists of a spatially resolved room model,
which describes the three-dimensional air flow within a room volume, the geometrical long-wave and
short-wave radiation distribution and also the multidimensional heat transport within the building construction.
For example, this model is able to calculate the location-dependent thermal comfort within a room (compare with Figure 1.3).
The BuildingSystems library supports pure thermal or also hygro-thermal calculations for all three modelling approaches.
Mixed thermal and hygro-thermal simulation analysis and different spatial resolutions for different
zones of a building model are also supported.
In the first example a simplified building model is connected to an ambient model which supplies the
building model with the climate data of a given location (Berlin, Germany). Here you will find the explanations for several fundamental working steps
for the application of the BuildingSystems library (together with Dymola 2016 or higher) such as
the configuration of a system model structure,
the definition of the building model parameters,
the definition of the boundary conditions of the building model and
the performance of a simulation experiment.
The selected building model BuildingSystems.Buildings.BuildingTemplates.Building1Zone1DBox
uses a thermal 1D-modeling approach, which means all models of the building
constructions (walls, roof, ground plate, etc.) are discretized regarding energy balancing in one dimension
and the air space within the zone is modeled with one aggregated thermal node.
Mark the new example SimpleBuilding in the package browser and save it with File -> Save
in the file SimpleBuilding.mo in a folder of your choice.
Ensuring that Dymola is in “Diagram” mode (in the menu Window -> View -> Diagram or by clicking on the icon at the top of the Dymola window), find
BuildingSystems.Buildings.BuildingTemplates.Building1Zone1DBox in the package browser in the upper left part of the Dymola window, and drag and drop a component model from the Dymola package browser onto the grid. Rename it building.
This component is able to calculate the thermal energy balance of a one-zone thermal building model.
It is suited to our first example, because a simulation analysis can be carried out after defining only a few parameters.
Drag and drop an ambient model BuildingsSystems.Buildings.Ambience from the package browser onto the grid. Double-click on the model, and
choose the climate data for Germany_Berlin_Meteonorm_NetCDF from the drop-down menu in the parameter weatherDataFile. Now, pre-calculated
hourly weather data for Berlin provided by Meteonorm (http://www.meteonorm.com/en/) will be used to support the building model
with ambient values for air temperature, moisture, direct and diffuse radiation, wind speed and wind direction.
Connect the blue connectors ambience.toAirPorts and building.toAmbienceAirPorts
of the two models. Click on OK in the window that opens to connect all ports of the selected type. Now the climate boundary conditions which are caused by the ambient air of the building
will be considered (convective heat transfer and optionally also the moisture transport).
The simulation model, which consists of a building model and an ambient model¶
Next, connect the green connectors ambience.toSurfacePorts and building.toAmbienceSurfacePorts
of the ambience and the building model. This enables the ambient model to deliver the boundary conditions
for short-wave radiation from the sun and the long-wave radiation exchange with the sky.
The ambient model needs to know the number of surfaces of the building model which are in contact with
the ambient air. For this purpose double-click on the ambient component and add this information to
the parameter ambience.nSurfaces by clicking on the small arrow/triangle to the right of the text field and selecting Insert Component Reference: building ->
extends BuildingSystems.Buildings.BaseClasses.BuildingTemplate -> nSurfacesAmbience.
Connect the output variable ambience.TAirRef and the input variable building.TAirAmb (ambient temperature at
a reference height of 10 m) and also ambience.xAirRef and building.xAirAmb (ambient absolute moisture). Both
variables are necessary for the calculation of the energy loss caused by the air exchange of the building. Your model should now look like Figure 2.
Define the building dimensions. The inner space of the example building is 9 m wide,
9 m long, and 3 m high. These dimensions are equal to the enclosed air space;
the outer dimensions of the building model depend on the thickness of the selected wall, roof,
and base plate constructions. Double-click on the building and fill in these values under Geometry within the tab General
of the parameter dialog (see Fig. 3).
Define the type of opaque construction in the building model component. For this purpose open the tab Opaque constructions (see Fig.4), and, in the group Exterior constructions, select
the type Outer wall construction for single-family house EnEV 2014 for all exterior walls (constructionWall1 to constructionWall4),
the type Roof construction for single-family house EnEV 2014 for the roof (constructionCeiling), and
the type BasePlate construction for single-family house EnEV 2014 for the base plate (constructionBottom).
Set the parameters InteriorWalls
and InteriorCeilings to “false” (group Interior constructions on the same tab), because, for this example, interior constructions will be neglected.
It is worth noting that the walls and windows are numbered 1 = West, 2 = North, 3 = East, and 4 = South, as shown in Figure 5.
Define the type of transparent constructions in the building model. In the tab Transparent constructions (see Fig. 6), select the construction
type Heat protection double glazing with UValGla=1.4W/(m2.K) and g=0.58 for all windows (window1 to window4) . Define the size of window1 to 3 m width by
1 m height and window2, window3, and window4 to 1 m width by 1 m height. Set the frame portion of all of the windows to 0.3.
Left: Visualization of the building model with the color illustrating the surface temperatures of the building constructions. Right: Exploded visualization of the building model.¶
Set the boundary conditions of the building model¶
Define the set temperatures for heating and cooling and the air change rate. To define the set temperatures and the air change rate, find the MSL model class
Modelica.Blocks.Sources.Constant in the package browser menu and drag and drop three instances of it into the system model. Rename them to TSetHeating, TSetCooling and airchange and
parametrize them with 273.15 + 20.0 (20 degrees Celsius) 273.15 + 24.0 (24 degrees Celsius) and 0.5 (half an air change per hour) respectively.
Connect the output of the three blocks with the corresponding input variables building.TSetHeating, building.TSetCooling
and building.airchange on the upper right corner of the building model. For a smoother connection, you can right-click on the blocks and flip them horizontally.
Completed system model with boundary condition (set temperatures, air change rate)¶
The Modelica code of the described example of this chapter can be found under
Now the model is 100 percent prepared for a simulation analysis. Simulate the model over a time period of one year. To do this, select the experiment SimpleBuilding in the package browser of Dymola and switch to the simulation mode.
Open the Simulation Setup dialog and fill in 31536000 (3600 seconds/hour x 24 hours/day x 365 days/year = 31536000 seconds)
into the Stop time entry field and perform the simulation experiment.
Study the simulation results: the next two diagrams (Fig. 10 and 11) show the main important temperatures
(outside and inside air temperature, operative temperature) and the ideal heating and cooling power
for the building, which guarantees that the indoor air temperature remain in the desired area between 20 and 24 degrees Celsius.
The first diagram illustrates that the indoor air temperature and the operative temperature (the mean value of the indoor air
temperature and the mean surface temperature within the zone) are close together. The reason is the insulated construction
of the walls, the ceiling and the base plate in accordance with the current German energy code (EnEV 2014).
The indoor air temperature only reaches maximum values of 24 degrees Celsius during some summer days.
In the location Berlin, close to 100 percent of the thermal energy demand is made up of heating energy. A small amount of cooling energy is only needed during some of the hot summer days.
Air temperature, operative temperature and ambient air temperature during the yearly simulation (location Berlin, Germany)¶
In the next step, change the location of the building to study the impact of a hot and dry climate on the thermal energy demand
of the building model in comparison to the moderate climate of Berlin. Double-click on the ambient component and change the parameter weatherDataFile
within the component to Iran_Hashtgerd_Meteonorm_NetCDF. Hashtgerd is a city in northern Iran, 100 km west of Tehran.
The outside temperature in Hashtgerd is close to 40 degrees Celsius during the summer (compare to Berlin 32 degrees Celsius). This
leads to a significant cooling demand in summer, but there is still a relevant heating demand in winter.
Thermal energy demand for heating and cooling during the yearly simulation (location Berlin, Germany)¶
Air temperature, operative temperature and ambient air temperature during the yearly simulation (location Hashtgerd, Iran)¶
Thermal energy demand for heating and cooling during the yearly simulation (location Hashtgerd, Iran)¶
In this chapter the application of the BuildingSystems library for multi-zone building modeling is demonstrated.
For this purpose, a thermal building model of the Thermal Model House (http://www.thermisches-modellhaus.de) with
two thermal zones shall be created:
Thermal Model house: A portable experimental test facility for building physics studies, developed by UdK Berlin.¶
The Thermal Model House (TMH) is a portable experimental test facility with a simple geometry and a compact size
of approximately 1 m length, 0.5 m depth and 0.5 m height. This small thermal box is able to reproduce
different phenomena of building climatization within physical experiments. Due to its manifold configuration
options, it is possible to do experiments about the energy balance of rooms, about the heat and air transport processes within
rooms, about ventilation, heating and cooling of buildings as well as about building control.
The TMH is being developed at the Institute of Architecture and Urban Planning at UdK Berlin.
It is used for the education of architecture and engineering students and also for research.
One configuration of the TMH works with a inner partition wall, which divides the air volume of the
box into two different thermal zones. These zones can be separately heated or cooled using individual
heating surfaces on the bottom and cooling surfaces on the ceiling. Exactly this configuration
shall be modelled in the present case.
The modelling and simulation process is described using the Modelica simulation environment, Dymola (version Dymola 2018 FD01).
First of all the Modelica library BuildingSystems has to be loaded into Dymola. After that, the library
will occur in the library tree in addition to the other present Modelica libraries.
The creation and configuration of a new thermal building model takes place in the following steps:
Configuration of the building model structure (topology of the construction of the buildings model)
Definition of the building model parameters (building geometry and physical parameters of the construction elements)
Definition of the boundary conditions of the system model (climate conditions of the building ambience, set temperatures for heating and cooling for each thermal zone)
Create a new package for your simulation experiment.
Open dialog: File -> New -> Package and fill in the field Name of new package: “ThermalModelHouse” and click OK
Mark the new package ThermalModelHouse in the package browser and save it with File -> Save in the file ThermalModelHouse.mo in a folder of your choice.
Create a new building model based on the template model class BuildingTemplate. That means you insert a new building model into the previously defined package as follows:
Definition of a building model based on a building template¶
Open dialog: File -> New -> Model and fill in the field Name of new model: “Building”. Then
click on the button to the right of the field Extends (optional): and navigate to the model class
BuildingSystems.Buildings.BaseClasses.BuildingTemplate and click OK. Further click on the button right of the field
Insert in Package (optional): and navigate to the package ThermalModelHouse on the top level and click OK (compare the Dymola screenshoot above).
As a result you can see now the inner structure (the Diagram view in Dymola) of the empty building model.
On the left side you see the interfaces to the building ambience, below the interfaces to the ground of the building and on
the right side the input signals for the set temperatures for heating and cooling of each zone and the interfaces of the air
paths to the ambience.
Instantiate two thermal zones, which shall represent the left and right part of the TMH.
For this purpose drag and drop a component model from the class BuildingSystems.Buildings.Zones.ZoneTemplateAirvolumeMixed
into the building model and rename it to zone1. Add zone2 in the same manner:
For the opaque constructions (walls, bottoms, ceilings etc.) use the model class
BuildingSystems.Buildings.Constructions.Walls.WallThermal1DNodes and for the transparent constructions (windows) the model class
BuildingSystems.Buildings.Constructions.Windows.Window.
Notice, that each component comes with a blue line (which indicates side 1)
and has the connector toSurfacePort_1. The other unmarked side 2 owns the connector toSurfacePort_2.
The blue line helps you to distinguish both component sides, e.g. if you want to define single layers of a construction
in a certain order. In our case we bring all component models in a position, that all blue lines
show to the zones respectively in the case of the partition wall to zone1 and to the adjacent zone2.
In our case we have to instantiate seven walls (wall1 to wall7), two bottoms (bottom1 and bottom2), two ceilings (ceiling1 and ceiling2)
and two windows models (window1 and window2).
Connect construction elements.
Now connect the connectors of all “blue sides” with the zone models as in the following picture:
Building model with connected construction elements¶
Here each zone model offers you six different positions for connections to the construction elements (toConstructionPorts1 to toConstructionPorts6)
to enable a simplification of the graphical diagram.
In a further step connect the connectors of the other sides of all construction elements to the construction connector of the building model (toConstructionPorts on the left side).
Finally connect the input values of T_setHeating and T_setCooling (four connections) and the output values
Q_flow_heating and Q_flow_cooling (again four connections) from the building model to both zone models.
Now your topology of your building model is completely specified:
Completed topology of the building model with two thermal zones¶
Now the building model has to be completed with parameters, which exactly describe the problem. The first type are geometrical parameters,
e.g. the size of the construction elements or the volumes of the zones. The second type are physical parameters which define the building constructions
(e.g. the heat conductivity or specific heat capacity of the used materials).
Geometrical parameters
The TMH has a strongly simplified geometry. In our problem each thermal zone describes one half of the TMH, which has in total an inner dimension
of 1.0 m x 0.5 m x 0.5 m. So each opaque construction element (walls, bottoms and ceilings) has a height of 0.5 m and a width of 0.5 m.
Double-click on each component and fill in these values in the General tab in the Geometry group.
Both thermal zones have an air volume of 0.5 m x 0.5 m x 0.5 m = 0.125 m3. The height of the zone is 0.5 m.
Fill in these values into the zone model’s zone1 and zone2.
Each of the windows of the TMH has a width of 0.378 m and a height of 0.33 m, which leads to a window area of approx. 0.125 m2.
The thickness of the window pane is 0.003 m. Assign these three values to both window models.
Because window1 is enclosed in wall6 and window2 in wall5 the area of the window models has to be communicated from the window to the wall models.
Double-click on wall6 and fill in the parameter field nInnSur 1 and in the field AInnSur using the Edit Text option
AInnSur=window1.width*window1.height
Do the same with wall5 and window2.
Finally add the parameter values for the orientation of each construction elements, which face to the ambience by setting the azimuth angle
and the tilt angle. The default values for each construction element (walls and windows are 90.0 degree for the tilt angle and 0.0 degree
for the azimuth angle. North is defined by an azimuth angle of 180 degree, east by -90 degree and west by + 90 degree:
element
angleAzi
angleTil
element
angleAzi
angleTil
wall1
90.0
90.0
bottom1
0.0
180.0
wall2
180.0
90.0
bottom2
0.0
180.0
wall3
180.0
90.0
ceiling1
0.0
0.0
wall4
-90.0
90.0
ceiling2
0.0
0.0
wall5
0.0
90.0
window1
0.0
90.0
wall6
0.0
90.0
window2
0.0
90.0
wall7
default
default
Construction parameters
All the opaque construction elements except the partition element wall7 share the same construction.
For this reason a common construction type shall be configured, which will be later assigned
to each individual construction.
Definition of a construction type
Extend a child record from the general parent record for opaque constructions
BuildingSystems.Buildings.Data.Constructions.OpaqueThermalConstruction and rename it to Construction1TMH. Then
include it in the package ThermalModelHouse.
Definition of a construction type based on template for opaque constructions¶
The Construction1TMH shall have three layers. The materials of the three layers are 0.006 m wood, 0.030 m insulation
and again 0.009 m wood. The layer order is counted from inside (zone) to outside (building ambience). The
BuildingSystems library contains in the package BuildingSystems.HAM.Data.MaterialProperties
a database with pre-defined thermal and hygro-thermal material property sets.
Now double-click on the construction type record Construction1TMH left in the package browser and adapt the parameterization
of the construction direct in the Modelica source code editor of Dymola with the help of the pre-defined materials:
recordConstruction1TMH"Outer constructions of the TMH"extendsBuildingSystems.Buildings.Data.Constructions.OpaqueThermalConstruction(nLayers=3,thickness={0.006,0.030,0.009},material={BuildingSystems.HAM.Data.MaterialProperties.Thermal.Wood(),BuildingSystems.HAM.Data.MaterialProperties.Thermal.Insulation(),BuildingSystems.HAM.Data.MaterialProperties.Thermal.Wood()});endConstruction1TMH;
Assignment of an construction type
Now you can assign this common construction type to all the opaque construction elements by inserting
component references using the component parameter dialog of Dymola:
The generated code, for example for wall1 shall look now like:
Create in the same manner for the partition wall a second construction2TMH,
which only consists in one layer of wood with a thickness of 0.009 m and assign it afterwards to wall7.
Configure the system model and set its boundary conditions¶
Create a new model with the name SystemModel and insert it into the package ThermalModelHouse.
Instantiate the previous defined building model within the system model and rename it to building.
Instantiate an ambient model BuildingSystems.Buildings.Ambience within the system model and set the climate data
(parameter weatherDataFile) to USA_SanFrancisco_Meteonorm_ASCII.
Assign the parameter nSurfaces of the ambient model to the number of surfaces of the building, which are in contact
with the building environment:
nSurfaces={building.nSurfacesAmbience)
Connect the ambient model and the building model regarding to their blue interfaces (boundary conditions of the facade surfaces to the air)
and their green interfaces (boundary conditions of the facade surfaces to the solar irradiation and other enclosing surfaces)
Connect the output variable ambience.TAirRef and the input variable building.TAirAmb (ambient temperature at
a reference height of 10 m) and also ambience.xAirRef and building.xAirAmb (ambient absolute moisture).
Add six constant sources of the type Modelica.Blocks.Sources.Constant for the definition of
the set temperatures for heating and cooling as well as the air change for both thermal zones:
Christoph Nytsch-Geusen, Jörg Huber, Manuel Ljubijankic, and Jörg Rädler. Modelica BuildingSystems - Eine Modellbibliothek zur Simulation komplexer energietechnischer Gebäudessysteme. In BAUSIM 2012. 2012.
NGMIRadler14
Christoph Nytsch-Geusen, Katharina Mucha, Alexander Inderfurth, and Jörg Rädler. Entwicklung eines räumlich und physikalisch adaptiven energetischen Gebäudemodells in Modelica. In BAUSIM 2014. 2014.