0% found this document useful (0 votes)
24 views13 pages

2012particle Packing Algorithm For SPH Schemes

The document presents a new particle packing algorithm for initializing smoothed particle hydrodynamics (SPH) schemes. The algorithm aims to provide a regular particle distribution that is in equilibrium, avoiding particle resettlement and associated spurious motions. It takes advantage of intrinsic features of SPH schemes to determine a distribution compatible with the static solution. Numerical tests demonstrate the algorithm is fast, robust, and works for complex geometries.

Uploaded by

li15029940164
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views13 pages

2012particle Packing Algorithm For SPH Schemes

The document presents a new particle packing algorithm for initializing smoothed particle hydrodynamics (SPH) schemes. The algorithm aims to provide a regular particle distribution that is in equilibrium, avoiding particle resettlement and associated spurious motions. It takes advantage of intrinsic features of SPH schemes to determine a distribution compatible with the static solution. Numerical tests demonstrate the algorithm is fast, robust, and works for complex geometries.

Uploaded by

li15029940164
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Computer Physics Communications 183 (2012) 1641–1653

Contents lists available at SciVerse ScienceDirect

Computer Physics Communications


www.elsevier.com/locate/cpc

Particle packing algorithm for SPH schemes


Andrea Colagrossi a,b,∗ , B. Bouscasse a , M. Antuono a , S. Marrone a,c
a
CNR-INSEAN, The Italian Ship Model Basin, Rome, Italy
b
Centre of Excellence for Ship and Ocean Structures, NTNU, Trondheim, Norway
c
Department of Mechanics and Aeronautics, University of Rome “Sapienza”, Italy

a r t i c l e i n f o a b s t r a c t

Article history: Using some intrinsic features of the Smoothed Particle Hydrodynamics (SPH) schemes, an innovative
Received 26 August 2011 algorithm for the initialization of the particle distribution has been defined. The proposed particle packing
Received in revised form 7 February 2012 algorithm allows a drastic reduction of the numerical noise due to particle resettlement during the
Accepted 27 February 2012
early stages of the flow evolution. Moreover, thanks to its structure, it can be easily derived starting
Available online 8 March 2012
from whatever SPH scheme and applies under the hypotheses that the fluid is weakly-compressible or
Keywords: incompressible as well. A broad range of numerical test cases proved this tool to be fast, robust and
Meshless methods reliable also for complex geometrical configurations.
Smoothed particle hydrodynamics © 2012 Elsevier B.V. All rights reserved.
Particle initialization
Lagrangian systems

0. Introduction A possible solution is to start numerical simulations with a


high numerical damping term and leave a long enough time to
make particles self-resettle in equilibrium positions (see, for ex-
In the Smoothed Particle Hydrodynamics (SPH) scheme the
ample, Monaghan [1]). Unfortunately, the attainment of a stable
matter of how to initialize the particle positions plays a relevant
configuration can require a very long evolution, this leads to a
role. If particles are not initially set in “equilibrium” positions, they
large increase of computational costs. Moreover, the high damp-
may resettle giving rise to spurious motions which can strongly af-
ing used for particle initialization does not exclude that a further
fect the fluid evolution.
resettlement occurs when the actual simulation is started with a
Here, the acceptation of the word “equilibrium” deserves a clar- real viscosity term. This behavior has been observed in some nu-
ification. We refer to an equilibrium configuration as the set of merical simulations of Section 3.
particle positions which, under static conditions, does not lead to In the SPH framework, the first attempt to define a proper al-
particle resettlement. As proved in the following, the spurious par- gorithm for particle initialization is due to Oger et al. [2] who
ticle motion is caused by inaccuracies in the SPH representation adapted the Bubble method described in Shimada [3] to SPH
of the pressure gradient. Specifically, these inaccuracies largely in- solvers. This algorithm is based on the use of Van der Waals-like
crease when the particle distribution is anisotropic and disordered. forces to place particles throughout the fluid domain. This method
At worst, the pressure gradient is unable to approximate the cor- proves to be quite fast, applies to general geometries and provides
rect static conditions and non-physical currents/vorticity are gener- a regular particle distribution. One of the weak points is that the
ated. Then, the aim of the present work is to provide an algorithm particle positions obtained through the Bubble algorithm may not
which automatically gives the equilibrium configuration, that is, satisfy the static solution predicted by the SPH scheme, leading to
the specific particle distribution for which the pressure gradient a further resettlement.
is accurate and no particle resettlement occurs. Then, the key point to build a robust packing algorithm re-
Apart from a few cases characterized by simple geometries, the lies on the capability of providing a regular particle distribution
equilibrium configuration is not known “a priori”. Further, the gen- which is also a static solution of the SPH scheme. To this purpose
eration of spurious currents/vorticity may be particularly strong a novel packing algorithm has been derived taking advantage of
in the presence of complex solid boundary profiles (i.e. corners, some intrinsic features of the SPH schemes. Thanks to this, the
bended bodies, etc.). proposed method allows the attainment of a regular particle distri-
bution compatible with the static solution. Further, it can be easily
derived starting from whatever SPH code and applies to weakly-
compressible or incompressible SPH schemes as well.
*Corresponding author at: CNR-INSEAN, The Italian Ship Model Basin, Rome,
Italy. The paper is organized as follows: Section 1 introduces the SPH
E-mail address: a.colagrossi@insean.it (A. Colagrossi). scheme and gives an insight of the constitutive features which are

0010-4655/$ – see front matter © 2012 Elsevier B.V. All rights reserved.
doi:10.1016/j.cpc.2012.02.032
1642 A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653

fluid particle which is at the position indicated by r. A very com-


prehensive review of the SPH framework can be found in Ref. [4].
The weight function W (r  − r , h), called smoothing function or
kernel in the SPH terminology, is positive, centered in r and de-
creases monotonously with the distance r − r  . This monotonous
decrease goes to zero at the border of its support Ω(r ). The ker-
nel considered in the present work is supposed to be isotropic in
space, which is equivalent to being dependent only on the dis-
tance s = r  − r . The notation W (r  − r ; h) will be shortened
Fig. 1. Configurations of the kernel support Ω(r ) with respect to the fluid domain
hereinafter as W (r  − r ) and the dependence on h will be implic-
boundary. itly assumed. In the limit as the smoothing length h goes to zero,
the kernel has to converge weakly to a Dirac “function” and the
used to build the packing algorithm. Section 2 describes the pro- original field of the convolution integral (1.2) has to be recovered.
posed algorithm and highlights some interesting aspects about its To this purpose, the kernel W must integrate to one (see e.g. [8]),
Lagrangian structure. Finally, Section 3 provides a broad range of that is:

numerical test cases which prove the packing algorithm to be fast, 
robust and reliable also for complex geometrical configurations. W r  − r dV  = 1 ∀h > 0. (1.3)
Ω
1. Governing equations
As extensively discussed in [8], such a property is not satisfied
when the kernel domain is not completely immersed inside the
Two different approaches can be adopted in the SPH framework
fluid domain. This, for example, occurs in the neighborhood of the
to model incompressible flows: the first relies on the direct use
free surface ∂Ω F (see Fig. 1) where the kernel domain is cut by the
of the Navier–Stokes equations while the second is based on the
free surface. As a consequence, the lack of “mass” inside the kernel
assumption that the fluid is weakly-compressible and barotropic
domain implies that the integral in (1.3) is smaller than one.
(that is, a one-to-one relation between pressure and density is
The filtering formula (1.2) can be applied to the gradient of a
assumed to hold true). Both approaches have benefits and draw-
generic function
backs (for a detailed description we address the reader to Mon-

aghan [4] and Shao [5]) and lead to the so-called incompressible  
SPH and weakly-compressible SPH schemes. The main advantage ∇ f (r ) = ∇  f r  W r  − r dV  (1.4)
of the packing algorithm is that it applies to both schemes as well. Ω
In the present case, we adopt a weakly-compressible SPH scheme
and, therefore, use the weakly-compressible Euler equations: with the prime on ∇ meaning that the derivatives are computed
⎧ on the r  variable. Eq. (1.4) can be further analyzed if it is inte-
⎪ Dρ grated by parts:

⎪ + ρ ∇ · u = 0,

⎪ Dt 

⎪  

⎪ ∇ f (r ) = f r  ∇ W r  − r dV 
⎨ Du = g − ∇ p ,
Dt ρ (1.1) Ω

⎪ 

⎪ p = F (ρ ),  


⎪ + f r  W r  − r n dS  . (1.5)

⎪ Dr
⎩ = u, ∂Ω
Dt
In this expression, ∇ indicates in turn the derivatives with respect
where r indicates a position inside the fluid domain Ω , g is the
to the variable r and n is a unitary normal vector of ∂Ω pointing
gravity acceleration while u, ρ and p are respectively the veloc-
outward Ω . To obtain this equation, the antisymmetry property of
ity, the density and the pressure fields. Function F represents the
the kernel gradient (∇  W (r − r  ) = −∇ W (r − r  )) has been used.
state equation linking the density field with the pressure one (we
With this reformulation of Eq. (1.4), the gradient of any generic
recall that the fluid is assumed to be barotropic). The weakly-
function can be accessible from the knowledge of the function it-
compressibility
 assumption is enforced by choosing a sound ve- self; this is the key point of the SPH method. When the smoothing
locity, c 0 = dF /dρ , which is much larger than the maximum
procedure is applied to the differential operators of the governing
expected velocity of the fluid (for more details we address the
equations (1.1), shortening the notation  f (r ) by  f , we get:
reader to the works of Madsen and Shäffer [6] and Monaghan [4]).

⎪ Dρ

⎪ + ρ ∇ · u  = 0,
1.1. The SPH scheme ⎪
⎪ Dt



The SPH scheme is based on the filtering (smoothing) of any ⎨ Du = g − ∇ p  ,

generic flow field f with a convolution integral over the fluid do-
Dt ρ (1.6)


main Ω ⎪
⎪ p = F (ρ ),


 ⎪

  ⎪ Dr

 f (r ) = f r  W r  − r ; h dV  . (1.2) = u.
Dt
Ω
The consistency of system (1.6) for the modeling of Euler equa-
W (r  − r ; h) is a weight function, which in practical applications tions in the presence of solid boundaries and free surfaces has
must have a compact support Ω(r ), and h (usually referred to as been deeply investigated in Colagrossi et al. [8]. In practical SPH
the smoothing length) is a characteristic length of such support (see methods, the following formulas are generally used for the diver-
Fig. 1). From a physical perspective, the smoothing length h rep- gence of the velocity field and for the pressure gradient (see for
resents the characteristic length of the domain of influence of the example [9] and [8]):
A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653 1643

Fig. 2. Left panel: sketch of the vector w = −∇Γ in the neighborhood of a spatial anisotropy. Right panel: sketch of the solid and fluid particles in the packing algorithm
framework.

 
∇ · u  = u  − u · ∇ W r  − r dV  , (1.7) assumed to be smaller than O (h). Under this assumption and us-
ing the results obtained in Appendix A, the following expansions
Ω
 hold true:
 
∇ p  = p  + p · ∇ W r  − r dV  . (1.8)
∇ · u i = (u j − u i ) · ∇i W i j V j = Γi (∇ · u )i + O(h), (1.11)
Ω j

When the SPH scheme is written at the discrete level, the fluid ∇ p i = ( p j + p i )∇i W i j V j
domain is represented through Lagrangian fluid particles carrying j
the main fluid properties (e.g. the velocity, pressure, density, etc.).
In this framework, the integrals in (1.7) and (1.8) are replaced by
= Γi (∇ p )i + 2p i ∇Γi + O(h). (1.12)
summations over the fluid particles and the discrete SPH scheme Here, both Γi and ∇Γi are responsible for a deviation from the
reads: exact differential operators. As shown in the following example,
⎧ Dρ the greatest issue is caused by the pressure gradient.


i
= −ρi ( u j − u i ) · ∇i W i j V j , Let us assume we want to start a SPH simulation with hydro-




Dt static conditions. Then, we assign u i = 0, ρi = ρ (r i ) at t = t 0 and


j

⎪ try to find the hydrostatic pressure. The continuity equation is sat-
⎨ Du i = g − 1 ( p j + p i )∇i W i j V j + T i , isfied exactly while, as a consequence of (1.12), the momentum
Dt ρi j (1.9)


equation gives:

⎪ p i = F (ρi ),



⎪ Γi (∇ p )i + 2p i ∇Γi − ρi ∇Φ = O(h), (1.13)


⎩ Dr i = u .
i where Φ is the gravitational potential. This expression clearly
Dt
shows that, unless Γi = 1 and ∇Γi = 0, it is not possible to at-
Here, the subscripts indicate the quantities associated with the i-th tain any hydrostatic solution. In this context, Γi plays only a minor
and j-th fluid particle. In the specific, V i is the particle volume, role since it just causes an increase/decrease of the intensity of the
ρi = mi / V i , mi is the particle mass and ∇i indicates differentiation correct pressure gradient. On the contrary, ∇Γi is responsible for
with respect to the position r i . The term T i indicates an artificial an unbalance in both the intensity and the direction of the SPH
viscous force per unit of mass. This term is generally implemented differential operator. Further, ∇Γi diverges like 1/h when the par-
in the SPH schemes for stability reasons (see, for example, [4]). ticle distribution is strongly irregular. Then, the only way to get a
The main difference with the continuous framework is that the good initialization of the SPH scheme is to reduce the magnitude
relation (1.3) is only approximately satisfied inside the fluid do- of ∇Γi as much as possible and recover the consistency of the SPH
main. This is due to local unevenness in the particle distribution. pressure operator. This is the principal idea at the basis of the Par-
For the analysis which follows, it is convenient to introduce the ticle Packing Algorithm described in the next section.
following variables:
2. Particle Packing Algorithm
Γi = W ij V j, ∇Γi = ∇i W i j V j . (1.10)
j j The Particle Packing Algorithm is built on a simple idea: to
use the SPH features highlighted in the previous section to ini-
Variables Γi and ∇Γi give a “measure” of the unevenness in the tialize the particle distribution and minimize ∇Γ . This is made
particle distribution. In fact, if the particle distribution is perfectly by observing that the vector w = −∇Γ always points in the di-
uniform, Γi = 1 and ∇Γi = 0 otherwise Γi < 1 and ∇Γi = 0. rection of the maximum lack of “mass” and maximum anisotropy
Further, the use of Γi and ∇Γi helps understand the conver- (see Fig. 2). Now, lets assume to use it to move particles during
gence of the discrete differential operators. In fact, two different the initialization. If the fluid domain is bounded and particles are
kinds of errors are made when the exact differential formulas are not allowed to escape from the boundaries, w tends to fill all the
substituted with the discrete smoothed formulas. One kind is due asymmetries in the particle distribution and, at the same time,
to the interpolation procedure (errors proportional to the smooth- decreases as a consequence of the more regular distribution of par-
ing length, h) while the other is caused by the approximation ticles themselves. Then, the final distribution would be the most
of continuous integrals with finite summations (see, for example, regular possible and  w  (that is, ∇Γ ) would be minimized as
[10]). In the latter case the error decreases as the number of parti- requested.
cles inside the kernel domain increases. Then, if the mean number The first step to build the Particle Packing Algorithm is to close
of particles in the kernel domain is large enough, this error can be the domain boundaries. As a consequence, this implies that the
1644 A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653

free surface has to be treated as a solid boundary. The domain the particle masses are kept constant while the densities and the
boundary is modeled through fixed solid particles, that is, par- volumes are updated using the continuity equation and the rela-
ticles with zero velocity and fixed positions. This approach can tion V i = mi /ρi .
be regarded as a special use of the frozen particles (for details
see [11]) or as a straightforward application of the fixed ghost 2.1. The particle packing system as a Lagrangian system
particle technique proposed by Marrone et al. [7]. A sketch of
this procedure is displayed in the right panel of Fig. 2. In prin- (ζ )
Let us consider (2.14) and neglect the damping force T i . Un-
ciple, the proposed packing algorithm may be modified to include der this hypothesis, the particle packing system is a Lagrangian
different techniques for the solid profile modeling (e.g., repellent system and its Lagrangian function is L = T − V where:
particles [12] or boundary surface forces [13]). However, the use of
fixed solid particles is straightforward and leads to important the- ∗ u i 2 β ∗ ∗ ∗
oretical results (see Section 2.1). Note that particles do not need T = , V = W ij V 0 + β W i j V 0.
2 2
any specific rule to be positioned inside the fluid domain nor in- i i j i j
side the solid bodies. (2.18)
The second step consists in assuming the density, the pressure
and the volumes constant all over the fluid domain. We indicate Here the starred series indicates the summation over the fluid par-
them through symbols ρ0 , p 0 and V 0 respectively. Since volumes ticles while the barred one denotes the summation over the fixed
are constant and the packing algorithm has to converge toward a solid particles. Symbols T and V are the specific kinetic energy
static solution, we neglect the continuity equation. Conversely, the and specific potential energy respectively. According to the theory
momentum equation of system (1.9) becomes: of dynamical systems, the total energy (that is, E = T + V ) keeps
constant during the evolution and the system has stable equilib-
⎧ Du
⎪ i (ζ ) ria at the points where the potential attains its local minima. The
⎨ = −β∇Γi + T i ,
Dt addition of any dissipative term (like, for example, that in (2.15))
(2.14)

⎩ Dr i = u forces the dynamical system to converge toward the static (and
i stable) solution u i = 0, ∇Γi = 0. This is a fundamental point since
Dt
it proves that for a given arbitrary geometry (modeled through
where β = 2p 0 /ρ0 and Γi = j W i j V 0 . The damping force can be fixed ghost particles), the packing algorithm always converges to-
(ζ )
chosen independently from the adopted SPH scheme since T i is ward a stable particle configuration. All details on the Lagrangian
just used to ensure the convergence of the Particle Packing Algo- structure of the packing algorithm are given in Appendix B.
rithm (more details are given in Section 2.1 and in Appendix B).
Similarly to Monaghan [1], we choose a linear damping term: 2.2. Stability and equilibria in R2

(ζ ) β Let us consider the system (2.16) in the two-dimensional
Ti = −ζ u i with ζ = α (2.15)
1/d
V0 plane, R2 . In this case, there are no boundaries and, therefore,
for ζ = 0, the system has stable equilibria at the points where the
where d is the spatial dimension and α is a free dimensionless potential attains its local minima.
parameter. By numerical simulations, we heuristically found that a If the number of particles is finite, their spatial distribution can-
good choice for α ranges between 1 · 10−3 and 5 · 10−3 . Then, the not be homogeneous nor isotropic and, therefore, ∇Γ = 1 some-
particle packing system becomes: where in R2 . Since w = −∇Γ points outward the fluid domain
⎧ Du in the direction of maximum anisotropy, particles start going away


i
= −β∇Γi − ζ u i , one from the other and their reciprocal distance grows. This im-
Dt plies a decrease of W (r j − r i ) and, consequently, a decrease of
(2.16)

⎩ Dr i = u . the potential energy. The final configuration predicts particles es-
i
Dt caping at infinity and corresponds to zero potential energy (that is,
The initial conditions for the Particle Packing Algorithm are ob- a local and absolute minimum for the potential energy).
tained by setting all the particle velocities to zero and V 0 = If the particle number is infinite, there exist only three regu-
V tot / N part where V tot is the total fluid volume and N part is the lar tessellations of R2 which ensure ∇Γ = 0. These configurations
total number of particles. The time-step adopted for the present (which corresponds to local extrema for the potential energy and,
algorithm is: therefore, to equilibria of the particle system) are the triangular,
square and hexagonal tessellation of the plane. Note that they are
1/d all invariant for rigid rotations and translations which, therefore,
V
t = CFL √0 , (2.17) represent “directions” of neutral stability.
β
From a practical and theoretical point of view, it is interest-
where CFL = 1. ing to study the stability of such equilibria. Since the theoretical
As discussed in detail in the following sections, system (2.16) analysis is very prohibitive, this is made through numerical sim-
tends to converge as much as possible toward a steady state char- ulations. The first step consists in the construction of a bounded
acterized by u i = 0 and ∇Γi = 0. When the fluid system is suf- fluid domain Ω using one of the tessellations mentioned above.
ficiently close to this state, the packing algorithm is stopped and Such a domain has to be large enough to assume that the most in-
the particle positions are used to initialize the SPH simulations. ner particles are not influenced by ∂Ω . The boundary is fixed and
Since the spatial distribution is very regular, the particle volumes modeled through fixed solid particles. Note that the presence of a
can be assumed to be identical. Then, the volume used for the ini- fixed boundary automatically eliminates the “directions” of neu-
tialization of the SPH is V ∗ = V 0 . The initial particle pressure, p ∗i , tral stability (that is, rigid rotations and translations). After the
is assigned by using the analytical expression for the hydrostatic domain Ω and its boundary have been built, particles are per-
pressure and the particle positions. Then, inverting the state equa- turbed from their equilibrium positions. Specifically, we put ζ = 0,
tion, the initial density ρi∗ is computed and, finally, the particle since we do not want the viscosity to influence the stability of
mass is obtained through m∗i = ρi∗ V ∗ . During the SPH simulations, the tessellations under consideration. Under this hypothesis, sys-
A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653 1645

Fig. 3. Cartesian, triangular and hexagonal tessellations (left column, from top to bottom) and some snapshots of their evolution (right column, from top to bottom) for
h/dx = 1.4. The circumferences indicate the domains of the adopted kernel functions.

tem (2.16) is Lagrangian (that is, it preserves the total energy, E ) other configurations. In the former case the equilibrium (and the
and, therefore, only two cases are possible: particles keep oscil- related tessellation) is said to be Liapunov stable (see, for exam-
lating around the equilibrium configuration or they move toward ple, [14]) otherwise the equilibrium is unstable.
1646 A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653

Table 1
Stability of the tessellations. ‘S’ = Liapunov stable, ‘U’ = unstable.

h/dx = 0.8 h/dx = 1.4 h/dx = 2.0 h/dx = 2.6 h/dx = 3.2
Cartesian U S S U U
Triangular S U S S U
Hexagonal U U U U U

is displayed in Fig. 5 where the fluid domain has been initialized


through a Cartesian grid (left panel) and using the packing algo-
rithm (right panel).
In the former case, the use of a Cartesian grid leads to the gen-
eration of large spatial anisotropies along the inclined plane. Here,
∇Γ  = O(1) and, therefore, an intense particle resettlement is
expected during the early stages of the fluid evolution. Conversely,
the particle packing algorithm eliminates the spatial anisotropies
and drastically reduces the magnitude of ∇Γ  (whose order
of magnitude is about 10−13 H ). Incidentally, we note that it is
possible to derive SPH schemes which may reduce the spatial
anisotropies close to the solid profiles through the use of spe-
cial boundary conditions (see, for example, [16]). However, these
schemes are generally more complex than the standard SPH model
and leads to higher computational costs.
It is also interesting to analyze the dependence of the proposed
algorithm on the spatial resolution. In Fig. 6 the specific kinetic
energy of the packing scheme (that is, T ) is displayed for three
Fig. 4. Sketch of the trapezoidal tank. different spatial resolutions versus the number of iterations. The
overall behavior during the initial stages is similar for all the cases
Fig. 3 displays the tessellations (left column) along with differ- and the specific kinetic energy rapidly decreases to 10−7 β . This
ent supports of the kernel functions (circumferences). In all the heuristically shows that the Particle Packing Algorithm is weakly
simulations we used a Wendland kernel function with h/dx = 0.8, influenced by the adopted spatial resolution. Then, a further de-
1.4, 2.0, 2.6, 3.2 and the particle positions have been perturbed crease occurs for longer time depending on the specific resolution.
from their stable configuration using a noise of order dx/100. In In any case, particles are practically motionless after 2500 itera-
the right column, some snapshots of the evolutions of the different tions when the order of magnitude of the specific kinetic energy
tessellations have been drawn for h/dx = 1.4. In this specific case, is less than 10−8 β . This means that the equilibrium configuration
the Cartesian tessellation is Liapunov stable while the triangular has been attained and that the packing algorithm can be stopped.
and the hexagonal ones are unstable. Table 1 briefly summarizes Obviously, the number of iterations required for the attainment of
the results obtained. We found that the hexagonal tessellation is equilibria may vary according to the specific problem at hand, to
always unstable while the stability of the Cartesian and the tri- the choice of the kernel function (i.e., Gaussian, cubic spline, quin-
angular tessellations cannot be established “a priori”. Note that tic spline, etc.) and to the adopted damping but is generally of
behavior of a tessellation generally depends on the specific ker- order 103 .
nel used. When the particle initialization is complete, the hydrostatic so-
lution is assigned to the fluid domain (that is, hydrostatic pressure
3. Applications field and zero initial velocity) and we start the simulation through
the standard SPH scheme [4].
In the present section we show some applications of the par- As shown in the left panel of Fig. 7, the initialization through
ticle packing algorithm. We first deal with the initialization of the Cartesian grid, because of the high values of ∇Γ  near the
hydrostatic conditions in complex geometrical configurations, then sloping plane, leads
√ to the generation
√ of high spurious currents
we show a dynamical problem which evolves after the parti- (maxi |u i | 0.1 g H at t = 10 H / g ). On the contrary, these are
cle packing initialization. In all the simulations, the standard SPH completely absent when the simulations are initialized through the
scheme (see [4] for more details) has been implemented using a particle packing algorithm (right panel of the same figure).
Wendland kernel. Further, a linear state equation has been adopted A global measure of the particle resettlement phenomenon is
(see, for example, [15]) and the solid profiles have been modeled easily obtained by inspecting the evolution of the maximum in-
through the fixed ghost particles described in Marrone et al. [7]. tensity of velocity (that is, maxi |u i |) during the simulation of the
Incidentally, we highlight that the qualitative results obtained in hydrostatic solution. As shown in Fig. 8, the maximum intensity of
the following sections also hold true for those SPH schemes that velocity after the use of packing algorithm is at least two orders
implement frozen particles. of magnitude smaller than that predicted by the simulation which
starts on a Cartesian√ grid. In the latter case the particle motion still
3.1. Trapezoidal tank persists at t = 100 H / g while the simulation after the packing al-
gorithm is practically motionless (see right panel of Fig. 7).
We first consider a trapezoidal tank like that drawn in Fig. 4
(H is the filling height) and study the influence of the particle 3.1.1. Particle Packing Algorithm versus initialization through SPH with
initialization on the capability of the SPH of simulating the hy- linear damping term
drostatic solution. As stated in Section 2, the first step is to “close” As already mentioned in the Introduction, an alternative solu-
the fluid domain. This means that the free surface has to be substi- tion to reduce particle resettlement is to start the SPH simulation
tuted by a solid boundary and modeled accordingly. This procedure using a high numerical damping term and leave a long enough
A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653 1647

Fig. 5. Trapezoidal tank (H /dx = 25). Initialization using a Cartesian grid (left) and through the particle packing algorithm (right).

Fig. 6. Trapezoidal tank. Evolution of the specific kinetic energy during the initialization through the particle packing algorithm.

Fig. 7. Hydrostatic solution for the trapezoidal tank (H /dx = 50). Evolution using a Cartesian grid (left) and after the initialization through the particle packing algorithm
(right).

time to make particle self-resettle in equilibrium positions. The ties, the physical meaning of the damping coefficient used in the
actual numerical simulation starts after the equilibrium configu- SPH simulations is slightly different from that of the ζ coefficient
ration is attained. Here, we show that such a procedure (that is, adopted in the particle packing algorithm. In the latter case, the
the initialization using the SPH scheme itself) only leads to minor
damping term has to be regarded as an “inter-particle” dissipation
improvements.
while in the former case it represents artificial dissipations. For
Following Monaghan [1], we use the standard SPH scheme
with a linear damping term. By definition, this is identical to the this reason, the ζ coefficient of the SPH simulations has been made
damping term adopted in the packing algorithm and, consequently, dimensionless using physical variables (specifically, the sound ve-
its coefficient has been denoted by ζ . Apart from these similari- locity c 0 and the filling height H ).
1648 A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653

Fig. 8. Hydrostatic solution for the trapezoidal tank (H /dx = 50): time evolution of Fig. 11. Sketch of the complex tank geometry.
the maximum intensity of velocity.

3.2. A complex tank geometry

As a second example, we consider a complex geometry charac-


terized by bended profiles with different curvatures and by acute
and obtuse solid angles (see Fig. 11). Because of these features, the
particle initialization of such a geometry represents a very difficult
problem.
The top panel of Fig. 12 displays the fluid evolution under hy-
drostatic conditions after the initialization on a Cartesian grid. In
this case, the generation of spurious currents and vorticity near
corners and bended profiles is very strong and persists for long
times. On the contrary, the use of the particle packing algorithm
eliminates such an undesirable behavior and gives a uniform par-
Fig. 9. Kinetic energy evolution during the initialization with the standard SPH ticle distribution which keeps stable for long times (middle panel
scheme for different values of the damping coefficient ζ . of Fig. 12). The evolution of the kinetic energy confirms the find-
ings above proving that, after the use of the proposed algorithm,
particles are almost motionless (bottom panel of Fig. 12).

3.3. A freely floating problem

Here we consider a ship hull section floating in hydrostatic con-


ditions. Under such a hypothesis, the hull section should remain
motionless. However, because of the particle resettlement, an un-
physical deviation of the ship hull from the initial position may be
observed.
Similarly to the test cases studied in the previous sections, we
initialize the fluid domain using a Cartesian grid (top left panel of
Fig. 13) and the packing algorithm (top right panel of the same
figure). The bottom panels display the related SPH simulations. In
Fig. 10. Evolution of the maximum intensity of velocity after the particle initial-
this case, the spurious currents that generate in the neighborhood
ization with the standard SPH scheme (case a: ζ = 1.0c 0 / H ; case b: ζ = 0.1c 0 / H ;
case c: ζ = 0.02c 0 / H ) and with the particle packing algorithm (case d). of the hull because of the Cartesian grid force the ship hull to
move. Fig. 14 shows the motion of the mass center (top panels)
and the roll motion (bottom panel) of the ship hull. Because of the
The evolution of the kinetic energy during the particle initial- reduction of the spurious currents, the packing algorithm drasti-
ization through the SPH scheme is displayed in Fig. 9 for different cally reduces the unphysical ship motion ensuring the attainment
values of ζ . Incidentally we highlight that it has not been possi- of the correct hydrostatic solution.
ble to use values of ζ smaller than 0.02 since the SPH scheme
was unstable. The attainment of the equilibrium becomes faster 3.4. Evolution of an elliptical drop
and faster as the magnitude of the damping coefficient increases.
Let us consider a fluid domain Ω which at the initial time is a
However, this behavior does not correspond to a reduction of par-
two-dimensional ball of radius R, subjected to the velocity field:
ticle resettlement when the actual simulation is started but, on the
contrary, leads to the generation of larger spurious currents which 
u 0 (x, y ) = A 0 x, A0 0
persist for very long times. This is briefly summarized in Fig. 10 ⇒ ∇ u0 = . (3.19)
v 0 (x, y ) = − A 0 y 0 − A0
where the evolution of the maximum intensity of velocity is dis-
played for the same cases of Fig. 9. It is also interesting to note The initial pressure field is derived using the Poisson equation [17]
that the use of values of ζ smaller than 0.1 does not lead to any and reads:
significant improvement for long time evolution. Note that parti-
√ √ ρ0 A 20   
cles are still moving at t = 100 H / g since maxi |u i | 0.01 g H . p 0 (x, y ) = R 2 − x2 + y 2 . (3.20)
Conversely, the initialization through the packing algorithm lead to 2
the correct equilibrium configuration and avoids any further reset- Assuming the flow to be inviscid, Ω preserves an elliptical form
tlement (see case d of Fig. 10). during the evolution and this form can be derived analytically
A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653 1649

Fig. 12. Hydrostatic solution for a complex tank geometry. Top: evolution after initialization on a Cartesian grid. Middle: evolution after initialization through packing
algorithm. Bottom: time history of the kinetic energy.

(see [1] and [17] for details). This domain is initialized using flow evolution after the use of the packing algorithm displays a
a Cartesian grid (left panel of Fig. 15) and the proposed parti- more uniform particle distribution and, consequently, leads to a
cle packing algorithm (right panel of the same figure). Since the better agreement with the analytical solution (bottom panel of
SPH is a Lagrangian scheme, particles move along stream lines. Fig. 16).
Consequently, when particles are initially set on a Cartesian grid,
the flow evolution given by (3.19) leads particles to clump along 4. Conclusions
straight lines (see top panel of Fig. 16). This partially prevents
the SPH solution to match with the analytical solution for the Using some intrinsic features of the SPH scheme, a novel pack-
domain boundary (dashed lines in Fig. 16). On the contrary, the ing algorithm has been derived for the particle initialization. The
1650 A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653

Fig. 13. Freely floating of a ship hull section after initialization on a Cartesian grid (left column) and with the particle packing algorithm (right column).

Fig. 14. Freely floating of a ship hull. Top panels: motion of the mass center (left panel) and a detail of its evolution (right panel). Bottom panel: roll motion.

proposed algorithm has been validated against several test cases ∇ f  = ∇  f  W dV  (A.21)
proving to be robust, fast and reliable also for complex geometri-
Ω
cal configurations. As shown for the evolution of the elliptical drop,
the particle distribution obtained through the packing algorithm where, for the ease of notation, f  = f (r  ) and W = W (r  − r ).
may even avoid the formation of those filamentous structures that Integrating by parts and using the divergence theorem, we get:
are caused by the Lagrangian nature of the SPH.  

Acknowledgements ∇ f  = ∇  f  W dV  − f  ∇  W dV 
Ω Ω
The research leading to these results has received funding  
from the European Community’s Seventh Framework Programme = f  W n dV  + f  ∇ W dV  ,
(FP7/2007–2013) under grant agreement No. 225967 “NextMuSE”. ∂Ω Ω
This work was also partially supported by the Centre of Excel-
lence for Ship and Ocean Structures of NTNU Trondheim (Norway) where n is the normal to ∂Ω . Note that the last integral has been
within the “Violent Water–Vessel Interactions and Related Struc- obtained using the identity ∇  W (r  − r ) = −∇ W (r  − r ). Now, con-
tural Loads”. sider the following expansion:
  
f  = f + ∇ f · r  − r + O r  − r  .
2
Appendix A. Interpolation formulas (A.22)

Let us consider a generic scalar function f and the following Then, substituting into the first integral and noting that r  − r  =
convolution integral: O(h), we find:
A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653 1651

Fig. 15. Evolution of an elliptical drop. Initialization using a Cartesian grid (left) and the particle packing algorithm (right).

Fig. 16. Evolution of an initially circular patch of fluid using a Cartesian grid (top) and the particle packing algorithm (bottom). Dashed lines indicate the analytical solution
for the domain boundary.
  
 
∇ f  = f W n dV  + (∇ f )k r  − r k W n dV  = − f ∇Γ + Γ ∇ f − ∇ f r  − r ⊗ ∇ W dV 
∂Ω ∂Ω Ω
 
   
+ f ∇ W dV + O (h). + f ∇ W dV + O (h).
Ω Ω

Now, applying the divergence theorem once again and the property This formula can be rewritten as follows:

∇  W (r  − r ) = −∇ W (r  − r ), it follows: 
 ∇ f  = f  − f ∇ W dV  + Γ ∇ f

 
∇ f  = − f ∇Γ + (∇ f )k ∇ r  − r k W dV  Ω


Ω −∇ f r  − r ⊗ ∇ W dV  + O (h). (A.23)

 
+ f ∇ W dV + O (h) Ω
Then, using the expansion (A.22) once again, we finally obtain:
Ω
 

 ∇ f  = Γ ∇ f + O(h).
= − f ∇Γ + ∇ f W dV + ∇ f r  − r ⊗ ∇  W dV  (A.24)

Ω Ω In a similar way, we get:


  
+ f  ∇ W dV  + O (h) f= f  W dV  = f W dV  + O (h) = Γ f + O (h). (A.25)
Ω Ω Ω
1652 A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653

Now, basing on (A.23), we can write: The velocity inside the first double summation is rewritten as u i =
 (u i + u j )/2 + (u i − u j )/2. Conversely, the velocity inside the second
∇ f  = f  ∇ W dV  = ∇ f  + f ∇Γ − Γ ∇ f double summation can be rewritten as u i = u i − u j , since the solid
particles have null velocity (that is, u j = 0). Then, we obtain:
Ω

 ∗ ∗ ∗ (u i + u j)
+∇f r  − r ⊗ ∇ W dV  + O (h). u i · ∇i W i j V 0 = · ∇i W i j V 0
2
Ω i j i j

Then, substituting (A.24) and (A.25), we finally get: ∗ ∗ (u i − u j)


 + · ∇i W i j V 0
 2
  i j
r − r ⊗ ∇ W dV = Γ 1 + O (h). (A.26)

Ω + ( u i − u j ) · ∇i W i j V 0 .
i j
Substituting this formula back into (A.23), we obtain a consistent
formulation for ∇ f , that is: Because of its symmetry properties, the double summation con-
 taining (u i + u j ) is identically null. Then, using the identity (B.28),

∇ f  = f  − f ∇ W dV  + O (h). (A.27) we finally get:
Ω ∗
u i · ∇i W i j V 0
The expansion (1.11) for the divergence of the velocity field comes
i j
directly by applying (A.27) and (A.24) on each component of u.
Similarly, the expansion (1.12) for the pressure gradient is obtained ∗ ∗ (u i − u j) ∗
by summing 2 f ∇Γ to (A.27) and, then, using the relation (A.24).
= · ∇i W i j V 0 + ( u i − u j ) · ∇i W i j V 0
2
i j i j
 
Appendix B. Lagrangian structure of the particle packing system D 1 ∗ ∗ ∗
= W ij V 0 + W ij V 0 .
Dt 2
To show the Lagrangian structure of the particle packing algo- i j i j
rithm, we first need to prove the following equation:
Substituting this equality into (B.32), we obtain the total energy
D W ij equation of the packing algorithm:
= −(u j − u i ) · ∇i W i j . (B.28)
Dt DE
= −2ζ T , (B.33)
Proof. Since W i j = W (si j , h) where si j = r j − r i , we get: Dt
where E = T + V and
D W ij ∂ W Dsi j ∂ W ( u j − u i ) · (r j − r i )
= = , (B.29)
β ∗ ∗ ∗
Dt ∂ si j Dt ∂ si j si j
V = W ij V 0 + β W ij V 0 (B.34)
2
and the last equality has been obtained using Dr i / Dt = u i . Then, i j i j
the equality in (B.28) is obtained by using the following identity:
is the specific potential energy of the system. The first term on the
(r j − r i ) ∂ W right-hand side represents the component coming from the fluid
∇i W i j = − . 2 (B.30) domain while the second one accounts for the action of the solid
si j ∂ si j
boundary. If the damping effects are neglected, the total energy of
Multiplying system (2.16) by u i , we find: the system is conserved during the evolution.

D u i 2 References
= −β u i · ∇i W i j V 0 − ζ u i 2 . (B.31)
Dt 2
j [1] J.J. Monaghan, Simulating free surface flows with SPH, Journal of Computa-
tional Physics 110 (1994) 399–406.
Then, applying the summation over the fluid particles (here indi- [2] G. Oger, C. Leroy, E. Jacquin, D. Le Touzé, B. Alessandrini, Specific pre/post treat-
cated by the starred summation), we get: ments for 3-D SPH applications through massive HPC simulations, in: Proc. 4th
Spheric Workshop on SPH, Nantes, France, May 26–29, 2009.
DT ∗
= −β u i · ∇ i W i j V 0 − 2ζ T , (B.32) [3] K. Shimada, Physically-based mesh generation; automated triangularization of
Dt surface and volumes via Bubble packing, PhD thesis, MIT, 1993.
i j [4] J.J. Monaghan, Smoothed particle hydrodynamics, Rep. Prog. Phys. 68 (2005)
∗ 1703–1759.
where T = i u i 2 /2 is the specific kinetic energy. Denoting [5] S.D. Shao, Incompressible SPH simulation of wave breaking and overtopping
the summations over the solid particles through a barred series, with turbulence modeling, Int. J. Numer. Methods Fluids 50 (5) (2006) 597–
the double summation on the right-hand side of (B.32) can be re- 621.
[6] P.A. Madsen, H.A. Shäffer, A discussion of artificial compressibility, Coast.
arranged as follows:
Eng. 53 (2006) 93–98.
∗ [7] S. Marrone, M. Antuono, A. Colagrossi, G. Colicchio, D. Le Touzé, G. Graziani,
u i · ∇i W i j V 0 δ -SPH model for simulating violent impact flows, Comput. Methods Appl.
i j Mech. Engrg. 200 (2011) 1526–1542.
  [8] A. Colagrossi, M. Antuono, D. Le Touzé, Theoretical considerations on the free
∗ ∗ surface role in the SPH model, Phys. Rev. E 79 (5) (2009) 113 (056701).
= u i · ∇i W i j V 0 + u i · ∇i W i j V 0
[9] J. Bonet, T.S.L. Lok, Variational and momentum preservation aspects of
i j j smoothed particle hydrodynamics formulations, Comput. Methods Appl. Mech.
∗ ∗ ∗ Engrg. 180 (1999) 97–115.
= u i · ∇i W i j V 0 + u i · ∇i W i j V 0 . [10] N.J. Quinlan, M. Basa, M. Lastiwka, Truncation error in mesh-free particle meth-
i j i j ods, Int. J. Numer. Methods Engng. 66 (2006) 2064–2085.
A. Colagrossi et al. / Computer Physics Communications 183 (2012) 1641–1653 1653

[11] M. Liu, G. Liu, Smoothed particle hydrodynamics (SPH): An overview and re- [15] M. Antuono, A. Colagrossi, S. Marrone, C. Lugni, Propagation of gravity waves
cent developments, Arch. Comput. Methods Eng. 17 (1) (2010) 25–76. through an SPH scheme with numerical diffusive terms, Comput. Phys. Com-
[12] J.J. Monaghan, J.B. Kajtar, SPH particle boundary forces for arbitrary boundaries, mun. 182 (2011) 866–877.
Comput. Phys. Commun. 180 (10) (2009) 1811–1820. [16] M. Ferrand, D. Laurence, B.D. Rogers, D. Violeau, Improved time scheme in-
tegration approach for dealing with semi analytical boundary conditions with
[13] J.C.M. Marongiu, Méthode numérique lagrangienne pour la simulation d’écoule- SPARTACUS2D, in: 5th International Spheric Workshop, Manchester, 22–25 June
ments à surface libre – Application aux turbines Pelton, PhD thesis, École 2010.
Central de Lyon, 2007. [17] A. Colagrossi, A meshless Lagrangian method for free-surface and interface
[14] M. Vidyasagar, Nonlinear Systems Analysis, second ed., SIAM, 2002. flows with fragmentation, PhD thesis, Università “Sapienza”, Rome.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy