We present an efficient method for visual simulations of shock phenomena in compressible, inviscid fluids. Our algorithm is derived from one class of the finite volume method especially designed for capturing shock propagation, but offers improved efficiency through physically-based simplification and adaptation for graphical rendering. Our technique is well suited for parallel implementation on multicore architectures and is also capable of handling complex, bidirectional object-shock interactions stably and robustly. We describe its applications to various visual effects, including explosion, sonic booms and turbulent flows.
We have constructed a number of scenarios that demonstrate the ability of our method to simulate visually interesting phenomena; details of these scene is given in the table below. These timings were collected on a single core of a laptop with a 2 Ghz Intel Core 2 Duo processor; each simulation used less than 500 MB of RAM.
For the purpose of demonstrating that our algorithm is amenable to parallelization on shared-memory architectures, we have used OpenMP to execute two essential computational kernels in separate work threads; the results are shown at right. Due to dimensional splitting, our Riemann solves are completely independent for each row in a computational sweeping plane along the simulation grid, as illustrated in; the update pass can be similarly parallelized. We have performed benchmarks of our parallel implementation of simulations with increasing grid size on an Intel Xeon machine with sixteen cores, each running at 3GHz. The performance of our algorithm, here measured in simulation frames per second, scales well with the number of threads.
Scene | Resolution | Sim. fps | Avg. timestep | Total sim. time | |
---|---|---|---|---|---|
Blast chamber An explosion in a confined space |
120 x 80 x 120 | 1.56 | 1.4e-4 s | 16.25 min | |
Rigid bodies A shock knocks over objects and reflects back |
60 x 60 x 100 | 0.779 | 2.5e-4 s | 29.93 min | |
Tower (with cap) A capped tower of 600 bricks is blown apart from within |
60 x 80 x 60 | 1.14 | 7.2e-4 s | 30.21 min | |
Tower (without cap) An uncapped tower of 600 bricks is blown apart from within |
60 x 100 x 60 | 0.939 | 6.8e-4 s | 51.74 min | |
Trinity The initial moments of the first atomic test |
200 x 75 x 200 | 0.102 | 2.9e-5 s | 32.88 min | |
Mushroom cloud A distinctive clouds resulting from a large explosion |
120 x 100 x 120 | 0.243 | 2.4e-2 s | 57.74 min | |
House A structure of 408 bricks is blown apart by a shock |
100 x 100 x 100 | 0.310 | 4.6e-5 s | 58.35 min | |
Projectile A bullet-like object crosses the sound barrier, leaving a turbulent wake |
250 x 100 x 100 | 0.191 | 1.0e-5 s | 191.5 min |