Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
72 views

Interactive Fluid Flow Simulation in Computer Graphics Using Incompressible Smoothed Particle Hydrodynamics

Paper
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Interactive Fluid Flow Simulation in Computer Graphics Using Incompressible Smoothed Particle Hydrodynamics

Paper
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Received: 1 October 2018 Revised: 27 August 2019 Accepted: 4 September 2019

DOI: 10.1002/cav.1916

RESEARCH ARTICLE

Interactive fluid flow simulation in computer graphics


using incompressible smoothed particle hydrodynamics

M. Hassaballah1 Abdelraheem M. Aly2,3 A. Abdelnaim3

1
Department of Computer Science,
Faculty of Computers and Information, Abstract
South Valley University, Qena, Egypt
Interactive simulations of fluids flow play an important role in several com-
2
Department of Mathematics, Faculty of
puter graphics-based applications such as computer games, computer anima-
Science, King Khalid University, Abha,
Saudi Arabia tion, movie industry, and virtual realities. The incompressible smoothed particle
3
Department of Mathematics, Faculty of hydrodynamics (ISPH) model is a promising numerical scheme for large-scale
Science, South Valley University, Qena, and large-deformation simulations, where the pressure can be determined
Egypt
precisely by solving pressure Poisson equation (PPE). The three main short-
Correspondence comings of the ISPH scheme are oscillating pressure, particles disorders, and
M. Hassaballah, Department of Computer
particles penetrations through rigid boundary. In this paper, the stable pres-
Science, Faculty of Computers and
Information, South Valley University, sure is obtained from modifications in the source term of PPE, in which the
Qena 83523, Egypt. divergence-free velocity condition plus density-invariance condition multiply by
Email: m.hassaballah@svu.edu.eg
a relaxation coefficient are included. The particles disorders are solved via uti-
lizing a shifting technique with the current treatment of source term in PPE.
Additionally, the dummy boundary particles are used for the rigid boundary
treatment. For getting enough pressure on the boundary, the Neumann bound-
ary condition is satisfied during the implicit solving processes. The performance
of the stabilized ISPH model is tested on various numerical simulations with
largely distorted free surface including liquid sloshing problems, fluid–fluid
and fluid–structure interactions, and dam-break flows. To extend the applica-
bility of the stabilized ISPH model, the post process including visual realism
with a highly rendering scheme is coupled. The coupled scheme introduces sev-
eral simulations including free falling of a rigid body, water splashes, and dam
break analysis. Furthermore, the proposed ISPH-based method enables efficient
and viscous fluid simulations with large time steps, higher viscosities, and res-
olutions, and it is a robust scheme in long interval simulations of nonlinear
free-surface flows.

K E Y WO R D S
computer animation, computer graphics, fluid simulation, incompressible smoothed particle
hydrodynamics (ISPH), object modeling, physically based simulation

1 I N T RO DU CT ION

Fluids such as water and gases are ubiquitous parts of the our environment and affect human everyday lives. Hence,
physically based simulation of the fluids flow has been an area of interest for a long time due to it is widely use in several

Comput Anim Virtual Worlds. 2020;31:e1916. wileyonlinelibrary.com/journal/cav © 2019 John Wiley & Sons, Ltd. 1 of 17
https://doi.org/10.1002/cav.1916
2 of 17 HASSABALLAH ET AL.

applications such as computer graphics, movies, computer games, computer animation, and even in virtual realities.1–3
More specifically, computer games and movie industry depend significantly on realistic fluid simulations.4 For example,
in voxel-based games (e.g., Minecraft), fluids are usually simulated or rendered in simplistic way, where water can be
spread in certain direction without hindrances.5 Simply, fluid simulation can be defined as a practical way for representing
the fluid in such interactive applications. Plausibility and vividness of fluid simulation or animation process robustly rely
on specific regions' dynamics of fluid. That is, some portions of the fluid bulk are of less importance to the overall visual
appearance of the simulation. On the fluid surface, such specific regions include droplets, splashing, and formation of
fluid sheets.6,7
Recent trends toward developing efficient and robust techniques to simulate and visualize detailed fluids interactively
are based on numerical methods, through solving mathematical equations or models that describe the motion of fluids.8–11
Many mathematical and programming models are proposed to describe appeared complex phenomena in the interaction
of fluids with the environment to generate visually realistic fluid image.12,13 In the literature, physically based fluid simu-
lation can be carried out using two main numerical approaches to track the fluid motion governed by the Navier–Stokes
equations: particle-based Lagrangian and grid-based Eulerian approaches.14,15 The particle-based Lagrangian approach
samples the continuum with particles that are assigned with properties such as mass, velocity or temperature, that moves
in the domain determined by the governing equations forces, whereas the Eulerian-based approaches measure the fluid
quantities for the fixed points in the space, which get updated by the fluid flow through these points.16,17 For dissolution
simulation, the particle-based approaches seem to be a typical option considering advantages of Lagrangian representa-
tions, where they are easy to implement with applied forces and arbitrary boundaries while supporting fluid mixing and
interaction with arbitrary rigid bodies. However, the grid-based Eulerian fluid simulation is preferred in various computer
graphics applications, but it is not the optimal choice considering real-time and detailed fluid simulations.18,19
This study focuses on the smoothed particle hydrodynamics (SPH) method20 —a popular method in computer graphics
for simulating complex fluid effects,21,22 which is a particle-based Lagrangian method. The SPH is originally started with
the simulation of the compressible flow and, then, special treatment are required to satisfy the incompressible condition in
the quasi-incompressible limit. That is by selecting the smallest possible speed of sound that gives a very low Mach number
ensuring density fluctuations, which is known as the weakly compressible SPH (WCSPH).23,24 The main advantage of the
SPH method is the absence of a computational grid or mesh, because it is spatially discretized into Lagrangian moving
particles. This allows the possibility of easily modeling flows with a complex geometry or flows. The fluid is represented
by the particles with relatively simple interactions via sums of the smooth kernel functions and their gradients. Each
particle represents a constant value of its mass, and density can be estimated by the direct summation of it, exact tracking
of the fluid through space (due to the Lagrangian representation) and a simple algorithmic kernel (summing weighted
kernels over nearby particles, with no systems of equations to solve or tricky geometric discretizations) where the density
is estimated by a sum rather than evolved as a state variable.
In simulating the incompressible fluid flows, ensure that the incompressibility condition should be satisfied, which is a
significant challenge. Recently, proposals for constructing an incompressible SPH model have been introduced in the liter-
ature, where the pressure is implicitly calculated by solving the discretized pressure Poisson equation (PPE) at every time
step.25–28 Zeidan et al.29 used total variation diminishing (TVD) slope limiter center (SLIC) scheme for solving two-phase,
two-fluid compressible flows, whereas Zeidan30 used TVD SLIC numerical scheme to solve two-phase gas–solid mix-
ture in thermodynamically compatible systems theory. There are several studies related to applications of SPH method
in fluid animation for computer graphics. Ihmsen et al.31 established SPH as one of the major concepts for fluid anima-
tion in computer graphics. Kozakevicius et al.32 implemented the weighted essentially nonoscillatory (WENO) wavelet
methods for solving multiphase flow problems, which were investigated in the work of Zeidan et al.33 Schechter et al.34
presented an approach of ghost fluid for free surface and solid boundary conditions in SPH liquid simulations. In the
work of Ren et al.,35 a fast SPH simulation approach is introduced for gas allowing the computational resources on the
visible gas only. Takahashi et al.36 proposed a method to simulate incompressible fluids utilizing an interface handling
technique for boundary conditions in the PPE through blending particle density computed with one smooth and one
spiky kernel for improving the robustness against both fluid–fluid and fluid–solid collisions. In the work of Zeidan,37 the
two-phase gas–magma mixture was solved numerically in the framework of thermodynamically compatible systems the-
ory. Xu et al.38 presented an approach to remove the tensile instability in the SPH scheme using an optimized particle
shifting technique. Raveendran et al.39 presented an algorithm for enforcing incompressibility of SPH method by pre-
serving the regular density across a domain. They demonstrated an approach for a variety of scenarios with significant
pressure gradients such as splashing liquids. Kang et al.40 introduced a SPH framework for simulating incompressible
fluid which satisfies the divergence and density-invariant conditions. In the work of Bender et al.,41 an implicit SPH
HASSABALLAH ET AL. 3 of 17

method is introduced for the physically based simulation of incompressible fluids. A combination of two pressure solvers
are used to enforce low volume compression and a divergence-free velocity field.
Here, the incompressible SPH (ISPH) method as a promising numerical scheme for large-scale and large-deformation
simulations is investigated. Unforgettably, the three main shortcomings in original ISPH scheme are the noisy pressure,
particles disorders, and particles penetrations through rigid boundary. To this end, the stable pressure is obtained from
modifications in the source term of PPE, in which the divergence-free velocity condition plus density-invariance condi-
tion multiply by a relaxation coefficient are included. The particles disorders are solved from adding shifting technique
with the current treatment of source term in PPE. Finally, the dummy boundary particles are used for the rigid bound-
ary treatment. For getting enough pressure on the boundary, the Neumann boundary condition was satisfied during
the implicit solving processes. The proposed stabilized ISPH-based scheme is tested on several numerical simulations
with largely distorted free surface including liquid sloshing problems, fluid–fluid and fluid–structure interactions, and
dam-break flows. Besides, the marching cubes (MC) algorithm is utilized to build a 3D model for the region of interest
and construct a triangle mesh representing the isosurface of a volumetric data. To extend the applicability of stabilized
ISPH method, the post process including visual realism with highly rendering scheme is coupled. The coupled scheme
introduces several numerical simulations including free falling of a rigid body, water splashes, and dam break analysis.
The obtained simulation results indicate that the proposed ISPH-based method is robust in long interval simulations of
nonlinear free-surface flows.
The reminder of this paper is structured as follows. Section 2 presents the necessary mathematical foundations
of numerical procedures and governing equations as well as projection scheme. Details of the proposed stabilized
ISPH-based method for interactive simulations of fluids are provided in Section 3. The obtained simulation results for
fluid animation using the proposed method are discussed in Section 4. Finally, conclusions are drawn in Section 5.

2 MATHEMATICAL FOUNDATIONS

2.1 The governing equations and projection scheme


According to the Lagrangian description, the continuity and Navier–Stokes equations for incompressible fluids, can be
written as
∇ · u = 0, (1)

Du 1 1
= − ∇P + 𝜈∇2 u + g + ∇ · 𝛕, (2)
Dt 𝜌 𝜌

where 𝜌 is the density, 𝜈 is the kinematic viscosity of the fluid, u is the velocity vector, P is the pressure of the fluid, t
indicates the time, and g is the gravity acceleration. The turbulence stress 𝛕 is necessary for representing the effects of
turbulence with coarse spatial grids. In this work, a large eddy simulation is used for modeling the turbulent stress as

𝛕 ̄ I J − 2 k𝛿I J ,
= 2(CS Δ)2 |S|S (3)
𝜌o 3

where k, 𝛿 I J , SI J , and CS = 0.2 are the turbulence kinetic energy, Kronecker delta function, strain rate of the mean flow,
and Smagorinsky constant, respectively. The local strain rate can be defined as

̄ = (2SI J SI J )1∕2 .
|S| (4)

In the projection scheme, the velocity–pressure coupled problem is solved separately for the velocity and pressure. All
variables can be updated from the previous time step variable to the current time step. Below, the symbols (n) and (n + 1)
represent the previous and the current time step. The predictor step assumes that the intermediate state without the
pressure gradient as follows:
( )
1
u = u + Δt 𝜈∇ u + g + ∇ · 𝛕 .
∗ n 2 n
(5)
𝜌
4 of 17 HASSABALLAH ET AL.

The pressure field is obtained by solving the PPE with the divergence of the velocity and the density invariance in the
source term of PPE as follows:
𝜌 𝜌 − 𝜌n
∇2 Pn+1 = ∇ · u∗ + 𝛼 , (6)
Δt Δt2

where 𝛼 is the relaxation coefficient and it can be decided from preanalysis calculations. For the corrector step, the velocity
un+1 at time n + 1 is calculated using
( )
1 n+1
un+1 = u∗ − Δt ∇P . (7)
𝜌

The particle positions are updated at time n + 1 using

rn+1 = rn + Δtun+1 . (8)

In the current simulations, due to the particle clustering at high impact flows, the shifting technique has been used
to prevent particles disorders. The hydrodynamics variables including velocity and pressure at the new positions are
corrected by Taylor series approximation

( )
Φi′ = Φi + (∇Φ)i 𝛿Rii′ + o 𝛿R2ii′ , (9)

where Φ is a general variable and i and i′ indicate the old and new positions of a particle. The particle shifting distance 𝛿,
Rii considering a shifting coefficient D and the particle concentration gradient ∇C can be found by

𝛿Rii′ = −D∇C. (10)

2.2 Treatment of rigid body motion


Solid bodies such as circular cylinder and sphere are treated as a rigid body, and the motion of the rigid body is treated using
the ISPH method: First, the solid particles are treated in similar manner as fluid particles. Second, the rigid constraint is
applied for the following solid particles only:
The mass center for each solid object is defined by

1 ∑
np
rc = r𝑗 , (11)
np 𝑗=1

where np is the number of solid particles. The relative position between the solid particle to the mass center is
defined by
ric = ri − rc . (12)

The moment of inertia of the solid body IO is defined by


np
IO = |r𝑗c |2 . (13)
𝑗=1

From now, the center of the mass velocity can be calculated using

1 ∑
np
uic = u𝑗 . (14)
np 𝑗=1
HASSABALLAH ET AL. 5 of 17

The angular velocity can be calculated as


1∑
np
ur = u𝑗 × r𝑗c . (15)
IO 𝑗=1

At the final step, the velocity of each solid particle is replaced by

ui = uic + ur × ric . (16)

3 THE PRO POSED STA BILIZED ISPH-BASED METHOD

3.1 Smoothed particle hydrodynamics


The SPH method is an interpolation method to approximate values and derivatives of continuous field quantities. The SPH
uses a macroscopic quantity as a discrete sample points identified as smoothed particles that carry the fluid properties such
as mass, position, velocity, and other physical field quantities dependent of the problem such as mass density, temperature,
and pressure. Fluids' particles in the SPH method based on the Navier–Stokes equations are represented according to
their physical properties such as viscosity, mass and volume, and the rules for interactions between the particles. The
spatial discretization based on the SPH method for the scattered particles is as follows. A physical scalar function Φi at a
sampling point xi is represented by the following integral form:

Φ(xi , t) = W(ri𝑗 , h)Φ(x𝑗 , t)dv, (17)


where W is a weight function called by the smoothing kernel function in the SPH literature. The rij and h are the dis-
tance between neighbor particles and the smoothing length, respectively. In the SPH numerical analysis, the integral
Equation (17) is approximated by the summation of contributions from neighbor particles in the support domain.

∑ m𝑗
Φ(xi , t) = W(ri𝑗 , h)Φ𝑗 (x𝑗 , t), (18)
𝑗
𝜌𝑗

where the subscripts i and j indicate positions of labeled particle and mj means representative mass related to particle j.
The quintic spline function introduced in the work of Schoenberg42 is utilized as the kernel function, which takes the
following form
⎧(3 − R)5 − 6(2 − R)5 + 15(1 − R)5 0⪯R≺1

⎪(3 − R)5 − 6(2 − R)5 1⪯R≺2
W = 𝛼d ⎨ (19)
⎪(3 − R)
5
2⪯R≺3
⎪0 R ⪰ 3,

where R = rij ∕h; rij is the distance between two particles and h is the smoothing length, and 𝛼 d is 120∕h, 7∕478𝜋h2 ,
3∕359𝜋h3 , in one, two, and three dimensions, respectively. Figure 1 illustrates the particle approximations in the support
domain.

FIGURE 1 Particles approximations in the support domain


6 of 17 HASSABALLAH ET AL.

3.2 Incompressible smoothed particle hydrodynamics


One of the important features for realistic fluid animations is the incompressibility. Thus, the incompressibility property
is a crucial parameter to obtain convincing simulations for fluids. In this regard, the projection method for the incom-
pressible fluid problem is descretized into the particle quantities based on the SPH methodology. The gradient of the scalar
function is assumed using the above defined SPH approximation as follows:

1 ∑
∇𝜙(ri ) = m𝑗 (𝜙𝑗 − 𝜙i )∇W(ri𝑗 , h). (20)
𝜌i 𝑗

In additional, the other expression for the gradient is represented by


( )
∑ 𝜙𝑗 𝜙i
∇𝜙(ri ) = 𝜌i m𝑗 + 2 ∇W(ri𝑗 , h). (21)
𝑗 𝜌2𝑗 𝜌i

In this context, Equation (20) is symmetric and Equation (21) is antisymmetric when i and j are swapped. It should
be noted that the second form ensures the momentum conservation. Besides, the divergence of the velocity ∇ui and the
gradient of the pressure ∇Pi are approximated based on the following formulas:

1 ∑
∇ui = m𝑗 (u𝑗 − ui )∇W(ri𝑗 , h), (22)
𝜌i 𝑗
( )
∑ P𝑗 Pi
∇Pi = 𝜌i m𝑗 + 2 ∇W(ri𝑗 , h). (23)
𝑗 𝜌2𝑗 𝜌i

The divergence operator is corrected using a kernel gradient normalization L(rij )

̂ i𝑗 = L(ri𝑗 )∇Wi𝑗 ,
∇W (24)

where
∑ ∑n m𝑗 −1
⎛ n𝑗=1 m𝑗 (x𝑗 − xi ) 𝜕Wi𝑗 𝜕Wi𝑗
𝑗=1 𝜌 (x𝑗 − xi ) 𝜕𝑦

⎜ 𝜌𝑗 𝜕xi 𝑗 i ⎟
L(ri𝑗 ) = ⎜ ⎟ . (25)
⎜ ∑n m𝑗 (𝑦𝑗 − 𝑦i ) 𝜕Wi𝑗 ∑n m𝑗 (𝑦𝑗 − 𝑦i ) 𝜕Wi𝑗 ⎟
⎝ 𝑗=1 𝜌𝑗 𝜕xi 𝑗=1 𝜌
𝑗 𝜕𝑦i ⎠

The second derivative of the velocity for the viscous force and the Laplacian of the pressure can be estimated based on
the approximation expression ( )
∑ 𝜌i 𝜈i + 𝜌𝑗 𝜈𝑗 ri𝑗 · ∇Wi𝑗
∇ · (𝜈∇ · u) = m𝑗 ui𝑗 , (26)
𝑗
𝜌i 𝜌𝑗 ri𝑗2 + 𝜂 2
where 𝜂 2 = 0.0001h2 is used to avoid a zero dominator. The Laplacian of pressure in the PPE is given by
( )
2 ∑ Pi𝑗 ri𝑗 · ∇Wi𝑗
2
∇ Pi = m𝑗 . (27)
𝜌i 𝑗 ri𝑗2 + 𝜂 2

Steps of the ISPH-based method coupled with visualization step are outlined in the flowchart shown in Figure 2.

3.3 Visualization and surface rendering


Visualization is the process of rendering and representing data in a pictorial format that helps in understanding the
meaning and significance of data. In this study, we focus on the indirect rendering using a 3D data to calculate the triangle
vertexes using the linear interpolation based on the MC algorithm that construct a triangle mesh. Then, 3D animation is
developed and rendered to get a high-quality visualization. A simple iterative indirect surface rendering algorithm (MC)
is utilized to build a 3D model for the region of interest. The MC construct a triangle mesh representing the isosurface of
a volumetric data set and calculate triangle vertexes using the linear interpolation. The algorithm determines the surface
HASSABALLAH ET AL. 7 of 17

FIGURE 2 Flowchart of the proposed incompressible smoothed


particle hydrodynamics (ISPH) method coupled with
visualization step

intersection of a cube by assigning a vertex if its data value is equal or exceeds the being constructed surface value. Then,
the next cube is marched. Each pixel in MC algorithm is represented as a cube with vertex indexes ranging from 0 to 7
and each edge has indexes ranging from 0 to 11. Because a cubic cell has eight vertexes and two states inside or outside
data (1 or 0), hence there are 28 = 256 possibles isosurface intersect the cube (illustrated in Figure 3). Using symmetries
between different cases, the topology of the triangles within any cube has been defined by 15 distinct patterns as shown in
Figure 4. To calculate the density D to a 3D lattice (a scalar field samples in x, y and z directions), the used kernel function
is given by four forms: rectangular, quadric, quartic, and Gaussian functions as follows.
a. Rectangular function:
{
a (|r| ≺ b)
D(r) = (28)
0 (otherwise),
b. Quadric function:
⎧D0 (1.0 − 3.0(r∕b)2 ) (0 ⪯ |r| ⪯ b∕3)

D(r) = ⎨1.5(D0 (1.0 − (r∕b)2 )) (b∕3 ⪯ |r| ⪯ b) (29)

⎩ 0 (b ≺ r),
c. Quartic function:
{
D0 (1.0 − (r∕b)2 )2 (0 ⪯ |r| ⪯ b)
D(r) = (30)
0 (b ≺ r),
d. Gaussian function:
2
D(r) = D0 e−ar (31)
where r represents the distance from each point to a neighbor particle and the parameters a, b, and D0 depend on the
density of the particles and scale of the space.
8 of 17 HASSABALLAH ET AL.

FIGURE 3 Illustration of isosurface including eight vertexes and slices


in a marching cube

FIGURE 4 Marching cubes (MC)


approximation with 15 isosurfaces cases for
3D reconstruction

FIGURE 5 Shared vertexes and edges

The neighboring cubes share the same corner nodes in the joint edges and the triangles share the same vertexes. There-
fore, in processing, MC algorithm uses the already calculated information for the four shared corners and four shared
edges. Thus, in every step, the most necessary items to be evaluated are only four corners and eight edges (instead of all
eight corners and twelve edges) as shown in Figure 5.

3.4 Determining lattice size


The lattice size is the number of scalar field samples along basic 3D direction x,y, and z as shown in Figure 6. We determine
the number of lattices along each axis by assigning the number of maximum cubes and using an axis-aligned bounding
HASSABALLAH ET AL. 9 of 17

FIGURE 6 Volumetric data and its lattice size: axis-aligned bounding box
(AABB) of all volumetric data set

box (AABB) in a volumetric data set as follows.


• Calculate the AABB by getting minimum and maximum position coordinates of all particles on each axis lx, ly, and lz
shown in Figure 4.
• Calculate the volume of the data set using AABB and dividing it to a maximum number of cubes and calculate the
volume per cube.
• Determine the length of the lattice side by calculating the cube root of the volume per cube.
• Determine the lattice size by dividing the length of each side of the data set, lx, ly, and lz by the length of a side for a
unique lattice.
After testing the corner points, the algorithm replaces the cube with an appropriate set of polygons defined its edges and
triangles configuration that vertices are indexed from zero to seven. The edges are indexed from zero to eleven. In the MC
method, lattices and surface polygons present a simple successful solution to the rendering problems.43

FIGURE 7 Comparison between current incompressible


smoothed particle hydrodynamics (ISPH) method and Greenhow's
method44 for water exit of circular cylinder
10 of 17 HASSABALLAH ET AL.

4 EXPERIMENTS A ND RESULTS

4.1 Validations
In this section, the validation test concerns the numerical simulation for the water exit of circular cylinder is introduced.
The circular cylinder is rested at the bottom of the water tank and the cylinder is lifted by the constant force equal to
the cylinder weight. Figure 7 shows the comparison between the current ISPH method and experimental results from
Greenhow44 for the water exit of circular cylinder. In this test, strong nonlinear free surface deformations occur during
the water exit of the circular cylinder. The time instants for the free surface deformation in the free surface during the
water exit of circular cylinder is presented in Figure 7. In this case, the water is lifted from the top part of the cylinder
with forming thin layer of the water particles. The formed thin layers of free surface are completely cover the circular
cylinder. From the comparison, the current ISPH method shows accurate results for nonlinear free surface simulation
with experimental results.

4.2 Visualization and animation results


In this section, we present some visualizations for the fluid animation and water splashing results based on the ISPH
method. Here, all simulations are performed for water. Volume forces are set to the standard gravity. The first simulation
concerns on the numerical simulation of sloshing problem using 3D-ISPH method. The snapshots for both of movement
and the pressure distribution of rigid body motion over water sloshing using 3D-ISPH method are shown in Figure 8.
Here, the density ratio between the rigid body and fluid is around 0.52, thus the rigid body is still floating during the
whole simulation. In this simulation, the treatment of rigid body motion follows our previous studies.43,45
In the second simulation, the two numerical tests for dam-break flows with an obstacle are performed using 2D-ISPH
method. Figure 9 shows the snapshots of pressure distributions for the dam break over obstacle. The whole tank length is
equal to 5.57 m and the initial water column is taken as square column with length 1 m. The initial particle size is equal to
0.01 m. Initially, column water impacts the obstacle generating high pressure with forming a jet over an obstacle. Then,
the over water move toward the left wall with a lower impact than the first obstacle. Finally, the water reach to the steady
state with keeping water on the right side of the obstacle and the rest on the left side. It is observed that the impact water
on obstacle and left side wall is higher at the case of an inclined dam.
However, in the third simulation, Figure 10 shows the snapshots of dam break flow over solid particles within a straight
pipe. Here, two different densities of solid particles were considered. In the first case, the density of solid particles is
taken as 1.5 and density of the water is 1 and, hence, the density ratio is 1.5. After collision of the water flow with solid

FIGURE 8 Snapshots for both of


movement and the pressure distribution of
rigid body motion over water sloshing using
3D-incompressible smoothed particle
hydrodynamics (ISPH) method
HASSABALLAH ET AL. 11 of 17

FIGURE 9 Snapshots of pressure distributions for dam-break over obstacle

FIGURE 10 Snapshots of dam


break flow over solid particles within
a straight pipe

particles inside a straight pipe, the heaver solid particles move down to the bottom wall and the water fill a bottom part of
the straight pipe. On the second case, the water flow impacts the lighter solid particles with densities 0.8 and, then, the
lighter solid particles floating over the water inside a pipe. Additionally, Figure 11 presents the simulation of dam break
for fluid–fluid interactions at three different density ratios. It is clear that the density ratio between the two fluid affects
strongly on the interactions between fluids and control the positions of each fluid. At the first case: 𝜌X ∕𝜌Y = 0.8, the
lighter fluid with density 𝜌X = 0.8 is trying to flow upper the heaver fluid with density 𝜌Y = 1. Besides, as times continue,
the lighter fluid stay totally at the upper side and heaver fluid stay at the bottom side. On the other hand, at the second
and third cases: 𝜌X ∕𝜌Y = 1.2 or 1.5, the interactions between the two fluids are different than the first case, as the heaver
fluid with density 𝜌X = 1.2 or 1.5 trying to flow down. In additional, as times continue, the heaver fluid stay totally at the
bottom part. Finally, the proposed ISPH-based method is an effective tool for simulations of sloshing, impact flow, and
multiphase flow problems.
12 of 17 HASSABALLAH ET AL.

FIGURE 11 Simulation of dam break for fluid–fluid interaction at three different density ratios 𝜌X ∕𝜌Y = 0.8, 1.2 and 1.5

FIGURE 12 Visualization of fluid animation under a free falling of a rigid body, with a render quality: 0.71 samples/pixel, render
resolution 72.0 pixels/in., max particle display = 1, 000, 000 particles in frame size of 1, 920 × 1, 080 pixels

Figure 12 shows the visualization of fluid animation based on the proposed ISPH-based method when a free falling of
a rigid body over the water tank (with a render quality = 0.71 samples/pixel, render resolution = 72.0 pixels/in., max
particle display = 1, 000, 000 particles in frame size of 1, 920 × 1, 080 pixels). Obviously, the deformation of the free surface
is caused by dropped the rigid body into calm water. The rigid body is dropped from the height of 10 cm between the
lowest point of the rigid body and the mean of the free surface. As the rigid body dropped into the calm water, the splashes
appear and after collision, the rigid body moves up forming cavitation shape from the polling water. Figure 13 presents
the simulation of the free falling of the water dragon over the rigid surface using ISPH method. As the dragon fall down
under the effects of the gravity, then the shape of dragon will be deformed totally at the moments of the collision between
the water dragon and the rigid surface. The formed splashes appear clearly at the final steps of the collisions. Figure 14
shows the visualization of water splashing according to the ISPH method (with a render quality of 0.71 samples/pixel,
render resolution 72.0 pixels/in., max particle display = 1, 000, 000 particles in frame size of 1, 920 × 1, 080 pixels). Here,
the water splashes are formed from the source water in the pipe. The visualization of the breaking waves over a rigid
HASSABALLAH ET AL. 13 of 17

FIGURE 13 Visualization of the free


falling of water dragon with a render
quality: 0.71 samples/pixel, render
resolution 72.0 pixels/in., max particle
display = 1, 000, 000 particles in frame size
of 1, 920 × 1, 080 pixels

FIGURE 14 Visualization of the water


splashing with a render quality: 0.71
samples/pixel, render resolution 72.0
pixels/in., max particle display = 1, 000, 000
particles in frame size of 1, 920×1, 080 pixels

obstacle is illustrated in Figure 15. In this visualization, the number of the particles is taken as 0.9 million, a scene size
of 1, 920 × 1, 080 pixels, render resolution 72.0 pixels/in., and quality = 0.71 samples/pixel. In additional, the breaking
waves over the rigid wall including gap are visualized as shown in Figure 16. The number of the particles is taken as
1.4 million, a scene size of 1, 920 × 1, 080 pixels, renderable camera: persp, render resolution 72.0 pixels/in., and quality
of 0.71 samples/pixel.
14 of 17 HASSABALLAH ET AL.

FIGURE 15 Visualization of the


breaking waves scenario with 0.9 million
particles, a scene size: 1, 920 × 1, 080 pixels,
renderable camera: persp, render resolution
72.0 pixels/in., and quality: 0.71
samples/pixel

FIGURE 16 Visualization of breaking


waves over a rigid wall including gap with
1.4 million, a scene size∶ 1, 920 × 1, 080
pixels, renderable camera: persp, render
resolution 72.0 pixels/in., and quality: 0.71
samples/pixel

5 CO N C LU S I O N

In this paper, an ISPH-based method is proposed to simulate incompressible fluid flows. The method is able to simulate
complex scenes with millions of sampling points coupled rigid body skillfully. The semi-implicit algorithm based on the
projection method is applied for solving the PPE. For keeping the total volume of the fluid and stabilize the evaluated pres-
sure, the source term of PPE contained the divergence-free velocity condition plus density-invariance condition multiply
by a relaxation coefficient. The particles disorders are solved by adding a shifting technique with the current treatment of
source term in PPE. Finally, the dummy boundary particles are used for the rigid boundary treatment, whereas for getting
enough pressure on the boundary, the Neumann boundary condition is satisfied during the implicit solving processes.
One advantage of the proposed method is simplicity and no complicated treatments are required. Furthermore, a smooth
integration of the rigid dynamics to fluids can be achieved via considering a suitable boundary force between fluid and
rigid bodies. The proposed stabilized ISPH-based method is tested on a variety of simulations scenarios with largely dis-
torted free surface including liquid sloshing problems, fluid–fluid and fluid–structure interactions, and dam-break flows.
HASSABALLAH ET AL. 15 of 17

The applicability of the stabilized method is extended by coupled the post process including visual realism with highly
rendering scheme. The coupled scheme simulates several applications including free falling of a rigid body, water splashes
and dam break analysis. The proposed ISPH-based method is shown to be robust in long interval simulations of nonlinear
free-surface flows and it is able to stably simulate highly nonlinear free-surface flows and impact flow.

ACKNOWLEDGEMENTS
The authors would like to express their gratitude to King Khalid University, Saudi Arabia, for providing administrative
and technical support. In addition, the authors would like to thank the anonymous reviewers for their valuable comments
and constructive suggestions, which considerably improved the quality of this paper.

AU THOR CONTRIBUTIONS

The authors contributed equally to this work.

ORCID
M. Hassaballah https://orcid.org/0000-0001-5655-8511
Abdelraheem M. Aly https://orcid.org/0000-0003-3369-8452

REFERENCES
1. Li C, Pickup D, Saunders T, et al. Water surface modeling from a single viewpoint video. IEEE Trans Vis Comput Graph.
2013;19(7):1242–1251.
2. Mercier O, Beauchemin C, Thuerey N, Kim T, Nowrouzezahrai D. Surface turbulence for particle-based liquid simulations. ACM Trans
Graph. 2015;34(6). Article No. 202.
3. Brousset M, Darles E, Meneveaux D, Poulin P, Crespin B. Simulation and control of breaking waves using an external force model. Comput
Graph. 2016;57:102–111.
4. Jiang M, Southern R, Zhang JJ. Energy-based dissolution simulation using SPH sampling. Comput Anim Virtual Worlds. 2018;29(2):e1798.
5. Zadick J, Kenwright B, Mitchell K. Integrating real-time fluid simulation with a voxel engine. Comput Games J. 2016;5(1–2):55–64.
6. Winchenbach R, Hochstetter H, Kolb A. Infinite continuous adaptivity for incompressible SPH. ACM Trans Graph. 2017;36(4). Article
No. 102.
7. Goncalves E, Zeidan D. Numerical study of turbulent cavitating flows in thermal regime. Int J Numer Methods Heat Fluid Flow.
2017;27(7):1487–1503.
8. Zeidan D, Bähr P, Farber P, Gräbel J, Ueberholz P. Numerical investigation of a mixture two-phase flow model in two-dimensional space.
Comput Fluids. 2019;181:90–106.
9. Nguyen MT, Aly AM, Lee S-W. A numerical study on unsteady natural/mixed convection in a cavity with fixed and moving rigid bodies
using the ISPH method. Int J Numer Methods Heat Fluid Flow. 2018;28(3):684–703.
10. Zhang X, Liu S. SPH fluid control with self-adaptive turbulent details. Comput Animat Virtual Worlds. 2015;26(3–4):357–366.
11. Ozgen O, Sumengen S, Kallmann M, Coimbra CFM, Balcisoy S. Simulating colliding flows in smoothed particle hydrodynamics with
fractional derivatives. Comput Anim Virtual Worlds. 2013;24(5):511–523.
12. Sun H, Han J. Particle-based realistic simulation of fluid-solid interaction. Comput Animat Virtual Worlds. 2010;21(6):589–595.
13. Cornelis J, Bender J, Gissler C, Ihmsen M, Teschner M. An optimized source term formulation for incompressible SPH. Vis Comput.
2019;35(4):579–590.
14. Bao K, Zhang H, Zheng L, Wu E. Pressure corrected SPH for fluid animation. Comput Animat Virtual Worlds. 2009;20(2–3):311–320.
15. Feng G, Liu S. Detail-preserving SPH fluid control with deformation constraints. Comput Animat Virtual Worlds. 2018;29(1):e1781.
16. Peer A, Ihmsen M, Cornelis J, Teschner M. An implicit viscosity formulation for SPH fluids. ACM Trans Graph. 2015;34(4). Article No. 114.
17. Aly AM, Asai M. Modelling of non-Darcy flows through porous media using extended incompressible smoothed particle hydrodynamics.
Numer Heat Transfer B Fundam. 2015;67(3):255–279.
18. Bender J, Müller M, Otaduy MA, Teschner M, Macklin M. A survey on position-based simulation methods in computer graphics. Comput
Graph Forum. 2014;33(6):228–251.
19. Andersen M, Niebe S, Erleben K. A fast linear complementarity problem solver for fluid animation using high level algebra interfaces for
GPU libraries. Comput Graph. 2017;69:36–48.
20. Gingold RA, Monaghan JJ. Smoothed particle hydrodynamics: theory and application to non-spherical stars. Mon Notices Royal Astron
Soc. 1977;181:375–389.
16 of 17 HASSABALLAH ET AL.

21. Ban X, Wang X, He L, Zhang Y, Wang L. Adaptively stepped SPH for fluid animation based on asynchronous time integration. Neural
Comput Appl. 2018;29(1):33–42.
22. Abdelnaim A, Hassaballah M, Aly AM. An incompressible smoothed particle hydrodynamics simulation and visualization of
fluid-structure interactions. J Flow Vis Image Process. 2019;26(3):223–238.
23. Morris JP, Fox PJ, Zhu Y. Modeling low Reynolds number incompressible flows using SPH. J Comput Phys. 1997;136(1):214–226.
24. Nair P, Tomar G. Simulations of gas-liquid compressible-incompressible systems using SPH. Comput Fluids. 2019;179:301–308.
25. Ellero M, Serrano M, Español P. Incompressible smoothed particle hydrodynamics. J Comput Phys. 2007;226(2):1731–1752.
26. Lee E-S, Moulinec C, Xu R, Violeau D, Laurence D, Stansby P. Comparisons of weakly compressible and truly incompressible algorithms
for the SPH mesh free particle method. J Comput Phys. 2008;227(18):8417–8436.
27. Aly AM, Asai M, Sonda Y. Modelling of surface tension force for free surface flows in ISPH method. Int J Numer Methods Heat Fluid
Flow. 2013;23(3):479–498.
28. Asai M, Aly AM, Sonoda Y, Sakai Y. A stabilized incompressible SPH method by relaxing the density invariance condition. J Appl Math.
2012;2012.
29. Zeidan D, Romenski E, Slaouti A, Toro EF. Numerical study of wave propagation in compressible two-phase flow. Int J Numer Methods
Fluids. 2007;54(4):393–417.
30. Zeidan D. Numerical resolution for a compressible two-phase flow model based on the theory of thermodynamically compatible systems.
Appl Math Comput. 2011;217(11):5023–5040.
31. Ihmsen M, Cornelis J, Solenthaler B, Horvath C, Teschner M. Implicit incompressible SPH. IEEE Trans Vis Comput Graph.
2014;20(3):426–435.
32. Kozakevicius AJ, Zeidan D, Schmidt AA, Jakobsson S. Solving a mixture model of two-phase flow with velocity non-equilibrium using
WENO wavelet methods. Int J Numer Methods Heat Fluid Flow. 2018;28(9):2052–2071.
33. Zeidan D, Sekhar TR. On the wave interactions in the drift-flux equations of two-phase flows. Appl Math Comput. 2018;327:117–131.
34. Schechter H, Bridson R. Ghost SPH for animating water. ACM Trans Graph. 2012;31(4). Article No. 61.
35. Ren B, Yan X, Yang T, Li C, Lin MC, Hu S. Fast SPH simulation for gaseous fluids. Vis Comput. 2016;32(4):523–534.
36. Takahashi T, Dobashi Y, Nishita T, Lin MC. An efficient hybrid incompressible SPH solver with interface handling for boundary
conditions. Comput Graph Forum. 2018;37(1):313–324.
37. Zeidan D. Assessment of mixture two-phase flow equations for volcanic flows using Godunov-type methods. Appl Math Comput.
2016;272:707–719.
38. Xu X, Yu P. A technique to remove the tensile instability in weakly compressible SPH. Computational Mechanics. 2018;62(5):963–990.
39. Raveendran K, Wojtan C, Turk G. Hybrid smoothed particle hydrodynamics. Proceedings of the 2011 ACM SIGGRAPH/Eurographics
Symposium on Computer Animation (SCA '11); 2011 Aug 5–7; Vancouver, Canada. New York, NY: ACM, p. 33–42.
40. Kang N, Sagong D. Incompressible SPH using the divergence-free condition. Comput Graph Forum. 2014;33(7):219–228.
41. Bender J, Koschier D. Divergence-free smoothed particle hydrodynamics. Proceedings of the 14th ACM SIGGRAPH/Eurographics
Symposium on Computer Animation (SCA '15); 2015 Aug 7–9; Los Angeles, CA. New York, NY: ACM, p. 147–155.
42. Schoenberg I. Contributions to the problem of approximation of equidistant data by analytic functions. Part A. On the problem of
smoothing or graduation. A first class of analytic approximation formulae. Q Appl Math. 1946;4(1):45–99.
43. Isshiki M, Asai M, Eguchi S, O-Tani H. 3D tsunami run-up simulation and visualization using particle method with GIS-based geography
model. J Earthq Tsunami. 2016;10(05):1640020.
44. Greenhow M. Wedge entry into initially calm water. Appl Ocean Res. 1987;9(4):214–223.
45. Aly AM, Asai M, Sonoda Y. Simulation of free falling rigid body into water by a stabilized incompressible SPH method. Ocean Syst Eng.
2011;1(3):207–222.

AU THOR BIOGRAPHIES

M. Hassaballah received a BS degree in Mathematics in 1997 and, then, an MS degree in


Computer Science in 2003, all from South Valley University, Egypt. In April 2008, he joined the
Lab of Intelligence Communication, Department of Electrical and Electronic Engineering and
Computer Science, Ehime University, Japan, as a PhD student, where he received the Doctor of
Engineering (D. Eng.) in Computer Science in September 2011 for his work on facial features
detection. He is currently an Associate Professor of Computer Science at Faculty of Computers
and Information, South Valley University, Egypt. His research interests include feature extrac-
tion, object detection/recognition, artificial intelligence, biometrics, image processing, com-
puter vision, machine learning, and data hiding.
HASSABALLAH ET AL. 17 of 17

Abdelraheem M. Aly received an MS degree from South Valley University, Egypt, in 2008 and
a PhD degree from the Kyushu University, Japan, in 2012. He was employed as a postdoctoral
fellow in University of Ulsan, South Korea, in 2013 (8 months) and 2016. Abdelraheem worked
in Kyushu University as a JSPS postdoctoral fellow in Japan from 2014 to 2015. Currently, he
is an Associate Professor in the Department of Mathematics at King Khalid University, Abha,
Saudi Arabia. His research interests include computational fluid dynamics, smoothed particle
hydrodynamics, heat and mass transfer, multiphase flow, and porous media.

A. Abdelnaim received the BS degree in Computer Science from South Valley University,
Egypt, in 2000. He is currently an MS candidate in the Department of Mathematics, Faculty of
Science, South valley University. His research interests are in the areas of computer graphics,
computer animation, data visualization, and fluid simulations.

How to cite this article: Hassaballah M, Aly AM, Abdelnaim A. Interactive fluid flow simulation in com puter
graphics using incompressible smoothed particle hydrodynamics. Comput Anim Virtual Worlds. 2020;31:e1916.
https://doi.org/10.1002/cav.1916

You might also like