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 of 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. 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. Rooms.MixedAir Package for heat transfer in rooms and through the building envelope with the room air being modeled using the mixed air assumption. Rooms.CFD Package for heat transfer in rooms and through the building envelope with the room air being modeled using computational fluid dynamics. Rooms.Examples.FFD Package with examples that use the Fast Fluid Dynamics program for the computational fluid dynamics. Utilities.IO.Python36 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
This library follows the conventions of the Modelica Standard Library, which are as follows:
Note, in the html documentation of any Modelica library, the headings "h1, h2, h3" should not be used, because they are utilized from the automatically generated documentation and headings. Additional headings in the html documentation should start with "h4".
In the Modelica package the following conventions are used:
- Class and instance names are written in upper and lower case letters, e.g., "ElectricCurrent". An underscore is only used at the end of a name to characterize a lower or upper index, e.g., "pin_a".
- Class names start always with an upper case letter.
- Instance names, i.e., names of component instances and of variables (with the exception of constants), start usually with a lower case letter with only a few exceptions if this is common sense (such as "T" for a temperature variable).
- Constant names, i.e., names of variables declared with the "constant" prefix, follow the usual naming conventions (= upper and lower case letters) and start usually with an upper case letter, e.g. UniformGravity, SteadyState.
- The two connectors of a domain that have identical declarations and different icons are usually distinguished by "_a", "_b" or "_p", "_n", e.g., Flange_a/Flange_b, HeatPort_a, HeatPort_b.
- The instance name of a component is always displayed in its icon (= text string "%name") in blue color. A connector class has the instance name definition in the diagram layer and not in the icon layer. Parameter values, e.g., resistance, mass, gear ratio, are displayed in the icon in black color in a smaller font size as the instance name.
- A main package has 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.
- Interfaces containing connectors and partial models.
- Types containing type, enumeration and choice definitions.
The Buildings
library uses the following conventions
in addition to the ones of the Modelica Standard Library:
-
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
-
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
. -
Parameter and variables names are usually a character, such as
T
for temperature andp
for pressure, or a combination of the first three characters of a word, such ashigPreSetPoi
for high pressure set point. - Comments should 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.
- Where applicable, all variable must have units, also if the variable is protected.
-
To indicate that a class (i.e., a package, model, block etc.) has not been extensively tested or validated,
its class name ends with the string
Beta
.
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 Assistant Secretary for Energy Efficiency and Renewable Energy, Office of Building Technologies of the U.S. Department of Energy, under contracts No. DE-AC02-05CH11231 and DE-EE0007688, and
- by 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
- Massimo Cimmino, Polytechnique Montréal, Canada
- Rainer Czetina, University of Applied Sciences Technikum Wien, Austria
- Hagar Elarga, 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
- 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
- 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
- Michael Wetter, Lawrence Berkeley National Laboratory, USA
- Tea Zakula, University of Zagreb, Croatia
- 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-2020 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).