This paper presents a very simple implementation of a fluid solver. Our solver is consistent with the equations of fluid flow and produces velocity fields that contain incompressible rotational structures and that dynamically react to user-supplied forces. The solver is specialized for a fluid which wraps around in space. This allows us to take advantage of the Fourier transform which greatly simplifies many aspects of the solver. Indeed, given a Fast Fourier Transform, our solver can be implemented in roughly one page of readable C code. We believe that our solver is a good starting point for anyone interested in coding a basic fluid solver. The fluid solver presented is also useful as a basic motion primitive that can be used for many different applications in computer graphics.
Jos Stam. (2001).
A Simple Fluid Solver based on the FFT
Journal of Graphics Tools.
November 2001, 6(2).
pp. 43-52.
All Text and Imagery Copyright © 2012 Autodesk, Inc. All Rights Reserved.