Posted on | November 28, 2009 | 21 Comments
Installing OpenFOAM® on openSUSE 11.2 is very easy, and can be done using, at least in part, the system tools, to take advantage of the new compiler. The steps of the procedure are the following:
- Use YaST to install
- the C/C++ development pattern in YaST
- libqt4-devel (required to build paraview)
- Create a directory called OpenFOAM in your home directory
- mkdir ~/OpenFOAM
- Enter the OpenFOAM directory
- cd ~/OpenFOAM
- Download the OpenFOAM sources from the GIT repository
- git clone git://repo.or.cz/OpenFOAM-1.6.x.git
- Download the third party packages from the OpenCFD website
- Extract the third party packages corresponding to your architecture in the ~/OpenFOAM directory
- Rename the ThirdParty-1.6 into ThirdParty-1.6.x
- Remove the following directories from the ThirdParty directory containing
- Edit ~/OpenFOAM/OpenFOAM-1.6.x/etc/settings.sh to set
- Open your ~/.bashrc file in a text editor and add the line:
- . $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc
and source your ~/.bashrc file with the command (thanks to friesenjunge )
- source ~/.bashrc
- Enter the ThirdParty-1.6.x directory
- cd ~/OpenFOAM/ThirdParty-1.6.x
- Rebuild Paraview with the following commands (you need qt4 development libraries installed in your system. Check the README file coming with OpenFOAM for a list of working versions)
- rm -rf paraview-3.6.1/platforms
- Enter the ~/OpenFOAM/OpenFOAM-1.6.x directory
- cd ~/OpenFOAM/OpenFOAM-1.6.x
- Rebuild OpenFOAM typing
This will rebuild the whole OpenFOAM and paraview, and provide you a fully working installation. However, the paraFoam reader might have some problem to properly show results in paraview. I could not solve them, however there is an alternative reader available on the OpenFOAM unofficial wiki, that can be compiled as follows. Note that the installation procedure assumes you have OpenFOAM 1.6.x installed and properly configured as explained above, and that paraview has been compiled successfully on your system.
- Download the code from here.
- Extract the archive in a directory of your choice. It is not important where, since the reader will be installed in your OpenFOAM tree. I will assume you extracted it in ~/vtkPOpenFOAMReader-r173-20090920
- Create a directory where to build the reader. For convenience I will call it ~/vtkReader.
- Open a terminal and enter that directory
- cd vtkReader.
- Type the command:
- ccmake ~/vtkPOpenFOAMReader-r173-20090920
- You will see a screen generated from cmake. Simply press “c” to configure.
- Another screen will appear with the following variables defined on the basis of your OpenFOAM installation
- Accept the proposal by pressing “g” to generate the configuration file and exit.
- In the same terminal execute the commands
- make install
- Copy the file pvFoam in ~/vtkPOpenFOAMReader-r173-20090920/BSD/ into your ~/OpenFOAM/OpenFOAM-1.6.x/bin directory, to be able to run Paraview with pvFoam, exactly as done with paraFoam.
- Refer to ~/vtkPOpenFOAMReader-r173-20090920/readerPanel.pdf for details on the reader interface.
This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks.