# An Analytical Model for the Prediction of Emptying Processes in Single Water Pipelines
## 2 Mathematical Model  
This section revisits the mathematical model proposed by [PERSON] et al. [5] for analysing the emptying process in a single pipeline. The model provides a comprehensive framework to describe the transient interaction between the water and air phases during emptying operations. Figure 1 presents a schematic representation of a pipe segment containing an entrapped air pocket. The assumptions made to describe this phenomenon are based on the following considerations:  
* The water phase is considered incompressible, as the air phase's elasticity is significantly higher than that of the water phase. * The single pipe's slope, diameter, and roughness are assumed to be constant. * A constant friction factor is employed, representing the losses according to the Darcy-Weisbach equation [10,19-22]. * The polytropic law is used to model the air pocket pressure [22]. * An instantaneous opening of the regulation valve at the downstream end is assumed, facilitating the air release process. * The air-water interface is modelled using the piston flow model, which is valid for small pipe diameters and hydraulic slopes, ensuring no free surface flow occurs [21]. One of the three formulations' main advantages is its ability to capture different polytropic behaviours. Specifically, an adiabatic process is represented with a polytropic coefficient of 1.4, an intermediate process with a coefficient of 1.2, and an isothermal process with a coefficient of 1.0. Then, the phenomenon is modelled as follows:  
* Water column behaviour [5,11]: The water column can be modelled using the rigid water column approach. \[\frac{dv_{w}}{dt}=\frac{p_{1}^{*}-p_{atm}^{*}}{\rho_{w}L_{e}}+g\frac{\Delta z _{1}}{L_{e}}-\frac{fv_{w}|v_{w}|}{2D}-\frac{R_{v}gA^{2}v_{w}|v_{w}|}{L_{e}},\] (1) where \(v_{w}\) is the water velocity, \(p_{1}^{*}\) is the air pocket absolute pressure, \(p_{atm}^{*}\) is the atmospheric pressure, \(\rho_{w}\) is the water density, \(L_{e}\) is the water column length, \(g\) is the gravity acceleration, \(\theta\) is the pipe slope, \(f\) is the Darcy-Weisbach friction factor, \(D\) is the internal pipe diameter, \(A\) is the cross-sectional area, \(R_{v}\) is the resistance coefficient  
Figure 1: General scheme of an emptying process with an entrapped air pocket. of a regulating valve, and \(Q_{w}\) is the water flow. Minor losses (\(l_{m}\)) through a regulating valve are estimated using the formula \(h_{m}=R_{\triangleright}Q_{w}^{2}\). It should be noted that the closed air pocket prevents the complete drainage of the water, thus avoiding \(L_{e}\) from reaching zero. In other words, as the water drains, the pressure in the air pocket decreases until it matches the external atmospheric pressure, without the contents being fully emptied. Subsequently, the water column begins to refill, causing the pressure inside the air pocket to rise above the atmospheric pressure, and the draining process resumes. This cycle describes a continuous oscillatory dynamic. * Air-Water interface [22]: The piston flow model defines the interface between the water and air phases as follows. \[v_{w}=-\frac{dL_{e}}{dt},\] (2) where \(L_{e,0}\) is the initial value of \(L_{e}\). * Polytropic air evolution [19]: The air pocket pressure can be approached using the polytropic law. \[p_{1}^{*}V_{a}^{k}=p_{1,0}^{*}V_{a,0}^{k}\quad\text{or}\quad p_{1}^{*}x^{k}=p_ {1,0}^{*}x_{0}^{k},\] (3) where \(V_{a}\) is the air volume, \(V_{a,0}\) is the initial air volume, \(p_{1,0}^{*}\) is the initial value of \(p_{1}^{*}\), \(k\) is the polytropic coefficient, \(x\) is the air pocket size, and \(x_{0}\) is the initial value of \(x\). In summary, the system of Equations (4)-(6) fully describes the process. This system, along with the appropriate initial and boundary conditions, can be solved for the variables \(v_{w}\), \(L_{e}\), and \(p_{1}^{*}\). The initial and boundary conditions, along with the gravity term, are given by:  
* Initial and boundary conditions: At the beginning, the system is assumed to be at rest (\(t=0\)).