Minimization of Heat Losses in District Heating Networks by Optimizing their Configuration

. The objective of this work is to elucidate the mathematical foundations for optimizing the configuration of district heating system networks. Existing and most effective approaches to optimizing thermal networks based on minimizing heat losses were analysed, and principles and corresponding mathematical tools were proposed to account for objective technical constraints imposed on these district heating networks by regulatory requirements, both at the technological and urban planning levels. The goal is achieved by solving the problems of modeling the coordinates of nodes and the lengths of sections of thermal networks using instrumental means to determine the most rational positions of the branching nodes in terms of their coordinates to identify economically viable directions for laying each fragment of the corresponding networks. To make the proposed approach to optimizing thermal networks practical, additional mathematical tools must be introduced to account for specific urban planning conditions and constraints imposed on heating systems, which must be considered in the design process. The most important results are the obtained mathematical model of the district heating network, which allows for considering the actual technical conditions for connection to the networks and urban planning conditions and constraints. The significance of the results obtained is that the application of the developed algorithm allows not only to reduce the total heat losses during the transportation of the heat carrier from heat sources to consumers but also, as a consequence, to increase the energy efficiency level of the entire heating system, reduce primary energy costs, and greenhouse gas emissions.


INTRODUCTION
Currently, district heating systems are operating and actively maintained in most cities in our country, as well as in other developed countries around the world.
Unfortunately, the equipment and networks of engineering systems are largely outdated, and some fragments require ongoing maintenance, major repairs, re-equipment, or even complete replacement, depending on which of these measures is economically more justified.Generally, restoring the initial (or sufficient for effective functioning) performance of engineering systems requires significant resources and labor efforts from the employees of the housing and communal services and construction and installation organizations that maintain them.Consequently, the more well-thought-out, compact, efficient, and resilient the heating networks are, the less likely they are to fail prematurely and the lower the maintenance costs related to the physical wear and tear of individual sections, equipment, and the system as a whole.All this underscores the necessity of a detailed assessment of the cost and efficiency of each stage of the life cycle of heating systems, namely: 1) Design; 2) Construction; 3) Operation; 4) Dismantling, re-equipment, or modernization/upgrade; 5) Disposal or reuse of building materials, products, and equipment.A comprehensive assessment of each stage of the life cycle of heating systems leads to an improvement in their economic, environmental, and social performance, which fully aligns with the principles of sustainable development and allows for achieving its main goals.In practice, this requires always prioritizing the optimization of all technical solutions based on the percentage distribution of their implementation costs at each stage.
The fact is that some technically more rational solutions for one stage, for example, the construction stage, may prove to be completely inappropriate and even destructive for the operation stage in the long run.Therefore, the highest priority should be given to optimizing those solutions and at those stages that are the most costly concerning the percentage distribution throughout the entire life cycle.
It is evident that the optimization of all solutions should be carried out during the design stage, as any changes in design decisions are least expensive at this stage.Considering this fact and analyzing the cost volumes at different stages of the life cycle of heating systems, it becomes apparent that the most attention should be paid to optimizing those technical solutions that may reveal their shortcomings and significantly impact the operation period of the respective systems.
Overall, optimizing the routing plan of the pipeline system can reduce the cost of construction materials and installation work.However, the indicators of heat energy losses in the pipelines of the heating system during operation are equally important.The magnitude of these losses significantly depends on the temperature of the heat carrier, the method of pipeline installation, their diameters (or other parameters of the cross-sectional shape), and the configuration of the respective sections of the system, which affects the overall length of the pipelines.
It is evident that the coordinates of the thermal network nodes are one of the key factors determining the overall economic justification and sustainability of the heating system.However, its level of energy efficiency should also be formed considering the specific heat loss indicators.Specific heat losses largely depend on the installation method, which in turn depends on urban planning conditions and constraints imposed on the thermal networks.
Therefore, it is relevant to conduct research on the factors that should shape the general principles of optimization and impose constraints on the design decisions of heating systems, as well as to determine the mathematical foundations for modeling the configuration of this system, considering these factors.

METHODS, RESULTS, AND DISCUSSION
As noted in the authors' previous works, the design process of energy-efficient heating systems (as well as the design process of any buildings and structures) should involve a significant reduction or minimization of the costs of construction materials needed for their construction, the expenses for further operation, as well as the heat losses of all pipeline sections, considering the method of their installation and the physical properties of the primary and insulating construction materials.Solving this task requires the application of the instrumental base of classical optimization methods, which allows selecting the best option from all possible construction designs.In general, heat loss minimization in heating systems can be achieved in two ways (or their combination): 1) At the stage of comprehensive system planning by applying and optimally combining systems of different temperature levels for the respective consumers to achieve high exergy efficiency of the heating system as a whole.
2) At the generation stage by using the most modern heat-generating equipment and engineering equipment (including boilers, alternative energy sources, automation, and control systems) and implementing measures aimed at improving the efficiency of this equipment and the system as a whole (including the use of specialized software and fuel composition optimization).
3) At the transportation stage by optimizing the configuration of the pipeline layout (supply and return) and enhancing their thermal insulation properties.
The first and second of the aforementioned approaches require the implementation of innovative energy generation technologies and deep utilization of thermal energy at all stages of its production.
The second approach can be realized by using mathematical optimization tools for the configuration of the interconnected pipeline system as a discrete model, the parameters of which depend on linear heat losses.
It is worth noting that the use of optimization tools is most appropriate at the stage of creating design documentation, as this stage is the least costly and can help prevent a number of future problems related to operational costs and physical energy losses at all subsequent stages of the heating system's life cycle.
Overall, optimizing specific objective functions and applying them to system models (particularly in orthogonal coordinates) is a common method for solving engineering problems and is highlighted in a number of modern studies by authors such as Li, Dorfner, Mertz, Blommaert, Hirsch, Pompei, and Sarbu [1 -7].
In a closely related study, researchers Lambert and Spliethoff [8] presented a method for finding the optimal topology of the thermal network, pipe sizes, and operational parameters of the district heating system, considering a single design point, and provided a methodology for applying this method to an existing fragment of a thermal network serving 400 consumers.It should be noted that this study, in addition to heat losses, addresses the equally significant issue of pressure losses in thermal networks, which directly affects the operation of network pumps.
A similar approach, but for low-temperature district heating systems, is discussed by Buonomano in [9].The focus is on a thermodynamic model for designing 5th generation district heating and cooling systems, which are actively being developed and studied by researchers such as Qin, Buffa, Wirtz, Gong, and Calise [10 -14].
Any optimization process implies the existence of a certain objective function, the extreme values of which will be found through geometric or numerical modeling, including considering the imposed conditions and constraints, which are also represented as mathematically formulated functions.In the case of optimizing the configuration of thermal networks, particularly the coordinates of nodes, it is advisable to take the total value of all heat losses occurring along the entire length of the heat pipelines as the objective function.
When determining the heat flow through insulated pipelines, additional heat losses through flange connections must be considered by increasing the nominal length of these pipelines, as emphasized in the works of He and Lebedev [15,16].It is also necessary to take into account the increase in heat losses in the form of increased heat flow through pipe hangers and supports.This heat flow is also accounted for by increasing the nominal length of the heating networks.
The total heat flow  Σ , in watts, through insulated pipelines of the district heating system can be determined by the formula: where ql is the linear heat flux, W/m; L and LNOM are the calculated and nominal lengths of the pipeline, m; LADD (additional) is the additional length of the insulated pipeline, equivalent in terms of heat flow to the fittings and flange connections installed on the pipeline, m; KSUP (support) is a coefficient accounting for increased heat losses through supports and hangers.
The process of minimizing heat losses should involve minimizing the total heat flux across all sections of the district heating system: min If we write the expression to find the heat flux of an elementary straight section of pipeline between the і -th and j -th nodes according to Formula (1): where i,j and NOM i,j are the calculated and nominal lengths of the straight section of pipeline between the і -th and j -th nodes.
In this case, the condition must be satisfied: Using equation ( 3), the heat flux across all r sections of the district heating system can be written as the sought objective function (x, y), identical to the total heat flux (2): In order for the necessary condition of existence of an extremum of the local function (x, y) to hold for each і-th node, the first derivatives with respect to the variation parameters (i.e., coordinates xi and yi) must equal zero.This means that the node coordinates will take values at which the objective function is minimized, namely: Substituting function (5) into system (6) and performing a series of simplifications related to known rules for obtaining first derivatives of the length function, we obtain the following equations: To simplify the process of solving a system of equations like (7) through cyclic iterative computation, it is recommended to introduce the following temporary relationship at each cycle, the value of which should be updated in each subsequent iteration cycle: Then, the system (7) will acquire at each iteration stage the following simplified form: Formulating a system of equations like (9) for each і -th free node (branching point) of the model and solving the resulting system of k equations for the coordinates of these free nodes, we obtain a system configuration that ensures all local heat losses assume extremal values, namely, the minimum.
Another related method for determining the optimal configuration of the pipeline network from a financial and economic standpoint was demonstrated in the works of Abid, Sawa [17,18].It was proposed to determine the optimal coordinates of nodes and lengths of sections in the studied engineering system based on a predefined distribution function of average construction and operation cost metrics of corresponding systems in potential development areas.The equations defining the coordinates of all branching or direction-changing nodes in engineering systems had the following form: Here: xi and yi (i = 2, 3, … N) are the coordinates of the free nodes in the network; ki,j are coefficients reflecting the specific cost indicators of construction and operation of individual links in their respective installation sections, and are determined by the formula: According to [17], the function f(x,y) can be constructed either through interpolation (by solving a system of interpolation equations, followed by determining exact coefficients ensuring the final function graph passes through specified support points on the plane of studied parameters) or approximation (by directly constructing an approximate function with some error using radial basis functions studied by Iske, Ball, and Baxter [19 -21]).The second option is much simpler in terms of computational effort and allows for reasonably predictable results.In particular, the corresponding approximative function appeared as follows: where z0(x, y) is the function defining the original surface of specific cost distribution for construction and operation on the studied land plot; x0,k, y0,k, z0,k are the centers of gravity coordinates of the k-th defined section with different costs; k=1,…,P, where P is the number of defined sections with varying costs; x, y are coordinates of an arbitrary point within the specified value range; ε is the smoothness coefficient of approximation between support points of the function f(x, y); h is the degree of the multiquadratic base function, with a recommended value, as used in works [19 -21], being k=20.
It should be noted that neither solving systems of equations like (9) nor systems like (10) directly or indirectly take into account existing urban planning conditions and constraints, making them imperfect and requiring further research.
However, considering that the results obtained from solving systems of equations like (9) are more grounded from a physical standpoint, whereas modeling based on system (10) has a more abstract financial-economic nature, this study will rely on the principles of optimizing the configuration of the pipeline network model of the district heating system by minimizing heat losses.
The aim of the article was to analyze existing and most effective approaches to optimizing heat networks based on minimizing heat losses, as well as to propose principles and corresponding mathematical tools for accounting objective technical constraints imposed on these networks by regulatory requirements at both technological and urban planning levels.

THE MAIN PART
It is evident that the approach proposed in [1] and the optimization of the heating system based on the equations system (9) are quite idealistic and do not take into account a number of urban planning conditions and constraints that engineers and designers face in practice.Among these constraints are land plot boundaries, presence of water bodies, cliffs, mountains, and other topographic features of the terrain, as well as the presence of roads and other transportation networks, underground and aboveground engineering networks, temporary and protective structures of various purposes.This may lead to the necessity of placing individual free nodes of the heating system model only in strictly defined locations and zones, or conversely, the impossibility of placing them in the corresponding locations.Such constraints also affect the topological features of the model, particularly the connectivity order, the number of free nodes, and consequently, the impossibility of removing them from the topological scheme after optimizing the system as a whole.
The solution to this problem could involve adopting a broader approach, which entails seeking conditional extrema of objective functions while imposing functional constraints on individual nodes of the model.However, even this may not provide a comprehensive solution to the issue due to the objective and subjective perspectives of regulatory authorities, employees of utility organizations, construction and installation companies (which may question the reliability of non-trivial engineering solutions), specialists from engineering equipment manufacturing companies, as well as architects and designers who must ensure the improvement of land plots and the structural reliability of future construction, minimizing the likelihood of emergencies on heat supply networks, which in turn could lead to soil saturation around nearby buildings and damage to them.
Therefore, it is advisable to explore the possibility of expanding the toolkit for optimizing the heating system model, incorporating means to make additional adjustments to the established model while maintaining minimal heat loss.This would allow for local adjustments to the positioning of individual free nodes (or a series of free nodes) by redistributing specific heat loss values and other parameters of straight-line sections of the heating networks.
A simple example of considering urban planning conditions and constraints in laying out heating networks could involve the necessity of placing branching nodes of these networks under or along transport viaducts, particularly highways.From a mathematical standpoint, this would require introducing additional functions that describe the trajectory of transport routes, ensuring that predefined nodes of the heating network model align with the schedules of corresponding functions.
Let's consider an example of geometric modeling of a fragment of a centralized heating network with imposed functional conditions on the placement of free nodes.Suppose that from one heat distribution station, heat carrier is supplied to ten buildings that are heat energy consumers (see the initially adopted project decision on the branching scheme of the network in Figure 1).The topological diagram of the adopted heating system model will include 11 base nodes and 7 free nodes.In this example, for further comparison with the results of considering urban planning conditions, we will limit ourselves to illustrating the initial and resulting forms of the models before and after shaping (optimization) without imposing functional conditions, as well as economic efficiency indicators from the application of this approach.Thus, by formulating a system of optimization equations like (7) to determine the positions of branching nodes in the pipeline network of the heating system, we obtain equations (13)(14)(15)(16)(17)(18)(19)(20)(21)(22)(23)(24)(25)(26).
-straight sections of heat pipelines, 1 -heat distribution station, 2-11 -designation of buildings consuming thermal energy, 12-18 -designation of branching nodes of the heating network.
In Figures 1-5, the following notations are applied: and / are free nodes of the discrete model in the initial position and base nodes connecting the heating system to the heat distribution station and heat consumers; о are free nodes whose positions have changed after model optimization; are reference points for constructing interpolation polynomials of transport communication pathways.
The result of modeling, as a consequence of solving the system (13-26), will be the configuration of the heating network depicted in Figure 2.
Let's now define the functional constraints in the form of interpolation functions for the trajectories of two roads, which must pass through specified reference points

A(xA, yA, zA), B(xB, yB, zB), C(xC, yC, zC), D(xD, yD, zD), E(xE, yE, zE) и F(xF, yF, zF).
We will consider that the first road will pass through the first three points, and the second road through the last three, as shown in Figure 3.The interpolation functions of the respective roads will be written using the Newton polynomial in the following form To incorporate the functional conditions (29) and (30) into the system of optimization equations that determine the coordinates of nodes and the lengths of segments in the studied model of the district heating system, it is necessary to utilize an algorithm for managing mesh structures based on Lagrange functions i .Assuming that the base objective function is (5), then the Lagrange function i for an arbitrary і -th node of the model (adjacent to n other nodes), considering the functional conditional constraints (29) and (30), and also taking into account that individual free nodes will belong to only one of the functions (29) or (30), will appear as follows: / , -straight sections of heat pipelines after model optimization, -straight sections of heat pipelines before model optimization, 1 -heat distribution station, 2-11 -buildings consuming thermal energy, 12-18 -branching nodes of the heating network.After differentiating the Lagrange functions according to (6), we obtain the following systems of conditional equilibrium for the nodes of the mesh structure, which will interpret the pipeline network of the district heating system for some arbitrary і-th node of the model: 1) for nodes satisfying function (29): 2) for nodes satisfying function (30 , Let's formulate a system of optimization equations similar to (33) -( 34), ( 35) -(36), and (9) for the nodes of the model, which will satisfy function (29), function (30), or will not belong to the graphs of either of these functions, respectively.Let (see Fig. 3): 1) Nodes 12-15 will satisfy function (29); 2) Node 16 will not belong to any conditional function; 3) Nodes 17-18 will satisfy function (30).
straight sections of heat pipelines, ----denotes the trajectories of laying transport routes, which will form the functional constraints ( 29) and ( 30), 1 − heat distribution station, 2-11buildings consuming thermal energy, 12-18branching nodes of the district heating network, A, B, C, D, E, and Freference points for constructing interpolation polynomials of transport route trajectories.Given the conditions formulated above, the system of optimization equations will take the following form: 0 ) , ( 1212 The result of modeling the optimal coordinates of nodes and lengths of segments of the district heating network by solving the system (37-56) will be the scheme depicted in Figure 4.
Figure 5 shows a comparison between the obtained optimized network and its initially accepted variant.
Having the final coordinates of the optimized district heating system before and after introducing conditions and constraints, we can assess the efficiency of the demonstrated approach in percentage terms.
Let's define the percentage reduction in thermal energy losses Q by the formula: where Q -total heat losses (heat flow) of all sections of the district heating system, determined by formula (5); upper indices 0 and N correspond to the initial geometric configuration of the model and its configuration at the final (N-th) stage of iterative calculation (when the calculation error does not exceed a certain specified value).
Comparing the results, it was found that the economic benefit from optimizing this district heating network without imposing additional conditions amounts to a 5.853% energy savings.
Simultaneously, the economic benefit from optimizing this district heating network with the imposition of additional conditions amounts to a 3.164% energy savings.
The reduction in economic benefits after imposing additional conditions and constraints indicates that these conditions have a negative impact, preventing the achievement of maximum optimization results.However, considering that practically all practical tasks involve various technical, technological, regulatory-financial, or other nature constraints, the advantages and potential opportunities of the proposed approach for designing and assessing the life cycle of district heating systems become evident.It is also fair to mention that the final percentage of savings will largely depend on the initial geometric configuration of the district heating system model.The more favorable this initial configuration is, the less significant the economic impact of applying the corresponding optimization approach will be.
straight segments of the heat pipelines, -----designation of transportation routes, which will form the functional constraints ( 29) and ( 30), 1heat distribution station, 2-11buildings consuming thermal energy, 12-18branching nodes of the district heating network.straight segments of the heat pipelines after model optimization, straight segments of the heat pipelines before model optimization, 1heat distribution station, 2-11buildings consuming thermal energy, 12-18branching nodes of the district heating network.Finally, it is worth noting that as a result of optimization with the imposition of functional conditions, it was found that branching nodes 12 and 13 were nearly redundant, with very little distance between them.This indicates that the corresponding section (between nodes 12 and 13) serves little functional purpose and can be removed from the scheme.This conclusion, in turn, suggests that the proposed toolkit for optimizing the configuration of district heating networks allows not only identifying the shortcomings of poorly placed free nodes in the studied area, considering urban planning conditions and constraints, but also identifying weaknesses in the topology of corresponding network, manifested in the form of local degeneration of some links to values close to zero.

CONCLUSIONS AND FUTURE RESEARCH DIRECTIONS.
The approach to optimizing the configuration of district heating networks is based on minimizing objective functions represented by total heat losses across the entire length of the respective networks.To make this optimization tool more practical and effective, it is proposed to introduce additional mathematically formulated conditions and constraints into the objective functions, driven by technical, technological, and urban planning Specifically, several optimization examples of heat networks were modeled to demonstrate the application of this approach, both without additional conditions and constraints, and with their imposition, such as the requirement to place some free nodes along transport routes.The simulation results indicate that imposing additional conditions leads to a partial reduction in the economic benefits of optimizing network configurations.However, in practical applications of this approach, avoiding the imposition of conditions and constraints is practically impossible.
The demonstrated toolkit not only allows achieving higher economic indicators in terms of reducing heat losses but also indirectly reduces the impact of heating systems on the environment by decreasing energy consumption.Moreover, this approach enables identifying imperfections in the topology of geometric discrete models of the studied heat networks, which can be further adjusted and rationalized.
Future research in this direction should focus on identifying ways to impose other types of conditions and constraints, along with developing corresponding mathematical models.Furthermore, expanding the objective function to transform it into a function of the ratio of primary energy consumption to delivered heat energy would be beneficial.This would allow considering not only heat losses in sections but also temperature profiles, resulting in heat carrier consumption costs for fluid pumping.Additionally, accounting for heat carrier expenses would facilitate transitioning from a flat to a spatial problem, significantly broadening the model's applicability.

Figure 1 .
Figure 1.Initial model of the district heating system.

Figure 2 .
Figure 2. Model of the district heating system optimized without imposing additional conditions and constraints.

Figure 4 .
Figure 4. Optimized model of the district heating system, with imposed functional conditions (29) and (30).

Figure 5 .
Figure 5.Initial model of the district heating system and the model optimized with the imposition of additional functional conditions (29) and (30).