TY - CPAPER KW - Modelica Buildings Library KW - FMI KW - Spawn of Energy-Plus KW - Modelica External Object AU - Michael Wetter AU - Kyle Benne AU - Baptiste Ravache AB -

Spawn of EnergyPlus is a next-generation energy simula-tion engine that targets control design and implementationworkflows. Spawn reuses the weather, lighting, loads, andenvelope modules from EnergyPlus through a precom-piled library and couples them with HVAC and controlmodels implemented in Modelica. Thus, for Spawn, theEnergyPlus HVAC models are removed. Spawn has beendesigned to perform coupled simulation with any numberof EnergyPlus models, supporting simulation of a singlebuilding or multiple buildings as part of a district energysystem.This paper describes how the Modelica objects are im-plemented and synchronized to allow the modular specifi-cation at the Modelica-level that uses a Functional Mock-up Unit (FMU) that contains the EnergyPlus model. A keyfeature of our implementation is that multiple instancesof Modelica models call C functions, which jointly builda data structure that defines parameters, inputs and out-puts of the EnergyPlus model. This data structure is usedduring the initialization to generate an FMU that containsa fully configured EnergyPlus model. This FMU is thenaccessed by all Modelica models to exchange with Ener-gyPlus values for parameters, inputs and outputs duringthe simulation. This setup allows the Modelica models tobe instantiated in a modular, object-oriented manner, as istypical for Modelica, yet they jointly construct and use anFMU that contains EnergyPlus.Compared to an HVAC and envelope simulation thatuses a native Modelica building model of comparable levelof detail, the Modelica-EnergyPlus model translates about35% faster and simulates about 50% faster

BT - Proceedings of the 14th Modelica Conference 2021, Linköping, Sweden, September 20-24, 2021 CY - Linkoping, Sweden DA - 09/2021 DO - 10.3384/ecp2118110.3384/ecp21181325 LA - eng N2 -

Spawn of EnergyPlus is a next-generation energy simula-tion engine that targets control design and implementationworkflows. Spawn reuses the weather, lighting, loads, andenvelope modules from EnergyPlus through a precom-piled library and couples them with HVAC and controlmodels implemented in Modelica. Thus, for Spawn, theEnergyPlus HVAC models are removed. Spawn has beendesigned to perform coupled simulation with any numberof EnergyPlus models, supporting simulation of a singlebuilding or multiple buildings as part of a district energysystem.This paper describes how the Modelica objects are im-plemented and synchronized to allow the modular specifi-cation at the Modelica-level that uses a Functional Mock-up Unit (FMU) that contains the EnergyPlus model. A keyfeature of our implementation is that multiple instancesof Modelica models call C functions, which jointly builda data structure that defines parameters, inputs and out-puts of the EnergyPlus model. This data structure is usedduring the initialization to generate an FMU that containsa fully configured EnergyPlus model. This FMU is thenaccessed by all Modelica models to exchange with Ener-gyPlus values for parameters, inputs and outputs duringthe simulation. This setup allows the Modelica models tobe instantiated in a modular, object-oriented manner, as istypical for Modelica, yet they jointly construct and use anFMU that contains EnergyPlus.Compared to an HVAC and envelope simulation thatuses a native Modelica building model of comparable levelof detail, the Modelica-EnergyPlus model translates about35% faster and simulates about 50% faster

PB - Linköping University Electronic Press PP - Linkoping, Sweden PY - 2021 T2 - Proceedings of the 14th Modelica Conference 2021, Linköping, Sweden, September 20-24, 2021 T3 - 14th Modelica Conference 2021 TI - Software Architecture and Implementation of Modelica Buildings Library Coupling for Spawn of EnergyPlus UR - https://ecp.ep.liu.se/index.php/modelica/issue/view/37 VL - 181 ER -