1. Introduction
The study of the performance and dynamics of ship hulls is a subject of interest to all sectors in the naval world, from commercial ships to high-performance sailing ships, and even from displacement to planing hulls [
1]. In the past, this type of analysis was exclusively performed by means of empirical models, simplified formulas, and tank tests. Nowadays, thanks to the development of computer technology, Computational Fluid Dynamics (CFD) approaches, based on the numerical resolution of viscous flow differential Navier–Stokes (NS) equations, have become largely available. CFD is becoming cheaper and faster and has provided increasingly accurate results, using highly complex numerical tools to study the performance and dynamics of ship hulls [
2,
3,
4]. Fluid dynamics investigations can be carried out using the mesh-based CFD approach, which has the ability to calculate any complicated flow, but has the difficulty of deforming meshes (and also their possible distortion), or the particle method, which is based on the Lagrangian description of flow and is applied where the mesh-based method has difficulty [
5].
CFD makes it possible to describe the turbulent motion that is generated around solid–fluid interfaces, such as hulls or aircraft [
6]. Since exact solutions for turbulent flows are very complex and difficult to obtain computationally owing to heavy resolution requirements [
7], turbulence closure models have been used to achieve practical calculation times [
8]. Naturally, the model approximates the exact equations of motion. By their nature, turbulence models are primarily based on dimensional analysis combined with intuition and experimental observations [
9].
Eulerian-based descriptions have been used to investigate the hydrodynamic performance of hulls. Wu et al. [
10] studied a trimaran using CFD via Reynolds-averaged Navier–Stokes (RANS) equations. The results of a seakeeping experiment for the high-speed trimaran carried out at the China Ship Scientific Research Center (CSSRC) towing tank were also studied. Rather good agreement was shown between the computational and experimental results. Zha et al. [
11] applied a RANS solver and a shear-stress transport (SST)
k-
turbulence model [
12] to study hydrodynamic resistance at different Froude numbers (
) by comparing different types of hulls. Sulisetyono and Alifrananda [
13] used RANS equations and an SST
k-
model to compare the experimental data of the DTMB 5415 hull with the NUMECA numerical code [
14] and observed that the wake profile generated by the ship model compares well with the real case and the resistance results are very close to it. Desouky and Elhenawy [
15] utilized a RANS solver and a
k-
turbulence model to evaluate the free-surface flow around the KSC hull using the STAR-CCM+ (software version 14.02.010-R8) [
16] and determined the hydrodynamics of the ship in the Suez Canal with good accuracy to understand the effects of squat in order to allow them to prevent ships in transit from having accidents. Islam and Guedes Soares [
17] applied RANS equations and an SST
k-
model to estimate resistance in calm water and in the presence of waves for a ferry model using the open-source OpenFOAM toolkit. The paper showed that the solver is good for estimating resistance in calm water, but still has some shortcomings when it simulates waves with free motion. Furthermore, in another piece of work [
18], for uncertainty in ship resistance prediction with OpenFOAM, both the factor of safety (
) and the correction factor (
) were estimated. The study was conducted on four different hull shapes, two container ship models (KCS, DTC), a crude oil carrier (KVLCC2), and a bulk carrier (JBC), and they were simulated in calm sea conditions; from the results the total drag coefficient, sinking, and trim were predicted. Kim et al. [
19] studied the KSC hull model via STAR CCM+. The resistance performance and flow structure around the ship were analyzed. This study confirms and shows that full-scale results can be obtained at model scale by applying virtual fluid instead of full-scale numerical simulations, which require more computational resources.
Likewise, Lagrangian-based numerical approaches have been used to study hull dynamics. Kawamura et al. [
20] validated the accuracy of the Smoothed Hydrodynamic Particle (SPH) method by comparing it with free and constrained motion tests in storm conditions, using a simplified ship model. The results showed that the SPH simulation has good potential for the quantitative assessment of vessel safety in seagoing situations. Priyambada and Tarwidi [
21] applied artificial viscosity to study the vertical displacement of a floating object on free-surface flow, which was evaluated by varying the frequency of the piston wavemaker, and Eriksson [
22] chose the KSC hull as a case study and evaluated the change in total drag coefficient using the SPH and laminar-and-sub-particle scale (SPS) models. Cheng et al. [
23] used a weakly compressible SPH implementation to investigate the water entry and the ensuing slamming loads on a ship cross-section, and then extended the validity of their analysis to a three-dimensional (3D) framework. The emphasis of this work was on the stability and robustness of their implementation, which substantiated into capturing the spray features and the hull pressure field. Tagliafierro et al. [
24] studied the spray phenomena around a planing hull by applying DualSPHysics code [
25]. They calculated the hydrodynamic drag and running attitudes for a wide
range by comparing them with the experimental results and reproduced the spray around the planing hull. Capasso et al. (2023) [
26,
27] studied the modeling of free-surface flows interacting with a planing hull under regular wave conditions using DualSPHysics. Overall, the results are in good agreement with the experiments.
Throughout the reviewed literature, mesh-based and meshless methods have been shown to possess strengths and weaknesses for the hydrodynamic simulation of hulls in calm or rough water conditions [
6,
28,
29]. With respect to the usability of each approach, code-to-code comparisons become very important to optimize their usage for engineering applications. In this regard, Gruwez et al. [
30] compared the capability of OpenFOAM and DualSPHysics in reproducing a large-scale wave channel experiment of bichromatic wave transformations on a steeply sloping, very shallow shoreline, showing similar outcomes. The results showed that overall, OpenFOAM provides the highest model skill, but has the highest computational cost. DualSPHysics is shown to have reduced model performance, but still comparable to OpenFOAM and at a lower computational cost. Meringolo et al. [
31] performed a first comparison between the SPH method and Finite Volume Method (FVM) for multiphase flows. The numerical results were compared with those obtained experimentally, showing good agreement. The results showed very good agreement in terms of potential and kinetic energy component evolution among the proposed model, the Large Eddy Simulation (LES)–FVM solver, and the single-phase
-SPH model.
By recognizing the high value of turbulence models for engineering applications, in this work, two open-source tools, OpenFOAM (v2012) (mesh-based) and DualSPHysics (v5.2) (mesh-free), largely used for most applications reported here, are used to study the fluid flow velocity, vorticity, and forces acting on a ship surface in calm water conditions.
The main objective of this work is to compare the two open-source models in studying ship hydrodynamics in terms of total resistance, free-surface prediction, and wake evolution, as well as perform an analysis of the simulation runtimes. In order to validate the adopted numerical models, the experimental results obtained for Wigley hull [
32,
33] were used for comparison. Validation was carried out at three different
values: 0.25, 0.316, and 0.408, respectively. Furthermore, the validated frameworks were applied to model newly designed ship hulls with a 30 m length overall (LOA), and the results obtained with the SPH and FVM approaches at different
values were compared and analyzed.
The rest of this paper is organized as follows. In
Section 2, the numerical model and numerical methods are introduced; in
Section 3, the numerical setup is described; in
Section 4, the case studies are illustrated; in
Section 5, the results are presented and discussed;
Section 6 provides the concluding remarks.
3. Numerical Setup
This section shows how to obtain the setups of the two working models. For numerical feasibility, the motion of the hull is simulated by a free-surface flow whose velocity corresponds to the speed of the hull, and all of the motions of the hull are completely locked. The Wigley hull is a well-known case for which measurements have been made from several authors [
32,
33]. The Wigley hull form is conceived to provide data for both physics and CFD validation for a simplified ship hull. Three different
values of 0.250, 0.316, and 0.408 are taken from the tests in order to compare the resistances with the two frameworks used. It is typical for the Wigley hull to have a slender shape (
Figure 1a), which is generally accomplished by having a relationships between LOA, Breadth (
B), and Draft (
D) of
L/
B = 10 and
B/
D = 1.6 (which are the most common values observed in our literature research). The Wigley hull has mainly academic interest owing to its simplicity. Though it is rarely used at real scales, it is commonly found at different model sizes, as well as tested with several
values. It is used regularly for tests and validation work for new CFD software, as well as for theoretical studies. Its basic design is also an advantage as it enables it to perform hull optimization studies: there are few parameters to control, and the modification of the ship surface can be performed without many restrictions or smoothness problems. In simulations, with both approaches, the domain must be created according to the following: Upstream Channel Length (UCL), Downstream Channel Length (DCL), Channel Width (CW), and Channel Depth (CD) (
Figure 1b).
3.1. Validation of the Numerical Model in OpenFOAM
In the CFD using OpenFOAM, the steps of the simulation include designing the computation domain (
Table 1), generating a mesh, and setting up the computed conditions. The most important steps for Eulerian models are those required to create the mesh and to generate the mesh; OpenFOAM uses the routines blockMesh, topoSet, and snappyHexMesh. The snappyHexMesh generate an unstructured mesh including hexahedral and tetrahedral cells.
A mesh sensitivity study is conducted consisting of running the same simulation using grids with different resolutions and analyzing how much the converged solution changes with each mesh. Three different simulations are performed before selecting the final configuration of the grid. The features of the tested grids are outlined in
Table 2. The mesh element counts and runtime for each test are reported too. The simulations are run on a Central Processing Unit (CPU) with an Intel® Xeon® Silver 4116 Core: 48 processor.
The final three-dimensional (3D) finite-volume computational domain includes about 6.2 × 10
6 grid points, with a minimum grid spacing of 0.57 mm and a maximum grid spacing of 37.5 mm.
Figure 2 visualizes the mesh in three directions
X [a],
Y [b], and
Z [c], and meshing around the hull [d].
The physical domain consists of water and air under specific and homogeneous conditions. The two-phase model uses the VOF phase-fraction interface capturing approach, in which the free surface is well defined over the entire domain. The interFoam solver (embedded in the OpenFOAM® C++ libraries) is used to numerically solve governing Equations (3) and (4), together with the equations of the turbulence model. In the case of OpenFOAM, the simulation time step varies between 5 × 10−2 and 1 × 10−5 s.
The independent convergence study is shown in
Figure 3, where the total resistance of the Wigley hull for the three different mesh sizes is considered, and for the case with
= 0.408. Considering both accuracy and computational efficiency, a minimum mesh size of 0.57 mm and a maximum mesh size of 37.5 mm are considered to be adequate for the current application, resulting in about 6.2 million mesh cells in the computational domain.
The total resistance coefficients of a ship in calm water,
, are defined by the following equation:
where
is the total resistance coefficient;
is the total resistance acting on the hull, N;
S is the wetted surface area, m
2;
is the water density, kg m
−3; and
V is the velocity of the ship, m s
−1.
Table 3 shows that the numerical values of
are in agreement with respect to the experimental results for all
values. The maximum relative error is −15.71% at the lowest
. For
= 0.25 and 0.316, the value of the resistance coefficient is overestimated, whereas for
= 0.408, it is underestimated.
3.2. Validation of the Numerical Model in DualSPHysics
Initially, the domain is dimensioned according to the requirements of the wake development (
Table 4). Therefore, UCL and DCL are dimensioned to allow the wake to develop undisturbed. To avoid obstruction effects by side walls, the width of the domain was appropriately designed. For the definition of the CD, an adequate value is defined to avoid any shallow-water effect.
DualSPHysics allows boundary conditions to be included via buffer zones, which are then characterized as inflow/outflow areas [
53]. These zones are made up of particles to guarantee the compactness of the kernel, thus ensuring a safe process of particle addition/removal. In these areas, physical quantities such as velocity and density can be extrapolated via ghost nodes in the neighboring fluid region, where fluid quantities are calculated by interpolation and applying the procedure proposed by Liu and Liu (2006) [
54]. The free-surface flow is simulated with inlet and outlet contours. The side walls, which are parallel to the flow direction (
y), and the bottom are considered fixed, as if the fluid were contained in a channel. In DualSPHysics, an important step is particle sizing, which is useful for good case reproduction. Three different initial particle sizes are considered,
equal to 0.009, 0.007, and 0.005 m, and based on these, simulations are run taking into consideration
= 0.408 (
Table 5).
Figure 4 shows the total resistance with different particle sizes for the case with
= 0.408. The simulations are run on a Graphics Processing Unit (GPU) and not on a CPU. The GPU allows a reduction in times compared to the CPU and is an NVIDIA GeForce RTX 2080. In the case of DualSPHysics, the simulation time step varies between 1 × 10
−4 and 1 × 10
−5 s.
The second particle size (0.007 m) is chosen because it has good convergence and is more time-saving than smaller diameters. Finally, the resistances and resistance coefficients for the other Froude numbers are calculated.
Table 6 shows that the numerical values of
are in agreement with respect to the experimental results for all
values. The maximum relative error is −8.87% at the lowest
. The value of the resistance coefficient is overestimated.
From the analysis of data reported in
Table 3 and
Table 6, it is evident how the two models are able to correctly evaluate the values of the resistance coefficients. For both models and for all the considered Froude numbers, the value of the resistance coefficient is underestimated. The Lagrangian model, in this case, demonstrates better overall behavior than the Eulerian model in calculating the resistance coefficients, with smaller errors.
5. Results and Discussion
This section summarizes the results obtained from the newly designed ship hull by elaborating data derived from the numerical simulations. Three values are considered, 0.233, 0.291, and 0.408, which correspond to speeds of 4.0, 5.0, and 7.0 m/s, respectively, highlighting the resistance of the two frameworks.
Table 9 shows the resistance coefficients obtained from OpenFOAM and DualSPHysics and at different values of
. They give similar results. The forces obtained from the Eulerian approach are slightly lower than those obtained from the Lagrangian approach except for
= 0.291. However, the differences in values between the two models show an absolute error rate of no more than 11%. This leads to an awareness that the two models used show very similar force and drag coefficient results despite the difference in the basic application of the two methods.
Furthermore,
Table 9 shows the execution time for the two models, suggesting very big computational time differences between the models. The simulations with OpenFOAM have runtimes that are, on average, an order of magnitude shorter than those with DualSPHysics, in addition to the fact that the two numerical methods are fundamentally different. Another difference between the two methods is the hardware used. OpenFOAM simulations are run on CPUs, which are very powerful hardware for these simulations. DualSPHysics simulations are run on GPUs, and it is well known that the SPH method has a high computational cost. Simulation time is an important factor in hull optimization. In addition to optimization time, a significant reduction in CFD time improves the timing of obtaining results.
Figure 6 shows the total resistance obtained in the two approaches. The box size indicates the range of variation in resistance values, and the line in the box indicates the average value. The compactness of values is defined by the difference in the two extremes (whiskers) extending 1.5 times from the interquartile range from the top and bottom of the box. In addition, all outliers (which are the values that go outside the range) are eliminated.
OpenFOAM shows greater compactness of the results in the simulation. Only the of 0.408 shows a small difference between the values, which could already be seen from the value of the resistances.
Flow Visualization
In
Figure 7,
Figure 8 and
Figure 9, there are six different panels representing the free-surface elevation in two different views (OpenFOAM and DualSPHysics) for three different simulation instants (0.25, 0.5, and the end of the simulation time,
T), all of them related to the simulation with
= 0.291. In
Figure 7,
Figure 8 and
Figure 9, on the left (a,c,e), there are those generated by OpenFOAM and, on the right (b,d,f), those generated by DualSPHysics.
Figure 7 shows the free-surface elevation scaled with the LOA ship length. It can be seen that quantitative and qualitative agreement is reached around the ship at the time of the final simulation for both wave position and amplitude. In the first quarter of the simulation, the two simulations are similar in the bow and stern areas. In the middle of the simulations, the free surface reproduced in OpenFOAM shows more uplift. At the end of the two simulations, the two models show a good representation of the free surface with small differences. OpenFOAM simulates the free surface around the hull well, but does not propagate it beyond the end of the first refinement box owing to cell variation. DualSPHysics, on the other hand, shows better free-surface quality and excellent propagation, although it has a small reflection at the end of the domain generated by the side wall.
Figure 8 shows the velocity field at three different simulation times. The velocity field expressed by the OpenFOAM numerical model has a large area of velocity reduction around the bow and a narrow area of velocity reduction in the wake, in contrast to the velocity field generated by the DualSPHysics model, which has a much smaller area of velocity reduction around the bow and a very large area of velocity reduction in the wake. At one quarter of the simulation, the two simulations are nearly identical. At half of the simulations, the velocity field generated by OpenFOAM shows a larger area of velocity reduction around the bow than the velocity field developed in DualSPHysics. Finally, at the last instant of the simulation, similarity of the velocity field can be seen, but with a greater velocity reduction in the bow area by the simulation in OpenFOAM, and in the stern area, a narrower area of velocity reduction than in DualSPHysics. Also, from these figures, one can see the defect generated by cell variation in the OpenFOAM simulations and a small reflection in the DualSPHysics simulation.
Figure 9 shows the vorticity field at three different simulation times. During the test, both models accurately resolved the vorticity field, as evidenced by the similar vorticity fields displayed. The images represent the section along the
y-direction in the middle of the domain. In the first quarter of the simulation, the two simulations are similar in the aft area, with the difference that in the DualSPHysics simulation, some particles are lost. The particles decrease owing to the anisotropic spacing of the particles, which is a stability problem of the model. In the middle of the simulations, the vorticity reproduced behind the stern in OpenFOAM shows a larger area. At the end of the two simulations, the two models show a good representation of vorticity, with minimal differences. From the vorticity field section, we can also see the difference in the accuracy of the free surface and how the simulation in DualSPHysics captures the free surface better.
6. Conclusions
In this paper, two turbulence methods are presented for calculating the total resistances acting on the ship under study. The turbulence models selected for analysis are the SST k- model, which provides high-precision boundary layer modeling as a combination of k- and k-, and the Laminar-and-SPS model, which is mainly used to adequately present the viscosity and turbulent motions of the fluid flow, especially in the case of the evolution of breaking waves, but adapted to our case study. In this work, two different numerical schemes, one mesh-based and one meshless, each one employing a different turbulence method are presented for calculating the total resistances acting on the ship under study. For the mesh-based approach, the OpenFOAM model is employed. For the meshless approach, the Weaky Compressible SPH-based DualSPHysics model is used. To predict the resistance of ships with different running attitudes, numerical simulations of ships advancing at different speeds and values were carried out.
A comparison of the tools may be useful for possible use in the geometry optimization field and, as a consequence, considering that the naval world is increasingly approaching an electric propulsion system, good hull optimization and knowledge of fluid dynamics would improve the range of electric ships. In the present work, the accuracy of the calculations is ensured by preventive validation of the two methods described in
Section 3. The numerical results from the two methods show good agreement compared to the experimental references for all
values, with a maximum relative error of −15.71% at the lowest
for the SST
k-
turbulence model. The drag coefficients obtained by OpenFOAM and DualSPHysics and studied at the different values of
show very similar results, with an absolute error rate of no more than 11%. The free surface in the two simulations shows quantitative and qualitative agreement for both wave position and amplitude. Regarding the velocity field, the one expressed by the OpenFOAM numerical model has a large area of velocity reduction around the bow and a narrow area of velocity reduction in the wake, in contrast to the velocity field generated by the DualSPHysics model, which has a much smaller area of velocity reduction around the bow and a very large area of velocity reduction in the wake. As evidenced by the vorticity fields shown, both models accurately resolved the vorticity field. In general, the simulation results show that the availability of OpenFOAM and DualSPHysics as tools to predict ship resistance and their application to the development of ship design can potentially be leveraged by end-users. In this case study, the advantages of OpenFOAM are the reduced calculation time for simulations and good compactness of the results. On the other hand, DualSPHysics stands out for its simplicity of setting up the model and good reproduction of the free surface.