Author Topic: Fluid volume simulation (DX11/DirectCompute)  (Read 8511 times)

0 Members and 1 Guest are viewing this topic.


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4822
Fluid volume simulation (DX11/DirectCompute)
« on: December 28, 2009, 02:19:57 PM »
Here another volume simulator, this time simulating an incompressible fluid solving the Navier- Stokes differential equations. The simulation runs in a 200x200x200 voxel box

The calculations make use of a well known scheme of velocity advection,  Jaccobi pressure solving and making the velocity divergence free by subtracting the gradient of the pressure.

This is the so called  Semi-Lagrangian scheme. A more accurate solver makes use of the second order MacCormack technique. The simulation makes use of the latter. However it makes the simulation unstable and introduces artifacts. Limiting generated extremes can fix this, unfortunately I was not able to get this working, so the simulation runs without limiters, still the result is some visual interesting turbulent behavior.

The amplitude of the speed vectors are visualized. To make a 3d rendering, a simple ray maximum projection is used. This shoots rays through the volume searching the maximum speed along the ray. With a linear interpolation the speed is given some color.