**3. Methodology**

*3.1. Hydraulic Model Design*

To realistically describe a WDN, the nodal density should be high enough to effectively describe both the area's topographic variability as well as the original connectivity of the network, while considering all necessary hydraulic parameters (e.g., pipe material and diameter). Under this concept, we chose to place computational nodes at the following: (a) intersections between two or more pipes, (b) changes in pipes' diameters and/or material, (c) fire hydrant locations, (d) dead ends, and (e) at the locations of high-water demand consumers [6].

To take into account the area's topographic variability (which highly affects the analysis's pressure outcome; see [7–9]), we used a sensitivity analysis to determine an appropriate nodal density. Figure 2 summarizes the corresponding EPANET simulation's time complexity (i.e., the computational time), in terms of network's nodal density (i.e., number of nodes per km). It can be observed that time complexity increases almost exponentially with increasing nodal density for all four cases, as a result of the heavier computational load. Selection of a proper solution (i.e., nodal density) is achieved through an optimal trade-off between time complexity and the required accuracy of the simulation, tailored to each specific case, as a function of topographic variability. For the purposes of the current study, we opted to incorporate 10 nodes per km (i.e., at least one computational node per 100m),asforlargernodaldensitiesthecomputationaltimeincreasessignificantly.

**Figure 2.** EPANET simulation's time complexity for the four PMAs considered, in terms of network's nodal density: (**a**) Boud, (**b**) Kentro, (**c**) Panachaiki, and (**d**) Prosfygika.

### *3.2. Real Losses (RL, Leakages) Allocation*

To perform the hydraulic simulation, firstly, we determined the total water demand at each network node, and divided it into two parts: a demand-driven component and a pressure-driven component. The former is based on the flow pattern, as consumers' usage varies throughout the day, while the pressure-driven component accounts for network leaks, which increase when the applied pressure increases. The modeling of leaks is done by assuming that the leakage rate is proportional to the square root of the difference between the actual nodal pressure and the minimum pressure necessary to fulfill consumption

requirements. To do so, we multiply the initial leakage rates at each computational node by the parameter:

$$\mathcal{L}\_{\hat{j}} = \frac{(s\_{\hat{j}} - s\_{\hat{j}}^{\*})^{0.5}}{\sum\_{j=1}^{n} (s\_{\hat{j}} - s\_{\hat{j}}^{\*})^{0.5}}, \text{ for } s\_{\hat{j}} > s\_{\hat{j}}^{\*} \tag{1}$$

where *sj* is the numerically simulated head at node *j* = 1, ... , *n* (i.e., the sum of nodal elevation and pressure head), and *sj* \* is the minimum threshold head at node *j* (i.e., the sum of nodal elevation and the minimum required pressure head). The hydraulic simulation is repeated until convergence (see [9]).

### **4. Results**

We implemented the proposed hydraulic modeling methodology (see Section 3) for the four largest pressure managemen<sup>t</sup> areas of the water distribution network of the city of Patras, based on their geometric characteristics and hydraulic parameters as well as the area's altitudinal variation. In order to estimate the water consumption, we used flow-pressure data at 1 min temporal resolution for the 4-month-long summer period from 1 June 2019–31 August 2019, with the data having been collected from the pressure regulation stations of the water distribution network (WDN) of the City of Patras in Western Greece. Flow and pressure data for each of the four stations were obtained from the Municipal Enterprise of Water Supply and Sewerage of Patras (DEYAP) and were quality checked to identify and eliminate errors resulting from communication issues and other data transmission malfunctions.

Figure 3 illustrates the nodal pressures and water velocity results for PMAs Boud (Figure 3a), Kentro (Figure 3b), Panachaiki (Figure 3c), and Prosfygika (Figure 3d), which were obtained through hydraulic simulations using the EPANET 2.x solver for the design and analysis of water networks. It is noted that in all cases the minimum pressure requirements (21 m in PMA Boud, 24 m in PMAs Panachaiki and Prosfygika, and 28 m in PMA Kentro) and maximum speed requirements were met (based on pipe diameters; for more info, see [6]).

In order to test the accuracy of the proposed methodology, we use on-site pressure data obtained by DEYAP through smart pressure meters located at the most distant nodes of PMAs' pressure-regulating valves (i.e., the points in Figure 3 marked in blue). Table 2 summarizes the calculated pressure values obtained from the smart metering system and the corresponding pressure values obtained by the EPANET solver.


**Table 2.** Modeled and on-site metered pressure values of the four largest pressure managemen<sup>t</sup> areas (PMAs) of the city of Patras. Numbers are linked to the positions in Figure 1.

It is observed that the proposed methodology results in almost identical pressure values as the on-site metering, with absolute relative deviations not exceeding 10% for all four cases (7.615%, 9.219%, 3.733%, and 5.139% for PMAs Boud, Kentro, Panachaiki, and Prosfygika, respectively), indicating the robustness of the proposed methodology.

**Figure 3.** Nodal pressures and water velocity results for PMAs: (**a**) Boud, (**b**) Kentro, (**c**) Panachaiki, and (**d**) Prosfygika, obtained through hydraulic simulations using the EPANET solver. PMA locations are illustrated in Figure 1.
