**1. Introduction**

Cites are responsible for more than 60% of the energy demand and about 70% of the CO2 emissions worldwide [1], more than half of the world's population lives in cities [2]. Therefore, buildings and their energy demand are one of the keys to an efficient reduction of emissions. To reach the ambitious goal of the European Union to reduce 80% of CO2 emissions by 2050 compared to 1990 [3], a range of measures and scenarios need to be analyzed and evaluated to identify suitable strategies.

In a first step, the current heat demand of the city under investigation is needed. There are different approaches and methods to simulate this demand, as described by Reinhart and Davila [4], Frayssinet et al. [5] or Li et al. [6]. However, all the methods and studies reviewed there focus on

the energy demand only, not on the energy generation. Allegrini et al. [7] describe several tools and methods that can simulate district-scale energy systems, some of them also calculate the energy demand. Most of the studies and methods described focus on one or several related energy generation components which are modeled in great detail. Allegrini et al. state that tools are needed which run on simplified yet validated models to achieve faster results to support decision makers in early design stages on an urban level. 3D models of the buildings and cities under investigation can help to deliver more detailed information as the base for demand and supply simulations [8–10].

The World Energy Outlook 2018 by the International Energy Agency [11] states that electrical heating as well as heating systems supplied by gas continue to play a significant role in the future. In general, district heating systems are considered an important part of the transition to renewable energy generation, as they allow to use different (renewable) energy sources as inputs and facilitate storage [12]. Two of the most promising renewable energy systems for urban areas at the moment are co-generation plants operated with renewable gas and HP operated with renewable electricity [13,14]. CHP are often used in district heating networks as they provide heat very efficiently and thus offer a significant contribution to the reduction of CO2-emissions [15,16]. Large HP in district heating networks have advantages over individual installations in buildings, as the heat can be stored in large storages as well as in the network itself. By this, surplus renewable energy can be used whenever it is available. With the development and implementation of 4th generation low-temperature district heating networks, the integration of HPs becomes a viable alternative. For the efficient use of this kind of heating network, the buildings need to be refurbished and use a heating system that can operate on low supply temperatures. In Sweden, about 10% of the heat needed in district heating networks is supplied by large HP [17,18]. Also, in Denmark, the goal is to be less dependent on fossil fuels by integrating HP in district heating networks [19]. The city of Copenhagen wants to supply their district heating network in a CO2 neutral way by 2025 [20].

Another important step for reducing emissions is to use the solar irradiance to produce electricity with photovoltaic (PV) systems. There are several studies that show methods on how to analyze the PV potential in urban areas [21,22]. Most of the studies investigating the PV potential are based on the 3D geometry of the buildings and their roofs [23–26] since knowing the exact roof shape and orientation helps to calculate more accurate values for the PV potential energy yield.

In this study, calculation models for district heating systems with either CHP units or large HP are developed. Subsequently, heat demand, PV potential, and both energy generation systems are assessed and compared for a small town in Southern Germany. For this modeling task, the urban modeling tool SimStadt [27] is used to analyze several hundred buildings in parallel.

#### **2. Methodology**

For the development of different energy system scenarios, the heat demand of the case study town needs to be calculated first. Additionally, the local PV potential needs to be determined to assess the possible local electricity production. Then, energy generation models need to be developed to dimension and compare systems to meet the heat demand calculated beforehand. In this section, first the simulation environment SimStadt is explained and how it calculates heat demand and PV potential. Then, the development of two models for energy generation systems is shown in detail.

#### *2.1. Simulation Environment*

The analyses in this paper are made with the simulation platform SimStadt, using an internal connection to the simulation engine INSEL 8.2 [28]. Both SimStadt and INSEL are under development at the University of Applied Sciences Stuttgart. Figure 1 shows the simulation environment graphically.

**Figure 1.** SimStadt simulation environment with data sources.

The upper part of Figure 1 describes the generation of 3D CityGML models from LIDAR data [29] and the possible enrichment of the models with building attributes e.g., from municipal sources or the EnergyADE [30]. The CityGML format can depict existing environments such as buildings, roads, and landscape. Building models can be available in five different level of details (LOD); LOD0 as only a planar shape, LOD1 where the building is represented as a cube with an average building height and a flat roof, LOD2 which has more detailed information about building heights and roof shapes, LOD3 introduces windows and LOD4 has a detailed interior design and information about wall thicknesses (see Figure 2).

**Figure 2.** Visualization of LOD0 to LOD4 in the CityGML format [31].

The CityGML model is then quality checked by the tool CityDoctor, which is under development at the University of Applied Sciences. This tool checks the 3D CityGML model and can repair possible geometrical errors, e.g., open polygons which prevent the buildings from being recognized properly are closed. The model can then be stored in the 3D CityDB geodata server or directly used for simulation in SimStadt.

SimStadt has a graphical user interface (GUI) and consists of different work flow steps that use information given in the CityGML model, building physics, and usage library and from weather databases. The geometry of every individual building from the CityGML file is used and linked to the different libraries in the SimStadt platform.

The building physics library is based on the typology developed by the German Institute IWU (Institut Wohnen und Umwelt) [32], which classifies buildings according to their type and year of construction. For each building type and period, there is a typical building with its respective wall, roof, and window properties. These properties are applied to the actual building geometry and SimStadt then calculates individual u-values for each building. Additional to the properties of existing buildings, different refurbishment scenarios are available in the building physics library.

The usage library is based on several German norms and standards, focusing on heating set point temperatures, occupancy schedules and internal gains that are different according to the usage (residential, office, retail, etc.) of each building.

INSEL is the simulation engine behind SimStadt and can be purchased from doppelintegral [28]. INSEL is a block diagram simulation system for programming applications for renewable energy technologies. It has some ready-made simulation models included, but it is also possible to design own model extensions or entirely new models.

The results from the SimStadt simulations can be visualized in 2D maps, on a 3D globe [33] or the building-specific results can be exported in a .csv-file.

SimStadt is still in a beta status and therefore not publicly available; however there are several studies and publications where the calculation method of SimStadt is described and the tool was used to calculate the heat demand or PV potential of different case studies [27,34–40].

#### *2.2. Heat Demand Analysis*

SimStadt calculates the heat demand of a town or city quarter as a monthly energy balance according to the German standard DIN 18599 [41]. It uses the information in the building physics and usage libraries to determine the heat transmissions through the building envelope for each building according to their building type and age.

For the dimensioning and calculation of the generation systems that are the focus of this paper, however, more time-resolved values are needed. Therefore, the monthly values are transferred into hourly values, depending on the hourly outside temperature and the desired room temperature of 20 °C. This process is described in the German standard VDI 4710 [42]. The heating period in Germany commonly is from October to April; in summer months, the heating system is shut down entirely, so the heat demand (excluding domestic hot water demand) is zero. Additionally, there is a nightly shutdown from 0 to 6 am, where the minimum temperature is 15 °C. Nightly shutdown is a common practice to reduce the heat load and is included in several German norms, e.g., in the DIN V 18599 which also describes the monthly energy balance calculation.

#### *2.3. Photovoltaic Electricity Generation*

The PV potential can also be simulated with SimStadt and the same CityGML file from the heat demand analysis is used as input data in combination with the irradiance data of the location. In the first simulation steps, SimStadt is using the 3D CityGML Model to determine the inclination and azimuth for every roof area and calculates the solar irradiance on those surfaces. Different radiation models can be applied, in this case the Hay algorithm is used [43]. It does not take shading of trees or other buildings into account. However, since the building density is quite low and the individual buildings are of similar height, this is an acceptable limitation and trade-off between accuracy and computation time.

The next step is the parametrization for the PV potential analysis. It consists of the building surface suitability and PV system parameters. Suitability settings include for example, the minimum surface area and the minimum annual irradiation on the roof, at which a roof is determined as suitable for a PV system installation (default: ≥20 m2/950 kWh/m2a). The PV system parameters include among others the ratio of the module area to the roof area (default: 30% for flat roofs to reduce shading, 40% for tilted roofs to account for roof windows, chimneys etc.); The module tilt was chosen as 20° for a south-facing installation on a flat roof in Germany, as this represents a good compromise of maximum irradiance, optimal row spacing (shading), self-cleaning and back-ventilation of the PV modules [44]. The default module efficiency and performance ratio are 17% and 80%, respectively. Based on those parameters the yearly energy yield for every suitable roof area is calculated.

With the current SimStadt version, only the annual and monthly cumulated PV energy yield can be simulated. Therefore, with the help of the simulation engine INSEL 8.2, an hourly PV load profile was generated in this study using the same weather data and PV system parameters as in SimStadt. Then, the roof areas of the area under investigation are divided into four roof types (tilted roof orientations (east/south/west) and flat roofs). The average inclination and azimuth of every roof type is calculated, as well as the share of the surface area of every roof type. The PV load profile in INSEL considers the same roof type shares with their average inclination and azimuth. The annual PV yield from SimStadt can then be split per hour via the load profile from INSEL.

### **3. Extension of the Simulation Environment and Addition of New Functionalities**

The simulation environment described above has been developed over several years and different projects at the University of Applied Sciences Stuttgart and was adapted in some ways for the analyses in this study. The focus of this paper is the methodology for the addition of energy generation systems to the simulation environment. Add the end of this section, the current simulation sequence is explained in detail. First, the added functionalities themselves are described.

### *3.1. Heat Pump Generation*

The whole HP system is developed in the INSEL simulation environment. A simplified representation of the model is shown in Figure 3.

**Figure 3.** Structure of simplified INSEL HP simulation model.

Depending on the type of HP used, the air, water, or ground temperature of the heat source is needed as an input in an hourly resolution. Also needed is specific HP data such as coefficient of performance (COP) and power characteristics dependent on the heat source temperature and supply temperature of the heating network, which are usually provided by the manufacturer. The HP is modeled by a polynomial fit to this manufacturer data as a function of source and sink temperature. Finally, the monthly heat demand that is calculated in SimStadt and then transferred to hourly values is needed as an input. The months of the heating season can be adjusted in the model to control the operation time of the HP. Also, the needed supply temperature of the heating network can be varied depending on the system configuration.

Different key performance indicators (KPI) are analyzed as outputs of the model. The most important results are the information about the HP performance such as hourly or annual COP and heat generation. Data on the storage usage, hourly fill level, overflow or deficit of storage are also given as outputs. Additionally, values for heat losses (both for the distribution and storage losses) as well as the actual heat demand including those losses are provided for every time step.

#### *3.2. District Heating Network and Central Storage*

Additional to the HP, a large central storage is included in the system model to reduce the operating hours of the HP. The storage is sized to supply the average total heat load for three hours. This amount of time is chosen because of the utility blocking time, where the utility company is allowed to stop providing electricity to the HP for two hours in a row for a maximum of three times a day. The additional hour provides extra reserves in case of multiple blocks in a short period of time.

The heat demand is directly met from the storage. If the storage level is lower than 20% of its full capacity, the HP switches on to both meet the current demand and fill up the storage. As soon as the storage level reaches 80% of its full capacity, the HP switches off. With this control, it is ensured that the generation system does not switch on and off all the time, especially in spring and fall months when the demand can be met by the storage alone for a few hours in a row. Storage losses are included and calculated for a steel tank with 10 cm insulation.

Distribution heat losses are dependent on the length of the piping and the supply temperature and are therefore calculated in the model according to these two parameters. The losses are calculated with a simple steady-state model, using double piping with 5 cm insulation. The resulting losses are validated with other sources [45,46].
