Skip to content

Installing the software

techMathGroup edited this page Aug 16, 2024 · 1 revision

To install the openHFDIB-DEM software, you currently need to have OpenFOAMv8 (https://openfoam.org/release/8/) installed on your system. Then, the installation proceeds in three steps:

  1. cloning the openHFDIB-DEM repository
  2. compiling the library
  3. compiling the provided example solvers

cloning the repository

To clone the openHFDIB-DEM repository, navigate to your folder of choice, open terminal, and run the git command:

git clone https://github.com/techMathGroup/openHFDIB-DEM.git

or, if you have github CLI available:

gh repo clone techMathGroup/openHFDIB-DEM

Now, the library source codes are available in the folder "./openHFDIB-DEM"

compiling the library

To compile the library, descend in the "./openHFDIB-DEM" directory via

cd openHFDIB-DEM

and make sure that your OpenFOAMv8 installation is sourced, that is, the command

echo $WM_PROJECT_VERSION

returns "8".

Afterwards, the library is compiled by running the command:

./compileLib.sh

compiling the example solvers

After the library has been installed on your system, the example solvers (HFDIBDEMFoam for pure DEM computations, and pimpleHFDIBFoam for CFD-DEM) can be compiled by running the command:

./compileSol.sh

one-command installation

The library and example solvers can be compiled at once by running the command:

./compileAll.sh

compatibility notes

The library itself uses mostly low-level OpenFOAM functions. Consequently, it may be compiled under OpenFOAMv8 and OpenFOAMv9. In OpenFOAMv10, there was a change in naming the include files/code syntax for mesh handling. The example solvers stem directly from the standard OpenFOAM solvers and as such are prone to changes in the version syntax. As a result, these can be compiled only with OpenFOAMv8 as in later versions, quite a lot of renaming basic physical models (e.g. fvOptions -> fvModels) was done.