1 Installation of OpenFOAM-1.6-ext on Ubuntu 12.10 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
21 OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
22 Python-dev: sudo apt-get install python-dev
24 # You can also install everything at once:
25 sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \
26 openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \
27 libgl1-mesa-dev libglu1-mesa-dev python-dev
29 --------------------------------------------------------------------------------
31 # If you need to compile swak4Foam, it is a good idea to install Mercurial (hg)
32 # and Subversion (svn)
33 # sudo apt-get install mercurial
34 # sudo apt-get install subversion
36 --------------------------------------------------------------------------------
38 # Minor correction for make/gmake
39 sudo ln -s /usr/bin/make /usr/bin/gmake
41 --------------------------------------------------------------------------------
43 # Download OpenFOAM-1.6-ext
46 git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext
48 --------------------------------------------------------------------------------
50 # Create the file etc/prefs.sh
51 cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
53 --------------------------------------------------------------------------------
55 # Use the system compiler
56 sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
58 --------------------------------------------------------------------------------
60 # Use the version of OpenMPI supplied with the ThirdParty packages
61 # The version of OpenMPI supplied by Ubuntu 12.10 is 1.4.5, which is outdated
62 # So nothing to do here.
64 --------------------------------------------------------------------------------
68 # Ubuntu 12.10 comes with QT4 version 4.8.3
69 # Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of
70 # warnings on the console at runtime. So we will be using the version of QT4 supplied with the
71 # ThirdParty packages.
73 #Uncomment the variable QT_THIRD_PARTY in the file prefs.sh
75 sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
77 # This section of the prefs.sh file should now look like this:
79 export QT_THIRD_PARTY=1
81 #export QT_BIN_DIR=$QT_DIR/bin
83 --------------------------------------------------------------------------------
87 # After a lot of trials, I just cannot find a way to make the OpenFOAM-1.6-ext reader
88 # work under Ubuntu 12 and ParaView-3.x.
90 # So use the command 'paraFoam -nativeReader' instead in order to start ParaView with the
91 # OpenFOAM built-in native reader.
93 --------------------------------------------------------------------------------
95 # Source your OpenFOAM environment to get the basic configuration for
97 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
99 --------------------------------------------------------------------------------
101 # Compile the ThirdParty packages
102 cd $WM_PROJECT_DIR/ThirdParty
103 ./AllMake.stage1 >& log.AllMake.stage1
104 ./AllMake.stage2 >& log.AllMake.stage2
105 ./AllMake.stage3 >& log.AllMake.stage3
106 ./AllMake.stage4 >& log.AllMake.stage4
108 --------------------------------------------------------------------------------
110 # Update your OpenFOAM environment to get the basic configuration from the newly
111 # compiled ThirdParty packages
112 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
114 # Compile OpenFOAM-1.6-ext
116 ./Allwmake >& log.Allwmake &
117 tail -f log.Allwmake # To keep an eye on the compilation process
119 --------------------------------------------------------------------------------
121 # Run a tutorial to check the basic functionality
122 cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
123 blockMesh >& log.blockMesh
124 simpleFoam >& log.simpleFoam
125 paraFoam -nativeReader
129 --------------------------------------------------------------------------------