*3.3. Co-Generation*

The co-generation system is modeled very similarly to the HP simulation model shown in Figure 3. Most of the parameters remain unchanged (e.g., the storage size and losses, distribution losses, and supply temperature, heating season, and the hourly heat demand). In this model the co-generation unit is operated in a heat-controlled mode and the electricity is seen as the by-product. As input for the CHP unit, the technical information from the manufacturer such as efficiency and nominal power are needed.

For the dimensioning of the co-generation unit, the annual load duration curve of the bulidings under investigation is analyzed. The choice of CHP operating hours is based on current economic feed-in conditions in Germany, where co-generation units should have at least 4000 full load hours to be able to operate cost efficiently. This corresponds to a rated output of the CHP unit to cover 20 to 25% of the maximum heat load [47]. With this typical marked-based design, a coverage of about 50−75% of the annual heat demand of a district heating network is usually achieved [48]. The rest of the demand that cannot be met by the CHP is provided by gas boilers. This mode of operation is very efficient to meet the peak demand [49], since gas boilers can easily and often switch on and off without negative effects on their efficiency.

#### *3.4. Current and Future Calculation Sequence*

So far, the new functionalities are not yet added to the SimStadt platform itself and therefore, different tools need to be used to calculate each step. The calculation sequence needed in this study is shown in Figure 4.

**Figure 4.** Simulation and calculation sequence (the upper part shows the sequence for calculating the heat demand, the lower part shows the electricity side including the PV potential).

In the first part, different libraries, a weather data set specific to the location and the CityGML file of the area under investigation are needed as inputs in SimStadt. There, the monthly heat demand and PV generation as well as the information about the roof orientation, is given as outputs. This sequence is described in Sections 2.2 and 2.3.

At present Microsoft Excel (or any other spreadsheet tool) is still needed as an interface between the SimStadt simulation results and the INSEL models simulating the hourly energy supply systems to transfer monthly values to hourly values, as described in Section 2.2.

The hourly PV energy yield must be determined from the monthly values and the hourly profile, which is calculated in INSEL with the shares of the roof orientation, as described in Section 2.3.

The results of the INSEL energy generation calculation then need to be exported to Microsoft Excel again for aggregating, analyzing, and visualizing the data output at the end. In the future, this whole process will be integrated as one work flow sequence into SimStadt.

#### **4. Application to Case Study**

The proposed methodology is applied to a small town in Southern Germany in the administrative district of Ludwigsburg, which belongs to the metropolitan area of Stuttgart. Since 2015, the district council of Ludwigsburg decided on a climate protection concept to determine the possibilities for reducing CO2 emissions, to acquire subsidies and financial support based on a catalogue of measures, and decided on the overall goal to make the district climate-neutral by 2050 [50].

The town Walheim in the district of Ludwigsburg that is used as a case study in this analysis has around 3200 inhabitants. Next to Walheim flows the river Neckar, which is the second biggest river in the state of Baden-Württemberg. 1610 buildings are contained in the 3D CityGML model that is used for the simulations (see Figure 5). This leads to a moderate size of the CityGML file and consequently short computation times.

All these factors are very good prerequisites that make Walheim an ideal case study for the application of this methodology.

Most of the buildings are in LOD2, but some of the buildings are represented only in LOD1 (blue in Figure 2), so their actual roof shape is not known. 46% of the buildings are garages or sheds that are not heated. The remaining 872 buildings with a total footprint area of 109,919 m2 are mainly residential buildings (89%), the rest are either used for industry, offices or retail.

For this study, all buildings are assumed to be refurbished according to the current German Energy Saving Ordinance EnEV 2016 [51]. This assumption is needed to be able to simulate low-temperature district heating for all buildings in the town. Of course, this kind of large-scale refurbishment cannot be expected to take place in just a few years but it fits together nicely with the goals of the district of Ludwigsburg of becoming climate-neutral by 2050. Additionally, there are special programs and incentives from the KfW (Kreditanstalt für Wiederaufbau-German Reconstruction Loan Corporation) to promote building and city quarter refurbishments.

**Figure 5.** 3D CityGML model of the case study town of Walheim. The CityGML model was created by the State Agency for Spatial Information and Rural Development Baden-Württemberg.

In a first step, the monthly heat demand of every building in the town of Walheim is calculated with SimStadt. Table 1 shows the cumulated heat demand for all buildings of Walheim for every month.


Then, the monthly values are transferred into hourly values as described in Section 2.2. The hourly demand of each building is cumulated for each time step and ordered in a sorted annual heat load curve according to the value of the heat demand of each time step (see Figure 6). The total annual heat demand of Walheim amounts to approximately 12,500 MWh/a with a peak load of 7767 kW in January. The considered heating season is October until April. Domestic hot water is not included in this assessment.

**Figure 6.** Sorted annual heat load curve (red) and hourly heat load (green) for Walheim (EnEV standard).

In this scenario, as many photovoltaic (PV) modules as possible are put on all suitable roofs of all buildings in Walheim. The German Erneuerbare-Energien Gesetz (EEG, renewable energies law) [52] says that PV systems smaller than 10 kW do not have to pay additional fees when they feed PV electricity to the grid. Therefore, most PV systems on residential buildings are smaller than that, even though there might be space left on the roofs to place additional PV modules. Renowned German scientist Volker Quaschning addresses this issue [53] and demands that all usable roof spaces should be used for PV electricity generation.

The PV potential simulation is carried out as it is described in Section 2.3. The buildings in the CityGML file that are only available in LOD1 are excluded from the PV potential analysis, since their roof shape is not known. Therefore, the orientation cannot be determined.

According to the SimStadt PV simulation this results in 1470 suitable roof areas for Walheim, with a total nominal power of 6417 kWp and an annual energy yield of 6043 MWh. Figure 7 shows the simulation results of a part of Walheim for


Figure 8 shows the PV power output and monthly energy yield over the course of one year. The monthly PV energy yield of all suitable roofs in Walheim combined is calculated in SimStadt (blue) and the daily mean PV power output in Walheim is shown in yellow, which is calculated with the specific PV load profile in INSEL.

**Figure 7.** Examples of the simulation results for PV electricity generation in SimStadt for a part of Walheim.

**Figure 8.** Monthly PV energy yield (blue = SimStadt simulation results) and daily mean PV power output (yellow = via INSEL PV load profile) for Walheim.

The sorted annual heat load from Figure 6 is used to choose the appropriate HP to match the demand of Walheim. Since the river Neckar flows directly next to the town, it serves as the heat source for the HP. The average daily water temperature between 1988 and 2014 at the measuring point in Besigheim, which is only a few hundred meters from the town of Walheim, varies between 4.21 °C in December and 21.71 °C in August (see Figure 9).

**Figure 9.** 26-year average water temperature of the river Neckar at Besigheim (data from [54]).

Since the HP are the only source of heating energy for the network and are therefore in a monovalent operation mode, several large industry heat pumps need to be used in this case to supply the whole town of Walheim. After extensive market research, the IWWS 960 ER1a from Ochsner Energie Technik was selected. It is a water-water industry HP and has a nominal heat output of 966 kW. This size is ideal, since eight of the aforementioned HP can meet the peak load of 7767 kW.

Distribution heat losses are dependent on the length of the piping and are therefore calculated according to the total length of the network, which is assumed to be 12 km. Since the supply level of the heating network is only 45 °C, the mean heat losses of 106 kWh/h for the whole network are rather low with 7.5% on average. The temperature of the heating network can be chosen to be this low, because all the buildings connected to the network have been refurbished to a low-energy standard as well as low-temperature heating systems before.

The storage is set to supply the average annual load of the town of 1431 kW for three hours which leads to a size of 15 m in height and a diameter of 4 m of the insulated steel tank. Assuming a discharge temperature difference of 20 K (supply temperature to the network 45 °C, return temperature 25 °C), this results in 4314 kWh storage capacity. Storage losses of 0.851 kWh/h are included in the model.

Based on the dimensioning guidelines described in Section 3.3, a co-generation unit within the range of 2000 kW nominal heat output is selected to supply the heat demand of the town of Walheim. The electricity generated by the CHP is assumed to be fed into the grid.

Since in this study both biogas (from fermentation of biomass or waste water sludge digestion) and gas from power to gas systems (P2G), where surplus electricity is used to produce gas from water with electrolysis are considered as fuel for the CHP, a unit of the manufacturer 2G was selected, which can be operated with both fuels with only a few technical changes (CHP Type: 2G avus 2000c). For natural gas and gas from P2G the nominal heat output of this CHP is 1977 kW with a thermal efficiency of 43.2% and the nominal electrical power output 2000 kW with an efficiency of 43.7%. In the case of biogas, the overall efficiency of the unit is 2.1% lower, which corresponds to 2009 kW/42.5% on the thermal side and 2000 kW/42.3% on the electrical side. The rest of the heat demand that cannot be met by the co-generation unit needs to be supplied by central gas boilers. To ensure the highest possible security of supply, two gas boilers with a nominal power of 4000 kW with an efficiency of 95% each are used. Thus, in the case of maintenance work on the CHP, the gas boilers can cover the entire heat load.

### **5. Results of Two Scenarios for Energy Generation Simulation**

The overall results for the energy generation of both system simulations are compared in Figure 10. The eight HP with a maximum heating power output of 8354 kW can generate 94% of the needed heating energy in only 1890 h. The HP system can store a large amount of heat and use this heat at other times to meet the demand. The heat that can be stored corresponds to the area between the gray and yellow lines in Figure 10.

The CHP unit with a heating power output of constantly 2000 kW runs for 4012 h but only supplies 61% of the heat, the rest needs to be produced by the gas boilers. These shares correspond to 8024 MWh from the CHP unit and 5058 MWh or 39% from the gas boilers. The CHP system cannot store as much heat as the HP system because most of the produced heat is used directly. This is due to the lower nominal heat output of the CHP that produces less surplus heat compared to the eight HPs, even though the same storage size is used. This can be seen in Figure 10 as the area between the blue and yellow lines.

Table 2 shows the KPI for the two systems. The heat demand is the same for both system designs, the heat losses slightly differ because the CHP system can store less heat in the storage and has therefore lower storage losses.

Electricity yield from PV is the same in both scenarios, in the CHP scenario, additional electricity is produced when the CHP is running. All electricity that is not directly used by either the HP or the P2G process is assumed to be fed to the grid. The remaining electricity needed for operation of either system is assumed to come from the grid.

**Figure 10.** Annual overview of CHP and HP heat generation as well as heat demand.

The CHP unit can either be operated with biogas or with gas from power to gas systems (P2G) fed by an electrolysis process with an efficiency factor of 0.65 kWh/kWh [55]. The electricity needed for the P2G process is assumed to be 100% renewable and all the PV electricity yield in this scenario is used for the P2G process. The overall electricity demand for the simulated CHP system using gas from P2G consequently is about 11 times as high as for the HP system. This balance improves of course if biogas from fermentation is used.


**Table 2.** Key performance indicators (KPI) for both systems.

Figure 11 shows the monthly heat demand of Walheim (orange, in background) and how this demand is met by either the HP or CHP production and the storage (in front). On the left, the HP system plus storage is visualized in green, on the right in blue is the CHP and gas boilers plus storage. The CHP system always meets 100% of the demand, while the HP system has both under- and overproduction for most of the months. Overproduction for the HP occurs, when the storage tank is "full", but the HP is still running for the remainder of the time step of one hour. This amount of energy is usable in reality, but leads to higher storage losses due to the temperature increase. This effect is due to the modeling time step of one hour. The storage (gray) is used in both systems, however the CHP unit can only produce significant surplus heat for storage in March, April, and October, when the monthly heat demand is considerately below 2000 MWh. In the summer months (May–September), the heating network is switched off, therefore only the storage losses remain.

**Figure 11.** Coverage of heat demand by HP and CHP systems respectively.

Both systems (HP and CHP scenario) generate the same amount of electricity with PV and the CHP system has additional electricity generation on top of the PV yield. The HP uses the PV electricity whenever possible. 15% of the HP electricity demand can thus be met by PV directly. Because of non-simultaneity, the rest of the electricity needed for the operation of the HP needs to come from the grid and 92% of the PV generated electricity is fed to the grid. This excludes the household electricity demand, which is the same in both scenarios and not taken into account here. Own-consumption of the PV electricity for household electricity demand is not assessed in this study.

The monthly comparison between the PV energy yield, the PV energy use by the HP and the remaining electricity needed from the grid for the operation of the HP can be seen in Figure 12. It shows a mismatch of a high PV energy yield (orange) in the summer months and a high HP electricity demand (green plus blue) in the winter months. However, the annual electricity balance of HP demand and PV generation in the town of Walheim is positive (PV electricity yield is 82% higher than the HP electricity demand, see Table 2).

A period of 100 h in January is chosen to highlight the differences in heat generation and other KPIs for both systems (see Figure 13). In this period, the heat demand reaches its peak with a load of 7767 kW. In Figure 13 the modulation of the HP is clearly visible. The loads during hours 281 till 287 cannot be met by the HP directly. In most of those hours however, the demand can be met with heat from the storage, only for three hours the system does not produce enough heat. If the heat demand is lower than what the HP produces (e.g., in the first 10 h of the graph), the surplus heat fills the storage. This stored heat is then used to satisfy the heat demand when the HP turns off. However, when the HP is switched off and the demand is higher than the heat that is available in storage, there is a slight underperformance of the system. The deficit is only during one hour at a time and only once for two consecutive hours. The one-hour deficits are due to the model time step of one hour and do not have practical relevance, as the HP would switch on directly if the storage tank is below the threshold. This fact combined with the low-energy standard of the buildings and their surface heating system leads to the conclusion that this deficit is acceptable.

Figure 13b shows the same time period for the CHP system. The CHP unit runs constantly but can only provide part of the heat demand. This is due to the dimensioning of the CHP unit; the rest of the demand is provided by the gas boilers (not in the figure). The storage is empty since there is no surplus heat from the CHP available.

**Figure 12.** Monthly PV and CHP electricity yield and HP electricity demand.

**Figure 13.** Analysis of the performance of both systems from the hours of the year 250 to 350, which include the peak heat demand ((**a**): HP system, (**b**): CHP system).

In Figure 14, 100 h in mid-October are shown for both systems. In this period, the heat demand is lower than in Figure 13, therefore the systems run differently. Figure 11a shows that the HP system runs only one hour at a time, before switching off for four or more consecutive hours when the heat demand is met from the storage. Since the power of the CHP unit is lower than of the HP, less heat can be loaded into the storage in Figure 14b compared to the HP system. Also, the CHP unit must run for more than one hour at a time and is switched off for only three to four consecutive hours.

**Figure 14.** Analysis of the performance of both systems from the hours of the year 7000-7100 ((**a**): HP System, (**b**): CHP System).

#### **6. Assessment of Primary Energy Demand**

The primary energy demand is calculated by multiplying the final energy demand with a PEF that takes into account the effort and losses that occur during the whole value chain of the energy carrier.

To demonstrate the influence of the energy carrier used as well as the influence of the current and future grid mix, different scenarios are calculated in Figure 15. The electricity generated by the CHP unit can be assessed in different ways, depending e.g., on how the electricity in the grid is produced and what type of gas is used. If the CHP runs on natural gas and the electricity from the CHP and PV is fed into a grid with predominantly fossil and nuclear electricity generation, it replaces this kind of electricity with renewable or co-generated electricity. The current factor in Germany for this replacement is 2.8 [56], which means that the electricity generated by the CHP and PV that is fed into this grid is valued 2.8 times higher than its actual amount of electricity (Figure 15—status quo). Since the CHP units produce more electricity than the HP, the overall balance of the CHP is better. However, when the electricity mix of the grid changes in the future due to the integration of increasingly renewable electricity (Figure 15—business as usual), this factor will have to change as well. Then, the surplus electricity would be worth less and the HP scenario wins against the CHP. If biogas is used in the CHP, the PEF for gas changes to 0.5. In this scenario (Figure 15—biogas) the CHP has the better primary energy balance. According to a meta-study by the Ökoinstitut and Fraunhofer ISI [57], the PEF for electricity in 2050 in Germany will be 0.3. Assuming an overall efficiency of 0.65 for the P2G process, this results in a PEF of 0.5 for gas from P2G (Figure 15—renewable energy). In this case, the primary energy balance for the HP system is the better one, because the P2G process is subject to high energy losses and the electricity fed into the grid by the CHP is not able to replace any fossil fuels anymore.

In general, the use of PEF to compare different energy systems must be evaluated. With a growing share of renewable electricity that factor loses its validity and might have to be replaced by different indicators [58].

**Figure 15.** Comparison of different PEFs to assess the HP and CHP systems.

#### **7. Conclusions and Outlook**

In this study, two renewable energy generation models are developed and applied to a small German town. The SimStadt simulation environment was extended to include the developed models for a central HP system with a district heating network and central storage as well as a CHP system with a district heating network and central storage. The investigated indicators include the heat demand and heat production as well as the electricity generation and electricity demand of the respective systems.

A HP scenario with PV has the main disadvantage that due to low winter irradiance, the fraction of PV electricity used directly by the HP is only 15%. The main share of PV electricity is produced in summer; the main share of heat demand however occurs in winter.

For the CHP energy generation, it is important to include the source of the gas used. If we assume renewable energy for all energy sources (renewable electricity for the HP system and either biogas or gas from P2G, produced from renewable electricity for the CHP system), a look at the total electricity needed for operation of the systems is essential.

To achieve a good match between demand and generation, it is important that energy generation from other renewable sources, such as wind, is investigated and further models and scenarios are created for the simulation environment. Additionally, different storage management schemes or storage types need to be investigated to maximize the usage of PV electricity by the HP.

In a next step, an economic analysis of the systems in question with their respective energy inand outputs will be made. With this additional assessment, more KPIs for each system can be assessed and the systems can be compared on a broader level. At present, both HP and CHP system cannot regulate their heating power, so they are either running on full load or are switched off. Models that support partial load operation are under development right now and could provide a more detailed assessment and comparison of the two systems.

In conclusion, urban energy simulations are a very important instrument for analyzing demands and potentials and comparing different scenarios. Based on the simulation results, the overall energy efficiency can be improved, and emissions reduced. The outcome of these simulations can be used to advise city planners, building authorities or municipalities to help design a renewable and sustainable urban future.

**Author Contributions:** Conceptualization, V.W., J.S. and U.E.; Methodology, V.W., J.S.; Software, V.W., J.S.; Validation, V.W.; Formal analysis, V.W., J.S.; Investigation, V.W., J.S.; Writing-original draft preparation, V.W., J.S.; Writing-review and editing, V.W., J.S. and U.E.; Visualization, V.W., J.S.; Supervision, U.E.

**Funding:** This research is part of a phd programme called ENRES, supported by LGF and MWK Baden-Württemberg. In addition, the research is part of the IN-SOURCE (funded by the Belmont Forum Joint program initiative on the Food Water Energy Nexus (BMBF grant 01LF1802A)) and SimStadt 2.0 (funded by BMWi, grant number 03ET1459A) projects.

**Conflicts of Interest:** The authors declare no conflict of interest.
