NOTICE: This is a work in progress, subject to change.
GPU-accelerated particle tracking for OpenFOAM. You can use this repository without compilation. Jump to Running with Docker for more details, or follow the instructions below for a native installation.
This repository is built upon the following repositories:
Kudos to the authors!
- NVIDIA CUDA Toolkit 10.1
- OptiX 7.0
- OpenFOAM v2106
Check the NVIDIA CUDA Installation Guide for Linux for installing the NVIDIA CUDA Toolkit 10.1. Note that the maximum supported GCC version is 8.
Download OptiX 7.0 for Linux. You must be a member of the NVIDIA Developer Program to download OptiX.
The following command will install OptiX in a local folder:
./NVIDIA-OptiX-SDK-7.0.0-linux64.sh --include-subdir --skip-license
Only OpenFOAM v2106 is currently supported. Compile and install OpenFOAM v2106 environment before continuing.
Set the environment variables in etc/bashrc
pointing to your installation paths, for example:
export RTX=false
export OptiX_INSTALL_DIR=${HOME}/cudaParticlesFoam/NVIDIA-OptiX-SDK-7.0.0-linux64
export CUDA_HOME=/usr/local/cuda-10.1
If your graphics card has ray tracing cores set RTX=true
for additional hardware acceleration [1].
Set the environment for this repository with:
source etc/bashrc
Load OpenFOAM's environment:
source ${HOME}/OpenFOAM/OpenFOAM-v2106/etc/bashrc
Run the following commnad for building the cudaParticleAdvection
library:
make lib
And finally, build the OpenFOAM solvers:
make applications
If you change the variables on etc/bashrc
do a make clean
and repeat the process before building lib
and applications
again.
Go to one of the tutorials:
cd tutorials/incompressible/cudaParticlesUncoupledFoam/pitzDaily
Finally, run the tutorial with:
./Allrun
You need to first configure your machine for using GPUs within Docker containers. Follow this link for instructions.
Set up the environment with:
source etc/bashrc
Go to one of the tutorials:
cd tutorials/incompressible/cudaParticlesUncoupledFoam/pitzDaily
Finally, run the tutorial with:
runWithDocker ./Allrun
You will see the results and logs. Running containers can be checked with docker ps
. Containers can be killed with docker kill CONTAINER_ID
.
- [1] Wang, Bin, et al. "An GPU-accelerated particle tracking method for Eulerian–Lagrangian simulations using hardware ray tracing cores." Computer Physics Communications 271 (2022): 108221.
The whole project is licensed under the GNU General Public License v3.0 except the code inside the third_party
directory which is licensed under Apache Licence 2.0.
OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.