Absorption of wave reﬂections in way of an inlet boundary

. In recent years, Computational Fluid Dynamics (CFD) is increasingly becoming more attractive for the analysis of ship seakeeping. This is because of the increasing e(cid:14)ciency of computers and the accuracy of solvers (e.g. Reynold Navier Stokes Averaged { RANS) that may be more accurate in terms of idealizing nonlinear phenomena in comparison to potential (cid:13)ow methods. Notwithstanding this, RANS methods remain sensitive to accurate wave modelling across the (cid:13)uid domain as well as the re(cid:13)ection of domain boundaries. This paper studies the e(cid:11)ective absorption of the re(cid:13)ected waves from a structure heading back towards the inlet boundary with a relaxation zone method. This is achieved by applying the RANS CFD solver OpenFOAM-v2206 and wave generation toolbox waves2Foam. The modelled case is a 2D box in waves with di(cid:11)erent wave lengths. The distance of the relaxation zone and the distance after the relaxation zone until the box varies and their e(cid:11)ect to excitation forces is studied. It is demonstrated that longer distances reduce the problems caused by wave re(cid:13)ections. The e(cid:11)ects are reduced with coarser meshes as the mesh itself dampens the waves


Introduction
Since 2010s, the interest in Computational Fluid Dynamics (CFD) methods for use in ship seakeeping analysis has been increasing due to increasing computational efficiency.Reynolds-Averaged Navier-Stokes (RANS) based CFD methods allow for more accurate modelling of nonlinear effects, such as wave breaking or water on decks, in comparison to nonlinear potential flow methods.However, RANS methods have their own limitations which are often related to high sensitivity to the modelling choices.These difficulties are highlighted in complex simulation cases such as wave-structure interaction modelling [1].
One of the problems in wave modelling with CFD is the waves and wave reflections reaching the boundaries of the computational domain.Waves can be reflected from the domain boundaries which increases inaccuracies in the analysis.There are multiple methods to absorb waves and reflections heading towards the boundaries.Popular methods are coarsening the mesh towards the boundaries [2], numerical or modelled beaches [3] and relaxation zone methods [4].Windt et al. carried out an extensive study of the different methods that absorb waves close to boundaries.The relaxation zone proved to have overall good performance [5].
Among wave reflections, those heading back towards the inlet boundary are especially problematic.This is because reflected waves could be re-reflected.The mesh can not be coarsened towards the inlet boundary as dense mesh is required for accurate wave modelling.A solution is to stop the simulation before reflected waves reach the inlet boundary [6].However, in many cases long simulation times are required to achieve steady state or quasi-static conditions.Therefore, numerical damping with relaxation zones is popular method to dampen the waves in wanted directions.
In OpenFOAM simulations, often applied waves2Foam toolbox includes a relaxation zone method to absorb waves and reflections towards boundaries [7].Various numerical wave modelling related studies performed with OpenFOAM also include waves2Foam toolbox.Study of wave-structure interactions for a semi-immersed cylinder by Chen et al. showed that inclusion of relaxation zones reduced reflections significantly [8].Zhou et al. applied relaxation zones in their breaking wave studies.[9].Liu et al. applied waves2Foam for their ship motion and wave forces study [10].
Inclusion of relaxation zones increases the size of the computational domain and hence demands more computational resources [5].It is important to find balance between long enough relaxation zones so that they work properly but their length should not be unnecessary extensive.This paper studies the effect of relaxation zone length and also the length between the end of the relaxation zone and the structure where waves are reflected.This is achieved by applying OpenFOAM-v2206 [11] and waves2Foam toolbox [7] to perform a parametric study of a box structure in waves and in a 2D domain by varying the two mentioned distances.Two different wave lengths are studied to study the effect of short and long waves.Additionally, two mesh densities are studied to understand how fluid domain discretisation may affect the results.

Theory
The governing equations in RANS CFD analyses are the Navier-Stokes equation and the continuity equation [12].For an incompressible fluid, the Navier-Stokes equation becomes where u i is the velocity, x i is coordinate axis direction, p is the pressure, g i is the gravitational acceleration and ρ and ν are the fluid density and kinematic viscosity respectively.The incompressible form of continuity equation is OpenFOAM applies the Volume of Fluid (VOF) method, where the volume fraction of water, α, is defined for each cell in the computational domain [11]; α = 1 corresponds the cell being completely filled with water and α = 0 full of air.Thus the free surface surface is found in location where α = 0.5.The volume fraction is transported inside the domain according to the transport equation The waves2Foam toolbox applies relaxation zones to absorb waves.Inside the relaxation zone, the computational variable φ, which can be either α or u i , is corrected by a weighted sum where φ target is the theoretical value and φ computed is simulated value; ω R ∈ [0, 1] is the weighting function which is a function of the local coordinate inside the relaxation zone [7]. 3

Numerical methods
OpenFOAM applies the Finite Volume Method (FVM) to discretise the computational domain.
Accurate excitation force predictions require that the waves propagate accurately from the inlet boundary towards the structure.Therefore, applied numerical schemes (table 1) mostly follow results presented by Larsen et al. for accurate and stable wave modelling [13].Crank-Nicholson scheme was applied for time derivatives, linear scheme for gradients and linear upwind scheme for convection terms.In simulation the time step is controlled by the Courant number.The maximum value inside the domain is set to be 0.3 for balancing between accurate wave modelling and fast simulations [13].The governing equations are solved with OpenFOAM's interFoam solver and PIMPLE algorithm which is combination of SIMPLE and PISO algorithms [11].The main numerical set up is shown in table 1. Relaxation zone shape rectangular Relaxation zone weight exponential [7] Mesh density is also an important factor for accurate wave modelling.Previous studies show that a number of cells per wave height is more crucial factor than cells per wave length and more than 10 cells per wave height (H/∆z) is recommended to be used for accurate wave modelling [13] [14] [15].Therefore, in this study 15 cells per height were used to idealise dense mesh cases and 10 cells per wave height were used for coarse meshes.Previous studies recommend to use cell aspect ratio of 1 [15] [16].However, this could lead to very large total number of cells.Therefore, the aspect ratio inside the wave modelling area was maintained at 4.

Case study
The effects of relaxation zone length and the length between the end of relaxation zone and the structure were studied for the 2D case of a static box floating in deep waters.The model corresponds to the simplified case of a long barge restricted in motion in beam seas.The box is 37.0m wide and 9.92m deep.Figure 1 depicts the computational domain.A parametric study is performed by varying the length of the relaxation zone (parameter A times the wave length) and the distance from the end of the relaxation zone until the box (parameter B times the wave length).Thus, the domain size varies in horizontal direction for each case, but in the vertical direction the domain size is constant.The water depth is 290m and the top boundary is at 163m.The waves2Foam toolbox handles the boundary conditions for velocity and volume fraction α at the inlet and outlet boundaries with zero gradient boundary condition for pressure.At the bottom boundary, a symmetryPlane condition is applied for deep water conditions.At the top, an atmospheric boundary is applied.For the turbulence terms, k, ω, ν t , fixed values are applied at the inlet boundary.At the outlet and top boundaries, the boundary conditions for k and ω vary based on inflow (fixed value) or outflow (zero gradient) while ν t has a zero gradient [17].Wall functions are applied at the box surface.
Two different wave lengths were studied namely, λ = 174m and λ = 348m, while the wave height is kept constant at H = 2m.Two mesh densities are considered namely, a dense mesh that has H/∆z = 15 and the coarse mesh that has H/∆z = 10. Figure 2 shows an example of the mesh in the computational domain and around the box for case B1 with dense mesh.The dense mesh area from inlet to the box is created for accurate wave modelling and towards top, bottom and outlet boundaries the mesh is coarsened to reduce the number of cells.All the cases with different relaxation zone layouts are described in table 2. The simulation time in all cases where set to be 20 wave periods after the wave group has reached the box to achieve steady state conditions.

Results and discussion
Simulation results focus on the accuracy of wave modelling for each case.Then, the effect of the relaxation zone length and the length between the end of the relaxation zone and the box to the excitation forces are presented.Finally, the effect of mesh density to the excitation forces is discussed.

Parametric study on wave amplitudes
Two wave probes were set to measure wave amplitudes in front of the box (see figure 1).Following the method described by Goda and Suzuki, the measured wave amplitude can be divided into incident and reflected wave components [18].Table 3 shows the incident and reflected wave amplitudes for all cases.The results show that a coarse mesh dampens the wave amplitude more than the dense mesh in all cases.The only exception is case B2.Dense mesh results show amplitudes close to 1m.This could be attributed to numerical inaccuracy in the wave decomposition method.In longer domains the incident wave amplitude is reduced more (see cases A3 and B4 where the incident wave amplitudes have the lowest values).The latter could be attributed to numerical damping i.e., it takes longer time to affect the waves generated at the inlet boundary before they reach the box.Overall, the simulation results agree with published wave modelling studies [13] [14] [15].
Reflections increase in shorter waves.In very short domains, such as those presented in cases B1 and B2, the wave seems to completely reflect from the box.In other cases, the reflected wave amplitude is more than half of the incident wave amplitude.In longer waves reflections reduce as in most cases the reflected wave amplitude is about half of the incident wave amplitude.An    of the incident wave amplitude.For cases A3 and B4 this could be due to the incident wave amplitude being damped more due to long domain size which alters the wave profile and could increase reflections.For case B1, the short distance between the end of relaxation zone and the box could affect to the modelling of the wave.

Relaxation zone length (parameter A)
Figures 3 -6 display the effect of the relaxation zone length to horizontal (Fx) and vertical (Fz) excitation forces and roll moment (My) by comparing cases A1-A3 against each other in nondimensional format.The decomposed incident wave amplitudes in table 3 is applied in nondimensional format so as to ignore the numerical damping of wave amplitude.Each figure has six black marks at the top of the graph.The three first marks present the time instances when the wave group reaches the box after the start of the simulation for cases A1-A3 respectively.The latter three marks correspond to three times longer time instances when possibly re-reflected waves from the inlet boundary reaches the box.In all cases, it is visible that the force and moment values increase significantly when the wave group reaches the box and soon after that the forces and moment reaches steady state.
In coarse mesh cases (figures 3 and 4), all cases result in very similar loading.An exception to this is seen in roll moment results for the longer wave length where case A1 (A = 0.5) shows larger negative peaks.Similar trend is visible for dense mesh cases (figures 5 and 6), except in the longer wave length results.In these results, case A3 (A = 2) seems to predict larger vertical force and the roll moment case A2 (A = 1) shows lower loading.This could be attributed to significantly lower incident wave amplitude used for nondimesionalising case A3 in (see table 3).Therefore, the force and moment values for case A3 are increased in comparison to case A2 while case A1 shows larger loading similarly to coarse mesh cases.
When a dense mesh is used for case A1 the peak values of horizontal force and roll moment seem to slightly increase after the time instance corresponding to re-reflected waves from the inlet boundary reaching the box.This is expected since the initially reflected wave is not fully relaxed, i.e. the reflection is assumed to reach the inlet boundary and being partly re-reflected.This reflection then reaches the box at the marked time point and increases the horizontal force.This effect is not visible in coarser meshes due to the waves being numerically dampened more in comparison to dense mesh cases.In conclusion, the results show that too short relaxation zone (A = 0.5) does not work properly and the length of the zone should be at least one wave length long.

The influence of length between the end of the relaxation zone and the box (parameter B)
The effect of the length between the end of relaxation zone and the box is shown in figures 7-10 where cases B1-B4 are compared.Similarly to the results shown in figures 3 -6, incident wave amplitudes from table 3 are used for nondimensionalising and the black marks show the time instances when wave group first reaches the box and when possible re-reflected waves from the inlet boundary reach the box.
In short wave and coarse mesh cases (figure 7) all results match well.However, in longer wave larger variations are visible.Horizontal forces displayed in cases B1 and B2 (B = 0.5 and B = 1) show that the force reduces quickly and then finds steady state after the wave group has reached the box.Therefore, the force peaks are lower in comparison to cases B3 and B4 (B = 2 and B = 3).Similar trend is visible also for roll moment results where case B3 shows slight reduction in moment peak values after wave group has reached the box.In vertical force results, case B1 shows larger loading than the other three cases.These results show that too short distance after the relaxation zone until the structure affects results greatly.
Dense mesh results show the effect of short distance between the end of the relaxation zone and the structure even more clearly.In short waves (figure 9), cases B1 and B2 show larger     In long wave results the trend of reducing force in time from coarse mesh is highlighted as cases B1 and B2 show reducing horizontal force values after reaching initially maximum forces.Similarly, cases B1-B3 have reducing moment values.In vertical force results, cases B1 and B2 show larger loading in comparison to the other two cases.In conclusion, the distance between the end of relaxation zone and the structure has to be large enough and at least two wave lengths is recommended.
5.4.The influence of mesh density to the excitation forces and moments Table 4 shows the average between minimum and maximum force and moment peaks for each case after steady state is reached.In general, dense mesh results in slightly higher force peaks with some exceptions in λ = 348m cases such as vertical excitation force in cases A1 and A2.Higher forces are due to more accurate modelling of the box and more detailed modelling of the flow field around the hull.Cases B1 and B2 show larger differences between coarse and dense mesh forces which is associated with too short distance between the end of the relaxation zone and the box; thus causing unexpected wave forces.
Similarly to forces, roll moment values are also larger with dense mesh results.However, the difference is generally larger than the one observed for force values and in some long wave cases (cases A3 and B4) dense mesh results show almost twice as large loading peak value.This could relate to more accurate modelling of the flow field around around the box corners.The effect is depicted in figure 11 which shows flow velocity magnitude around the box for case A3 with λ = 348m.It is seen that the large velocity magnitude areas close to the corners of the box are larger with dense mesh as a coarse mesh has larger numerical diffusivity.The large local difference in the flow field has small effect in the forces.However, in this case the effect on moments is large as the corners are far away from the box center of gravity.

Conclusions
This paper studied the effect of the relaxation zone length and the length between the end of the relaxation zone and a 2D box like floating structure.This was achieved by performing a parametric study with OpenFOAM-v2206 and waves2Foam toolbox for the case of a box in deep water waves while varying the two mentioned distances (see figure 1 and table 2).Two different wave lengths and two mesh densities were considered.
The results show that a relaxation zone is able to effectively absorb the reflected waves when its length and the distance between the end of the zone and the structure is long enough.Too short relaxation zone length (half of wave length) increases induced forces and moments and  may not be able to completely absorb reflections while re-reflections occur.Similarly, too short distances between the end of the relaxation zone and the box (less than two wave lengths) resulted in unexpected behaviour when force and moment peak values reduced in time.Based on the results, the recommended length of the relaxation zone is at least one wave length and the distance between the end of the relaxation zone and the structure at least two wave lengths.
Relaxation zones increase the domain size which could cause very large domain sizes in 3D simulations with long wave lengths which is often the case with ship seakeeping studies.However, inclusion of motions into the simulation reduces the reflections especially in long waves.Therefore, it could be possible in these cases to reduce the recommended relaxation zone length and the distance to the structure; thus reducing the domain size.Future study will focus on this.

4 Figure 1 .
Figure 1.Schematic picture of the computational domain.P1 and P2 are two wave probes measuring wave amplitude.

Figure 2 .
Figure 2. The mesh in the domain and close up around the box.

6 Figure 3 .
Figure 3.Time histories for cases A1-A3 with λ = 174m and coarse mesh showing the effect of relaxation zone length to Fx, Fz and My.

Figure 4 .
Figure 4. Time histories for cases A1-A3 with λ = 348m and coarse mesh showing the effect of relaxation zone length to Fx, Fz and My.

Figure 5 .
Figure 5.Time histories for cases A1-A3 with λ = 174m and dense mesh showing the effect of relaxation zone length to Fx, Fz and My.

Figure 6 .
Figure 6.Time histories for cases A1-A3 with λ = 348m and dense mesh showing the effect of relaxation zone length to Fx, Fz and My.

Figure 7 .
Figure 7. Time histories for cases B1-B4 with λ = 174m and coarse mesh showing the effect of the distance to the box after relaxation zone to Fx, Fz and My.

Figure 8 .
Figure 8.Time histories for cases B1-B4 with λ = 348m and coarse mesh showing the effect of the distance to the box after relaxation zone to Fx, Fz and My.

Figure 9 .
Figure 9.Time histories for cases B1-B4 with λ = 174m and dense mesh showing the effect of the distance to the box after relaxation zone to Fx, Fz and My.

Figure 10 .
Figure 10.Time histories for cases B1-B4 with λ = 348m and dense mesh showing the effect of the distance to the box after relaxation zone to Fx, Fz and My.

Figure 11 .
Figure 11.Flow field with velocity magnitude around the box in case A3 with long wave for coarse (left) and dense (right) mesh.

Table 1 .
Main numerical set up for the simulations with OpenFOAM terminology.

Table 4 .
Coarse / dense mesh average loading peak amplitudes in nondimensional format.