*2.3. Level-Set Method*

HUST-Ship can capture the change of free surface based on the single-phase level-set [26] method. The level-set method is a general calculation method for tracking interface motion, which was widely used in the field of numerical simulation; the free surface was thought of as an interface. The term ϕ is the distance from a point of the field to the free surface. It is always the case that ϕ = 0 represents all points on the position of the free surface, a positive value of ϕ represents a particle in air and a negative value represents a point in water. Compared with the classical multi-phase level-set method and the volume of fluid (VOF) method [27], the discrepancy of single-phase level-set method is very small as

it ignores the effects of air since the influence of air on free-surface ships is very small. The level-set function [28] is:

$$\frac{\partial \varphi}{\partial t} + V \nabla \varphi = 0 \tag{12}$$

where V is the vector of the velocity within the domain and only the flow of water would be solved in the area of ϕ ≤ 0. The position of the free surface (ϕ = 0) can be obtained using interpolation. The boundary condition for the velocity at the interface can be defined as:

$$
\nabla V \cdot \boldsymbol{n}\_{\dot{j}} = 0 \tag{13}
$$

in which *nj* is the normal vector and can be defined as:

$$m\_{\hat{j}} = \frac{\frac{\partial \varphi}{\partial x\_i}}{\left| \frac{\partial \varphi}{\partial x\_i} \right|} \tag{14}$$

The main advantage of the level-set method is that the quality of the grid is stable and easy to control.

#### *2.4. Wall Function*

For the calculations of full-scale vessels, the high Reynolds number led to a need for a smaller boundary layer thickness, which increased the grid quantity. Therefore, a wall function is introduced to deal with the near-wall situation, and a multi-layer wall function of a two-point model is adopted, wherein the velocity of the first node far away from the wall can be obtained from the following equation:

$$\frac{\Delta L}{u\_{\tau}} = \ln y^{+} + B - \Delta B \tag{15}$$

where *u*<sup>τ</sup> = Γ<sup>ω</sup> <sup>ρ</sup> is the tangential velocity; <sup>Γ</sup><sup>ω</sup> is the wall shear stress; and *<sup>y</sup>*<sup>+</sup> <sup>=</sup> *<sup>u</sup>*<sup>τ</sup> *<sup>y</sup>* <sup>ν</sup> is the dimensionless wall distance. The constant values are κ = 0.41 and B = 5.1; ΔB is a correction term considering wall friction and thinning of the logarithmic layer, which is defined as:

$$
\Delta B = \kappa^{-1} \ln(1 + \varepsilon^{+}) - 3.5 \tag{16}
$$

where ε<sup>+</sup> = *<sup>u</sup>*τε <sup>ν</sup> is dimensionless surface roughness and ε is the surface roughness. For full-scale calculations, the Tokyo 2005 workshop carried out the model-scale self-propulsion computations of the KCS using the dimensionless skin friction correction factor SFC<sup>∗</sup> = 1.3294 <sup>×</sup> 10<sup>−</sup>3, from which the value of the surface roughness ε for the KCS scaled model can be derived to be 32 μm according to the literature [29], while ε=0 is assumed for model-scale calculations.

The value of y<sup>+</sup> is controlled by giving the first wall thickness of the boundary layer Δs as [30]:

$$
\Delta \mathbf{s} = 8.6y^{+}LR\_{\mathbf{t}}^{-\left(\frac{13}{14}\right)}\tag{17}
$$

in which, L is the input length of the ship, for the HUST Ship solver, all input parameters are nondimensionalized by the characteristic length Lpp and the service ship speed u0, so the input length of the ship is 1. In this study, the target values of the wall y<sup>+</sup> are 1 and 30 for model scale and full scale respectively.

#### *2.5. Overset Grid Technology*

The overall flow field is usually divided into a system of grids which overset one another by one or more grid cells. As shown in Figure 2, the points of mesh 1 that fall into the solid surface of mesh 2 are marked as hole points which do not participate in the calculation of the flow field. The points adjacent to the hole points in grid 1 are hole boundary points. These points accept the flow field information transmitted from mesh 2 through interpolation. Correspondingly, the outer boundary points of mesh 2 would also receive the flow field information transmitted from mesh 1 through interpolation, which is obtained by the trilinear interpolation method. The area between the hole boundary point of mesh 1 and the interpolation point of the mesh 2 outer boundary is the overset area.

**Figure 2.** Details of the overset mesh.

Three steps are required for the overset approach: hole cutting, the identification of interpolation points, and the identification of donor cells. The purpose of hole cutting is to remove unnecessary cells before calculation. The cutting face will be set in the area which needs to be removed, and then the grid points that fall into cutting face will be identified and discarded in the CFD computation process. The hole mapping method is employed for the hole-cutting process. The interpolation point identification identifies two types of interpolation points, as illustrated in Figure 2: hole-fringe points and outer boundary points. The hole-fringe points, as any point near a hole point, are easily identified. The outer-boundary point is any point that lies on the boundary of a computational mesh. The donor cells identification identifies the hexahedral donor cells with the interpolation points as the vertex. The simplest and most reliable way to find donor cells is to traverse the entire mesh domain until the correct cells are found. However, the efficiency of this method is the lowest and the use of an excellent data structure can improve the seeking speed. The attribute distributed tree (ADT) approach is employed for the donor search process.

#### **3. Problem Setup**

### *3.1. HUST-Ship Solver*

Based on solving the dimensionless conservation equations of mass and momentum, HUST-Ship adopted the SST k-ω turbulence model to simulate the turbulent flow and multibody and multi-coordinates were employed to solve the 6DOF motion of ships. The structured overset grid technology was used for grid discretization, coupled with the single-phase level-set method to capture the change of the free surface. As a mature CFD solver applicable in the domain of ship hydrodynamics, much previous work has proved the ability of HUST-Ship [31,32].

The whole workflow is shown in Figure 3.

**Figure 3.** The workflow flowchart.

#### *3.2. Ship Geometry*

The principle parameters of the KCS are given in Table 1.

**Table 1.** Main parameters of ship geometry.


All the parameters were nondimensionalized by the characteristic length LPP and the service ship speed v before the calculation was conducted. A complete geometry database of the ship is provided by Tokyo 2015 CFD workshop website [33].

#### *3.3. Computational Domain and Boundary Conditions*

The prismatic rectangular computational domain was generated to simulate the flow around the KCS. For full-scale calculations, a larger Reynolds number resulted in the need of thinner boundary layers, which increased the number of mesh cells. Due to the symmetry of the ship geometry and the 2DOF ship motion, the hydrodynamic characteristics of the ship obtained by half of the computational domain and the whole computational domain are the same, so only half of the ship and domain were used for full-scale calculations to reduce the number of mesh cells.

Figures 4 and 5 show the computational domains and the boundary conditions of the model scale and full scale respectively. The upstream is the "Inlet" boundary condition and the downstream is the "Exit" boundary condition; the Y = 0 plane of full-scale calculations is set as the symmetrical plane boundary condition "X-axis symmetry"; the side of the tank is set as a constant velocity boundary condition "Zero gradient"; the top of the domain is a far-field boundary condition "Farfield#2"; for limited water depths, the bottom of computational domains are set as the impermeable boundary "Impermeable slip, no force", on which the force will not be calculated by the solver, while it is usually set as a "Farfield#1" boundary condition in deep water simulations.

**Figure 5.** The computational domain for the full-scale calculations.

Table 2 shows the mathematical description of the boundary conditions listed above.


**Table 2.** The mathematical description of boundary conditions.

To simulate the different water depths of the towing tank, computational domains of different sizes are established. Since only the effect of water depth is of concern in this study, i.e., the effect of the tank wall should be ignored, so a series of computational domains that are of sufficient length and width are used. Table 3 shows the size of the full-scale computational domains.

**Table 3.** The CFD computational domain size of the full-scale (half hull).


Table 4 shows the size of the model-scale domains.


**Table 4.** The CFD computational domain size of the model-scale (full hull).

Figures 6 and 7 give the grid of hull surface and the distribution of the overset grid of the whole computational domain respectively. Figure 8 shows the transverse and longitudinal mesh sections of the overset domain near the hull respectively.

**Figure 7.** The overset grid of the computational domain.

**Figure 8.** 2D mesh sections: (**a**) midsection in the Y = 0 plane and (**b**) midsection in the X = 0.5LPP plane.
