Vous êtes sur la page 1sur 9

1

Proceedings of the 38
th
National Conference on Fluid Mechanics and Fluid Power

December 15-17, 2011, MANIT, Bhopal










Mohd Abrar Nizami Sunetra Sarkar
Indian Institute of Technology Madras Indian Institute of Technology Madras
Chennai, Tamil-Nadu Chennai, Tamil-Nadu
abrarn17@gmail.com sunetra.sarkar@gmail.com





















1. INTRODUCTION

Smoothed Particle Hydrodynamics
(SPH), originally formulated by Lucy (1977)
and Gingold and Monaghan (1977), is by now
very widely used for many diverse
applications in astrophysics, geophysics,
engineering and in the film and computer
games industry. The SPH is a powerful
method for the solution of complex fluid
dynamical and material problems. SPH
belongs to class of Lagrangian methods called
particle methods. Particle methods are self
adaptive in nature. The essence of this method
is to choose a smoothing kernel, W(r, h) (h
being the smoothing length), and to use it to
localize a continuous field through a
convolution integral and hence it is named as
Smoothed Particle Hydrodynamics. Various
merits and drawbacks of boundary treatments
and also the effects of density variations are
discussed.

ABSTRACT

In this paper, we investigate various boundary condition computations in
the Lagrangian mesh-free method, Smoothed particle hydrodynamics (SPH). In
SPH method it has been observed that there are intrinsic inaccuracies in the
computation of the fluid properties close to the boundaries. Investigation of
various boundary treatments like Purely Repulsive Forces, Dummy Particles,
Ghost particles etc., their merits and drawbacks are highlighted. Three problems
including the classic Poiseuille flow, Shear driven cavity and a periodic flow past
a cylinder are presented with comparisons. The SPH solutions using Ghost
particle approach and the results from the literature are in very good agreement
for straight boundaries. Further it is illustrated that the SPH results for curved
boundaries exhibit small pressure fluctuations near boundaries.

Key Words: Meshless Methods, Smoothed Particle Hydrodynamics (SPH), Solid
Boundary Treatments, Boundary conditions.
INVESTIGATION OF VARIOUS
BOUNDARY CONDITIONS IN
SMOOTHED PARTICLE HYDRODYNAMICS

2

2. BASIC IDEAS OF SPH

Particle methods are meshfree
methods. The reason that an underlying grid
is not needed is that functions are evaluated
using their value at the discrete points
(particles) and an interpolation kernel. The
kernel defines how much of each field
variable contributes to field variable at point
x. The kernel estimate of f(x) is defined by
< ( x

) > = ( x

) w(x

x

, ) Jx


U
(1)
Where f is a function of the three-dimensional
position vector x, and W (x - x, h) is the
kernel function. It can be shown by using
Taylor series expansion of f(x) around x that,
kernel approximation of the function is
second order accurate. If we associate with
particle j a volume
Jx
i
=
m
]
p

( x
]
)
( 2)
The accuracy of the variable estimate
rests on the choice of a sufficiently good
weight function. The smoothing function W(r,
h) should satisfy a number of conditions.
The normalization condition that states
w( x x
i
, ) Jx
i
= 1 ( 3)
U

The Delta function property that is
observed when the smoothing length h
approaches zero.
lim
h0
w( x x, ) Jx
i
= o( x x
i
) ( 4)
The compact condition
w( x x, ) = 0 wcn | x x| > k ( 5)
Elementary considerations suggest that a good
kernel should have at least the following
properties:
1. A weighting that is positive, decreases
monotonically with relative distance and has
smooth derivatives.
2. Symmetry with respect to (x - x) i.e., an
even function property;
w( x x, ) Jx
i
= w( | x x
i
| , ) ( 6)
3. A flat central portion so that the density
estimate is not strongly affected by a small
change in position of a near neighbor.
Properties of this numerical scheme
are mainly determined by the kernel function.
One example of kernel is the cubic B-spline
given by
w( R, ) = o
d

2
3
R
2
+
1
2
R
3
, 0 R 1;
1
6
( 2 R)
3
, 1 R 2 ;

0. R 2.

R is the relative distance between two points
(particles) at points x and x, R = (x - x)/h. In
[1,2,3] dimensional space,
o
d
=
1
h
,
15
7nh
2
,
3
2nh
3
respectively.
The integral in equation 1 is then
calculated using the values of the field at the
discrete points with a quadrature formula
< ( x

) > =
m
]
p
]
N
]=1
(x
]
) . w
]
( 7 )
Where Wij = W (|xi xj |, h), has the unit of
inverse of the volume.
Following the same argument, particle
approximation for the spatial derivative of the
function is
< 7 . ( x

) > =
m
]
p
]
N
]=1
(x
]
) . 7

w
]
( 8)
and the particle approximation for the spatial
gradient of the function is given as
< 7

( x

) > = 7

=
m
]
p
]
N
]=1
(x
]
)7

w
]
( 9)
7

w
]
=
x

x
]
r
]
ow
]
or
]
=
x
]
r
]
ow
]
or
]
( 10 )
Where r
ij
is the distance between particles i
and j.


3. GOVERNING EQUATIONS: Standard
SPH Model
The SPH formulation is derived by
discretizing the Navier-Stokes equations
spatially, leading to a set of ordinary
differential equations (ODEs) with respect to
3

time. This set of ODEs can then be solved via
time integration.
If the Greek superscripts and are
used to denote the coordinate directions, the
summation in the equations is taken over
repeated indices, and the total time derivatives
are taken in the moving Lagrangian frame.
The continuity equation is solved and then the
pressure field is calculated by a state
equation. The system of discrete equations to
be solved is
x

t
= v

( 11)
p

t
= p


m
]
p
]
v
]
[
N
]=1
ow
]
ox

[
( 12)
p

= c
2
p

( 13)
Where c is the speed of sound in the fluid. We
see that if c is large, then the pressure reacts
strongly to slight changes in density, but not
overly strong.
v

u
t
= m
]
N
]=1
_
p

2
+
p
]
p
]
2
_7

w
]
+
m
]
( p

+ p
]
) v
]
[
p

p
]
N
]=1
_
1
x
]

ow
]
ox

[
_
+ F

( 14)
where Fi is the body force evaluated at
particle i.
The leapfrog method is used for its low
requirement on memory storage and its
computational efficiency. For stability,
several time step criteria must be satisfied,
including a CFL condition [8],
Morris [6] gives several criteria which must
be satisfied:
t 0.2 5

c
( 15)
and additional constraints due to the
magnitude of particle accelerations f
a
[11],
t 0 .25 min

_

|
u
|
]
1
2
( 16)
and viscous diffusion,
t 0.125

2
v
( 17 )
Morris [6] states that at sufficiently high
resolution (small h) or large viscosity,
equation (17) is typically the dominant
constraint.

4. Boundary Conditions Treatment

Here we describe the various
techniques for modeling solid boundaries
highlighting the capabilities and drawbacks
for each one.

4.1. Purely Repulsive Forces
Microscopically, solid structures are
constituted by atoms which exert forces on
fluid. Inspired by this physical principle, wall
can be modeled in SPH theory by solid
particles which exert repulsive forces on fluid
particles [4], thus ensuring wall
impermeability. These solid particles are not
involved in the pressure gradient term of the
momentum equation. However, if zero
velocity at the wall is required, they
contribute to the viscous term in order to
mimic no-slip conditions. The solid particles
are immobile or can define a mobile wall.
Of the most commonly employed methods to
set boundary conditions in hydrodynamic
simulations was introduced by Monaghan
[12]. The method was conceived as an inter-
molecular repulsive force. Considering a
boundary and a fluid particle at the given
distance r, the force between them is defined
as:
PB
]
=

__
r
0
r
]
_
n
1
_
r
0
r
]
_
n
2
_
x
]
r
]
2
,
r
0
r
]
1
0
r
0
r
]
> 1
( 18)
The indices n1 and n2 are taken as 12
and 6 respectively, although other values have
been tried with similar results. The length
scale r0 is taken to be the initial spacing
between the particles and the boundary
4

particles are placed on the boundary at half
the initial spacing to provide a strong barrier
to the fluid. The coefficient D is chosen by
considering the physical configuration. For
problems involving dams, bores or weirs with
fluid of depth H, typically we take D = gH/h.
Repulsive force methods have the
disadvantage of creating a missing kernel
support area near the solid wall defining an
inaccurate gradient operator which provides
non-consistent behavior. A near-boundary
kernel-corrected version [29] is necessary to
simulate long-time simulations ideally suited
for duct flow with accurate boundary
conditions.

4.2. Dummy Particles

Dummy particles are regularly
distributed at the initial state and have zero
velocity through the whole simulation, while
several layers of dummy particles [18] are
built as an extension of the particles
surrounding the solid boundaries to ensure the
same order of discretization (in terms of
kernel compact support) for particles located
close to those boundaries, as for particles
located in the core of the domain. This also
makes the coding simpler (e.g. for
parallelization) as the same scheme is used for
all particles with the only difference that,
being wall particles fix their initial position
every time step. The number of dummy
particle layers is decided from the radius of
the compact support (such that the kernel is
not truncated for the near-wall particles). This
approach has the drawback of using zero
velocity particles and consequently problems
in enforcing free-slip conditions.

4.3. Ghost Particles

Boundary conditions defined using
ghost particles reproduce part of the
computational fluid domain, close to the
boundary at hand, outside of it. The main
characteristic of this particle, such as
pressure, velocity, density but also position,
are deduced by the ghost fluid particles.
The mirroring rules are the followings:
x
gh
= 2x
b
x

( 19)
u
ngh
= 2u
nb
u
np
( 20 )
p
gh
= p
p
( 21 )
u
gh
= u
tp
( 22 )
Where u
n
and u
t
are normal and tangential
velocities respectively with U
nb
for the local
displacement of the rigid boundary, x is the
position vector and in this case we are
considering free slip conditions.


FIG. 1. Ghost particle generation
This approach has an advantage that
the kernel is not truncated for the near-wall
particles. Comparatively this technique is
superior. Boundaries with curvatures need an
extension of the ghost particles technique
considering the local tangent plane.

4.4. Single Boundary Tangent Method

Morris [6] models the boundaries
using special smoothed particles as well,
except that these boundary particles do not
necessarily have to lie on the intersection of
the border. Instead they fill the boundary
region uniformly, see Fig. 2.
The boundary particles interact with
the fluid particles by including an extra
summation in the conservation equations.
The boundary particles do not have their
5


FIG. 2. Construction of artificial velocity for boundary
particles to simulate a no-slip boundary condition.

position or velocity updated but they do
evolve their density and hence their pressure.
The boundary particles do not move, thus
their true velocity is always zero. So, leads to
inefficient interactions. Thus, Morris has
come up with a way to attribute an artificial
velocity to a boundary particle due to the
interaction with a fluid particle. The method
of calculating artificial velocity is as follows:
For each fluid particle A
For each boundary particle B
Calculate the normal distance to the
boundary from particle A
Calculate the tangent line in accordance
with the normal of A
Calculate the normal distance to the
tangent line to particle B
Extrapolate the velocity of free particle A
across the tangent line, assuming zero
velocity at tangent line to B.
Thus, each boundary particle has an
artificial velocity that is dependent on who it
is interacting with and is given by:
v
B
= _
J
B
JA
] v
A
( 23)
The relative velocity is then:
v
AB
= _1 + _
J
B
J
A
]_v
A
= [v
A
( 24)
To keep the boundary particles values a finite
number in circumstances in which particle A
approaches the boundary and as d
A 0, we
use the following condition for :
[ = min _ [
mux
, 1 +
J
B
J
A
] ( 25 )
Morris [6] states that a good value for max is
1.5

5. RESULTS AND DISCUSSIONS

Contents:
1. Investigation of various boundary
conditions for Straight boundaries.
2. Investigation of boundary conditions
for Curved boundaries.

5.1. Investigation of various boundary
conditions for Straight boundaries:

5.1.1 Poiseuille Flow

To investigate various boundary
conditions for straight boundaries first
Poiseuille flow between stationary infinite
plates at distances y = d is considered. The
fluid is initially at rest and is driven by an
applied body force F parallel to the x-axis for
t 0. The series solution for the transient
behavior is
:
x
( y, t) =
| F|
2v
( y
2
J
2
) +
16 ( 1)
n
J
2
| F|
v n
3
( 2n + 1 )
3

n=0

cos _
( 2 n + 1) ny
2 J
_ cxp _
( 2n + 1 )
2
n
2
vt
4J
2
_ ( 26)
Where d is half the separation of the plates,
is the coefficient of kinematic viscosity, and F
is a force per unit mass given by
| F| =
1


op
ox
=
1


p
I
=
2vI
0
J
2
( 27 )
Where p is the pressure difference in the x-
direction between two points separated by a
length L and V0 is a constant asymptotic
velocity defined by
I
0
=
J
2
2v
_
Ap
I
] ( 28 )
The SPH method was used to follow
this transient behavior. In particular, we study
the case of very low Reynolds number and
perform several tests with various boundary
6

treatment techniques from section 4 with
initial parameters similar to those employed
by Morris et al. [6]. With the choice of
Re = 0.0125, 2d = 1.0 10
-3
m,
0
=1.0 10
3

kg/m
3
, and V
0
= 1.25 10
-5
ms
-1
, the
kinematic viscosity is = 2d V
0
/Re = 1.0
10
-6
m
2
s
-1
.


The periodic boundary condition is
applied for inlet and outlet particles in the
direction of the flow. Particles crossing the
outflow boundary are re-inserted into the flow
domain at the inlet from the same y-
coordinate positions with the same field
values. In essence, the periodic boundary
approach effectively simulates infinitely long
plates. The no-slip boundary condition is
applied on the lateral boundaries by using
various methods of boundary treatment.

The transient behavior of the flow is
shown in Fig. 3 for a sequence of times until
1.0 s, when the velocity profile reaches its
steady-state regime. The numerical solutions
(, --, *), etc., are compared with the
exact one (solid curves). We observed that the
maximum relative error in the asymptotic
velocity is about 0.8% by using mirror or
dummy particles, 1.105% repulsive force
particles and 0.4808% by using ghost
particles respectively.
Furthermore, by using ghost particles
the maximum and minimum calculated
densities are max = 1.0030 and
min = 0.99990, respectively, so that the
incompressibility of the flow is very well
reproduced by the numerical scheme. We also
note that the points of contact with the solid
walls remain fixed in space and time, a
feature of the solution which is also
accurately reproduced by the calculations. But
repulsive force methods have the
disadvantage of creating a missing kernel
support area near the solid wall defining an
inaccurate gradient operator which provides
non-consistent behavior.

FIG. 3. Comparison of velocity profiles using various
boundary treatment techniques.

5.1.2. Shear Driven Cavity

Secondly we tested Shear driven
cavity problem. It is a fluid flow within a
closed square generated by moving the top
side of the square at a constant velocity V
0

while the other three sides remain stationary.
In the simulations we perform several tests
with various boundary treatment techniques
from section 4 with initial parameters, the
dimension of the side of the square domain is
l = 10
-3
m; the kinetic viscosity and density
are = 10
-6
m
2
s
-1
and = 10
3
kgm
-3
respectively. The top side of the square moves

FIG. 4. stream line pattern at the steady state for the shear
driven cavity problem ( Ghost Particle approach )
7

(a)


(b)
FIG. 5. Comparisons of the results obtained using Repulsive
Forces, Ghost Particles and Mirror/Dummy Particles for the
shear driven cavity problem: (a) vertical velocity profiles
along the horizontal centerline at the steady state and (b)
horizontal velocity profiles along the vertical centerline at the
steady state.
at a velocity of V
0
= 10 3ms
-1
A total of
1600 (40 40) real particles are placed in the
square region. A constant time step of 510
-5
s
is used.
The flow will reach a steady state, and
form a recirculation zone in the square region
as can be seen from the stream line pattern at
the steady state for the shear driven cavity
problem is shown in Fig. 4. It takes
approximately 3100 steps to reach a steady
state [17].
Fig. 5 shows the non-dimensional
vertical velocity profile along the horizontal
centerline and the non-dimensional horizontal
velocity profile along the vertical centerline
respectively. These results were obtained
using various boundary treatments like Purely
Repulsive Forces, Ghost Particles and
Dummy Particles ( *, and --)
respectively. It is observed that the results
obtained using Ghost Particles are superior in
this case also and in very good agreement
with Liu, G.R. et al. [17].

5.2. Investigation of Boundary Conditions
for Curved Surfaces:

5.2.1. Flow Through a Periodic Array of
Cylinders

A more challenging case is flow
through a lattice of cylinders. This particular
configuration has been studied extensively [2-
4] as a simple model of flow through fibrous
porous media.

FIG. 6. Single cylinder within a periodic lattice.

To solve this problem with SPH,
Morris [6] considered single cylinder and its
associated volume within the lattice is
considered (Fig. 6). Flow is driven by a
pressure gradient (modeled using an effective
body force F ), and periodic boundary
conditions are applied to model an infinite
periodic array. The SPH simulation was run
using approximately 3000 particles. The
cylinder was modeled by considering all
particles within its perimeter to be of the type
described in Section 4.4. The particles started
from rest and steady state was reached after
8


FIG. 7. Paths along which solutions are obtained.

approximately 1500 steps. Tangents generated
for velocity extrapolation are as shown in
Fig.(8 ).


FIG.8. Tangents generated for velocity extrapolation

Velocity and pressure distributions
were plotted for values within one nearest
neighbor distance of the four paths described
in Fig. 7. The corresponding plots for SPH
were obtained by interpolating the particle
quantities to a 50 by 50 array of points using
the quintic kernel. Smoothing lengths of 1 and
3 grid spacings were used for the velocity and
pressure, respectively. A greater amount of
smoothing was needed to remove small
fluctuations from the pressure field.
Fig. 9 shows a velocity profiles
obtained for paths 1 and 2 defined in Fig. 6.
The results obtained shows exact match with
those obtained by Morris [6]. Good agreement
is obtained for the bulk of the flow.


FIG. 9. SPH velocity profiles along paths 1and 2 for Re = 1.

Fig. 10 shows the dynamic pressure along
paths 3 and 4 (Fig. (7)).

FIG. 10. SPH pressure profiles along paths 3 and 4 for Re = 1.

The dynamic pressure profile shows
small local fluctuations in the immediate
vicinity of the cylinder.

6. CONCLUSIONS

In SPH, Mesh generation is not
required and it is very easy to add or remove
particles for accuracy and thus reduces
computation. As the accuracy of the variable
estimate rests on the choice of a sufficiently
good weight function, one must carefully
choose a weight function when higher order
derivatives are involved and kernel must have
9

a compact finite support to reduce
computational cost. It is well understood that
SPH can handle very large deformations and
it is a adaptive technique (Shaofan Li and
W.K.Liu (2002))[9].
Enforcement of different boundary
conditions and their comparison of solutions
using various boundary treatment techniques
are explained in detail. Proper in/out flow
boundary condition still remains a challenging
task using SPH. Further SPH method can be
used to simulate viscous, incompressible and
weakly compressible flows past oscillating
bodies.

REFERENCES

[1] Anderson, J. D. (1995), Computational
fluid dynamics: the basics with applications,
Mc Graw-Hill.
[2] N. Epstein and J. H. Masliyah, Creeping
flow through clusters of spheroids and
elliptical cylinders, Chem. Enj. J. 3, 169
(1972).
[3] J. E. Drummond and M. I. Tahir, Laminar
viscous flow through regular arrays of parallel
solid cylinders, Int. J. Multiphase Flow 10,
515 (1984).
[4] G. W. Jackson and D. F. James, The
permeability of fibrous porous media, Can. J.
Chem. Eng. 64, 364 (1986). [5] Gingold RA,
[5] Monaghan, JJ (1977) Smoothed Particle
Hydrodynamics: Theory and Applications to
Non-spherical Stars. Mon. Not. R. Astron.
181, 375-389 3.
[6] Morris, J.P., Fox, P.J. and Shu, Y. 1997.
Modeling lower Reynolds number
incompressible flows using SPH. Journal
Computational Physics, 136: 214-226.
[7] Randles and Libersky, 1996 P.W. Randles
and L.D. Libersky, Smoothed particle
hydrodynamics: some recent improvements
and applications, Computer Methods in
Applied Mechanics and Engineering 139
(1996), pp. 375408. Article -PDF (3099 K).
[8] H. Takeda, S.M. Miyama, M. Sekiya,
Numerical simulation of viscous flow with
smoothed particle hydrodynamics, Prog.
Theor. Phys. 92 (5) (1994) 939.
[9]Shaofan Li and W. K. Liu (2002).
Meshfree and particle methods and their
applica- tions. App Mech Rev, 55(1).
[10] Randles and Libersky, 2000 P.W.
Randles and L.D. Libersky, Normalized SPH
with stress point, International Journal for
Numerical Methods in Engineering 47 (2000),
pp. 14451462.
[11] Monaghan, J. J. 1992. Smoothed particle
hydrodynamics. Annual Rev. Astron. Appl.,
30: 543- 574.
[12] Monaghan, J. J. 1994. Simulating free
surface flows with SPH. Journal
Computational Physics, 110: 399- 406.
[13] J.J. Monaghan. Simulating gravity
currents with SPH lock gates. Applied
Mathematics Reports and Preprint, 95/5,
1995.
[14] Monaghan, J. J., 2005. Smoothed particle
hydrodynamics. Rep. Prog. Phys. 68 (8),
17031759.
[15] M. Yildiz, R. Rook, and A. Suleman:
SPH with the Multiple Boundary Tangent
Method. International Journal for Numerical
Methods in Engineering, 77:14161438, 2009.
[16] phd theses,Eun-Sug Lee: Truly
incompressible approach for computing
incompressible flow in SPH and comparisons
with the traditional weakly compressible
approach, University of Manchester
[17] Liu, G.R. and Liu, M.B, Smoothed
Particle Hydrodynamics - a mesh free particle
method, World Scientific, (2003). 15
[18] phd theses,Eun-Sug Lee: Truly
incompressible approach for computing
incompressible flow in SPH and comparisons
with the traditional weakly compressible
approach, University of Manchester.

Vous aimerez peut-être aussi