Bubbles Alive - KUCGkucg.korea.ac.kr/research/PhysicallyBasedSimulation/... · 2002. 1. 17. ·...

4
Online Submission ID: 310 Bubbles Alive Figure 1: Water pouring with turbulent multi-phase bubble flows. Simulation took 6 hours on an octree grid with an effective resolution of 256 × 128 2 and a maximum of 8,000 SPH particles were used. Abstract We propose a hybrid method for simulating multi-phase fluids such as bubbly water, in which the sub-grid visual details can be im- proved by incorporating our novel bubble model based on the smoothed particle hydrodynamics (SPH) method into a Eulerian grid-based simulation that generates background flows of large bod- ies of water and air faithfully. To turn the difficulty in simulating small bubbles being coupled to the multi-phase flows on a coarse grid into the advantage of the simulation efficiency, we modeled the inter-phase properties between water and the air captured in it by means of the interactions between bubble particles without los- ing the consistency of the two-way coupling. As a result, we could animate lively motion of bubbly water with small scale details effi- ciently. CR Categories: I.3.5 [Computer Graphics]: Computational Ge- ometry and Object Modeling—Physically based modeling; I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism— Animation Keywords: Fluid simulation, bubbles, grid-based simulation, smoothed particle hydrodynamics 1 Introduction The lively but chaotic motion of bubbles has enchanted and driven many scientists to eternal challenges. Besides the engineering ap- plications including ship hydrodynamics, cooling of nuclear reac- tors, and laundry machines, it is indispensable to the visual realism of computer generated water animation showing the multi-phase characteristics of fluids. In computer graphics, many researchers are struggling to get more realistic bubbles and foams on the line of the physically based fluid animation that has been powered by computational fluid dynamics. The combination of the two major approaches, the Eulerian grid- based method and the Lagrangian particle method that have been competing with each other, is appearing recently. This seems de- sirable because they are complementary to each other: the spatial resolution that has been limited by the grid-spacing in the Eule- rian approach can be improved greatly and a particle system based on smoothed particle hydrodynamics (SPH) can have much better flexibility and controllability by concentrating on small-scale de- tails, while the large bodies of water and air are handled efficiently and faithfully by a grid-based solver . The hybrid approach to multi-phase flows (including bubbles) has received less attention than the simulation of splash because incon- sistency in resolution between the two systems is more serious for bubbles than droplets. Bubbles require the surrounding water to be simulated in more detail because water dominates the inertia due to its much greater density. To escape from the irony of refining the grid to have the resolution of particles and to turn this difficulty into the great increase in per- formance without losing the consistency of the two-way coupling, the most compelling choice for computer graphics is to model the inter-phase properties of water and the air captured in it in terms of the interactions between bubble particles. To do this, we introduce the SPH vorticity confinement method accompanied by the cohe- sive forces that generate sub-grid turbulence so as to capture the natural look of bubble motions in a way that is in harmony with an underlying grid-based simulation of multi-phase flows. 2 Previous Work The success of grid-based liquid animation techniques that use a free-surface single-phase model (see [Foster and Metaxas 1996], 1

Transcript of Bubbles Alive - KUCGkucg.korea.ac.kr/research/PhysicallyBasedSimulation/... · 2002. 1. 17. ·...

Page 1: Bubbles Alive - KUCGkucg.korea.ac.kr/research/PhysicallyBasedSimulation/... · 2002. 1. 17. · Online Submission ID: 310 Bubbles Alive Figure 1: Water pouring with turbulent multi-phase

Online Submission ID: 310

Bubbles Alive

Figure 1: Water pouring with turbulent multi-phase bubble flows. Simulation took 6 hours on an octree grid with an effective resolution of256×1282 and a maximum of 8,000 SPH particles were used.

Abstract

We propose a hybrid method for simulating multi-phase fluids suchas bubbly water, in which the sub-grid visual details can be im-proved by incorporating our novel bubble model based on thesmoothed particle hydrodynamics (SPH) method into a Euleriangrid-based simulation that generates background flows of large bod-ies of water and air faithfully. To turn the difficulty in simulatingsmall bubbles being coupled to the multi-phase flows on a coarsegrid into the advantage of the simulation efficiency, we modeledthe inter-phase properties between water and the air captured in itby means of the interactions between bubble particles without los-ing the consistency of the two-way coupling. As a result, we couldanimate lively motion of bubbly water with small scale details effi-ciently.

CR Categories: I.3.5 [Computer Graphics]: Computational Ge-ometry and Object Modeling—Physically based modeling; I.3.7[Computer Graphics]: Three-Dimensional Graphics and Realism—Animation

Keywords: Fluid simulation, bubbles, grid-based simulation,smoothed particle hydrodynamics

1 Introduction

The lively but chaotic motion of bubbles has enchanted and drivenmany scientists to eternal challenges. Besides the engineering ap-

plications including ship hydrodynamics, cooling of nuclear reac-tors, and laundry machines, it is indispensable to the visual realismof computer generated water animation showing the multi-phasecharacteristics of fluids. In computer graphics, many researchersare struggling to get more realistic bubbles and foams on the lineof the physically based fluid animation that has been powered bycomputational fluid dynamics.

The combination of the two major approaches, the Eulerian grid-based method and the Lagrangian particle method that have beencompeting with each other, is appearing recently. This seems de-sirable because they are complementary to each other: the spatialresolution that has been limited by the grid-spacing in the Eule-rian approach can be improved greatly and a particle system basedon smoothed particle hydrodynamics (SPH) can have much betterflexibility and controllability by concentrating on small-scale de-tails, while the large bodies of water and air are handled efficientlyand faithfully by a grid-based solver .

The hybrid approach to multi-phase flows (including bubbles) hasreceived less attention than the simulation of splash because incon-sistency in resolution between the two systems is more serious forbubbles than droplets. Bubbles require the surrounding water to besimulated in more detail because water dominates the inertia due toits much greater density.

To escape from the irony of refining the grid to have the resolutionof particles and to turn this difficulty into the great increase in per-formance without losing the consistency of the two-way coupling,the most compelling choice for computer graphics is to model theinter-phase properties of water and the air captured in it in terms ofthe interactions between bubble particles. To do this, we introducethe SPH vorticity confinement method accompanied by the cohe-sive forces that generate sub-grid turbulence so as to capture thenatural look of bubble motions in a way that is in harmony with anunderlying grid-based simulation of multi-phase flows.

2 Previous Work

The success of grid-based liquid animation techniques that use afree-surface single-phase model (see [Foster and Metaxas 1996],

1

Page 2: Bubbles Alive - KUCGkucg.korea.ac.kr/research/PhysicallyBasedSimulation/... · 2002. 1. 17. · Online Submission ID: 310 Bubbles Alive Figure 1: Water pouring with turbulent multi-phase

Online Submission ID: 310

[Foster and Fedkiw 2001], and [Enright et al. 2002b] for examples),led to the work on the direct numerical simulation of multi-phasephenomena [Hong and Kim 2003; Song et al. 2005; Kim et al. 2005;Kim et al. 2007; Hong and Kim 2005; Mihalef et al. 2006; Losassoet al. 2006].

[Premoze et al. 2003] presented a particle-based fluid simulationmethod that can handle multiple liquids. [Muller et al. 2005] ap-plied the SPH method to multiple phases and [Cleary et al. 2007]modeled the nucleation, collision, and drag interactions of bubblesand foams, based on a background SPH simulation.

[Kim et al. 2006] used the SPH method to model escaped parti-cles, within the particle level-set method [Enright et al. 2002a],to resolve sub-grid splashes. [Losasso et al. 2007] improved thisapproach by coupling a model of dense water volume to diffusesprays. [Greenwood and House 2004] also modeled the escapedparticles to give a more detailed look to bubbles and foams, butwithout SPH. [Thuerey et al. 2007] coupled SPH bubbles to shal-low water simulations using locally defined vortices on them.

3 A Hybrid Approach

We use the Eulerian method to generate the background motions ofwater and air bodies which are large enough to be captured usinga simulation grid which can be managed by a common single-CPUmachine. The bubbling details that are too small to be handled onthe grid are simulated by SPH particles. We built our system on theparticle level-set fluid solver [Enright et al. 2002b] to generate bub-ble particles modeled by incorporating the escaped particles backinto the SPH system as bubbles. Alternatively, we believe that thishybrid framework and our bubble model will integrate well withother grid-based techniques such as the CIP method [Song et al.2005], the BFECC method [Kim et al. 2007], the CLSVOF method[Mihalef et al. 2006], and the Lattice-Boltzmann method [Thuerey2007], if appropriate bubble generating methods are used.

Figure 2: A schematic outline of our hybrid system. Bubble par-ticles are drawn as circles instead of density functions which makeparticles merge together for purposes of presentation.

Figure 2 shows the schematic overview of our hybrid system. Sincewe accelerate our solver by using an octree grid [Losasso et al.2004], the scale difference between the grid-spacing and the par-ticle radius is large. In our experiences, each bubble should occupyat least 33 nodes (or 32 in 2D) to have numerical meaning. Thismeans that it is not feasible to refine the grid, especially in a graph-ics context, and this is one of the main motivations of our SPHbubble method.

3.1 Grid-based Background Simulation

The Navier-Stokes equations describing inviscid incompressiblefluid motion are

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

∇ ·u = 0, (2)where u is the velocity, p is the pressure, ρ is the density, and f isthe external forces, including gravity and the momentum exchangefrom the SPH bubbles for coupling. Since numerical methods ofsolving equations (1) and (2) are well-known, we refer readers to[Enright et al. 2002b; Losasso et al. 2004; Hong and Kim 2005] fordetails.

3.2 SPH Overview

The acceleration of a particle i is determined by a sum of forcesexerted by adjacent particles, fi j, as follows:

ai = ∑j

fi j/ρi, (3)

where the density of a particle i is defined as ρi = ∑miW (xi j,ri).We use the radially symmetric kernel functions W (x,r) with sup-port r as defined in [Muller et al. 2003]. The velocity and posi-tion of a particle can be determined by sequential Euler integrationssuch as vt,i = ai4t and pt,i = vi4t, where 4t is a time step. Weuse the adaptive radius approach of [Adams et al. 2007] becauseit is a versatile description of bubble details, and not primarily forperformance reasons. The pressure force can be expressed as

fpressurei j =−ViV j(Pi +Pj)

(∇W (xi j,ri)+∇W (xi j,r j)

)/2, (4)

where the volume Vi is mi/ρi, r is the radius, the mass mi is propor-tional to r3

i , xi j = x j− xi, and the pressure Pi = kρi with a controlparameter k. In general, SPH systems largely depend on viscosity,especially to improve stability when they are used to simulate largebodies. Since we use a grid-based solver to deal with large bodies,the viscosity forces can be omitted. This is one of the good prop-erties of this hybrid method in addition to the flatness of the watersurfaces after settling down.

3.3 Two-way Coupling

The major coupling forces making bubble particles catch up withbackground flows are the drag and the lift forces [Magnaudet andEames 2000; Cleary et al. 2007], as follows:

fdragi =−kdragr2

i |vi−ui|(vi−ui) (5)

fli f ti =−kli f tVi (vi−ui)×ωi, (6)

where ui and ωi = ∇×ui respectively are the velocity and the vor-ticity interpolated at pi from the grid values. Initially, we tried tosimulate the path instability of bubbles with lift forces, which didn’twork well enough since equation (6) assumes a highly refined vor-ticity field around pi. This was one of the motivations to developthe bubble model of Section 4.

The reacting forces from bubble particles are transferred to the sur-rounding fluids through equation (1) after being distributed equallyacross a number of adjacent nodes. We also used these forces tomodel the popping of bubbles to shake near water surfaces whenthey merge with the ambient air. In many cases, the SPH time-stepneeds to be smaller than the grid simulation time-step. Since thecoupling forces change u, and repeated updating makes its valuediverge, the coupling forces must be stored separately and added tothe right hand side of equation (1) just once at each grid simulationtime-step.

2

Page 3: Bubbles Alive - KUCGkucg.korea.ac.kr/research/PhysicallyBasedSimulation/... · 2002. 1. 17. · Online Submission ID: 310 Bubbles Alive Figure 1: Water pouring with turbulent multi-phase

Online Submission ID: 310

4 Bubbles

4.1 SPH Vorticity Confinement

Unlike droplets going through ambient air, bubble particles are un-der strong velocity diffusion because they are coupled to the sur-rounding fluids by the drag and lift forces. Furthermore, they areinterpolated from the values on a coarse grid. To simulate the mo-tion of bubbles in more detail, we introduce the idea of the vorticityconfinement [Fedkiw et al. 2001] to the SPH method.

First, we measure the vorticity ω = ∇× v at the mass center oftwo SPH particles, p⊕ = (mipi + m jp j)/(mi + m j). In contrast tothe grid-based method of [Fedkiw et al. 2001], the vorticity locationvector η can be expressed as η = p⊕−pi. We can use a normalizedversion of η , N = η

|η | , to determine the confinement force:

fvorticityi j = ε

(N× ω

|ω|

)ρi. (7)

The original vorticity confinement method used in [Fedkiw et al.2001] could exaggerate the existing vorticity over time, thanks tothe incompressibility enforced by the projection step. Taking a sim-ilar approach makes SPH system diverge and we therefore used anormalized ω .

4.2 Cohesive Force

Due to the very large density ratio of water to air, water exerts ahigh pressure on air bubbles, which makes them merge rapidly. Toachieve a physically accurate simulation, multi-phase SPH methodssuch as those of [Hu and Adams 2006] and [Muller et al. 2005] aredesirable. However, because we simulate the water on a coarse gridto improve performance, we have to take care of the multi-phaseinteractions without an explicit supports from water particles or de-tailed velocities around air particles. By assuming that air particlesare surrounded by water except for where air particles are explicitlymodeled, we can handle this multi-phase property by simulatingthe attraction forces between adjacent particles that touch, insteadof the forces exerted by the water particles on the air particles. Fi-nally, we introduce an cohesive attraction force between particles:

fattractioni j = kattractionWattraction(xi j,ri + r j)ρi. (8)

We use a constant valued function for Wattraction to make it easyto establish a force that balances the pressure forces. The pressureforce in equation (4) pushes adjacent particles outward when thedensity ρi becomes high, due to the attraction forces pulling parti-cles together. We note that [Becker and Teschner 2007] introduceda similar force to induce surface tension. The major difference isthe physical reason because the surface tension modeled by the in-trinsic property of SPH is sufficient in this work.

One initial implementation inducing clustering was using the pres-sure kernels of [Becker and Teschner 2007] or [Adams et al. 2007]with a negative term to exert attraction forces on adjacent particleswhen the density is low. This is a reasonable alternative, but we be-lieve that our attraction force is physically more suitable to multi-phase fluids. It also works better with the vorticity confinement ofSection 4.1 since it can suppress particle scattering by centrifugaleffects to the extent required.

4.3 Sub-grid Turbulency

The beauty of bubble motions is mainly a result of their unstablepaths. Even a single bubble rising in calm water moves along a

Figure 3: Rising bubbles in calm water. This example shows therealistic motion of bubbles generated by our bubble model coupledto background flows. Simulation took 3 hours on an octree gridwith an effective resolution of 256×1282 and a maximum of 2,600SPH particles were used.

zigzag or spiral path due to its own wakes (see [Shew and Pin-ton 2006] for an example). Our combination of cohesive attractionforce and SPH vorticity confinement can approximate this charac-teristic motion (see Figure 3) when at least two of particles stay to-gether; but it does not work for single bubbles. The most commonlyaccepted way to overcome this deficiency is to add disturbances tothe particles’ velocities based on random numbers 1. This also helpsto generate an initial vorticity and our system generates natural lookof turbulent bubbles motions with all of these in harmony.

4.4 Buoyancy

The rising velocities of bubbles are determined by the balance be-tween drag and buoyancy, which establishes a terminal upward ve-locity. We generally make the buoyant forces fbuoyancy, proportionalto the volume of each particle. An alternative is to make the buoy-ant force proportional to the difference between the current velocityand a terminal velocity approximately proportional to the particleradius [Mendelson 1967]. This is useful when we want to improvethe upward movements of bubbles.

5 Examples

Both water surfaces and bubbles can be rendered by ray-tracing asingle level-set surface after performing Boolean operations. We setparticle radii between 0.3 and 0.8 of the grid spacing. Simulationswere performed on an Intel Core2 PC.

Figure 3 shows freely rising bubbles in water. In this example,bubble particles are seeded randomly at the bottom and then rise,

1A Strouhal number could be used for more physical turbulence, but didnot make much difference in visuals.

3

Page 4: Bubbles Alive - KUCGkucg.korea.ac.kr/research/PhysicallyBasedSimulation/... · 2002. 1. 17. · Online Submission ID: 310 Bubbles Alive Figure 1: Water pouring with turbulent multi-phase

Online Submission ID: 310

demonstrating the basic capability of our bubble model. The livelyand natural motion of bubbles, including flickering, merging, sepa-ration, and spiral path instability were simulated successfully. Weassume that bubbles pop as soon as they they reach the surface,rather than persisting as foam, which is out of the scope of thispaper, but it can be implemented using the methods already inves-tigated by [Greenwood and House 2004] and [Cleary et al. 2007].Figure 1 shows water being poured, with the atomization of largebodies of air volume being naturally modeled by escaped particles,achieving the natural look of turbulent bubbly water as a coupledmotion of level-set surface and SPH particles in harmony.

6 Conclusion

We have presented a hybrid of Eulerian grid-based simulation andLagrangian SPH for the realistic simulation of multi-phase fluids,focusing on bubbles. Using our novel bubble model in it, we couldgenerate natural-looking computer generated bubbly water that iscomparable to previous techniques.

References

ADAMS, B., PAULY, M., KEISER, R., AND GUIBAS, L. J. 2007.Adaptively sampled particle fluids. vol. 26, 481–487.

BECKER, M., AND TESCHNER, M. 2007. Weakly compress-ible sph for free surface flows. In Proc. of the ACM SIG-GRAPH/Eurographics Symp. on Comput. Anim., 1–8.

CLEARY, P. W., PYO, S. H., PRAKASH, M., AND KOO, B. K.2007. Bubbling and frothing liquids. ACM Trans. Graph. (SIG-GRAPH Proc.) 26, 3, 971–976.

ENRIGHT, D., FEDKIW, R., FERZIGER, J., AND MITCHELL, I.2002. A hybrid particle level set method for improved interfacecapturing. J. Comput. Phys. 183, 83–116.

ENRIGHT, D., MARSCHNER, S., AND FEDKIW, R. 2002. Ani-mation and rendering of complex water surfaces. ACM Trans.Graph. (SIGGRAPH Proc.) 21, 3, 736–744.

FEDKIW, R., STAM, J., AND JENSEN, H. 2001. Visual simulationof smoke. In Proc. of ACM SIGGRAPH 2001, 15–22.

FOSTER, N., AND FEDKIW, R. 2001. Practical animation of liq-uids. In Proc. of ACM SIGGRAPH 2001, 23–30.

FOSTER, N., AND METAXAS, D. 1996. Realistic animation ofliquids. Graph. Models and Image Processing 58, 471–483.

GREENWOOD, S. T., AND HOUSE, D. H. 2004. Better with bub-bles: enhancing the visual realism of simulated fluid. In Proc.of the 2004 ACM SIGGRAPH/Eurographics Symp. on Comput.Anim., 287–296.

HONG, J.-M., AND KIM, C.-H. 2003. Animation of bubbles inliquid. Comput. Graph. Forum (Eurographics Proc.) 22, 3, 253–262.

HONG, J.-M., AND KIM, C.-H. 2005. Discontinuous fluids. ACMTrans. Graph. (SIGGRAPH Proc.) 24, 3, 915–920.

HU, X., AND ADAMS, N. 2006. A multi-phase sph method formacroscopic and mesoscopic flows. J. Comput. Phys. 213, 2,844–861.

KIM, B.-M., LIU, Y., LLAMAS, I., AND ROSSIGNAC, J. 2005.Using BFECC for fluid simulation. In Eurographics Workshopon Natural Phenomena 2005.

KIM, J., CHA, D., CHANG, B., KOO, B., AND IHM, I. 2006.Practical animation of turbulent splashing water. In SCA ’06:Proceedings of the 2006 ACM SIGGRAPH/Eurographics sym-posium on Computer animation, 335–344.

KIM, B., LIU, Y., LLAMAS, I., JIAO, X., AND ROSSIGNAC, J.2007. Simulation of bubbles in foam with the volume controlmethod. ACM Trans. Graph. (SIGGRAPH Proc.) 26, 3, 481–487.

LOSASSO, F., GIBOU, F., AND FEDKIW, R. 2004. Simulating wa-ter and smoke with an octree data structure. ACM Trans. Graph.(SIGGRAPH Proc.) 23, 457–462.

LOSASSO, F., SHINAR, T., SELLE, A., AND FEDKIW, R. 2006.Multiple interacting liquids. ACM Trans. Graph. (SIGGRAPHProc.) 25, 3, 812–819.

LOSASSO, F., TALTON, J., KWATRA, N., AND FEDKIW, R. 2007.Two-way coupled sph and particle level set fluid simulation.IEEE Trans. on Vis. and Comput. Graph. (In Press).

MAGNAUDET, J., AND EAMES, I. 2000. The motion of high-reynolds-number bubbles in inhomogeneous flows. Annu. Rev.Fluid Mech. 32, 659–708.

MENDELSON, H. D. 1967. The prediction of bubble terminalvelocities from wave theory. A.I.Ch.E. Journal 13, 2, 250–253.

MIHALEF, V., UNLUSU, B., METAXAS, D., SUSSMAN, M.,AND HUSSAINI, M. Y. 2006. Physics based boilingsimulation. In SCA ’06: Proceedings of the 2006 ACMSIGGRAPH/Eurographics symposium on Computer animation,317–324.

MULLER, M., CHARYPAR, D., AND GROSS, M. 2003. Particle-based fluid simulation for interactive applications. In Proc. of the2003 ACM SIGGRAPH/Eurographics Symp. on Comput. Anim.,154–159.

MULLER, M., SOLENTHALER, B., KEISER, R., AND GROSS, M.2005. Particle-based fluid-fluid interaction. In Proc. of the 2005ACM SIGGRAPH/Eurographics Symp. on Comput. Anim., 237–244.

PREMOZE, S., TASDIZEN, T., BIGLER, J., LEFOHN, A., ANDWHITAKER, R. 2003. Particle–based simulation of fluids. InComp. Graph. Forum (Eurographics Proc.), vol. 22, 401–410.

SHEW, W. L., AND PINTON, J.-F. 2006. Dynamical model ofbubble path instability. Phys. Rev. Lett. 97, 144508.

SONG, O., SHIN, H., AND KO, H.-S. 2005. Stable but non-dissipative water. ACM Trans. Graph. 24, 1, 81–97.

THUEREY, N., SADLO, F., SCHIRM, S., MULLER-FISCHER, M.,AND GROSS, M. 2007. Real-time simulations of bubbles andfoam within a shallow water framework. In Proc. of the ACMSIGGRAPH/Eurographics Symp. on Comput. Anim., 191–198.

THUEREY, N. 2007. Physically based Animation of Free SurfaceFlows with the Lattice Boltzmann Method. PhD thesis, Univer-sity of Erlangen-Nuremberg.

4