Kanishk Sachdev

Software Engineer and Student

2D Fluid Simulation

An interactive real-time fluid dynamics simulation using the Navier-Stokes equations. Drag your mouse to add colored dye and create beautiful fluid flows. Based on Jos Stam's stable fluids algorithm.

Controls

Controls fluid thickness (lower = more watery, higher = more viscous)

Controls how quickly dye spreads through the fluid

Higher values increase accuracy but reduce performance

Size of the dye brush when painting

How much force is applied when dragging

Visualize fluid motion direction and speed

About the Simulation

This simulation solves the Navier-Stokes equations for incompressible fluid flow in real-time. The algorithm consists of three main steps:

  • Diffusion: Fluids naturally spread out over time
  • Advection: Velocity carries density through space
  • Projection: Ensures the fluid remains incompressible

Try different combinations of viscosity and diffusion to create unique flow patterns!

Feel free to contact me at kanishksachdev@gmail.com