Installation
AdditiveFOAM 2.0 requires the OpenFOAM Foundation release OpenFOAM 14.
Prerequisites
- OpenFOAM 14 built or installed according to the Foundation instructions.
- Python 3.10 or newer. The projected-source calibration workflow uses the packages pinned in
requirements.txt. - ParaView for visualizing OpenFOAM fields.
- Optional: Zoltan support in OpenFOAM for dynamic load-balanced AMR.
Install from main
Source OpenFOAM first:
source /path/to/OpenFOAM-14/etc/bashrc
echo "$WM_PROJECT $WM_PROJECT_VERSION"
The output must identify OpenFOAM version 14. Then clone AdditiveFOAM and load its environment:
git clone https://github.com/ORNL/AdditiveFOAM.git
cd AdditiveFOAM
source etc/bashrc
etc/bashrc verifies the OpenFOAM version and sets:
ADDITIVEFOAM_PROJECT_DIRADDITIVEFOAM_APPLICATIONSADDITIVEFOAM_TUTORIALSADDITIVEFOAM_ETC$ADDITIVEFOAM_BINonPATH
Build all libraries, the solver, and utilities from the repository root:
./Allwmake
To use the Python calibration and reporting utilities, create or activate a Python environment and install the pinned dependencies:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python -m pip check
The AdditiveFOAM environment adds the scripts to PATH; it does not create or activate the Python environment. Activate the intended Python environment in each new shell before invoking calibrateHeatSource.
Verify the installation
command -v additiveFoam
command -v createScanPath
command -v primesToAdditiveFoam
command -v calibrateHeatSource
echo "$ADDITIVEFOAM_VERSION"
Run additiveFoam -help. Solver startup also prints the AdditiveFOAM version, Git description, and commit SHA recorded at build time.
Shell startup
Source both environments in this order in every new shell:
source /path/to/OpenFOAM-14/etc/bashrc
source /path/to/AdditiveFOAM/etc/bashrc
Add those commands to the appropriate shell startup file only after confirming they work interactively.