September 22, 2026
Journal Article
A Template-Based Approach for Generating Modelica Models of Building Electrical Systems from Semantic Models
Abstract
Building electrical systems are becoming increasingly complex as designers evaluate AC, DC, and hybrid distribution architectures, integrate distributed energy resources, and maintain alignment with evolving performance and reliability goals. Existing design tools are typically limited, non-interoperable, and unable to support continuous modeling across design phases, resulting in fragmented workflows and significant manual effort. This paper presents a template-based workflow that automates the generation of high-fidelity Modelica simulation models of building electrical systems using ASHRAE 223 semantic models. The workflow leverages a Building Information Model (BIM) plugin for performing basic safety analysis, and transforms BIM objects into executable Modelica representations capable of simulating AC, DC, and hybrid system architectures. A Py-thon-based middleware automates data extraction, template instantiation, and parametric model generation, enabling rapid and consistent iteration through schematic design, design development, and construction documentation phases. The Building Electrical Efficiency Analysis Model (BEEAM) library [1,2] is used to generate the Modelica models. Validation of the middleware automation using a prototype medium office building demonstrates strong agreement with manually constructed baseline models, achieving a 95% confidence interval for relative differences between -1.16% and +0.87%. A case study demonstrates how the workflow supports system architecture selection, equipment sizing impacts and optimization, and reliability analysis.Published: September 22, 2026