District heating network modelling for future integration of solar thermal energy

A key advantage of district heating networks is their ability to integrate different renewable energy sources, from geothermal to solar. However, the success of this integration depends on a variety of design and technical decisions, such as feed-in locations or operating temperatures, which need to be compared and analysed. For this purpose, dynamic models of district heating grids, which allow for an hourly representation of the thermodynamic conditions, are necessary. This type of models are nevertheless still uncommon, drastically limiting options to perform these comparisons accurately. To address this challenge, an open-source tool to model district heating networks is presented here and successfully applied to two case studies in western Switzerland. These simulations are then used in conjunction with simplified models of storage and solar thermal collectors to investigate, in a preliminary way, the impact of solar thermal integration on the mass flow and temperature of the network pipes, illustrating the interest of the proposed method to compare different configurations of renewable heat injections in district heating networks.


Introduction
Increasing the share of renewable energy in residential heating systems (24% of the national greenhouse gas emissions in 2018 [1]) is essential to achieve the goals of the Swiss 2050 Energy Strategy, notably a net zero greenhouse gas emissions balance [2]. This requires decisive action in urban areas, where the bulk of the consumption is located. In particular, a major expansion of district heating networks (DHN) is necessary, as these centralized systems allow the sharing and optimisation of different renewable energy sources such as solar, geothermal, or waste heat [3]. These sources are often characterised by a low flexibility, which complicates the management of DHN after integration and creates a need for a more detailed planning than before. However, current techno-economic planning tools generally do not allow to analyse the impact of renewable integration on the whole network, especially on the temperature distribution in pipes. This information is nonetheless important to better understand the possibilities of integrating a specific renewable energy source and to optimize grid operation, for example by evaluating the impact of a substation or a solar panel on the return temperature, which is an important variable to reduce ground heating loss. In this study, this challenge was addressed by developing a framework for modelling DHN, including the thermodynamic state of the pipes, the production of the heating plant, the consumption at the substations, and different heat injection configurations. This open-source framework was then applied to two case studies in Switzerland, keeping an eye on the future integration of solar thermal energy. In both cases, the DHN is modelled in hourly time-steps and validation is done by comparing the model outputs with return temperature measurements.

Methods and Tools
Three connected models are used to simulate the system under analysis: A DHN model which is the focus of this study, and a solar gain model, including a simplified solar thermal panel model dynamically adjusting its exit temperature as well as a storage model. An open-source mapping tool (QGIS) is used to share model inputs between the different components.

DHN model
The DHN model presented here is derived from the Pandapipes Python module [5]. This module is designed to simulate multi-energy networks, based on an existing power grid model, and is applied here for one of the first time on realistic case studies. It can operate in two modes, usually used sequentially: a hydraulic and a thermal mode. The different network elements such as heat sources, heat exchangers, pipes, and valves are represented explicitly through a set of equations (hydraulic and thermal) that are solved using the Newton-Raphson method [6]. The main elements needed to build a DHN model are : • The pipes, which are represented by their position, length, diameter, and loss coefficients, both thermal and hydraulic. • The substations, which are a key component of the model as they represent the consumers.
They consist of a heat exchanger element paired with a valve. The main input here is the hourly heat consumption. Pressure loss and mass flows derive from the developed DHN model. • The source element, which represents the central heating plant. Input parameters are the mass flow, pressure and temperature of the fluid at the source location. Heat exchangers are used to represent alternative heat sources.
The main model outputs are the thermodynamic properties of the fluid in the network pipes (mass flow, pressure, and temperature).

Irradiation, storage, and solar thermal panel models
The hourly irradiance is simulated using the CitySim software [4], taking into account the different buildings in our study area, the surface albedo, and meteorological data. The solar panels are placed on available roof space and the collector efficiency is modelled using the European Standard EN 12975 [7]. A model of a well-mixed water storage tank with a temperature-dependent loss coefficient is used in this simulation.

Goodness-of-fit indicators
To assess the model's quality, this project uses the Kling-Gupta Efficiency (KGE, equation 1) [8], a normalised indicator that accounts for both offset and bias of the model result: where r is the linear correlation between measured data m and simulation s, σ is the standard deviation and µ the mean. A score of 1 means that the model perfectly reproduces the measurements and a score above 0 means that the model gives a better prediction than the measured average [8].

Case studies
Two biomass-based DHN situated in western Switzerland serve as case studies. The first one is the Marais-Rouge, located in Ponts-de-Martel in the canton of Neuchâtel. It was build by a cooperative in 2007 with one heating plant composed of two boilers of 1 MW and 1.25 MW respectively. At the end of the study period (2019), 86 buildings were connected. The Marais-Rouge DHN is a fairly simple network: with only one plant, it is structured like a tree ( Figure  4), and therefore the pipe diameters are decreasing from the source to the further pipes. The annual ground temperature is considered to be constant around 10°C.
The second study case is the DHN of Verbier (Wallis). Its particularity as a ski-resort is the population disparity between seasons, with 2'700 yearly residents rising to 35'000 during winter, resulting in a strong increase in heat consumption in winter. The network is organised around two heating plants (Mondzeu and 3-Rocs), respectively of 2 MW and 3.2 MW capacity. The 3-Rocs plant is fueled by wood pellets, and the Mondzeu plant by oil, generally used for consumption-pikes smoothing for about 200 hours per year. The simulation period is January -May 2019. Soil temperature is set to 3°C to reflect the mountainous conditions of this case study and the simulation period.

DHN modelling process
The DHN modelling process is divided in three stages: determining the hourly heat consumption, calibrating the substation model, and finally evaluating the hydraulic and thermal conditions. Each stage is tailored to the case studies based on data availability.

Hourly demand for the Marais-Rouge case study
For the case study of Marais-Rouge, measurements of the hourly (Q p,h ) and monthly (Q p,m ) heat production at the central station are available, as well as monthly heat demand (Q b,i,m ) at the different substations. However, the hourly heat demands at the different substations (Q b,i,h ) are also necessary for the model. To obtain this missing input, it is assumed that a building heat demand represents a constant fraction of the total network demand for every month (equation 2). The heat demand model takes into account the seasonality of the heat demand, the average behavior of the occupants, and the daily profile from the production plant.
This heat demand model is evaluated on hourly measurements performed on a few buildings between 2008 and 2018. For the majority of the buildings, the model well represents the dynamic of the heat demand with 73% of the buildings having a KGE above 0.4 (satisfactory) and 20% above 0.7 (very efficient). However, 18% of the buildings have a KGE below 0, showing the limits of the model, which by design represents well the total heat demand but which simplifies the demand dynamics at the substations, especially the ones with a small demand.

Calibration of substations for the Verbier case study
For this case study, hourly heat demands and mass flow rates are measured, and therefore the substation models can be directly calibrated. The heat consumed at these substations is linearly related to the mass flow (Q =ṁC p ∆T , with ∆T often fixed). This expected mass flow can however be difficult to measure, and therefore it is interesting to rely on a calibrated substation model that extracts the expected flows from the building's consumed heat.
The calibration is conducted by extracting two coefficients (a, b) from the equationQ = aṁ+b for each season. The coefficients are calibrated on the first two months of each season, and the validation is carried out on the third month using the KGE criteria. This application highlighted  In Marais-Rouge, as the parameters a and b could not be adapted from the monitoring, they were chosen based on the Verbier case study. The two first stages of the model are now completed, therefore the next step is the hydraulic convergence.

Hydraulic convergence step for both case studies
Modelling the network flow distribution accurately is crucial for the thermal simulation, which is the key aspect to evaluate DHN efficiency (heat losses, heat plant efficiency). To adjust this flow distribution, a convergence step is necessary since the expected mass flow in the substation is not set directly, but is computed through a parameter representing the valve configuration.
The convergence tool's logic is to compare the expected mass flow and the one given by the DHN model at every substation. In case of a difference, the opening of the substation valve is modified. This loop is repeated until one of the convergence criteria is met: either if the relative error at every valve <10%, or the mean relative error of all valves¯ <3%, with =

Comparison between model outputs and measurements
To evaluate the quality of the simulation presented above, the model outputs are compared with the hourly measured return temperature, using the KGE criterion. To visualize the results, two 7-days periods for each case study are selected, one period with a strong heat consumption and one period with a lower heat consumption during a warmer season (Figures 2 and 3). For the simulation period, the KGE criterion is 0.86 for Marais-Rouge (2019) and 0.35 for Verbier (January to May 2019).
In the case of Marais-Rouge (Figure 2), the measured return temperature is well reproduced by the model, although with a slight overestimation during winter, possibly because ground temperature is assumed constant in the current modelling framework. For Verbier (Figure 3),  in winter, the modelled return temperature is generally close to the measurements even if the variability is overestimated. On the contrary, in spring, a period where heat consumption is lower and heating loss is proportionally more important, measured return temperature are not well represented by the model at the hourly timescale even if average thermal behaviour is still well captured. The results are obtained whilst not knowing the thermodynamic conditions of the auxiliary heat plant in Verbier. A more detailed model of ground heating loss would be needed here. This fact lowers the KGE in this case study, but the model still perform acceptably during winter and during spring using averaged outputs.

Outlook toward application
Using the models presented previously, we implement sources of renewable energy at different location of the networks to study the impact of solar thermal collectors on return temperature.
Since the different components of a solar thermal system such as the storage are still very simplified in this study, only one time step of the study period is presented. The Figure 4 shows the impact on the return temperature of the injection of the production of 4000 m 2 of solar panels for the 08. 09 solar collectors outproduce the wood-based heat production, which is therefore turned off. The entry temperature is higher than in the actual setting (408 K compared to 343 K), which means that some heat will contribute to reheat the storage tank.

Conclusion
To support the future development of DHN models, which are necessary to plan and optimize renewable heat systems, a simulation procedure is presented here and is applied to two DHN, a relatively simple network (Marais-Rouge) limited in data availability, and a more complicated one (Verbier) with more data available. Both models generally reproduce well the measured return temperature, which is a variable influenced by the thermal and hydraulic network conditions. However, a more accurate ground loss model would be necessary to represent of the detailed dynamic of the summer return temperature.
As it stands, the only inputs of the DHN model are the network geometry, the hourly or monthly consumption data and the heat plant data, all three which are often available to DHN operators. The model can therefore be used in conjunction with models of heat production systems such as solar thermal collectors, to compare different configurations of heat injections and to develop control strategies to improve network management. These types of simulations, which are of high interest for DHN managers, are made possible by the presented work.