This is an interactive 2D fluid simulator built from scratch, implementing the incompressible Navier-Stokes equations on a MAC (staggered) grid.

Interact with the simulation directly — add forces and watch the fluid respond in real time.

The solver splits each time step into three phases:

  • Advection — moves the velocity field forward in time
  • External forces — applies user-defined forces
  • Projection — corrects the field to satisfy incompressibility

Built with a custom C++ engine, compiled to WebAssembly via Emscripten.

This is an early version — the UI is still in development. More features (wind tunnel, obstacle placement, visualization modes) are coming.

For a full explanation of the math and implementation, check out my blog post: Simulation that tries to mimic the physical fluid behaviour | Raffaele Villani

Published 2 days ago
StatusPrototype
CategoryOther
PlatformsHTML5
Authorvlnraf

Leave a comment

Log in with itch.io to leave a comment.