You are on page 1of 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/267944941

Recent Developments of the Modelica "Buildings" Library for Building Energy


and Control Systems

Conference Paper · June 2011


DOI: 10.3384/ecp11063266

CITATIONS READS

44 3,659

4 authors, including:

Michael Wetter Wangda Zuo


Lawrence Berkeley National Laboratory Pennsylvania State University
135 PUBLICATIONS 5,469 CITATIONS 176 PUBLICATIONS 2,897 CITATIONS

SEE PROFILE SEE PROFILE

Thierry Stephane Nouidui


Lawrence Berkeley National Laboratory
37 PUBLICATIONS 1,223 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Comprehensive Pliant Permissive Priority Optimization View project

Energy Modeling of Typical Commercial Buildings in Support of ASHRAE Building Energy Quotient Energy Rating Program View project

All content following this page was uploaded by Thierry Stephane Nouidui on 25 February 2015.

The user has requested enhancement of the downloaded file.


Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

Recent Developments of the Modelica “Buildings”


Library for Building Energy and Control Systems
Michael Wetter, Wangda Zuo, Thierry Stephane Nouidui
Simulation Research Group, Building Technologies Department,
Environmental Energy Technologies Division, Lawrence Berkeley National Laboratory,
Berkeley, CA 94720, USA

Abstract control algorithms,


3. analysis of the operation of existing building
At the Modelica 2009 conference, we introduced
systems,
the Buildings library, a freely available Model-
4. development and specification of building
ica library for building energy and control sys-
control sequences, and
tems [16].
5. reuse of models during operation for energy-
This paper reports the updates of the library
minimizing controls, fault detection and diag-
and presents example applications for a range of
nostics.
heating, ventilation and air conditioning (HVAC)
systems. Over the past two years, the library has
To support these use cases, we develop an
been further developed. The number of HVAC
open-source Modelica library for building en-
components models has been doubled and various
ergy and control systems. The library is
components have been revised to increase numer-
freely available from http://www.modelica.org/
ical robustness.
libraries/Buildings.
The paper starts with an overview of the li-
At the 7th Modelica conference in 2009, we
brary architecture and a description of the main
introduced the Buildings library, version 0.6.0,
packages. To demonstrate the features of the
which had 73 non-partial models and blocks, as
Buildings library, applications that include mul-
well as 26 functions. The latest version, 0.10.0, has
tizone airflow simulation as well as supervisory
129 non-partial models and blocks and 39 func-
and local loop control of a variable air volume
tions. This paper highlights some of these updates
(VAV) system are briefly described. The paper
to inform users about the new capabilities.
closes with a discussion of the current develop-
The paper is structured as follows: Section 2
ment.
gives an overview of the Buildings library. Sec-
Keywords: building energy systems, heating,
tion 3 describes the updates in detail. Section 4
ventilation, air-conditioning, controls
presents applications with models for multizone
airflow simulation and for co-simulation. Section 5
1 Introduction describes classes which are currently under devel-
Buildings account for a large portion of energy opment and will be available in future releases.
consumption and related green house gas emis-
sions. For example, in the United States, build- 2 Summary of the Buildings Li-
ings consume 2/3 of electricity and 40% of total
brary
energy [4]. In order to reduce global green house
gas emissions, it is critical to reduce building en- The Buildings library is based on the
ergy consumption by increasing energy-efficiency Modelica.Fluid library [8]. The Buildings li-
and by using more renewable energy. To support brary is organized into the packages shown in
the design and operation of low energy buildings, Fig. 1. Components in these packages augment
a simulation program should support: models from the Modelica Standard Library and
from the Modelica.Fluid library. Base classes,
1. rapid prototyping of new building systems, which are typically not of interest to the end-user,
2. comparison of the performance of different de- but are used to construct other classes, are stored
signs of the building, its energy system and its in packages called BaseClasses. Most packages

266
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

contain a package called Examples, which con- Buildings.Airflow.Multizone


tains example applications. The examples illus- .Controls.Continuous
trate typical use of components in the parent di- .Discrete
rectories. They are also used to conduct unit tests. .SetPoints
.Fluid.Actuators.Dampers
The current Buildings library contains six ma- .Motors
jor packages, including a new package Airflow. .Valves
The package Airflow provides models to compute .Boilers
the airflow inside the buildings and between the .Chillers
building and the ambient environment. It cur- .Delays
rently has a package Multizone for multizone air- .FixedResistances
flow models, which is discussed in Section 3.1. .HeatExchangers
.HeatExchangers.CoolingTowers
The Controls package contains components for
.Radiators
continuous time control, discrete time control and .Interfaces
scheduling of set points. The package Fluid is .MassExchangers
the largest package of the Buildings library. It .MixingVolumes
contains components for fluid flow systems, such .Movers
as pumps, boilers, chillers, valves and sensors, .Sensors
which are described in Section 3.3. The pack- .Sources
age HeatTransfer contains models for heat trans- .Storage
.Utilities
fer in buildings (Section 3.4). It provides mod- .HeatTransfer
els and functions for heat transfer due to con- .Media.ConstantPropertyLiquidWater
vection, conduction and radiation. It also has .GasesPTDecoupled
thermal property data for different solid mate- .GasConstantDensity
rials. The Media package contains media mod- .IdealGases
els that are simpler and generally computation- .PerfectGases
ally more efficient than the ones in the Modelica .Utilities.Comfort
.Diagnostics
Standard Library. The simplifications have been
.IO.BCVTB
done by taking into account that HVAC systems .Math
in buildings typically have a smaller range of op- .Psychometrics
erating conditions compared to other thermody- .Reports
namic applications. The Utilities package pro-
vides utilities such as for the calculation of ther- Figure 1: Package structure of the Buildings li-
mal comfort and psychrometric properties. It also brary. Only the major packages are shown. Bold
has an interface to the Building Control Virtual indicates a new package and italic indicates exist-
Test Bed (BCVTB) [17], which can connect Mod- ing packages with new models added.
elica to other simulation programs, such as Ener-
gyPlus, MATLAB/Simulink and Radiance, for co-
simulation. The BCVTB can also connect Mod- ing simulation, many different indoor airflow mod-
elica models to building automation systems for els are generally used, such as multizone network
model-based operation. models [3], zonal models [12], computational fluid
dynamics [13], and fast fluid dynamics [18]. For in-
door airflow simulation, multizone network models
3 Updates of the Buildings Li-
with the well-mixed air assumption are fast but
brary not appropriate if the air is stratified. By solv-
This section compares the newest Buildings li- ing the Navier-Stokes equations and equations for
brary, version 0.10.0, with version 0.6.0 which was conservation of mass and energy, computational
reported in the last Modelica conference [16]. The fluid dynamics (CFD) is the most detailed and
purpose is to explain to users the new packages, accurate modeling method. However, computing
models and blocks, as well as their new features. time for CFD is large for flow simulation in a large
building or over a long time horizon. To fill the
3.1 Package Airflow gap between multizone and CFD, fast fluid dy-
The airflow package provides models for com- namics models solve the Navier-Stokes equations
puting air flow inside a building and between a with simplified schemes that are much faster but
building and its exterior environment. For build- less accurate than CFD.

267
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

Currently, the Airflow package contains mul- in [15]. The model DoorDiscretizedOpen de-
tizone airflow models in the package Multizone. scribes a door that is always open, and the
These models compute the airflow and contam- model DoorDiscretizedOperable describes a
inant transport between different rooms, as well door whose opening area can be changed using
as between a room and the exterior. Multizone a control signal.
airflow models assume that air and contaminants To model the pressure difference caused by stack
in each room volume are completely mixed. The effect, one can use the model MediumColumn for
driving force for the air flow is pressure difference a steady-state and MediumColumnDynamic for a
induced by flow imbalance of the HVAC system, transient model. The model MediumColumn com-
density difference across large openings (such as putes the pressure difference at its ports using
open doors or windows), stack effects in high rise
∆p = h ρ g, (2)
buildings, and wind pressure on the building fa-
cade. where h is the height of the medium column, ρ
The air volume in each room is modeled by is the density and g is the earth acceleration.
an instantaneously mixed volume that provides The model MediumColumn can be parameterized
differential equations for conservation of mass, to use for ρ the density of either port, or the den-
species concentration, trace substances and inter- sity of the inflowing medium. The latter situa-
nal energy. As in Modelica.Fluid, a parameter tion allows, for example, modeling of a vertical
can be used to switch between steady-state and shaft, such as a chimney, whose density may be
transient simulation, and to switch the initializa- equal to the one of the inflowing medium. The
tion equations between steady-state initialization model MediumColumnDynamic contains, in addi-
and prescribed state variables. tion to (2), also a mixing volume that may be
The flow resistance between these volumes is used to approximate the transient response of the
computed using the orifice equation medium column, or to inject heat into the air
p
V̇ = Cd A 2/ρ ∆P m , (1) stream as may happen in a solar chimney in which
walls absorb solar radiation and heat the fluid in-
where V̇ is the volume flow rate, Cd is the dimen- side the chimney to increase the buoyancy force.
sionless discharge coefficient, A is the cross section The models ZonalFlow ACS and
area of the opening, ρ is the density of the fluid, ZonalFlow m flow can be used to exchange
∆P is the static pressure difference and m is the a fixed flow rate between two volumes. As an
flow exponent. Large openings are characterized input, they use the air exchange rate per second
by m very close to 0.5, while values near 0.65 have and the mass flow rate, respectively.
been found for small crack-like openings. Typical The Multizone package was implemented based
values for Cd and m can be found in [15] and in on the multizone package described in [15], which
the citations therein. For pressure differences that has been contributed by the United Technolo-
are smaller in magnitude than a user-specified pa- gies Research Center (UTRC) for inclusion in the
rameter, equation (1) is regularized to ensure that Buildings library. However, several changes have
it is differentiable with a continuous derivative. been done when migrating the models to Mod-
The model EffectiveAirLeakageArea com- elica 3.1, which led to a simpler implementation
putes air leakage. It describes a one-directional based on the stream function [9]. A comparison
pressure driven air flow through a crack-like open- between the two implementations is described in
ing. The opening is modeled as an orifice. The Section 4.1.
orifice area is parameterized by processing the ef-
fective air leakage area, the discharge coefficient 3.2 Package Controls
and pressure drop at a reference condition. The The package Controls contains blocks that can
effective air leakage area can be obtained, for ex- be used in conjunction with the controls mod-
ample, from the ASHRAE fundamentals [1]. A els from the Modelica Standard Library to im-
similar model is also used in the multizone airflow plement controllers of building energy systems.
modeling software CONTAM [5]. The package Controls.Continuous has a new
To compute the bi-directional flow across large model LimPID, which can provide P, PI, PD, and
openings, such as doors, the opening is dis- PID controllers with limited output, anti-windup
cretized along its height into compartments. compensation and setpoint weighting. The pack-
Then, the orifice equation (1) is used to com- age Controls.SetPoints has a new model Table,
pute the flow for each compartment as explained which allows setting a time-varying set point.

268
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

3.3 Package Fluid mass with one or two fluid streams. The
The Fluid package contains component mod- model PartialLumpedVolume has been added
els for thermo-fluid flow systems. The level of to provide a base class for an ideally mixed
modeling detail is comparable with the mod- fluid volume with the ability to store mass
els of the Modelica.Fluid library. Most mod- and energy. This model is similar to the
els in Buildings.Fluid extend models from partial model PartialLumpedVolume from
Modelica.Fluid to form components that are Modelica.Fluid.Interfaces, except that it
typically needed when modeling building energy allows modeling the air humidity using a differ-
systems. The Fluid package is the largest pack- ential equation, while modeling the total mass
age in the Buildings library, and it has 15 sub- balance using a steady-state equation.
packages. This section will discuss seven sub- 3.3.3 Package Fluid.Actuators
packages to which new models have been added. The package Fluid.Actuators contains mod-
3.3.1 Package Fluid.Chillers els of actuators. There are models of valves with
The package Fluid.Chillers contains two new two and three fluid ports and with various opening
chiller models. The first chiller model is an elec- characteristics as well as models of air dampers.
tric chiller based on the EnergyPlus chiller model There are also models of motors that can be used
Chiller:Electric:EIR. This model uses three in conjunction with the actuators.
functions to predict its capacity and its power con- The main change to this package was a redesign
sumption: of the three-way-valves. The new implementa-
tion allows the optional addition of a fluid volume
• a biquadratic function is used to predict its
where the two fluid streams mix. The fluid vol-
cooling capacity as a function of condenser
ume can be conditionally added or removed based
entering and evaporator leaving fluid temper-
on the parameter dynamicBalance. The use of
ature,
this fluid volume often leads to a more robust and
• a quadratic function is used to predict its
faster simulation.
power input to cooling capacity ratio as a
function of the part load ratio, 3.3.4 Package Fluid.HeatExchangers
• a biquadratic function is used to predict its This package contains algebraic and dynamic
power input to cooling capacity ratio as a heat exchanger models, some of which com-
function of condenser entering and evapora- pute condensation of water vapor that may
tor leaving fluid temperature. occur at a cooling coil. Several new models
have been added. For example, the model
The second implemented chiller model is an HeatExchangers.DryEffectivenessNTU de-
electric chiller based on the model by Hy- scribes a heat exchanger without water vapor
deman et al. [10]. This model is also condensation that is based on the effectiveness-
implemented in EnergyPlus as the model NTU relation [11]. This model transfers heat in
Chiller:Electric:ReformulatedEIR and is sim- the amount of
ilar to the first chiller model. The main dif-
ference is that to compute its performance, this Q̇ =  Q̇max , (3)
model uses the condenser leaving temperature in- where Q̇max is the maximum heat that can be
stead of the entering temperature, and it uses a transferred, and  is the heat transfer effective-
bicubic polynomial instead of a quadratic func- ness, defined as
tion to compute the part load performance. This  = f (N T U, Z, f lowRegime), (4)
model is reported to provide higher accuracy for where N T U is number of transfer units, Z is
variable-speed compressor drive and variable con- the ratio of minimum to maximum capacity flow
denser water flow applications compared to the rate and f lowRegime is the heat exchanger flow
model Chiller:Electric:EIR. regime, such as parallel flow, cross flow or counter
The package Fluid.Chillers.Data contains flow.
performance data for more than 300 chillers. Also new in this package are the models
3.3.2 Package Fluid.Interfaces DryCoilCounterFlow and WetCoilCounterFlow,
Similarly to Modelica.Fluid.Interfaces, which are finite volume models of counter flow
there is a package Buildings.Fluid.Interfaces. heat exchanger without and with water vapor con-
It contains partial models for algebraic and dy- densation if the air is cooled below its saturation
namic components that exchange heat or temperature.

269
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

3.3.5 Package Fluid.Movers These models have similar param-


This package contains component models for eters as the models in the package
fans and pumps. Four new models have been Modelica.Fluid.Machines. However, the
added that can be parameterized by performance models in this package differ primarily in the
curves that compute pressure rise, electrical power following points:
draw or efficiency as a function of the flow rate.
The four models differ in their implementation of • They use a different base class, which al-
the input signal, which can be a control signal, a lows having zero mass flow rate for the
prescribed speed, a prescribed mass flow rate or a fan and pump models. The models in
prescribed pressure rise. Modelica.Fluid.Machines restrict the num-
The models FlowMachine y and ber of revolutions, and hence the flow rate, to
FlowMachine Nrpm take a control signal or a be non-zero.
number of revolutions as an input, and then • For the model with prescribed pressure, the
compute the resulting pressure difference for the input signal is the pressure difference between
current flow rate. The models FlowMachine dp two ports, and not the absolute pressure at
and FlowMachine m flow take the pressure differ- the outlet port.
ence or the mass flow rate as an input signal. The • The pressure calculations are based on to-
pressure difference or the mass flow rate will then tal pressure in Pascals instead of the pump
be provided by the fan or the pump. These two head in meters. This change has been made
models do not have a performance curve for the to avoid ambiguities in the parameterization
flow characteristics, because solving for the flow if the models are used as a fan with air as
rate and the revolution at zero pressure difference the medium. The original formulation in
can lead to a singularity. Modelica.Fluid.Machines converts head to
All models can be configured to have a fluid pressure using the density of the medium. For
volume at the low-pressure side. Adding such a fans, head would be converted to pressure us-
volume sometimes helps the solver find a solution ing the density of air. However, manufac-
during initialization and time integration of large turers of fans typically publish the head in
models. millimeters water (mmH20). Therefore, to
All models compute the motor power draw Pele , avoid confusion when using these models with
the hydraulic power input Whyd , the flow work media other than water, our implementation
Wf lo and the heat dissipated into the medium Q̇. uses total pressure in Pascals instead of head
The governing equations are in meters.
• Additional performance curves
Wf lo = |V̇ ∆p|, (5) have been added to the package
Whyd = Wf lo + Q̇, (6) Buildings.Fluid.Movers.BaseClasses.-
η = Wf lo /Pele = ηhyd ηmot , (7) Characteristics.
ηhyd = Wf lo /Whyd , (8)
ηmot = Whyd /Pele , (9) 3.3.6 Package Fluid.Sensors
This package consists of idealized sensor com-
where V̇ is the volume flow rate, ∆p is the pres- ponents that provide variables of the medium.
sure rise, η is the overall efficiency, ηhyd is the These signals can be further processed with com-
hydraulic efficiency, and ηmot is the motor effi- ponents of the Modelica.Blocks library. One can
ciency. All models take as a parameter an effi- also build more realistic sensor models by fur-
ciency curve for the motor. This function has the ther processing their output signal (e.g., by at-
form ηmot = f (V̇ /V̇max ), where V̇max is the max- taching the block Modelica.Blocks.FirstOrder
imum flow rate. The models FlowMachine y and to model the time constant of the sensor). The
FlowMachine Nrpm set V̇max = fc (∆p = 0, rN = new version of the library increased the number of
1) where fc (·, ·) is a user-specified flow characteris- sensors from 4 to 22. Sensors are now available for
tic and rN is the ratio of actual to nominal speed. density, enthalpy, mass flow rate, volume flow rate,
Since FlowMachine dp and FlowMachine m flow pressure, relative humidity, dry bulb temperature,
are not parametrized by the function fc (·, ·), the wet bulb temperature, species concentration, such
parameter V̇max must be set by the user for these as water vapor, and trace substances, such as car-
models. bon dioxide.

270
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

3.3.7 Package Fluid.Sources in this package are based on simplified state


This package contains models for fixed or pre- equations and property equations. The sim-
scribed boundary conditions for thermo-fluid sys- plification can generally lead to a faster and
tems. The new version of the library adds five more robust simulation compared to the mod-
different combinations of boundary sources. For els of Modelica.Media. The new version adds a
example, the model Boundary ph prescribes pres- sub-package Media.GasesConstantDensity. The
sure, specific enthalpy, mass fraction and trace models in this sub-package use a constant mass
substances. The model MassFlowSource T is an density to avoid having pressure as a state vari-
ideal flow source that produces a prescribed mass able in mixing volumes. The advantage of using
flow rate with prescribed temperature, mass frac- constant mass density is that fast transients intro-
tion and trace substances. duced by a change in pressure are avoided. The
disadvantage is that the dimensionality of the cou-
3.3.8 Package Fluid.Storage pled nonlinear equation system is typically larger
This package contains models of ther- for flow networks.
mal energy storage tanks. For the model
StratifiedEnhanced, a new model using the 3.6 Package Utilities
QUICK scheme [6] for the discretization of the
This package contains various utility mod-
fluid volume has been implemented. It computes
els and functions, including diagnostics models,
a heat flux that needs to be added to each volume
mathematical functions and a package for co-
in order to give the results that a third-order
simulation with the Building Controls Virtual Test
upwind discretization scheme would give. If
Bed (BCVTB). The BCVTB is a middle-ware that
a standard third-order upwind discretization
can connect Modelica with different simulation
scheme were to be used, then the temperatures of
programs, such as MATLAB/Simulink, Energy-
the elements that face the tank inlet and outlet
Plus and Radiance. The BCVTB can also link to
ports would overshoot by a few tenths of a Kelvin.
building automation systems through a BACnet
To reduce this overshoot, the model uses a first
interface [2] and through analog/digital convert-
order scheme at the boundary elements, and it
ers.
adds a term that ensures that the energy balance
is satisfied. Without this term, small numerical More interfaces, such as a model for
errors in the energy balance, introduced by the the boundary condition for HVAC sys-
third order discretization scheme, would occur. tems that use a medium with moist air
BCVTB.MoistAirInterface and blocks for
3.4 Package HeatTransfer temperature conversions BCVTB.to degC,
This package contains models for heat trans- BCVTB.from degC, are introduced in the new
fer elements. Based on a single-layer con- version to facilitate the communication between
duction model ConductorSingleLayer, the Modelica and the BCVTB. For illustration, Fig. 2
new version of the library adds the model shows an air-based heating system with an ideal
ConductorMultiLayer for one-dimensional heater and an ideal humidifier in the supply duct.
dynamic and steady-state heat conduction The heating system is coupled to the BCVTB for
through multi-layer constructions. In addition, co-simulation with EnergyPlus. The heater and
a convection model Convection and a model humidifier are controlled with a feedback loop
for combination of convection and conduction that tracks the room air temperature and room
for opaque constructions ConstructionOpaque air humidity. These quantities are simulated in
are also implemented. The models for heat the EnergyPlus building simulation program.
convection are parameterized by different func- The component bouBCVTB models the boundary
tions that compute heat convection based on between the domain that models the air system
temperature differences, or based on a constant (simulated in Modelica) and the room response
value. These functions are available in the package (simulated in EnergyPlus).
HeatTransfer.Functions.ConvectiveHeatFlux. To assess comfort conditions in rooms, the new
version of the library adds a sub-package Comfort.
3.5 Package Media This package contains a model that computes
This package contains media models that the thermal comfort according to the relations of
can be used in addition to the models from Fanger [1]. In Fanger’s model, the thermal sensa-
Modelica.Media. Some of the media models tion of a human is mainly related to the thermal

271
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

Figure 2: Modelica model that is used for co-simulation of a simple HVAC system that is connected
to an EnergyPlus building model.

balance of its body. This balance is influenced out the stream connectors in Fig. 3(b). The mod-
by two groups of factors: personal and physical. els became simpler, since with stream connectors,
The activity level and clothing thermal insulation the inStream operator can be used to obtain the
of the subject form the group of personal factors, properties of the medium inside the volumes that
while the environmental parameters (e.g., air tem- are connected to the model that computes the
perature, mean radiant temperature, air velocity, stack effect.
and air humidity) compose the group of physical We also compared the mass flow rates through
factors. When the personal factors have been es- the door and the openings in the walls. The mass
timated and the physical factors have been mea- flow rates computed by the new version are the
sured, the average thermal sensation of a large same as in the original implementation [15], which
group of people can be predicted by calculating indicates that the implementation of the multi-
the PMV (Predicted Mean Vote) index. The PPD zone airflow models using stream connectors was
(Predicted Percentage of Dissatisfied) index, ob- successful.
tained from the PMV index, provides information
on thermal discomfort (thermal dissatisfaction) by 4.2 Modelica EnergyPlus Co-
predicting the percentage of people likely to feel simulation for the Control of a
too hot or too cold in the given thermal environ- VAV System
ment. This example illustrates the use of co-simulation
between Modelica and EnergyPlus through the
4 Applications BCVTB. In Modelica, we implemented a variable
air volume flow system for a building with five
4.1 Multizone Air Flow Model thermal zones. The Modelica model implements
The multizone air flow model in the Buildings the airflow network, the fans and heat exchangers,
library is based on the library implemented by and the supervisory and local loop control. At the
UTRC, which is presented in [15]. We converted air inlet and outlet of the five thermal zones, an
the library to use the stream connectors [9], and energy balance is made for the sensible and la-
implemented it in the Buildings library. Fig. 3 tent heat exchange. These heat flows are then
compares model diagrams for modeling airflow in added to the model of the thermal zones in Ener-
three rooms. The diagram using stream connec- gyPlus. EnergyPlus then computes the new room
tors in Fig.3(a) is much simpler than the one with- temperatures and water vapor concentrations, as

272
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

system
de…
g ical Jacobians. The Modelica models are linked
through the BCVTB to EnergyPlus, as shown in
Fig. 5. For a more detailed description about this
TTop

K
system and its simulation results, see [17].
T=2…

oriEas…
oriWe…

open TEas oriOut…


TWes
K volOut
K k=1 T=2…
T=2… dooOp…
y

oriOut…

(a) With stream connectors.

Figure 5: BCVTB model for the co-simulation be-


tween Modelica and EnergyPlus.

5 Ongoing Work
The next major addition to the Buildings li-
brary will be a package with models for a ther-
mal zone that compute heat transfer through the
building envelope and within a room. While the
Buildings library can already be linked to En-
ergyPlus, for some situations, it is more practical
(b) Without stream connectors. to have all models implemented in Modelica. This
requires the implementation of such a room model
Figure 3: Comparison between diagrams of three that can be used to assemble buildings with sev-
room problem implemented by Modelica multi- eral thermal zones.
zone airflow models with and without stream con- For the building envelope, we have implemented
nectors. Subfigure (b) is the model presented models for heat conduction through opaque multi-
in [15]. layer materials, which are available in the pack-
age Buildings.HeatTransfer. Currently, we are
working on the implementation of models for win-
well as the current weather conditions. Energy- dow systems. The window model will compute
Plus also computes the heat balance of the build- a layer-by-layer radiation, convection and conduc-
ing and the lighting control as a function of the tion heat balance, using equations that are similar
available daylight. Thus, the co-simulation allows to the ones in the Window 5 program [7].
users to utilize Modelica for the implementation We are also working on the implementation of
and performance assessment of control sequences, models for short-wave, long-wave and convective
and to utilize EnergyPlus for its whole building heat transfer in a room. These models will be
heat transfer and daylighting models. similar to the models described in [14].
Fig. 4 illustrates the HVAC system as imple- To obtain boundary conditions,
mented in Modelica. The total system model con- we have implemented a package
tained 970 components that led to a differential Buildings.BoundaryConditions, which will
algebraic equation system with 5,000 scalar equa- be released in the next version. This package
tions. The translated model had 90 continuous includes models for the sky black-body temper-
time states and 20 nonlinear systems of equations ature, the path of the sun, and incidence angles
with dimensions up to 6. There are no numer- on tilted surfaces. There will also be a weather

273
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

(a) Plant of VAV system.

(b) Distribution of VAV system with five thermal zones.

Figure 4: Modelica model of the VAV system that is linked to EnergyPlus for co-simulation.

274
Proceedings 8th Modelica Conference, Dresden, Germany, March 20-22, 2011

data reader. Weather data can be obtained for 4.0: Documentation of Calculation Procedures.
free from http://www.energyplus.gov, and Lawrence Berkeley National Laboratory, Berke-
then converted to Modelica format with a Java ley, CA, USA, 1993.
program that is provided with the Buildings [8] R. Franke, F. Casella, M. Otter, K. Proelss,
library. M. Sielemann, and M. Wetter. Standardization
of thermo-fluid modeling in modelica.fluid. In
6 Conclusion F. Casella, editor, Proc. of the 7-th International
Modelica Conference, Como, Italy, Sept. 2009.
The Modelica Buildings library has been sig-
nificantly expanded since the last Modelica con- [9] R. Franke, F. Casella, M. Otter, M. Sielemann,
ference. A new Airflow package has been added H. Elmqvist, S. E. Mattsson, and H. Olsson.
for indoor air flow simulation. Many models have Stream connectors: an extension of modelica for
been added into existing packages to provide more device-oriented modeling of convective transport
phenomena. In F. Casella, editor, the 7th Inter-
functionality, and existing models have been re-
national Modelica Conference, Como, Italy, 2009.
vised to improve the numerical efficiency. How-
ever, for large fluid flow systems with feedback [10] M. Hydeman, N. Webb, P. Sreedharan, and
control, such as the ones shown in Fig. 4, com- S. Blanc. Development and testing of a refor-
puting consistent initial conditions and perform- mulated regression-based electric chiller model.
ing the time integration can still lead to numerical ASHRAE Transactions, 108(2), 2002.
problems. The robust simulation of such systems [11] F. P. Incropera and D. P. D. Witt. Fundamentals
still requires further research. of Heat and Mass Transfer. John Wiley & Sons,
5th edition, 2001.
7 Acknowledgments [12] A. C. Megri and F. Haghighat. Zonal modeling
This research was supported by the Assistant for simulating indoor environment of buildings:
Secretary for Energy Efficiency and Renewable Review, recent developments, and applications.
Energy, Office of Building Technologies of the U.S. HVAC&R Research, 13(6):887–905, 2007.
Department of Energy, under Contract No. DE- [13] P. V. Nielsen. Computational fluid dynamics
AC02-05CH11231. and room air movement. Indoor Air, 14:134–143,
We would also like to thank the United Tech- 2004.
nologies Research Center for contributing the
Multizone package to the Buildings library. [14] M. Wetter. Simulation-Based Building Energy
Optimization. PhD thesis, University of Califor-
nia, Berkeley, 2004.
References
[15] M. Wetter. Multizone airflow model in model-
[1] ASHRAE. ASHRAE fundamentals, 1997.
ica. In the 5th International Modelica Conference,
[2] ASHRAE. ANSI/ASHRAE Standard 135-2004, pages 431–440, Vienna, Austria, 2006.
BACnet, a data communication protocol for
building automation and control networks, 2004. [16] M. Wetter. Modelica library for building heat-
ing, ventilation and air-conditioning systems. In
[3] J. Axley. Multizone airflow modeling in build- the 7th International Modelica Conference, Como,
ings: History and theory. HVAC&R Research, Italy, 2009.
13(6):907–928, 2007.
[17] M. Wetter. Co-simulation of building energy and
[4] DOE. Buildings energy data book. Technical Re- control systems with the building controls virtual
port DOE/EE-0325, Department of Energy, 2009. test bed. In press: Journal of Building Perfor-
mance Simulation, 2010.
[5] W. S. Dols and G. N. Walton. CONTAMW 2.0
user manual, multizone airflow and contaminant [18] W. Zuo and Q. Chen. Real-time or faster-than-
transport analysis software. Technical Report NI- real-time simulation of airflow in buildings. In-
STIR 6921, National Institute of Standards and door Air, 19(1):33–44, 2009.
Technology, 2002.
[6] J. H. Ferziger and M. Peric. Computational meth-
ods for fluid dynamics. Springer, Berlin, New
York, 3rd, rev. edition, 2002.
[7] E. U. Finlayson, D. K. Arasteh, C. Huizenga,
M. D. Rubin, and M. S. Reilly. WINDOW

275

View publication stats

You might also like