We present a novel wavelet method for the simulation of fluids at high spatial resolution. The algorithm enables large- and small-scale detail to be edited separately, allowing high-resolution detail to be added as a post-processing step. Instead of solving the Navier-Stokes equations over a highly refined mesh, we use the wavelet decomposition of a low-resolution simulation to determine the location and energy characteristics of missing high-frequency components. We then synthesize these missing components using a novel incompressible turbulence function, and provide a method to maintain the temporal coherence of the resulting structures. There is no linear system to solve, so the method parallelizes trivially and requires only a few auxiliary arrays. The method guarantees that the new frequencies will not interfere with existing frequencies, allowing animators to set up a low resolution simulation quickly and later add details without changing the overall fluid motion.
This code is a reference implementation of our paper Wavelet Turbulence for Fluid Simulation. The code is intended as a pedagogical example, so clarity has been given preference over performance. Optimizations that inhibit readability have been removed, so the running times experienced will be longer than those reported in the paper.
Home Page: http://www.cs.cornell.edu/~tedkim/WTURB
Project Page: http://www.cs.cornell.edu/~tedkim/WTURB/source.html
Platform: Linux, Windows, OS X
License: GNU Public License
Sponsor: Cornell University