Introduction to Fluid Simulation

Presentation slides can be found here.

Below are some captured movies from a smoke simulation I developed. Ideally, the movies would show the cursor, but the important features about each clip can still be understood. Density is injected into the simulation with a mouse click, and velocity is manipulated by clicking and dragging the cursor through the domain.

Complete simulation


Building blocks


Density is injected into the scene, but the lack of velocity advection means it cannot go anywhere.



With the inclusion of velocity advection, the injected density can now move about.



Here, the velocity is also diffused to simulate viscosity. Note how the imparted velocities affect a greater area.



Diffusing the density gives the appearance that the smoke is dissipating. This shows the result of applying diffusion to a value other than velocity.



Adding a body force, buoyancy, to simulate hot air rising above cold air. Gravity would also affect smoke, although constantly downwards, which wouldn't be as interesting.



Leaving out the incompressibility condition means that the volume of the fluid is free to change. This requires a more sophisticated simulation solution and simply looks incorrect here.