Automatic energy demand and system simulation at district level

The importance of climate protection and sustainability is steadily increasing all over the world. However, there is a large potential for reducing emissions in the heating demand reduction and renewable heat supply of buildings that needs to be addressed. Therefore, a method was developed within the scope of this work that allows local decision-makers such as energy supply companies, project developers and the public sector to calculate, evaluate and compare different scenarios to make buildings and city districts more sustainable based on few and widely available input data. It includes both the determination of the heat demand and measures for its reduction as well as the selection and simulation of centralised and decentralised supply systems. A combination of different methods from the fields of geoinformatics, heuristic decision-making and object-oriented modelling is used. The latter forms a focal point in the work with the development of a data model for energy system components to enable automatic simulation. The applicability as well as the transferability of the method is shown in several case studies. Based on the simulations results, which can be related to CO2 emissions as well as costs, recommendations for the implementation of measures can be given and implemented. The paper is a summary of the dissertation with the title “Automatische Simulation von Wärmebedarf und -versorgung auf Quartiersebene” by the first author at Karlsruhe Institute for Technology.


Introduction
Anthropogenic climate change and the associated increase in temperature worldwide is now recognised by most governments around the world and is seen as one of the greatest challenges for humanity in the coming decades. In recent years, targets have been set worldwide for the reduction of greenhouse gas emissions and the use of fossil fuels, as well as for increasing energy efficiency. In order to achieve, as committed by the European Union and the Federal State of Germany, CO2 emission reductions of 65% compared to 1990 until 2030 and become climate-neutral by 2045 (European Comission 2019; Bundesministerium fuer Umwelt Naturschutz nukleare Sicherheit 2019; Die Bundesregierung 2021) the implementation of measures in form of laws, ordinances and subsidies must be further enforced and incentivized, especially in the building sector. The German goal to have a nearly climate-neutral building stock by 2050 can only be achieved by significantly increasing the refurbishment rate and therefore reducing the heating demand in buildings. In relation to the entire building stock, the heating demand has the largest share of the building energy demand in Germany (Bundesministerium für Wirtschaft Energie 2019).
There are many studies (Fraunhofer IWES et al. 2015;Fraunhofer IWES IBP 2017;Fraunhofer ISE 2013; Bundesverband Wärmepumpe e. V. 2018) that showcase a target energy generation mix for households in 2050 in order to reduce greenhouse gas emissions by up to 95%. All studies assume a high share of heat pumps and fossil-free district heating to achieve emission reduction targets, supported by biomass systems and power-to-heat.
In order to be able to find and evaluate suitable measures and pathways to achieve the ambitious goals, suitable energy modelling tools are needed. In recent years, there have been numerous and diverse approaches to the development of urban simulation tools and methods (Li et al. 2017;Sola et al. 2018;Allegrini et al. 2015). They can be classified in top-down and bottom-up approaches. According to Swan and Ugursal (Swan and Ugursal 2009), topdown approaches calculate the energy demand in buildings based on indicators such as energy price, climate and gross domestic product. Bottom-up approaches however focus on the energy demand of individual buildings and scale it up to represent e.g. a whole city or country. This approach can be further divided into physical and statistical methods. Statistical methods can be based on measurement data, surveys or data from energy suppliers. For detailed analysis, a very large amount and ideally high temporal and spatial resolution of these data is needed (Fumo and Rafe Biswas 2015;Beccali et al. 2004). In the physical bottom-up method, buildings are evaluated based on their physical properties and interactions with the environment, e.g. through solar radiation. Various data sets are needed for the physical simulation (Reinhart and Cerezo Davila 2016): Weather or climate data (e.g. Typical Meteorological Year (TMY) or measurement data of a specific year) Building geometry data (2D, 2.5D or 3D) Building-specific data (e.g. building materials, heating system, year of construction) Use-specific data (e.g. type of use, occupancy profiles) Many of the simulation tools use 3D CityGML models to represent buildings, including CityBES (Chen et al. 2018), CitySim (Robinson et al. 2009), umi (Reinhart et al. 2013), TEASER (Remmen et al. 2018), and SimStadt (Nouvel et al. 2015;. Some tools and methods focus mainly on calculation of heating demand, without detailed analysis of heat generation and supply (Morille et al. 2015;Nytsch-Geusen et al. 2015;Blesl et al. 2019), others focus mainly on energy conversion or generation plants (Department of Development and Planning at Aalborg University 2020; HOMER 2021).

Hypothesis/theory
Most of the available tools and methods for urban building energy modelling must be individually adapted to the respective application and analysis. For this, the user needs a high degree of knowledge about the tool itself, which often includes more than basic knowledge of programming with the respective programming language, as well as domain knowledge in the context of urban building energy simulation. In addition, a lot of data and information about the use case is required, which can often only be obtained in a time-consuming manner or is not available at all and must therefore be replaced by assumptions and/or archetypes. Alternatively, there are calculation methods that provide results for energy demand and supply based on simple indicators or highly simplified calculations and assumptions. They do not, or only insufficiently, take into account the individual circumstances of the neighbourhood under investigation. Mostly they do not deal with individual buildings, but create aggregated balances for the entire neighbourhood. This means that it is not possible to localise needs and, if necessary, derive spatially differentiated supply solutions. Furthermore, many of the existing tools are strongly oriented towards only one area of urban building energy simulation. They often have their focus either in energy demand simulation and do not, or only in a simplified manner, consider supply simulation, and vice versa.
From this, the following research questions can be derived, which are to be answered within the scope of this work: How can energy demands for neighbourhoods and districts be calculated automatically? How can construction and usage data of buildings be determined in an urban context? How can sustainable heat supply scenarios be derived for neighbourhoods with different requirements? How can the simulation of demand and supply scenarios support strategic decision-making?
The following hypothesis can be derived from the research questions: Neighbourhoods have different energy demand profiles. Only through their detailed knowledge with a high spatial resolution is it possible to design and calculate sustainable energy systems. The results of this work can support climate protection managers or other decision makes of municipalities who want to introduce a climate protection concept and therefore need to calculate and compare different scenarios for heat supply. Developers of neighbourhood projects who want to make a suitable selection from the multitude of possible alternatives for implementation should also be addressed.

Method
Concluding from the problem definition and the literature research in the previous chapters, as well as the open research questions, the framework of the required methods and their application is set out. In the following, the methodological procedure is described in detail within the framework of this thesis.

Demand calculation
To determine the heat demand of neighbourhoods, the heating and domestic hot water demand must first be calculated for each building. This requires simulation models that automatically determine the demand for many buildings in hourly resolution. For this purpose, 3D building models in CityGML format (Biljecki et al. 2016) for the representation of the building geometry is used and heating and domestic hot water demand simulations are carried out in SimStadt  and DHWcalc (Jordan Vajen 2005). Each building in the CityGML model must have the building attributes year of construction and function in order to be simulated in SimStadt. Based on these attributes, specific data from a building physics (based on (Loga et al. 2015)) and an usage library are used for the heat demand simulation e.g. the typical materials of different construction elements of buildings from a certain year or parameters like occupancy density and schedules for different usages like residential, retail or education.
Often, however, the information for these two attributes is not available. This can be due to the lack of documentation altogether or due to data protection regulations which leads to available data not being passed on to third parties. Furthermore, it is possible that data is outdated, contains errors or is incomplete.
Especially in the area of non-residential buildings, there is a large variety in the naming of the building function. For example, the designation of a building used as a supermarket with the attribute commercial is not wrong, yet using the attribute supermarket instead could access more specific data from the libraries.
In order to gather this more detailed data, PointsOf-Interest (POI) from the online platform OpenStreetMap (OSM) are investigated and compared to the attributes in the existing CityGML file (Weiler et al. 2018). The level of detail and the actuality of the data from OSM varies, however, in urban areas the information density is rather high (Haklay 2010). The information from both data sets is combined via an intersection of the point with the building floor plan via the geographical location, then the OSM data is fed back to the CityGML file via an SQL database.
To solve the problem of missing information on yearOf-Construction, two different data sources and methods on how to assign the missing yearOfConstruction to the buildings are investigated (Zirak et al. 2019). In order to enrich the CityGML files with data on the yearOfConstruction, information both from the census database of the German Census 2011 and the German residential building typology IWU (Loga et al. 2015) are used. The Census presents data for individual municipalities, whereas the IWU database contains average values for the whole of Germany. Data from the municipality can be used as a reference to compare and evaluate the two other sources.

Reduction of choices for supply variants
Many studies describe how a sustainable and fossil-free energy system in Germany in 2050 can and should look like (Fraunhofer IWES et al. 2015;Fraunhofer ISE 2013; Bundesverband Wärmepumpe e. V. 2018). Thereby, especially heat pump systems and district heating have a key role for decarbonisation of the heating sector in buildings.
Based on those sustainable heat supply systems for a zero carbon future, a qualitative methodology was developed in order to select possible supply technologies for sustainable districts based on the individual framework conditions and constraints, which are usually already available at the beginning of the planning process. Possible restrictions for the different supply variants are defined. These can be spatial as well as geological or strategic and legal parameters. The restrictions are defined based on general planning practice and expert knowledge. These framework conditions are queried via a checklist, shown as a flow chart in Fig. 1. It shows a cut-out of the complete flow chart that comprises of a total of 16 different technology options. Here pictured is as an example only the part for district heating and the connection to gas-based technologies.
For district heating and gas networks, the distance between the existing network and potential building connections is relevant. If the distance is greater than 500 m, the possibility of an extension or new construction of the network is queried. In the case of sufficient spatial proximity, the remaining lifetime of the existing network is asked, as well as the available capacity and its temperature level. The questions in the flowchart can relate both to the district and building level, depending on whether the technology is designed as a central or decentral system. For example, in the case of heat pumps with water or soil as energy source, the same restrictions regarding water protection or soil conditions apply, regardless of whether it is one central or several decentral systems. Based on the information provided, individual technologies can be excluded or selected for the area under investigation. If the building stock or framework conditions of the district under investigation are too heterogeneous, smaller sub-districts should be established.

Energy components catalog
In order to enable the automatic parameterisation of simulation models of energy systems, a data model is needed to store and manage the required data, which matches the simulation models in terms of content and structure and can thus pass on information to them. The database resulting from the data model contains the information of energy components required for the execution of the simulation models. This catalog is developed completely independently from the SimStadt environment as a stand-alone application and writes the data base in an xml file format, i.e. the model and the user interface can either be used independently or linked to any simulation tool able to read xml. The generated editor lets the user create, validate and export instances of the classes of the model. The database of the library includes different components such as heat pumps or thermal storages and their respective attributes such as size or efficiency. Additionally, information on materials and fuel relevant to the energy systems can be included.
Object-oriented modelling with the Unified Modelling Language (UML) (Stachowiak 1973;Seidl et al. 2012;Fowler 2003) is used to create the energy system component catalog. The visual representation of the model is easy to understand and can also be extended later, and it is compatible with object-oriented programming languages such as Java. Eclipse is an open-source software environment used and developed by millions of people worldwide. One of the applications of the environment is Eclipse Modelling Tools, which is used for the development of the data model in this paper. The Eclipse Modelling Framework is a Java framework for modelling and automatically generating Fig. 2 Cut-out of energy components catalog data model source code from models based on a structured domain model (Ecore model). Fig. 2 shows the central part of the library's data model as a cut-out of the Ecore model. The top class is the library itself, which consists of various subclasses (yellow) that describe the individual components like heat pumps or boilers. Each of the classes has individual attributes that describe the instances of the class. If there are attributes that are needed for more than one class, a parent abstract class is inserted. This can be seen in Fig. 2 on the left for the classes CombinedHeatPower, Boiler and HeatPump with the parent class ThermalEnergyDevice. This class contains the attributes installedThermalPower, modulationRange and fuel, which are needed equally for all three classes. The attributes can be described with strings, doubles or enumerations (green).

Heat generation models
A major challenge in defining simulation models for districts is the conflict between accuracy and applicability. The models should be as detailed as possible, but still applicable to several hundred or thousand buildings simultaneously, with acceptable computation time. In this work, different central and decentral heat supply system models are set up. By integrating the models in SimStadt, these inputs can be automatically taken from previous workflow steps.
As an example for the created system models, the model of a CHP, including a peak load boiler and thermal storage will be shown here . Also included in the model are the necessary controls and all inputs and outputs on an hourly level. Profiles for space heating, domestic hot water , household electricity (Koehler et al. 2019), electricity for mobility and rooftop PV electricity generation (Eicker et al. 2014) are calculated on a single building level and aggregated to district profiles.
If the storage content is sufficient to cover the demand, it will be covered directly by the storage without activating the CHP or the gas boiler. If the demand is greater than the current storage content, the remaining required heat is provided either by the CHP unit, the gas boiler or by both, depending on the amount. The CHP unit is only activated if the heat generated by the CHP unit can either be fully used to meet demand or if the available storage capacity is sufficient to store any excess heat. The CHP is always operated at full load. If the heat demand is too low to activate the CHP or the existing heat quantity from the CHP and/or storage is not sufficient to cover the demand, the gas boiler is activated. The gas boiler only generates as much heat as is directly required, i.e. it does not feed into the storage tank. Fig. 3 System Schema of CHP and gas boiler system Fig. 3 shows the system and the connection of its components as well as the controls, as schematic view of the system. The specific INSEL model is subsequently changed into a generally applicable template, that includes no specific parameters for e.g. the nominal power or efficiency of the components in the system. Instead, all parameters are replaced by variables, that are then linked to the energy components catalog. The appropriate parameters are then written into the templates for each simulation run, depending on the dimensioning that is carried out via the Graphical User Interface (GUI) of SimStadt or via the genetic algorithm with a corresponding target function. The parameterized templates are then automatically called and simulated by INSEL, the predefined results are written as a text file. This is an automatic process where one template and one output file are written per building including individual parameters. In several successive simulation runs, different scenarios can be selected for a district and the results compared.

Results and discussion
The developed methods are applied to several case studies. One of the case studies is a district with 65 buildings in Mainz, consisting of terraced houses from the early 2010s and various partially refurbished commercial buildings, mainly from the 1960 and 1970s. The neighborhood represents a typical mixed-use suburban neighborhood in Germany. Measured data on building heat consumption and heat generation are available for the neighborhood in annual (demand) and daily (generation) resolution.
Comparing the heat demand simulation with SimStadt and DHWcalc to the measurement data results in a deviation of the total demand of 16%. Since the available CityGML files do not contain any information on refurbishments, the existing partial refurbishment of the commercial buildings was not initially taken into account in the simulation. Assuming a conventional refurbishment of these buildings according to (Loga et al. 2015), the deviation between simulation and measured data is reduced to 5%.
The model of a central system including a biomass boiler and gas boiler to cover the peak load without thermal storage is applied to the case study to represent the real system, which is reproduced in the model by taking over the specifics of the real components. The deviation for both heat generation units combined is 6%, with generation from the biomass boiler overestimated by 10% and generation from the gas boiler underestimated by 3%.
Another case study is the Rosensteinviertel in Stuttgart, Germany, which is part of the inner city area that will be- Fig. 4 Sorted annual load curve for total demand and heat generation by CHP and gas boiler for the case study Rosensteinviertel come a whole new city quarter after the finalization of the new main station. The city of Stuttgart wants to develop a climate-neutral city quarter that will house at least 14,000 people. Based on the information in the tender text and the regional conditions, the possible choice for supply systems was narrowed with the help of the flow chart. Gas and district heating networks as well as electricity networks are available in the immediate vicinity of the new development area. Due to the high heat density of approx. 130 MWh/ha*a, the construction of a local heating network for the distribution of heat is possible and financially viable. Since the target temperature in the low-energy buildings is below 45°C, an efficient supply via heat pump is possible. There are no local conditions that speak against the installation of ground collectors or ground probes, however they must be examined closely due to sensitive mineral springs in the vicinity. Since this is a centrally located inner-city neighborhood, efficient use of the limited available space is important, which makes a biomass system with a large storage facility unrealistic. Concluding from these considerations, a central heat generation and distribution by means of a heat network is chosen in this case study. The heat is generated by several biogas CHP units and peak load gas boilers, which are also operated with biogas. Thus the requirement of a climate-neutral urban district can be met. In addition, the connection to the existing district heating network can increase supply security and resilience.
Based on the CityGML model of the neighborhood that is created based on the requirements of the City of Stuttgart, SimStadt calculates the heat demand and PV potential for each building. In addition, DHWcalc is used to create profiles for the domestic hot water demand for a total of 350 residential buildings. For this analysis, the aforementioned CHP model is slightly modified to accommodate three CHP units in cascade and additional peak load gas boilers. Based on the demand, the system components are dimensioned according to a rule-based method. With a peak load of 8364 kWh and the assumption that 40% of the peak load is covered by the CHP units and the rest by several gas several gas boilers, the target components are defined accordingly. Based on the least deviation from the target value, actual components available in the energy components library are chosen. Each of the three CHP units can provide a peak thermal load of 1082 kW. Additionally, 20 gas boilers with a peak load of 280 kW each are needed. In Fig. 4, the load duration curve of the total demand including network losses is shown in blue, as well as the curves of the cumulative generation by CHPs (green) and gas boilers (orange). The operating hours for CHP 1 are 7778, for CHP 2 4603 and CHP 3 3078. The 20 gas boilers flexibly adjust to the residual demand, so at least one of the boilers is in operation for 6000 h of the year.

Conclusions
The combination of different methods, which have not been combined in this way before, results in an easy-to-understand and easy-to-use tool with which different scenarios at the neighborhood level can be assessed, while maintaining a high spatial and temporal resolution and acceptable computing time, even with a very small amount of available data.
All methods developed and applied in this work can be transferred to other neighborhoods or cities if the required input data are available. The transferability is given both nationally and internationally as CityGML models are largely available for existing buildings worldwide.
If the information on year of construction and building function required for the simulation with SimStadt is not available in the model, it can be determined and assigned using the methods presented. The data required for the attribute yearOfConstruction from the Census are available throughout Germany and for other countries alike, the OSM data for assigning the attribute function are available worldwide, especially in more densely populated areas. The developed central and decentral heat supply system models and their templates can readily be applied to any area under consideration. Furthermore, they can be manually adapted by experienced users in the INSEL environment and subsequently be integrated into the SimStadt workflow. The data model and the editor of the energy system component library are defined as independent models so that they can be combined with a variety of simulation tools and methods, both nationally and internationally. This layout enables automatic simulation based on actual components data.
The research questions raised at the beginning of this article can all be answered satisfactorily. The hypothesis, that neigbourhoods have different demand profiles and therefore need to be known in detail to be able to choose and calculate sustainable energy systems, applies here. This tool can support municipalities and planners in strategic planning and thus make a valuable contribution to achieving climate protection goals in the building sector.
Funding The work presented in the article was supported by the projects "SimStadt 2.0" [grant number 03ET1459A], "NEQModPlus" [grant number 03ET1618B] by the German Federal Ministry of Economic Affairs and Energy (BMWi) and "iCity" [grant number 13FH9I01lA] by the German Federal Ministry of Education and Research (BMBF). Additionally, financial support was granted to the first author through the PhD College "Energy and Resource Efficiency" (ENRES) from the Federal State of Baden-Wuerttemberg.
Funding Open Access funding enabled and organized by Projekt DEAL.
Conflict of interest V. Weiler and U. Eicker declare that they have no competing interests.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4. 0/.