[WORK IN PROGRESS]
This project serves as part of my BSc thesis in Computer Science. It is a CFD (Computational Fluid Dynamics) solver for the 2D incompressible Navier-Stokes equations. The solver is based on the SIMPLE algorithm for pressure-velocity coupling, solved in an orthogonal cartesian colocated grid. The simulation library is written in C++, while the visualizations are written in Python.
- Clone the repository
- Select an example to run
- Open
VelociFlow-main/CMakeLists.txt - Change the name of the
.cppfile in theadd_executableline to the.cppfile you want to run
- Open
- Compile
cd VelociFlow-mainmkdir buildcd buildcmake ..make
- Run
./Simulation- Wait for the simulation to finish (or press
qto stop it earlier)
- Visualize
cd VelociFlow-main/Visualizationpython -m venv venvvenv/bin/pip install -r requirements.txt- Create a
settings.jsonfile (look atsettings-steady.jsonandsettings-steady.jsonexamples) - Open
visualize.py - Change the name of the
.jsonfile in thesettings_filevariable to the name of yoursettings.jsonfile venv/bin/python3 visualize.py
Equations being discretized and solved using the Finite Volume Method (FVM) in 2D:
- Incompressible Navier Stokes
- Convection - Diffusion
- Single Convection - Diffusion
- Diffusion
|
Lid-driven cavity
|
Kelvin-Helmholtz
|
|
Pipe
|
Backward-facing step
|
|
Pipe with obstacles
|
Von Karman
|
- 2D Simulations (both steady and unsteady)
- Incompressible Navier Stokes (using the SIMPLE algorithm)
- Convection - Diffusion
- Single Convection - Diffusion
- Diffusion
- Boundary conditions
- Velocity inlet
- Fixed pressure
- No-slip wall
- Slip wall
- Moving wall
- Periodic
- Free
- Grid types
- Orthogonal cartesian colocated
- Diffusion schemes
- Central differencing
- Convection schemes
- Upwind
- Central differencing
- QUICK Hayase
- Time schemes
- Implicit Euler
- Dye injection (for tracing the flow)
- Ability for early stopping and restarting of the Incompressible Navier-Stokes simulations (by pressing
q) - Residual types
- Unscaled
- Scaled
- Normalized
- Residual norm types
$\large L^1$ $\large L^2$ $\large L^\infty$
- Stopping rules (based on tolerance)
- Absolute
- Relative
- Create single images for steady simulations
- Create video animations for unsteady simulations
- Selecting a field to plot
- Velocity Magnitude
- Velocity X
- Velocity Y
- Pressure
- Dye
- Phi
- Vorticity
- Streamlines
- Quivers
- Setting min and max values
- Selecting a color map
- Select a specific frame of an unsteady simulation
- Ability to blur and smooth out the result
- Produce real time animations based on
$\Delta t$ - Set the frames per second (FPS) of an animation
- Include streamlines (only on velocity magnitude)
- Include quivers (only on velocity magnitude)
- Set density of streamlines and quivers
- Set color of streamlines and quivers
- Option to only show the graphics without the grid
- Code documentation
- Features usage documentation
- Parallelizing code execution (CPU or GPU)
- Simulate real dye color mixing
- Time dependent boundary conditions
- SIMPLE algorithm variations (SIMPLER, SIMPLEC, etc.)
- Multiphase flow
- Convergence monitors






