*3.1. Domain, Boundary Condition, and Damping Factor*

In fluid dynamic simulations of a towing tank test, it is not advised to use the real dimensions of the towing tank for the computational domain. In fact, it is only required that the boundary conditions do not influence the physics within the domain; thus, using the real tank for sizing the domain would be a waste of resources that would bring no benefit on accuracy [20].

However, the domain's dimensions do have an important impact on the fluid dynamics and are linked to the speed of the test. It is fundamental to capture the wave pattern reasonably well, in order to evaluate the amount of energy that is subtracted from the boat. In this regard, the domain needs to be large enough to contain about 6 wavelengths behind the hull; in this way, it is possible to accurately compute the contribution to the total drag due to the perturbation of the wave field after the transition of the hull, usually referred to as wave-making resistance [13,14].

Another important aspect that influences the domain's dimensions is wave reflection, which is undesirable and should be avoided.

The reflection problem is of crucial importance in both real towing tanks and numerical tanks. It is not possible to produce accurate and meaningful measurements when the tank or the computational domain is perturbed with reflected waves coming from all directions. This leads to bad measuring in real cases and/or simulation crash in the case of numerical tanks.

A simple approach is used to solve this issue in real and in CFD tanks: A large damping zone is introduced at the boundaries of the tank in order to absorb most of the energy of the incoming waves before they are reflected, hence leaving the domain undisturbed from reflection. In numerical simulations, the length and the intensity of this damping zone must be related with the domain dimensions, wavelength, and wave height. For our case, a damping zone of two times wavelength is enough to prevent wave reflection at boundaries [21–23].

At this point, it is clear that a parametric approach represents the best choice in order to save computational time, where domain length, mesh refinement, damping zone, and other important parameters are functions of the wavelength and thus of the speed of test. In this regard, a reference length (RL), which is the longer length between hull-length and wavelength, was chosen, and the domain's dimensions are a function of the reference length, as shown hereafter and in Figures 5 and 6:


It is worth noting that the dimension in front of the boat is not parametric but fixed because waves do not propagate in that direction.

A damping zone of two wavelengths acting on outlet and side boundaries was added to these dimensions; intensity and length of damping was evaluated in accordance with [24].

Following bibliography and the Star-CCM+ guidelines, boundary conditions were set as follows [20,25], and are shown in Figure 4:


**Figure 4.** Boundary conditions.

Figures 5 and 6 show the dimensions of the overset and background regions:

**Figure 5.** Front view of the domain.

**Figure 6.** Side view of the domain.

#### *3.2. Mesh Generation*

The model deals with a moving body, because the final dynamic equilibrium position the hull reached under different velocities was not known a priori. In CFD, there are two ways to deal with a moving body: Mesh morphing/remeshing and overset mesh. Mesh morphing is better when the movements of the body are very small, so the cell quality does not decrease and few remeshing operations are needed. Overset mesh is used if, when dealing with large motion, a mesh morphing approach becomes unstable and too time-consuming due to several remeshing operations required. Using the overset approach, no re-mesh operation is needed because the mesh never deforms, nor does its quality decrease, since it moves with the body and remains unaltered [24,25].

A mesh morphing approach suited the application under consideration well, since the dynamic equilibrium was not far from the static one and there were incoming no waves that would induce large movements of the hull.

On the other hand, in order to deal with a head sea, the overset approach became necessary due to the large expected motion of the hull. Therefore, although there was no incoming wave in this study, an overset motion was implemented since the same CFD model can be used for further analysis to also comprise incoming waves [26].

The domain was thus divided into two separate regions: Background tank and overset.

The overset contained the moving part of the problem and allowed the boat to translate and rotate while the background remained fixed and unaltered. Equations were solved separately in the two regions and the solution was interpolated in an overlapping area consisting of cells called donors and acceptors, where information is exchanged. A linear interpolation scheme was used, even though it required a higher computational effort in respect to the other methods available, because it minimized interpolation errors and guaranteed better convergence and a more accurate solution.

While the dimension of the tank changed as a function of the test speed, the dimension of the overset was constant in all the simulations, because it referred to the moving body.

The meshing algorithm used in the two regions was different, as discussed in Sections 3.2.1 and 3.2.2 for the tank and overset regions, respectively.

#### 3.2.1. Tank

A trimmed block mesh was chosen due to the possibility to create anisotropic cells which best discretize the interface between the two fluids.

It is worthwhile to remark that wave reflection can occur, not only at boundaries, but also when the mesh size changes too abruptly [23,27]. To solve this problem, usually 2 or 3 different volumetric refinements are used to gradually coarsen the mesh at sea surface, from the near wall zone to the far field. The artificial damping of waves should start before the coarsest grid starts, since such a change in cell size is a potential source of reflection that has to be included in the damping zone. Therefore, wave damping should start where the mesh is still fine, but not too close to the hull, in order to avoid any influence on the wave pattern [23]. The mesh refinement regions, as well as the damping zone, are shown in Figure 7.

**Figure 7.** Damping zone and mesh refinements.

When dealing with trimmed mesh in Star-CCM+, it is important to bear in mind that cells can only double or half their size; so, starting from the inner and finer volumetric control for the sea surface and doubling up dimensions, we used this distribution of cells: 20 cells to discretize the wave produced by the hull, with an aspect ratio between x/y and z dimensions of 4:1 (because the waves were not too steep) [28,29].

Moreover, to prevent wave reflection at the interface between the overset and background mesh, cells at the interface had an aspect ratio of 2 in order to facilitate communication between the two regions. The volume of the cells at the interface had to be comparable to obtain good results and prevent a simulation crash.
