Skip to content

SalehMohammadrezaei/Funoos

Repository files navigation

🏮 Funoos

An interactive playground for the classic methods of fluid simulation.

Funoos (فانوس — "lantern") is a small desktop app I made in my spare time to make computational fluid dynamics easier to see. Pick a scene, nudge a few sliders, hit run, and watch what happens — vortices peeling off a cylinder, a candle flame flickering, a dam breaking, Turing patterns forming. Six families of solver sit behind one click-through gallery, so you can get a feel for how each behaves without installing or configuring anything.

It's meant for curiosity and learning, not production CFD — the solvers are compact 2-D implementations, each sanity-checked against a standard textbook case so the picture is believable. If CFD is new to you, it's a way to play with it; if you already know it, it's a quick visual reference.

Flow shedding vortices off the word Funoos

The signature scene: type your name and watch the flow braid vortices off the letters (lattice Boltzmann).


The methods & scenes

Method Scenes
Lattice–Boltzmann (D2Q9, BGK) Kármán vortex street · airfoil · flow around your name · F1-car aero · cyclist · drafting pair · flow through porous rock (measures permeability)
Incompressible Navier–Stokes (projection) rising smoke · Rayleigh–Taylor fingers · candle flame · Rayleigh–Bénard convection · chimney plume in a crosswind
Compressible Euler (finite-volume HLLC) open-air blast · shockwave hits a city (towers crumble) · shock–bubble · twin-bubble
Smoothed-Particle Hydrodynamics dam break · droplet crown · sloshing · pouring · ocean swell · floating ship (rigid-body FSI)
Pseudo-spectral (FFT) Kelvin–Helmholtz billows · decaying 2-D turbulence · chaotic dye mixing
Reaction–Diffusion (Gray–Scott) Turing patterns: spots · stripes · labyrinth · mitosis

Gallery — all 29 scenes

Lattice–Boltzmann


Kármán Vortex Street

Airfoil at Angle

Flow Around Your Name

F1 Car Aerodynamics

Cyclist in the Wind

Drafting (Two Riders)

Flow Through Porous Rock

Incompressible Navier–Stokes


Rising Smoke Plume

Rayleigh–Taylor Fingers

Candle Flame

Rayleigh–Bénard Convection

Chimney Plume in Wind

Compressible Euler


Open-Air Blast

Shockwave Hits a City

Shock Meets a Bubble

Twin-Bubble Mixing

Smoothed-Particle Hydrodynamics


Dam Break

Droplet Crown

Sloshing Tank

Pouring a Glass

Ocean Swell

Floating Ship

Pseudo-spectral


Kelvin–Helmholtz Billows

Decaying Turbulence

Chaotic Mixing of Dye

Reaction–Diffusion


Spots

Stripes & Coral

Labyrinth

Mitosis

Is the physics believable?

Each method is checked against a standard analytical or textbook case — not a formal verification-and-validation effort, just enough to trust what you're watching:

Scene Method Benchmark Result
Vortex street LBM D2Q9 Strouhal number (Re ≈ 160) St ≈ 0.20 ✓ (live in the player)
Sod shock tube Compressible HLLC exact Riemann solution mean abs error ≈ 0.002
Kelvin–Helmholtz Pseudo-spectral inviscid energy conservation drift < 10⁻⁸ (to round-off)
Porous flow Pore-scale LBM Darcy / Kozeny–Carman k = ν⟨u⟩/g, monotonic in porosity ✓
Turing patterns Gray–Scott Pearson's regimes reproduces spots/stripes/maze/mitosis ✓
Dam break SPH dry-bed front vs 2√(gH) front in the physical (Ritter) range ✓

These run in tests/smoke_test.py (CI): spectral energy, Sod shock, reaction-diffusion bounds, and porous-permeability monotonicity all assert automatically.


Funoos — the app

A dark glassmorphic desktop app (HTML/CSS/JS in a pywebview shell, with the Python/C++ solvers as the backend):

  • Home — the brand, the methods, who built it.
  • Gallery — a card grid of all 29 scenes; each card opens a detail page with the clip, the governing equation, an undergrad-level write-up, the setup (initial & boundary conditions), and validation.
  • Studio — a bento dashboard: tune every parameter (each scene shows only its relevant controls), Run once (with a live progress %), switch visualizations live (vorticity / speed / streamlines / schlieren / …), recolor across palettes, scrub/step/speed the playback, read live KPI tiles (e.g. permeability, porosity), and open the Diagnostic plots (Strouhal, lift/drag, drafting shelter, convective flux, blast radius, permeability vs Kozeny–Carman — each with an explanation).

Install & run

Easiest — Windows installer (no Python, no compiler needed by the user). On a Windows machine with g++ (MSYS2/w64devkit) and Python, run build_windows.bat to produce a standalone dist\Funoos\Funoos.exe, then compile installer.iss in Inno Setup to get a single Funoos-Setup.exe. Hand that file to anyone — they double-click, install, and launch from the Start menu. (Needs the WebView2 runtime, preinstalled on Windows 10/11.)

"Windows protected your PC" / unknown-publisher warning. Funoos is a free, open-source app and the installer is not code-signed (a signing certificate is a paid, identity-verified service), so Windows SmartScreen — and occasionally antivirus — will warn the first time you run it. This is expected for unsigned indie software, not a sign of malware. To install anyway: click More info → Run anyway on the SmartScreen dialog. If your antivirus quarantines it, allow/ restore the file. You can verify you have the genuine file by checking its SHA-256 against the value listed on the Releases page, or skip the installer entirely and run from source (below).

From source — one step (Linux). Needs Python 3 and g++ with OpenMP:

git clone https://github.com/SalehMohammadrezaei/Funoos.git
cd Funoos
./install.sh      # builds the C++ solvers + sets up a local .venv with all deps
./run.sh          # launch the app

From source (any OS, manual).

make -C solvers/lbm && make -C solvers/incompressible && make -C solvers/compressible && make -C solvers/sph
pip install -r requirements.txt
python funoos_app.py        # or run.bat on Windows

The gallery clips ship in results/gallery/; regenerate any time with python render_gallery.py High 1.8.

Command-line demos

Each grid/particle exhibit also has a standalone script that writes a GIF + MP4:

python demos/flow_around_name.py --text "YourName"     # the signature scene
python demos/vortex_street.py   # ... and smoke_plume, rayleigh_taylor, explosion,
python demos/shock_tube.py      #     shock_bubble, dam_break, turbulence (--quick for fast)

Stack

C++ + OpenMP for the four grid/particle solver cores (fast enough on a CPU to run the high resolution that makes the output beautiful) · Python (NumPy/SciPy/Pillow/Matplotlib + ffmpeg via imageio-ffmpeg) for the spectral and reaction–diffusion solvers, the engine, geometry, text→mask, validation, post-processing diagnostics, and a shared cinematic rendering pipeline · HTML/CSS/JS UI in pywebview.

Repository layout

funoos_app.py     pywebview app (backend bridge to the solvers)
index.html, web/  the dark glassmorphic UI (CSS + JS, no external libraries)
solvers/          C++ solver cores: lbm/ incompressible/ compressible/ sph/
flowzoo/          engine · catalog · spectral · reaction · geometry · postproc · render · validate
demos/            one runnable script per grid/particle exhibit
results/gallery/  the gallery clips (GIF + full-res MP4), one per scene
docs/             method notes, equation images, Windows build guide
tests/            smoke + validation suite
studio.py         legacy CustomTkinter desktop app (superseded by funoos_app.py)

License

MIT — see LICENSE. Built by Saleh Mohammadrezaei · salehmrezaee@gmail.com

About

Funoos — interactive CFD showcase: six numerical methods written from scratch (LBM, Navier-Stokes, Euler, SPH, spectral, reaction-diffusion), 29 validated scenes.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors