Skip to content

Repository files navigation

flow-gallery

A collection of interactive, GPU-accelerated simulations of capillary and interfacial flow phenomena. Every effect runs in real time in the browser (WebGL2) and ships with a clean NumPy spectral reference solver — the same physics, once for speed and once for clarity.

▶ Gallery: https://dmitrylobuznov.github.io/flow-gallery/

Cahn–Hilliard capillary waves dewetting Rayleigh–Plateau Marangoni cells

Effect Status Demo
Cahn–Hilliard — phase separation / spinodal decomposition ✅ live open ↗
Capillary waves — gravity–capillary surface ripples ✅ live open ↗
Thin-film dewetting — rupture & retraction into droplets ✅ live open ↗
Rayleigh–Plateau — jet break-up into droplets ✅ live open ↗
Marangoni convection — surface-tension-gradient convection cells ✅ live open ↗

Design

Each effect is a self-contained module under its own folder:

flow-gallery/
├── index.html            ← gallery landing page
├── cahn-hilliard/        ← module: WebGL demo + Python reference + GIFs
│   ├── index.html
│   ├── js/main.js        ← GPU solver (fragment shaders, ping-pong FBOs)
│   ├── python/           ← reference solver + GIF generator (uv + Typer)
│   └── assets/
├── capillary-waves/      ← gravity–capillary surface waves
├── dewetting/            ← thin-film rupture into droplets
├── rayleigh-plateau/     ← jet break-up (1D slender-jet)
└── marangoni/            ← convection cells (Swift–Hohenberg)

The browser demo trades a little numerical accuracy for real-time speed (explicit finite differences on the GPU); the Python reference is the source of truth for the physics (semi-implicit Fourier-spectral schemes) and generates the animations. See each module's own README for the maths.

Run locally

python -m http.server 8000   # then open http://localhost:8000

For a module's reference solver, see e.g. cahn-hilliard/.

License

MIT © 2026 Dmitry Lobuznov

About

Interactive, GPU-accelerated simulations of capillary & interfacial flow (WebGL2) with NumPy spectral reference solvers. First module: Cahn–Hilliard phase separation.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages