Sie sind auf Seite 1von 6

Applied Mechanics and Materials ISSN: 1662-7482, Vol. 553, pp 168-173

© 2014 Trans Tech Publications, Switzerland

Online: 2014-05-21

Numerical simulation of tank discharge using smoothed particle hydrodynamics

Maziar Gholami Korzani 1, a , Sergio Galindo Torres 1,b , David Williams 1,c

and Alexander Scheuermann 1,d

1 School of Civil Engineering, University of Queensland, Australia

a, b, c,


Keywords: Smoothed particle hydrodynamics (SPH), Computational fluid dynamics, Tank discharging, Falling head.

Abstract. The study concerns the application of the smoothed particle hydrodynamics (SPH) method within computational fluid dynamics. In the present study, a tank discharge with a falling head is investigated. Water is modelled as a viscous fluid with weak compressibility. An enhanced treatment of the solid boundaries is used within the two-dimensional SPH scheme. The boundaries are represented by a special set of SPH particles that differ from the ones representing the fluid by being immovable, preventing the fluid from leaving the container. Particles with different colors are used to illustrate the sequence of the empting the tank as well as the velocity vectors to show stream lines. A code is developed using C++ to solve all equations explicitly by use of a Verlet algorithm. Results are compared to an analytical solution, and a good agreement is achieved.


Free surface flows in hydrodynamics are of great industrial and environmental importance but they are difficult to simulate because boundary conditions are required on an arbitrarily moving surface. The Marker and Cell (MAC) method [1], which uses particles to define the surface and finite differences to solve the hydrodynamic equations, is the most flexible and robust of the available numerical methods. It has been simplified, but it remains complicated to program. In this paper we consider the application of Smoothed Particle Hydrodynamics (SPH) method to a problem involving a body of a fluid and a free surface. It is robust and simple to program in comparison to Computational Fluid Dynamics (CFD) approaches. Moreover the free surface needs not to be tracked as it is naturally identified unlike the aforementioned methods. In the presented study, this method is used to model a nearly incompressible flow. This approach is based on the observation that real fluids such as water are compressible, but with a speed of sound which is very much greater than the speed of bulk flow [2]. For instance in water with sound speed about 1500 m/s, the Mach number is extremely small, and it is customary to approximate the fluid by an artificial fluid which is exactly incompressible. The approach in this study is different: The real fluid is approximated by an artificial fluid which is more compressible than the real fluid. However, the assumed artificial fluid has a speed of sound which is still much larger than the speed of bulk flow and therefore has very small density fluctuations[3].

Smoothed Particle Hydrodynamics

The SPH is a Lagrangian mesh free particle method which, was developed in the late 70s and was originally applied for the purpose of numerical analysis in the astrophysics [4]. Nowadays, it is being used in a vast range of research domains including fluid and solid mechanics, hydrodynamics and also geotechnical engineering. The particles in the framework of SPH represent the materials used as well as the geometry of the considered domain. Each particle contains the field properties, such as velocity, density, etc. and is used as a node for the calculation. The essential idea is that the properties of each particle are

Applied Mechanics and Materials Vol. 553


calculated from those of its neighbouring particles. Conservation equations, the equation of state as well as well-defined approximation schemes are usually required. The most important part of the approximation technique is the so called kernel function W. It is a weighting function that provides an estimation of a field variable f(x) at any point x a of the domain Ω:








where the subscript a stands for the focal particle and b for a neighboring particle. The kernel function W has a support domain of radius h, which is called smoothing length and determines how many neighboring particles are considered for the approximation (Fig. 1). Hence, W has a value of zero if a particle lies outside the support domain for the focal particle. In this way only particles inside the support domain of the kernel function contribute to the calculation of the focal particle.

contribute to the calculation of the focal particle. Fig. 1: Kernel function W and its support

Fig. 1: Kernel function W and its support domain Ω.(Modified from Colagrossi [5])

The SPH Equations

The SPH equations [6] describe the motion of the interpolating points which can be considered as particles. Each particle carries a mass m, a velocity v, and other properties depending on the problem. The momentum equation for particle a becomes




where the summation is over all particles other than particle a (although in practice only near neighbors contribute), P is the pressure, and is the density, ab produces a shear and bulk viscosity, F a is a body force (for the problems considered here this is gravity), W ab is the interpolating kernel, and a denotes the gradient of the kernel taken with respect to the coordinates of particle a. The terms involving the pressure are derived from the pressure gradient. They are written in symmetrized form to conserve linear and angular momentum when the kernel is symmetric. The acceleration depends on the pressure, which, for a weakly compressible fluid, is usually specified by an equation of state of the form





where is the reference density of the fluid and c a its speed of sound at that density[7]. In the

calculations to be described here, γ = 7. An approximate estimate of the relative variation in density

δ /

~ 0.01, and

where V is the maximum speed of the fluid relative to the boundaries, we can expect δ /

of a compressible fluid in a flow with Mach number M is ~M 2 . If the speed of sound c a is ~10V,


Advances in Computational Mechanics

this estimate proves reasonable for most problems. In this paper, this speed can be estimated as 2gH with H equals the height of the container. The viscous term ab has the general form







In these expressions the notation , and ̅ ( ) for any physical quantity A has been used, and c is the speed of sound at a given density. Because of its symmetry the viscous term conserves linear and angular momentum. The viscosity vanishes for rigid rotation. The terms involving α and β introduces both shear and bulk viscosity into incompressible flow which are considered 1 in this paper. By use of continuity equation, the rate of change of density of particle a becomes




In this paper we use the cubic spline kernel. The kernel depends on a length h which determines the resolution (Eq.(7)). For separations greater than 2h the kernel vanishes so that the summations only involve near neighbors. It is possible to have a different resolution length for each particle, but this should not be necessary for incompressible flow.



this should not be necessary for incompressible flow. ( ) { ( ) (7) where q





where q = r / h, r = | r a - r b |, n is dimension of the problem and C is normalization factor.

Boundary Conditions

In the present work, an enhanced treatment of the solid boundaries [8] is used which is common within two dimensional SPH schemes. Specifically, the solid boundary is modeled through boundary particles. Different from the ghost particles, the boundary particles are fixed with respect to the solid boundary and are associated to interpolation nodes internal to the fluid through which they take the flow properties such as pressure. To keep particle inside of the container two layer of particles are used. The main advantage of using this kind of boundary particles instead of the ghost ones is that their distribution is always uniform and does not depend on the fluid particle positions. This allows a simple modeling of complex 2D geometries.


For the two-dimensional calculations described here, the particles can be set up initially on a Cartesian lattice, and then be released to find their suitable locations in the domain. The mass of particle a is given by m a = a ΔA, where ΔA is the area per particle. Particles that extend beyond boundaries are removed. Water is used as a fluid in the simulation so the particles are assigned an initial density of 1000 kg/m 3 . About 6000 particle are used with radius of 0.001 m. As shown in Fig. 2, dimensions of the domain, defined as a tank by boundary particles, are as follows: B=0.1 m, b=0.012 m and H~0.16 m. A bucket, created as well with boundary particles, is placed beneath the

Applied Mechanics and Materials Vol. 553


tank which collects the SPH particles discharging out of the hole of the tank. Fig. 3.a shows the initial condition of the problem at t = 0 s. The summations of the governing equations can be evaluated efficiently using all-pair search to access neighboring particles. Only particles in neighboring cells can then contribute to the kinetics of particles in a given cell. Time stepping is carried out using a Verlet scheme and the velocity, location, and density are updated at each time step.

location, and density are updated at each time step. Fig. 2 : The schematic view of

Fig. 2 : The schematic view of the problem


An important parameter in the emptying of a tank is the discharge velocity at the orifice. Fig. 3 shows the velocity field defined by the SPH particles at different time steps. As shown, the velocity decreases with decreasing hydraulic head. The max velocity is shown in red. The analytical solution (see next section) shows that the tank empties completely in 2.2 seconds. However, in the simulation the tank is not emptied completely after about 5 s (see Fig. 3.f). This observation is caused by the surface tension and the resulting adhesion of water to solid bodies, which are not considered in the analytical solution, as well as the scale effect of the numerical simulation (size of the particles).

effect of the numerical simulation (size of the particles). (a) t = 0.0 s (d) t

(a) t = 0.0 s

numerical simulation (size of the particles). (a) t = 0.0 s (d) t = 1.0 s

(d) t = 1.0 s

(size of the particles). (a) t = 0.0 s (d) t = 1.0 s (b) t

(b) t = 0.05 s

the particles). (a) t = 0.0 s (d) t = 1.0 s (b) t = 0.05

(e) t = 1.66 s

(a) t = 0.0 s (d) t = 1.0 s (b) t = 0.05 s (e)

(c) t = 0.5 s

s (d) t = 1.0 s (b) t = 0.05 s (e) t = 1.66 s

(f) t = 5.0 s

Fig. 3 : Snapshots of the flow velocity (m/s) at different time steps (s)

In Fig. 5, the domain inside the tank is divided in 8 rows with differently colored particles. These colors are used to demonstrate the sequence of the discharging. An indication of the stream lines is shown in Fig. 5 by use of the velocity vectors of the particles.


Advances in Computational Mechanics

172 Advances in Computational Mechanics (a) t = 0.0 s (b) t = 0.05 s (c)

(a) t = 0.0 s

172 Advances in Computational Mechanics (a) t = 0.0 s (b) t = 0.05 s (c)

(b) t = 0.05 s

in Computational Mechanics (a) t = 0.0 s (b) t = 0.05 s (c) t =

(c) t = 0.5 s

Fig. 4 : Snapshots of the coloured particles to demonstrate the sequence of the discharging at the different time (s)

the sequence of the discharging at the different time (s) (a) t = 0.0 s (b)

(a) t = 0.0 s

of the discharging at the different time (s) (a) t = 0.0 s (b) t =

(b) t = 0.05 s

at the different time (s) (a) t = 0.0 s (b) t = 0.05 s (c)

(c) t = 0.5 s

Fig. 5 : Snapshots of the velocity vectors to indicate stream lines during the discharging at different time steps (s)

Verification with Analytical Solution

We are considering the emptying of a tank through an orifice in the bottom. The shape of the orifice is sharp edged as shown in Fig. 2. The velocity through the orifice can be predicted by using the Bernoulli equation. Unfortunately it will be an over estimate of the real velocity because friction losses are not taken into account. To incorporate friction, usually the coefficient of velocity C v is used to correct the theoretical velocity with values lying in the range of 0.97 to 0.99.


To calculate the discharge through the orifice, the area of the jet is multiplied by the actual velocity. The actual area of the jet is the area of the vena contracta and not the area of the orifice. This area is obtained by using a coefficient of contraction C c of the orifice.


Where C d is the coefficient of discharge, and C d = C c C v . C d usually lies in the range (0.6 - 0.98). As the tank empties, the level of water falls. The tank has a cross sectional area of A tank . In a time dt the level falls by dh, and the flow out of the tank is


The flow rate in the orifice and within the tank is equal. By rearranging, substituting and integration of the expression between the initial level H, and level h we receive




The results of the SPH calculation and the analytical solution are shown in Fig. 6 as hydraulic head and maximum velocity at the orifice. To match the numerical simulation with the analytical solution

Applied Mechanics and Materials Vol. 553


Eq. (11) was used with C v =0.97 and C d =0.65. Based on the analytical solution, the tank empties completely in 2.2 s. As shown in Fig. 6, there is a good agreement between the numerical and the analytical solution. The deviation between both results after t ~ 2 s is caused by the phenomena mentioned already above. A very pleasing result of this study is that the values of C d and C v , which are both in empirically proven ranges, were obtained in the SPH simulation automatically.

ranges, were obtained in the SPH simulation automatically. Fig. 6 : Comparison of velocity and hydraulic
ranges, were obtained in the SPH simulation automatically. Fig. 6 : Comparison of velocity and hydraulic

Fig. 6 : Comparison of velocity and hydraulic head calculated with SPH and the analytical solution


The SPH method has been used to simulate the tank emptying problem. Verification has been done to compare results with the analytical solution. A good agreement is achieved between the numerical simulation and the analytical solution. By use of this numerical method, some physical phenomena, such as surface tension and adhesion of water to bodies, are shown which are difficult to take into consideration in the analytical solution. Colored particles are used to show which particles are taking part in the discharging during time.


The presented research is part of the Discovery Project (DP120102188) Hydraulic erosion of granular structures: Experiments and computational simulations funded by the Australian Research Council. The simulations were carried out using the Macondo Cluster from the School of Civil Engineering at the University of Queensland.



McKee, S., et al., The MAC method. Computers & Fluids, 2008. 37(8): p. 907-930.


Monaghan, J.J., Simulating free surface flows with SPH. Journal of computational physics,


110(2): p. 399-406.


Monaghan, J., Smoothed particle hydrodynamics and its diverse applications. Annual Review of Fluid Mechanics, 2012. 44: p. 323-346.


Li, S. and W.K. Liu, Meshfree particle methods. 2004, Berlin ; New York Springer. iii, 502 p.


Colagrossi, A., A Meshless Lagrangian Method for FreeSurface and Interface Flows with Fragmentation. 2003, Universit`a di Roma La Sapienza.


Liu, G.R. and M.B. Liu, Smoothed particle hydrodynamics : a meshfree particle method. 2005, New Jersey: World Scientific. xx, 449


Macdonald, J.R., Some simple isothermal equations of state. Reviews of Modern Physics,


38(4): p. 669.


Marrone, S., et al. Enhanced Boundary Treatment in 2D Smoothed Particle Hydrodynamics Models. in Proceedings of XIX Congress AIMETA. 2009.