# An Analytical Model for the Prediction of Emptying Processes in Single Water Pipelines
## 5 Discussion  
The original coupled model defined by Equations (4)-(6) has been reduced to a single second-order nonlinear ordinary differential equation in the water column length \(L(t)\) (see Equation (13)). This formulation captures the intrinsic oscillatory dynamics arising from the air-water interface reversal, but the presence of \(|\frac{dL}{dt}|\) renders direct integration intractable. By introducing the change of variables \(u(L)=\frac{dt}{dt}\), it is possible to eliminate the absolute value nonlinearity and recast the problem into the linear first-order ODE for \(u^{2}(L)\) (see Equation (18)), valid over monotonic segments of \(\frac{dL}{dt}\). This key transformation not only simplifies the analytical treatment but also yields explicit integral expressions for \(u^{2}(L)\) in both regimes \(\frac{dL}{dt}\geq 0\) (see Equations (20)-(22)) and \(\frac{dL}{dt}\leq 0\) (see Equations (32)-(34)). Constructing the global solution thus requires stitching together these local solutions at the sign change instants \(t_{k}\) (where \(\frac{dL}{dt}=0\)). In this research, the switching times were determined numerically by locating zeros of the water velocity in the reduced model; thereafter, the piecewise integrals were evaluated to produce continuous profiles of \(L(t)\), \(v(t)\), and \(p_{1}^{*}(t)\) (Figures 3-5) that agree closely with fully numerical simulations of the original system. Moreover, the series expansions of the special integrals \(I_{j}\) and \(F_{j}\) converge rapidly; even truncating after seven terms recovers the numerical velocity profile almost exactly (Figure 6), demonstrating the practical utility of the analytical analysis. Although solutions (36)-(38) obtained from (20) and (32) are not explicitly continuous or differentiable for \(t\geq 0\) (especially on \(t_{k}\) with \(k=0,1,2,...\)), the fact that both (18) and (31) were derived from (13) ensures that \(v(t)=-\frac{d^{2}L(t)}{dt^{2}}\) is defined globally for \(t\geq 0\), and therefore, \(v=-\frac{dL(t)}{dt}\) and \(L(t)\) are continuous and differentiable for \(t\geq 0\). On the other hand, the simplified model can be as precise as desired whenever the time subintervals determined by the values \(t_{k}\) with \(k=0,1,2,...\) are computed correctly depending on the sign of \(v(t)\). However, there are some errors generated while computing \(v\), \(L\), and \(p_{1}^{*}\) from expressions (36)-(38). These errors arise from the truncation of the numerical computations of the integral terms (\(A(L)\), \(B_{1}(L)\), \(\mathcal{I}_{j}\), and \(B_{2}(L)\)) and the series \(\mathcal{F}_{j}\). In addition, round-off errors might come up due to hardware architecture and software configuration used for calculations. All these errors can be compensated by selecting an appropriate step size for the time variable. The proposed model could be further optimised from a physical standpoint by acknowledging that the air-water interface may adopt various configurations--such as  
Figure 8: Comparison of the maximum air pocket pressure between computed and measured values. bubble flow, plug flow, stratified wave flow, and stratified smooth flow--rather than assuming a strictly vertical profile. These flow regimes are particularly relevant in pipelines with larger diameters or lower longitudinal slopes. Furthermore, the current mathematical model does not account for the effect of air backflow, which may occur especially in large-diameter pipes, where air can travel from the regulating valve at the downstream end back towards the upstream end. Finally, the proposed solution method, which treats the cases in which the velocity changes direction separately, can be generalised to describe oscillations involving dissipative forces proportional to the square (or another even power) of the water velocity but acting in the opposite direction. This approach could be applied to the solution of ordinary differential equations that include sign-changing terms, such as those that involve absolute values of the variable under study.