Fast Fluid Simulations with Sparse Volumes on the GPU
Abstract
We introduce efficient, large scale fluid simulation on GPU hardware using the fluid-implicit particle (FLIP) method over a sparse hierarchy of grids represented in NVIDIA® GVDB Voxels. Our approach handles tens of millions of particles within a virtually unbounded simulation domain. We describe novel techniques for parallel sparse grid hierarchy construction and fast incremental updates on the GPU for moving particles. In addition, our FLIP technique introduces sparse, work efficient parallel data gathering from particle to voxel, and a matrix-free GPU-based conjugate gradient solver optimized for sparse grids. Our results show that our method can achieve up to an order of magnitude faster simulations on the GPU as compared to FLIP simulations running on the CPU.
References
- Azevedo V. C., Batty C., Oliveira M. M.: Preserving geometry and topology for fluid flows with thin obstacles and narrow gaps. ACM Trans. Graph. 35, 4 (July 2016), 971–97:12. 2
- Aanjaneya M., Gao M., Liu H., Batty C., Sifakis E.: Power diagrams and sparse paged grids for high resolution adaptive liquids. ACM Trans. Graph. 36, 4 (July 2017), 1401–140:12. 2
- Ando R., Thürey N., Wojtan C.: Highly adaptive liquid simulations on tetrahedral meshes. ACM Trans. Graph. 32, 4 (July 2013), 1031–103:10. 2
- Ando R., Thürey N., Wojtan C.: A dimension-reduced pressure solver for liquid simulations. Comput. Graph. Forum 34, 2 (May 2015), 473–480. 2
- Batty C., Bridson R.: Accurate viscous free surfaces for buckling, coiling, and rotating liquids. In Proceedings of SCA (2008), SCA ‘08, Eurographics Association, pp. 219–228. 2
- Boyd L., Bridson R.: Multiflip for energetic two-phase fluid simulation. ACM Trans. Graph. 31, 2 (Apr. 2012), 161–16:12. 2
- Bailey D., Biddle H., Avramoussis N., Warner M.: Distributing liquids using openvdb. In ACM SIGGRAPH 2015 Talks (New York, NY, USA, 2015), SIGGRAPH ‘15, ACM, pp. 441–44:1. 2
- Batty C., Bertails F., Bridson R.: A fast variational framework for accurate solid-fluid coupling. ACM Trans. Graph. 26, 3 (July 2007). 2
- Brackbill J. U., Ruppel H. M.: Flip: A method for adaptively zoned, particle-in-cell calculations of fluid flows in two dimensions. J. Comput. Phys. 65, 2 (Aug. 1986), 314–343. 2
- Chen Z., Kim B., Ito D., Wang H.: Wetbrush: GPU-based 3d painting simulation at the bristle level. ACM Trans. Graph. 34, 6 (Oct. 2015), 2001–200:11. 2
- Chentanez N., Müller M.: A multigrid fluid pressure solver handling separating solid boundary conditions. In Proceedings of SCA (2011), SCA ‘11, ACM, pp. 83–90. 2
- Chentanez N., Müller M.: Real-time eulerian water simulation using a restricted tall cell grid. ACM Trans. Graph. 30, 4 (July 2011), 821–82:10. 2
- Chentanez N., Müller M.: Mass-conserving eulerian liquid simulation. In Proceedings of SCA (2012), SCA ‘12, Eurographics Association, pp. 245–254. 2
- Chu J., Zafar N. B., Yang X.: A schur complement preconditioner for scalable parallel fluid simulation. ACM Trans. Graph. 36, 5 (July 2017), 1631–163:11. 2
- Daviet G., Bertails-Descoubes F.: A semi-implicit material point method for the continuum simulation of granular materials. ACM Trans. Graph. 35, 4 (July 2016), 1021–102:13. 2
- Edwards E., Bridson R.: Detailed water with coarse grids: Combining surface meshes and adaptive discontinuous galerkin. ACM Trans. Graph. 33, 4 (July 2014), 1361–136:9. 2
- Ferstl F., Ando R., Wojtan C., Westermann R., Thuerey N.: Narrow band FLIP for liquid simulations. Computer Graphics Forum (Proc. Eurographics) 35, 2 (2016), 225–232. 2, 10
- Gerszewski D., Bargteil A. W.: Physics-based animation of large-scale splashing liquids. ACM Trans. Graph. 32, 6 (Nov. 2013), 1851–185:6. 2
- Gibou F., Fedkiw R. P., Cheng L.-T., Kang M.: A second-order-accurate symmetric discretization of the poisson equation on irregular domains. J. Comput. Phys. 176, 1 (Feb. 2002), 205–227. 10
- Golas A., Narain R., Sewall J., Krajcevski P., Dubey P., Lin M.: Large-scale fluid simulation using velocity-vorticity domain decomposition. ACM Trans. Graph. 31, 6 (Nov. 2012), 1481–148:9. 2
- Harlow F. H.: The particle-in-cell computing methods for fluid dynamics. Methods in Computational Physics 3 (1964), 319–343. 2
- Harris M.: Fast fluid dynamics simulation on the GPU. In ACM SIGGRAPH 2005 Courses (New York, NY, USA, 2005), SIGGRAPH ‘05, ACM. 2
- Harris M.: Optimizing parallel reduction in cuda. Presentation Packaged with CUDA Toolkit (2007). 4
- Horvath C., Geiger W.: Directable, high-resolution simulation of fire on the GPU. ACM Trans. Graph. 28, 3 (July 2009), 411–41:8. 2
- Hoetzlein R. K.: GVDB: Raytracing sparse voxel database structures on the GPU. In Proceedings of High Performance Graphics (2016), HPG ‘16, Eurographics Association, pp. 109–117. 1, 2, 5
- Harris M., Sengupta S., Owens J. D.: Parallel Prefix Sum (Scan) with CUDA. In GPU Gems 3, H. Nguyen, (Ed.). Addison Wesley, August 2007, ch. 39, pp. 851–876. 4
- Jiang C., Gast T., Teran J.: Anisotropic elastoplasticity for cloth, knit and hair frictional contact. ACM Trans. Graph. 36, 4 (July 2017), 1521–152:14. 2
- Jiang C., Schroeder C., Selle A., Teran J., Stomakhin A.: The affine particle-in-cell method. ACM Trans. Graph. 34, 4 (July 2015), 511–51:10. 2
- Klår G., Budsberg J., Titus M., Jones S., Museth K.: Production ready mpm simulations. In ACM SIGGRAPH 2017 Talks (New York, NY, USA, 2017), SIGGRAPH ‘17, ACM, pp. 421–42:2. 5
- Kim J., Cha D., Chang B., Koo B., Ihm I.: Practical animation of turbulent splashing water. In Proceedings of SCA (2006), SCA ‘06, Eurographics Association, pp. 335–344. 2
- Klár G., Gast T., Pradhana A., Fu C., Schroeder C., Jiang C., Teran J.: Drucker-prager elastoplasticity for sand animation. ACM Trans. Graph. 35, 4 (July 2016), 1031–103:12. 2
- Kim B., Liu Y., Llamas I., Rossignac J.: Advections with significantly reduced dissipation and diffusion. IEEE Transactions on Visualization and Computer Graphics 13, 1 (Jan. 2007), 135–144. 2
- Lentine M., Cong M., Patkar S., Fedkiw R.: Simulating free surface flow with very large time steps. In Proceedings of SCA (2012), SCA ‘12, Eurographics Association, pp. 107–116. 2
- Liu H., Mitchell N., Aanjaneya M., Sifakis E.: A scalable schur-complement fluids solver for heterogeneous compute platforms. ACM Trans. Graph. 35, 6 (Nov. 2016), 2011–201:12. 2
- Lentine M., Zheng W., Fedkiw R.: A novel algorithm for incompressible flow using only a coarse grid projection. ACM Trans. Graph. 29, 4 (July 2010), 1141–114:9. 2
- Mullen P., Crane K., Pavlov D., Tong Y., Desbrun M.: Energy-preserving integrators for fluid animation. ACM Trans. Graph. 28, 3 (July 2009), 381–38:8. 2
- Molemaker J., Cohen J. M., Patel S., Noh J.: Low viscosity flow simulations for animation. In Proceedings of SCA (2008), SCA ‘08, Eurographics Association, pp. 9–18. 2
- Müller E., Guo X., Scheichl R., Shi S.: Matrix-free gpu implementation of a preconditioned conjugate gradient solver for anisotropic elliptic pdes. Comput. Vis. Sci. 16, 2 (Apr. 2013), 41–58. 6
10.1007/s00791-014-0223-x Google Scholar
- McAdams A., Sifakis E., Teran J.: A parallel multigrid poisson solver for fluids simulation on large grids. In Proceedings of SCA (2010), SCA ‘10, Eurographics Association, pp. 65–74. 2, 10
- McAdams A., Selle A., Ward K., Sifakis E., Teran J.: Detail preserving continuum simulation of straight hair. ACM Trans. Graph. 28, 3 (July 2009), 621–62:6. 2
- Museth K.: VDB: High-resolution sparse volumes with dynamic topology. ACM Trans. Graph. 32, 3 (July 2013), 271–27:22. 1, 2
- Narain R., Golas A., Lin M. C.: Free-flowing granular materials with two-way solid coupling. ACM Trans. Graph. 29, 6 (Dec. 2010), 1731–173:10. 2
- Narain R., Sewall J., Carlson M., Lin M. C.: Fast animation of turbulence using energy transport and procedural synthesis. ACM Trans. Graph. 27, 5 (Dec. 2008), 1661–166:8. 2
- Pfaff T., Thuerey N., Cohen J., Tariq S., Gross M.: Scalable fluid simulation using anisotropic turbulence particles. ACM Trans. Graph. 29, 6 (Dec. 2010), 1741–174:8. 2
- Ram D., Gast T. F., Jiang C., Schroeder C., Stomakhin A., Teran J., Kavehpour P.: A material point method for viscoelastic fluids, foams and sponges. In Symposium on Computer Animation (2015), ACM, pp. 157–163. 2
- Setaluri R., Aanjaneya M., Bauer S., Sifakis E.: Spgrid: A sparse paged grid structure applied to adaptive smoke simulation. ACM Trans. Graph. 33, 6 (Nov. 2014), 2051–205:12. 2
- Song O.-y., Kim D., Ko H.-S.: Derivative particles for simulating detailed movements of fluids. IEEE Transactions on Visualization and Computer Graphics 13, 4 (July 2007), 711–719. 2
- Stomakhin A., Schroeder C., Chai L., Teran J., Selle A.: A material point method for snow simulation. ACM Trans. Graph. 32, 4 (July 2013), 1021–102:10. 2
- Wicke M., Stanton M., Treuille A.: Modular bases for fluid dynamics. ACM Trans. Graph. 28, 3 (July 2009), 391–39:8. 2
- Yue Y., Smith B., Batty C., Zheng C., Grinspun E.: Continuum foam: A material point method for shear-dependent flows. ACM Trans. Graph. 34, 5 (Nov. 2015), 1601–160:20. 2
- Zhu Y., Bridson R.: Animating sand as a fluid. ACM Trans. Graph. 24, 3 (July 2005), 965–972. 1, 2
- Zhang X., Bridson R., Greif C.: Restoring the missing vorticity in advection-projection fluid solvers. ACM Trans. Graph. 34, 4 (July 2015), 521–52:8. 2
- Zhu B., Lu W., Cong M., Kim B., Fedkiw R.: A new grid structure for domain extension. ACM Trans. Graph. 32, 4 (July 2013), 631–63:12. 2