## 3 Numerical Modelling in Single Pipelines
### 3D CFD Model vs. Mathematical Model
In this case, the peak flow of the three-dimensional CFD model was greater than the peak flow of the mathematical model. In Test C2-1 (Figure 11c), water flow patterns of the mathematical and CFD models showed good agreement in their physical behaviour, whereas the mathematical model predicted a peak discharge flow of 0.636 L/s, while the peak discharge flow predicted by the 3D CFD model was 0.632 L/s. Finally, in Test C2-2 (Figure 11d), the numerical pattern of the CFD model adequately predicted the trend of the volumetric flow rate of the mathematical model, presenting a good agreement in the physical behaviour. On the one hand, the mathematical model of Test C2-2 reached a maximum flow rate of 0.49 at \(t=0.465\) s, whereas the 3D CFD model predicted two maximum peaks flows with values of 0.50 L/s at \(t=0.27\) s and 0.516 L/s at \(t=1.15\) s.  
In addition, the utilisation of the turbulence model was validated as a function of the maximum Reynolds number presented in the different tests, given through the information of the maximum flow rate and the hydraulic section for diameter \(\phi=0.042\) m. Table 7 shows the general distribution of the maximum Reynolds numbers predicted in each numerical model, where the range presented was from 2.667 to 19.183, so the hydraulic scenarios were in the turbulence and transition region, which are suitable indicators to validate the use of the SST \(k\)-\(\omega\) turbulence model. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Test** & \(Q_{w,max}\) **(Math.)** & \(R_{e}\) **(Math.)** & \(Q_{w,max}\) **(CFD)** & \(R_{e}\) **(CFD)** \\ \hline C1-1 & 0.286 & 8682 & 0.223 & 6760 \\ C1-2 & 0.088 & 2677 & 0.110 & 3335 \\ C2-1 & 0.636 & 19,285 & 0.632 & 19,183 \\ C2-2 & 0.490 & 14,871 & 0.516 & 15,660 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Maximum water drainage velocities and Reynolds numbers obtained in emptying tests of a single pipe (\(Q_{w,max}\) in units of L/s). The water flow patterns during drainage processes obtained from the 3D CFD models show similar behaviour to the results obtained from the mathematical model; nevertheless, there is a difference in the peak flow values of the two models. It is important to mention the difference between the mathematical model and the 3D CFD model, in terms of the influence on water flow patterns, which is based on the simulation conditions of the ball valve opening percentage. The mathematical model considers the addition of a coefficient of resistance (\(R_{v}\)) equivalent to the head losses generated by the opening percentage of the ball valve. The value of \(R_{v}\) is variable from \(t=0\) s to the end of the opening manoeuvre, which is the difference between the mathematical model and the 3D CFD model. The difference between the mathematical model and the 3D CFD model is due to the fact that the 3D CFD model is able to predict the difference between the mathematical model and the 3D CFD model. Figure 11: Comparison between water flow patterns during emptying processes of a single pipe. (**a**) Test C1-1, (**b**) Test C1-2, (**c**) Test C2-1 and (**d**) Test C2-2. depends on the degree of opening at different time instants. On the other hand, the 3D CFD model uses a solid-body motion function to simulate the ball valve through a cylinder with curved surfaces. When the cylindrical mesh contacts the pipes in the 3D CFD model, it allows water to pass between the upstream and downstream sections. Proper simulation of a valve opening manoeuvre has been a challenge in modelling, since it is a manual procedure in practice and susceptible to errors during its representation in hydraulic models. A correct simulation of the ball valve-opening manoeuvre guarantees a higher accuracy of the results and allows an adjustment of the model to real hydraulic conditions.