Buildings.UsersGuide
User's Guide
Information
The Buildings
library is a free open-source library for modeling of building energy and control systems.
Many models are based on models from the package
Modelica.Fluid and use
the same ports to ensure compatibility with models from that library.
The web page for this library is http://simulationresearch.lbl.gov/modelica. We welcome contributions from different users to further advance this library, whether it is through collaborative model development, through model use and testing or through requirements definition or by providing feedback regarding the model applicability to solve specific problems.
The library has the following User's Guides:
-
General information about the use of the
Buildings
library is available at http://simulationresearch.lbl.gov/modelica/userGuide. This web site covers general information that is not specific to the use of individual packages or models. Discussed topics include how to get started, best practices, how to post-process results using Python, work-around for problems and how to develop models.
-
Some packages have their own
User's Guides that can be accessed by the links below.
These User's Guides are explaining items that are specific to the
particular package.
Airflow.Multizone Package for multizone airflow and contaminant transport. BoundaryConditions Package for computing boundary conditions, such as solar irradiation. Controls.OBC Package with the Control Description Language (CDL) and with control sequences that are implemented using CDL. Fluid Package for one-dimensional fluid in piping networks with heat exchangers, valves, etc. Fluid.Actuators Package with valves and air dampers. Fluid.FMI Package with blocks to export thermofluid flow models as Functional Mockup Units. Fluid.HeatExchangers.ActiveBeams Package with active beams. Fluid.HeatExchangers.DXCoils Package with direct evaporative cooling coils. Fluid.HeatExchangers.RadiantSlabs Package with radiant slabs. Fluid.Movers Package with fans and pumps. Fluid.Sensors Package with sensors. Fluid.Storage Package with storage tanks and an expansion vessel. Fluid.SolarCollectors Package with solar collectors. Fluid.Interfaces Base models that can be used by developers to implement new models. HeatTransfer Package for heat transfer in building constructions. ThermalZones.Detailed.UsersGuide.MixedAir Package for heat transfer in rooms and through the building envelope with the room air being modeled using the mixed air assumption. ThermalZones.Detailed.UsersGuide.CFD Package for heat transfer in rooms and through the building envelope with the room air being modeled using computational fluid dynamics. ThermalZones.Detailed.Examples.FFD.UsersGuide Package with examples that use the Fast Fluid Dynamics program for the computational fluid dynamics. ThermalZones.EnergyPlus.UsersGuide Package for Spawn of EnergyPlus with models that use EnergyPlus to simulate one or several building envelope models. Utilities.IO.Python_3_8 Package to call Python functions from Modelica. Utilities.Plotters Package that allow writing time series and scatter plots to an html output file.
- There are also tutorials available at Buildings.Examples.Tutorial. These tutorials contain step by step instructions for how to build system models.
Extends from Modelica.Icons.Information (Icon for general information packages).
Package Content
Name | Description |
---|---|
Conventions | Conventions |
ReleaseNotes | Release notes |
Contact | Contact |
Acknowledgements | Acknowledgements |
License | License |
Buildings.UsersGuide.Conventions
Conventions
Information
The Buildings
library uses the following conventions,
which largely are based on the conventions of the Modelica Standard Library.
Package structure
Packages have usually the following subpackages:
-
UsersGuide
containing an overall description of the library and how to use it. -
Examples
containing models demonstrating the usage of the library. -
Validation
containing typically small models that validate a certain behavior of a model. -
Interfaces
containing connectors and partial models. -
Types
containing type, enumeration and choice definitions.
Naming
-
Class names of models, blocks and packages should start with an upper-case letter and be a
noun or a noun with a combination of adjectives and nouns.
Use camel-case notation to combine multiple words, such as
HeatTransfer
. Don't repeat higher level package names, for example, rather thanChillers.CarnotChiller
, useChillers.Carnot
. -
Instance names should be a combination of the first three
characters of a word, such as
preDro
for pressure drop model. Where applicable, a single character can be used if this is generally understood, such asT
for temperature,p
for pressure,u
for control input andy
for control output signal. As needed, these can be augmented, for example a controller that outputs a control signal for a valve and a damper may outputyVal
andyDam
. -
The following variables are frequently used for physical quantities:
T
for temperature,p
for pressure,dp
for pressure difference,P
for power,E
for energy (orQ
for thermal energy),X
for mass fraction,Q_flow
for heat flow ratem_flow
for mass flow rate andH_flow
for enthalpy flow rate.
-
The nomenclature used in the package
Buildings.Utilities.Psychrometrics
is as follows,
-
Uppercase
X
denotes mass fraction per total mass. -
Lowercase
x
denotes mass fraction per mass of dry air. -
The notation
z_xy
denotes that the function or block has outputz
and inputsx
andy
. -
The symbol
pW
denotes water vapor pressure,TDewPoi
denotes dew point temperature,TWetBul
denotes wet bulb temperature, andTDryBul
(or simplyT
) denotes dry bulb temperature.
-
Uppercase
-
Control input signals usually start with
u
and control output signals usually start withy
, unless use of the physical quantity is clearer. -
The following strings are frequently used:
-
Prefix
use_
for conditionally enabled input signals, such asuse_T_in
for enabling an input connector for temperature in Buildings.Fluid.Sources.Boundary_pT, or asuse_TMix
for enabling a control input in Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.MultiZone.VAV.Controller if its freeze protection control uses the measured mixed air temperature. -
Prefix
have_
if a controller has a certain input, such ashave_CO2Sen
in Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Controller if the zone has a CO2 sensor. -
Suffix
_flow
for a flow variable, such asQ_flow
,m_flow
andV_flow
. See Buildings.Fluid.Sensors.VolumeFlowRate. -
Suffix
_nominal
for the design or nominal capacity, i.e.,Q_flow_nominal
is the capacity of a device that it has at full load, andm_flow_nominal
is the design mass flow rate. See Buildings.Fluid.HeatExchangers.HeaterCooler_u. -
Suffix
_small
for a small value which is typically used for regularization (to ensure a numerically robust implementation). -
Suffix
Set
for set point. -
Suffix
Min
(Max
) for minimum (maximum), such as inTSupSetMin
for minimum supply temperature set point. See Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.MultiZone.VAV.SetPoints.SupplyTemperature.
-
Prefix
-
The two connectors of a domain that have identical declarations
and different icons are usually distinguished by
_a
,_b
or_p
,_n
. Examples are fluid portsport_a
andport_b
or electrical connectorsterminal_p
andterminal_n
.
Documentation
-
In the html documentation, start additional headings with
h4
. (The headingsh1, h2, h3
must not be used, because they are utilized from the automatically generated documentation.) - Comments must be added to each class (package, model, function etc.).
- The first character should be upper case.
- For one-line comments of parameters, variables and classes, no period should be used at the end of the comment.
Graphical display
- The instance name of a component is always displayed in its icon (using the text string "%name") in blue color.
- A connector class has the instance name definition in the diagram layer and usually not in the icon layer, unless this helps with usability.
- The value of main parameters, such as nominal capacity, are displayed in the icon in black color in a smaller font size as the instance name if this helps with usability.
Miscellaneous
- Where applicable, all variable must have units, also if the variable is protected.
- Each class (i.e., model, block and function) must be used in an example or validation case.
Extends from Modelica.Icons.Information (Icon for general information packages).
Modelica definition
Buildings.UsersGuide.Contact
Contact
Information
Contact
The development of the Buildings library is organized by
Michael Wetter
Lawrence Berkeley National Laboratory (LBNL)
One Cyclotron Road
Bldg. 90-3147
Berkeley, CA 94720
USA
email: MWetter@lbl.gov
Extends from Modelica.Icons.Contact (Icon for contact information).
Modelica definition
Buildings.UsersGuide.Acknowledgements
Acknowledgements
Information
Acknowledgements
The development of this library was supported by:
- The U.S. Department of Energy, Assistant Secretary for
Energy Efficiency and Renewable Energy,
- Office of Building Technologies, under Contracts Number DE-AC02-05CH11231 and DE-EE0007688,
- Advanced Manufacturing Office, under Award Number DE-EE0009139, and
- Geothermal Technologies Office, under Award Number DE-AC02-05CH11231.
- The California Energy Commission, Public Interest Energy Research Program, Buildings End Use Energy Efficiency Program, Award Number 500-10-052.
The core of this library is the Modelica IBPSA library, a free open-source library with basic models that codify best practices for the implementation of models for building and community energy and control systems. The development of the IBPSA library is organized through the IBPSA Project 1 of the International Building Performance Simulation Association (IBPSA). From 2012 to 2017, the development was organized through the Annex 60 project of the Energy in Buildings and Communities Programme of the International Energy Agency (IEA EBC).
The package for multizone airflow modeling and the model for thermal comfort was contributed by the United Technologies Research Center, which also contributed to the validation of the room heat transfer model.
We thank Dietmar Winkler from Telemark University College for the various feedback that helped improve the organization and structure of the library.
The following people have directly contributed to the implementation of the Buildings library (many others have contributed by other means than model implementation):
- David Blum, Lawrence Berkeley National Laboratory, USA
- Marco Bonvini, Lawrence Berkeley National Laboratory, USA
- Felix Bünning, RWTH Aachen, Germany
- Guokai Chen, University College London, UK
- Massimo Cimmino, Polytechnique Montréal, Canada
- Rainer Czetina, University of Applied Sciences Technikum Wien, Austria
- Hagar Elarga, Lawrence Berkeley National Laboratory, USA
- Hongxiang "Casper" Fu, Lawrence Berkeley National Laboratory, USA
- Yangyang Fu, University of Colorado Boulder, Colorado, USA
- Antoine Gautier, Lawrence Berkeley National Laboratory, USA
- Sebastian Giglmayr, University of Applied Sciences Technikum Wien, Austria
- Milica Grahovac, Lawrence Berkeley National Laboratory, USA
- Peter Grant, Lawrence Berkeley National Laboratory, USA
- Brandon M. Hencey, Cornell University, USA
- Sen Huang, Pacific Northwest National Laboratory, USA
- Kathryn Hinkelman, University of Colorado Boulder, Colorado, USA
- Jianjun Hu, Lawrence Berkeley National Laboratory, USA
- Roman Ilk, University of Applied Sciences Technikum Wien, Austria
- Dan Li, University of Miami, Florida, USA
- Filip Jorissen, KU Leuven, Belgium
- Thierry S. Nouidui, Lawrence Berkeley National Laboratory, USA
- Markus Nurschinger, University of Applied Sciences Technikum Wien, Austria
- Xiufeng Pang, Lawrence Berkeley National Laboratory, USA
- Damien Picard, KU Leuven, Belgium
- Kaustubh Phalak, Lawrence Berkeley National Laboratory, USA
- Thomas Sevilla, University of Miami, Florida, USA
- Chengnan Shi, University of Colorado Boulder, Colorado, USA
- Martin Sjölund, Linköping University, Sweden
- Matthis Thorade, Berlin University of the Arts, Germany
- Wei Tian, University of Miami, Florida, USA
- Armin Teskeredzic, Mechanical Engineering Faculty Sarajevo and GIZ, Bosnia and Herzegovina
- Rafael Velazquez, University of Seville, Spain
- Pierre Vigouroux, Institut National des Sciences Appliquees, France
- Sebastian Vock, University of Applied Sciences Technikum Wien, Austria
- Vladimir Vukovic, Austrian Institute of Technology, Austria
- Jing Wang, University of Colorado Boulder, Colorado, USA
- Michael Wetter, Lawrence Berkeley National Laboratory, USA
- Tea Zakula, University of Zagreb, Croatia
- Ettore Zanetti, Politecnico di Milano, Italy
- Rebecca Zarin Pass, Lawrence Berkeley National Laboratory, USA
- Kun Zhang, Lawrence Berkeley National Laboratory, USA
- Wangda Zuo, University of Colorado Boulder, Colorado, USA
Extends from Modelica.Icons.Information (Icon for general information packages).
Modelica definition
Buildings.UsersGuide.License
License
Information
License
Modelica Buildings Library. Copyright (c) 1998-2024 Modelica Association, International Building Performance Simulation Association (IBPSA), The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy) and contributors. All rights reserved.
NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit other to do so.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the names of the Modelica Association, International Building Performance Simulation Association (IBPSA), the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form.
Note: The license is a revised 3 clause BSD license with an ADDED paragraph at the end that makes it easy to accept improvements.
Third Party License
To parse weather file, the function getTimeSpan.c
uses
third party code that uses the following license:
Copyright (c) 2011 The NetBSD Foundation, Inc.
All rights reserved.
This code is derived from software contributed to The NetBSD Foundation by Christos Zoulas.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Extends from Modelica.Icons.Information (Icon for general information packages).