Compiling OpenFOAM on more popular Linux distros has become a trivial task due to the abundance of the references and guides published on the internet. However, for the first time that I tried compiling OpenFOAM on CentOS Stream, I realized that there is a lack of A-to-Z guide for more recent RHEL-based linux distros. This first post here is to fill the gap.
The main steps for the compilation are exactly the same as those published in the official OpenFOAM page: Compiling OpenFOAM from Source Code
However, the first step (installing Software for Compilation) is different here. Unfortunately, the old guide on the OpenFOAM page (Upgrading RHEL 6 Packages for OpenFOAM) would neither be useful for more recent RHEL-based OSs. The following steps are tested on CentOS Stream 9.
Installing the main tools
yum install openmpi openmpi-devel
yum install CGAL-devel
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib/:$LD_LIBRARY_PATH
Installing QT tools for compiling ParaView
yum install qt5-qtbase-devel
Adding a link to qmake-qt5 (to be able to call it just as qmake)
yum install qt5-qtwebkit-devel
yum install qt5-qttools-devel
yum install qt5-qtsvg-devel
yum install qt5-qtxmlpatterns-devel
Setting the OpenFOAM Environment
Compiling thirdparty applications
ThirdParty-dev directory run the commands./makeParaView
wmRefresh
Compiling OpenFOAM
OpenFOAM-dev directory run the commandFinalizing the installation
icoFoam
paraFoam
No comments:
Post a Comment