A Fast Simulation Method Using Overlapping Grids for Interactions between Smoke and Rigid Objects Yoshinori Dobashi (Hokkaido University) Tsuyoshi Yamamoto (Hokkaido University) Tomoyuki Nishita (The University of Tokyo) Yasuhiro Matsuda (The University of Tokyo)
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University Introduction Visual Simulation of Natural Phenomena - Use of computational fluid dynamics (CFD) - Fluids (smoke, fire, water, etc.) Two types of approaches particle based grid based
Hokkaido University Introduction Grid-based approach - Simple and easy to implement - Significant acceleration by GPU terrain
Hokkaido University Introduction - Simple and easy to implement - Significant acceleration by GPU - Inaccurate object boundary with low res. grid terrain Grid-based approach
Hokkaido University Introduction - Simple and easy to implement - Significant acceleration by GPU - Increase in computational cost with high res. grid terrain - Inaccurate object boundary with low res. grid Grid-based approach
Hokkaido University Introduction Adaptive grid - Accurate object boundary - Increase efficiency - Requiring restructuring of grid/mesh terrain - Unsuitable for GPU acceleration
Hokkaido University Introduction Our approach: multiple overlapping grids - High res. grid for accurate object boundary - No restructuring of grid - Simple and easy to implement - Suitable for GPU acceleration terrain
Hokkaido University Introduction terrain local grid global grid
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University Related Work Motion of a Hot, Turbulent Gas [Foster97] - Motion of smoke due to thermal buoyancy - Use of finite difference method - Motion of smoke due to thermal buoyancy - Use of finite difference method [Stam99] Stable Fluids - Fast and stable computation - Use of semi-Lagrange method - Fast and stable computation - Use of semi-Lagrange method Extended methods of stable fluids [Fedkiw01] [Enright02] [Nguyen02] [Feldman03] [Carlson04]
Hokkaido University Related Work - Motion of smoke due to thermal buoyancy - Use of finite difference method - Motion of smoke due to thermal buoyancy - Use of finite difference method [Stam99] Stable Fluids - Fast and stable computation - Use of semi-Lagrange method - Fast and stable computation - Use of semi-Lagrange method Extended methods of stable fluids [Fedkiw01] [Enright02] [Nguyen02] [Feldman03] [Carlson04] Use of single grid - Increase in computational cost according to number of grid points - Inaccurate object boundary Motion of a Hot, Turbulent Gas [Foster97]
Hokkaido University Related Work - Use of octree data structure - Combination of tetrahedral mesh and regular grid Adaptive grid/mesh - Use of tetrahedral mesh [Feldman05] [Feldman06] [Losasso04] [Feldman05] [Feldman06]
Hokkaido University Related Work - Use of octree data structure - Combination of tetrahedral mesh and regular grid Adaptive grid/mesh [Feldman05] [Feldman06] [Losasso04] - Unsuitable for GPU acceleration - Restructuring of grid/mesh - Efficient computation - Accurate object boundary - Use of tetrahedral mesh [Losasso04] [Feldman05] [Feldman06]
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University Basic Idea of Our Method Use of multiple overlapping grids global grid viewpoint object B local grids object A
Hokkaido University Basic Idea of Our Method Use of multiple overlapping grids translate/ rotate No remeshing object A object B object A global grid viewpoint local grids
Hokkaido University Basic Idea of Our Method Use of multiple overlapping grids object B object A local grids global grid viewpoint resolution is inversely proportional to dist. from viewpoint object A
Hokkaido University Basic Idea of Our Method Use of multiple overlapping grids object A Use of stable fluid solver [Stam99] for each grid objectB data transfer global grid viewpoint
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University Governing Equations Navier-Stokes Equations (NS equations) u : velocity p : pressure : density : kinematic viscosity f : external force
Hokkaido University Governing Equations object direction of movement Navier-Stokes Equations (NS equations) inertial force u : velocity p : pressure : density : kinematic viscosity f : external force
Hokkaido University Governing Equations Numerical solution to NS equations (step1)
Hokkaido University Governing Equations Numerical solution to NS equation Gauss-Seidel method (step1) (step2)
Hokkaido University Simulation Using Overlapping Grids yes no converged ? start end boundary transfer of velocity boundary transfer of pressure inner transfer of velocity inner transfer of pressure computation of velocity computation of pressure (step1)(step2)
Hokkaido University (step1)(step2) Simulation Using Overlapping Grids yes no converged ? start end computation of velocity computation of pressure boundary transfer of velocity boundary transfer of pressure inner transfer of velocity inner transfer of pressure
Hokkaido University boundary region Data transfer between Grids Case of single local grid local grid global grid inner region
Hokkaido University Data transfer between Grids Boundary transfer local grid global grid (global to local) boundary region copy values
Hokkaido University Data transfer between Grids Inner transfer local grid global grid (local to global) copy values inner region
Hokkaido University Data transfer between Grids Case of multiple local grids object copy virtual grid (highest res.) virtual grid (highest res.) transfer
Hokkaido University Data transfer between Grids Case of multiple local grids object copy virtual grid (highest res.) virtual grid (highest res.) transfer Large memory requirement for virtual grid
Hokkaido University Data transfer between Grids Case of multiple local grids object transfer Prioritization by the grid resolutions Priorities used for the order of the transfer Prioritization by the grid resolutions Priorities used for the order of the transfer
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University Resolution Determination viewpoint Increasing efficiency by LOD object low res. grid far object high res. grid near
Hokkaido University Resolution Determination viewpoint Increasing efficiency by LOD object low res. grid far object high res. grid near object grids with different resolutions simple flow
Hokkaido University object low res. grid Resolution Determination viewpoint Increasing efficiency by LOD object low res. grid far near object grids with different resolutions simple flow
Hokkaido University Resolution Determination Re = ULUL U : mean flow speed L : characteristic length : kinematic viscosity characteristic length (longer edge) characteristic length (longer edge) (mean speed) Use of Reynolds number as a measure of complexity of flow wind object Large ReTurbulent flow (complex flow)
Hokkaido University Resolution Determination Mean flow speed / Characteristic length direction of movement object mean flow speed = speed of object mean flow speed = speed of object characteristic length
Hokkaido University Re d h Resolution Determination Condition for resolution determination distance from viewpoint grid interval grid interval ∝ distance from viewpoint grid interval ∝ 1/(Reynolds number) threshold Reynolds number
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University GPU Acceleration Use of previous method for NS solver Render-to-texture for data transfer grid g high grid g low 3D texture [Crane07]
Hokkaido University GPU Acceleration Boundary transfer - generate rectangles for boundary regions grid g high grid g low 3D texture rectangles
Hokkaido University GPU Acceleration Boundary transfer - generate rectangles for boundary regions grid g high grid g low texture mapping 3D texture rectangles
Hokkaido University GPU Acceleration Boundary transfer - generate rectangles for boundary regions grid g high grid g low texture mapping 3D texture - render rectangles into 3D texture of g high rectangles
Hokkaido University GPU Acceleration Inner transfer - generate rectangles for inner regions grid g high grid g low texture mapping 3D texture - render rectangles into 3D texture of g low rectangles Realizing fast data transfers just by drawing rectangles
Hokkaido University Overview Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion Introduction Related Work Basic Idea of Our Method Overlapping Grids for Fluid Simulation Resolution Determination GPU Acceleration Results Conclusion
Hokkaido University Experimental Results 2D simulation on CPU global only (150x300) global only (300x600) overlapping (100x x300)
Hokkaido University Experimental Results 2D simulation on CPU 0.5s0.18s0.07s global only (150x300) global only (300x600) overlapping (100x x300) computation times/time-step 2.8 times faster computation (CPU : Pentium4 3.8 GHz)
Hokkaido University Experimental Results referenceour method Experiment using 3D simulation on CPU
Hokkaido University Practical Examples Real-time 2D simulation on GPU - global grid: local grid: (for each letter) - computation time: 28 fps on GeForce8800 ultra
Hokkaido University Practical Examples Real-time 3D simulation on GPU - global grid: 41x59x25 - local grid: (for a fighter) - computation time: 10 fps on GeForce8800 ultra (0.14 fps on CPU) (71 times faster !)
Hokkaido University Practical Examples Dynamic smoke from fighter planes fighter missile
Hokkaido University Conclusion Efficient simulation using overlapping grids - Single global grid + multiple local grids around moving objects - Rotating/translating local grids move according to motion of objects - Adaptive resolution determination of local grids - Significant speedup achieved by GPU
Hokkaido University Future Work Handling of Destruction of objects Other phenomena related to fluids Handing of Deformable objects - Creation/deletion of grids on the fly - Deformation of grids - Water, fire, clouds, and so on
Hokkaido University global only (150x300) global only (300x600) overlapping (100x x300) Experimental Results 2D simulation on CPU
Hokkaido University global only (150x300) global only (300x600) overlapping (100x x300) Experimental Results 2D simulation on CPU global grid local grid same resolution global grid
Hokkaido University Experimental Results 2D simulation on CPU global only (150x300) global only (300x600) overlapping (100x x300)
Hokkaido University Experimental Results Experiment using 3D simulation on CPU global grid local grid fall rotation 0.5m (41x38x60) 1.0m (27x25x40) 2.0m (20x19x30)
Hokkaido University global grid interval 0.5m local grid interval 0.5m global grid interval 1.0m local grid selected from three levels Experimental Results
Hokkaido University Experimental Results referenceour method Experiment using 3D simulation on CPU
Hokkaido University (CPU : Pentium4 3.8 GHz) 4.6s0.56s fixed high res. grid computation times/time-step 8 times faster computation Experimental Results Experiment using 3D simulation on CPU adaptive grid res.
Hokkaido University Practical Examples Dynamic smoke from fighter planes local grid (fighters) (25x30x16,17x20x10,12x15x8) local grid (fighters) (25x30x16,17x20x10,12x15x8) local grid (missile) (11x24x11) local grid (missile) (11x24x11) global grid (105x64x33) global grid (105x64x33) local grid (viewpoint) (54x41x76) local grid (viewpoint) (54x41x76) viewpoint computation time : 10s/time-step (Pentium4 3.6 GHz)
Hokkaido University Practical Examples
Hokkaido University Resolution Determination object grids with different resolutions distance flow viewpoint Increasing efficiency by LOD