Update 2017: PixelFlow

This library is not supported or developed any longer.
For Processing 3 or higher, please use PixelFlow (https://github.com/diwi/PixelFlow) instead.


A library by Thomas Diewald for the Processing programming environment.
Last update, 12/09/2011.

  • this library is made for simulating fluids in realtime
  • the simulation can be done in two ways:

  1. on the CPU
  2. on the GPU
    which is about 10 to 20 times faster than on the CPU the simulation happens on several shaders, that are loaded internally by the processing library GLGraphics.jar by andres colubri (GLGraphics, or here codeanticode) so you need to install GLGraphics.jar too, if you want to instantiate the GPU fluid.

online example:
(it shows the CPU simulation, ... GPU-simulation doesnt work within an applet)

video on vimeo (composed by andres colubri)

-------------------------------------------------------------------------------- ZIP_CONTENT:
  1. processing examples
  2. reference
  3. source-code
  4. library: diewald_fluid.jar

  • fluid-solver for 2d-simulation (maybe 3d will follow)
  • GPU / CPU solver
  • interaction with obstacles


Download diewald_fluid version 00.30 (1) in .zip format.


Unzip and put the extracted diewald_fluid folder into the libraries folder of your Processing sketches. Reference and examples are included in the diewald_fluid folder.

Keywords. fluid, solver, stam, realtime, CPU, GPU, physics

Reference. Have a look at the javadoc reference here. A copy of the reference is included in the .zip as well.

Source. The source code of diewald_fluid is available at github, and its repository can be browsed here.


Find a list of examples in the current distribution of diewald_fluid, or have a look at them by following the links below.


Platform osx,windows
Processing 1.5.1, 2.04
Dependencies GLGraphics