Installation
Prerequisites
- OpenFOAM v2406 or later (openfoam.com version)
- GCC compiler
- Python 3.x (for batch processing tools)
OpenFOAM Environment Setup
RfbFoam requires an active OpenFOAM environment. You must set up the OpenFOAM environment before compiling the solver or running simulations.
Method 1: User Profile Setup (Recommended)
Add the following line to your ~/.bashrc file:
source /usr/lib/openfoam/openfoam2406/etc/bashrc
Then reload your shell:
source ~/.bashrc
Method 2: Module System (HPC/Cluster Environments)
module load OpenFOAM/v2406-foss-2023a
Method 3: Manual Activation (Per Session)
source /usr/lib/openfoam/openfoam2406/etc/bashrc
Method 4: Alias Setup
Add to your ~/.bashrc:
alias of2406='source /usr/lib/openfoam/openfoam2406/etc/bashrc'
Then use of2406 before working with OpenFOAM.
tip
The exact path may vary depending on your OpenFOAM installation. Common locations include:
/usr/lib/openfoam/openfoam2406/etc/bashrc(system installation)/opt/openfoam2406/etc/bashrc~/OpenFOAM/OpenFOAM-v2406/etc/bashrc(user installation)
Verify OpenFOAM Environment
echo $WM_PROJECT_VERSION
This should return your OpenFOAM version (e.g., v2406).
Compiling RfbFoam
-
Clone the repository:
git clone <repository-url>
cd RfbFoam -
Compile the solver:
cd src/
wmakeOr alternatively using the build script in the repository root:
./Allwmake -
Verify installation:
RfbFoam -help