# Burst Detection in Water Distribution Systems:
## 2 Methodology
### Water Consumption Hydraulic Simulation
The solver used for performing the hydraulic simulations is based on a Menapace and Avesani numerical scheme [34]. This hydraulic solver enables simulating both distributed along a pipe and lumped at nodes water withdrawals with a pressure-driven approach using the GGA method [35]. Since the mathematical equations on the basis of the DFPDM have been presented, the modeling of the different components of the water losses is herewith specified. Firstly, the water demand is modeled with the pressure-demand relationship [33] and the distributed along pipe demand scheme [34]. The accuracy of this approach, which has been proved in [36; 37], is given by the uniformly widespread withdrawals along each pipe of the network depending on the pressure along it, as follows:  
\[pd_{ij}=d_{ij}(h_{ij}). \tag{12}\]  
In the case of normal operating pressure conditions, the water demand \(pd_{ij}\) of the _ij-th_ pipe results in being equal to the water request \(d_{ij}\), which is therefore fully satisfied. On the other hand, Equation (12) shows that the water request is only partially satisfied in case of scarce pressure conditions, and it depends on the pressure drop along the _ij-th_ pipe. Secondly, the background leakages also adopt the distributed scheme that is well suited to small and diffuse water losses. This type of losses are represented as  
\[pl_{ij}=\beta_{1}(\overline{\hat{h}_{ij}})^{\beta_{2}} \tag{13}\]  
where \(\beta_{1}\) and \(\beta_{2}\) are the formula parameters representing the magnitude and the power, respectively, while \(\overline{\hat{h}_{ij}}\) is the average pressure of the _ij-th_ pipe that is calculated as the difference between the hydraulic head \(h_{ij}\) and the pipe level \(z_{ij}\). The background losses usually are settled by means of a calibration procedure involving an optimization algorithm on some parameters, e.g., pipe roughness, water demand, and losses of the hydraulic model. Thirdly, the water bursts are implemented in the model using lumped withdrawals at the nodes with different formulations depending on the type of pipe breaks. Three types of pipe breaks are considered: longitudinal, circumferential, or spiral cracks. According to [38; 39; 40; 41], the universal formula of the three bursts for the \(i\)-\(th\) node reads as  
\[p_{ij}=pd_{ij}+pl_{ij}, \tag{5}\]0  
where \(C_{d}\) denotes the coefficient of discharge, \(g\) is the gravity acceleration, and \(\hat{h}\) is the pressure at the \(i\)-\(th\) node. Instead, \(A_{0,i}\) and \(m_{i}\) define the initial leak area and the head-area slope of the pipe where the break is located (node \(i\)), respectively. The head-area slopes \(m_{i}\) of the three type of cracks are defined according to [41] through the following equations:  
\[p_{ij}=pd_{ij}+pl_{ij}, \tag{5}\]1  
\[p_{ij}=pd_{ij}+pl_{ij}, \tag{5}\]2  
\[p_{ij}=pd_{ij}+pl_{ij}, \tag{5}\]3  
for the longitudinal, circumferential, or spiral cracks, respectively. \(d\) is the pipe diameter, \(L_{c}\) is the crack length, \(\sigma_{l}\) is the longitudinal stress, \(\rho\) is the water density, \(E\) is modulus of elasticity, and \(t\) pipe thickness. The water bursts are therefore functions of the type of crack, the pipe characteristics (e.g., material), and the hydraulic pressure. This thorough bursts implementation allows for generating realistic punctual water losses with a wide variety in type and magnitude. Indeed, a burst generator is coupled with the hydraulic DFPDM for supporting the random generation of pipes break due to the possibility of generating three types of bursts with their own characteristics: probability of failure, location, outflow, and duration. First of all, the probability of failure of an individual pipes at each time step is defined using the Poisson probability distribution [42], as follows:  
\[p_{ij}=pd_{ij}+pl_{ij}, \tag{5}\]4  
where \(L_{ij}\) and \(br_{ij}\) represent the length (as mentioned above) and the break rate of the _ij-\(th\)_ pipe.