-
Notifications
You must be signed in to change notification settings - Fork 5
OpenFOAM installation
Piet Jarmatz edited this page Oct 16, 2024
·
4 revisions
- Download Source Code from https://dl.openfoam.com/source/v2206/OpenFOAM-v2206.tgz. Alternatively, for current version do
git clone https://github.com/OpenFOAM/OpenFOAM-dev.git(see instructions here). - Also download
wget https://dl.openfoam.com/source/v2206/ThirdParty-v2206.tgz(orgit clone https://github.com/OpenFOAM/ThirdParty-dev.git) - Unzip OpenFOAM-v2206.tgz eg
$ gunzip OpenFOAM-v2206.tgzortar xzf OpenFOAM-v2206.tgz - Create a folder for the build environment, e.g. in
$HOMEdo$ mkdir openfoamand copy source code files into the new directory - Use
tar xzf ThirdParty-v2206.tgzto unpack and put files to~/openfoam/OpenFOAM-v2206/ThirdParty - Source the build environment, e.g.
$ source ~/openfoam/OpenFOAM-v2206/etc/bashrc. You might want to add this to your personal~/.bashrc. - Check for system compatibility
$ foamSystemCheck - Move into the OpenFOAM-v2206 folder and do
$ foam - Start compilation process
$ ./Allwmake -s -l(-sreduces output,-lrecords output into a log file) * This Process may take upwards of 4 hours to complete. You may chose to stop the compilation process and continue later with$ ./Allwmake. For faster compilation (parallel), use e.g../Allwmake -s -l -q -j 8.
- To check the installation move into the build folder and again source the build OpenFOAM environment like before
- let OpenFOAM run installation tests by
$ foamInstallationTestand then$ foamTestTutorial -full incompressible/simpleFoam/pitzDaily
- create build folder in MaMiCo directory
$ mkdir build$and move into it$ cd build $ cmake ..$ ccmake .- Move to the
BUILD_WITH_OPENFOAM OFFoption with thearrow keysand change it toONvia theenterkey, then configure and generate viacg - If error
The OpenFOAM bashrc is not sourced or OpenFOAM is not installedis thrown, do$ source ~/openfoam/OpenFOAM-v2206/etc/bashrcagain, the configuration files should now generate