Particle Based Fluid Simulation for 3D Scene with Implicit Surfaces
Yasuaki Sakamoto1 , Susumu Nakata2 , and Satoshi Tanaka2211
Graduate School of Science and Engineering, Ritsumeikan University, Japan
College of Information Science and Engineering, Ritsumeikan University, Japan

obstacles is not given, we use the gradient of dT (x) at theparticle point instead of the exact direction vector.

Introduction

The shape modeling technique based on the implicit surface representation is used for generating threedimensional surface models that interpolate given sets ofscattered points. A number of techniques for generatinginterpolating surfaces have been proposed and significant
progress has been made in the last decade [1].
In addition, the implicit surface representation is also
useful for interactive modeling of simple shapes [2] andthree-dimensional scenes can be constructed as a set of implicit surfaces. For appropriate visualization of the threedimensional scenes, some additional eﬀects such as water flows need to be added depending on the situation.
The promising method for generating water flow is theSmoothed Particle Hydrodynamics (SPH [3]): a particlebased fluid simulation method. In the standard SPH, thefluid is discretized into a set of particles and obstacles inthe simulation field are assumed to be represented as sets ofdense particles. Harada et al. proposed another approachfor SPH simulation that enables simulation in polygonbased scenes [4]. In this approach, the particle force acted
by polygon obstacles is incorporated in addition to theforces acted by the surrounding particles.
In this paper, we present a method of fluid simulationin three-dimensional scene with obstacles represented asimplicit surfaces. In this method, the particle motion isformulated by adding the forces acted by the obstacles defined as implicit surfaces into the standard particle forces
as in the SPH.
2Three-Dimensional Scenes with Implicit Surfaces

We assume that all obstacles in a simulation field aredefined as implicit surfaces, i.e., each surface is defined as
f (x) = 0,

Fluid Simulation with Implicit Surfaces

The particle-based fluid simulation is formulated basedon the SPH with eﬀects of implicit surface obstacles. Inthis section, we describe the formulation of the particle
motion with eﬀects from obstacles using the quantities introduced in Sec. 2.
3.1

Governing Equation and Particle Motion

In the SPH, the formulation of the fluid simulation using
SPH is based on the Navier-Stokes equation,
ρDv= −∇p + µ∇2 v + g,
Dt

where ρ，v ，p，µ and g are density, velocity, pressure,viscosity coeﬃcient and the gravity, respectively. By letting the positions of the particles at time t be {xti }, thecorresponding discrete equation with a time interval ∆t isobtained asvit+∆t = vit +∆t pres(f+ fivisc + figrav ),ρi ixt+∆t= xti + vit+∆t ∆t,iwhere fipres , fivisc and figrav are pressure, viscosity andgravity forces acted on the i-th particle, respectively, which
are determined by the location of the particles at time
t as described in the following sections. The simulationis performed by applying the formula repeatedly startingfrom a user given initial particle locations.

x ∈ R3 .

The sign of f (x) is assumed to be positive inside the surface and negative outside. The quantities to be obtained
from the obstacles in the SPH are the following two: oneis the nearest distance between a particle and the obstacles, and the other is the direction from the particle tothe nearest point on the obstacles. In our formulation, thenearest distance is estimated using Taubin distance [5], alinear approximation of the distance from a point x ∈ R3
to its nearest surface point on an implicit surface. The
estimated distance is defined asdT (x) =3|f (x)|.
||∇f (x)||Let n(x) be the unit vector directed from the nearest pointon the obstacle to x. Because the nearest point on the3.2

Formulation of Pressure Term

In this subsection, we formulate the approximately obtained pressure fipres . Our formulation is based on theformula given in [3], i.e., the pressure is determined as thesum of two terms:
(dT (xi ) − r)
 ˆpres∇dT (xi ), r > dT (xi ),fi+ mipres
fi=∆t2
fˆpres ,r ≤ dT (xi ),iwhere fˆipres is the pressure aﬀected by other particles inthe vicinity of the i-th (see [2] for detail) and r is a constant that determines the area under the influence of theobstacles.

3.3

Formulation of Viscous Term

The viscous term is also divided into two elements:
fivisc = fˆivisc − µvi Z visc (dT (xi )),where fˆivisc is the viscous force aﬀected by its surrounding
particles and Z visc (d) is the function defined in [4] that
determines the viscosity aﬀected from the obstacles. Although the operand d is exactly obtained if the obstacles
are polygon models, the exact distance is not obtained in
the case of implicit surfaces. In our approach, we use theTaubin distance as the operand instead of the exact distance.
4(a) 0 steps

Results

We applied the particle-based simulation described in
the previous section to the three-dimensional scene with
an implicit surface defined as{( x )2 ( y )2 } {}−(x − 3.9)2 + y 2 − 1.44
f (x) = 1 −63.5(){}· x2 + y 2 − 1.44 (x + 3.9)2 + y 2 − 1.44 − (20z)2 .
The initial locations of the SPH particles are set inside
the surface with zero initial velocitys. The number of theparticles is 28361. The results of the simulation are shownin Fig.1. From these results, we can see that the particles
appropriately move at the vicinity of the surface and anatural motion can be obtained by our formulation.
5(b) 100 steps

Conclusion

In this paper, we presented the fluid simulation basedon the SPH. We extended the particle-based simulation
so that the simulation could be performed with obstacles
expressed as implicit surfaces. The closest distance froma particle to the implicit surface is estimated using theTaubin distance and the direction of the force acted fromthe obstacles to a particle is estimated by the gradient of
the Taubin distance at a particle point. Our numericaltests have shown that our algorithm works appropriately
inside a surface defined as an implicit surface model.

(c) 200 steps

References[1] J. Manson, G. Petrova and S. Schaefer, Streaming Surface Reconstruction Using Wavelets, Computer Graphics
Forum, Vol. 27, pp. 1411–1420, 2008(d) 300 steps[2] M. Sugihara, B. Wyvill and R. Schmidt, WarpCurves: A
Tool for Explicit Manipulation of Implicit Surfaces, Computers & Graphics, Vol. 34, pp. 282–291, 2010[3] G. R. Liu and M. B. Liu, Smoothed Particle Hydrodynamics: A Meshfree Particle Method, World Scientific, Singapore, 2003
[4] T. Harada, S. Koshizuka and Y. Kawaguchi, Improvementin the Boundary Conditions of Smoothed Particle Hydrodynamics, Computer Graphics & Geometry, Vol. 9, pp. 2–15, 2007.
[5] G. Taubin, Distance Approximations for Rasterizing Implicit Curves, ACM Transactions on Graphics, Vol. 13,
pp. 3–42, 1994(e) 400 steps

Fig. 1. Result of a fluid simulation