For the past five years, DOE and the national labs have been developing a next-generation simulation engine that bridges the worlds of BEM and controls. In May of this year, Spawn, was released as part of the Modelica Buildings Library.
July 26, 2021EnergyPlus celebrated its 20th birthday this past April. A few months later—smack between Mothers’ Day and Fathers’ Day—it also became a parent. Spawn of EnergyPlus—or just Spawn—was released as part of the most recent release of the Modelica Buildings Library (MBL). This initial version of Spawn represents more than five years of work by scientists at the Lawrence Berkeley National Laboratory and the National Renewable Energy Laboratory in collaboration with Modelon and Objexx Engineering. The Spawn project builds on the significant international efforts to develop the Modelica modeling and simulation language and its compilers and execution environments and to develop models for building equipment, controls, and physics. Of course, it also builds on EnergyPlus itself.
So what is Spawn? Well, one thing it is not is a replacement for EnergyPlus, at least not in the foreseeable future. Although it does perform whole-building energy simulation, Spawn targets new use cases in advanced controls, district systems, and grid integration. Spawn supports these new use cases by making fundamental use of coupled simulation via the Functional Mockup Interface standard —the term co-simulation is popular, but it technically refers to a limited kind of coupled simulation, which Spawn does not use. Spawn reuses the weather, envelope, lighting, and loads models from EnergyPlus and packages them as a single model. It replaces EnergyPlus’ imperative, implicit, load-based HVAC and controls models with explicit declarative state-based models from the Modelica Buildings Library. These are translated and linked with the EnergyPlus model in a coupled simulation. By combining models in different configurations, Spawn can simulate either a single building or a collection of buildings linked by shared thermal, electrical, and control systems. The latter is the way in which Spawn is used within URBANopt, a coupled simulation platform for thermal districts, distribution systems, and distributed energy resources (DER). The coupled simulation use case is aided by several recent modifications to EnergyPlus itself. One recent change has made EnergyPlus “thread safe”, i.e., able to perform multiple simulations within a single larger program without those simulations accidentally interfering with one another’s data. Another modification supports efficient data exchange between EnergyPlus and other models in a coupled simulation.
![Spawn (of EnergyPlus) combines the lighting, envelope, and loads models from EnergyPlus with zone, HVAC, and control models from the Modelica Buildings Library to create a new simulation engine that bridges BEM and control applications.](/sites/default/files/styles/full_article_width/public/2021-07/EUB_Spawn_Diagram_0.png?itok=Ca-Kg60c)
Spawn also leverages the Modelica equation-based modeling and simulation language. Modelica is a non-proprietary, object-oriented, equation-based language that is used by many automotive companies, aerospace companies and power plant providers to model complex systems and their controls. The use of Modelica for BEM recognizes that building HVAC and its control has grown to similar levels of complexity and can benefit from similarly advanced simulation methodologies and tools. Modelica introduces capabilities that are not found in traditional BEM engines such as EnergyPlus. The most significant of these is the ability to simulate physically realistic control sequences using the same specification that is used in controller implementations. The ability to use a single control specification for both energy simulation and physical implementation is intended to bridge these traditionally separate domains and promote the use of high-performance control sequences, such as those specified in ASHRAE Guideline 36. ASHRAE Standard 231P is developing the specification for a Control Description Language (CDL), a subset of Modelica that can be used to represent control sequences. A companion project to Spawn, Open Building Control (OBC), is creating content and infrastructure around CDL including writing reference implementations of high performance control sequences in CDL, developing documentation and commissioning tools, and working with control vendors to create translators from CDL to their proprietary control languages. A second companion project, BOPTEST, is developing a Spawn-based web-service that uses Modelica models as research benchmarks for advanced controls.
“Spawn enables co-design of grid-flexible low-carbon energy systems and their controls within an end-to-end performance-based workflow”, says Dr. Michael Wetter of Lawrence Berkeley National Laboratory and leader of the Spawn project. “It enables design of systems with large-scale integration of renewables, storage and waste heat utilization, either within a building or among buildings. Perhaps most importantly, it paves the way towards digitizing the controls delivery process, allowing physically-realistic controls to be developed and evaluated using whole building energy modeling and then exported to commercial control product lines.”
![A Spawn model of the Medium Office prototype building. The EnergyPlus envelope and loads model is on the upper right. The Modelica HVAC models are on the bottom. The Modelica ASHRAE Guideline 36 control model is on the upper left.](/sites/default/files/styles/full_article_width/public/2021-07/EUB_Spawn_MediumOffice_Annotated.png?itok=6eYdajMS)
In addition to realistic control, Modelica also enables modeling of novel HVAC and district system components and configurations including district-scale integration of renewables and storage, and sharing of excess energy among building for heating and cooling. Spawn’s HVAC and control models have been developed as part of a multi-year international effort led by IEA EBC Annex 60 and IBPSA-World Project 1 to develop Modelica models for building and community systems.
Fundamental use of coupled simulation allows third parties to develop their own proprietary component models and to integrate them with whole building models. “EnergyPlus has provided good capabilities to industry”, says Dr. Clas Jacobson, Senior Fellow at Carrier Corporation, “but Spawn extends these in important ways that allow us to take advantage of simulation for design and for control implementation. At Carrier and United Technologies Corporation, we have successfully used Modelica to model the physics of new products. Spawn allows us to plug our component models into a larger multi-physics simulation environment with other models provided by EnergyPlus and the Modelica Buildings Library. This extends our capabilities for use in product development.”
The initial version of Spawn is not packaged with a simulation or model development environment. For now, users can use several commercial and public tools including IMPACT, Dymola and JModelica. Future versions of Spawn will be packaged with a Modelica compiler at no cost to Spawn users. Other active developments include new models for radiant systems, advanced numerical integration methods for scalable simulation of large systems, and HVAC and control templates. The team will also begin to integrate Spawn with the OpenStudio Software Development Kit (SDK) to support large scale workflow automation.
Dr. Amir Roth
Dr. Amir Roth is the technology manager for BTO’s Building Energy Modeling (BEM) subprogram and has served in that role since 2010. From 2001 to 2010 he was first an assistant and then an associate professor with tenure of Computer and Information Sciences at the University of Pennsylvania in Philadelphia. He graduated magna cum laude with a B.S. in physics from Yale University and holds a Ph.D. in computer science from the University of Wisconsin—Madison where he won a dissertation award in 2001. He is a member of the American Society of Heating, Refrigeration, and Air-Conditioning Engineers (ASHRAE), and the International Building Performance Simulation Association (IBPSA).
Email Amir Roth ►
![Amir Roth](/sites/default/files/styles/full_article_width/public/2023-09/Amir_Roth_headshot_2023.jpg?itok=8i8TYHw7)