Introduction

For many reasons, some damages will be visible in water supply projects after start of operation. Urban drinking WDNs, which have been one of the most important infrastructures of urbanization in all human civilizations, are not exempted from this rule. During operation and across the time, the effects of damages will appear in WDNs in various forms, including leakage from pipelines. However, the most important and obvious issue caused by the leakage is the increase in water loss, waste of resources, and increase in costs as a result. In the general design of drinking WDNs, leakage is usually considered as an acceptable percentage of the total per capita consumption for the design horizon at each consumption node (Swamee and Sharma 2008), but the leakage flow rate is always a function of the pressure in the pipeline at the location of the leak. Therefore, considering the amount of leakage as a function of the pressure in the WDNs at the beginning of calculations and then optimizing the network in terms of economy and pressure will be more consistent with the hydraulic concept of WDNs. Several researches have been conducted regarding the importance of leakage and the imposition of unwanted costs due to leakage in urban WDNs.

Van Zyl and Clayton (2007) investigated the effect of pressure on leakage from the WDNs. They analyzed four factors include hydraulic of leakage, pipe type, soil hydraulics, and water demand, which can more affect the amount of leakage. They found that transient flows can be one of the most influential factors on the leakage rate that can increase the leakage coefficient to more than 0.5. Wu et al. (2009) presented a method to analyze uncertain loop-node WDNs that have pressure-dependent leakage. In this model, the discharge of nodes and flows are calculated simultaneously using the improved general gradient algorithm. Massari et al. (2012) analyzed the flow-pressure-head relationship for leakage in polyethylene pipes. It is determined that for a certain pressure, several leakage flow rates can be obtained, using the calculated circular diagrams. Also, the viscoelastic property of the pipe affects leakage flow rates. Therefore, the necessary care should be taken in use of presented relations. Roshani and Filion 0(2014) investigated leakage management in the WDNs through pressure control in pipes using optimization method. The results showed that the used method is a flexible technique that can reduce leakage by 80%. Schowaller and Van Zyl 0(2015) evaluated the leak response as a function of pressure based on individual leak behavior in WDNs. In this research, the sensitivity analysis of different parameters showed that the average pressure and the conditions of the system had the greatest effect on the leakage. Gupta et al. (2016) designed the WDNs considering the pressure as an effective parameter on leakage. The leakage was simulated in two ways: flow in the nodes and along the pipe. It was found that when the water requirements in the nodes along with the leakage from them are considered as a function of the pressure, the increase in the diameter of the pipes will be inevitable. Reca et al. 0(2017) introduced a new method to increase the efficiency of discovery methods in optimal design of WDNs. The mentioned method included reducing the search space by limiting the number of diameters that can be used, combining with the genetic algorithm method. Van Zyl et al. 0(2017) presented the classical leakage orifice equation for leakage and infiltration modes. In this regard, the sign function was placed in order to determine the direction of the flow passing through the orifice that if the head inside the pipe is greater than the outside, leakage occurs and vice versa, infiltration occurs. Mala-Jetmarova et al. 0(2018) reviewed about 120 researches conducted in the last three decades. These researches are about the design of improved networks in terms of design timing, uncertainty of parameters, water quality, and operational limitations. Awe et al. (2020) investigated the analysis and optimization of a drinking WDN during a case study. Due to their investigation, they were able to reduce the costs related to the implementation, operation, and maintenance of the WDN by 38%. Berardi and Giustolisi 0(2021) presented a model to optimize leakage in WDNs. In this research, the leakage is considered as a function of the average pressure and the deterioration rate of the pipe. The results showed that the leakage distribution in the investigated networks did not have much effect on the pressure relief valves, which indicates that flow monitoring will be necessary for leakage. Maskit and Ostfeld 0(2021) optimized and calibrated leakage in WDNs with the help of multi-objective optimization. For the networks under study in the research, with the help of multi-dimensional and non-linear optimization, a model was introduced that provided the optimal pumping program in order to minimize the leakage. Rupiper et al. 0(2022) using water loss data across four US states and develop a model to assess the economically efficient level of losses. This model is used to compare the net benefits of several proposed water loss regulations and modeling approaches. Combining economic and engineering principles, this model works efficiently to reduce water losses by 34.7% per year. Also, leakage management can lead to water savings that generate net economic benefits. Bermúdez et al. (2022) propose a model predictive control strategy for pressure management and leakage reduction in a water distribution system. The effectiveness of the proposed control system was studied by different scenarios. This model reaches an almost 5% reduction in water losses in WDN.

The review of the literature shows that lots of researches have been done on the leakage in WDNs, including measuring and providing relationships for its calculation, and analyzing and determining the location of the leakage in WDNs. However, this research is focused on the effect of pressure on the amount of leakage and how to estimate it on the optimal economic design of the WDNs, which shows the necessity of the current study. Generally, in the design of drinking WDNs, leakage is considered as an acceptable constant percentage of the total water requirement for the year of the planning horizon at each consumption node 0(Swamee and Sharma 2008), while the leakage discharge is a function of the pressure in the pipeline at the location of the leak (Gupta et al. 2016). Therefore, optimizing the network from an economic point of view with considering the leakage as a function of the existing pressure at the beginning of calculations will be more concordance with the existing reality of hydraulic of the WDNs.

Methods and materials

The studied area

The studied area is the two-loop water distribution network presented by Alperovits and Shamir (1977) and also the three-loop Hanoi presented by Fujiwara and Khang (1990). The aforementioned networks have been examined by many previous researchers to test and evaluate the models presented by them (Tospornsampan et al. 2007; Páez et al. 2014; Puccini et al. 2016; Reca et al. 2017; Cassiolato et al. 2019; Zarei et al. 2022; etc.). As shown in Fig. 1, the network of Alperovits and Shamir (1977) consists of 7 nodes and 8 pipes with the same length of 1000 m, which are fed from a reservoir with a water level of 210 m. The Hazen–Williams coefficient for all pipes is considered equal to 130. The permissible pressure range is between 30 and 60 mH2O, and the allowed velocity can be changed between 0.3 and 2.0 m/s. Table 1 shows the commercial diameters and their cost per unit of length for the this WDN.

Fig. 1
figure 1

Networks studied in this research: a the two-loop WDN presented by Alperovits and Shamir (1977) and b the three-loop WDN of Hanoi presented by Fujiwara and Khang 0

Table 1 Available commercial diameters and cost per meter in two- loop WDN

The three-loop Hanoi network includes 32 nodes and 34 pipes which fed by a reservoir with a fixed head of 100 mH2O. The minimum required head in this network is 30 mH2O (Vasan and Simonovic 2010). The available commercial diameters for this network are 6 diameters with sizes of 12, 16, 20, 24, 30, and 40 inches. The cost per unit of length is calculated by \({1.1*D}^{1.5}\) in dollars (Vasan and Simonovic 2010).

Network analyzer model

To analyze the flow rate and pressure in the pipes and nodes of the drinking WDNs, the matrix form of the Gradient Algorithm method is used (Todini and Pilati 1988):

$$\left| {\begin{array}{*{20}c} {A11} & {A12} \\ {A21} & 0 \\ \end{array} } \right|\left| {\begin{array}{*{20}c} Q \\ H \\ \end{array} } \right| = \left| {\begin{array}{*{20}c} { - A10H0} \\ q \\ \end{array} } \right|$$
(1)

where

$$A11 = \left| {\begin{array}{*{20}c} {R_{1} \left| {Q_{1} } \right|^{{n_{1} - 1}} } & 0 & 0 \\ 0 & {R_{2} \left| {Q_{2} } \right|^{{n_{2} - 1}} } & 0 \\ 0 & 0 & { \ddots R_{np} \left| {Q_{np} } \right|^{{n_{np} - 1}} } \\ \end{array} } \right|$$
(2)

A12 is the pipe connection matrix that shows the connection of each pipe with the unknown nodes of the system. This matrix has dimensions of np rows and nn columns, where np is the number of pipes and nn is the number of nodes with unknown heads. The arrays of this matrix are defined as follows: \(A1{2}_{i,j}=\left\{\begin{array}{c}1\\ -1\\ 0\end{array}\right.\).

“1” for the case where the flow of pipe i enters node j, “−1” for the case when the flow of pipe i leaves node j, and “0” means that pipe i is not connected to node j. Matrix A21 is the transpose of matrix A12.

Matrix A10 is the node connection matrix with a specific head that shows the connection of each node with the pipes of the system. This matrix has dimensions of np rows and no columns, where no is the number of nodes with specific heads. The arrays of this matrix are defined similarly to the A12 matrix, but for the node with a specific head. H0 is the head matrix for nodes with fixed head, H is the head matrix for unknown nodes, Q is the pipe flow matrix and q are the demand flow matrix. The coefficient R depends on the characteristics of the pipe, which is defined according to the Hazen–Williams equation as follows:

$$hf = RQ^{n}$$
(3)
$$R = w \times L \times (\frac{1}{C})^{1.852} D^{ - 4.87}$$
(4)

In this equation, w is the coefficient of the Hazen–Williams, for which values between 10.5088 and 10.9031 are presented in the metric system (Savic and Walters 1997; Tospornsampan et al. 2007). In this research, this value is considered equal to 10.6670. L is the length of the pipeline in meters, C is the Hazen coefficient, and D is the inner diameter of the pipe in meters.

The output flow matrix from node q is considered as the sum of two parts: the discharge of the actual demand of consumers and the value of the node's portion from the network leakage. Various relationships are provided to estimate and calculate the leakage from each node i(qs, i). Here the relationship provided by Fontana et al. 0(2017) is used:

$$q_{s,i} = C_{{{\text{BL}},i}} \times {\text{hp}}_{i}^{n} = \propto c_{m,i} { }.{\text{Ab}}_{i} { }.{\text{ hp}}_{i}^{n}$$
(5)

where CBL,i is the leakage coefficient, which is a function of the served population (Abi), the material coefficient of the pipes connected to the node (cm,i), and the proportionality coefficient (α). The pressure head power of the node n and the coefficient α are obtained by minimizing the difference between the measured and calculated leakage. The values of α = 3.2 × 10–5 and n = 0.72 are presented by Fontana et al. 0(2017)0. After simplification, the matrix of head in nodes and flow in pipes for the next iteration is summarized as follows:

$$H^{k + 1} = - \left( {A12N^{ - 1} A11^{ - 1} A12} \right)^{ - 1} \left\{ {A12N^{ - 1} \left( {Q^{k} + A11^{ - 1} A10H0} \right) + \left( {q - A21Q^{k} } \right)} \right\}$$
(6)
$$Q^{k + 1} = \left( {1 - N^{ - 1} } \right)Q^{k} - N^{ - 1} A11^{ - 1} \left( {A12H^{k + 1} + A10H0} \right)$$
(7)

where N−1 is the inverse of the diagonal matrix N:

$$N = \left| {\begin{array}{*{20}c} {n_{1} } & 0 & 0 \\ 0 & {n_{2} } & 0 \\ 0 & 0 & { \ddots n_{n} } \\ \end{array} } \right|$$
(8)

where n will be the power of discharge in the relation of friction loss (\(hf=H-{H}_{j}={R}_{i}{{Q}_{i}}^{n}\)) (Todini and Pilati 1988).

Assuming initial values Qk for pipe flow and solving Eq. 5, head values in unknown nodes are calculated in the next iteration. Then, by substituting these values in Eq. 7, the flow rate of the pipes will be obtained in the next iteration. The new values replace the assumed values and the calculations are repeated. The calculation ends when the sum of squares of the differences between the new values and the previous guess values is less than a certain value determined by the user. A numerical model was developed by Visual Basic programming language based on mentioned method.

Optimizer model

NSGA-II multi-objective optimization is actually an algorithm for solving the optimization problem using the Non-dominated Sorting Genetic Algorithm method, which is based on the Genetic Algorithm (GA). In this method, like the GA, an initial population of decision variables is created randomly in the virtual space. Each member of this population, which includes a set of decision variables, is called a chromosome. The values of objective functions are calculated for each chromosome. Then, the population is classified based on non-dominant sorting criteria, in such a way that the members in the first category are a group that is not defeated by other members of the current population. The members in the second category were defeated only by the members of the first category on the same basis, and this process continued in the same way in other categories until all the members in each category were assigned a rank based on the category number. This rank is the basis of non-dominated ranking. The control parameter of the crowding distance for each member within each category is calculated using the following objective functions:

$$d_{j} \left( k \right) = \mathop \sum \limits_{i = 1}^{2} \frac{{f_{i} \left( {k - 1} \right) - f_{i} \left( {k + 1} \right)}}{{f_{i}^{\max } - f_{i}^{\min } }}$$
(9)

where k is the number of the member, dj (k) is the distance of the member swarm, k−1 and k + 1 are the numbers of the neighboring members of the desired member in the corresponding category, fi is the i-th objective function, and \({f}_{i}^{\mathrm{max}}\) and \({f}_{i}^{\mathrm{min}}\) are the maximum and minimum of function i in the desired category, respectively. The crowding distance parameter shows a measure of the proximity of a member to other members of the population in each category. Now, the internal members of each category are sorted based on the crowding distance criteria. In this way, the member with a higher dj value is placed in a higher rank in the category. In the next step, a new generation of chromosomes is produced using one of the methods of selecting parents and applying gene exchange to replacing the bad chromosomes. After that, the convergence criterion is controlled. If the GA chromosomes in the Pareto front are sufficiently similar to each other, the optimization ends; otherwise, the algorithm is repeated with a new population. After the completion of the optimization, Pareto optimal answers are obtained which are the members of the first category in the population of answers. By using these answers, it is possible to choose the right answer by considering the values of the objective functions at the desired level, from the Pareto front (Deb et al. 2002). So, NSGA-II cost–benefit optimization has been done with two goals presented in Eq. 10 and 11:

$$\min :F_{1} = \mathop \sum \limits_{i = 1}^{Np} Li \times Cpi + P_{1} \times \max_{v} + P_{2} \times \min_{v} + P_{3} \times \max_{p}$$
(10)
$$\min :F_{2} = \mathop \sum \limits_{i = 1}^{Nj} \max \left( {(H_{\min } - H_{jun\left( i \right)} ),0} \right)$$
(11)

Li is the length of pipe i, Cpi is the cost per unit of pipe length which is a function of pipe diameter D, Np is the number of pipes, coefficients P1 to P3 are the penalty coefficient for violating the limits. Also, \({\mathrm{max}}_{v}\), \({\mathrm{min}}_{v}\) and \({\mathrm{max}}_{p}\) is the violation from the maximum allowable velocity, minimum allowable velocity and maximum allowable pressure, respectively. In Eq. 11, which represents the total pressure deficit in the network, \({H}_{\mathrm{min}}\) is the minimum allowable pressure of the system, \({{H}_{\mathrm{jun}}}_{(i)}\) is the pressure at node i and Nj is the number of unknown nodes. In order to cost–benefit optimal design of the WDNs, the NSGA-II multi-objective optimizer and network analyzer codes were prepared and linked to each other in the Visual Basic programming language. All desired inputs, such as network geometric specifications, pipe diameter, network layout, etc., are prepared in the Excel and called from the developed numerical model (Fig. 2).

Fig. 2
figure 2

General process of WDNs cost–benefit optimizer calculations

Results

Optimum design of two-loop WDNs: without leakage

According to Alperovits and Shamir (1977) information (Fig. 1 and Table 1) and running the model, the values of optimal diameter, cost of network construction, and hydraulic characteristics of the optimal network were obtained. As seen in Fig. 3, a set of solutions has been obtained according to the NSGA-II optimization method and the created Pareto front. Here is a desired solution in which the value of the second objective function, i.e., the sum of the allowable pressure deficit, reaches zero and the value of the first objective function has the lowest value. Although it is possible to find the optimal solution using single-objective optimization methods such as the genetic algorithm, however, due to the time-consuming calculations (Sect. “Assessment of solution characteristics”), the NSGA-II multi-objective optimization was used while the second objective function was used to shift to the zero.

Fig. 3
figure 3

Front of the non-dominated solutions of the two-loop no-leak WDN

Using NSGA-II model and parameters presented in Table 2, the front of non-dominant solutions was finally obtained, which are shown in Fig. 3. Based on technical judgments, the appropriate answer can be chosen from the Pareto front by keeping the values of the objective functions at desired level. However, since the solutions in which the total pressure deficit is close to zero are considered, the solution (F1 = 418,000 $, F2 = 0.10 mH2O) can be mentioned as the optimal solution. In other words, the first answer in which the sum of the pressure deficit reaches zero or close to it is the basis of selection. This solution has the smallest distance from the coordinate origin on the horizontal axis. The values of optimized diameters, flow velocity in pipes, and pressure in nodes for optimal solution from the Pareto front are presented in Table 3. The result shows all the velocity values are within the allowed range, i.e., between 0.3 and 2.0 m/s. It is noted that the negative values of the calculated velocity mean that the direction of the calculated flow is the opposite of what was assumed at the beginning of the simulation. Also, the pressure values only in node No. 7 exceed the allowable limit by 0.07 mH2O.

Table 2 NSGA-II parameters used for optimal design of two-loop no-leak WDN
Table 3 Optimal characteristics results by the NSGA-II for two-loop no-leak WDN

So far, various researches have been done on two-loop Alperovits and Shamir (1977) network 0(Ekinci and Konak 2009) and these researches are more about optimization, artificial intelligence or statistical analysis. Most of the meta-exploration methods have estimated the construction cost of about 419,000 $ for the mentioned WDN (Savic and Walters 1997; Cunha and Sousa 1999; Cunha and Ribeiro 2004; Tospornsampan et al. 2007) and the values obtained in the present study are also in the same range.

Optimum design of two-loop WDNs: with leakage

Pressure-dependent leakage

Assuming that leakage from the network is related to the pressure head of the node from Eq. 5, the matrix form of the gradient algorithm was modified to include the amount of pressure-dependent leakage in addition to the actual demand of the node. Considering the node pressure as unknown at the beginning of the calculations, in an iteration process for each member of the decision variable population, the pipes flow rate, the pressure in the nodes, and the leaked discharges are also calculated at the same time. Again, by considering the parameters presented in Table 4 and using NSGA-II optimizer model, the front of non-dominant solutions was finally obtained, which are shown in Fig. 4a. The solution (F1 = 490,000 $, F2 = 0.03 mH2O) in which the function of the total pressure deficit is close to zero, was chosen as the final solution, from the total solutions created. The values of optimized diameters, flow velocity, pressure, leakage values from the nodes and the coefficients of the leakage relationship considered for optimal solution from the Pareto front are presented in Table 5. All the velocity values are within the allowed range, i.e., between 0.3 and 2.0 m/s. Also, the pressure values only in node No. 7 exceed the permissible limits by 0.05 mH2O.

Table 4 NSGA-II parameters used for optimal design of two-loop with pressure-dependent leak WDN
Fig. 4
figure 4

Front of non-dominant solutions of two-loop WDN: a. pressure-dependent leakage and b. constant leakage

Table 5 Optimal characteristics results by the NSGA-II for two loops with pressure-dependent leak WDN

The results in Table 5 show that the calculated leakage values in the nodes vary between 12.9 and 19.9% of node demand in nodes No. 7 and No. 2, respectively. The average of these values is approximately equal to the maximum value recommended to WDNs design. This amount is variable for different countries, and each organization has its own standards. In Iran, this value is 15% (Publication No. 117–3, 2019) that is used here for calculations. It should be noted that the product of the material coefficient of the pipes connected to the node (cm,i) and the proportionality coefficient (α) in Eq. 5 is set in such a way that the total amount of network leakage is equal to 15% of the actual network water requirement. The served population (Abi) where used in the model was calculated according to the actual node demand for each node.

The results showed that considering an average of 15% leakage for this two-loop WDN has increased the cost from about 418,000–490,000$. In other words, about 17% of the construction cost has been added. This issue shows the importance of paying attention to the reduction in leakage in WDNs. In this particular case, each one percent reduction in WDN leakage reduces the cost of WDN construction by about one percent. This amount is apart from reducing in cost of water losses.

Fixed leakage

In this case, to determine the water demand in a node, a fixed amount of 15% of the actual demand of each node was added as leakage to the output of the node. The value of NSGA-II parameters used for the optimal design of the WDN is also the same as the values mentioned in Table 4, but the best results obtained by 75 iterations. The generated non-dominant solution fronts are shown in Fig. 4-b. The solution (F1 = 491,000 $, F2 = 0.00 mH2O) in which the total pressure deficit function is equal to zero was selected as the final solution from the total of created solutions. The results show that in both cases of fix and pressure-dependent leakage, the amount of cost is almost the same. However, as shown in Table 6, the contribution of the amount of leakage from the nodes is different in both cases. For example, in node No. 2, the amount of pressure-dependent leakage is equal to 19.87 m3/hr, which is about 32.46% more than the constant leakage amount of 15 m3/hr, while in node No. 6, this value is about 14.2% lower. The values of the diameter and velocity in the pipes and the pressure in the nodes for “a” and “b” states in Table 6 show this issue can affect the geometric–hydraulic characteristics of the WDNs.

Table 6 Effect of the leakage calculation method on the geometric–hydraulic characteristics of WDN

Optimum design of three-loop WDNs: without leakage

In order to check the capability of the prepared model, a more complex and three-loop Hanoi WDN which is a prominent network in the literature (Savic and Walters 1997; Cunha and Sousa 1999; Cunha and Ribeiro 2004; Tospornsampan et al. 2007) was optimized. Using the value of parameters presented in Table 7 for NSGA-II, the created Pareto front is shown in Fig. 5. Since the solutions in which the total pressure deficit is close to zero are considered, the solution (F1 = 6,175,232 $, F2 = 0.0 mH2O) was chosen as the optimal solution. Most of past studies have estimated the cost of about 6,100,000 $ for the mentioned WDNs (Savic and Walters 1997; Cunha and Sousa 1999; Cunha and Ribeiro 2004; Tospornsampan et al. 2007), and the values obtained in the present research are also in the same range. In order to comparison with other methods, the values of the optimized diameters and the pressure in the nodes for this solution in the Pareto front are presented in discussion section by Tables 12 and 13, respectively.

Table 7 NSGA-II parameters used for optimal design of three loops with no-leak WDN
Fig. 5
figure 5

Front of non-dominant solutions of three-loop no-leak WDN

Optimum design of three-loop WDNs: with leakage

Pressure-dependent leakage

Assuming a pressure-dependent leakage, the front of non-dominant solutions was obtained from model, which is shown in Fig. 6a. From the total solutions created, the solution (F1 = 8,094,154 $, F2 = 0.0 mH2O) in which the function of the total pressure deficit is close to zero was selected as the final solution. The values of the optimized diameters, velocity, pressure, leakage values from the nodes, and the coefficients of the leakage relationship for this optimal solution are provided in Tables 8 and 9. It can be seen that the pressure of all the nodes is more than the minimum allowed, i.e., 30 mH2O. The calculated leakage values in the nodes vary between 44.29% of node demand in node No. 2 and 12.71% in node No. 13. Here too, the product of the material coefficient of the pipes connected to the node (cm,i) and the proportionality coefficient (α) in Eq. 3 is set to the 15% of the actual network demand for total amount of network leakage. The serviced population (Abi) was calculated according to the actual node demand for each node and used in the model.

Fig. 6
figure 6

Front of non-dominated solutions of three-loop WDN: a. variable leakage and b. constant leakage

Table 8 Optimal diameter calculated by the NSGA-II model for three-loop pressure-dependent leakage Hanoi WDN
Table 9 Optimal pressure calculated by the NSGA-II model for three-loop pressure-dependent leakage Hanoi WDN

Fixed leakage

Assuming that the leakage in each node is equivalent to 15% of the node's demand, the calculations were performed. Finally, the front of non-dominated solutions was obtained (Fig. 6b) and the solution (F1 = 8,079,432 $, F2 = 0.0 mH2O) in which the total pressure deficiency is zero was selected. The obtained diameters and pressure in the nodes for this answer are presented in Tables 10 and 11, respectively. Also, in order to compare the results with the values of the optimal diameters and pressures for the variable leakage mode, they are given in these tables. The cost of WDN construction considering constant and variable leakage is 8079432 $ and 8,094,154 $, respectively, which is estimated to be almost the same. However, pipes number 14, 15, 21, 22, 25, 32 and 33 has different diameters in two mentioned cases. The maximum calculated pressure difference of the nodes is also limited to less than one meter.

Table 10 Comparison of the optimal diameters of the three-loop WDN calculated with constant leakage and variable leakage
Table 11 Comparison of nodal pressure in optimal three-loop WDN calculated with constant leakage and variable leakage

The results of the calculations showed that in comparison with no-leak situation, considering an average of 15% leakage for the aforementioned three-loop WDN, the cost increased from 6,175,232 $ to 8,079,432 $, which means that about 31% was added to the construction cost. Furthermore, as commercial aspect, constant leakage or variable leakage doesn’t make sense generally, but the physical and hydraulic properties of WDN were affected by type of leakage.

Discussions

Sensitivity analysis of affecting factors and important characteristics of optimization will be considered and compared in this section. In the following, the characteristics and productivity of NSGA-II multi-objective optimization method in accuracy and time of solution will be evaluated. Finally, the amount of increase in the cost of WDN construction will be investigated and compared in different leakage modes separately.

Sensitivity analysis

The resistance coefficient in friction loss equations is one of the factors that have uncertainty about it. This coefficient, which depends on the pipe's material, flow conditions, etc., changes along the time. Therefore, in order to consider the effect of its changes on the flow conditions, and especially the total leakage from the network, a sensitivity analysis of the leakage amount against the changes of this parameter was performed. In Table 12, pressure-dependent leakage values from the nodes are given for different values of the Hazen–Williams coefficient for the two-loop network. In general, the amount of leakage from the network nodes increases with the increase in Hazen–Williams coefficient due to the decrease in friction loss and increase in the pressure. Figure 7 shows when the value of Hazen–Williams coefficient increases or decreases 11.5%, the total amount of leakage in the network increases and decreases by 4.66% and 7%, respectively. In other words, the decrease in leakage is greater than the increase in leakage for certain changes in the Hazen–Williams coefficient.

Table 12 Variation in Hazen–Williams coefficient on pressure-dependent leakage (m3/hr) in two-loop WDN
Fig. 7
figure 7

Variation in network leakage versus Hazen–Williams coefficient for two-loop WDN

Also, leakage values in different nodes for different values of Hazen–Williams coefficient are presented in Table 13 for Hanoi three-loop network. The changes in the total amount of leakage versus the changes in Hazen–Williams coefficient are presented in Fig. 8 The progression of changes is the same as the two-loop network that was explained before. However, in this network, with an 11.5% increase or decrease in friction coefficient, the total amount of leakage increases and decreases by 16.33%, and about 22%, respectively.

Table 13 Effect of variation in Hazen–Williams coefficient on pressure-dependent leakage (m3/hr) for three-loop Hanoi WDN
Fig. 8
figure 8

Variation in network total leakage versus Hazen–Williams coefficient for three-loop Hanoi WDN

Another factor affecting the amount of leakage from the network is the nodal demand. Figures 9 and 10 show the changes in the amount of leakage from the network against the changes in nodal demand for two-loop and three-loop networks, respectively. It can be seen in the two-loop network, with a 100% increase in the network demand, the amount of leakage from the network has decreased by about 65%. As the demand of the network increases, the amount of flow in the pipe and the head loss in the system increases, as a result. Therefore, the pressure decreases in the network, and consequently, the total amount of network leakage is decrease. On the contrary, the total amount of leakage has increased with the reduction in the network demand. So that with a 100% decrease in the network demand, the total amount of leakage from the network has increased by 26.4%. Figure 10 indicates that with a 50% increase or decrease in demand of the three-loop network, the total amount of leakage from the network has decreased and increased by about 45% and 84%, respectively.

Fig. 9
figure 9

Variation in network total leakage versus total demand variation for two-loop WDN

Fig. 10
figure 10

Variation in network total leakage versus total demand variation for three-loop WDN

Comparison of leak discharge in different condition

As mentioned earlier, to design of WDNs, the leakage values are included as a part of nodal water requirement. Figure 11 shows the comparative chart for values of nodal leakage in constant and pressure-dependent condition for two- and three-loop WDNs. It is clear that they have different amounts in nodes and it just follows the physical and hydraulic condition of WDNs and a general rule cannot explain it. Despite this, the results of this study show the total leak discharge of two- and three-loop WDNs in fixed and pressure-dependent form is almost the same. The total amount of fixed and pressure-dependent leakage for two- and three-loop WDNs is calculated 168.00–168.88 m3/hr and 2991.0–3061.1 m3/hr by NSGA-II optimizer model, respectively. It means to design a WDN, engineers can consider the average of nodal discharge as a constant multiplier of nodal water requirement by a very good approximation (i.e., 15%). Pressure-dependent calculations and optimization affect the physical and hydraulic condition of WDN.

Fig. 11
figure 11

Comparison of nodal leak discharge for fixed and pressure-dependent leakage: a. two-loop and b. three-loop WDNs

Comparison of costs and solution characteristics

In the following, the costs of WDN construction and solution characteristics like run time of model and number of iterations will compare.

Cost changes of WDNs with leak

The construction cost of two well-known two- and three-loop WDN in no-leak, constant leak, and pressure-dependent leak condition was calculated in previous. Table 14 shows these results simultaneously. It is obvious that constant and pressure-dependent leak condition have almost the same effect on WDNs construction cost. As mentioned before, the two- and three-loop WDNs have about 17–31% increase in construction cost by considering leakage in optimal design process, respectively.

Table 14 Optimal Cost changes of WDNs with different leak conditions

Assessment of solution characteristics

A Non-dominated Sorting Genetic Algorithm, NSGA-II, as a multi-objective optimizer method is chosen for this research, in which pressure deficit function (F2) considered to come to zero. Also, we can use a simple optimization algorithm like GA. So, why NSGA-II was chosen against GA? The answer is fewer amount and time of calculation in NSGA-II method that shows itself in number of iteration and run time of model. The solution characteristics for NSGA-II and GA are mentioned in Table 15. The calculations were performed by a computer system with processor Intel(R) Core (TM) i7-7500U CPU @ 2.70 GHz, 2904 MHz, 2 Core(s), 4 Logical Processor(s). The results denote that a simple optimization algorithm like GA consumes more time and iteration number than NSGA-II method at the same condition. Values of Table 15 illustrate that the multi-objective optimizer NSGA-II gives faster solutions than simple GA optimizer.

Table 15 Solution characteristics of NSGA-II and GA for top answer of two- and three-loop WDNs

Conclusion

The matrix form of the gradient algorithm method is a powerful method in analyzing WDNs. In this research, the pressure-dependent leakage term was added to the equations of the gradient algorithm method. By coupling the developed analytical model with the NSGA-II multi-objective optimization method in the Visual Basic programming environment, a computer model was developed by which the optimal design of the urban WDNs with pressure-dependent leakage is carried out. The output of the model includes optimal cost of the WDN, the optimal diameters, the leakage amount of each node, the pressure values in the nodes, and the velocity in the pipes. The results on two famous WDNs in the literature showed:

  • Considering pressure-dependent leakage and an average of 15% of the nodal demand for fixed leakage, the construction cost of two- and three-loop WDNs about 17% and 31% will increase, respectively.

  • The amount of calculated leakage in the nodes varies between 12.9 and 19.9% and 12.7 and 29.4% of the real nodal demand in two- and three-loop WDN, respectively.

  • The method of considering leakage in WDN calculations did not have a significant effect on the cost of network construction. However, the hydraulic properties of the WDN are affected and some optimized diameters, pressure values in the nodes, and flow velocity in the pipes are different.

  • The leakage coefficient CBL,i in nodes for a two-loop WDN varies from 3.08 × 10–4 to 10.16 × 10–4 and 3.95 × 10–4 to 41.04 × 10–4 for two- and three-loop WDN it in the metric system, respectively.