+ All Categories
Home > Documents > Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper...

Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper...

Date post: 09-May-2020
Category:
Upload: others
View: 9 times
Download: 0 times
Share this document with a friend
9
Eurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011), pp. 1–9 A. Bargteil and M. van de Panne (Editors) Smoothed Particle Hydrodynamics on Triangle Meshes paper 158 Abstract We present a particle-based method for solving Navier-Stokes equations on the surface of objects of genus 0 and 1. When the mesh is conformally mapped to a domain of constant curvature, the problem is greatly simplified due to the regularity of the new domain and the uniform stretching property of conformal maps. We adapt the Smoothed Particle Hydrodynamics method to work in this framework and we reformulate the momentum equation so that it takes into account the geodesic path taken by the particles. A particle-based method allows the simulation time to be independent of the underlying mesh resolution and offers a natural way to compute free-surface flows. We therefore achieve real-time simulation without artifacts caused by the parameterization of the triangle mesh. Categories and Subject Descriptors (according to ACM CCS): I.3.3 [Computer Graphics]: Three-Dimensional Graph- ics and Realism—Animation 1. Introduction Fluid flows on the surface of an object can be observed at very different scales. Clouds moving across the surface of the earth can be well approximated by a fluid flowing on a sphere. At a smaller scale, soap films are another example of liquid constrained to move on a curved domain. But the com- plexity of such phenomena can be simplified by considering that the fluid is moving on a curved 2D domain instead of a small subset of a full 3D Euclidean domain. Such simplifi- cations allow us to remove a degree of freedom, simplifying equations and saving computation time. Mesh methods for solving Navier-Stokes equations on an object represented by a triangular mesh have been developed, but they suffer from being very expensive to compute and depend heavily on the underlying mesh. We propose a parti- cle approach, namely the Smoothed Particle Hydrodynamics method (SPH), to solve these equations in real time while keeping the dependency of the underlying mesh to a minu- mum. The resulting method is very simple and requires only minor modification of a standard 2D SPH simulation to be suitable for curved objects of genus 0 and 1. The simulation uses the uniform stretching property of conformal mapping to simplify equations in the SPH formu- lation. By first mapping the mesh conformally to a regular domain, the computation of the forces is entirely done in the parameter domain and the particles can be easily transposed to the original object space for displacement and visualiza- tion. Note that a simplified method that only projects parti- cles to the tangent plane is very unstable when simulating flow on surfaces other than spheres. It also makes the num- ber of particles dependent of the maximum curvature of the surface. Our contribution is the use of particle-based real-time sim- ulation for fluid flow over a surface, allowing the simulation to be practically independent of the complexity of the mesh. By taking into account the geodesic path of a moving par- ticle, we remove distortions resulting from the parameteri- zation of the mesh. A particle-based simulation allows for simple surface tracking, which offers new possibilities for other forms of visualization, like free surface flows, all in a single unified method. More generally, the method proposes a way to solve dif- ferential equations defined on a surface where functions are defined only on a discrete set of points. Examples of such applications includes texture diffusion, de-noising and defor- mation, reaction-diffusion textures, mesh de-noising and de- formation. As done in statistics to approximate probability density functions on a manifold [Pel05], this new formula- tion of the SPH equations can be simply used to interpolate values sampled on a surface. The paper is organized as follows : Section 2 reviews ex- isting work on conformal parameterization, SPH and flow on surfaces. Section 3 explains the offline computations that need to be performed before doing the simulation. Section 4 recalls the basics of the SPH method that works on Euclidean domains. Then, Section 5 extends the SPH method to work on non-Euclidean domains, which is our main contribution. Results are then presented in Section 6 showing the indepen- submitted to Eurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)
Transcript
Page 1: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

Eurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011), pp. 1–9A. Bargteil and M. van de Panne (Editors)

Smoothed Particle Hydrodynamics on Triangle Meshes

paper 158

AbstractWe present a particle-based method for solving Navier-Stokes equations on the surface of objects of genus 0 and 1.When the mesh is conformally mapped to a domain of constant curvature, the problem is greatly simplified due tothe regularity of the new domain and the uniform stretching property of conformal maps. We adapt the SmoothedParticle Hydrodynamics method to work in this framework andwe reformulate the momentum equation so that ittakes into account the geodesic path taken by the particles.A particle-based method allows the simulation timeto be independent of the underlying mesh resolution and offers a natural way to compute free-surface flows. Wetherefore achieve real-time simulation without artifactscaused by the parameterization of the triangle mesh.

Categories and Subject Descriptors(according to ACM CCS): I.3.3 [Computer Graphics]: Three-Dimensional Graph-ics and Realism—Animation

1. Introduction

Fluid flows on the surface of an object can be observed atvery different scales. Clouds moving across the surface ofthe earth can be well approximated by a fluid flowing on asphere. At a smaller scale, soap films are another example ofliquid constrained to move on a curved domain. But the com-plexity of such phenomena can be simplified by consideringthat the fluid is moving on a curved 2D domain instead of asmall subset of a full 3D Euclidean domain. Such simplifi-cations allow us to remove a degree of freedom, simplifyingequations and saving computation time.

Mesh methods for solving Navier-Stokes equations on anobject represented by a triangular mesh have been developed,but they suffer from being very expensive to compute anddepend heavily on the underlying mesh. We propose a parti-cle approach, namely the Smoothed Particle Hydrodynamicsmethod (SPH), to solve these equations in real time whilekeeping the dependency of the underlying mesh to a minu-mum. The resulting method is very simple and requires onlyminor modification of a standard 2D SPH simulation to besuitable for curved objects of genus 0 and 1.

The simulation uses the uniform stretching property ofconformal mapping to simplify equations in the SPH formu-lation. By first mapping the mesh conformally to a regulardomain, the computation of the forces is entirely done in theparameter domain and the particles can be easily transposedto the original object space for displacement and visualiza-tion. Note that a simplified method that only projects parti-cles to the tangent plane is very unstable when simulating

flow on surfaces other than spheres. It also makes the num-ber of particles dependent of the maximum curvature of thesurface.

Our contribution is the use of particle-based real-time sim-ulation for fluid flow over a surface, allowing the simulationto be practically independent of the complexity of the mesh.By taking into account the geodesic path of a moving par-ticle, we remove distortions resulting from the parameteri-zation of the mesh. A particle-based simulation allows forsimple surface tracking, which offers new possibilities forother forms of visualization, like free surface flows, all inasingle unified method.

More generally, the method proposes a way to solve dif-ferential equations defined on a surface where functions aredefined only on a discrete set of points. Examples of suchapplications includes texture diffusion, de-noising and defor-mation, reaction-diffusion textures, mesh de-noising andde-formation. As done in statistics to approximate probabilitydensity functions on a manifold [Pel05], this new formula-tion of the SPH equations can be simply used to interpolatevalues sampled on a surface.

The paper is organized as follows : Section2 reviews ex-isting work on conformal parameterization, SPH and flowon surfaces. Section3 explains the offline computations thatneed to be performed before doing the simulation. Section4recalls the basics of the SPH method that works on Euclideandomains. Then, Section5 extends the SPH method to workon non-Euclidean domains, which is our main contribution.Results are then presented in Section6 showing the indepen-

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 2: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes

(a) (b)

(c) (d)

Figure 1: Free-surface flow over the skull (a) and the Pen-satore (b) model. c) shows a quad-dominant mesh based onthe particle distribution obtained with an anisotropic sim-ulation and (d) shows a triangle mesh obtained with anisotropic simulation.

dence of the mesh resolution and free-surface flows on mesh.Our conclusions are given in Section7.

2. Related Work

2.1. Conformal parameterization

Discrete conformal parameterization has been extensivelystudied in the past decade. We will concentrate on methodsthat map genus-0 objects to the unit sphere and genus-1 ob-jects to the plane.

Let us first enumerate sphere parameterization methods.Angenent et al. [AHTK99] and Haker et al. [HAT∗00] de-scribe a technique in which the object is first mapped to theplane, then stereographically projected to the sphere to ob-tain the conformal mapping. Gu and Yau [GY02], Gu [Gu03]and Gu et al. [GWC∗03] describe a technique in which theGauss map is taken as the initial approximation, then up-dated with a diffusion process to minimize an energy func-tional. The resulting map is then conformal. Li and Hart-ley [LH07] upgrade this method with a new initial map anda modified diffusion process that speeds up convergence.

Global conformal parameterization of genus-1 objects isdone by Gu and Yau [GY02, GY03] and Gu [Gu03] usingdifferential one-forms defined on each edge of the mesh

to solve two linear systems. The resulting set of one-formscan then be optimized for some desired properties using themethod described by Jin et al. [JWYG04]. Cutting the meshalong the homology basis, it can then be unfolded to a planehomeomorphic to a disk by integrating one-forms.

2.2. Smoothed Particle Hydrodynamics

Smoothed Particle Hydrodynamics was introduced by Gin-gold and Monaghan [GM77] and Lucy [Luc77] but the firstapplication of this method in the computer graphics commu-nity was made by Desbrun and Gascuel [DG96] for simula-tion of deformable bodies. Stora et al. [SAC∗99] then usedit to simulate lava flows, including heat transfer and non-constant viscosity. Müller et al. [MCG03] used SPH to sim-ulate fluid interactive time, including surface tension force.We have chosen to use this last formulation of SPH due tothe simplicity of the formulas and the stability of the overallsimulation.

2.3. Surface flows

A simulation of the Jupiter atmosphere was done by Yaegeret al. [YUM86] who used some heuristic to solve Navier-Stokes equations on a part of the planet. The simulation wasdone on a non-linear grid in the texture space to compen-sate for the deformation introduced by the mapping. Theyassumed that the space is nearly flat and that there is no verti-cal motion, thus rendering the method locked to this specificapplication.

The first true fluid flow on surfaces was introduced to thecomputer graphics community by Stam [Sta03], who com-puted a local parameterization for each quadrilateral patchon which he solved the Navier-Stokes equations. Transitionfunctions were defined between each pair of neighboringpatches to transfer fluid properties across the entire mesh.Distortions are created by a misinterpretation of the advec-tion term, resulting in a fluid that does not follow a geodesicpath. Shi and Yu [SY04] did the simulation directly on themesh using an adaptation of the semi-Lagrangian method in-troduced by Stam [Sta99], eliminating distortion with paral-lel transport of the velocity vector in the backtracing step.Their method simulates incompressible and inviscid fluidflow by solving the Poisson equation and advecting fluidproperties at each iteration.

Lui et al. [LWC05] conformally parameterized the meshto solve the Navier-Stokes equations on the parameter do-main. The same misinterpretation of the advection term asin [Sta03] deviates the fluid from the geodesic path. Hege-man et al. [HMW∗09] implemented a similar method onGPU by mapping the mesh to a conformal cube map. Elcottet al. [ETK∗07] used the simplicial complex and the chaincomplex paradigm to translate equations into chain opera-tions. Fan et al. [FZKH05] adapted the Lattice-Boltzmann

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 3: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes 3

method by using the tangent space at each vertex to projectneighboring lattices on it.

In computer animation with particles, Djado andEgli [DE09] used a particle system to visualize a velocityfield resulting from a fluid simulation. The particles needsome velocity correction to avoid interpenetration and twodifferent steps are needed to do the simulation and the visu-alization. The simulation step is Eulerian and therefore alsodepends on the resolution of the mesh.

The computational time of these simulations dependsheavily on the complexity of the mesh, which makes themdifficult to use for real-time applications. Particle simulationremoves this dependency. In addition, it allows for new visu-alization techniques that would require additional processingsteps using mesh simulation methods.

We present a particle-based method for surface flows thatcan be used to solve more general PDEs on surfaces. The ad-vection term is intrinsically considered as it is a langrangianmethod and the particles correctly follow geodesic paths.This results in a method that is fast, simple and practicallyindependent of the underlying mesh.

3. Parameterization

Particle-based simulation would be very hard to perform di-rectly on the mesh because of the curvature. The solutionthat we propose is to transform the mesh to a more regularshape, like a plane or a sphere, via a parameterization pro-cess. Many different mapping techniques exist. A subset ofthese techniques, called conformal maps, uniformly stretchan infinitesimal neighborhood of each point of a surface.This ensures angle preservation and avoids shearing transfor-mation, which are very nice properties to have when workingin the parameter domain. Conformal maps are preferred overexponential maps defining local isometries because the latterapproach requires too many different maps to cover the meshefficiently, whereas the former only needs one global map.

When expressed in a conformal domain, Navier-Stokesequations only need to be slightly modified to remain validin the new domain. The uniform stretching also ensures thata small circular neighborhood is kept circular in the new do-main, which will be very useful for the neighbor search pro-cess of SPH.

We will only use global mapping, since it removes theneed to do a mesh segmentation and compute patch tran-sition functions. Genus-0 surfaces are mapped to a spherewhile genus-1 surfaces are mapped to a periodic plane. Wewill first describe what we get out of the mapping process,then compute some metric information about these map-pings that is needed during the fluid simulation. It is to benoted that everything in this section is done offline.

For what follows,M is the original mesh with vertices{vi}, edges{ei j } and triangles{ fi jk}. M′ is the parameter

domain mesh with vertices{v′i}, edges{e′i j } and triangles{ f ′i jk}.

3.1. Genus-0 surfaces

Since a genus-0 surface is homeomorphic to a sphere, a bi-jective map can be computed between the two surfaces. Thisis done by the method described in [GWC∗03] and [LH07].Given a genus-0 mesh as input, the method gives us a newmeshM′ such that every vertexv′i is located on a unit sphereand such that the mapping is conformal. The new mesh topol-ogy remains unchanged since it is a bijective map.

3.2. Genus-1 surfaces

For genus-1 surfaces, we used the method described in[GY03] to map the surface to the periodic plane. The meshM will be cut in a way that allows it to be unfolded to a flatplane, obtaining the fundamental domain. Given a genus-1mesh as input, the method gives us a new meshM′ such thatevery vertexv′i is on a plane. The topology of the new meshis modified as some vertices and edges are added becauseof the fundamental domain cutting operation. By identifyingthe duplicated data, we reobtain a mesh that is topologicallyequivalent to the original mesh.

This method also gives us the two generators for a homol-ogy basisB0 and B1 of the surface. The basis{B0,B1} issimply a set of edges representing loops that cannot be con-tracted to a point on the surface. This basis will be used torepresent the periodicity of the fundamental domain in sec-tion 3.2.1.

3.2.1. Fundamental parallelogram

For genus-1 meshes, the unfolding of the fundamental do-main can send two neighboring points very far apart. Theperiodicity of the fundamental domain is thus an importantconcept to take into account when computing distances on it,see section5.2. For this purpose, we will define two vectorsforming the fundamental parallelogram [GY03]. These area pair of independent vectors representing the shortest non-null translations needed to get back to an equivalent point onthe parameter domain (see Figure2).

This equivalence relation is expressed by Equation1: twopoints are equivalent if they are separated by an integral lin-ear combination of the fundamental parallelogram vectors~b0 and~b1.

~p≡ ~p+ i~b0+ j~b1,∀i, j ∈ Z (1)

These vectors are simply computed by integrating edge

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 4: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

4 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes

(a) (b)

(c)

Figure 2: Periodicity of the domain. a) The mapped mesh. b)The fundamental domain. c) The periodic structure of the do-main with fundamental parallelogram vectors joining equiv-alent points.

vectors of the parameter domain over each generator of thehomology basis using Equation2.

~bi = ∑e′jk∈Bi

(v′k− v′j

)(2)

3.3. Metrics

A mapping generally induces local deformations that need tobe taken into account in doing computations on the parame-ter domain. A metric is a numerical mesure of the deforma-tion that lets us perform computation as if we were directlyon the surface. The metric is generally represented as a ma-trix. But since a conformal map only locally induces a uni-form stretch, the metric can be represented by a constant ofproportionality. This constant is called the conformal factorand is denoted byλ2. It is generally different for every pointon the object and it is the only value that will be needed tocompute lengths and areas in the parameter domain.

In the discrete setting of an object represented by a tri-angle mesh, a conformal factor will be computed for ev-ery vertexvi of M. Concretely,λ represents the ratio of aunit of length on the mesh to a unit of length on the pa-rameter domain. They are computed once the parameteri-zation procedure is done using the formula in Equation3from [JWYG04].

λi =1ni

∑ei j∈M

‖ei j ‖

‖e′i j ‖(3)

whereni is the number of incident edges to the vertexvi .

4. SPH Basics

SPH is an approximation method that defines a continuousfunction from an unorganized set of points. To each pointin the set is associated a massmj and a densityρ j . To ap-proximate the function at a position~r, a convolution is donewith the surrounding points inside a radiush, thesmoothinglength. The value of a propertyA contained at each pointis weighted by a thekernel function Wand summed over alocal neighborhood. Having defined a continuous functionover the whole space, it is now easy to define the gradientand the Laplacian of any propertyA. The relevant equationsare the followings (see [MCG03]).

ρi = ∑j∈N(~r i)

mjW(~r i −~r j ,h)

〈A(~r)〉= ∑j∈N(~r)

mjA j

ρ jW(~r −~r j ,h)

∇〈A(~r)〉= ∑j∈N(~r)

mjA j

ρ j∇W(~r −~r j ,h)

∆ 〈A(~r)〉= ∑j∈N(~r)

mjA j

ρ j∆W(~r −~r j ,h)

4.1. 2D kernels

The kernel functions used in this paper are the same as in[MCG03], except for the viscosity kernel who is adapted tothe two dimensional case. These kernels are chosen for theirsimplicity, speed of computation and stability. Density com-putation usesWpoly6 while the pressure and viscosity compu-tations useWspiky andWvisc, respectively.

Wpoly6(~r,h) =4

πh8

{ (

h2− r2)3

, r < h

0, otherwise

Wspiky(~r,h) =10

πh5

{

(h− r)3 , r < h0, otherwise

Wvisc(~r,h) =40

πh5

− r3

9 + hr2

4 +h3

6

(

lnh− ln r − 56

)

, r < h

0, otherwise

wherer = ‖~r‖.

The coefficients in front of each kernel are necessary toensure the unity property. They are only valid in 2D and thusare valid for our application on surfaces. The complex formof the viscosity kernel is only to ensure that the laplacianwill have the following simple form.

∆Wvisc(~r,h) =40πh5 (h− r)

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 5: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes 5

(a) (b)

Figure 3: Particle distribution. A uniform particle distribu-tion on the surface (a) induces a non-uniform distribution inthe parameter domain (b) due to the distortions caused bythe parameterization.

5. SPH on a surface

The first thing to do in order to simulate fluid flow on thesurface of an object is to adapt the Navier-Stokes equations.Since the particles will be moving on the parameter domain,the distortions caused by the parameterization must be con-sidered (see Figure3). They appear in the computation ofthe gradient and the Laplacian, and of the path taken by par-ticles.

From now on, we need to be careful with the propertieswe are manipulating, since there are two different spaces inwhich they can "live": the surface and the parameter domain.Properties that live on the parameter domain will be writtenA and those that live on the surface will be writtenA to avoidany confusion.

The new set of equations (see [Ari89]) benefits from thenice properties of the global conformal mapping.

ρ D~uDt

=−1λ2∇p

︸ ︷︷ ︸

pressure

+µ1

λ2 ∆~u︸ ︷︷ ︸

viscosity

+ ~F︸︷︷︸

external

(4)

Note that the operatorDDt

means that the particles need tobe moved over the surface and not in the parameter domain.We see that the only differences with the original Navier-Stokes equations are the use of the conformal factorsλ2 andthe consideration of the geodesic path.

Information on metrics is only known at vertices of themesh. Since a particle is necessarily contained in a face ofthe mesh, these properties can be found by doing barycentricinterpolation of the values stored at each vertex.

5.1. Corrected formulas

First, we have already pointed out that a conformal param-eterization maps circles to circles of different radius. Thismeans that we can still use a circular neighborhood in the pa-rameter domain, but we need to change the smoothing length

by some factor. Noting that a unit of length in the parameterdomain is stretched by a factor ofλ to be valid on the surface,we need to define the new radius by Equation5.

h j =hλ j

(5)

whereh is the global smoothing length,λ j is the stretchfactor at the position of particlej andh j is the local smooth-ing length of particlej .

We can also point out that if lengths are stretched by a fac-tor λ, areas will be stretched by a factorλ2. For this reason,the area occupied by a particle in the parameter domain iscomputed by Equation6.

Vj =mj

ρ jλ2j

(6)

As we wish to do every computation in only one domainand Equation4 is written in such a way that the differentialoperators are to be applied in the parameter domain, the newSPH formulation will be described by Equation7.

〈A(~r)〉= ∑j∈N(~r)

mjA j

ρ j λ2j

W

(

~d(~r,~r j),h2

(1

λ(~r)+

1λ j

))

(7)

where ~d(~r,~r j) means the vector representing the shorteststraight path between~r and~r j . This subtlety will be fullydiscussed in Section5.2.

Given this new formulation, it is easy to define the den-sity, gradient and Laplacian on the parameter domain usingequations8, 9 and10.

ρi = ∑j∈N(~r)

mj

λ2j

W(~di j ,hi j ) (8)

1

λ2i

∇〈p(~r i)〉=1

λ2i

∑j∈N(~r)

mj pi j

ρ jλ2j

∇W(~di j ,hi j ) (9)

1

λ2i

∆ 〈~u(~r i)〉=1

λ2i

∑j∈N(~r)

mj~ui j

ρ jλ2j

∆W(~di j ,hi j ) (10)

where ~di j = ~d(~r i ,~r j), ~ui j = (~u j −~ui), hi j = (hi + h j )/2,pi j = (pi + p j )/2 and p j = kρ j , with k being a constant.Note that for liquid flow with free surface, the pressure israther expressed by the Tait’s equation11.

p j = B

((ρρ0

)7

−1

)

(11)

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 6: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

6 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes

(a) (b)

Figure 4: Effect of the geodesic path. (a) shows the pathstaken by a particle with (in yellow) and without (in blue)considering geodesics while b) shows the same paths in theparameter domain.

5.2. Distance computation

As explained in Section3.2.1, the distance between twopoints on the global conformal domain needs to take intoconsideration the periodic structure of the domain. Due tothis periodicity, multiple straight paths can be drawn be-tween two points on the parameter domain, as illustrated inFigure2. Only the shortest path is relevant to the computa-tion and this is the path that will be used for the SPH formu-lation.

For genus-0 surfaces, the mesh is mapped to a sphere. Inthis case, the Euclidean distance is a good approximation ofthe real distance and naturally gives the shortest distance.

For genus-1 surfaces, the mesh is mapped to a periodic flatdomain. We need to look for the closest translated copy ofa particle~p j around the particle position~pi . This is done bytranslating~p j by integer values of the fundamental parallel-ogram vectors defined in Section3.2.1and taking the differ-ence relative to the closest translated position of the particle.Mathematically, this path vector is defined by Equation12.

~d(~p1,~p2) = ~di j , ‖~di j ‖ = mink,l∈{−1,0,1}

‖~dkl‖ (12)

where~di j = ~p2−~p1+ i~b1+ j~b2

5.3. Geodesic path

By definition, a geodesic is a curve that have no accelera-tion when projected in the tangent space of the manifold. Sogeodesic curves are the natural way to generalize straightlines on manifolds. The path of a free particle moving ona manifold without force acting on it will then follow ageodesic.

This intuitive fact simply means that we need to transposeparticles on the actual surface to move them. To transpose

Nb triangles Torus Kitten Rocker arm1250 3.66ms 6.80ms 5.95ms12800 3.90ms 6.45ms 5.81ms31250 4.01ms 6.41ms 5.74ms

Table 1: Simulation time per step of 1000 particles on 3 mod-els of different resolutions.

Nb Particles h= 0.03 h= 0.06 h= 0.091000 1.59ms 2.73ms 4.08ms2000 4.74ms 8.54ms 14.28ms4000 16.12ms 30.30ms 52.63ms8000 66.67ms 142.86ms 250ms

Table 2: Simulation time per step for 3 different smoothingradii h for a certain amount of particles on the fluid-filledtorus. Simulations in bold were those who offered good sta-bility and rapidity at the same time.

the position of a particle and its velocity in the surface do-main, we use the affine transformation induced by the trian-gle of the parameter domain in which the particle lies andthe corresponding triangle of the mesh.

Once the position and the velocity is expressed in the sur-face domain, we move the particle following the direction ofthe velocity. Each time the particle cross the edge of a trian-gle, the direction must be rotated about the edge axis so it istangent to the incident triangle. Repeating this process untilthe path is completed, the particle is garanteed to remain onthe surface and to follow the geodesic path.

At this point, the new position and the transformed veloc-ity must be transposed back in the parameter domain usingthe inverse of the affine transformation described above.

Note that although this process introduced an explicit de-pendency of the underlying mesh, only a small percentageof the particles cross an edge of a triangle at each time step,resulting in a very small impact on the computation time.

6. Results

The method is now applied to different situations, to confirmthat simulation time is in fact independent of the mesh reso-lution, and to demonstrate free-surface flows. Various otherexamples will also be presented to complete the section. Allresults presented in this section were obtained with a 2.0GHzAMD Athlon 64 processor 3200+.

The resolution independence is demonstrated in Table1where the simulation time for a single frame is displayed forevery resolution of a given mesh. Some simulation times aregiven in Table2 for a given mesh for different number ofparticles and smoothing radii.

Figure5 demonstrates free-surface flows over a torus and

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 7: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes 7

a sphere. The gravitational force is transposed to the pa-rameter domain and is applied to each particle. Surface ten-sion is added using the simple formulation by Becker andTeschner [BT07] adapted to the formalism presented in Sec-tion 5.1. In this example, the non-realistic visualization isdone by sampling the density of the fluid on each vertex ofthe mesh and using a marching squares-like method to ex-tract the interface of the fluid. The simulations were donewith 3000 particles.

Figure 7 demonstrates higher resolution free-surfaceflows on complex objects. Using the same formulation, werendered the fluid as if it was mercury flowing between twothin glass layers. The simulations were done with 7000 parti-cles. Figure1 also demonstrates free-surface flows using thesame number of particles with different materials. The skullmodel is filled with a copper-like metallic liquid while thePensatore model is hidden to show only the liquid flowinginside.

Two examples of fluid-filled space simulation are shownin Figure6. External forces are added by dragging the mouseover the mesh or over the parameter domain. The simula-tions were done with 1800 particles. The same simulationcan be used to advect texture on the mesh as demonstratedin Figure8.

Figure9 demonstrates that the method can be applied toother computer graphics problems using the same formalism.We show this by performing a mesh smoothing algorithmusing the simple diffusion equation defined by

∂~p∂t

= α∆~p.

As an additional interesting application, Figure1 (c,d) andFigure10 show that the method can be used to remesh ob-jects. Indeed, the particle distribution obtained when thesim-ulation is in steady state is isotropic (Figure1 (c)) and iseasy to mesh to get a equal-area triangle mesh independentof the parameterization. Different particle alignment canbecomputed using a generalizedLp distance computation [?].This anisotropic distance computation favors particle align-ment that can be used for quad-dominant remeshing. Theanisotropic distance must be computed relative to a particu-lar direction using a orientation matrixM so that the lengthof a vector~v is computed by

‖M~v‖p =((M~v)p

x +(M~v)py) 1

p .

Figure10 (a,b,c) have been computed to be aligned withthe gradient of the conformal factor and Figure1 (c) has beencomputed to be aligned with the x-axis of the parameter do-main. We found that integrating the force directly to the po-sition leads to a smoother simulation and that the smoothingradius of the simulation must be small enough for the align-ment to be done correctly.

(a) (b)

(c) (d)

Figure 5: Non-realistic free-surface flow over a sphere (a,b)and a torus (c,d).

7. Conclusion

In this paper, we have presented a particle-based method forsimulating fluid flows on the surface of an object of genus 0or 1. The idea is to conformally map the triangle mesh to aconstant curvature domain and solve the Navier-Stokes equa-tions on the parameter domain. The uniform stretching prop-erty of conformal maps ensures minimal changes to theseequations. The reformulation of the advection term lets theparticles follow the geodesic path without distortions causedby the parameterization.

Results show that the simulation time is independentof the resolution of the mesh, so real-time performanceis achieved even with high resolution triangle mesh. Themethod was used to simulate free-surface flows by taking ad-vantage of the natural surface tracking that a particle-basedsimulation offers.

References

[AHTK99] A NGENENTS., HAKER S., TANNENBAUM A., K IKI -NIS R.: Conformal geometry and brain flattening. InProceedingsof MICCAI ’99 (1999), Springer-Verlag, pp. 271–278.2

[Ari89] A RIS R.: Vectors, tensors and the basis equations of fluidmechanics. Dover, 1989.5

[BT07] BECKER M., TESCHNERM.: Weakly compressible sphfor free surface flows. InProceedings of SCA ’07(2007), Euro-graphics Association, pp. 209–217.7

[DE09] DJADO K., EGLI R.: Particle-based fluid flow visualiza-tion on meshes. InAFRIGRAPH ’09: Proceedings of the 6thInternational Conference on Computer Graphics, Virtual Reality,

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 8: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

8 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes

(a) (b)

Figure 6: Fluid-filled space simulation over a genus-0 ob-ject (duck) and a genus-1 object (rocker arm).

(a) (b)

Figure 7: Realistic free-surface flow over the Pensatoremodel.

(a) (b)

Figure 8: Texture advection using the velocity field definedby the particles over the kitten model.

(a) (b)

(c) (d)

Figure 9: Laplacian mesh smoothing of a torus (a,b) and askull model (c,d).

(a) (b)

(c) (d)

Figure 10: Quad-dominant meshing based on an anisotropicLp-norm of a sphere (a), a torus (b) and the kitten model (c).Distribution of aligned points obtained with an anisotropicsimulation (d). Note that the quads have practically the samearea and is independent on the parameterization.

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)

Page 9: Smoothed Particle Hydrodynamics on Triangle Meshespaillegp/files/mastersthesis/draft.pdf · 2 paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes (a) (b) (c) (d) Figure

paper 158 / Smoothed Particle Hydrodynamics on Triangle Meshes 9

Visualisation and Interaction in Africa(2009), ACM, pp. 65–72.3

[DG96] DESBRUN M., GASCUEL M.-P.: Smoothed particles:A new paradigm for animating highly deformable bodies. InProceedings of the Eurographics Workshop on Computer Anima-tion and Simulation ’96(1996), Springer-Verlag New York, Inc.,pp. 61–76.2

[ETK∗07] ELCOTT S., TONG Y., KANSO E., SCHRÖDER P.,DESBRUN M.: Stable, circulation-preserving, simplicial fluids.ACM Trans. Graph. 26, 1 (2007), 4.2

[FZKH05] FAN Z., ZHAO Y., KAUFMAN A., HE Y.: Adapted un-structured LBM for flow simulation on curved surfaces. InSCA’05: Proceedings of the 2005 ACM SIGGRAPH/EurographicsSymposium on Computer Animation(2005), ACM, pp. 245–254.2

[GM77] GINGOLD R. A., MONAGHAN J. J.: Smoothed particlehydrodynamics - Theory and application to non-spherical stars.Royal Astronomical Society, Monthly Notices 181(1977), 375–389. 2

[Gu03] GU X.: Parametrization for surfaces with arbitrarytopologies. PhD thesis, Harvard University, 2003.2

[GWC∗03] GU X., WANG Y., CHAN T. F., THOMPSONP. M.,YAU S.-T.: Genus zero surface conformal mapping and its appli-cation to brain surface mapping.IEEE Transactions on MedicalImaging 23(2003), 949–958.2, 3

[GY02] GU X., YAU S.-T.: Computing conformal structures ofsurfaces.Communications in Information and Systems 2(2002),121–146.2

[GY03] GU X., YAU S.-T.: Global conformal surface parameteri-zation. InProceedings of SGP ’03(2003), Eurographics, pp. 127–137. 2, 3

[HAT∗00] HAKER S., ANGENENT S., TANNENBAUM A., K IKI -NIS R., SAPIRO G., HALLE M.: Conformal surface parameteri-zation for texture mapping.IEEE Transactions on Visualizationand Computer Graphics 6, 2 (2000), 181–189.2

[HMW∗09] HEGEMAN K., M ICHAEL A., WANG H., QIN H., ,GU X.: Gpu-based conformal flow on surfaces.Communicationsin Information & Systems 9, 2 (2009), 197–212.2

[JWYG04] JIN M., WANG Y., YAU S.-T., GU X.: Optimalglobal conformal surface parameterization. InProceedings ofVIS ’04(2004), IEEE Computer Society, pp. 267–274.2, 4

[LH07] L I H., HARTLEY R.: Conformal spherical representationof 3d genus-zero meshes.Pattern Recogn. 40, 10 (2007), 2742–2753.2, 3

[Luc77] LUCY L. B.: A numerical approach to the testing of thefission hypothesis.Astronomical Journal 82(1977), 1013–1024.2

[LWC05] LUI L. M., WANG Y., CHAN T. F.: Solving PDEs onmanifolds with global conformal parametrization. InVLSM ’05(2005), pp. 307–319.2

[MCG03] MÜLLER M., CHARYPAR D., GROSS M.: Particle-based fluid simulation for interactive applications. InProceed-ings of SCA ’03(2003), Eurographics Association, pp. 154–159.2, 4

[Pel05] PELLETIER B.: Kernel density estimation on riemannianmanifolds. Statistics & Probability Letters 73, 3 (2005), 297 –304. 1

[SAC∗99] STORA D., AGLIATI P.-O., CANI M.-P., NEYRET F.,GASCUEL J.-D.: Animating lava flows. InGraphics Interface,GI’99, June, 1999(1999), Mackenzie I. S., Stewart J., (Eds.),Canadian Human-Computer Communications Society, pp. 203–210. 2

[Sta99] STAM J.: Stable fluids. InSIGGRAPH ’99: Proceedingsof the 26th Annual Conference on Computer Graphics and Inter-active Techniques(1999), ACM Press/Addison-Wesley Publish-ing Co., pp. 121–128.2

[Sta03] STAM J.: Flows on surfaces of arbitrary topology. InProceedings of SIGGRAPH ’03(2003), ACM, pp. 724–731.2

[SY04] SHI L., YU Y.: Inviscid and incompressible fluid sim-ulation on triangle meshes: Research articles.Comput. Animat.Virtual Worlds 15, 3-4 (2004), 173–181.2

[YUM86] YAEGERL., UPSONC., MYERS R.: Combining phys-ical and visual simulation—creation of the planet jupiter for thefilm “2010”. SIGGRAPH Comput. Graph. 20, 4 (1986), 85–93.2

submitted toEurographics/ ACM SIGGRAPH Symposium on Computer Animation (2011)


Recommended