A Template-Based Approach for Generating Modelica Models of Building Electrical Systems from Semantic Models
Abstract
1. Introduction
2. Background
2.1. Existing Tools for Electrical Systems Modeling and Analysis
2.2. Automated Model Generation
3. Proposed Workflow
3.1. Automated Model Creation
3.1.1. Approach 1: Python Assembly Using Python Objects
3.1.2. Approach 2: Python Assembly Using Model Templates
3.1.3. Approach 3: Python Assembly Using Modelica IDE API Calls
3.2. A Template-Based Approach to Automated Model Creation
4. Workflow Verification
4.1. Conventional AC
4.2. Distributed PoE
4.3. Centralized PoE
5. Case Study
5.1. SD Phase
5.1.1. Load, Breaker, and Wire Sizing
5.1.2. Peak and Average Demand
5.1.3. Design Decisions
5.2. CD Phase
5.2.1. Load, Breaker, and Wire Sizing
5.2.2. Peak and Average Demand
5.2.3. Design Decisions
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| AC | Alternating Current |
| API | Application Programming Interface |
| ASHRAE | American Society of Heating, Refrigerating and Air Conditioning Engineers |
| BEEAM | Building Electrical Efficiency Analysis Model |
| BIM | Building Information Model |
| CD | Construction Document |
| DC | Direct Current |
| DD | Design Development |
| HVAC | Heating, Ventilation, and Air Conditioning |
| IDE | Integrated Development Environment |
| IFC | Industry Foundation Classes |
| JSON | JavaScript Object Notation |
| LED | Light-Emitting Diode |
| MEL | Miscellaneous Electric Load |
| MEP | Mechanical, Electrical, and Plumbing |
| PoE | Power over Ethernet |
| PV | Photovoltaic |
| RDF | Resource Description Framework |
| SD | Schematic Design |
| SPARQL | SPARQL Protocol and RDF Query Language |
References
- Gerber, D.L.; Vossos, V.; Feng, W.; Marnay, C.; Nordman, B.; Brown, R. A Simulation-Based Efficiency Comparison of AC and DC Power Distribution Networks in Commercial Buildings. Appl. Energy 2018, 210, 1167–1187. [Google Scholar] [CrossRef]
- Vossos, V.; Gerber, D.L.; Gaillet-Tournier, M.; Nordman, B.; Brown, R.; Heredia, W.B.; Ghatpande, O.; Saha, A.; Arnold, G.; Frank, S.M. Adoption Pathways for DC Power Distribution in Buildings. Energies 2022, 15, 786. [Google Scholar] [CrossRef]
- Vossos, V.; Garbesi, K.; Shen, H. Energy Savings from Direct-DC in U.S. Residential Buildings. Energy Build. 2014, 68, 223–231. [Google Scholar] [CrossRef]
- Autodesk Revit. Available online: https://www.Autodesk.Com/Products/Revit/Overview (accessed on 12 May 2026).
- ETAP. Available online: https://www.Etap.Com/Home (accessed on 12 May 2026).
- EasyPower. Available online: https://www.Easypower.Com/Products/Easypower (accessed on 12 May 2026).
- Sacks, R.; Eastman, C.; Lee, G.; Teicholz, P. BIM Handbook: A Guide to Building Information Modeling for Owners, Designers, Engineers, Contractors, and Facility Managers; Wiley: Hoboken, NJ, USA, 2018; ISBN 978-1-119-28753-7. [Google Scholar] [CrossRef]
- Frank, S.; Ball, B.; Ghatpande, O.; Cale, J.; Othee, A. BEEAM (Building Electrical Efficiency Analysis Model), [SWR-20-107]; Colorado State University Research Foundation (CSURF), National Renewable Energy Laboratory (NREL): Golden, CO, USA, 2020. [Google Scholar]
- DesignMaster Software. ElectroBIM. Available online: https://www.Designmaster.Biz/Revit/ (accessed on 12 May 2026).
- SKM. Available online: https://www.Skm.Com/Index.Html (accessed on 12 May 2026).
- Siemens. PSS®E. Available online: https://www.Siemens.Com/Us/En/Products/Energy/Grid-Software/Planning/Pss-Software/Pss-e.Html (accessed on 12 May 2026).
- PowerWorld Corporation. PowerWorld. Available online: https://www.Powerworld.Com/ (accessed on 12 May 2026).
- Zimmerman, R.D.; Murillo-Sánchez, C.E. MATPOWER, version 8.1; Cornell University: Ithaca, NY, USA, 2025. [Google Scholar]
- De Castro, M.; Winkler, D.; Laera, G.; Vanfretti, L.; Dorado-Rojas, S.A.; Rabuzin, T.; Mukherjee, B.; Navarro, M. Version [OpenIPSL 2.0.0]—[iTesla Power Systems Library (iPSL): A Modelica Library for Phasor Time-Domain Simulations]. SoftwareX 2023, 21, 101277. [Google Scholar] [CrossRef]
- Nytsch-Geusen, C.; Inderfurth, A.; Kaul, W.; Mucha, K.; Rädler, J.; Thorade, M.; Ribas Tugores, C. Template Based Code Generation of Modelica Building Energy Simulation Models. In Proceedings of the 12th International Modelica Conference, Prague, Czech Republic, 15–17 May 2017; pp. 199–207. [Google Scholar] [CrossRef]
- Gautier, A.; Wetter, M.; Hu, J.; Tummescheit, H. HVAC and Control Templates for the Modelica Buildings Library. Model. Conf. 2023, 217–228. [Google Scholar] [CrossRef]
- Nytsch-Geusen, C.; Rädler, J.; Thorade, M.; Ribas Tugores, C. BIM2Modelica—An Open Source Toolchain for Generating and Simulating Thermal Multi-Zone Building Models by Using Structured Data from BIM Models. In Proceedings of the 13th International Modelica Conference 33, Regensburg, Germany, 4–6 March 2019; pp. 33–38. [Google Scholar] [CrossRef]
- Andriamamonjy, A.; Saelens, D.; Klein, R. An Automated IFC-Based Workflow for Building Energy Performance Simulation with Modelica. Autom. Constr. 2018, 91, 166–181. [Google Scholar] [CrossRef]
- Aldosari, M.; Govertsen, K.; Central, P.D.; Poplawski, M.; Gupta, T. Pacific Northwest National Laboratory (PNNL), Richland, WA (United States). Pnnl/BIM2RDF. Available online: https://www.Osti.Gov/biblio/code-150523 (accessed on 19 March 2026).
- Speckle. Available online: https://speckle.systems/ (accessed on 15 May 2026).
- Waghale, A.; Pratoomratana, S.; Poplawski, M. Demonstration of a Modeling Toolkit for the Design of Building Electrical Distribution Systems. In Proceedings of the 9th ACM International Conference on Systems for Energy-Efficient Buildings, Cities, and Transportation, Boston, MA, USA, 9 November 2022; pp. 246–249. [Google Scholar] [CrossRef]
- Waghale, A.; Pratoomratana, S.; Woodstock, T.-K.; Devaprasad, K.; Poplawski, M. Verification of a Modeling Toolkit for the Design of Building Electrical Distribution Systems. Buildings 2023, 13, 2520. [Google Scholar] [CrossRef]
- Frank, S.M.; Ghatpande, O.; Shackelford, J.; Steen, M.; Ball, B.L.; Gerber, D.L.; Santos, A.; Brown, R.E. Experimental Validation of a Co-Simulation Architecture for Modeling Whole-Building and Detailed Electrical Distribution Performance. Energy Build. 2025, 344, 115917. [Google Scholar] [CrossRef]
- Modelon. Modelon Impact. Available online: https://www.Modelon.Com/Modelon-Impact/ (accessed on 12 May 2026).
- Dassault Systemes. Dymola Systems Engineering. Available online: https://www.3ds.Com/Products/Catia/Dymola (accessed on 12 May 2026).
- Othee, A.; Cale, J.; Santos, A.; Frank, S.; Zimmerle, D.; Ghatpande, O.; Duggan, G.; Gerber, D. A Modeling Toolkit for Comparing AC and DC Electrical Distribution Efficiency in Buildings. Energies 2023, 16, 3001. [Google Scholar] [CrossRef]
- Fritzson, P.; Pop, A.; Abdelhak, K.; Ashgar, A.; Bachmann, B.; Braun, W.; Bouskela, D.; Braun, R.; Buffoni, L.; Casella, F.; et al. The OpenModelica Integrated Environment for Modeling, Simulation, and Model-Based Development. Model. Identif. Control 2020, 41, 241–295. [Google Scholar] [CrossRef]
- U.S. DOE BTO Building Energy Codes Program Prototype Building Models. 2021. Available online: https://www.energycodes.gov/prototype-building-models (accessed on 24 May 2026).
- Dehwah, A.H.; Devaprasad, K.; Woodstock, T.K.A.; Gupta, T.; Passmore, M.N.; Poplawski, M.E. A BIM-BEM Based Workflow for Designing Integrated HVAC and Lighting Systems. ASHRAE Trans. 2026, 132, 1395–1406. [Google Scholar] [CrossRef]































| ElectroBIM | EasyPower | ETAP | SKM | PSSE | PowerWorld | MATPOWER | OpenIPSL | BEEAM | |
|---|---|---|---|---|---|---|---|---|---|
| Language | – | – | – | – | – | – | MATLAB | Modelica | Modelica |
| License type | Licensed | Licensed | Licensed | Licensed | Licensed | Licensed | Open source | Open source | Open source |
| Scope | Buildings | Buildings | Buildings, Grid | Buildings, Grid | Grid | Grid | Grid | Grid | Buildings |
| Architecture | AC | AC, DC, hybrid | AC, DC, hybrid | AC, DC, hybrid | AC | AC | AC, DC | AC | AC, DC, hybrid |
| Model development | Revit plugin | Proprietary software | Proprietary software | Proprietary software | Proprietary software | Proprietary software | MATLAB IDE | Modelica IDE | Modelica IDE |
| Use cases | Voltage drop, short circuit, arc flash, selective coordination | Simple power flow, short circuit, arc flash, selective coordination | AC and DC load flow, AC and DC short circuit | AC and DC load flow, AC and DC short circuit, fault analysis | Power flow, short circuit, dynamic/ transient stability | Power flow, optimal power flow, fault analysis, transient stability | AC and DC power flow, continuous and optimal power flow | Dynamic phasor time-domain power flow | Harmonic power flow |
| Developer | Design Master | EasyPower | ETAP | SKM | Siemens | Power World corp. | Cornell University | ALSETLab at RPI | NRL |
| Equipment Type | Rated Load | Revit Count | Modelica Count |
|---|---|---|---|
| Luminaire | 13 W | 9 | 9 |
| 20 W | 4 | 4 | |
| 21 W | 88 | 88 | |
| 22 W | 24 | 24 | |
| 25 W | 52 | 52 | |
| 28 W | 120 | 120 | |
| 31 W | 352 | 352 | |
| 34 W | 28 | 28 | |
| 35 W | 28 | 28 | |
| 40 W | 128 | 128 | |
| 42 W | 20 | 20 | |
| Laptop | 57 W | 268 | 268 |
| Monitor | 46 W | 268 | 268 |
| Display | 127 W | 15 | 15 |
| Printer | 875 W | 27 | 27 |
| Design Phase | System Architecture | HVAC Heating Load (kW) | HVAC Cooling Load (kW) | Elevator Load (kW) | Lighting Load (kW) | MELs (kW) | AC: DC/DC: AC/DC Ratio |
|---|---|---|---|---|---|---|---|
| SD | AC coupled | 187.750 | 217.263 | 8.517 | 32.475 | 39.451 | 85:0:15 |
| DC coupled | 187.750 | 217.263 | 8.517 | 32.475 | 39.451 | 85:15:0 |
| Design Phase | System Architecture | Peak HVAC Demand (kW) | Peak Elevator Demand (kW) | Peak Lighting Demand (kW) | Peak MEL Demand (kW) | Average HVAC Demand (kW) | Average Lighting +MEL Demand (kW) | Average AC:DC/DC: AC/DC Demand Ratio |
|---|---|---|---|---|---|---|---|---|
| SD | AC coupled | 175.183 | 11.376 | 21.568 | 10.716 | 12.534 | 16.740 | 41:0:59 |
| DC coupled | 175.183 | 11.376 | 21.568 | 10.716 | 12.534 | 16.740 | 41:59:0 |
| Design Phase | System Architecture | HVAC Heating Load (kW) | HVAC Cooling Load (kW) | Elevator Load (kW) | Lighting Load (kW) | MEL Load (kW) | AC: DC/DC: AC/DC Ratio |
|---|---|---|---|---|---|---|---|
| SD | AC coupled | 187.750 | 217.263 | 8.517 | 32.475 | 39.451 | 85:0:15 |
| DC coupled | 187.750 | 217.263 | 8.517 | 32.475 | 39.451 | 85:15:0 | |
| CD | AC coupled | 187.750 | 217.263 | 8.517 | 25.841 | 58.723 | 82:0:18 |
| DC coupled | 187.750 | 217.263 | 8.517 | 25.841 | 58.723 | 82:12:6 |
| Design Phase | System Architecture | Peak HVAC Demand (kW) | Peak Elevator Demand (kW) | Peak Lighting Demand (kW) | Peak MEL Demand (kW) | Average HVAC Demand (kW) | Average Lighting + MEL Demand (kW) | Average AC:DC/DC: AC/DC Demand Ratio |
|---|---|---|---|---|---|---|---|---|
| SD | AC coupled | 175.183 | 11.376 | 21.568 | 10.716 | 12.534 | 16.740 | 41:0:59 |
| DC coupled | 175.183 | 11.376 | 21.568 | 10.716 | 12.534 | 16.740 | 41:59:0 | |
| CD | AC coupled | 175.183 | 11.376 | 25.066 | 57.325 | 12.534 | 25.878 | 72:0:28 |
| DC coupled | 175.183 | 11.376 | 25.066 | 57.325 | 12.534 | 25.878 | 72:24:4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Waghale, A.; Devaprasad, K.; Gupta, T.; Poplawski, M. A Template-Based Approach for Generating Modelica Models of Building Electrical Systems from Semantic Models. Energies 2026, 19, 2586. https://doi.org/10.3390/en19112586
Waghale A, Devaprasad K, Gupta T, Poplawski M. A Template-Based Approach for Generating Modelica Models of Building Electrical Systems from Semantic Models. Energies. 2026; 19(11):2586. https://doi.org/10.3390/en19112586
Chicago/Turabian StyleWaghale, Anay, Karthikeya Devaprasad, Trisha Gupta, and Michael Poplawski. 2026. "A Template-Based Approach for Generating Modelica Models of Building Electrical Systems from Semantic Models" Energies 19, no. 11: 2586. https://doi.org/10.3390/en19112586
APA StyleWaghale, A., Devaprasad, K., Gupta, T., & Poplawski, M. (2026). A Template-Based Approach for Generating Modelica Models of Building Electrical Systems from Semantic Models. Energies, 19(11), 2586. https://doi.org/10.3390/en19112586

