A fluid simulation based on Jos Stam’s implementation of the Navier Stoke equation. The simulation is written in C++, OpenGL. The solution was first derived and then verified using MATLAB before the implementation in C++/OpenGL. Two version of the program exist, one for the 2d simulation and one for the 3d. The 3d version of the simulation only visualize the velocity field of the fluid. In both of these version the user is able to add external forces to the fluid by clicking on the mouse. The original plan was to compute the simulation using CUDA, but due to time issues we never got far enough with the implementation in CUDA.