Reimplements the algorithm explained by Matthias Müller in C, using SDL3 to render it.
- PIC-FLIP interpolation
- particle and velocity visualisation
- drift compensation based on density calculation
- particle separation using a hash grid
- all on CPU
cmake -H . -B build
cmake --build buildRun the program with command ./ffs or potentially ./ffs.exe on Windows.
| key | behaviour |
|---|---|
[p] |
show particles |
[v] |
show velocity field |
[spacebar] |
pause/resume |
- SDL3
- package may be listed with
-develsuffix
- package may be listed with
- C23 compliant compiler
- CMake
- ChatGPT spotted a weight calculation error (which really should've been obvious)
- Ten Minute Physics
