Skip to content

the2nake/flip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flip

Reimplements the algorithm explained by Matthias Müller in C, using SDL3 to render it.

preview image of fluid simulation

[features]

  • PIC-FLIP interpolation
  • particle and velocity visualisation
  • drift compensation based on density calculation
  • particle separation using a hash grid
  • all on CPU

[building]

cmake -H . -B build
cmake --build build

[usage]

Run the program with command ./ffs or potentially ./ffs.exe on Windows.

key behaviour
[p] show particles
[v] show velocity field
[spacebar] pause/resume

[dependencies]

  • SDL3
    • package may be listed with -devel suffix
  • C23 compliant compiler
  • CMake

[credits]

  • ChatGPT spotted a weight calculation error (which really should've been obvious)
  • Ten Minute Physics

About

implementation of fluid implicit particle method in c

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published