## 4 Numerical Setup
### Verification and Validation  
Verification is the process of assessing the numerical uncertainty of results and verifying the convergence of results obtained by iterative methods [24]. The total numerical  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Grid** & **Number of Cells** \\ \hline Coarse mesh & 1,191,294 \\ Medium mesh & 2,537,981 \\ Fine mesh & 5,513,192 \\ \hline \hline \end{tabular}
\end{table}
Table 2: The number of cells in the numerical simulations.  
Figure 4: Discretization of the free surface.  
Figure 5: Discretized boundary layer along the hull.  
Figure 6: Discretized boundary layer along the bottom (left) and side (right) boundaries.  
Figure 7: Distribution of parameter \(y^{+}\) along the hull.  
uncertainty \(U_{SN}\) was determined based on the number of iterations \(\delta_{I}\), grid size \(\delta_{G}\), time step \(\delta_{T}\), and other parameters \(\delta_{P}\), and it is calculated as follows:  
\[U_{SN}^{2}=U_{I}^{2}+U_{G}^{2}+U_{T}^{2}+U_{P}^{2} \tag{4}\]  
where \(U_{I}\) represents the numerical uncertainty due to the number of iterations, \(U_{G}\) is the numerical uncertainty due to the grid size, \(U_{T}\) denotes the numerical uncertainty due to the time step, and \(U_{P}\) stands for the numerical uncertainty due to other parameters.  
This research assesses the numerical uncertainty stemming from grid size and time step variations in the determination of the total resistance, trim, and sinkage of a ship model navigating in shallow and confined water. The numerical uncertainty due to the number of iterations and other parameters can be disregarded. In the verification process, the mesh and time step were refined by a constant factor, referred to as the refinement factor \(r\) equal to \(\sqrt{2}\) for the grid size and 2 for the time step [25].  
To establish the convergence ratio based on the differences in solutions obtained with different mesh densities and time steps, a minimum of three solutions is necessary:  
\[\varepsilon_{i,21}=\phi_{i}-\phi_{j} \tag{5}\]  
\[R=\varepsilon_{i,21}/\varepsilon_{i,32} \tag{6}\]  
where \(\phi\) represents the solution, \(\varepsilon_{ij}\) is the difference between the obtained results, and \(R\) stands for the convergence ratio. Table 3 provides the types of convergence categorized according to convergence ratios.  
For the case of monotonic convergence, generalized Richardson extrapolation was used to estimate numerical uncertainty, with the expressions for calculating the error \(\delta_{RE}^{*}\) and the order of accuracy \(p_{i}\) given as follows:  
\[\delta_{RE}^{*}=\frac{\varepsilon_{i,21}}{r_{i}^{pi}-1} \tag{7}\]  
\[p_{i}=\frac{\ln\left(\frac{\varepsilon_{i,32}}{\varepsilon_{i,2}}\right)}{ \ln(r_{i})} \tag{8}\]  
Validation is the process of determining the deviation of obtained numerical results from available experimental data. Validation enables an assessment of the accuracy of numerical simulations and provides insight into the capability of a mathematical model to describe real phenomena [26]. The comparison of the numerically obtained total resistance with the one obtained experimentally is given based on the relative deviation determined by the following expression:  
\[RD=\frac{R_{\text{T,CFD}}-R_{\text{T,EFD}}}{R_{\text{T,EFD}}}\cdot 100\% \tag{9}\]  
where \(R_{T,CFD}\) is total resistance obtained from numerical simulation, and \(R_{T,EFD}\) represents total resistance determined experimentally. The relative deviations of sinkage and trim were determined analogously to the relative deviation of total resistance, as shown in Equation (9).  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Convergence Ratio** & **Convergence Type** \\ \hline \(-1<R_{i}<0\) & Oscillatory \\ \(0<R_{i}<1\) & Monotonic \\ \(|R_{i}|>1\) & Divergence \\ \hline \hline \end{tabular}
\end{table}
Table 3: Types of convergence.