0% found this document useful (0 votes)
41 views11 pages

Multiple-Fluid SPH Simulation Using A Mixture Model

Uploaded by

Flynn Hawk
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)
41 views11 pages

Multiple-Fluid SPH Simulation Using A Mixture Model

Uploaded by

Flynn Hawk
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/ 11

Multiple-fluid SPH Simulation Using a Mixture Model

Bo Ren
Tsinghua University, Beijing
and
Chenfeng Li
Swansea University
and
Xiao Yan
Tsinghua University, Beijing
and
Ming C. Lin
University of North Carolina at Chapel Hill
and
Javier Bonet
Swansea University
and
Shi-min Hu
Tsinghua University, Beijing

This paper presents a versatile and robust SPH simulation approach for the new multiple-fluid SPH scheme can be readily integrated into existing
multiple-fluid flows. The spatial distribution of different phases or com- state-of-the-art SPH simulators, and the multiple-fluid simulation is easy to
ponents is modeled using the volume fraction representation, the dynam- set up. Various examples are presented to demonstrate the effectiveness of
ics of multiple-fluid flows is captured by using an improved mixture mod- our approach.
el, and a stable and accurate SPH formulation is rigorously derived to re-
Categories and Subject Descriptors: I.3.7 [Computer Graphics]: Three-
solve the complex transport and transformation processes encountered in
Dimensional Graphics and Realism—Animation; I.6.8 [Simulation and
multiple-fluid flows. The new approach can capture a wide range of real-
Modeling]: Types of Simulation—Animation
world multiple-fluid phenomena, including mixing/unmixing of miscible
and immiscible fluids, diffusion effect and chemical reaction etc. Moreover, General Terms: Physically Based Animation, Fluid Simulation
Additional Key Words and Phrases: Multiphase and Multicomponent Flow,
Miscible and Immiscible Fluids, Smoothed Particle Hydrodynamics, Vol-
B. Ren, X. Yan and S.-M. Hu are with Beijing Higher Institution Engineer- ume Fraction Model, Mixture Model
ing Research Center of Intelligent Processing of Visual Media and Content
Security at Tsinghua University. S.-M. Hu is corresponding author. C.-F. 1. INTRODUCTION
Li and J. Bonet are with the College of Engineering, Swansea University.
M.C. Lin is with the Department of Computer Science, University of North Over the past decade, multiple-fluid simulation has received con-
Carolina at Chapel Hill. siderable attention in the graphics community. Much of these works
Authors’ Email addresses: [email protected], focused on interfacial flows (e.g. [Losasso et al. 2006; Hong et al.
[email protected], [email protected], [email protected], 2008; Boyd and Bridson 2012; Misztal et al. 2012]), a special class
[email protected], [email protected] of multiple-fluid systems where the fluids are immiscible with each
Permission to make digital or hard copies of part or all of this work for other and clear interfaces exist between different phases or compo-
personal or classroom use is granted without fee provided that copies are nents. Another category of multiple-fluid flows involve miscible or
not made or distributed for profit or commercial advantage and that copies dispersed fluid mixtures where interfaces can be difficult to track
show this notice on the first page or initial screen of a display along with continuously or even do not exist. Like interfacial flows, model-
the full citation. Copyrights for components of this work owned by others ing miscible or dispersed fluids is also important for the visual
than ACM must be honored. Abstracting with credit is permitted. To copy plausibility of graphic applications, such as water spray dynam-
otherwise, to republish, to post on servers, to redistribute to lists, or to use ics ([Nielsen and Osterby 2013]) used in modeling of waterfall-
any component of this work in other works requires prior specific permis- s, water jets and stormy seas. Miscible flows are more flexible to
sion and/or a fee. Permissions may be requested from Publications Dept., achieve polytropic appearances featuring continuously varying col-
ACM, Inc., 2 Penn Plaza, Suite 701, New York, NY 10121-0701 USA, fax or details, as in colloidal dispersions or dissolving mixtures, which
+1 (212) 869-0481, or [email protected]. is largely different in visual effect from the surface-rich interfa-
c YYYY ACM 0730-0301/YYYY/15-ARTXXX $10.00 cial flow. However, very little work has involved in this aspect.
DOI 10.1145/XXXXXXX.YYYYYYY Meanwhile, the majority of the researches on multiple-fluid sim-
http://doi.acm.org/10.1145/XXXXXXX.YYYYYYY ulation use Eulerian methods, and simulating multiple-fluid flows
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
2 •

with Lagrangian methods remains a challenging task. We propose a 2. PREVIOUS WORK


robust Smoothed Particle Hydrodynamics (SPH) approach to simu-
late multiple-fluid flows. A special focus is placed on multiple-fluid In computer graphics, multiple-fluid simulation has received in-
flows that do not necessarily have (or are difficult to track) clear and creasing attention in the past decade. Most notably, interfacial flows
persistent interfaces. have been extensively studied. Following the Lagrangian approach,
Interfacial flows can be solved in a similar way as the single- [Premoze et al. 2003] presented the Moving-Particle Semi-Implicit
phase flow, with the main modeling challenge arising from contin- (MPS) method to simulate immiscible fluids, and [Solenthaler and
uous tracking of fluids’ interfaces. However, when different phas- Pajarola 2008] employed an improved SPH scheme to deal with
es or components can mix with each other, i.e. miscible with each high-density contrast between immiscible fluids. Much more work-
other, whether in a continuous manner (such as water solution) or s have been done using grid-based fluid solvers, including gas
dispersed manner (such as slurry flows), the motion and distribu- bubbles in liquid [Kim et al. 2007; Hong et al. 2008; Busaryev
tion of different phases or components cannot be captured by the et al. 2012] and interacting fluids [Hong and Kim 2005; Losas-
single-phase fluid simulation. Different phases or components in a so et al. 2006; Kim 2010; Boyd and Bridson 2012; Misztal et al.
multiple-fluid flow have different fluid properties (e.g. density, vis- 2012]. Continuously tracking the interfaces between different phas-
cosity etc.), and as a result they move at different velocities, caus- es or components is essential for interfacial flow simulations. Many
ing relative motions between phases or components. The various of these interface tracking techniques are related to the level-set
visually-interesting mixing/unmixing processes are the combined method and the volume-of-fluid method (see e.g. [Hong and Kim
result of the advection driven by the fluid’s bulk motion, the tur- 2005; Mihalef et al. 2006; Losasso et al. 2006; Kim 2010; Boyd
bulence caused by fluids’ instability, the diffusion driven by con- and Bridson 2012]), while the finite element method has also been
centration difference, and most dominantly the relative motion de- used recently to directly capture the interface with a moving mesh
termined by the interactions between phases or components. The [Misztal et al. 2012].
major challenge in modeling multiple-fluid flow is to resolve the For multiple-fluid systems involving miscible fluids, the concept
above dynamic interactions between phases or components [Yeoh of volume fraction was first introduced into the graphics communi-
and Tu 2009; Crowe et al. 2011]. ty by [Müller et al. 2005] to represent the spatial distribution of dif-
We introduce a mixture model for simulating multiple-fluid ferent phases or components. Both grid-based solvers [Kang et al.
flows, in which the distribution of different phases or components is 2010; Bao et al. 2010] and the SPH solver [Liu et al. 2011] have
represented by their volume fractions and does not rely on contin- been coupled with the volume fraction representation to simulate
uous tracking of fluids’ interfaces. Also, we compute analytically multiple-fluid flows. All of these works assumed different phases
the drift velocities defined as the phase (or component) velocities or components move at the same bulk velocity as the mixture and
relative to the mixture average. As a result, the governing equa- mixing is only caused by the diffusion effect due to concentration
tions of multiple-fluid flow are retained similar to the single-phase difference. Doing so completely ignores the mixing and unmixing
flow, even for mixtures consisting of arbitrary number of phases effects in multiple-fluid that are primarily driven by flow motions
or components. This SPH multiple-fluid simulation method has the and force distributions. At the cost of increased memory require-
following properties: ment, the Lattice Boltzmann Method (LBM) has also been adapt-
ed to deal with multiple-fluid flows without clear interfaces [Zhu
Versatile Mathematical Model The mathematical model is aimed et al. 2006; Park et al. 2008]. Recently, [Nielsen and Osterby 2013]
to simultaneously capture a whole range of multiple-fluid phe- adapted a two-phase flow model to simulate water spray. In contrast
nomena including mixing and unmixing effects between misci- to earlier works, our volume-fraction based SPH formulation, while
ble and immiscible phases or components, diffusion effects and easy to implement, can faithfully capture complex mixing and un-
chemical reaction etc. The model should also enable flexible in- mixing phenomena due to relative motions, turbulent interactions,
clusion/exclusion of different mixing/unmixing phenomena and and varying force distribution among multiple fluids.
multi-physics interactions. The following is also relevant to this work in the general con-
text of multiple-fluid phenomena: [Mullen et al. 2007] presented
Robust Numerical Scheme The numerical simulation scheme is a Eulerian geometry processing technique that can mimic certain
aimed to be robust and stable under widely-varying parame- effects of miscible fluids. [Cleary et al. 2007] presented a parti-
ter settings for animators and game designers without requiring cle based method to generate realistic visual effects of bubbles.
them to understand computational fluid dynamics (CFD). [Kim et al. 2010] modeled the dispersed bubble flow using a con-
Practical Implementation The new method is designed to be easy tinuous fraction field. [Ihm et al. 2004; Kang et al. 2007] consid-
to implement as an extension to existing single-phase fluid sim- ered flow phenomena coupled with chemical reactions using mo-
ulators, without adding high computational cost. The simulation lar concentration description to simulate gaseous chemical kinetic-
of multiple-fluid flow should be simple and intuitive to set up, s. [Keiser et al. 2005; Solenthaler et al. 2007] addressed the visual
and should not require excessive parameter tuning. effects of melting and solidification. [Ando and Tsuruno 2010] de-
scribed the simulation of 2D multi-phase flows using vector graphs.
The rest of the paper is organized as follows. The related work [Kim et al. 2012] used SPH particles in grid-based liquid simula-
is reviewed in §2, where we also further discuss the relation and tion to control bubble shapes. [Ihmsen et al. 2012] proposed a post-
difference between our work and previous research. In §3, we in- processing method to add spray, foam and air bubbles to particle-
troduce the mixture model of multiple-fluid flow, and how we im- based fluids. Other than simulation, [Gregson et al. 2012] intro-
prove it to better suit for graphics applications. Based on the mix- duced a 3D-imaging method based on stochastic tomography to
ture model, a novel SPH simulation scheme is presented in §4, capture real-world liquid mixing and dye immersion. Their results
after which implementation details are given in §5. A number of captured from real-world fluids can have much higher resolutions
multiple-fluid flow examples are illustrated in §6, which include than graphics simulation, but application of such methods may be
mixing of miscible and immiscible liquids, unmixing due to cen- limited by its inflexibility in scene construction and tuning.
trifugal force, chemical reaction and phase transition etc.
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
• 3

Table I. Definition of symbols. where ρk is the rest density of phase k (assumed as constant), pk the
Symbol Meaning pressure, g the external body forces such as gravity, Tk the viscous
αk volume fraction of phase k stress tensor, and Fk the interfacial momentum source. The above
ck mass fraction of phase k equations are similar to that of the single-phase flow, except for
ρk ,ρm rest density of phase k and the mixture the last term in Eqn.(2). The term Fk accounts for the interactions
uk ,um velocity of phase k and the mixture between phases, such as drag and frictional forces. In the graphic-
pk ,pm pressure acting on phase k and the mixture s community, the multiple-fluid flow model defined in Eqns.(1,2)
Tk ,Tm stress tensor on phase k and the mixture was recently adopted by [Nielsen and Osterby 2013] in the case of
umk drift velocity a two-phase flow to simulate water spray. The volume fractions αk
g gravity are bounded between 0 and 1, and they must add up to 1:
ρmj ,mj rest density and rest mass of particle j X
ρj interpolated density of particle j αk = 1, αk ≥ 0. (3)
k
W (r, h) smoothing kernel function
The continuity and momentum equations for the mixture follow
∇Wij short for ∇i W (ri − rj , h)
from Eqns.(1,2) by summing over the phases:
αki , αkj αk value of the i-th, j-th particle
umi , umj um value of the i-th, j-th particle ∂
umki , umkj umk value of the i-th, j-th particle
ρm + ∇ · (ρm um ) = 0 (4)
∂t
ri , rj position of the i-th, j-th particle
µk viscosity of phase k ∂
(ρm um )+∇·(ρm um um ) = −∇pm +ρm g+∇·Tm +∇·TDm
µi , µj aggregate viscosity of particles i,j ∂t
κ, τ, σ constant coefficients (5)
where is the mixture density,
P
ρ m = k
αk ρ k u m =
1
is the mixture velocity (i.e. the velocity at the
P
Multiple-fluid flows have been extensively studied in the con- ρm
α ρ
k k k k
u
text of computational fluid dynamics (CFD) for several decades, mass center), Pthe mixture’s pressure pm is defined by the rela-
primarily driven by oil & gas, chemical engineering and nuclear tion ∇pm = α ∇pk , the mixture’s
k k P viscous stress tensor Tm
power industries. Most commercial CFD packages for multiphase is defined toPsatisfy ∇ · Tm = ∇ · (αk Tk ), and the term
k
or multicomponent flows are based on grid-based fluid solvers, TDm = − k αk ρk umk umk is derived from the left hand side
while more recently the SPH approach has been applied to simu- of the momentum equation, representing the convective momentum
late interfacial flows [Colagrossi and Landrini 2003; Hu and Adams transfer between phases. Here, the drift velocity umk is defined as
2006; Monaghan and Rafiee 2013]. Various mathematical models
have been developed to quantitatively describe multiple-fluid flows umk = uk − um . (6)
[Kolev 2005; Yeoh and Tu 2009; Crowe et al. 2011], mainly includ- The drift velocity umk denotes the velocity of phase k relative to
ing the homogeneous model, the mixture model and the full mul- the centre of the mixture mass. The interaction forces Fk do not
tiphase model. We introduce the concept of “drift velocity” from appear explicitly in the momentum equation (5) because they are
the grid-based mixture model and adapt it for SPH formulations by canceled when summing over all phases. Using a simple case with
incorporating appropriate pressure relationship and modifications, 3 phases of unit density (i.e. ρk = 1 for all three phases), Fig.1
thereby achieving stable and efficient SPH multiple-fluid simula- illustrates the concepts and relationships of the multiple-fluid vari-
tion. ables.
3. THE MIXTURE MODEL OF MULTIPLE-FLUID Substituting Eqn.(6) into Eqn.(1), the phase velocity uk can be
FLOW eliminated from the continuity equation of phase k:
In this section we briefly recap the mixture model [Manninen et al. ∂αk
+ (um · ∇)αk = −αk ∇ · um − ∇ · (αk umk ). (7)
1996; Yeoh and Tu 2009], the most widely used mathematical mod- ∂t
el in engineering for grid-based multiple-fluid flows. §3.1 summa- Substituting Eqn.(4) into Eqn.(5), the momentum equation of mix-
rizes the governing equations of the mixture model, and §3.2 de- ture can be reorganized as:
scribes the drift velocity required in the model. Later in §4, we de-
scribe how we extend this mixture model using SPH formulations ∂ ∇pm ∇ · Tm ∇ · TDm
um +(um ·∇)um = − +g + + . (8)
to more efficiently support visual applications. For simplicity, indi- ∂t ρm ρm ρm
vidual phases or components in a multiple-fluid flow are uniformly Defined in Eqns.(7,8) are the governing equations of the mixture
referred to as phases for the rest of the paper. model for multiple-fluid flows. Here, the spatial distribution of each
phase k is fully represented by its volume fraction αk , hence it is
3.1 Governing Equations not necessary to track the interfaces between different phases.
In the mathematical theory of multiple-fluid flow, the presence of a
phase k is represented by its own volume fraction αk (the relative 3.2 Drift Velocity
fraction of an infinitesimal volume it occupies) and velocity uk , It is clear from Eqn.(7) that the nonuniform distribution of velocity
and the continuity and momentum equations for each phase k are: fields will lead to changes in the volume fraction of each phase. In
∂ a multiple-fluid flow, this motion-induced mixing effect is quite in-
(αk ρk ) + ∇ · (αk ρk uk ) = 0 (1) tuitive: different phases move at different velocities in the mixture,
∂t
and their discrepant motions will naturally result in relative mass
∂ migration. The drift velocities umk play a key role in this inter-
(αk ρk uk )+∇·(αk ρk uk uk ) = αk ρk g−αk ∇pk +∇·(αk Tk )+Fk action mechanism responsible for various miscible and immiscible
∂t
(2) phenomena.
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
4 •

the velocity differences caused by body forces are modeled by this


term. The second term accounts for the pressure effect, i.e. with-
in the mixture mass a phase accelerates in the direction from high
pressure to low pressure. The third term accounts for the diffusion
effect, i.e. a phase tends to move from more concentrated region-
s to less concentrated regions. The constant coefficients τ and σ
are essentially the strength factors of these fluid-dynamics effects.
Specifically, higher τ values will cause stronger inertia and pres-
sure effects (thus faster unmixing and mixing speeds due to these
two effects), higher σ values will cause stronger diffusion effect
(thus faster mixing speed due to the diffusive effect), and vice ver-
sa. In our work τ varies between 10−8 and 10−6 , and σ is around
10−4 to 10−3 . Further discussions of these three multiphase trans-
portation effects are provided in §5.3.
Once the drift velocities umk are determined following Eqn.(9),
the solution of the governing Eqns.(7,8) is reduced to solving for
the mixture velocity um (instead of all phase velocities uk ) and
phase volume fractions αk . This significantly reduces the compu-
tational cost of solving multiple-fluid flows. Owing to the high effi-
ciency and versatility of the mixture model, it is widely adopted in
Fig. 1. Suppose a mixture has three phases with unit density, the multiple- commercial CFD packages for multiple-fluid flows, including Eu-
fluid variables are illustrated above. (a) Volume fraction αk , and relation- lerian fluid solvers ANSYS CFX and FLUENT.
ship between the phase velocities uk and the mixture velocity um . (b) Ob-
taining drift velocities umk from uk and um . (c) Drift velocities umk .
4. SPH FORMULATION
In contrast to grid-based formulations presented in [Manninen et al.
Based on the assumption of local equilibrium and appropri-
1996], we use SPH particles to discretize the multiple-fluid system
ate drag force approximations, the drift velocities umk defined in
such that the SPH particles carry the mixture mass and move at
Eqn.(6) can be solved analytically, for which the rigorous mathe-
the mixture velocity um . These mixture particles also carry all the
matical derivation can be found in [Manninen et al. 1996]. For sim-
physical quantities associated with individual phases.
plicity, the analytical expression of drift velocities is directly given
In the governing equations of the mixture model Eqn.(7,8), the
below:
left-hand-side of Eqn.(8) denotes the substantial derivative of the
mixture velocity um , while the left-hand-side of Eqn.(7) represents
P P
umk = τ (ρk − k0
ck0 ρk0 )a − τ (∇pk − k0
ck0 ∇pk0 )
∇α the substantial derivative of the volume fraction of phase k, also
−σ( ∇α c 0 k0 (9)
P
αk
k
− k 0 k αk 0
) with respect to the mixture velocity um . In addition, it is noted that
after the drift velocities umk is computed following the analytical
where τ and σ are user-defined constant coefficients to be discussed
solution in Eqn.(9), the solutions to Eqn.(7) and Eqn.(8) can be
later, ck = αρkmρk is the mass fraction of the k-th component. The
decoupled if an explicit time-integration scheme is adopted. These
acceleration a is favorable Lagrangian properties of the mixture model fit nicely to
∂um
a = g − (um · ∇)um − , (10) the SPH approach.
∂t
In this section we provide the SPH formulation of the govern-
which denotes the difference between the gravity acceleration and
ing equations Eqns.(7,8), for which we start from the drift velocity
the substantial derivative of the mixture velocity.
solution in Eqn.(9). For each mixture particle i:
To compute the drift velocities following Eqn.(9), the relation be-
tween the phase pressure pk and the mixture pressure pm must also
X mj
(∇pk )i = (pkj − pki )∇Wij (13)
be provided. The standard mixture model mainly deals with im- j ρ̄j
miscible fluids and the following pressure relation has been widely X mj
adopted: (∇αk )i = (αkj − αki )∇Wij (14)
pk = pm . (11) j ρ̄j
For immiscible fluids, the phase pressure pk is identical to the mix- where the summation is performed over all neighborhood particles
ture pressure pm such that the second term in Eqn.(9) vanishes. j, ∇Wij = ∇i W (ri − rj , h) is the gradient of the smoothing k-
The intuitive explanation of it is for immiscible fluids where pres- ernel function with support h. Adopting the formulation in [Müller
sure equilibrium is established between phases, the uniform pres- et al. 2003], we use the poly6 kernel for density interpolation, and
sure shared with the mixture does not cause the immiscible phas- the spiky kernel for all other calculations involving derivative of
es to move into each other. To cope with totally miscible fluids in the smoothing kernel function. In Eqns.(13,14) and all equations
graphics applications, we extend the standard mixture model by in- thereafter, mj and ρ̄j in the summation over particles j represent
corporating the following pressure relation [Kolev 2005]: the mass and interpolated density of the mixture particle j, respec-
tively. Eqns.(13,14) are standard symmetric SPH formulations for
pk = αk pm . (12)
gradient terms of scalars. Using the ∇pk and ∇αk expressions, the
For miscible fluids, phase pressures pk differ from each other de- drift velocity umk can be computed from Eqn.(9).
pendent on their volume fractions, thus miscible phases are accel- Then we examine Eqns.(7,8). Firstly, for Eqn.(7), it should be
erated within the mixture mass to move into each other. noted that we cannot assume ∇ · um = 0 here. For multiple-fluid
Determined in Eqn.(9), the drift velocity umk contains three flows, volume fractions αk change both over time and over space,
terms. The first term accounts for the inertia effect, and in particular and phase velocities uk also differ from each other. Therefore, nei-
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
• 5

ther the divergence of the mixture velocity nor that of the phase interpolation equation to
velocity is zero, even when all phases are incompressible. To de- X
scribe the continuity of multiple-fluid flows we must refer to the ρ̄i = mi Wij , (23)
j
fundamental mass conservation law in Eqn.(1).
For each mixture particle i, directly applying the SPH approxi- and then substitutes it into the standard formulation to achieve de-
mation rule to the right-hand-side terms in Eqn.(7) yields: sired simulation results. Both Eqn.(22) and Eqn.(23) can be used in
X mj our SPH framework. In our experiments, for miscible fluid simula-
(αk ∇ · um )i = αki umj · ∇Wij (15) tions featuring smooth changes of particle rest densities and with-
j ρ̄j
out interfaces, the standard approach produces better results, espe-
X mj cially in cases with relatively low density contrast ratios.
(∇ · (αk umk ))i = αkj umkj · ∇Wij (16) In SPH simulations, the pressure value of each particle is related
j ρ̄j
to the interpolated particle density through the equation of state. In
However, the above SPH approximations are not symmetric and do the standard SPH scheme, the following linear relation is adopted:
not lead to stable simulation. Based on previous SPH stabilization
techniques, we modify them and propose to use the following sym- pmi = κ(ρ̄i − ρmi ) (24)
metric formulations (See Appendix A for derivation): where κ is the gas constant. In more recent simulation method-
X mj αkj + αki s, such as the Weakly Compressible SPH (WCSPH) [Becker and
(αk ∇ · um )i = (umj − umi ) · ∇Wij (17) Teschner 2007], the Tait equation is usually adopted to enhance in-
j ρ̄j 2
compressibility of the fluid appearance:
X mj
(∇ · (αk umk ))i = (αkj umkj + αki umki ) · ∇Wij (18) κρmi ρ̄i γ
j ρ̄j pmi = (( ) − 1) (25)
γ ρmi
Intuitively, Eqn.(17) reflects the change of volume fraction due to where γ = 7. Compared to the standard approach, the Tait equation
the aggregate motion of the mixture, i.e. relative motion of the mix- effectively results in much higher pressure changes with the same
ture particles, and Eqn.(18) reflects the change of volume fraction amount of density variation. Again both state equations can be used
due to the discrepancy between phase velocities, i.e. the difference in our approach, to remain compatible with the standard simulation
of drift fluxes αk umk between particles. method and the WCSPH scheme.
Secondly we examine the last term in Eqn.(8). It represents the
convective momentum change due to the drift velocities. We direct- 5. IMPLEMENTATION
ly list below its symmetric formulation, and provide the detailed
derivation in Appendix A: This section further explains the implementation issues for the
SPH formulation of multiple-fluid flows, after which the algorithm
mj
framework is summarized.
P P
(∇ · TDm )i = − j ρ̄j k
[ρk (αkj umkj (umkj · ∇Wij )
+αki umki (umki · ∇Wij ))] (19) 5.1 Volume Fraction Correction
Finally, we deal with the rest terms in Eqn.(8). These terms are
The bound of αk described in Eqn.(3) is not automatically satisfied
similar to those of the single-phase flow, and hence their treatments
when solving Eqn.(7). It is necessary to introduce a correction step
are essentially no different to the single-phase SPH formulation.
after advancing the volume fraction:
The pressure gradient in Eqn.(8) can be expressed by
X pmi + pmj (1) If αk < 0, set αk = 0;
(∇pm )i = mj ∇Wij . (20) (2) Re-scale αk values for all components such that k αk = 1.
P
j 2 ρ̄j
The formulation proposed in [Cleary 1996; González et al. 2009] In order to ensure equilibrium after correcting the volume frac-
is adopted to compute the divergence of viscosity tensor: tion, it is also necessary to perform a pressure adjustment for all
phases. Intuitively, the occupance of a volume fraction exceeding
X mj (rj − ri ) · ∇Wij one (i.e. αk > 1) means that in the current time step, the flux of the
(∇ · Tm )i = (µi + µj )(umj − umi )
ρ̄j (rj − ri )2 k-th phase entering the mixture particle is larger than allowed and
j
(21) the fluid is over-compressed. However, if the time step is set suf-
where µj =
P
α µ is the aggregate viscosity of particle j. ficiently small, the pressure computed from the particle density as
k kj k Eqn.(24) or Eqn.(25) will raise and sequentially stop the k-th phase
This formulation is obtained from the integral representation of sec-
ond order derivatives of the viscosity term. from entering the mixture particle, so that the αk value remains be-
Defined in Eqns.(7,8), the governing equations of the mixture low one. Hence, the adjustment of αk value at the next time step
model share a similar format as the single-phase flow, with the in- should relate to a pressure-adjustment for the current time step as
clusion of the drift velocity term. This similarity allows us to easi- well.
ly apply the state-of-the-art techniques developed for single-phase For a quantitative formulation, we should calculate the deriva-
flow. For the calculation ρ̄i , the interpolated density of the mixture tive of pressure with respect to volume fraction. Eqn.(24) can be
particles, the standard SPH formulation is: rewritten as:
X X
X pmi = κ( mj Wij − αki ρk ). (26)
ρ̄i = mj Wij . (22) j k
j
The derivative of pressure with respect to volume fraction is
Recently, [Solenthaler and Pajarola 2008] proposed to use a modi-
fied density calculation method for immiscible multiple-fluid sim- ∂pmi
ulations with high density ratio. Their method changes the density = −κρk , (27)
∂αki
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
6 •

and this leads to the following relation that links the change of vol- does not mean immiscible fluids will always have a sharp inter-
ume fraction to the change of pressure face between phases, since in reality even immiscible phases can
X get temporarily mixed in a vibrantly flowing mixture, e.g. in the
∆pmi = −κρk ∆αki . (28) form of dispersed phases in a suspension. Such temporary mix-
k
ing of vibrant immiscible fluids is not an artificial smoothing and
Similarly, for the Tait equation in WCSPH approach, taking the it is the natural reflection of the real world, where sharp inter-
partial derivative of Eqn.(25) over αki yields faces will begin to appear once the flow motion is no longer vi-
olent. The inertia term provides an unmixing mechanism for the
∂pmi κρk ρ̄i γ
=− ((γ − 1)( ) + 1), (29) multiple-fluid flow. For miscible fluids, the second term in Eqn.(9)
∂αki γ ρmi is nonzero, and the pressure effect will work against the unmixing
which gives a different form of pressure adjustment: trend caused by the inertia effect and keep the phases mixed. This
pressure-driven mixing mechanism should not be confused with d-
κρk ρ̄i γ iffusion, which is modeled separately by the third term in Eqn.(9).
X
∆pmi = − ((γ − 1)( ) + 1)∆αki . (30)
k γ ρmi The diffusion effect is purely driven by concentration difference,
and it will monotonously eliminate any volume fraction difference
The minus sign in Eqn.(28,30) assures correct direction of ad- across the space. The mixing caused by the pressure effect is, how-
justment. The adjusted pressure is then given by ever, related to the flow motion. In particular, when the flow motion
p̃mi = pmi + ∆pmi . (31) stops, the inertia term and the pressure term cancel to each other,
which sequentially terminates the pressure-driven mixing. Under
We then use the adjusted pressure p̃mi for gradient calculation in this framework, purely immiscible fluids are simulated by setting
Eqn.(20). the pressure relation pk = pm , and purely miscible fluids are sim-
The purpose of the above correction step is to ensure Eqn.(3) ulated by setting pk = αk pm .
holds in line with the underlying physics. There may be other more Particle Labeling Approach Our approach can also treat the
sophisticated correction approaches, however in practice we found miscible/immiscible behaviors in a slightly different manner, when
simulations with the proposed correction steps give good results dealing with a simulation which contains groups of phases that are
while keeping physical meaningfulness required by Eqn.(3). miscible within the same group but are immiscible between differ-
ent groups, or when it is desired to forbid volume fraction transfer
5.2 Chemical Reaction between different groups that are immiscible to each other. In such
cases, the traditional assumption that immiscible phases cannot ex-
One advantage of combining the volume fraction representation ist together within a mixture particle is used, and the particles are
with the SPH representation is the convenience of being able to labeled into different “miscible groups”. The calculation of related
deal with chemical reactions between phases by simply adding an terms will then be limited to particles within the same group. That
in-particle re-balance step at the end of each simulation loop. For is, in the calculation of Eqns.(17,18), the summation should only
illustration, a simple case of reactants A and B reacting to produce be performed for the set of particles j that are in the same miscible
resultant C is considered here. For all particles carrying both phases group as the current particle i, eliminating the volume fraction tran-
A and B, the mass of A and B are decreased by a controlled amount sition between different groups; and in the calculation of Eqn.(19),
at the end of each simulation loop, and at the same time the mass the summation should also be limited to the set of particles j that
of C is accordingly re-balanced. That is: are in the same miscible group as the current particle i, eliminating
∆(mC ) = −∆(mA ) − ∆(mB ) = −∆(αA )ρA V − ∆(αB )ρB V, the momentum transition due to volume fraction transition between
(32) different groups. If desired, one can also use Eqn.(22) within the
where V is the volume of the mixture particle before reaction. At same miscible group and use Eqn.(23) between particles in differ-
each time step, the amount of reactants ∆αA and ∆αB is set pro- ent groups.
portionally to the volume fractions of both source phases. Specif-
ically, for the reaction xA + yB = zC, the reactants are set as 5.4 Algorithm Framework
∆αA = xCr αA αB and ∆αB = yCr αA αB , where Cr is a coeffi-
cient controlling the reaction speed. We also ensure that the reacted The multiple-fluid system is represented by a set of mixture
amount of reactants does not exceed the current volume fraction particles, and each mixture particle i carries aggregate values
value of each phase. This chemical re-balance procedure can also (mi ,ρmi ,um ,µi ) and component-wise values (αki ). During each
involve total rest volume change to the mixture particle. Since the simulation loop, the SPH simulator sequentially performs the fol-
new phase masses are known, the new volume fraction value of lowing tasks:
each phase within the mixture particle is recalculated after the re-
balancing, as well as the aggregate rest density of the mixture parti- (1) Compute the drift velocity of each phase according to Eqn.(9)
cle. The momentum is automatically preserved, since both particle using pk calculated from Eqn.(11) or Eqn.(12). The SPH for-
mass and aggregate velocity of the mixture particle are not affected. mulation of the gradient terms are given in Eqns.(13,14). The
diffusion effect can be switched on by assigning a positive val-
5.3 Mixing and Unmixing of Immiscible and Miscible ue to the constant σ, and off by setting σ to zero.
Fluids (2) Advect volume fraction values according to Eqn.(7), where the
relevant SPH formulations are given in Eqns.(17,18).
Uniform Particle Description Various mixing and unmixing ef-
fects are captured by the drift velocity solved in Eqn.(9). For im- (3) Check the bound of volume fraction according to Eqn.(3), and
miscible fluids, the second term in Eqn.(9) automatically vanishes if the bound is invalidated, correct the volume fraction within
by setting pk = pm , and the inertia effect modeled by the first term the particle and calculate the pressure adjustment accordingly
will separate different phases as the mixture flows. Note that this as described in §5.1. For particles with corrected volume frac-
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
• 7

tion, update into the pressure term the pressure adjustment as Table II. Performance
Eqn.(31). Example Name Phase Number Particle Number average time(second/step)
(4) Calculate acceleration of the mixture particle according to Dam-breaking 3 344,000 0.477
Eqn.(8). SPH formulations of the related terms are provided Armadillo 2 313,000 0.339
in Eqns.(19,20,21). Reacting Swirl 4 198,000-418,000 0.247-0.579
(5) Advect mixture particles using their accelerations and veloci- Unmixing 4 231,000 0.376
ties. Vaporization 4 402,000 0.382
Rainbow Wave 8 756,000 1.889
(6) In the event of chemical reaction, re-balance the phase mass
within each involved particle as in Eqn.(32), and recalculate
the volume faction value of each phase, as well as the aggregate The proposed SPH multiple-fluid simulator has been implemented
rest density. using CUDA 5, each step described in §5.4 is executed by a CU-
DA kernel function which parallels the computing task over each
Essentially, this algorithm framework is very similar to fluid particle. All the variables including property values (e.g. ag-
that of the single-phase fluid simulation. The main difference gregate velocity) and intermediate values (e.g. drift velocity of each
is that multiple-fluid simulation involves volume fraction ad- phase) related to each particle are stored and updated in the graphi-
vance/correction, and a new term on the right-hand-side of the gov- cal memory during the simulation loops in order to minimize CPU-
erning equations requires the drift velocities to be calculated in ad- GPU communication.
vance, which is given in an analytical form. The runtime of each The computational efficiency is mainly determined by the num-
step depends on the number of particles and the number of phases, ber of mixture particles and the number of phases adopted in the
which we’ll discuss in detail in §6.1. simulation. Typically, for a three-phase flow simulated by using
344,000 mixture particles, the simulation runs at 0.477 second per
5.5 Time Stepping time-step on a NVIDIA GeForce GTX 680 4GB GPU. We analyze
runtime under different particle numbers and phase numbers, and
The Courant-Friedrichs-Lewy (CFL) condition is adopted for de-
the performance is shown in Fig.2. The runtime of each step is lin-
termining the time step. Similar to [Monaghan 1992; Desbrun and
ear to the total particle number, and given fixed particle number, the
paule Gascuel 1996; Becker and Teschner 2007], the time step is
runtime is sublinear to the number of phases, i.e. each extra phase
controlled by:
will increase the runtime by approximately 50% of the single-phase
0.25h 0.4h 1.
runtime. The performance data of examples in the paper are provid-
∆t = min{min( ), } (33) ed in Table II.
i |fi | cs + 0.6(cs + 2 · maxi µi )
0.7 8
where fi denotes external forces acting on the mixture particle, 7
and cs is the sound speed denoting the maximum possible parti-
0.6
Time Per Step (s)

Time Per Step (s)


6
cle speed in the fluid motion, which is related
√ to the gas constant 0.5
5
κ in the equations of state and has cs ∝ κ. Simply speaking, the 0.4
4

CFL condition requires that a particle should not travel more than 0.3
3

a certain fraction of its smoothing radius in one time step, and in 0.2
2

[Desbrun and paule Gascuel 1996; Dagenais et al. 2012] the time 0.1 1

step can be bounded using ∆t = | max 0.3h


i umi |
, which is a simpler 0
1 2 3 4 5 6 7 8
0
1 2 3 4 5 6 7 8
Phase Number Phase Number
form of the second term in Eqn.(33).
In multiple-fluid simulation, the drift velocity also add a con- (a) (b)
straint to the time step following the CFL condition: Fig. 2. Performance under different particle numbers and phase numbers.
0.3h Results are separated into two sub-diagrams to avoid over-compression in
∆t = . (34) the vertical axis. The runtime of each step is linear to the total particle num-
| maxi (maxk umki )|
ber, and given fixed particle number, the runtime is sublinear to the num-
Then we choose the smaller ∆t computed from Eqns.(33-34) as ber of phases. (a) blue: 48,000 particles; red: 239,000 particles; (b) blue:
the upper bound of time steps. The examples in §6 typically run 476,000 particles; red: 2,368,000 particles.
at time steps around 10−3 second. The viscous armadillo example
runs at time steps around 10−5 second because its large viscosity 6.2 Results
dominates the calculation of time step. Using a triple dam-breaking set up, Example 1 (Fig.3) demon-
strates the new method’s capacity in capturing realistic phase-
6. PERFORMANCE AND RESULTS interacting effects with different combinations of miscible and im-
6.1 Performance Analysis miscible fluids. The density ratio between the three phases is set as
Red:Green:Blue = 1:2:3. In Fig.3(a), all three phases are immisci-
GPU parallelization of standard SPH simulators is quite straight- ble with each other; in Fig.3(b), all three phases are miscible with
forward. A simple scheme uses a uniform grid structure to simplify each other and the diffusion effect is disabled; in Fig.3(c), all three
and accelerate the neighbor search in GPU. At the start of each time phases are miscible with each other and the diffusion effect is en-
step, SPH particles are assigned into the grid structure and sorted abled; in Fig.3(d), the red and green phases are miscible with each
based on their positions, and the neighbor search only needs to con- other, but they are immiscible with the blue phase. Our approach
sider particles in adjacent grids afterwards, which can be continu- successfully simulates mixing and unmixing effects in all these cir-
ously traversed in the sorted order. Then all computational tasks cumstances. As shown in Fig.3(a), the immiscible phases are clear-
can be parallelly executed over the particles. The GPU implemen- ly separated into three layers. At the end of the simulation the im-
tation of the mixture model follows exactly the same procedure. miscible phases are fully separated, and the volume fraction pene-
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
8 •

Fig. 3. Three-phase liquid dam breaking (red, green and blue). (a) All three phases are immiscible with each other and they get separated into three layers
with clear interfaces. (b) All three phases are miscible with other, and with the diffusion effect disabled they get mixed due to interaction between phases. (c)
All three phases are miscible with each other, and with the diffusion effect enabled they get mixed more uniformly. (d) The red and blue phases are miscible
with each other, but are both immiscible with the blue phase.

trations in mixture particles near either side of the sharp color in- shows our method can cope with very high viscosity contrast and
terfaces are negligible. For the miscible fluids shown in Figs.3(b,c), still achieve realistic and stable multiple-fluid simulations. Then,
the mixing effects look smooth and natural and due to the inclusion after the red armadillo has settled at the bottom of the container,
of the diffusion effect, the final result in Fig.3(c) is mixed more uni- the red phase is reset to 1x viscosity, 0.5x density and miscible with
formly than that in Fig.3(b). The simulations in Figs.3(a,b,c) adopt the transparent phase. The mixture flow is shown in the bottom row
the uniform particle description as explained in §5.3, while the sim- of Fig.4, where the now lighter red phase undergoes volume expan-
ulation in Fig.3(d) adopts the particle labeling approach to simulate sion and rises up rapidly and it soon gets diluted into the transparent
miscible and immiscible phases interacting with each other simul- phase. In both stages, the diffusion effect has been disabled.
taneously. For all other examples in this paper we have used the In Example 3 (Fig.5), red and green liquids are injected into a
uniform particle description in the simulation. cylindrical container filled with transparent liquid solvent. As the
red and green liquids are injected from opposite sides of the con-
tainer, they drive the liquid mixture to swirl. During mixing, red
and green phases react to produce a blue liquid. All four phases
(red, green, transparent and blue) are miscible with each other. In
the top row is the simulation result using our approach with the d-
iffusion effect disabled. The center of the container largely remains
occupied by the transparent solvent during the swirling motion, re-
sulting in a rotating and dynamically-evolving S-shape, while the
whole scene containing vigorous mixing and chemical reaction si-
multaneously. The previous multi-fluid approach (e.g. [Kang et al.
2010; Bao et al. 2010; Liu et al. 2011]) considers Brownian diffu-
sion only. In such approaches the mixing between different phas-
es and thus the chemical reaction purely relies on the existence of
Brownian diffusion. Due to the physical nature of Brownian diffu-
Fig. 4. Viscous armadillo. Shown in the top row, a red armadillo formed sion, it will gradually eliminate the polytropic color variations in
by a highly viscous phase (1000x viscosity and 2x density) drops into a con- multiple-fluid flows, leading to an undesired homogeneous appear-
tainer filled by a transparent phase (1x viscosity, 1x density and immiscible ance. In the bottom row we show the simulation result of previous
with the red phase); the red armadillo deforms in a highly viscous manner multifluid approach, where the polytropic color variations gradu-
and does not get diluted. Shown in the bottom row, after the red armadil- ally turn into a homogeneous appearance. It is clear in this ex-
lo’s settlement at the bottom of the container, the red phase is reset to 1x ample that our approach is able to avoid the undesired variation-
viscosity, 0.5x density and miscible to the transparent phase, which then eliminating effect and the homogeneous appearance due to Brow-
undergoes volume expansion and rises up rapidly and a vibrant mixing is nian diffusion, while simultaneously keeping vigorous mixing and
observed during the two-phase interaction. reaction featuring polytropic colors throughout the whole simula-
tion.
Example 2 (Fig.4) simulates a two-phase flow with high viscos- Example 4 (Fig.6) demonstrates an unmixing process taking
ity contrast. The red armadillo formed by a highly viscous phase place in a disk-shape container, which has a spinning turbine in-
(1000x viscosity and 2x density) drops into a rectangular container stalled at its centre. The container is filled with four immiscible
filled by a transparent phase (1x viscosity, 1x density and immisci- phases, with the density ratio Red:Yellow:Green:Blue = 1:1.5:2.5:3,
ble with the red phase). The mixture flow is shown in the top row and the mixture occupies about 3/4 of the volume. Initially, the four
of Fig.4, where the red armadillo deforms in a highly viscous man- phases are set at a “fully mixed” state resulting in a greyish col-
ner and does not get diluted by the transparent phase. This example or, and they are unmixed due to the centrifugal effect during spin-
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
• 9

Fig. 5. Reacting swirl. Red and green liquids are injected from opposite sides into the container filled with transparent solvent, causing the mixture to swirl.
Upon meeting, the red and green liquids react to produce a blue liquid. All four phases are miscible with each other. Top row: Our method, with the diffusion
effect disabled, forms a rotating and dynamically-evolving S-symbol at the centre of the container, while the whole scene containing vigorous mixing and
chemical reaction simultaneously. Bottom row: Using only Brownian diffusion to simulate mixing ([Kang et al. 2010; Bao et al. 2010; Liu et al. 2011]) results
in a homogeneous appearance.

Fig. 6. Unmixing. Four immiscible liquids (red, yellow, green and blue)
are artificially set to a “fully mixed” state in a circular container with a
rotating turbine at the centre, and during spinning they get “fully separated”
due to the centrifugal effect. Top: perspective view. Bottom: top view.

ning, resulting in a colorful ring-shape pattern. The top row in Fig.6


shows a perspective view of this unmixing process, and the bottom Fig. 7. Vaporization. The dome is filled with transparent air, and from two
row shows the top view. The gravity force is not considered in this magic sources red and green liquids are injected into the dome. The two
example. This unmixing effect cannot be captured by multiple-fluid liquids meet at the centre of the floor and react to produce a vapor phase,
simulations where only the diffusion effect is modeled, and also it which rises towards the ceiling. The density ratio is Red liquid:Green liq-
is hard to achieve through the interfacial-flow simulation approach. uid:Transparent air:Vapor phase = 1000:1000:2:1.
Example 5 (Fig.7) simulates a four-phase vaporization process
with high density contrast. A dome is filled with transparent air, green liquid, and the blue liquid reacting with the purple liquid to
and two liquids (red and green) are injected into the dome from two produce an indigo liquid. All eight phases are set as miscible with
magic sources. The red and green liquids meet at the centre of the each other. Thus, the mixing flow in the tank creates a lively rain-
floor, and react to produce a vapor phase, which rises up towards the bow wave with seven naturally colored streams adjacent to each
ceiling. In this example, all four phases are immiscible with each other: red, orange, yellow, green, blue, indigo and purple. Again,
other, and their density ratio is Red liquid:Green liquid:Transparent the diffusion effect is disabled in this example to avoid the stiff and
air:Vapor phase = 1000:1000:2:1. Under high density contrast, the uniform appearance.
vaporization process is successfully simulated. 7. CONCLUSION AND DISCUSSION
In Example 6 (Fig.8), a tank with a movable wall on the left is
filled with transparent liquid. To the left of the tank, there are four By combining the mixture model in computational fluid dynamics
“reacting regions” marked in red, yellow, blue and purple. Upon and the SPH method, we have developed a novel simulation ap-
entering these reacting regions, the transparent liquid reacts to pro- proach for multiple-fluid flows. Verified in various numerical ex-
duce a new liquid with the color of the region. The wall on the periments, the new approach is versatile and can simultaneous-
left moves back and forth periodically to drive the liquid mixture ly capture a wide range of multiple-fluid phenomena, including
to flow in the tank. Three more chemical reactions are introduced: mixing/unmixing of miscible and immiscible fluids, diffusion and
the red liquid reacting with the yellow liquid to produce an orange chemical reaction etc. The new method is robust, and can achieve
liquid, the yellow liquid reacting with the blue liquid to produce a stable and realistic simulation under widely-varying parameter set-
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
10 •

Fig. 8. Rainbow wave. The transparent liquid is propelled by the periodically moving wall on the left, and when the transparent liquid passing over the four
magic regions in the left of the tank, it reacts to produce four new phases (red, yellow, blue and purple). The adjacent new phases can also react with each other
to produce another three phases (orange, green and indigo). All 8 phases are miscible with each other, and the diffusion effect is disabled. A lively rainbow
wave is formed in the tank.
tings, including high viscosity and density contrast. Implementa- Eqn.(18) and Eqn.(19) are direct results following Eqn.(35).
tion of our new scheme is straightforward as an extension to exist- The derivation of Eqn.(17) is more involved. Applying standard
ing single-phase fluid simulators, and the multiple-fluid simulation SPH formulation to the right hand side of the following identity
can be easily set up with a minimum requirement of multiple-fluid
information and without unnecessary parameter tuning. Compared (αk ∇ · um )i = (∇ · (αk um ))i − (um · ∇αk )i (36)
to the simple diffusion model (e.g. [Kang et al. 2010; Bao et al. leads to
2010; Liu et al. 2011]), the proposed approach captures a wider X
range of multiple-fluid phenomena, which allows efficient produc- (αk ∇ · um )i = dVj αkj (umj − umi ) · ∇Wij . (37)
j
tion of various interesting and visually realistic multiple-fluid re-
sults with fine details throughout the whole simulation. However applying Eqn.(35) to the left hand side of Eqn.(36) yields:
SPH simulations commonly assume constant particle mass over X
time, and in cases of vaporization this can lead to dramatic increas- (αk ∇ · um )i = dVj αki (umj − umi ) · ∇Wij . (38)
j
es of the effective volume of particles due to large density drop,
which sequentially degrades the simulation resolution. To main- The two equations above are almost the same, and directly averag-
tain the simulation resolution, one possible extension to this work ing the right hand side yields Eqn.(17).
would be to introduce an efficient, adaptive refinement strategy to
split the SPH particles. Another possible future work is to incor-
ACKNOWLEDGMENTS
porate the energy equation in the current theoretical framework to
simulate relatively less commonly observed energy-related effects, The authors would like to thank the anonymous reviewer-
such as extraction in chemistry. s for their constructive comments. This work is supported by
Previous numerical strategies that enforce the incompressibili- the National Basic Research Project of China (Project Number
ty based on the divergence-free property of the flow field cannot 2011CB302205), the Natural Science Foundation of China (Project
be directly applied to the multiple-fluid simulation, since neither Number 61120106007) and and the National High Technology
the divergence of the mixture velocity nor that of the phase veloc- Research and Development Program of China (Project Number
ity is zero, even when all phases are incompressible. At the cost 2012AA011503). The authors would also like to acknowledge the
of smaller time steps, this limitation can be partially overcome by financial support provided by the National Science Foundation
increasing the gas constant in the equations of state to a higher val- (NSF IIS-1320644) and UNC Carolina Development Foundation,
ue, but it will be beneficial to investigate new pressure-correction and Sêr Cymru National Research Network in Advanced Engineer-
methods enforcing incompressibility of the multiple-fluid simula- ing and Materials.
tion at larger time steps, where component-wise incompressibility
relations should be taken into account. Another challenge is that REFERENCES
incorporating the mixture model with the Predictive-Corrective In- A NDO , R. AND T SURUNO , R. 2010. Vector fluid: A vector graphics depic-
compressible SPH (PCISPH) is not straightforward. PCISPH pre- tion of surface flow. In NPAR ’10: Proceedings of the 8th International
sumes uniform particle mass and rest density between particles, Symposium on Non-Photorealistic Animation and Rendering. ACM, New
however these properties usually vary between particles in the mix- York, NY, USA, 129–135.
ture model. This makes the precomputation in the pressure correc- BAO , K., W U , X., Z HANG , H., AND W U , E. 2010. Volume fraction based
tion of PCISPH impossible, resulting in erroneous values where miscible and immiscible fluid animation. Comput. Animat. Virtual World-
there is particle deficiency. s 21, 3-4 (May), 401–410.
B ECKER , M. AND T ESCHNER , M. 2007. Weakly compressible sph
APPENDIX for free surface flows. In Proceedings of the 2007 ACM SIG-
GRAPH/Eurographics symposium on Computer animation. SCA ’07.
Appendix A. DERIVATION OF EQNS.(17-19)
Eurographics Association, Aire-la-Ville, Switzerland, Switzerland, 209–
This appendix shows the detailed derivations of Eqns.(17-19). The 217.
SPH approximation for the divergence operator can be expressed B OYD , L. AND B RIDSON , R. 2012. Multiflip for energetic two-phase fluid
as [Colagrossi and Landrini 2003]: simulation. ACM Trans. Graph. 31, 2 (Apr.), 16:1–16:12.
X X B USARYEV, O., D EY, T. K., WANG , H., AND R EN , Z. 2012. Animating
(∇·A)i = dVj Aj ·∇Wij = dVj (Aj ±Ai )·∇Wij . (35) bubble interactions in a liquid foam. ACM Trans. Graph. 31, 4 (July),
j j 63:1–63:8.
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.
• 11

C LEARY, P. W. 1996. New implementation of viscosity: Tests with Couette KOLEV, N. I. 2005. Multiphase Flow Dynamics 1: Fundamentals.
Flows. Tech. rep., CSIRO Division of Maths and Stats, Tech. Report Springer, Dordrecht.
DMS - C 96/32. L IU , S., L IU , Q., AND P ENG , Q. 2011. Realistic simulation of mixing
C LEARY, P. W., P YO , S. H., P RAKASH , M., AND KOO , B. K. 2007. Bub- fluids. Vis. Comput. 27, 3 (Mar.), 241–248.
bling and frothing liquids. ACM Trans. Graph. 26, 3 (July). L OSASSO , F., S HINAR , T., S ELLE , A., AND F EDKIW, R. 2006. Multiple
C OLAGROSSI , A. AND L ANDRINI , M. 2003. Numerical simulation of interacting liquids. ACM Trans. Graph. 25, 3 (July), 812–819.
interfacial flows by smoothed particle hydrodynamics. J. Comput. M ANNINEN , M., TAIVASSALO , V., AND K ALLIO , S. 1996. On the mix-
Phys. 191, 2 (Nov.), 448–475. ture model for multiphase flow. Tech. rep., Technical research center of
C ROWE , C. T., S CHWARZKOPF, J. D., S OMMERFELD , M., AND T SUJI , Finland.
Y. 2011. Multiphase Flows with Droplets and Particles. CRC Press. M IHALEF, V., U NLUSU , B., M ETAXAS , D., S USSMAN , M., AND H US -
DAGENAIS , F., G AGNON , J., AND PAQUETTE , E. 2012. A prediction- SAINI , M. Y. 2006. Physics based boiling simulation. In Proceedings of
correction approach for stable sph fluid simulation from liquid to rigid. the 2006 ACM SIGGRAPH/Eurographics symposium on Computer ani-
In Proceedings of Computer Graphics International 2012. mation. SCA ’06. Eurographics Association, Aire-la-Ville, Switzerland,
Switzerland, 317–324.
D ESBRUN , M. AND PAULE G ASCUEL , M. 1996. Smoothed particles: A
new paradigm for animating highly deformable bodies. In In Computer M ISZTAL , M. K., E RLEBEN , K., BARGTEIL , A., F URSUND , J., C HRIS -
Animation and Simulation 96 (Proceedings of EG Workshop on Anima- TENSEN , B. B., B ÆRENTZEN , J. A., AND B RIDSON , R. 2012. Multi-

tion and Simulation. Springer-Verlag, 61–76. phase flow of immiscible fluids on unstructured moving meshes. In Pro-
ceedings of the ACM SIGGRAPH/Eurographics Symposium on Computer
G ONZ ÁLEZ , L. M., S ÁNCHEZ , J. M., M ACI À , F., AND S OUTO -I GLESIAS ,
Animation. SCA ’12. Eurographics Association, Aire-la-Ville, Switzer-
A. 2009. Analysis of WCSPH laminar viscosity models. In Fourth ER-
land, Switzerland, 97–106.
COFTAC SPHERIC workshop on SPH applications.
M ONAGHAN , J. 1992. Smoothed particle hydrodynamics. Annual Review
G REGSON , J., K RIMERMAN , M., H ULLIN , M. B., AND H EIDRICH , W.
of Astronomy and Astrophysics 30, 543–574.
2012. Stochastic tomography and its applications in 3d imaging of mixing
M ONAGHAN , J. J. AND R AFIEE , A. 2013. A simple sph algorithm for
fluids. ACM Trans. Graph. (Proc. SIGGRAPH 2012) 31, 4, 52:1–52:10
multi-fluid flow with high density ratios. International Journal for Nu-
(to appear).
merical Methods in Fluids 71, 5, 537–561.
H ONG , J.-M. AND K IM , C.-H. 2005. Discontinuous fluids. ACM Trans.
M ULLEN , P., M C K ENZIE , A., T ONG , Y., AND D ESBRUN , M. 2007.
Graph. 24, 3 (July), 915–920.
A variational approach to eulerian geometry processing. ACM Trans.
H ONG , J.-M., L EE , H.-Y., YOON , J.-C., AND K IM , C.-H. 2008. Bubbles Graph. 26, 3 (July).
alive. ACM Trans. Graph. 27, 3 (Aug.), 48:1–48:4.
M ÜLLER , M., C HARYPAR , D., AND G ROSS , M. 2003. Particle-based fluid
H U , X. AND A DAMS , N. 2006. A multi-phase {SPH} method for macro- simulation for interactive applications. In Proceedings of the 2003 ACM
scopic and mesoscopic flows. Journal of Computational Physics 213, 2, SIGGRAPH/Eurographics symposium on Computer animation. SCA ’03.
844 – 861. Eurographics Association, Aire-la-Ville, Switzerland, Switzerland, 154–
I HM , I., K ANG , B., AND C HA , D. 2004. Animation of reactive gaseous 159.
fluids through chemical kinetics. In Proceedings of the 2004 ACM SIG- M ÜLLER , M., S OLENTHALER , B., K EISER , R., AND G ROSS , M. 2005.
GRAPH/Eurographics symposium on Computer animation. Eurographics Particle-based fluid-fluid interaction. In Proceedings of the 2005 ACM
Association, 203–212. SIGGRAPH/Eurographics symposium on Computer animation. SCA ’05.
I HMSEN , M., A KINCI , N., A KINCI , G., AND T ESCHNER , M. 2012. U- ACM, New York, NY, USA, 237–244.
nified spray, foam and air bubbles for particle-based fluids. The Visual N IELSEN , M. B. AND O STERBY, O. 2013. A two-continua approach to
Computer 28, 6-8, 669–677. eulerian simulation of water spray. ACM Trans. Graph. 32, 4 (July), 67:1–
K ANG , B., JANG , Y., AND I HM , I. 2007. Animation of chemically reac- 67:10.
tive fluids using a hybrid simulation method. In Proceedings of the 2007 PARK , J., K IM , Y., W I , D., K ANG , N., S HIN , S. Y., AND N OH , J. 2008.
ACM SIGGRAPH/Eurographics symposium on Computer animation. Eu- A unified handling of immiscible and miscible fluids. Comput. Animat.
rographics Association, 199–208. Virtual Worlds 19, 3-4 (Sept.), 455–467.
K ANG , N., PARK , J., N OH , J., AND S HIN , S. Y. 2010. A hybrid approach P REMOZE , S., TASDIZEN , T., B IGLER , J., L EFOHN , A. E., AND
to multiple fluid simulation using volume fractions. Computer Graphics W HITAKER , R. T. 2003. Particle-based simulation of fluids. Comput.
Forum 29, 2, 685–694. Graph. Forum 22, 3, 401–410.
K EISER , R., A DAMS , B., G ASSER , D., BAZZI , P., D UTR É , P., AND S OLENTHALER , B. AND PAJAROLA , R. 2008. Density contrast sph in-
G ROSS , M. 2005. A unified lagrangian approach to solid-fluid anima- terfaces. In Proceedings of the 2008 ACM SIGGRAPH/Eurographics
tion. In Proceedings of the Second Eurographics / IEEE VGTC con- Symposium on Computer Animation. SCA ’08. Eurographics Associa-
ference on Point-Based Graphics. SPBG’05. Eurographics Association, tion, Aire-la-Ville, Switzerland, Switzerland, 211–218.
Aire-la-Ville, Switzerland, Switzerland, 125–133. S OLENTHALER , B., S CHL ÄFLI , J., AND PAJAROLA , R. 2007. A unified
K IM , B. 2010. Multi-phase fluid simulations using regional level sets. ACM particle model for fluidsolid interactions: Research articles. Comput. An-
Trans. Graph. 29, 6 (Dec.), 175:1–175:8. imat. Virtual Worlds 18, 1 (Feb.), 69–82.
K IM , B., L IU , Y., L LAMAS , I., J IAO , X., AND ROSSIGNAC , J. 2007. Sim- Y EOH , G. H. AND T U , J. 2009. Computational Techniques for Multiphase
ulation of bubbles in foam with the volume control method. ACM Trans. Flows. Butterworth-Heinemann.
Graph. 26, 3 (July). Z HU , H., L IU , X., L IU , Y., AND W U , E. 2006. Simulation of miscible
K IM , D., S ONG , O.- Y., AND KO , H.-S. 2010. A practical simulation of binary mixtures based on lattice boltzmann method: Research articles.
dispersed bubble flow. ACM Trans. Graph. 29, 70:1–70:5. Comput. Animat. Virtual Worlds 17, 3-4 (July), 403–410.
K IM , P.-R., L EE , H.-Y., K IM , J.-H., AND K IM , C.-H. 2012. Control-
ling shapes of air bubbles in a multi-phase fluid simulation. The Visual
Computer 28, 6-8, 597–602.
ACM Transactions on Graphics, Vol. VV, No. N, Article XXX, Publication date: Month YYYY.

You might also like