Introduction
Climate change is currently one of the most pressing issues of humankind (UN, 2025). To mitigate further global warming and severe effects of anthropogenic climate change, greenhouse gas emissions must be reduced, e.g. by transitioning from fossil fuels to renewable energy sources (IPCC, 2023, pp. 20–21). The cost for renewable energy has decreased drastically in recent years (IPCC, 2023, p. 54). Nevertheless, significant challenges to increase renewable energy capacity remain: There are technical challenges, such as the periodical overload of distribution grids, presently prevalent for example in Germany due to supply peaks of decentral PV (Wirth, 2025, pp. 22–23). Another hurdle for successful energy transitions is the social acceptance of renewable energy projects (Ellis, Schneider and Wüstenhagen, 2023). Energy communities often strive for high self-sufficiency and self-consumption while utilizing renewable energy. Therefore, they might help tackle the technical challenges of balancing supply and demand (EUC JRC, 2020; Ahmed, Ali and D’Angola, 2024). Moreover, energy communities are expected to foster societal acceptance and participation in renewable energy (EUC, 2025). Different forms of energy communities are prevalent in Europe, especially in Germany and Denmark, but also the Netherlands, the UK, Sweden and many other countries (EUC JRC, 2020). Nordic countries such as Denmark and Sweden supply high shares of their heat demand via district heating (IEA, 2024; Munćan et al., 2024). District heating enables utilization of sources like geothermal energy, combined heat and power plants or waste heat (Lund et al., 2014; Werner, 2017a, 2017b). Energy communities with electricity-based heat supply could reduce the use of such heat sources and therefore lead to a less resource-efficient overall energy system. Although energy communities as well as district heating are both considered key concepts for energy transitions, research on the combination of these topics is scarce.
Aim and research questions
The aim of this study is to simulate different energy community system solutions in a virtual testbed and derive respective energy balances for heat and electricity. The two research questions are:
What are the hourly balances of heat and electricity to overlaying distribution grids for the investigated energy communities?
What are the community self-sufficiency and self-consumption rates for heat and electricity for the investigated solutions?
Background
This section introduces basic background information on energy communities as well as district heating.
Energy communities
There is no distinct scientific consensus on how to precisely define energy communities (Gui and MacGill, 2018; Ahmed, Ali and D’Angola, 2024). However, the core idea describes a community producing, sharing, storing and consuming energy together (Gui and MacGill, 2018; EUC JRC, 2020; Ahmed, Ali and D’Angola, 2024). Energy communities can take on different legal forms such as cooperatives, limited partnerships or housing associations (EUC JRC, 2020). They can also be categorized according to their key motivation, e.g. into virtual power plants, microgrid systems or peer-to-peer trading (Gui and MacGill, 2018). Typical examples include PV and wind farm cooperatives, shared district heating and cooling systems, local energy markets or communal energy storage (EUC JRC, 2020; F.G. Reis et al., 2021; Gjorgievski, Cundeva and Georghiou, 2021; López et al., 2024). The EU defines energy communities in two laws of the Clean Energy for all Europeans package adopted in 2019 (EUC JRC, 2020). The Renewable Energy Directive specifies “renewable energy communities” while the Electricity Market Directive defines “citizen energy communities” (EUC JRC, 2020). Core principles for governance, ownership and purpose of these two concepts are very similar, while definitions differ for geographical scope, activities, participants, autonomy and control of energy communities (EUC JRC, 2020).
District heating
District heating (DH) is an infrastructure where heat is supplied to several customers by a heat distribution grid (Lund et al., 2014). These networks can vary greatly in size, from supplying only a few buildings to providing heat for an entire city (Lund et al., 2014). The supply units can be central or decentral, allowing flexible heat production with a variety of different technologies such as CHPs, waste heat, geothermal heat and more. (Lund et al., 2014). Currently, district heating utilizes pressurized water typically distributed at around 100°C (Lund et al., 2014). In the future, enhanced energy performance of buildings could enable supply temperatures between 55–70°C, significantly reducing distribution losses and increasing system efficiency (Lund et al., 2014, 2018).
Methodology
The following section describes the model structure, simulation process and implementation.
Model structure
The model operates on three levels as depicted in Figure 1. On the first level, energy balances are calculated individually for each building within the community. Depending on the system solution, decentral components per building such as heat pumps (HP), roof-mounted PV power supply and electric vehicles (EV) are included. Furthermore, an overall space heating demand reduction can be applied. The community level introduces central heat and electricity demands. Several central components can be included: a heat pump (HP), combined heat and power plant (CHP), thermal energy storage (TES) and battery energy storage system (BESS). Total demands are represented by the sums of decentral and central demands. A community-owned district heating grid (CDH) and a local power grid represent the interfaces between all three levels. These grids supply heat and electricity within the community but also import or export from the third level of this model: the external energy infrastructure i.e. the external DH system and power grid the community is connected to.

Figure 1
Model structure.
The simulation process is visualized in Figure 2. Multiple cases of system solutions are simulated at the same time.

Figure 2
Simulation process.
Input data
There are different categories of input data required for the model as visualized in Figure 2. Energy profiles include building demands for space heating, domestic hot water and electricity as well as pre-simulated data for PV systems and EVs. The building data contains information about building-specific components, such as decentral heat pump SPFs. Grid data describes the layout and dimensions of the CDH system. Lastly, additional components included in the specific system case may require further case parameters, such as the SPF for a central, community-owned heat pump.
Simulation process
As visualized in the center-column of Figure 2, the simulation of components is performed bottom-up from the buildings to the external energy systems. The simulation order of system components is fixed and important to consider when designing system cases. The arrangement of the following component-descriptions represents this order. Some components are implemented by balancing pre-simulated energy profiles from Åberg (2024) while others are represented by custom python algorithms described below.
In the first step, the heat demand reduction (HDR) reduces space heating demands of all buildings in all hours by a specified factor, e.g. 40%.
In the second step, all decentral components are simulated. Decentral EV electricity demand profiles, provided as input data, are added to the overall building-specific electricity demand. Similarly, rooftop-mounted PV supply profiles are added to the electricity supply per building. Building-specific heat pump systems are dimensioned with seasonal performance factors (SPF) which include electrical heating for peak supply. Their heat supply and electricity demand is added to the respective building’s balances.
In the third step, the community-level is balanced. If a CDH grid is included, the remaining heat demand which is not already supplied by building-specific components is aggregated. The losses for providing the buildings with heat via CDH are calculated and added to this remaining demand, resulting in the overall central heat demand. Heat cannot be exported from decentral sources to this grid. The CDH is simulated by a model developed at Uppsala University and mainly based on Valdimarsson (2014) as well as Frederiksen and Werner (2013). Heat pipes are dimensioned with lengths based on the grid-layout as well as required domestic hot water (DHW) and space heating (SH) demand flows. The SH dimensioning-flow is derived from the maximum daily average SH demand for each building, the maximum allowed pressure loss and the building target temperatures. Afterwards, hourly simulations generate mass flows, pressure losses, temperatures and heat losses for all pipes. Within the hourly simulations, SH and DHW demands are aggregated. In every hour, the model ensures target flow temperatures for all buildings to guarantee DHW sanitation. The flow and return temperatures of all pipes and buildings are therefore derived from the worst building in the respective hour. The central heat pump is implemented similarly to the decentral version, but dimensioning is based on the central heat load and only one SPF. The heat is supplied centrally, and the heat pump electricity demand is added to the community electricity demand. Two operation strategies for central CHPs can be implemented. Both require the same input parameters: power capacity, power-to-heat coefficient and overall system efficiency. The “power focused” strategy operates the CHP to match the central electricity demand. CHP heat production is derived from the power-to-heat coefficient. The required primary fuel is calculated with the system efficiency. Heat and electricity production is added to the central supply balances. The second, “heat focused” operation strategy operates the CHP to supply the central heat demand. For the central TES, several parameters must be specified, namely storage capacity; charging, discharging and storage efficiencies; maximum charging and discharging loads and the initial charging state. Based on these parameters, the TES charges when there is surplus of central heat and discharges when there is a heat deficit. Charging adds to the heat demand, and discharging adds to the supply. The central BESS works equivalent for electricity as the TES works for heat.
The last step balances the community against the overlaying heat and power grids. Therefore, total demand and supply profiles for heat and electricity are derived. Afterwards, the total demands are subtracted by the total supply profiles to calculate imports or exports to external DH and power grids.
Calculation and output
As depicted in Figure 2, the output of the model consists of key performance indicators (KPI), statistics, energy profiles and plots. To assess system independence, self-consumption rates (SCR) and self-sufficiency rates (SSR) are calculated for heat and electricity according to equations 1 and 2. The heat KPIs are calculated in the form of useful energy while electricity is based on final energy. Therefore, the heat SCRs and SSRs depict how much useful-heat is self-produced within the community and how much is imported from external DH.
Additionally, basic result statistics such as total sums or annual means are calculated for various datasets. Energy profiles of all different levels and components are exported and plots generated automatically.
Data
This chapter describes the data used in the study.
Buildings, energy profiles and grid layout
Figure 3 depicts the layout of the representative energy community in this study. The community consists of residential buildings and non-residential buildings. The residential buildings are based in the city of Uppsala in Sweden and include 17 single-family houses (SFH) and 4 multi-family houses (MFH). Their energy profiles (including PV supply and EV demand) were previously simulated and described by Åberg (2024). The non-residential buildings, represented by a health clinic, an office building, a pre-school and a school, enhance the variety of demand profiles in the model. Their heat and electricity demands are based on real data from Uppsala. The heat demands of non-residential buildings were separated into SH and DHW. For this, representative weekly DHW profiles for each building were identified in the summer, when SH demands are close to zero. These weekly DHW profiles were used to generate representative annual DHW profiles. Next, the DHW profiles were subtracted from the buildings’ total heat demands to derive annual SH profiles. Negative demands that occurred because of this were set to zero. Afterwards, these SH profiles were linearly weather normalized with temperature profiles of the actual year and a representative year in Uppsala. Non-residential buildings do not entail PV and EV. Therefore, electricity, SH, DHW, EV and PV profiles of residential buildings are synthetic and based on a representative year. Electricity, SH and DHW profiles of non-residential buildings are based on real data from 2024, including weather-normalization for SH.

Figure 3
Building footprints and heat distribution grid layout.
Investigated cases
This study investigates five cases of energy communities with identical initial energy profiles and system layout. However, the cases include different components affecting the energy balances as depicted in Figure 4.

Figure 4
Overview case designs.
In the reference case, heat is supplied by conventional DH without additional components to introduce the initial energy profiles. Case-group one represents decentral heating solutions without a DH grid. Case 1.1 includes decentral PV systems and heat pumps. Building-specific heat pumps are commonly dimensioned to about 70–80% of the maximum heat load to provide most of the demand (Björk et al., 2013, p. 41). The remaining load is typically covered by direct electrical heating, which is included in the SPF. Therefore, the decentral heat pump systems are dimensioned to cover the entire heat load. Case 1.2 represents a system where EVs and a central BESS are added to utilize more of the PV supply within the community. The second case-group describes central heating scenarios. Both sub-cases include decentral PV systems and energy efficiency measures leading to reduced heat demands in all buildings. Heat is shared via a local CDH grid. Energy efficiency measures lower the required building-temperature demands. However, DHW sanitation limits supply temperatures to 60°C, resulting in target return temperatures of 40°C. The main heat supply in case 2.1 is a central heat pump. This is assumed to be operating without direct electricity heating for economic reasons and therefore only dimensioned to cover 70% of the heat load. In case 2.2 a power-focused CHP supplies heat and electricity while a central TES is included to increase self-sufficiency and self-consumption of the community. An overview of all parameters defined for each case is shown in Table 1.
Table 1
Case parameters.
| CASE | COMPONENT | PARAMETER | VALUE | SOURCE |
|---|---|---|---|---|
| Reference | DH | – | – | – |
| Case 1.1 | Decentral PV | Hourly supply profiles | Only residential buildings, (Åberg, 2024) | |
| Decentral HPs | SPFs | SFH: 3.3; MFH: 3; NRB: 3 | (DEA, 2025c) | |
| Dimensioning factor | 1 | Assumption | ||
| Case 1.2 | Decentral PV | Identical to case 1.1 | – | – |
| Decentral EVs | Hourly demand profiles | Only residential buildings, (Åberg, 2024) | ||
| Decentral HPs | Identical to case 1.1 | – | – | |
| Central BESS | Capacity | 1.5 MWh | Derived from (DEA, 2025a) | |
| Hourly efficiencies (charge | discharge | storage) | 0.98 | 0.97 | 0.999958 | (DEA, 2025a) | ||
| Initial charge percentage | 0% | Assumption | ||
| Maximum loads (charge | discharge) | 750 kW | 750 kW | Derived from (DEA, 2025a) | ||
| Case 2.1 | Decentral PV | Identical to case 1.1 | – | – |
| HDR | Space heating demand reduction | 40% | Assumption, cf. (Savvidou and Nykvist, 2020) | |
| CDH | Spatial distribution of community | See Figure 3 | Reality and assumptions | |
| User temperatures (supply | return) | 60°C | 40°C | (Energiföretagen Sverige, 2021, pp. 21, 24) | ||
| Burial depth | 60 cm | Cf. (Frederiksen and Werner, 2013, p. 331) | ||
| Ground temperature | Profile Uppsala 60 cm | Interpolation of 40 and 100 cm from 2010 | ||
| Dimensioning DHW flow | Pipe specific | (Energiföretagen Sverige, 2021, p. 22) | ||
| Dimensioning allowed pressure loss | 150 Pa/m | (Frederiksen and Werner, 2013, pp. 442–443, 458) | ||
| Absolute roughness pipes | 0.1 mm | (Frederiksen and Werner, 2013, p. 444) | ||
| Dimensioning friction factor pipes | 0.02 | (Frederiksen and Werner, 2013, p. 444) | ||
| Efficiency heat exchangers | 0.98 | Cf. (DEA, 2025c) | ||
| Minimum flow in every pipe | 0.03 kg/s | Assumption | ||
| Heat conductivity pipe insulation | 0.03 W/m*K | (Frederiksen and Werner, 2013, pp. 77, 317) | ||
| Heat conductivity ground | 1.5 W/m*K | (Frederiksen and Werner, 2013, p. 80) | ||
| Central HP | SPF | 3 | Cf. (DEA, 2025b) | |
| Dimensioning factor | 0.7 | Assumption, cf. (Björk et al., 2013, p. 41) | ||
| Case 2.2 | Decentral PV | Identical to case 1.1 | – | – |
| HDR | Identical to case 2.1 | – | – | |
| CDH | Identical to case 2.1 | – | – | |
| Power CHP | Plant type | Biogas Microturbine | Assumption, cf. (Salomón et al., 2011) | |
| Power capacity | 180 kW | Assumption, cf. (Salomón et al., 2011) | ||
| Power-to-heat coefficient | 0.3 | Assumption, cf. (Salomón et al., 2011) | ||
| Overall efficiency | 85% | Assumption, cf. (Salomón et al., 2011) | ||
| Energy focus (heat vs. power) | power | Assumption | ||
| Central TES | Capacity | 1.5 MWh | Assumption, based on SSR increase | |
| Hourly efficiencies (charge | discharge | storage) | 1 | 1 | 0.99 | Cf. (DEA, 2025a) | ||
| Initial charge percentage | 0% | Assumption | ||
| Maximum loads (charge | discharge) | 300 kW | 300 kW | Assumption, based on actual max load used |
[i] DH: Conventional District Heating; PV: Photovoltaics; HP: Heat pump; SPF: Seasonal performance factor; SFH: Single-family house; MFH: Multi-family house; NRB: Non-residential buildings; EV: Electric vehicle; BESS: Battery energy storage system; HDR: Heat demand reduction; CDH: Community district heating; DHW: Domestic hot water; CHP: Combined heat and power; TES: Thermal energy storage.
Results
This section examines and compares the most interesting results for all cases.
Reference case: conventional DH
Figure 5a–c and Figure 6a describe the main energy profiles of the reference case and therefore indirectly the input data, as no additional components are included. Figure 5a depicts the annual space heating demand profile aggregated across all buildings. When analyzing Figure 5a and Figure 6b simultaneously, it is visible that the space heating demand coincides with the outdoor temperature profile. For example, in summer, when the outdoor temperature is high, the space heating demand is very low. Figure 5b depicts the domestic hot water demand of all buildings. As clearly visible, this does not coincide with temperature and is rather a reoccurring pattern as people usually require hot water similarly throughout the entire year. Together, the space heating demand and the domestic hot water are supplied via the external district heating system as depicted in Figure 5c. This external supply does not include losses, as the grid is not community-owned, hence heat distribution is the responsibility of the grid operator.

Figure 5
Reference case – space heat demand, domestic hot water and external DH heat supply.

Figure 6
Reference case – decentral electricity demand and outdoor temperature.
In the reference case, the household electricity demand is identical to the entire decentral, building-specific electricity demand depicted in Figure 6a. The initial electricity demand of the community varies over the year and is lower in some of the summer months. This is probably due to lower electricity demands of some of the non-residential buildings (office, pre-school and school) because of vacation times. However, the electricity demand does not coincide as strongly with the temperature profile as the space heating demand. All electricity is supplied via the external electricity grid.
Case 1.1: decentral PV and HPs
The space heating and domestic hot water demands for case 1.1 are identical to the reference case visible in Figure 5a and b. The decentral heat demands (sum of space heating and domestic hot water) of case 1.1 are therefore also identical to the reference case as depicted in Figure 5c. This entire heat demand is supplied by building-specific heat pump systems.
While the household electricity demand is identical to the reference case, the overall decentral electricity demand visualized in Figure 7a differs, as it includes the required electricity for the heat pumps. Therefore, this overall electricity demand coincides with the outdoor temperature observable in Figure 6b. As depicted in Figure 7b, the PV systems provide a surplus of electricity in the summer. In winter, the PV systems do not supply enough to cover local demands. Imports and exports of electricity from the external grid are therefore significant as shown in Figure 7c.

Figure 7
Case 1.1 – decentral electricity demand, PV supply and external electricity grid.
The matching of heat and electricity demand and supply is depicted in Figure 8a and b. While the heat is perfectly matched, there is a significant mismatch of electricity demand and supply.

Figure 8
Case 1.1 – total heat and electricity data.
Case 1.2: decentral PV, HPs, EVs and central BESS
Household heat and electricity demand as well as supply for case 1.2 is identical to case 1.1. The EV electricity demand visible in Figure 9a adds to the decentral electricity demand. Electricity balancing and charging state of the central BESS included are shown in Figure 9b and c. The BESS is mainly used in summer when there is surplus electricity from the PV systems. The import of electricity from the external grid in Figure 10a shows a higher demand in winter compared to case 1.1, mainly from the EVs. The EV demand as well as the BESS capacity enable local use of all PV surplus in summer, and no electricity is exported to the external grid. The total electricity demand in Figure 10b includes electricity stored in the BESS and EV charging demands. Figure 10b also shows the electricity supply, which differs from case 1.1 since part of the PV supply is stored in the BESS and supplied later. Compared to case 1.1, the electricity supply is matched slightly better to the demand as self-consumption of PV electricity is higher.

Figure 9
Case 1.2 – decentral EV demand, central BESS balancing and BESS charging state.

Figure 10
Case 1.2 – external electricity grid and total electricity data.
Case 2.1: decentral PV, HDR, CDH and central HP
Figure 11a shows the reduced SH demand, caused by energy efficiency measures in case 2.1. This reduces SH demands by 40% compared to the reference case (see Figure 5a). DHW demands remain unchanged (Figure 5b). Heat distribution losses from the CDH grid are shown in Figure 11b. The total heat load of the CDH visible in Figure 12a includes the SH and DHW demands as well as distribution losses. Heat is partly supplied to the CDH grid from the external DH system, but most heat is produced by the central heat pump (see Figure 12b).

Figure 11
Case 2.1 – space heating demand and CDH heat losses.

Figure 12
Case 2.1 – CDH heat load and central heat pump supply.
The household electricity demand and PV supply for case 2.1 is identical to the other cases (see Figure 6a and Figure 7b). Additionally, the community’s central electricity demand includes the power for the central heat pump (Figure 13a). The total electricity demand (sum of decentral and central) is shown in Figure 14b.

Figure 13
Case 2.1 – central electricity demand, external DH grid and external electricity grid.

Figure 14
Case 2.1 – total heat and total electricity data.
The heat pump is dimensioned to cover 70% of the maximum heat load, while the rest of the load is supplied by external DH as visible in Figure 13b. In contrast to the reference case, distribution losses are included in the load covered by external DH, since the external supplier is not responsible for heat distribution within the CDH. Figure 13c shows the external electricity grid balance, which is similar to case 1.1, as both cases mainly rely on heat pumps to supply the heat demand.
Figure 14a depicts the total heat data, visualizing that most of the heat is produced within the community, but not all. The mismatch for total electricity depicted in Figure 14b is mainly because of the high electricity demand of the heat pump in the winter and PV supply in summer.
Case 2.2: decentral PV, HDR, CDH, central power CHP and TES
For case 2.2, PV supply, building electricity, SH and DHW demands are identical to case 2.1. Therefore, the same amount of heat is distributed in the CDH grid and the heat distribution losses are also identical (see Figure 11b). Figure 15a–c shows the CHP heat supply, electricity supply and the required final energy demand. Although the CHP is power-focused, the supply still roughly follows the heat demand. In summer, most of the day-time electricity demand is supplied by the PV systems. Therefore, the CHP mostly operates at night-time in the summer, generating a surplus of heat. This heat is stored in the TES (see Figure 16). Short charging cycles visible in Figure 16 illustrate that the TES is used for short-term storage, increasing self-sufficiency and self-consumption. The TES charging states (Figure 16b) and the overall heat data (Figure 18a) indicate most heat surplus occurs in late summer and autumn, when both PV production and heat load are relatively low. In winter, most of the community’s electricity is produced by the CHP. Because of the low power-coefficient, the produced heat also follows the demand quite well. However, the electricity demand mainly occurs in daytime. Therefore, the community imports a lot of heat in the winter (see Figure 17a), as the CHP is not producing enough heat during night-time. The overproduction in late summer and autumn on the other hand is mostly stored in the TES and only small amounts are exported to the external DH grid. With PV and a CHP unit, the community is self-sufficient on electricity. However, the PV surplus in summer must be exported (see Figure 17b). The overall matching between heat load and supply in Figure 18a is rather good. Figure 18b shows a surplus of PV electricity in summer, indicating that a battery system could also contribute to this system.

Figure 15
Case 2.2 – CHP heat supply, CHP electricity supply and CHP final energy demand.

Figure 16
Case 2.2 – thermal storage balancing and thermal storage charging state.

Figure 17
Case 2.2 – external DH grid and external electricity grid.

Figure 18
Case 2.2 – total heat and total electricity data.
Case comparison
Table 2 shows a comparison of all calculated KPIs and some case-specific statistics. The heat demands for the first three cases (reference, 1.1 and 1.2) are identical. For the CDH cases (2.1 and 2.2), heat loads are higher despite the 40% SH demand reduction. This is because of the additional distribution losses of the CDH grid. Furthermore, the heat load of case 2.2 is higher than case 2.1 because of the TES. The local heat supply as well as local electricity supply and demand vary significantly, depending on the components included in the case.
Table 2
Case comparison – KPIs and statistics.
| KPI/CASE | UNIT | REFERENCE | CASE 1.1 | CASE 1.2 | CASE 2.1 | CASE 2.2 |
|---|---|---|---|---|---|---|
| Total Heat Demand | GWh | 2.098 | 2.098 | 2.098 | 2.128 | 2.314 |
| Total Heat Supply | GWh | 0 | 2.098 | 2.098 | 2.111 | 1.871 |
| Total Electricity Demand | GWh | 0.754 | 1.439 | 1.579 | 1.457 | 0.754 |
| Total Electricity Supply | GWh | 0 | 0.318 | 0.361 | 0.318 | 0.835 |
| Heat SCR | % | 0 | 100 | 100 | 100 | 95.62 |
| Heat SSR | % | 0 | 100 | 100 | 99.18 | 77.30 |
| Electricity SCR | % | 0 | 83.29 | 100 | 89.04 | 90.25 |
| Electricity SSR | % | 0 | 18.42 | 22.87 | 19.44 | 100.00 |
| Average Supply Temperature | °C | – | – | – | 79.19 | 79.19 |
| Average Return Temperature | °C | – | – | – | 52.35 | 52.35 |
| Annual Relative Heat Losses | % | – | – | – | 33.39 | 33.39 |
The trends of these energy statistics are also supported by the calculated KPIs. Since the reference case has no self-production of energy, all KPIs are 0. As the heat demand is matched perfectly, the heat SCR and SSR of case 1.1 are both 1. Because of the rather high electricity demand, the SCR of case 1.1 is 0.83. Nevertheless, the high mismatch of heat pump demands and PV supply yields a low electricity SSR of 0.18. For case 1.2, the heat SSR and SCR are also both 1. The SCR for electricity increased to 1 because of the additional EV demand and BESS. Furthermore, the BESS in case 1.2 increases the electricity SSR to 0.23. All produced heat in case 2.1 is consumed, leading to a heat SCR of 1. However, as the external DH grid supplies heat sometimes, the heat SSR is 0.99. The strong electricity demand and supply mismatch again leads to a low electricity SSR of 0.19. Because of the distribution losses of the CDH grid as well as a slightly lower SPF, the electricity demand of the central heat pump in case 2.1 is higher than the total demand of the decentral heat pumps for case 1.1. This yields a slightly higher electricity SCR for case 2.1 with 0.89. Case 2.2 is the most energy-balanced case according to the calculated KPIs. Since the CHP prioritizes electricity demand and is dimensioned to cover all of it, the electricity SSR for case 2.1 is 1. However, not all PV supply can be used locally, so the electricity SCR is only 90.25% for case 2.2. In summer, most electricity is supplied by the PV. Therefore, the CHP-unit produces electricity during summer-nights and in winter when PV production is low. This leads to a relatively good match with the heat demand. As large extents of this demand are covered by the CHP, case 2.2 yields a heat SSR of 77.30%. The TES in case 2.2 enables utilization of most surplus heat which results in a SCR of 95.62.
The fact that heat demands are identical for case 2.1 and case 2.2 means that the operation of the CDH grid is also similar for both cases. The average temperature in the main supply pipe from the heat supply unit to the CDH system is 79.19°C. The average system return temperature is 52.35°C. These temperatures are significantly higher than the target temperatures, as the algorithm ensures every building to receive 60°C for DHW sanitation and derives all other temperatures from this. The total annual relative losses for the grid are 33.39%. These high losses could be explained by multiple factors such as low heat load density, small overall grid size, sub-optimal pipe dimensioning and no consideration of twin-pipe setup as well as local recirculation loops. Furthermore, the buildings are energy efficient with substantially lower heat demand but paired with a 60°C target temperature for DHW sanitation. This yields higher relative losses as the heat demand is significantly lower while distribution losses might not be reduced as much.
Figure 19a shows total heat demand duration curves for all cases. The heat demands for case 1.1 and 1.2 are equal to the reference case. Therefore, the duration curves are identical and represented by the blue line in the diagram. This curve represents building heat demands and does not include any distribution losses. Both case 2.1 and 2.2 include local distribution losses as well as reduced heat demands due to energy efficiency measures leading to a more levelled heat demand with lower peaks and higher minimum demand levels. The TES of case 2.2 allocates some heat and yields storage losses, resulting in a slightly different and somewhat higher heat demand than case 2.1.

Figure 19
Case comparison – duration curves for total heat demand and external DH grid.
The dependence of the energy community on the external DH grid is shown in Figure 19b. The diagram shows duration curves for import and export of heat from the local system to the external DH grid. For the reference case this reflects building-specific DH demands without distribution losses. Cases 1.1 and 1.2 do not affect the external DH grid as they use heat pump systems. For case 2.1 and 2.2, the demands are central and include distribution losses. As expected, the reference case fully depends on import of heat from external DH. Case 2.1 imports less heat than case 2.2. This is because the CHP of case 2.2 is mainly focused on supplying electricity, leading to increased heat imports. Additionally, case 2.2 exports heat to the external grid for some periods when the TES is fully charged and there still is a surplus of heat.
Duration curves for total electricity demands can be seen in Figure 20a. The reference case and case 2.2 feature the smallest electricity demands as there are no electricity-based heat pumps or EVs in these cases. Interestingly, case 1.1 and case 2.1 are similar, even though SH demands in case 2.1 are reduced by 40% and both cases use heat pumps to supply most of the heat demand. However, the slightly lower SPF and CDH grid distribution losses of about 33.39% in case 2.1 replace a large share of the heat demand reduction.

Figure 20
Case comparison – duration curves for total electricity and external electricity grid.
Figure 20b shows the dependence on external electricity grids. Again, the reference case is completely dependent on the external grid as there is no local supply of electricity. Case 1.1, case 1.2 and case 2.1 are also importing electricity from the external grid for a majority of the time. This results from the electricity used in heat pumps. The PV systems in cases 1.1 and 2.1 generate a surplus of electricity for a limited amount of time which is exported to the grid. In case 1.2, the BESS stores all surplus electricity from PV production. Case 2.2 requires no import of electricity as the PV systems and the CHP unit supply the entire local demand. However, there is also a surplus of PV electricity that is exported to the grid in case 2.2.
Discussion
This section discusses different aspects of this paper concerning the used input data, the model and the results of the simulations.
Input data
As with every model, the results of the simulation depend on the input data. Although most of the input data is based on sound scientific backgrounds (see Table 1), some parameters are derived from assumptions. Furthermore, some data curation has been necessary, such as weather normalization and linear interpolations to cover missing data points. For this, simplifications such as constant DHW demands for all buildings including non-residential ones have been assumed. Additionally, some of the data is synthetic while some of it is real data. Overall, the input data comes from a mix of several sources. Nevertheless, as the objective of this study was to investigate a representative scenario, the data is considered adequate enough to represent the components and conditions within the virtual test bed community. Another aspect to note is that a large share of the input data is based on a specific location, in this case a city district in Uppsala, Sweden. Though general results may be valid for other locations, this needs to be considered.
Simulation model
The developed model allows for simulations and comparisons of multiple customizable energy community system designs. Case-specific results as well as case-comparisons are calculated and visualized, enabling thorough analyses of the simulation results. The KPIs for heat and electricity allow in-depth analysis of self-sufficiency and self-consumption of the investigated energy communities. Many additional components could be included to extend the model further.
However, there are limits to the simulation model. First, some components such as PV production and EV electricity demand are not simulated within the model itself but only incorporated in the form of pre-simulated, synthetic datasets. The model balances the components in the specific order according to Figure 2 and the descriptions in the Methodology section. Furthermore, the components algorithms are adapted to the conditions investigated in this study. This order and implementation of component simulations somewhat limit the abilities to investigate other situations, as components might be operated or function differently under other conditions. The model does not include a representation of a local electricity grid. Therefore, any potential limitations of local power transmission are not investigated. Implementing local power distribution could be a valuable extension of the model. Furthermore, the district heating distribution grid simulation is somewhat limited. All supply- and return pipes are considered to be individual pipes and not in twin-pipe setups. The pipe dimensioning might differ slightly from real networks and local recirculation loops within the systems are not incorporated. These methodological simplifications probably overestimate grid distribution losses to some extent. Additionally, flows of DHW and SH are not considered individually and as the data is on hourly basis, the real influence of short-term variations in DHW demand is not investigated. Coincidence factors have been used in the dimensioning of the service pipes to compensate for this. All aspects mentioned above influence the district heating simulations and must be considered when interpreting the results. Furthermore, the simulation model has not been validated yet. However, despite these limitations of the model, the investigations of this study provide interesting insights and implications regarding energy balances in local energy community solutions in Sweden.
Case comparison
Overall, it can be highlighted that the impact of energy communities on the overlaying energy infrastructures for heat and electricity strongly depends on the specific community system design and the included components.
Communities with decentral heat pump systems would benefit from implementing measures to match seasonal heat pump electricity demands to local PV electricity production. Such measures could include combinations of PV with BESS, CHPs and TESs. Other components not investigated here, such as local wind power plants, could also contribute to this seasonal matching. This is especially important for countries in northern regions, such as Sweden, where PV electricity production significantly drops in winter. Without additional measures, PV and HP based communities might strain external power grids because of a high mismatch of electricity supply in summer and demand in winter as visible in case 1.1 and 2.1.
For communities based on central heat supply and distribution via a CDH grid, high relative losses might occur because of several reasons such as small system size and low heat demand density. Furthermore, energy efficient buildings coupled with relatively high temperature demands for DHW sanitations might lead to increased relative losses, as the absolute losses do not reduce as much as the heat demand. As visible in case 2.1 and 2.2, these high losses can significantly influence the energy balances and decrease the positive effects of energy efficiency measures in buildings as well as advantages of district heating systems. Therefore, additional focus should be on designing and operating the heat distribution grid efficiently. Furthermore, alternatives for DHW sanitation, such as individual building solutions, should be investigated. Communities with central heating solutions that do not perfectly match the heat demand might also strain external DH grids, as these might have to absorb excess heat in summer and provide peak supply in winter.
Conclusion
The aim of this study was to develop a test bed to simulate and analyze the dependence of different energy community systems on external infrastructures for heat and electricity. Both research questions formulated in the beginning were answered for five cases of possible energy communities. The results indicate that communities based on decentral heat pumps can eliminate their heat demand from the external DH grid. However, a combination of only heat pumps and PV can increase the mismatch of electricity supply and demand, potentially straining external distribution grids. Systems with community-based heat distribution could still rely on imported heat from external DH for peak loads. With a central, power-focused CHP, external DH grids also might have to absorb excess heat. The interaction and dependence of energy communities on overlaying energy infrastructures highly depends on the community’s components and system-design. To maximize self-sufficiency and self-consumption of electricity and heat, components should be designed to balance variations in supply and demand. This is a common challenge with renewable energy and especially critical for small systems. Therefore, energy community design choices should be investigated thoroughly concerning their implications for overlaying infrastructures before implementation. The developed model is mainly limited by simplifications in algorithms as well as input data from a mix of sources. In the future, the model can be improved further to include more sophisticated algorithms and components. Ideally, future research on this topic should also include economic optimizations as well as environmental impacts of different components. Nevertheless, this model allows for investigations of important and relevant cases of how local energy systems can be designed to contribute to future sustainable and robust energy systems.
Additional File
The additional file for this article can be found as follows:
PowerPoint Slides
PowerPoint Slides relating to this article. DOI: https://doi.org/10.66506/essp.5-006-26.s1
Data Accessibility Statement
Data can be made available upon request.
Author Contributions
Davide Napolitano: Conceptualization, Methodology, Software, Visualization, Writing – Original draft preparation, Writing – Review & Editing, Formal analysis. Erik Hooft: Resources, Validation, Formal analysis, Reviewing and commenting on written draft. Magnus Åberg: Conceptualization, Writing – Review & Editing, Project administration, Formal analysis.
eceee Paper ID
5-006-26