1. Introduction
Smoothed Particle Hydrodynamics (SPH) is a fully Lagrangian numerical method, that has been successfully applied in many areas, including astronomy, biomedicine and computational fluid dynamics. Due to its Lagrangian nature, SPH has the advantage over grid-based approaches in simulating strongly nonlinear and discontinuous phenomena. For this reason, SPH methods are adopted by many researchers to simulate strongly nonlinear free-surface flows, and a good agreement with experiments has been obtained [
1,
2]. Despite these encouraging achievements by the SPH community, problems such as boundary treatments and pressure oscillations still exist in hydrodynamic simulations, and prevail in weakly compressible SPH (WCSPH) [
3]. Further research is needed to improve the numerical stability and accuracy.
The foundation of SPH is the kernel-based interpolation theory. The physical system of concern is discretized into a set of particles. These particles possess material properties and interact with each other within the support domain governed by a weight function or smoothing function [
4,
5]. The physical quantities of particles, such as density, velocity and acceleration, are obtained by solving the governing equations discretized according to the SPH algorithm. In order to satisfy the boundary conditions on the solid walls and on the free surface, the kernel of fluid particles near boundaries is truncated, which, however, would introduce numerical errors and deteriorate the calculation of fluid particles’ properties. In addition, fluid particles may also cross the wall if a coarse discretization is used around the boundaries. Thus, imposing boundary conditions is still one of the major challenges in the SPH community [
1].
There exist many different wall boundary models of SPH, among which the repulsive function approach and the fictitious particle approach are probably the most popular ones.
The repulsive function approach was initially devised by Monaghan [
6] based on the Leonard–Jones potential force. A repulsive short-range force is exerted by the wall boundary on the fluid particles so as to impose boundary conditions. This method was improved by Monaghan and Kos [
7] and soon widely used due to its simplicity and applicability to complex geometries and deformable objects [
8]. However, an empirical relationship is required to evaluate the repulsive forces, and the kernel truncation near the boundary is improperly treated. For this reason, the numerical stability and accuracy are not guaranteed.
In recent years, the fictitious particle approach is widely used to impose boundary conditions in SPH. The foundation of the method is the use of additional fictitious particles that are placed outside the fluid domain and adjacent to the wall boundary to complete the support domain and ensure the consistency of the kernel of fluid particles. Based on the means of generation of fictitious particles, methods of this kind can be sub-divided into three main types: fixed ghost particles method, mirror particles method and local ghost particles method.
The Fixed Ghost Particles (FGPs) method was devised from the Dynamic Boundary Particles (DBPs) method [
9] and improved by Crespo et al. [
10]. In the DBPs method, the boundary particles representing the wall are pre-generated at the initial state, and their locations are fixed to the boundaries throughout the entire simulation. The physical properties of boundary particles are treated as fluid particles to satisfy the same governing equations. Fluid particles approaching the boundary will create a rise in density of the boundary particles and result in a repulsive force acting on the fluid particles to satisfy the non-penetration condition. Marrone et al. [
11] and Adami et al. [
12] improved the DBPs method and proposed the FGPs method. New calculation methods are applied to compute the properties of boundary particles in order to prevent spurious pressure oscillations and improve numerical stability. Marrone et al. [
11] introduced an interpolation point, which is obtained by mirroring the position of a fixed ghost particle into the fluid domain along the solid boundary, to compute the physical quantities of each fixed ghost particle. Adami et al. [
12] greatly simplified the computation where a local force balance between the wall and fluid particles is adopted to compute the pressure of fixed ghost particles. The FGPs method is simple, numerically stable and accurate, and can be applied to complex geometries, but it cannot deal with deformable boundaries because the varying distance between ghost particles could result in particle penetration and numerical instability.
The mirror particles method was introduced by Randles and Libersky [
13]. Unlike FGPs, mirror particles are generated by mirroring or reflecting the fluid particles into the boundary domain at every time step. The physical quantities of mirror particles share the same properties with the fluid particles except for the velocity. An anti-symmetric velocity is given to the mirror particle to satisfy the non-slip boundary condition. It is obvious that the mirror particles method can handle deformable boundaries and Fluid Structure Interaction (FSI) problems. But a problem with the method is that it is difficult to mirror fluid particles on geometrically complex surfaces, especially in corners and curved surfaces, where the mirror particles are non-uniformly distributed or even piled up. In such a case, there will be too many or too few mirror particles interacting with fluid particles at the boundary, which will cause large pressure oscillations if not treated properly. Sophisticated algorithms have been proposed to improve the method [
14], but the problem is still present.
The local ghost particles method has become popular in recent years. As implied by its name, the fluid particles near the boundary are treated separately and locally, which avoids the problem of fictitious particles piling up around corners. Therefore, the restrictions on the boundary geometries are largely removed. Ferrari et al. [
15] proposed a local mirror image method based on a local point symmetry technique. Unlike the plane-symmetry technique used in the mirror particles method, where the mirror particles are generated by directly mirroring all the fluid particles near the boundary, the local point symmetry technique mirrors the fluid particles separately. At every time step, each fluid particle near the boundary possesses a unique set of uniformly distributed fictitious particles that are generated in the boundary domain and used to complete the support domain of the fluid particle. The physical quantities of the fictitious particles are calculated by extrapolating the fluid particle’s properties to satisfy the boundary conditions. The local mirror image method was improved by Vacondio et al. [
16] and Fourtakas et al. [
17], who optimized the distribution of fictitious particles in the truncated support domain by modifying the generation mechanism. Fourtakas et al. [
18] used a local uniform stencil of fictitious particles around the fluid particles that move with the fluid particle and are only activated when they are located inside the boundary domain. The local ghost particles method has not only the capability of dealing with complex geometries and deformable objects, but also approximate zero and first-order consistency in the moments of the kernel. However, the numerical behavior of pressure on the wall boundaries in dynamic scenarios is still unclear, and a systematic investigation is to be carried out.
As can be seen from the above, none of these methods is superior to others in all the aspects. The fixed ghost particles method is the most robust and produces the smoothest fluid pressure field, while the local ghost particles method is probably the best for complex geometries. Combining the merits of the two methods, this paper presents a new boundary treatment technique which is applicable to 2-D complex geometries and deformable objects and produces much smoother solutions for the pressure. The stability and accuracy of the method is validated for several benchmark cases including a still water test, a dam break case and some sloshing cases in water tanks. A thorough investigation into the pressure on solid walls is also conducted for dynamic scenarios.
2. The SPH Scheme
The governing equations following the Navier–Stokes equations can be expressed in Lagrangian form as:
where
and
denote the density, the velocity, the pressure, the external body force and the diffusion terms, respectively.
Based on the assumption that the fluid is weakly compressible, the continuity and momentum equations are coupled by means of the Tait’s equation of state:
where
is the nominal density of the fluid (1000
),
is the numerical speed of sound, which is set to a value more than 10 times the maximum speed of the fluid, and
is an empirical parameter set to 7 [
19].
is set to a non-negative value to guarantee numerical stability.
The foundation of the SPH method lies on two important approximations: the kernel approximation and the particle approximation. The kernel approximation introduces a smoothing function
that can transform differential equations into integral equations. The kernel approximations of
and its derivative in a continuum domain are:
where
is the kernel function defined over the support domain,
the position vector, and
the smoothing length. The particle approximation discretizes the support domain into particles that possess physical properties. Thus, Equation (3) becomes:
where the subscript
denotes the neighboring particles in the support domain, and
and
represent the mass and the density of particle
, respectively. In the present study, the Wendland kernel is adopted due to its simplicity and low computational requirements [
20]:
where
for 2D formulations, and
.
According to the SPH methodology, the continuity and momentum equations (Equation (1)) can be expressed in a discrete form:
where the subscript
and
denote the particle of concern and a neighboring particle of particle
in the support domain, respectively, and
is the viscosity term. The spurious pressure oscillations can be damped effectively by introducing the viscosity terms, especially in dynamic problems. In the present study, the artificial viscosity proposed by Monaghan [
4] is applied to the momentum equation:
where
,
,
,
and
are the average values of the numerical sound velocities and densities of particles
and
, and
is the artificial viscosity coefficient, which is a tuning parameter determined according to the characteristics of the specific problem of concern.
The fluid particles can move freely due to their Lagrangian nature, which makes it convenient to simulate strongly discontinuous phenomena. However, during the free movement of the particles, the number of neighboring particles in the support domain can become either too low or too high, which causes severe oscillations in density and pressure [
3]. In order to obtain a smooth and stable pressure field, a density re-initialization technique [
21] was introduced in the WCSPH to solve the problem. In this study, the first-order Moving Least Squares (MLS) method is also applied to re-initialize the density field of fluid particles at every time step, and the predictor-corrector scheme is adopted for the time integration [
19]. The time step in this paper is dependent on the Courant condition [
22] and the forcing term condition [
23].
3. Wall Boundary Conditions Methodology
The new method proposed is hereafter referred to as the local semi-fixed ghost particles method to distinguish from the local mirror image method [
15] and the local uniform stencil method [
18]. Although all these methods are based on the same idea of generating fictitious particles, separately and locally, in the boundary domain, to complete the truncated support domain of fluid particles, there are some differences between them in the mechanism of fictitious particles generation that will eventually lead to different numerical results.
The local mirror image method [
15] was improved by Fourtakas et al. [
17], who introduced a new mechanism of generating fictitious particles. As shown in
Figure 1, the strategy for generating the fictitious particles depends on
, which is the distance between the fluid particle
and the solid boundary
, where
is the normal to the surface pointing into the fluid. If
, where
is the initial uniform particle spacing, then the fictitious particles are generated by mirroring the fluid particles about the solid boundary. If
, the fictitious particles are generated from the natural uniform extension based on the fluid particle’s position in the boundary domain. The positions
of fictitious particles in the boundary domain are given by Equation (9):
where the subscripts
denote the fluid particle and the fictitious particles, respectively, the subscript
represents the wall boundary, and
(the Wendland kernel is adopted herein with
and
). As shown in
Figure 1b, the spacing between fictitious particles of different layers varies with the distance
, which will cause clumps of fictitious particles for a small
. Given the fact that the repulsive force of the wall boundary acting on the fluid particles is mainly produced by these fictitious particles, that are generated when
, it is clear that the wall boundary mainly influences the fluid particles within the distance of
from the solid wall. Because when
, the fictitious particles mainly contribute to complete the truncated kernel of the fluid particles, and the repulsive force produced from the boundary domain is small, the range of influence from the wall boundary is relatively small in comparison with the radius of the support domain. In Fourtakas et al. [
17], only the smooth velocity and pressure fields were obtained, while the detailed comparison and analysis of the pressure values on the solid boundaries were not presented.
For the local uniform stencil method [
18], a local uniform stencil of fictitious particles is generated around the fluid particle at the initial state, which moves with the fluid particle during the simulation. The distance between the neighboring particles is always equal to the uniform particles spacing
. When the support domain of the fluid particle is truncated by the solid wall, the fictitious particles within the fluid domain are discarded, and only those located outside the solid wall actually contribute to the calculation of the fluid particle’s properties. Thus, a uniform distribution of fictitious particles near the boundary is maintained, as shown in
Figure 2. The pressure of fictitious particles is given by:
where
is the distance between the fictitious particle
and the wall boundary. Equation (10) ensures that
when
. The non-penetration boundary condition is satisfied by the repulsive pressure. However, due to the extremely unstable pressure value
, numerical errors may be introduced in the meantime.
For the local semi-fixed ghost particles method, fictitious particles associated with the fluid particle near the boundary are generated along the solid boundary. As shown in
Figure 3, a central fictitious particle
is firstly generated by projecting the fluid particle onto the solid boundary if the fluid particle’s support domain is truncated by the wall boundary. And then, around the central fictitious particle
, a set of uniformly distributed fictitious particles
associated with the fluid particle is generated in the normal and tangent directions of the solid boundary, with the uniform particle spacing
being the distance between neighboring fictitious particles, which is the same as the local uniform stencil method. At the next instant, a new set of fictitious particles are generated for the fluid particle under the same mechanism. Such a process looks as if the set of fictitious particles are moving in the tangential direction of the boundary profile. Since fictitious particles are fixed to the solid boundary in the normal boundary, “semi-fixed” is used to refer to the present method and also to distinguish from the existing methods. In this method, special treatments are needed for generating fictitious particles in the corners and curved surfaces. For fluid particles located around the corner, the central fictitious particle
is set at the corner point if
. Other fictitious particles are generated based on the central fictitious particle
and the solid boundary, as shown in
Figure 4b. In this case, the method for generating fictitious particles approximately degenerates to the fixed ghost particles method, and a detailed description can be found in Marrone et al. [
11]. If
, two central fictitious particles
are generated, respectively, at the different boundaries, as shown in
Figure 4a. In the case of a curved surface, the treatment depends on the curvature. It can be treated approximately as a plane surface if the radius of the curvature is large enough. Otherwise, it will be treated as a corner, and the position of the central fictitious particle
is regarded as the corner point.
The new generation mechanism of fictitious particles is simple and robust, which suits all kinds of kernel functions with different sizes of support domains. It is obvious that the repulsive force of the wall boundary can act on any fluid particle whose support domain is truncated by the solid boundary. Thus, the influence range of the repulsive force from the wall boundary is equal to the radius of the support domain, which is different from the local mirror image method mentioned above. The size of the support domain plays an important role in the numerical stability of the pressure field, which will be discussed in the next section.
In order to impose boundary conditions for the fluid at the boundary, physical quantities of the fictitious particles should be properly assigned. The mass of the fictitious particles is set equal to the mass of the fluid particle to ensure mass conservation,
the pressure of the fictitious particles is given by a hydrostatic pressure correction:
and the density of the fictitious particles is calculated according to the equation of state (Equation (2))
To impose the non-slip boundary condition, the assigned velocity of the fictitious particles
located at the boundary is equal to the wall boundary velocity
and the velocity of other fictitious particles is assigned according to the Takeda method [
24]
where
is the fluid particle’s velocity.
To approximate a free-slip condition, the viscosity term in the momentum equation is ignored in the interaction of the fluid particle with the fictitious particles, and it is not necessary to calculate the fictitious particles velocities [
25]. The velocity in the continuity equation is set to the wall velocity regardless of the slip condition, and the non-penetration boundary condition is satisfied naturally by the repulsive force of the fictitious particles, especially by the central fictitious particle that is generated by projecting the fluid particle onto the solid boundary in the normal direction of the solid boundary.
As for the pressure measurement on solid walls, the physical pressure of the pressure sensor point is computed by the pressure of the closest fluid particle and a hydrostatic pressure correction (Equation (12)).