This paper describes the Buildings library, a free open-source library
that is implemented in Modelica, an equation-based object-oriented
modeling language. The library supports rapid prototyping, as well
as design and operation of building energy and control systems.
First, we describe the scope of the library, which covers HVAC
systems, multi-zone heat transfer and multi-zone airflow and contaminant
transport. Next, we describe differentiability requirements
and address how we implemented them. We describe the class hierarchy
that allows implementing component models by extending
partial implementations of base models of heat and mass exchangers,
and by instantiating basic models for conservation equations
and flow resistances. We also describe associated tools for pre- and
post-processing, regression tests, co-simulation and real-time data
exchange with building automation systems.
The paper closes with an example of a chilled water plant, with
and without water-side economizer, in which we analyzed the
system-level efficiency for different control setpoints.