1 Installation of OpenFOAM-1.6-ext on Ubuntu 12.04 64-bit
3 - Proceed with the installation of the OS
4 - Update your OS installation using "Update Manager".
5 - If asked to reboot your system, please do so.
7 --------------------------------------------------------------------------------
9 # Installation of additional system packages:
10 git: sudo apt-get install git
11 flex: sudo apt-get install flex
12 bison: sudo apt-get install bison
13 rpm: sudo apt-get install rpm
14 g++: sudo apt-get install g++
15 libz: sudo apt-get install zlib1g-dev
16 binutils-dev : sudo apt-get install binutils-dev
17 openmpi: sudo apt-get install openmpi-bin libopenmpi-dev
18 libxext: sudo apt-get install libxext-dev
19 libxt : sudo apt-get install libxt-dev
20 libXrender: sudo apt-get install libxrender-dev
22 # You can also install everything at once:
23 sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \
24 openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev
26 --------------------------------------------------------------------------------
28 # If you need to compile swak4Foam, it is a good idea to install Mercurial (hg)
29 # sudo apt-get install mercurial
31 --------------------------------------------------------------------------------
33 # Minor correction for make/gmake
34 sudo ln -s /usr/bin/make /usr/bin/gmake
36 --------------------------------------------------------------------------------
38 # Download OpenFOAM-1.6-ext
41 git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
43 --------------------------------------------------------------------------------
45 # Create the file etc/prefs.sh
46 cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
48 --------------------------------------------------------------------------------
50 # Use the system compiler
51 sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
53 --------------------------------------------------------------------------------
55 # Use the system installation of OpenMPI
56 sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
57 sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
58 sed -i s/"#export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/"export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
60 --------------------------------------------------------------------------------
64 # Ubuntu 12.04 comes with QT4 version 4.8.1
65 # Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of
66 # warnings on the console at runtime. So we will be using the version of QT4 supplied with the
67 # ThirdParty packages.
69 #Uncomment the variable QT_THIRD_PARTY in the file prefs.sh
71 sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
73 # This section of the prefs.sh file should now look like this:
75 export QT_THIRD_PARTY=1
77 #export QT_BIN_DIR=$QT_DIR/bin
79 --------------------------------------------------------------------------------
81 # Source your OpenFOAM environment to get the basic configuration for
83 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
85 --------------------------------------------------------------------------------
87 # Compile the ThirdParty packages
88 cd $WM_PROJECT_DIR/ThirdParty
89 ./AllMake.stage1 >& log.AllMake.stage1
90 #./AllMake.stage2 >& log.AllMake.stage2 # No need for this one
91 ./AllMake.stage3 >& log.AllMake.stage3
92 ./AllMake.stage4 >& log.AllMake.stage4
94 --------------------------------------------------------------------------------
96 # Update your OpenFOAM environment to get the basic configuration from the newly
97 # compiled ThirdParty packages
98 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
100 # Compile OpenFOAM-1.6-ext
102 ./Allwmake >& log.Allwmake &
103 tail -f log.Allwmake # To keep an eye on the compilation process
105 --------------------------------------------------------------------------------
107 # Run a tutorial to check the basic functionality
108 cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
109 blockMesh >& log.blockMesh
110 simpleFoam >& log.simpleFoam
115 --------------------------------------------------------------------------------