# Fluid Dynamics Library

FDL is an open source fluid dynamics simulation tool written in C++ that numerically solves the Navier-Stokes partial differential equation for incompressible flow. The library was designed using Robert Bridson's Fluid Simulation for Computer Graphics book as a guide. The simulation is performed on a finite-difference grid with a semi-lagrangian advecetion scheme. It uses a preconditioned conjugate gradient linear solver (with a modified incomplete Cholesky preconditioner).

The program is able to simulate large domains of fluid by only storing 4 vectors that can efficiently represent the entire matrix. Though the project relies upon the uBLAS library for some linear algebra data structures, the PCG algorithm was written specifically for this sparse matrix storage method.

FDL uses boost for multi-threading, CLI processing, and BLAS. Cmake is used for the build process. Real-time output is achieved by making use of the visualization library project.

FDL includes some basic scripts that provide integration with external tools for rendering the output. Three different rendering methods are displayed below. All of these made use of FFMPEG for compositing a video. You can read more about the project by visiting the website: www.fluidlib.org

OpenGL render buffer output

PBRT rendering

PNG output