Installing foam-extend-3.1 on Slackware Linux

From Akionux-wiki
Share/Save/Bookmark
Jump to: navigation, search

About

This is my report of installing OpenFOAM foam-extend-3.1 on Slackware Linux 14.1.

Test environment

Slackware Linux 14.1

Steps

I referred OpenFOAMWiki[1], please check it for more detail.

Before installing, be sure to load etc/bashrc(or etc/cshrc) of foam-extend, not of other OpenFOAM projects(e.g. OpenFOAM-2.3.x). Loading etc/bashrc of other projects seems problematic because of overlapping environment variables.

For the coexistence of multiple projects, Put following lines to ~/.bashrc(or etc/.cshrc):

alias of23='export FOAM_INST_DIR=~/OpenFOAM;source $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc'
alias fe31='export FOAM_INST_DIR=~/foam;source $HOME/foam/foam-extend-3.1/etc/bashrc'

which allows to choose which project is used.

Make foam under your home directory and download the source code:

cd ~
mkdir foam
cd foam
git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 foam-extend-3.1

Load bashrc(or etc/cshrc):

cd ~/foam/foam-extend-3.1
source etc/bashrc 

Set the path of qmake to QT_BIN_DIR:

export QT_BIN_DIR=/usr/bin
echo "export QT_BIN_DIR=/usr/bin" >> etc/prefs.sh

Compile:

./Allwmake.firstInstall | tee log.Allwmake.firstInstall

Make run directory:

mkdir -p $FOAM_RUN

run command is aliased to changing dir to run directory.

run

tut is also aliased to changing dir to the tutorial directory:

tut

Trouble Shooting

paraFoam not working

I faced following errors when I run paraFoam:

% paraFoam
created temporary 'cavity.OpenFOAM'
ERROR: In /home/akio/OpenFOAM/foam-extend-3.1/ThirdParty/rpmBuild/BUILD/ParaView-v4.0.1-source/VTK/GUISupport/Qt/vtkEventQtSlotConnect.cxx, line 68
vtkEventQtSlotConnect (0x134e6e0): Cannot connect NULL objects.

ERROR: In /home/akio/OpenFOAM/foam-extend-3.1/ThirdParty/rpmBuild/BUILD/ParaView-v4.0.1-source/VTK/GUISupport/Qt/vtkEventQtSlotConnect.cxx, line 68
vtkEventQtSlotConnect (0x134e6e0): Cannot connect NULL objects.

/home/akio/OpenFOAM/foam-extend-3.1/bin/paraFoam: 122 行: 19765 Segmentation fault      (コアダンプ) paraview --data="$caseFile"

Those errors were caused by environment variables of OpenFOAM-2.3.x.

References

  1. Installation/Linux/foam-extend-3.1 - OpenFOAMWiki http://openfoamwiki.net/index.php/Installation/Linux/foam-extend-3.1