Sloshing Simulation of Single-Phase and Two-Phase SPH using DualSPHysics

The sloshing phenomenon is one of the free surface flow that can endanger liquid cargo carriers such as ships. Sloshing is defined as the resonance of fluid inside a tank caused by external oscillation. When sloshing is close to the natural frequency of the tank it could endanger ships. Particle method has the advantages to be applied because sloshing is dealing with free surface. One of the particle methods is Smoothed Particle Hydrodynamics (SPH). In this study, compressible SPH was used as a result of the pressure oscillation, which exists because of the effect of density fluctuation as nature of weakly compressible SPH. To reduce pressure noise, a filtering method, Low Pass Filter, was used to overcome pressure oscillation. Three pressure sensors were used in the sloshing experiment with a combination of motions and filling ratios. Only one pressure sensor located in the bottom was used to validate the numerical results. A set of SPH parameters were derived that fit for the sloshing problem. The SPH results show a good agreement with the experiment s. The difference between SPH and experiment is under 1 % for sway, but a larger difference shows in roll. Low pass filter technique could reduce pressure noise, but comprehensive method needs to develop for general implementation.


Introduction
Sloshing is one of the phenomena of free surface flow that can endanger liquid cargo carriers such as ships. Sloshing can be defined as the resonance of fluid inside a tank caused by external oscillations (i.e., ship motion in the case of marine transportation). When sloshing is close to the natural frequency of the tank, it could endanger ships because the fluid motion inside the tank will be violent, leading to high-impact pressure. Sloshing is can cause severe damage to the tank and damage structure inside the tank.
The particle method has the advantages to be applied because sloshing is dealing with free surface flow. Many researchers have used the particle method or mesh-based method to overcome sloshing. Chao et al. simulate the phenomenon of sloshing with rectangular tanks to find the optimum kernel [1]. De Chowdhury and Sannasiraj use SPH with rectangular tanks using diffusive terms to reduce pressure oscillation [2], Servan-Camas et al. simulate the phenomenon of sloshing employing coupled SPH-FEM using the time-domain method [3], Longshaw and Rogers use SPH to simulate the sloshing of fuel tanks with DualSPHysics [4], Green has used Smoothed Particle Hydrodynamics (SPH) in long-duration simulation at a small filling ratio in 2D with high stretching [5], The applications of SPH in sloshing are carried out by Landrini et al. [6] and Chen et al. [7] to predict impact pressure in the tanks s sidewall. Recently Trimulyono et.al [8] were used SPH for experimental validation using prismatic tank both 2D and 3D. Pressure in SPH has serious oscillation due to density fluctuation, although -SPH was used. Tafuni et al. [9] used MATLAB smoothing spline algorithms to reduce pressure oscillation. In this study, MATLAB low pass filter was used to reduce pressure oscillation. Sloshing was simulated by single-phase and two-phase SPH with two filling ratios and different motions. Parameters selection was discussed to figure out the set parameters that fit for the sloshing problem.
In this paper, an open-source SPH solver so-called DualSPHysics [10] is used to deal with sloshing flow both in singleand two-phase. DualSPHysics has implemented general-purpose computing in graphics processing units (GPGPU) [11] made it faster to deal with a large number of particles. DualSPHysics version 4.2 is used to accommodate two-phase flow that developed by Mokos et al [12], The experiment data based on Trimulyono et al. [8] was used as validation on this study. The study aims to calculate the pressure at the tank wall in the sloshing phenomenon case based on SPH and then compare it with experimental results. '

Methods
The prismatic tank was used in the experiment with three pressure sensor set in the tank s sidewall. Only a pressure sensor (SSK Co., Ltd., Tokyo, Japan) that was located at the bottom (PI ) used to make validation of impact pressure with SPH (see Figure 2). Pressure located at the bottom has a significant effect of impact pressure, only with a filling ratio of 25% and 50%. Figure 1 shows a schematic view of a prismatic tank in the experiment. Figure 2 shows a schematic view of a prismatic tank for SPH simulation. 2D SPH simulation is sufficient to capture impact pressure because of pressure sensors located in the middle of the tank.

P1
Pressure oscillation in SPH simulation was filtered using a low pass filter 10 Hz, the same value used in the experiment test. MATLAB R2019a student version and DualSPHysics version 4.2 were used in this study. In the SPH simulation, single¬ phase and two-phase SPH were used. A comparison of impact pressure is made based on experiment. All simulations were done using GPU to speed up computation. Figure 3 shows the impact pressure for sway motion measured at PI with the filling ratio of 25%. Pressure refers to hydrodynamic pressure, which can be obtained by subtracting the analytical hydrostatic pressure under calm conditions from the measurement data. The parameters setup in SPH simulations shows in Table 2. The speed of sound was kept to the ratios above 7.0 as stated in the previous work of Mokos et al [13] that speed of sound has a significant effect on pressure. The coefficient of smoothing length is 0.95, which is sufficient to get appropriate accuracy and to reduce computation time. The same parameters were used in single-phase simulations. The comparisons were made in the pressure sensor located at the bottom of tank. Eq. 1 and Eq. 2 were used to calculate the natural frequency of the prismatic tank developed by Faltinsen and Timokha [14], n is the natural frequency of the i-mode for a rectangular tank, d represents the water height, and 1 represents the free surface s length in the direction of tank movement. For a prismatic tank, a correction factor is mentioned in Equation (2), where 1 and 2 are the horizontal and vertical dimensions of the chamfer, respectively. (1)

Results and Discussion
Sloshing is one important issue in a liquid carrier such as a ship. This event could lead to serious damage in structure caused by impact pressure. Thus, hydrodynamic pressure is essential for the designer to design cargo tanks such as LNG, oil tanker, or chemical tanker. Figure 4 shows a comparison of hydrodynamic pressure between two-phase SPH and an experiment test. It shows that SPH has good accuracy for impact pressure in sway motion, but as it can see that pressure in SPH has a noise caused by density fluctuation. Another reason is that DualSPHysics use dynamics boundary condition (DBC) [15], which causes a gap between the fluid particle and boundary particle. SPH can capture impact pressure which is no significant delay between the pressure sensor in SPH and the experimental test. SPH can capture the trend of hydrodynamics pressure, although in this case, sway motion is moderate compared with the roll motion. Figure 5 shows a comparison of impact pressure between two-phase SPH and MATLAB low pass filter. KAPAL

P1
The comparison depicts that pressure noise can be reduced using this technique. Although this technique is one of the features in MATLAB, reducing pressure noise directly from SPH needs to carry out in the future study. Thus, the user of DualSPHysics can directly make comparison of pressure without any special treatment from another application. Figure 6 describes a comparison of impact pressure using SPH and low pass filter. It shows that low pass filter significantly remove noise and it is more comparable with experiment result. Figure 7 compares the impact pressure between single-phase, two-phase, and experiment in filling ratio 25% for sway motion. The red line is two-phase SPH, the black line is single-phase SPH, and the blue line is experiment results. The dashed line shows the average impact pressure, and the round dot lines are average pressure. Two-phase SPH shows better accuracy compared to single-phase SPH. It can be explained that in two-phase SPH, the effect of compressibility has significant to impact pressure. The difference in average peak pressure is less than 1 %. But the difference in average pressure is 16 %. One of the reason is because the neighbour particle is less in 2D simulation. Two-phase SPH is more consistent compared with single-phase SPH regards to peak pressure. Figure 8 compares the results of impact pressure in roll motion. In this case, the movements are more violent compared with sway motion. The pressure peak is higher compare to peak pressure in sway motion. SPH shows the same results. Twophase SPH has better accuracy than single-phase SPH, with both side peak pressure and average pressure, as shows in the figure. The pressure toe can be captured too by two-phase SPH. On the contrary, single-phase SPH could not capture these events. The difference in peak pressure compare with the experiment results become worse. It can be explained that in the SPH method, the accuracy is linear with the number of the neighbour particle. The filling ratio of 25% makes a pressure sensor The difference in peak pressure between the experiment becomes worse. It can be explained that in the SPH method, the accuracy is linear with the number of the neighbour particle. The filling ratio of 25% makes a pressure sensor that located in the near free surface less accurate. UJ -SPH two-phase -Exp  Figure 9 shows the comparison results of impact pressure in filling ratio of 50% for sway motion. Two-phase SPH shows better accuracy compared with single-phase SPH. Peak pressure of two-phase SPH and average pressure have better agreement with the experiment results, which shows that the air has a significant effect on the SPH results. One of the reasons is that a pressure sensor located at the bottom has sufficient neighbour particles to use two-phase SPH. Which means, the neighbour particles have a significant effect on the results of simulation. Figure 10 illustrates the impact pressure on roll motion. It shows that pressure noise in single-phase more prominent compared with two-phase SPH. In this case, the sloshing flow very violent compares to other cases. As the flow more chaotic and violent, the pressure sensor is less accurate compared to other results. However, the pressure trend is similar and peak pressure less accurate in this case.

Numerical Parameters Selection
Parameters selection is one of the essential steps before a numerical simulation is to begin. By default, DualSPHysics is using a dynamics boundary condition (DBC) [15], DBC has created a gap between the fluid particle and boundaries particle. Figure 11 depicts a pressure sensor in different distances from boundaries particles. The pressure sensor shows zero when it is on the wall, as revealed in the green line. The gap between fluid particles and boundaries is 1.5h, where h is smoothing length. When the pressure sensor is set 1.5h from the wall, a pressure sensor can capture impact pressure, as shown by the purple line with a triangle marker (see Figure 11). This case indicates that the distance between the pressure sensor and the boundary particle has a significant influence on pressure noise (see Figure 10). Figure 12 shows the influence of particle distance (dp) to impact pressure. It shows that a finer particle distance can increase the accuracy. Unfortunately, it is also increasing the total number the particle. As a results, the computation time can increase drastically. Figure 13 shows a two-phase sloshing simulation with different coefficients of artificial viscosity( ). Figure 13 shows that fluid particle easy to split up when it hit into the wall. An opposite event showed by using the coefficient of artificial viscosity value 0.01 ( Figure 14). However, both impact pressures show the same results. The right phenomena are using the coefficient of artificial viscosity value 0.01. Artificial viscosity has a significant effect on SPH computation in some case [16], In the present study, the artificial viscosity coefficient affects the impact on the wall but not effected the pressure result.

P1
The speed of sound is a parameter that has a significant effect in the sloshing case, as mentioned in Mokos et al [13] and Trimulyono et al [8], Several trial error have been carried, showing a ratio of the speed of sound between air and water. It has a significant influence on impact pressure and makes time-step simulation longer compared with low sound speed.
Smoothing length influences a neighbour particle. When using a large number of smoothing length, the accuracy can increase, but it makes time computation increase as well.

Conclusion
Single-phase and two-phase SPH simulation have carried out in this study. SPH has good agreement with the experiment. MATLAB low pass filter can reduce the pressure noise, but some result shows can reduce the accuracy rate. Parameters set that are essentials for sloshing simulation are speed of sound, the distance of pressure sensor, artificial coefficient viscosity, and smoothing length. Future works of long duration two-phase SPH simulation needs carry out to show the capability of SPH in real engineering problems. Two-phase SPH simulation on three-dimension is also needed to carry out for a comprehensive solution. From the current works, it shows low pass filter can be used to reduce pressure noise in two-phase SPH simulation.