District Heating Network Design and Configuration Optimization with Genetic Algorithm

In this paper, the configuration of a district heating network which connects from the heating plant to the end users is optimized. Each end user in the network represents a building block. The connections between the heat generation plant and the end users are represented with mixed integer and the pipe friction and heat loss formulations are non-linear. In order to find the optimal district heating network configuration, genetic algorithm which handles the mixed integer nonlinear programming problem is chosen. The network configuration is represented with binary and integer encoding and it is optimized in terms of the net present cost. The optimization results indicates that the optimal DH network configuration is determined by multiple factors such as the consumer heating load, the distance between the heating plant to the consumer, the design criteria regarding the pressure and temperature limitation, as well as the corresponding network heat loss.


INTRODUCTION
District heating (DH) benefits from economy of scale with mass production of heat from central heating plants.It is an energy efficient and environmentally benign solution when compared with decentralized heat generation.In many countries, district heating has been actively promoted as an important component in the national strategic energy planning [1].
A DH system includes heat generation, distribution and utilization.The heat generated in a heating plant is delivered through the DH network to the end users.Due to the high investment and the long payback period, successful implementation of a DH system requires deliberated design, good maintenance and economical operation.
Optimal planning of the DH system has been arousing great interest in recent decades.Numerous optimization works have been carried out which focused on different aspects including the DH plant configuration optimization [2], the optimal dispatch in a DH plant [3], the search for an optimal mix of renewable and non-renewable based energy supply in the DHC (district heating and/or district cooling) network [4] and in the urban energy supply infrastructure [5], as well as the search for the desirable mix of building types with diverse daily heating/cooling load patterns [6], etc.Furthermore, the optimal planning of DH in the future renewable-based energy system has been investigated through the integrated energy planning approach to evaluate the entire energy system including heating and electricity generation as well as end user energy consumption and energy savings [7].
In a DH system, the DH pipeline cost accounts for a significant part of the whole system investment.The optimal routing of the DH pipeline and the optimal pipe diameter based on the design and operation conditions are essential to achieve economic savings and energetic/exergetic consumption reduction.Kalinci et al. determined the optimal DH pipe diameter for a geothermal plant by solving the derivative of the formulated objective function [8].Li et al. applied the genetic algorithm to find the optimal DHC network pipe diameter for a seawater-source heat pump plant [9].The optimal DH network configuration has been studied by several researchers.Chan et al. [10] studied the approach to find the optimal routing in a DC system using the genetic algorithm.Dobersek and Goricanec [11] performed optimization work with non-linear programming based on Simplex method to find the optimal routing and pipe diameter in a tree-structured DH network.Soderman [12] formulated a mixed integer linear programming problem to find the optimal production and storage unit locations and the DH pipeline connection.
In this paper, the configuration of a DH network is optimized based on a low temperature DH (LTDH) system with a network supply/return temperature at 55 o C / 25 o C. The LTDH concept carried out in Denmark utilizes a network supply temperature close to the end user required temperature at around 50 o C [13].The reduced network supply temperature has the advantages to reduce the network heat loss, increase CHP plant power generation capability, and utilize waste and renewable heat in various spectrums.In the analysis, the influence on the optimal network configuration due to the hydraulic and thermal constraints is emphasized through detailed network hydraulic and thermal modelling.

NETWORK HEAT LOSS
In the existing literature, the DH network design and configuration optimization works have mainly formulated the objective function as the summation of pipeline investment and the pumping cost.The heat loss along the DH network, however, was often neglected in the network routing and pipeline diameter optimization process.Depending on the DH network supply/return temperature, the pipeline diameter and length, the network heat loss may account for a significant part of the total network input energy, and thus plays the role in determining the optimal network configuration.This can be illustrated in the following example.
As shown in Figure 1, there are two possible connection routes between consumers B, C to the heating plant A: route AB-BC and route AC-CB.The following assumptions are made regarding the heating demand and the network geometry: (3) (4) (5) Though the total length for route AB-BC is longer than that of AC-CB, due to the larger diameter, thus higher heat loss in section CB than that in the section BC, the incurred operational cost is higher in route AC-CB, which may exceed the economical saving due to the shorter pipe length.During the season with low heating demand as in the summer when the heating load only comes from the domestic hot water demand, the temperature drop due to the reduced network flow rate makes the supply temperature at the consumer end lower than the required value.In this case, extra flow is required from the plant to compensate the temperature drop through the thermal by-pass system.The by-pass flow will increase the return water temperature thus further increase the network heat loss [14,15].This situation becomes worse for the larger pipe diameter than the smaller pipe diameter.Therefore, the network heat loss and the heat loss due to network thermal by-pass should be counted in the identification of the DH network optimal configuration.

PROBLEM DESCRIPTION
The DH network is designed with one heating plant and 10 end users.Each end user in the network represents a building block.The topology of the heating plant and the end users are shown in Figure 2 where the circle represents the heating plant and the squares represent the end users.
The DH network is designed with twin pipes with the supply and return pipes placed in the same casing.Based on the market available products [16], two different types of twin pipes are considered in the simulation: AluFlex multilayer flexible pipe and straight steel pipe.The AluFlex is a multi-layer 'sandwiched' type pipe containing aluminium and PEX (cross-linked polyethylene) which has the advantages both of flexibility and durability.The DH pipes are selected from continuous dimension ranging from Alx14 to 32 for AluFlex pipe and DN 32 to DN80 for straight steel pipes.Table 1 shows the pipe inner diameter, roughness and the unit price.The heat transfer coefficients under different ambient temperatures are calculated with the analytical solution developed from the multi-pole method [17].In order to reduce the pipe geometry, the pipeline is designed with network supply temperature at 70 o C instead of 55 o C, by assuming that the plant is able to temporarily supply the network at higher temperature during the design peak heating load condition.
The design heating load for each building block is shown in Table 2.The annual heating load is divided into 8 periods.The load factors are assigned to each period, as shown in Table 3.

Objective function
The aim of the network configuration optimization is to find the optimal network pipeline connections and optimal pipe diameters so that the total investment and operational cost can be minimized.The net present cost (NPC) value is formulated as the objective function.The technical lifetime and the depreciation time are 30 years for the DH pipe and 20 years for the main pump.The interest rate is set as 6%.
The annual operational cost includes the cost due to network heat loss, the pumping power cost, the maintenance cost and the emission cost.

∑
The unit prices for the heating and electricity are $59/MWh and $108/MWh, respectively, according to the average value between 2010 and 2030 in Danish conditions [18].Similarly, the CO 2 emission cost is $37/ton with the emission factors 177 kg/MWh for DH and 862 kg/MWh for electricity at the end user [18].The DH maintenance cost is taken as $2.3 per MWh heating energy production [19].
The annual operational cost is converted to the NPC through the discount factor: According to the design flow rate, the Grundfoss CRI 15-9 is selected.Two pumps will be used during the DH system lifetime with $4,025 per pump [20].The pipeline cost is shown in Table 1.The NPC is the summation of total investment cost and the total annual operational cost expressed as the present value.In order to calculate the pipe investment, the connectivity between two different nodes in the network is represented by the binary decision variable x i,j .

Constraints
The objective function is subjected to the constraints of network hydraulic and thermal conditions, the network maximum allowable pressure and temperature drop, the pipeline maximum allowable velocity and the available commercial pipeline diameters.
∑ ∑ (13) Equations 9-11 show the mass continuity and hydraulic balance in the network.A is the incident matrix determined by the network topology.As the studied network has a tree-shaped structure, A is a square matrix( ) ( ).M is the column vector for pipeline flow rate.Q is the column vector for the flow rate at each node.P h is the vector to describe the pump head.S is a diagonal matrix with an order (n-1) which represents the friction coefficient for each pipeline.
No isolated loop is allowed in the network and the number of pipes equals n-1.Eq. 14 is formulated to prevent the isolated loop so that each node connects at least once with other nodes.According to the constraint in Eq. 15, the flow direction is enforced as positive according to the encoding scheme presented in Table 4.The network is designed with 10 bar limit and the plant holding pressure is set as 2 bar.The pressure drop at each end user is assumed as 2 bar.The maximum allowable network velocity is set as 2 m/s which gives the constraint in Eq. 17.The velocity in each pipe section is initially set as 1 m/s and is adjusted to maximally exploit the allowable network pressure drop at each separate route.
The network supply temperature at each end user is ensured through the inequality, Eq. 18.An iterative approach is adopted to gradually increase the network mass flow rate until the supply temperature at the end user exceeds the set point by-pass temperature.The DH pipeline is selected from the market-available commercial products.The product which has the diameter that is larger and closest to the calculated pipe diameter is selected as the design pipe diameter.The network supply temperature at each end user is ensured through the inequality, equation 18.An iterative approach is adopted to gradually increase the network mass flow rate until the supply temperature at the end user exceeds the set point by-pass temperature.The DH pipeline is selected from the market-available commercial products.The product which has the diameter that is larger and closest to the calculated pipe diameter is selected as the design pipe diameter.

OPTIMIZATION APPROACH
Figure 3. Flow chart for district heating network configuration optimization shows the flow chart for the DH network configuration optimization.The connection between the heat generation plant and the end users can be represented with mixed integer and the node head and temperature are formed as non-linear.In order to find the optimal DH network pipeline configuration, optimization algorithm that handles the mixed integer nonlinear programming problem is chosen.
The Genetic Algorithm (GA) is applied to find the minimum NPC based on the design and operational conditions.The GA is inspired by Darwin's theory to mimic the process of natural evolution.It is a stochastic search algorithm to find the optimal or near optimal value through successive selection, mutation and reproduction.It has been widely applied in recent years for energy system optimization [9,10,21].
The pipe network configuration is encoded as a vector of integers.The length of the vector equals the number of pipes which is n-1.Each integer in the vector represents a uni-directional connection between two different nodes.The integer is numbered in a sequential way from 1 to maximum (n-1) 2 .

RESULTS AND DISCUSSION
Figure 4 shows the optimal position of the heating plant and its connections with each consumer node.The plant position moves from the initial location (0, 0) to the location (3,3).Table 5 shows the information of the network.The pipe types range from Alx 20 to Tws-DN40 with a total length of 1927 m.The maximum network velocity is 1.38 m/s in the pipe section 9.The optimized DH network includes 6 separate routes.Figure 5 shows the pressure head distribution at each consumer node along different routes.A small velocity limit is pre-assumed for each pipe as the initial guess value to calculate the pressure distribution at each node.The allowable network pressure drop is exploited by continuously increasing the velocity limit in the pipelines until the pressure drop from the plant to the critical user (who has the lowest supply pressure head at the network) exceeds the allowable network pressure drop.The minimum pressure head occurs at node 1 which is the critical user in the optimized DH network.The temperature along the network drops due to the pipeline heat loss to the ground.When there has no thermal bypass at the end user, excessive temperature drop may occur during low heating load seasons and makes the supply temperature at the consumer node lower than the minimum required value.In the study, a set-point temperature of 52 o C is assumed.
As shown in Fig. 6 (top left), without thermal by-pass, the supply temperature at some consumer node drops below 47 o C in the low heating load seasons.By using the by-pass, the minimum node supply temperature is raised to higher than 52 o C (Fig. 6: top right).However, as the by-pass water does not go through the consumer heating units, but instead flows back to the return line and mixes with the return water directly, it will increase the return water temperature.Fig. 6 (bottom left) shows the return water temperature at each consumer node.When the by-pass is used, the return water temperature at some consumer node reaches as high as 45 o C.This increases the heat loss along the return pipe.In this study, the network heat loss due to increased network return temperature does not change the network configuration.However, it is worth knowing that the DH utility prefers large network temperature difference and sometimes imposes fines on consumers who have high network return temperature.Considering such extra cost into the objective function, it might be possible to change the network connection to a configuration which results in lower network return temperature or less use of the thermal by-pass.

CONCLUSION
The genetic algorithm is applied to find a DH network optimal configuration based on the design and operational conditions.The possible routes between two nodes are represented as integers and the existence of the connection is determined through a binary decision variable.The algorithm optimizes both the pipe connections and the position of the heating plant.The NPC is formulated as the objective function to be minimized, subjected to the network hydraulic and thermal constraints.
The effect of thermal by-pass is analysed.Thermal by-pass increases the return water temperature and thus causes extra network heat loss.In the analysis, this extra heat loss does not influence the optimal DH pipe connections.However, additional cost due to fines on excessive high network return temperature may change the optimal network configuration.

Figure 1 .
Figure 1.Example for pipe heat loss influencing on the network configuration Furthermore, the DH network is designed based on the design winter condition.During the season with low heating demand as in the summer when the heating load only comes from the domestic hot water demand, the temperature drop due to the reduced network flow rate makes the supply temperature at the consumer end lower than the required value.In this case, extra flow is required from the plant to compensate the temperature drop through the thermal by-pass system.The by-pass flow will increase the return water temperature thus further increase the network heat loss[14,15].This situation becomes worse for the larger pipe diameter than the smaller pipe diameter.Therefore, the network heat loss and the heat loss due to network thermal by-pass should be counted in the identification of the DH network optimal configuration.

Figure 2 .
Figure 2. Topology of the heating plant and end users

Figure 3 .
Figure 3. Flow chart for district heating network configuration optimization

Figure 4 .
Figure 4. Optimal district heating network configuration

Figure 5 .
Figure 5. Pressure distribution along each route

Figure 6 .
Figure 6.Temperature variation at different consumer nodes.Top left: Supply water temperature without by-pass Top right: Supply water temperature with by-pass Bottom left: Return water temperature with by-pass

Table 1 .
Available commercial district heating pipes

Table 2 .
Building design heating load

Table 3 .
Building heating load factors

Table 4 .
DH network configuration encoding

Table 5 .
Information on network configuration