# Design Optimization of a District Heating Network Expansion, a Case Study for the Town of Kiruna
## 3 Methodology
### The Model of the District Heating Network  
The strategy proposed in [10] to build the model of a complex meshed DH network in the MATLAB/Simulink environment is simple and powerful at the same time. Its strength is given by the modularity of the approach, with a small number of block types (pipe, node, user area, heat production site) that can be combined into a custom diagram in a very flexible way, even for the most complex layouts.  
A detailed numerical representation of the behaviour of a meshed DH network requires the calculation of the local pressure and temperature of the water at all network piping junctions. In fact, these are fundamental to determine the mass and heat flow rates in the network, which are in turn affected by pressure drops and thermal losses in the pipes. The model takes into account all these aspects without any major simplification to the physical nature of the phenomena. This is essential to evaluation of the terms by which the operating costs of the DH network depend, i.e., the pumping power required to make the water circulate in the network, and the fuel consumption at the heat production sites (the total heat generated has to be equal to the overall demand of the users, plus thermal losses along the network piping).  
The reader is referred to [12] for a detailed description of model blocks, the interaction among them and the equations that are solved inside each block type. It is worth reminding here that the main idea behind the model is the exchange of information between the blocks in which mass and heat flows are calculated as a function of local pressures and temperatures (pipe blocks of course, but also user area blocks and heat production sites), and the blocks in which the local pressure and temperatures are determined as the values resulting from the balance among mass and heat flows (node blocks).  
Thanks to the modular nature of the model, the implementation of network expansion was straightforward. All the pipe segments of the superstructure shown in Figure 4 were added to the model of the DH network in Kiruna already used in [12], as well as to the intermediate junctions and the five new user areas. A heat production site block was also added at the North East corner of the southeastern loop of network to represent the new bio-oil boiler. Comparing the number of blocks of each type with the model used in [12], the model for the expanded DH network in Kiruna consisted of six plus one heat production site blocks, 85 + 25 pipe blocks, 75 + 12 node blocks and 44 + 5 user blocks.  
The lengths of the new pipes are set, but not their diameters, which are received as inputs from the optimization algorithm when a particular design solution is evaluated (except for the 400 mm pipe that has already been built). In case a pipe does not exist in that particular design solution, its mass and energy flows at inlet and outlet are set to zero so they do not contribute to the balances in the junctions at pipe ends. The capacity of the new bio-oil boiler is also set according to the particular design solution evaluated by the optimization algorithm.