1 Introduction

Water losses within a Water Distribution System (WDS) may occur at pipeline joints (background leakages), and/or at holes and longitudinal or circumferential cracks (Tucciarelli et al. 1999; van Zyl and Clayton 2005; Nicolini and Zovatto 2009; Puust et al. 2010). In particular, when pipelines are connected by joints, a considerable part of the water losses from the network occur because of the incorrect assembly of joints or the fatigue and ageing of the material used to ensure a watertight seal (Covelli et al. 2015).

In all cases, the leakage discharges depend on the local pressure and can be modelled by means of appropriate pressure-discharge equations. This observation suggests that the correct management of undetectable leaks could be achieved by minimising the nodal pressures throughout the WDS (Report 26 1985; Thornton 2003; Marunga et al. 2006; Walski et al. 2006; Ulanicki et al. 2008; Hunaidi 2010; Lambert and Thornton 2011; Xu et al. 2014). This purpose can be accomplished by means of flow or pressure control devices (Throttle Control Valves (TCVs) or Pressure Reduction Valves (PRVs) or by using small- or micro-turbines or Pumps as Turbines (PaT) (Ramos et al. 2010)), able to totally replace the PRVs or to be located in parallel or in series with them. In particular, PRVs should be placed and set to approximate an ‘ideal condition’ in which the nodal pressure heads are very close to the minimal values strictly required to satisfy the local water demand. Because of the problems introduced by the transients during valve operation (Prescott and Ulanicki 2008; Abdelmeguid 2011; Abdelmeguid et al. 2011), very often fixed set-point PRVs (i.e., standard PRVs that are able to regulate a high varying pressure into a lower and stable downstream pressure, regardless of changes of users demand) are preferred.

Obviously, the optimal positioning and setting of the valves are strongly connected tasks. In the literature, many works have been devoted to the optimisation of valve setting for fixed valve positions, considering stationary water demands (Germanopoulos and Jowitt 1989) or time variable discharges required at the nodes (namely, EPS = Extended Period Simulation, Jowitt and Xu 1990; Germanopoulos 1995; Vairavamoorthy and Lumbers 1998; Tabesh and Hoomehr 2007; Ulanicki et al. 2000; Liberatore and Sechi 2009; Dai and Li 2016). In contrast to the above mentioned researchers, other authors have considered the problem of the optimal valves positioning (Savić and Walters 1996; Reis et al. 1997; Araujo et al. 2006).

In order to minimise simultaneously the number of valves and the volume of water lost during a daily cycle (crudely represented by means of three different steady hydraulic conditions), Nicolini and Zovatto (2009) used a multi-objective Genetic Algorithm (GA) (NSGA-II), and considered time variable setting values. However, their approach does not appear suitable to identify the number of valves to be used. In alternative, it is possible to consider an approach based on the minimisation of the total costs connected to the water leakage and the pressure management. In fact, we observe that by increasing the number of valves there is a reduction of the volume of water dispersed within the WDS and the costs associated with these losses, but there is also an increase of the costs of installation and maintenance of valves. As a result, it is possible to identify the number and the setting of valves that are able to allow a reduction of the whole costs related to both the volumes of water dispersed and valves.

Starting from these observations, a novel approach is proposed in this work aimed at identifying the number, positions and settings of fixed set-point PRVs for the reduction of the daily and yearly water losses from joints, and correspondingly costs due to the loss of the profits that could be earned from the sale of the water lost through background leakage. The approach is based on the coupling of a GA and a simplified hydraulic model for the analysis of WDS that at each time step of the Extended Period Simulation (EPS) analysis, employs a ‘feedback mechanism’ in order to account for the water lost from the pipeline joints modelled with a pressure-discharge relationship. This ‘feedback mechanism’ consists on an iterative procedure that allows accounting for the presence of losses from pipeline joints, without actually modelling them as emitters. Indeed, the amount of water lost from a joint depends upon the value of the local pressure, and then, for a realistic modelling of the network, the pipeline joints should be modelled as emitters nodes (Covelli et al. 2016). However, this extreme network modelling would lead to time consuming hydraulic simulations. Vice-versa, the feedback mechanism proposed in this work allows reducing the number of nodes to be considered in the network model, leading to a simplified but efficient WDS simulation.

In order to test the proposed methodology, the GA coupled with the simplified hydraulic simulator proposed in this paper is compared to the GA coupled with more sophisticated hydraulic modelling considered in previous work by Covelli et al. (2016). This comparison is carried out using the same study case already considered in the above cited paper, consisting in a small but realistic WDS. Then the proposed methodology is applied to a second case study taken from literature in order to show the capability of the proposed methodology in the reduction of water losses.

2 Proposed Methodology

The algorithm proposed in this work enables to reduce background water losses from WDS by decreasing the head pressures along the links of the network to values strictly needed to allow the water distribution node by node. This objective could be achieved by deploying inside the WDS a specific number N PRV of PRVs with the appropriate valve settings. Thus, once N PRV has been fixed, their optimal locations and settings are evaluated by means of a Genetic Algorithm (GA). The location of each valve is defined by two parameters, namely, the network link and the valve’s position along the link. Of course, not all of the positions are feasible, for either economical or technical reasons. Hence, a limited set of admissible positions (existing manholes, for example) must be chosen a priori. Moreover, for simplicity, each pipe in the WDS is considered eligible for PRVs positioning and, just for exemplification purposes, the PRVs are positioned in the middle of the pipes. At the end, once the optimal positions and settings of PRVs have been evaluated, the optimal number of valves to insert in WDS is evaluated by a Cost-Benefit analysis.

The above reported operation has been carried out considering a variable water demands during the day, following a given pattern (EPS).

2.1 Hydraulic Model

When two consecutive pipelines are connected by joints (hub and spigot), leakage may occur through the joints itself. Therefore, a proper hydraulic model is needed in order to perform computations. A realistic hydraulic simulator of the WDS, would require the modeling of each joint, connecting two consecutive pipes, as an emitter (Covelli et al. 2016). However, this would lead to an extreme WDS modeling with a high number of nodes even when the network is made by few links, increasing the computational efforts. Furthermore, the assignment of each emitter coefficient formula would lead to a high uncertainty. For this reason, in this work a simplified hydraulic simulator has been developed.

The water loss from joints along a link of the network can be assimilated to an uneven distributed discharge, with local discharge value depending upon the pressure value. When discharge is evenly distributed, it can be accounted by the hydraulic network simulator by adding to the user demand at the k-th time interval of the day an initial (1 − α)(Q d,k ) j and final α(Q d,k ) j discharge to the upstream and downstream node of the j-th link (Messina 1945), where (Q d,k ) j is the whole discharge evenly distributed along the j-th link of the WDS at the k-th time interval of the day, and α is a coefficient ranging between 1 and 0.

However, when leakages occur through the joints, the discharge is not evenly distributed, but the discharge values depend on the local pressures. Moreover, it is not actually continuously distributed along the link, but it consists in a sequence of concentrated leakage discharges (q m,k) j from N j joints existing within the j-th link (with m = 1,2,…,N j ), at the k-th time interval. For this reason, in this work, for the sake of simplicity, the coefficient α is set equal to 0.5 and (Q d,k ) j is assumed to be unevenly distributed along the links with local values depending on the local pressure assumed to vary linearly between the upstream and downstream nodes of the j-th link (see Fig. 1), and it is computed as \( {\left({Q}_{d,k}\right)}_j={\displaystyle \sum_m^{N_j}{\left({q}_{m,k}\right)}_j} \), where N j is evaluated by rounding up the ratio L j /δ, where L j is the length of the i-th and δ is the distance between two consecutive joints.

Fig. 1
figure 1

The evaluation of the discharges flowing out at deteriorated joints: definition sketch

The simplified hydraulic model presented in this paper belongs to the category of pressure driven models, and allows evaluating iteratively, at each time step of the EPS simulation, the correct values of the leakage discharge assumed distributed along the WDS links.

Let N N be the number of nodes and N L the number of links existing in the WDS. Furthermore N T be the number of time interval in which the day was divided, Q i the daily averaged user demand at the i-th node of the WDS, (Q d,k ) j the leakage discharge along the j-th link of the WDS at the k-th time interval, assumed to be distributed along the link with local value depending on the local pressure value and DC ,k the demand coefficient at the k-th time interval.

The hydraulic model presented in this work can be summarized in the following steps:

  1. 1.

    set k = 1;

  2. 2.

    for each link j = 1, 2, …, N L , set (Q d,k ) j  = 0;

  3. 3.

    for each node i = 1, 2, …., N N , set \( {Q}_{i,k}=D{C}_k\kern0.24em {Q}_i+0.5{\displaystyle \sum_{j=1}^{N_{Li}}{\left({Q}_{d,k}\right)}_j} \) where N Li is the number of links having the upstream or downstream ending node equal to the i-th node. Then, perform the WDS simulation using any pressure driven approach (Pirozzi and Pianese 2002; Cozzolino et al. 2005);

  4. 4.

    for each link of the network, use formula given by Covelli et al. (2015) to evaluate (q m,k ) j , assuming that the pressure head varies linearly between the upstream and downstream ending node of the j-th link. Then sum up the leakage discharge values to obtain the new values of the distributed leakage discharges (Q’ d,k ) j ;

  5. 5.

    for each link j = 1,2,…,N L , evaluate the error e j  = |(Q ′  d,k ) j  − (Q d,k ) j |/{0.5[(Q ′  d,k ) j  + (Q d,k ) j ]} (The error is relative to the average of the distributed leakage in order to avoid overflow when the distributed discharge at the previous iteration is null);

  6. 6.

    if \( \underset{j}{ \max }{e}_j \) is smaller than some specified tolerance, then increase k and repeat from step 2. If it is a greater than some specified tolerance, then for each j = 1, 2, …, N L set (Q d,k ) j  = (Q ′  d,k ) j and repeat from step 3 (‘feedback procedure’).

The hydraulic model used in the computations is based on the software EPANET™ (Rossman 2000) and it was implemented using the EPANET™ DLL available for free.

The results obtained with the above described hydraulic model are validated by comparison with the results obtained in Covelli et al. (2016) (see the Sections 3 and 3.1).

2.2 Genetic Algorithm

The GA considered in this work was the same already proposed and used by some of authors to carry out the optimised design of urban and rural drainage networks (Cimorelli et al. 2013; Cimorelli et al. 2014; Cimorelli et al. 2016; Covelli et al. 2016; Cozzolino et al. 2015; Palumbo et al. 2014). In all case studies considered in this paper, the crossover probability p c and mutation probability p m were set equal 1 and 0.01 respectively. These values were set after a few trials, but they have to be chosen case by case from users. The GA maximum iteration numbers N was N it  = 200 in all simulations, while the population size was N i  = 100 in the first case study and N it  = 300 in the second case study. Consequently, 20,000 FF and 60,000 FF evaluations were carried out for the first and for the second case study, respectively. The decision variables consist, for a pre-assigned number of pressure reduction valves N PRV , of the valve positions and settings. In particular, the valve positions are identified not only by the network link but also by the direction in which the valve works.

2.3 Fitness Function

The Fitness Function (FF) conceptually consists of two parts (Covelli et al. 2016). The first one is related to the Costs (C) to be incurred and the second one consists of penalties (P) introduced when one or more constraints are not satisfied. The Costs considered in the FF are the leakage (unaccounted water that may be delivered to other users) and the costs of the valves (purchase, installation and management). The simulation period is assumed to be one day long and the users’ demand pattern is a typical daily demand pattern during the year. The whole yearly amount of water saved is evaluated by multiplying the daily water volume lost, calculated by using the pressure-discharge relationship given by Covelli et al. (2015), with the number of days present in a year.In particular, the FF is:

$$ FF=C+P $$
(1)

where

$$ C={C}_{Water\_ Losses}+{C}_{PRVs} $$
(2)
  • \( {C}_{Water\_ Losses}={c}_1\cdot {W}_{lost}{\displaystyle \sum_{n=1}^{N_{EWT}}{\left(1+{r}_{WL}\right)}^{n-1}}: \) are the costs associated with the loss of earnings as a result of the water lost from the pipes, evaluated at the end of N EWT years of WDS management; N EWT = the expected working time of the valves before their substitution (years); W lost is the expected volume of water lost over 1 year [m3/year]; c 1 is the initial cost for a single cubic meter of water lost (in these case studies this value was assumed equal to 0.818 €/m3, that is a typical value for the Campania Region, Italy, for the water supplied to private users); r WL is the rate at which the price of the volume of water that could be delivered to users if no longer dispersed in the subsurface would grow annually;

  • \( {C}_{PRVs}={\displaystyle \sum_{v=1}^{N_{PRV}}{\left({C}_{PRV\_ Ma\operatorname{int}.}+{C}_{PRV\_ Inst.}\right)}_v}\;: \) are the costs related to the purchase, installation and maintenance of the selected set of PRVs, where: ν and N PRV are the generic PRV and the whole number of PRVs considered in the simulation, respectively (ν = 1,2, ….,N PRV ); C PRV_Maint. are the Costs sustained for the maintenance of both the PRV and manhole; C PRV_Inst. are the Costs sustained for PRV purchasing, for the construction of related manhole and for installing the PRV in the manhole, evaluated at the end of the expected PRV working time;

and

$$ P=p\cdot {\displaystyle \sum_{k=1}^{N_T}\left\{{\displaystyle \sum_{i=1}^{N_{nodes}} \max \left[0,\left({H}_{i, \min }-{H}_{{}_i}^k\right)\right]}\right\}} $$
(3)

where: H i,min is the ‘ideal’ value of the piezometric head at the i-th node [m a.m.s.l.]; H k i is the piezometric head at node j during the k th time step of the EPS [m a.m.s.l.]; N nodes is the number of delivery nodes of WDS; p (equal to 1020 [€/(m year)]) is the ‘specific penalty coefficient’ considered to penalize, and then to exclude (asymptotically), the operating conditions for which the nodal piezometric head at delivery node i is lower than H i,min.

3 Applications of the Proposed Procedure

3.1 Case Studies and Discussion

An application to a first case study (Case 1), presented by Covelli et al. (2016), was performed in order to test the real possibilities of utilization of the optimization procedure with the simplified hydraulic model described in this work. It consists of a WDS serving a population of 31.500 inhabitants composed of N L  = 32 cast iron mains and N N  = 24 nodes. Details about the geometrical data and minimal pressure head as well are reported in Covelli et al. (2016). The WDS delivers a daily average users demand equal to 91.15 l/s, corresponding to 70 % of water distributed each day, because the leakage discharge is supposed to be about 30 % of the total daily average discharge delivered equal to 130.21 l/s. The leaking discharges at the pipe joints were calculated by means of the approach proposed by Covelli et al. (2015), based on the utilization of a complete pressure driven approach where the water lost at each link was evaluated modelling the pipeline joints as emitters nodes (see Fig. 1), with the parameter ξ = 0.55 calibrated to give a leakage volume about 30 % of the total daily average volume. The distance between two joints connecting two consecutive pipes constituting the links was assumed δ = 6 m (commercial cast iron pipes).

The hydraulic simulations were carried out by means of an EPS approach, considering the same time pattern is reported by Covelli et al. (2016) as well as the same PRVs costs for each diameter.

Five simulations were performed with a valves number going from 1 to 5. In this case study, every reach was considered a possible position of the PRV. Then, for each valve there are 64 possible positions: 32 position in the same direction in which the links are drawn and 32 in the opposite direction. The valve settings rage from 0.0 to 5.0 atm. Results of the simulations are reported in Table 1 and the behaviour of the FF and the leakage volume with N PRV are displayed in Fig. 2.

Table 1 The values of FF and the yearly volume of water lost from WDS with the number of deployed PRVs – Case 1
Fig. 2
figure 2

The trends of the Fitness Function and the yearly volume of water lost from WDS with the number of deployed PRVs—Case 1

Comparisons between the FF trends obtained by using the model presented in this work and the model presented in Covelli et al. (2016) are reported in the following Table 2 and displayed in Fig. 3. While, comparisons of the optimal solution obtained with both models are reported in Table 3.

Table 2 The values of FF and the yearly volume of water lost from WDS with the number of deployed PRVs obtained by proposed procedure and Covelli et al. (2016)—Case 1
Fig. 3
figure 3

A comparison of the trends of Fitness Functions variable with the number of deployed PRVs between the presented methodology and Covelli et al. (2016)—Case 1

Table 3 The optimal positioning and setting of the assigned numbers of PRVs obtained by proposed procedure and Covelli et al. (2016)—Case 1

Although the hydraulic model considered within the optimization procedure presented in this paper is simplified, by inspection of Fig. 3, it is clear that the apprach presented here is able to reproduce solution similar to that reported in Covelli et al. (2016) with a more realistic (but more time consuming) hydraulic simulator. Indeed, as one can see from Tables 2 to 3, the solutions provided by the two models are very similar in terms of both FF values and optimal valve positions and settings. The comparisons in terms of saved volume of both models are reported in Fig. 4.

Fig. 4
figure 4

A comparison of the trends of the percentage of the yearly saved volume from WDS with the number of deployed PRVs between the presented methodology and Covelli et al. (2016)—Case 1

For each number of PRVs considered, the percentage of saved volume evaluated by using the simplified approach proposed in this work is very close to that evaluated by using the more sophisticated approach proposed by Covelli et al. (2016). In particular, the best solutions obtained with the two models (five PRVs) differ only about 1 %. Then, in the case examined, the differences between the two approaches appear acceptable from the practical point of view. However, because of both the morphology of the city considered in this case study and WDS layout and diameters, for each assigned number of PRVs, their optimal positioning and setting is often quite different, strongly depending on the hydraulic modelling carried out within the two approaches. The strong influence of morphology and WDS layout and diameters is confirmed by the following observation: when the valve position given by the two optimization approaches is the same, the corresponding valve setting is, in turn, approximatively the same; whereas, when the valves positions given by the two optimization approaches are different, their settings congruently changes in order to attain similar piezometric patterns. For these reasons, the authors believe

For these reasons, the authors believe that the two approaches, although they can apparently lead to different results with regard to the optimum positioning and the setting of pre-assigned groups of PRVs, lead, in fact, almost exactly the same results in the reduction of water losses and optimal management of WDSs. In order to show the validity of the optimization procedure presented in this paper, it was also applied to a second and more complex case study (Case 2). The network, composed of N L  = 52 pipes and N N  = 46 nodes, is supplied by a tank and by pumping system. Details about the network geometry and time patterns are reported in Creaco and Pezzinga (2015). In order to compute the leakage from joints (supposed to be made of hub and spigot), the pipe geometry reported in Table 4 were hypothesized.

Table 4 The geometric characteristics of the pipes and related PRV’s cost of Case 2

In particular, in order to have a leakage volume about 30 % of the daily volume of water delivered , the calibration parameter of the leakage formula by Covelli et al. (2015) was found to be ξ = 0.245. For this case study, all the intermediate points of the network links were considered as possible PRV position, except those internal to the main line (see Creaco and Pezzinga (2015)) to avoid interference with the filling and emptying process of the tank. Fifteen simulations were performed, considering an increasing assigned of PRVs, going from 1 to 15. The results of the simulations are reported in Table 5 and in Fig. 5.

Table 5 The values of FF, the yearly volume of water lost from WDS with the number of deployed PRVs and the optimal positioning and setting—Case 2—( * inverse flow)
Fig. 5
figure 5

The trends of the Fitness Function and the yearly volume of water lost from WDS with the number of deployed PRVs—Case 2

In Fig. 5, the behaviour of the FF and the volume of water lost from the network are reported as a function of the number of PRVs. The optimal positioning and setting of fixed numbers of valves were found for an increasing number of PRVs, first with reference to a case in which all of the costs associated with the valves could be considered null, and then for cases in which it was necessary to consider these costs. Obviously, in the first case, the optimisation performed to search for the minimum value of FF gives the same results obtainable if the search was carried out for the minimum volume of water lost in the WDS. As a consequence, the results obtained in this particular hypothesis should be easily analysed, giving the possibility to demonstrate the ability of proposed approach to achieve the optimal solution for PRVs deployment.

In both cases, the trends for both the Fitness Function and the minimum yearly volume of water lost from the WDS seem to be very consistent with what could be hypothesised. When the number of valves N PRV is increased, not only the yearly volume lost decreases but, due to the progressive redundancy of the valves introduced in the network, the rate of reduction decreases, as well. However, because of the more complex structure of the Network examined in Case 2, the trends related to Case 1 are significantly smoother than those related to Case 2. Indeed, for the second case study, a high N PRV is required in order to achieve an asymptotic behaviour of the FF. This is a direct consequence of the geometrical and topological structure of the WDS considered in the second case. This is also confirmed by the inspection of Figs. 2 and 5: for Case 1, as one can see in Fig. 2, the rate at which the volume lost decreases with the increasing of N PRV becomes small and stable starting from N PRV  = 3, while for Case 2 it becomes small starting from N PRV  = 12.

In both cases, the trend with which FF varies with the number of valves shows the tendency, for the increasing N PRV values, to reach the maximum of the net benefit (defined as the difference between the economic value of the volume of water that is not more dispersed and the cost of the valves necessary to achieve the water savings).

This tendency is confirmed by the trends shown in Fig. 6, in which a cost-benefit analysis is carried out to compare the direct costs needed for WDS rehabilitation by the introduction of the given set of PRVs with the direct benefits of leakage reduction for a 25-year period.

Fig. 6
figure 6

The Cost-Benefit curves—Case 1 and Case 2

This analysis, though does not considerate the environmental aspects, such as the greenhouse gas emissions (Venkatesh 2012), but only the economic saving, seems suitable for evaluating the optimal number of valves to use.

Figure 6 shows that the rate at which the net benefits grow with the investment costs for PRVs tend to decrease when the investment costs increase. Indeed, in Case 1 when N PRV  = 4, the growth rate of the net retractable benefits from the investment made for the valves tends toward zero, while for Case 2, it becomes negligible with N PRV  = 12. Therefore, it seems not convenient to consider more than N PRV  = 4 for Case 1 and N PRV  = 12 for Case 2.

4 Conclusions

In many cases of practical interest, the reduction of leakage in WDSs can be obtained by reducing the pressure through the system: this, in turn, leads to the reduction of the costs associated with the loss of water. Special devices, such as the PRVs, can be used to regulate the pressure, but their use introduces additional costs due to the implementation and operation of the valves. In this paper, a procedure for the optimal positioning and setting of increasing sets of valves coupled with a simplified hydraulic modelling of pressure dependent leakages through links is presented. The procedure was first demonstrated by using a realistic small network, and comparing the results with those obtained by another optimization procedure that uses a more complicated hydraulic simulator, and then applied to a more complex water distribution system.

It is well known that the reduction of water leakage leads to energy savings in pumped systems, and the pressure management actions performed lead to cost savings, which arise from the reduced rate of pipe breakage. The approach proposed in the present work, even though these sources of financial savings are not explicitly taken into account, is completely general. Thus, to minimise simultaneously the water loss and the energy and pipe rehabilitation costs, the economic analysis framework considered in this paper can be easily enriched by using a multi-objective function to consider these additional beneficial effects.