procedural synthesis using vortex particle method for fluid simulation...

7
Volume 28 (2009), Number 7 Procedural Synthesis using Vortex Particle Method for Fluid Simulation Jong-Chul Yoon 1 , Hyeong Ryeol Kam 2 , Jeong-Mo Hong 3 , Shin Jin Kang 4 and Chang-Hun Kim 2 1 FXGear Inc. 2 Korea University 3 Dongguk University 4 Hongik University Abstract We propose a fast and effective technique to improve sub-grid visual details of the grid based fluid simulation. Our method procedurally synthesizes the flow fields coming from the incompressible Navier-Stokes solver and the vorticity fields generated by vortex particle method for sub-grid turbulence. We are able to efficiently animate smoke which is highly turbulent and swirling with small scale details. Since this technique does not solve the linear system in high-resolution grids, it can perform fluid simulation more rapidly. We can easily estimate the influence of turbulent and swirling effect to the fluid flow. Categories and Subject Descriptors (according to ACM CCS): I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism—Animation 1. Introduction As the use of computer graphics is increasing in movies, commercials and other media, the work of animating fluids such as explosion and fire has become an important process in that area. Recently fluid dynamics technologies are applied to a range of special effects, yet achieving precise calculations is still a time-consuming process, which is why various tech- nologies are being studied for better balance between pro- ductivity and the reality of graphics. Therefore, in the area of graphics, enhancing productivity while maintaining an ade- quate level of visual quality - even at the modest expense of physical/mathematical accuracy - presents a challenge to fluid animation technologies. While the vortex particle method [SRF05] is useful for generating turbulent effects, its drawback is that the grid is too coarse to accommodate the vorticity of all particles. Al- though it is possible to use high-resolution grids in simula- tion, it would require much more time and memory capacity. Recently introduced techniques [KTJG08, SB08, NSCL08] have improved details in grids by using noise. We propose a new technique for improving details in grids in fluid simulation. This technique depicts the uncom- plicated motion of fluid through flow fields calculated by solving the incompressible Navier-Stokes equations, and de- tailed motion of fluid through vorticity field calculated by the vortex particle method. This technique does not solve the linear system in high-resolution grids, thus it performs large-scale grid simulation efficiently. Another benefit is that it generates turbulent effects of explosion or rough motion of smoke as the vorticity of vortex particles is transferred to the high-resolution grid. Our approach has the following characteristics: A degree of resolution equivalent to the result of simula- tion using the (k × n) 3 grid is achieved by solving fluid equations of the n 3 grid in a three-dimensional space. k is a constant making desired resolution. Since this method has the benefit that the result can be quickly drawn through low-resolution simulation, if the result is satisfactory, a high-resolution result can be ob- tained without running simulation with adjusted parame- ters. Highly turbulent and swirling effects that cannot be gen- erated easily by using noise for simulating explosion, smoke, etc. can be achieved since it is hard to anticipate how they will affect flow when using noise. Vortex particle carries the vorticity calculated from low resolution and we create the high resolution vorticity field using the vorticity. This field uses the information from the base simulation. c 2009 The Author(s) Journal compilation c 2009 The Eurographics Association and Blackwell Publishing Ltd. Published by Blackwell Publishing, 9600 Garsington Road, Oxford OX4 2DQ, UK and 350 Main Street, Malden, MA 02148, USA.

Upload: others

Post on 10-Feb-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

  • Volume 28 (2009), Number 7

    Procedural Synthesis using Vortex Particle Method for FluidSimulation

    Jong-Chul Yoon1, Hyeong Ryeol Kam2, Jeong-Mo Hong3, Shin Jin Kang4 and Chang-Hun Kim2

    1 FXGear Inc. 2 Korea University 3 Dongguk University 4 Hongik University

    AbstractWe propose a fast and effective technique to improve sub-grid visual details of the grid based fluid simulation.Our method procedurally synthesizes the flow fields coming from the incompressible Navier-Stokes solver andthe vorticity fields generated by vortex particle method for sub-grid turbulence. We are able to efficiently animatesmoke which is highly turbulent and swirling with small scale details. Since this technique does not solve the linearsystem in high-resolution grids, it can perform fluid simulation more rapidly. We can easily estimate the influenceof turbulent and swirling effect to the fluid flow.

    Categories and Subject Descriptors (according to ACM CCS): I.3.7 [Computer Graphics]: Three-DimensionalGraphics and Realism—Animation

    1. Introduction

    As the use of computer graphics is increasing in movies,commercials and other media, the work of animating fluidssuch as explosion and fire has become an important processin that area.

    Recently fluid dynamics technologies are applied to arange of special effects, yet achieving precise calculations isstill a time-consuming process, which is why various tech-nologies are being studied for better balance between pro-ductivity and the reality of graphics. Therefore, in the area ofgraphics, enhancing productivity while maintaining an ade-quate level of visual quality - even at the modest expenseof physical/mathematical accuracy - presents a challenge tofluid animation technologies.

    While the vortex particle method [SRF05] is useful forgenerating turbulent effects, its drawback is that the grid istoo coarse to accommodate the vorticity of all particles. Al-though it is possible to use high-resolution grids in simula-tion, it would require much more time and memory capacity.Recently introduced techniques [KTJG08, SB08, NSCL08]have improved details in grids by using noise.

    We propose a new technique for improving details ingrids in fluid simulation. This technique depicts the uncom-plicated motion of fluid through flow fields calculated bysolving the incompressible Navier-Stokes equations, and de-

    tailed motion of fluid through vorticity field calculated bythe vortex particle method. This technique does not solvethe linear system in high-resolution grids, thus it performslarge-scale grid simulation efficiently. Another benefit is thatit generates turbulent effects of explosion or rough motion ofsmoke as the vorticity of vortex particles is transferred to thehigh-resolution grid.

    Our approach has the following characteristics:

    • A degree of resolution equivalent to the result of simula-tion using the (k× n)3 grid is achieved by solving fluidequations of the n3 grid in a three-dimensional space. k isa constant making desired resolution.

    • Since this method has the benefit that the result can bequickly drawn through low-resolution simulation, if theresult is satisfactory, a high-resolution result can be ob-tained without running simulation with adjusted parame-ters.

    • Highly turbulent and swirling effects that cannot be gen-erated easily by using noise for simulating explosion,smoke, etc. can be achieved since it is hard to anticipatehow they will affect flow when using noise.

    • Vortex particle carries the vorticity calculated from lowresolution and we create the high resolution vorticity fieldusing the vorticity. This field uses the information fromthe base simulation.

    c© 2009 The Author(s)Journal compilation c© 2009 The Eurographics Association and Blackwell Publishing Ltd.Published by Blackwell Publishing, 9600 Garsington Road, Oxford OX4 2DQ, UK and350 Main Street, Malden, MA 02148, USA.

  • Jong-Chul Yoon et al. / Procedural Synthesis using Vortex Particle Method for Fluid Simulation

    Figure 1: Rising smoke: Simulation sequence of synthesizing a 200×600×200 resolution from a 50×150×50 resolution byadding detail using a procedural vortex particle method.

    • We can easily control the size of turbulence depending onthe frequency by adjusting the particle radius.

    2. Previous Work

    Stam and Fiume [SF93] proposed a method to depictgaseous phenomena through the ambient turbulence that isused to add new eddies by noise. Smoke simulation us-ing the three dimensional Navier-Stokes equations beganwith Foster and Metaxas [FM97]. Stam [Sta99] presenteda Semi-Lagrangian advection model which allows stablesimulation with large time step. Fedkiw et al. [FSJ01] in-troduced a simulation model for generating a vorticity ef-fect which is hard to depict in coarse grids. This vortic-ity confinement method reduced the loss of small-scale de-tails and increased the amount of swirling motion. Feliciand Drela [FD90, FD93a, FD93b] coupled an Eulerian anda Lagrangian Solver and tried to reduce numerical diffusion.Selle et al. [SRF05] presented vortex particle method whichallowed effective simulation by incorporating localized vor-ticity confinement in grid. It directly computes the veloc-ity for particles by trilinear interpolation. It reduces the nu-merical loss because each vortex particle stores a vorticityvalue. But it is slow for high-resolution simulation. And Parkand Kim [PK05] presented a Lagrangian method for gaseousphenomena simulation based on the vortex method. Hongand Kim [HK05] proposed the method for vortex advectionbased on vorticity confinement. Angelidis et al. [ANSN06]used the vortex filament methods based on the vorticity for-mulation of the Navier-Stokes equations. They defined a vor-ticity preserving flow field around a set of vortex primitives.

    Previous research results were only useful in small-scale

    simulation due to the high computational cost. Although theuse of fluid technologies is increasing, the improvement ofcomputing environment still falls short of the demand ofdevelopers, which has led to a number of attempts to findways to enhance the quality as well as reality of simulation.Neyret [Ney03] increased the details of fluid by advectingtexture to the velocity field. Rasmussen et al. [RNGF03] pro-posed an efficient method for large-scale fluid simulation,and Losasso et al. [LGF04] introduced a method to reducesimulation time by limiting the refinement to the fluid sur-face part of the grid using octree data structure instead ofusing uniform grid. Another approach is to employ errorcorrection schemes such as BFECC [KLLR07] or a Mac-Cormack method [SFK∗08], or less dissipative advectionschemes such as USCIP [KSK08], to reduce the diffusionin the numerical method directly.

    Recently, methods for adding further details in sub-gridby using noise have been introduced. These methods aresimilar to our method’s schematic outline, adding the small-scaled detail to the upsampled field gained by interpola-tion in coarse-grid simulation for making a new velocityfield. Kim et al. [KTJG08] used wavelet method and synthe-sized missing turbulent flow components with band-limitedwavelet noise. This helps to show small-scaled detail in acoarse grid. Schechter and Bridson [SB08] presented sub-grid turbulence evolution model for fluid simulation. Theytracked bands of turbulent energy using a simple linearmodel and created the turbulent velocity using flow noise.They added a predictor step to the usual time splitting of theincompressible Euler equation and corrected the additionalvorticity dissipation due to time splitting of the pressure and

    c© 2009 The Author(s)Journal compilation c© 2009 The Eurographics Association and Blackwell Publishing Ltd.

  • Jong-Chul Yoon et al. / Procedural Synthesis using Vortex Particle Method for Fluid Simulation

    Figure 2: Overview of our method

    advection. Narain et al. [NSCL08] introduced a techniquecoupling a procedural turbulence model with a numericalfluid solver. They used an energy function and a Lagrangianapproach to advect noise when synthesizing an incompress-ible turbulent velocity field. They applied the method to sim-ulation of liquids with free surfaces.

    Turbulence can be edited easily using these methods be-cause the turbulence is independent from the large-scale flowand able to be added like a post process. But we don’t includea noise and energy function but vortex particle method, i.e.vortex particle carries the vorticity calculated from low reso-lution and we create the high resolution vorticity field usingthe vorticity. This field uses the information from the basesimulation while the noise addition is unrelated to the basesimulation. In addition, our method is easy to implement andable to show highly turbulent effects such as an explosion orrocket smoke that is hard to be generated from a noise func-tion.

    3. High resolution fluid synthesis

    This section discusses the high-resolution method of synthe-sizing vortex particles in fluid simulation. The notation usedis as follows. Bold denotes a vector, and non-bold repre-sents a scalar. Parameters used in low-resolution simulationare marked with lower-case letters and parameters used in

    high-resolution simulation are marked with upper-case let-ters, while x represents the location. I(u,X) is the functionfor interpolation of velocity field u by high-resolution loca-tion X. A(U,D) is the function for advection of density D byU.

    3.1. Base fluid simulation

    We simulate the motion of fluid by solving the incompress-ible Navier-Stokes equations commonly used to animatefluid in graphics. The Navier-Stokes equations describing in-viscid incompressible fluid motion are

    ut +(u ·∇)u+∇p/ρ = f (1)

    ∇·u = 0, (2)

    where u = (u,v,w) is the fluid’s velocity, p is the pressure,ρ is the density, and f is the external forces such as grav-ity and vorticity confinement. Since upsampled velocity fielddepends on that of base simulation, using a vorticity confine-ment results in more dynamic flow than not using it. Sincenumerical methods of solving equations (1) and (2) are wellknown, we refer readers to [Sta99, FSJ01] for details.

    3.2. Saving grid vorticity to vortex particle

    We use vortex particle method [SRF05] in this paper. TheNavier-Stokes equations can be put into vorticity form by

    c© 2009 The Author(s)Journal compilation c© 2009 The Eurographics Association and Blackwell Publishing Ltd.

  • Jong-Chul Yoon et al. / Procedural Synthesis using Vortex Particle Method for Fluid Simulation

    Figure 3: 2D simulation comparison: The low resolution simulation(30× 90) is shown in the left. An effective resolution of480×1440 using our method is shown in the right.

    taking the curl of equation (1) to obtain

    ωt +(u ·∇)ω− (ω ·∇)u = µ∇2ω+∇× f (3)

    where ω =∇×u, ω is vorticity. The vorticity advection term(u ·∇)ω and the vortex stretching term (ω ·∇)u are calcu-lated and saved in the particles, thereby preserving the mag-nitude of vorticity in each step. We ignore the µ∇2ω and∇× f terms like Selle et al. [SRF05].

    3.3. Generating vorticity field

    The vorticity of vortex particles obtained in 3.2 is transferredto high-resolution vorticity field Uvorticity, which is differentfrom Selle et al. [SRF05]. We get the vorticity of a parti-cle, ω∗p(X) = ξp(X−Xp)ωp by using the distribution ker-nel, ξp(X−Xp) which is a function of the distance betweenthe particle position and the high-resolution grid point. Thenwe calculate the sum of all contributions from all particlesby the normalized location vector from grid point to vortexparticle, Np(X) = Xp−X/ ||Xp−X|| and the confinementforce, Fp(X) = εp(Np ×ω∗p) to update the vorticity fieldelement which is in the influence of the particles.

    Discussion: The vorticity field generated by above

    method is not divergence-free. To make vorticity fielddivergence-free, we can calculate curl of particle’s vorticitytaken by a ramp function instead of using (Np×ω∗p). Our re-sult came from the method of 3.3. The non divergence-freestatus in vorticity field at sub-grid level is ignorable sincethe vorticity field is newly created at each step instead of be-ing advected. Our result shows little difference as comparedwith divergence-free case and it operates a little faster.

    3.4. Blending vorticity field with upsampled velocityfield

    We create a new field Uadvection for the advection of densityD, as follows:

    Uadvection(X, t) = kUvorticity(X, t)+Uinterpolation(X, t) (4)

    where k is a constant that controls influence of the vorticityfield and Uinterpolation = I(u,X). We use k = 1.0 in our ex-periment and simple linear interpolation for Uinterpolation =I(u,X).

    c© 2009 The Author(s)Journal compilation c© 2009 The Eurographics Association and Blackwell Publishing Ltd.

  • Jong-Chul Yoon et al. / Procedural Synthesis using Vortex Particle Method for Fluid Simulation

    Figure 4: Explosion-like effect: The low resolution simulation(50× 100× 50) is shown in the left half of the image. The highresolution simulation(200×400×200) is in the right.

    3.5. Peudo-code1 Advection(u)2 Vorticity Con f inement(u)3 Pro jection(u)4 Uinterpolation = I(u,X)5 Uvorticity = Vortex Particle Method(u)6 Uadvection = kUvorticity +Uinterpolation7 A(Uadvection,D)

    4. Examples

    We used the following kernel function [MCG03] to generatevorticity field from vortex particles.

    ξp(X−Xp) ={

    (r2− (X−Xp)2)3 0≤ (X−Xp)≤ r0 otherwise

    (5)where r is the radius of the particles, determines the influ-ence range when the force of the vortex particle is transferredto Uvorticity. We defined a particle radius that is long enoughto cover about two to three U cells.

    Figure 1 shows smoke rising from a spherical densitysource due to buoyancy forces. In this example, vortex parti-cles are randomly seeded where the density is sourced. Vor-tex particle method(approximately 300 vortex particles forlow-resolution field and 20,000 vortex particles for high-resolution field, respectively) and Vorticity Confinement

    were used for base simulation and the BFECC advectionmethod was used for density and velocity advection.

    Our method is prominently faster than an equivalent full-resolution simulation and performs around seven times fasterthan the full solver as shown in table 1.

    All the experiments were performed on an Intel QuadCore CPU 2.4GHz processor with 2GB RAM.

    Our method Traditional NS solverresolution 120×360×120 120×360×120

    time per frame 9.2 sec 59.0 sec

    Table 1: Comparison of computation time: Performancecomparison of our method with the traditional Navier-Stokes Solver needed to generate the same visual detail. Ourmethod used the result of base simulation(30×90×30, 0.58seconds per frame).

    Limitations: Our method has following limitations. Wecalculate the sum of all contributions from every vortex par-ticle when generating vorticity field. So vorticity force isadded to velocity field in proportion to the number of vortexparticles gathering together in the particle radius. And thenstrong vorticity force can cause unnaturalness in fluid’s mo-tion. Our method cannot reproduce physically correct high-resolution simulation. And boundary condition depends on

    c© 2009 The Author(s)Journal compilation c© 2009 The Eurographics Association and Blackwell Publishing Ltd.

  • Jong-Chul Yoon et al. / Procedural Synthesis using Vortex Particle Method for Fluid Simulation

    low resolution. So, there could be a velocity going into aobstacle at sub-grid level.

    5. Conclusions and Future Work

    This paper proposed a synthesizing method using vortex par-ticle method to improve sub-grid visuals of fluid simula-tion. We modified the technique to apply the vortex particlemethod instead of using a noise function. We created flowfield by solving the incompressible Navier-Stokes equations.It is upsampled through linear interpolation and blendedwith vorticity field which is calculated by vortex particlemethod. High-resolution results were achieved by advectingthe density with using the calculated velocity field, and madeit possible to simulate highly-turbulent swirling motion offluid.

    Comparing with previous noise based work [KTJG08,NSCL08], we use vortex particle method. Our work canshow more sub-grid details with high turbulences and swirls.And the generation of sub-grid details using our approachcan be expected more easily than noise based work. Overallprocess of ours and theirs is similar but we have different ap-proach in generating turbulence, so the computational timeof our work is little different from that of their work. Andthis also depends on the number of vortex particles and theradius of the particles.

    In the future, we will try to apply our method to anima-tion of liquids with free surfaces and make proper boundaryconditions at the sub-grid level for more precise simulation.

    Acknowledgements

    This research is supported by Ministry of Culture, Sportsand Tourism (MCST) and Korea Creative Content Agency(KOCCA) in the Culture Technology (CT) Research & De-velopment Program 2009. This work was supported by theKorea Science and Engineering Foundation(KOSEF) grantfunded by the Korea government(R01-2008-000-20855-0).This work was supported by the Second Brain Korea 21Project. J. H. was supported by the Korea Science and Engi-neering Foundation(KOSEF) grant funded by the Korea gov-ernment(MEST) (No. 2009-0058641)

    References

    [ANSN06] ANGELIDIS A., NEYRET F., SINGH K.,NOWROUZEZAHRAI D.: A controllable, fast and stable basisfor vortex based smoke simulation. Eurographics/SIGGRAPHSymposium on Computer Animation (2006), 25–32.

    [FD90] FELICI H. M., DRELA M.: Eulerian/lagrangian solutionof 3-d rotational flows. In AIAA 21st Fluid Dynamics, PlasmaDynamics and Lasers Conf. (Jun 1990).

    [FD93a] FELICI H. M., DRELA M.: An eulerian/lagrangian cou-pling procedure for three-dimensional vortical flows. AIAA J.,1993-3370 (1993).

    [FD93b] FELICI H. M., DRELA M.: Reduction of numerical dif-fusion in three-dimensional vortical flows using a coupled eule-rian/lagrangian solution procedure. In AIAA 24th Fluid DynamicsConf. (Jul 1993).

    [FM97] FOSTER N., METAXAS D.: Modeling the motion of ahot, turbulent gas. In Proc. of SIGGRAPH 97 (1997), pp. 181–188.

    [FSJ01] FEDKIW R., STAM J., JENSEN H.: Visual simulation ofsmoke. In Proc. of ACM SIGGRAPH 2001 (2001), pp. 15–22.

    [HK05] HONG J.-K., KIM C.-H.: Animating smoke with dy-namic balance: Natural phenomena and special effects. Com-puter Animation and Virtual Worlds 16, 3-4 (2005), 405–414.

    [KLLR07] KIM B., LIU Y., LLAMAS I., ROSSIGNAC J.: Advec-tions with significantly reduced dissipation and diffusion. IEEETrans. on Vis. and Comput. Graph. 13 (2007), 135–144.

    [KSK08] KIM D., SONG O.-Y., KO H.-S.: A semi-lagrangiancip fluid solver without dimensional splitting. Computer Graph-ics Forum (2008), 467–475.

    [KTJG08] KIM T., THUREY N., JAMES D., GROSS M.: Waveletturbulence for fluid simulation. ACM Transactions on Graphics(In Proceedings of ACM SIGGRAPH 2008) (2008), 1–6.

    [LGF04] LOSASSO F., GIBOU F., FEDKIW R.: Simulating waterand smoke with an octree data structure. ACM Trans. Graph.(SIGGRAPH Proc.) 23 (2004), 457–462.

    [MCG03] MÜLLER M., CHARYPAR D., GROSS M.: Particle-based fluid simulation for interactive applications. In Proc. of the2003 ACM SIGGRAPH/Eurographics Symp. on Comput. Anim.(2003), pp. 154–159.

    [Ney03] NEYRET F.: Advected textures. In Proc. of Eurograph-ics/SIGGRAPH Symp. on Comput. Anim. (2003), pp. 147–153.

    [NSCL08] NARAIN R., SEWALL J., CARLSON M., LIN M.: Fastanimation of turbulence using energy transport and proceduralsynthesis. ACM Transactions on Graphics (Proc. SIGGRAPHAsia) (2008), 1–8.

    [PK05] PARK S. I., KIM M. J.: Vortex fluid for gaseous phenom-ena. Eurographics/SIGGRAPH Symposium on Computer Anima-tion (2005), 261–270.

    [RNGF03] RASMUSSEN N., NGUYEN D., GEIGER W., FEDKIWR.: Smoke simulation for large scale phenomena. ACM Trans.Graph. (SIGGRAPH Proc.) 22 (2003), 703–707.

    [SB08] SCHECHTER H., BRIDSON R.: Evolving sub-grid turbu-lence for smoke animation. Eurographics/SIGGRAPH Sympo-sium on Computer Animation (2008), 1–8.

    [SF93] STAM J., FIUME E.: Turbulent Wind Fields for GaseousPhenomena. In Proc. of SIGGRAPH 1993 (1993), pp. 369–376.

    [SFK∗08] SELLE A., FEDKIW R., KIM B., Y.LIU, ROSSIGNACJ.: An unconditionally stable maccormack method. Journal ofScientific Computing (2008), 350–371.

    [SRF05] SELLE A., RASMUSSEN N., FEDKIW R.: A vortexparticle method for smoke, water and explosions. ACM Trans.Graph. (SIGGRAPH Proc.) 24, 3 (2005), 910–914.

    [Sta99] STAM J.: Stable fluids. In Proc. of SIGGRAPH 99 (1999),pp. 121–128.

    c© 2009 The Author(s)Journal compilation c© 2009 The Eurographics Association and Blackwell Publishing Ltd.

  • Jong-Chul Yoon et al. / Procedural Synthesis using Vortex Particle Method for Fluid Simulation

    Figure 5: Side by side comparison: 50× 100× 50 base simulation(top), upsampled simulation on a 200× 400× 200 resolu-tion(middle), our method of 200×400×200 resolution(bottom)

    c© 2009 The Author(s)Journal compilation c© 2009 The Eurographics Association and Blackwell Publishing Ltd.