This is one of my attempts at fluid simulation in C++. It simulates an incompressible inviscid fluid using an eulerian representation. It uses a GLFW window and rendering graphics via OpenGL.
Esc closes the window. 1 sets the scenario to "tank". 2 sets it to "wind tunnel" (default). 3 sets it to "paint".
p toggles whether the fluid will be colored according to its pressure (default true on wind tunnel). s toggles whether smoke will be rendered (default true). Smoke is used to occlude parts of the world for certain scenarios in order to show advection. T toggles whether the fluid will be colored according to its temperatue (default false). = (So you don't have to press shift + if you don't have a numpad) and - both change the number of incompressability iterations by 10 in their respective directions. Space pauses and unpauses the simulation.
You need MINGW to run on windows, this has not been tested on linux. In a mingw shell run the make file with mingw32-make with this codebase being the current directory. Then enter ./output.exe to run