You are on page 1of 11

Computer Physics

Communications
ELSEVIER Computer Physics Communications 87 (1995) 225-235

SPH simulation of multi-phase flow


J.J. Monaghan, A. Kocharyan
Department of Mathematics, Monash University, Clayton, -Victoria 3168, Australia

Received 26 June 1994

Abstract
This paper shows how to formulate the two phase flow of a dusty gas using SPH. The formulation is very general and
can be easily extended to deal with gas, solid and liquid phases in each of which there may be several species.

1. I n t r o d u c t i o n

Many of the most interesting fluid dynamical problems involve more than one phase. The eruption of a
volcano produces a dense, hot dusty gas (a pyroclastic flow) and the simulation of this gas is necessary if
the environmental effects of the eruption are to be predicted. Similar dusty gases are important in the mineral
processing industry where fiuidized beds are a component of many refining techniques. Multiphase problems
also occur in astrophysical phenomena ranging from dusty proto-stellar disks to conjectured interactions between
cosmological dark matter and gas.
The volcanic problem leads naturally to more complex multiphase problems. The interaction of pyroclastic
flows with surrounding bodies of water produces steam and initiates destructive waves (tsunamis). In the case
of Krakatau, 36000 people were killed by the tsunamis from violent pyroclastic outbursts. Industrial mineral
processing, while by comparison fairly benign, can involve molten metals stirred into agitated motion by jets
of gas containing carbon, or other solids, which susbsequently ignite.
Simulating these systems is far removed from the refined task of computing shock problems in an ideal
gas with ever increasing accuracy. To simulate these systems we require robust methods which give reasonable
accuracy, and do not require a major overhaul and re-tooling every time new physics is introduced. The precious,
but sensitive, finite difference methods which can be tuned to give very accurate solutions to physically simple
problems do not satisfy these needs because they require a great deal of work to convert them to handle two or
more phases with chemical reactions and radiation. By comparison, particle methods can usually be modified
quite simply. In particular, we shall show how the particle method SPH can simulate these multiphase problems.
While we focus on the dusty gas problem the formulation is very general and can be extended to the case of
several phases. A standard SPH program for ideal gases can be easily modified to handle gas, solid and liquid
phases with several species in each.

Elsevier Science B.V.


SSD1 0010-4655(94)00174-X
226 J.Z Monaghan, A. Kocharyan/ Computer Physics Communications 87 (1995) 225-235

2. The SPH equations

The SPH equations (Lucy [5], Gingold and Monaghan [ 1] ) for a compressible gas are described in detail
by Monaghan [6]. They are obtained from the continuum equations of fluid dynamics by interpolating from a
set of points which may be disordered. The interpolation is based on the theory of integral interpolants using
interpolation kernels which approximate a delta function. The interpolants are analytic functions which can be
differentiated without the use of grids. It is easy to include a spatial resolution for each particle so that the
resolution varies in time and space. Thus, in the simulation of dust and gas, the dust fluid can be followed as
it falls through the gas fluid under gravity, and the spatial resolution of the dust layer adjusts to resolve any
dense layers that form.
The essential ideas of SPH are simple. If there is a field A (scalar, vector or tensor) then it can be
approximated by an integral interpolant

A(r)/= f A(r')W(r - r', h ) d r l, (2.1)

where the kernel W tends to the delta function as h ~ 0. For the kernels normally used the difference between
the integral interpolant of A and the actual value of A is O(h2). If we have a fluid with mass density p we can
approximate the integral interpolant by a summation over a set of interpolating points a = 1,2, 3,.. according
to

f A ( r l ) W ( r - r ' ) d r ' = j f p--~7~


A ( r ' ) , w t, r - r', h ) p ( r t ) d r '

~-- ~ m a A a w ( r - ra, h ) , (2.2)


a Pa
where, for example, Aa denotes the value of A(ra), particle a has mass ma and position r~. If W is a
differentiable function then an estimate of the derivative of A can be obtained by differentiating the summation
interpolant. This is one way the partial differential equations of fluid dynamics can be converted into equations
describe the motion of these interpolating points. The interpolating points can be thought of as particles.
The particle equivalent of the momentum equation

= --- +F= -V " Vp+F (2.3)


dt p
is

dt = - ~ mb -~a + p2 + 1lab V a W a b -~ F a , (2.4)


b
where the summation is over all particles other than particle a (though in practice only near neighbours
Contribute), P is the pressure and p is the density, Hab produces a shear and bulk viscosity (see for example
Monaghan [6] ), Fa is a body force (for the problems considered here this is gravity), Wab = W(ra -- rb, h) ,
and xTa denotes the gradient of the kernel taken with respect to the coordinates of particle a. It is easy to show
that the SPH momentum equation conserves linear and angular momentum.
In this paper we use the spline based kernel (Monaghan and Lattanzio [8], Monaghan [6]) based on
Schoenberg's M4 though there is now evidence from simulations that Schoenberg's M5 kernel with continuous
third derivatives is superior. The kernel W depends on a length h which determines the resolution (see for
example (2.11)). For separations greater than 2h the M4 kernel vanishes so that the summations only involve
near neighbours since h is greater than the initial particle separation. As mentioned above it is possible to have
a different resolution length for each particle, but to simplify the notation we do not indicate this explicitly.
J.J. Monaghan, A. Kocharyan/ Computer Physics Communications 87 (1995) 225-235 227

The viscous term Ilab involves velocity differences and produces a bulk and shear viscosity. Numerous tests
show that this viscosity together with the basic SPH algorithm gives results in good agreement with a wide
range of shock tube phenomena.
The density can be calculated either by summing over the particles according to

p =~ mbWab, (2.5)
b
or by solving the continuity equation in the form

d__p_p= _x7. (pv) + v . XVp, (2.6)


dt
which becomes, on using SPH particle interpolants for the right hand side,
dpa
= ~ mbVab " xVaWab. (2.7)
dt b
where we use the notation for any vector A,

Aab = Aa -- Ab.
There is a computational advantage in using (2.7) since all rates of change can be calculated in one pass
over the particles whereas, with (2.5), there is one pass to calculate the density then another pass to calculate
the rate of change of velocity.
In the absence of heat conduction or radiation the thermal energy per unit mass changes may be approximated
by (Monaghan [6] discusses alternatives)

dual~b (-~aaPb )
dt = 2 mb d- p~ + Ilab Vab" VaWao. (2.8)

The rate of change of particle position is

dra
= Va, (2.9)
dt
but it proves important for the free surface problems to use the XSPH variant which involves adding the
following correction to the right hand side of (2.9)

Aa = e ~ mbVba_ Wab. (2.10)


b Pab

where Pab denotes (Pa + Pb)/2. This correction to the velocity keeps the particles more orderly and, in high
speed flow, prevents the penetration of one fluid by another (Monaghan [ 11 ] ).
In this paper when we use (2.10) we choose e = 0.5. For consistency the velocity used in the continuity
equation should be the velocity used for stepping the particles though this is not necessary for relatively placid
flows. Note that when (2.6) is used each particle has effectively two velocities. One of these, v, comes from
the momentum equation while the other is the corrected velocity used for moving the particles.
For the reader unfamiliar with the SPH equations they may be interpreted conveniently using a Ganssian
kernel. In two dimensions the Gaussian kernel has the form

Wab = exp(-r2ab/h2) / ( rrh2), (2.11)


228 J.J. Monaghan, A. Kocharyan / Computer Physics Communications 87 (1995) 225-235

and the contribution of particle b to the acceleration of particle a is easily seen to be a symmetric central force.
From this fact it follows that the method conserves linear and angular momentum. In the same way it can be
seen that the density of particle a increases when particle b is moving towards it.

3. The equations of motion

3.1. The continuity equation

The motion of a dusty gas is fundamental for the discussion and analysis of pyroclastic flows. For this reason
we confine our analysis of the pyroclastic flow equations to the formulation of the SPH equations for this case.
It will be evident how to generalize our equations to deal with more than two phases or several types of dust.
We start with a reduced version of the equations considered by Valentine and Wohletz [ 10] based on
the work of Harlow and Amsden [ 2,3 ]. The dusty gas is approximated by two interpenetrating fluids which
interact by pressure and drag terms. We assume the stress tensor of the dust fluid is negligible. Although it is
not necessary, we assume for simplicity that the dust grains do not evaporate and the gas does not condense.
These approximations are reasonable for some fluidized beds, but there are many geophysical and industrial
phenomena where they fail. In such cases source terms must be added to the continuity equations.
The continuity equations for the gas density/~g and the dust density /~d are

d/3g _
dt ~gXT. (vg) (3.1)

and
dPa
- - = --~dV. (Vd), (3.2)
dt
where the mass densities per unit volume of the dusty gas are related to actual densities by

~= Op. (3.3)

Here 0 is the void fraction which satisfies the condition

Og + Od = 1. (3.4)

Since the density Pd of a dust grain is known we can determine Od once F3d is known from the dust continuity
equation. We then know 0g and, from the gas continuity equation, we can determine t3g and then pg which is
needed for the gas pressure.
To simplify the SPH equations for the gas and dust it is convenient to reserve the subscripts a and b for the
gas and j and k for the dust SPH particles. The continuity equations then become

dpa = ~ mbVab" ~aWao. (3.5)


dt b
for the gas and

d~j = ~ mkvjk" XTjWjk. (3.6)


dt k
for the dust.
If we had more phases we would introduce more fluids with a continuity equation and void fraction for each.
J.J. Monaghan, A. Kocharyan / Computer Physics Communications 87 (1995) 225-235 229

3.2. The acceleration equations


In the absence of viscous effects the acceleration equations for gas and dust are

K
dvg _ x~p + "-;--
(Vd -- Vg) + g (3.7)
dt pg pg

and
dVd xTP K
-- - ^ (Vd - Vg) +g. (3.8)
dt Pd Pd
In these equations the drag factor K depends on the gas density, the dust 0 and the geometry of the dust grains
(Valentine and Wohletz [ 10], Kuipers et al. [4] ).
In order to construct SPH equations which conserve linear and angular momentum it turns out to be necessary
to write the pressure term in (3.7) in the form

~TP=v(POg ~ POgxT^~g
pg k, Pg # "]- P Z pg -- VOg. (3.9)

This form of the pressure gradient term was only discovered after a futile struggle with various SPH forms of
(3.7). Eventually a Lagrangian was constructed for the system and from its SPH approximation (3.9) emerged.
A simple form for the drag term can be obtained by smoothing with the kernel,

K ( r ) [ v g ( r ) - vd(r) ] = i K(r, Is) [ V g ( r t ) - Vd(is) ] W(r -- I s ) d r / (3.10)

which, like other SPH interpolants, has errors O(h 2) if the Schoenberg M4 kernel is used. If the drag term is
required for the gas the integral is approximated by a sum over the dust particles and vice versa. Unfortunately,
although the resulting expression conserves linear momentum, it does not conserve angular momentum. We
can, however, construct a drag term which conserves both linear and angular momentum by starting with the
following integral approximant of the drag term for the gas

K(r)(vg(r) - re(r)) = o'fK(r,r') ( Avt" AIS) "~ Ar, W ( i r _ r/l)dr~, (3.11)


k ¥
where we have used the notation

Av' = vg(r) - Vd(IS)

and

A r t -- r -- IS.

72 is a clipping constant ~-, 0.001h 2 which prevents singularities in the numerical work, and o- is a constant
equal to 1/2 for two dimensions and 1/3 for three dimensions. The reader familiar with SPH will recognize
the integrand as being similar to the term used in the gas viscosity Hab.
The SPH approximation to (3.11) for a gas particle is obtained by replacing the integral by a sum over dust
particles. We find

( ) (3.12)
230 J.J. Monaghan, A. Kocharyan/ Computer Physics Communications 87 (1995) 225-235
The drag term between any two particles is along their line of centres so the conservaton of linear and angular
momentum is guaranteed.
The drag coefficient K depends on the gas SPH particle and on the dust SPH particle. For example, the drag
term coefficient appropriate for volcanic dusty gas (defined by Valentine and Wohletz [ 10] ), is

gaj - PaOjC_______~ivjal,
D (3.13)
1"d
where rd is the radius of a dust grain (assumed spherical) and Co depends, in general, on the local Reynolds
number calculated from the relative velocity of the grains and the gas and the size of the grains (see for
example Kuipers et al. [4] for more elaborate drag coefficients).
The momentum equation for the gas particle a can be written down immediately from (3.7),(3.8) and (3.11 )
using the SPH rules. When doing so it proves essential to use (3.4) and replace ~70g by --VOd then estimate
this gradient by using a summation over the dust particles. The acceleration of particle a is then given by

dva ( PaOa PbOb ~ ~ PoOj


dt - Emb \'-~a + p--~-b + IIab/ ~ a W a b - ~. "mJ~aPj~aWaj
b J

+o- E mJ-z'-:-~ Koj ~(Vja:Y rjoWj + ga.


r2 + ~72]
(3.14)
j PaPj

The momentum equation for the dust particles can be written

dvj Pa
dt -- Oj E m a ^ ^ VjWja -- o" E m a Tgaj
~ (Vja :rja ]
| 9I~a +~12, (3.15)
a PjPa a PaPj
where the drag term for the SPH dust particle has been estimated by a summation over the SPH gas particles.
Although we have not included a viscous stress for the dust particles it is known (Kuipers et al. [4] ) that
the shear viscosity of dust in fluidized beds is up to 1000 times greater than the shear viscosity of water. The
actual stress to be used for the dust when Od ,'-'0.5 is not known.
It is easy to show that the momentum equations conserve linear and angular momentum exactly for kernels
with the symmetry properties of the Gaussian kernel (3.11).

4. The energy equation

The energy equation can be derived by forming

E m a V a . (Eq.(3.14)) + E m j v j . (Eq.(3.15)), (3.16)


a j

which relates the rate of change of kinetic energy to five terms involving double summations together with the
terms

E maVa " ga + E mjvj " gj,


a j

which, apart from sign, give the the rate of change ofthe gravitational energy. These five terms must give the
rate of change of thermal energy. Examination of the five double summations, together with the assumption
that all the drag dissipation goes into gas thermal energy, shows that the rate of change of thermal energy of
gas SPH particle a is
J.J. Monaghan, A. Kocharyan/ ComputerPhysics Communications 87 (1995) 225-235 231

dua
- 2 l~b mb (eaOa
~ p2a + PbOb
p'--'~-b + l]ab ) Vab " X~aWab + ~"~j mJ. paPjOjPavaj
... ~Waj
dt

+0" ~-~ mj -2"---/~Kaj(Vja_~___._rja)2Wja.


~" (3.17)
j PaPj r)a + rl

Having derived the energy equation from manipulating the SPH equations it is useful to decode it by taking
the continuum limit. The first two summations in (3.17) are SPH expressions for

P,
--'-~V'(OgVg @ OdVd) , (3.18)
Pg

which is the standard expression for the compressibility contribution to the thermal energy of the gas.
The thermal energy of the dust remains constant unless there is thermal energy transport between the two
phases. The heat transport terms used by Valentine and Wohletz [ 10] involve radiation from each phase, and a
heat conduction term which involves the Prandtl number. Without entering into the complexities of these heat
transport equations we can indicate how they can be incorporated into the SPH formalism.
Consider a heat transport term which is to be added to the energy equation for the gas. For a typical model
it takes the form

Qdg (Td - Tg),


R=--~--- (3.19)
Pg

where Qdg is a coefficient that depends on the properties of the gas and the dust, and T is the temperature. The
SPH form of (3.19) for a gas particle is

Ra= Z mjQaj
^ ^ I,,j-Ta)Waj.
T
(3.20)
J• PjPa
The term to be added to the energy equation for the dust is the same as (3.19), but it has the opposite sign,
and it is to be evaluated for dust particle j by summing over the gas SPH particles. We find

Rj = - ~ maQaj^^ (Tj - Ta)Waj. (3.21)


a PjPa

Our SPH energy equations therefore approximate the following thermal energy equation for the gas

Q
dug _ P-~gv " ( Ogvg qt_OdVd) -Jr._~_(Td _ Tg) "+- K Vd) 2 (3.22)
dt pg pg ~g ( vg -

and the following equation for the thermal energy of the dust

dud _ Q ('I'd -- Tg). (3.23)


dt p-~

The SPH forms of heat interchange between the phases conserves heat energy for the total system.
If the heat transport between the phases is due to radiation then (Ta - Tg) is replaced by ( e T 4 - aT4).
These equations, together with appropriate coefficients (see Valentine and Wohletz [ 10] for the Volcanoes and
Kuipers et al. [4] for the fluidized beds) enable us to simulate a wide range of problems.
232 J.J. Monaghan, A. Kocharyan / Computer Physics Communications 87 (1995) 225-235

5. Time stepping

The equations of motion are ordinary differential calculations and they may be integrated by any appropriate
method. For the present calculations the following predictor-corrector method was used.
If

dq
d--t" = F(q, t), (4:1)

then at any time t n we assume we have available qn and F n-l~2. We then predict according to

qn+U2 = qn + 0 . 5 & F n - 1 / 2 , (4.2)

the value of F n+l/2 is then estimated and then q corrected using

qn+l/2 = qn + 0.5&Fn+l/2. (4.3)

Finally we set

qn+l = 2qn+l/2 _ qn. (4.4)

The time step is controlled by gravity, the courant condition, the viscosity and the drag terms. A time step
rule based on the first three effects is given by Monaghan [6]. The condition placed on the time step 8t by the
drag terms is

8t < Man (--~) (4.5)

where the minimum is taken over all SPH particles.

6. Resolution and boundaries

Automatic adaptive resolution is achieved by choosing an h for each particle (see for example Monaghan
[6] ). The procedure depends on estimating the local number density of SPH particle and adjusting h so that
an adequate number of SPH particles is contained within the range of the kernel(about 12 particles in two
dimensions and about 40 in three dimensions). For the calculations to be described below an h constant in
space and time was adequate.
Boundaries can be treated by replacing them by a line of particles with suitable forces to prevent penetration
(Peskin [9], Monaghan [7] ). The boundaries can be given any specified motion.

7. Test calculations

The simplest tests involve the propagation of sound waves through a uniform dusty gas with a constant drag
coefficient K. If K = 0, the adiabatic speed of sound c is given by the following expression

c2= c 2(
s 1+
(l-O,)pg
OgPd ] '
(5.1)
where c 2s is the adiabatic sound speed of the gas alone. If K is sufficiently large we find
ZJ. Monaghan, A. Kocharyan / Computer Physics Communications 87 (1995) 225-235 233

__][LLL __S2__L ..... S]L . . . . . . . . . . . . . . . . . LT[ . . . . . L ..... L__ - ___ ]555 LLL _

i , ~ , 1 1 1 , i i i i . . . . . . . . . . 1 1 1 ' ~ . . . . . . . . 1 . i i i 1 [ * 1 1 1 1 1

:;t;i; .......

)----,,,,dZ.-" f . , , , ¢ : ~ . ~ ' ~ 2 ....


, .~ ~
./.....~,~ 73Y~.~L~:,.. , ,

~5£-7:: -". . . . . . . . . . x~,


.~ " - . . . . . p . <5---"y....,.-S.k~,,,Cr~t_.e
~ . . - - - ~ . - . ~ .... , , ,,\"
~ . . . ~ . ~ - - - \ .__- .... . ~, .\

, .~.~--_-_--.~-~-.:-.,, _.,.... -.\ i~ • \


" / -----,-----':- ;~"_L'-~-<'~t~
..,~_.~_ . -. I
/. - - ~ , ,,.~..

...............
~'~'~'~,E-"--'~'L~--'~-
- ~ ." J
================================================================================
" ~ i " , , • ~ t ~ ~, • ..~ "~-~. ~:-~.~'~",

Fig. 1. Motion of gas and dust initiated by the dust moving into a static region of gas. Details are given in the text. Arrows show the
velocity. The heavy black dots denote boundary particles.

2
c2 = c~ (5.2)
0~[(1 - Og)p,Upg + o~] "

Test calculations of sound wave propagation in a dusty gas were carried out in two dimensions by setting
up an initial Gaussian velocity perturbation and following the propagation of the disturbance. The half width
of the Gaussian was taken as 5 particle spacings. The results differed from the above formula by errors of
approximately two percent.
The drag was also tested by following the fall of a single SPH dust particle under gravity. Finally a model
of a dusty fountain was simulated in two dimensions. In this simulation we took the drag K to he constant.
The parameters (in SI units) were tgg = 0.9, pa = 2400, and pg = 1. The gas density is uniform and the dust
was superimposed in a rectangular region at the base. The dust was given a vertical velocity of 3. In Fig. 1 we
show the combined dust and gas system and in Figs. 2 and 3 we show each fluid separately. The arrows denote
velocities.
In t h e s e s i m u l a t i o n s the dust e v e n t u a l l y falls to the b o t t o m boundary. To prevent e x c e s s i v e c o m p a c t i o n o f the
dust the usual engineering solution is to include a term in the acceleration equations that becomes large when
the solid phase density is sufficiently high (see for example Kuipers et al,). We can achieve the same result
with a particle method by introducing a repulsive force between the SPH dust particles which becomes large
234 J.J. Monaghan, A. Kocharyan/ Computer Physics Communications 87 (1995) 225-235

~'--23~3~77~2~2~7:217 . . . . . . . . . . . . . . . . . . . . . . ntttmttmml

Fig. 2. As in Fig. 1 but the dust alone.

when the density of the dust fluid is close to the close packed grain density.

8. Discussion and conclusions

With the addition of an energy equation the above equations enable us to follow the motion of the dust and
gas fluids with great ease. Arbitrary terrain can be modelled by boundary particles (Peskin [9], Monaghan
[ 7 ] ). We can generalise the equations easily to include more than one size of grain and pumice thus allowing
us to model the mechanical features of a pyroclastic flow, and we can follow the change in scale of the different
fluids because we can use a resolution length for each SPH particle. The thermodynamic terms considered by
Valentine and Wohletz [ 10] can also be included without difficulty. Water can be treated as a fluid with small
compressibility (Monaghan [7] ) so that purely mechanical problems, like the formation of a pumice blanket
over water and its interaction with falling dust, can be simulated. This work is in progress. However, pyroclastic
flows over water require the simulation of difficult interface problems involving high temperature solids and
water, and it is not yet clear how to handle these problems
J.J. Monaghan, A. Kocharyan / Computer Physics Communications 87 (1995) 225-235 235

.-..,. ~ . . . . . - . - , ~ . . - . . .. ., ,. . . . . . -..~. . ~ ....


. % ~ . - . - - ~ . ~ - - " - ~ ......... ~_._ , , , . - ~ ..-- ...... ;-.-:"-~....~,~ -

~,~;.. ":'<-"'-..._.?......'-~---~-"
. . ~ ." . -. " x , , , ,,.''// " ,, " - ~ - _ . " - < / ' .'- : .- " 5.. -..;.~.~I.~.~.~
~ > ,~ ' ~.. ~

...... .-,. . . . . . ' , , ' , , , ; ,' \ -,. ~---'v.=~ x"

~--.T_?'-'", ..... - . ..> ----'r--~ .... -L .... -------"--~--~i,~.

"~-~'~--~'--~-~-___,- _~__ -~'___ ~ ; Z" r • ... "~__~ ___/_ -" :~ ~ ~ --~:---'~-~-_x~'~ g,~

Fig. 3. As in Fig. 1 but the gas alone.

References

[1] R.A. Gingold. and J.J. Monaghan, Mon. Not. R. Astron. Soc 181 (1977) 375.
[2] E Harlow and A.A. Amsden, J. Comput. Phys. 17 (1975) 19.
[3] E Harlow and A.A. Amsden, J. Comput. Phys. 18 (1975) 440.
[4] A.M. Kuipers, K.J. van Duin, EEH. van Beckum and W.EM. van Swanij, Comput. Chem. Eng. 17 (1993) 839.
[5] L. Lucy, Astron.J. 82 (1977) 1013.
[6] J.J. Monaghan, Ann. Rev. Astron. Astrophys. (1992)
[7] J.J. Monaghan, J. Comput. Phys. 110 (1994) 399.
[8] J.J. Monaghan, and J.C. Lattanzio, Astron. Astrophys. 158 (1986) 207.
[9] C.S. Peskin, J. Comput. Phys. 25 (1977) 220.
[10] G.H. Valentine and K.H. Wohletz, J.Geophys.Res 94 (1989) 1867.
[ 11 ] J.J. Monaghan, J. Comput. Phys. 82 (1989) 1.

You might also like