3 #+TITLE: *OpenFOAM README for version 1.5*
4 #+AUTHOR: Hrvoje Jasak.
6 #+LINK: http://www.wikki.co.uk
10 OpenFOAM is free software; you can redistribute it and/or modify it under the
11 terms of the GNU General Public License as published by the Free Software
12 Foundation; either version 2 of the License, or (at your option) any later
13 version. See the file COPYING in this directory, for a description of the GNU
14 General Public License terms under which you can copy the files.
17 OpenFOAM is developed and tested on Linux, but should work with other Unix
18 style systems. To check your system setup, execute the foamSystemCheck script
19 in the bin/ directory of the OpenFOAM installation. If no problems are
20 reported, proceed to "3. Installation"; otherwise contact your system
23 If the user wishes to run OpenFOAM in 32/64-bit mode they should consult the
24 section "Running OpenFOAM in 32-bit mode".
26 *** Qt (from http://trolltech.com/products/qt)
27 The ParaView 3.3 visualisation package requires that Qt version 4.3.x MUST
28 be installed on the system. Earlier or more recent versions (4.2.x or
29 4.4.x) will NOT work. To check whether Qt4 is installed, and the version,
33 The ParaView binary executables in the ThirdParty distribution will only
34 work with PRECISELY the same version of Qt with which it was compiled. The
35 64-bit version of ParaView was compiled with Qt-4.3.1 (with openSuSE-10.3)
36 and the 32-bit version of ParaView was compiled with Qt-4.3.2 (with
37 ubuntu-7.10). If the user finds that a ParaView binary fails to run, then
38 it is almost certainly due to a conflict in compiled and installed Qt
39 versions and they will need to consult the section below on "Compiling
40 ParaView and the PV3FoamReader module."
42 The default versions of Qt used by some GNU/Linux releases are as follows.
43 + ubuntu-7.10: Version 4.3.2
44 + ubuntu-8.04: Version 4.3.4
45 + openSuSE-10.2: Version 4.2.1 - too old
46 + openSuSE-10.3: Version 4.3.1
47 + openSuSE-11.0: Version 4.4.0 - too new
49 For openSuSE 10.2, 10.3 and 11.0, Qt version 4.3.5 can be downloaded from:
50 http://download.opensuse.org/repositories/KDE:/Qt43
52 Compilation and running of ParaView has been successful using the libraries
53 downloaded in the "libqt4-dev" package on ubuntu.
56 Download and unpack the files in the $HOME/OpenFOAM directory as described in:
57 http://www.OpenFOAM.org/download.html
59 The environment variable settings are contained in files in an etc/ directory
60 in the OpenFOAM release. e.g. in
62 + $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/
63 + where <VERSION> corresponds to the version 1.4, 1.5, ...
65 1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the
66 etc/bashrc file by adding the following line to the end of your
69 + . $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/bashrc
71 Then update the environment variables by sourcing the $HOME/.bashrc file by
72 typing in the terminal:
76 2) OR, if running tcsh or csh, source the etc/cshrc file by adding the
77 following line to the end of your $HOME/.cshrc file:
79 + source $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/cshrc
81 Then update the environment variables by sourcing the $HOME/.cshrc file by
82 typing in the terminal:
86 *** Installation in alternative locations
87 OpenFOAM may also be installed in alternative locations. However, the
88 installation directory should be network available (e.g., NFS) if parallel
89 calculations are planned.
91 The environment variable 'FOAM_INST_DIR' can be used to find and source the
92 appropriate resource file. Here is a bash/ksh/sh example:
94 + export FOAM_INST_DIR=/data/app/OpenFOAM
95 + foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
96 + [ -f $foamDotFile ] && . $foamDotFile
98 and a csh/tcsh example:
100 + setenv FOAM_INST_DIR /data/app/OpenFOAM
101 + foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
102 + if ( -f $foamDotFile ) source $foamDotFile
104 The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts
105 of the OpenFOAM installation.
107 * Building from Sources (Optional)
108 If you cannot find an appropriate binary pack for your platform, you can build
109 the complete OpenFOAM from the source-pack. You will first need to compile or
110 obtain a recent version of gcc (we recomend gcc-4.3.?) for your platform,
111 which may be obtained from http://gcc.gnu.org/.
113 Install the compiler in
114 $WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/
115 and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and
116 $WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the
117 environment variables as in section 3.
119 Now go to the top-level source directory $WM_PROJECT_DIR and execute the
120 top-level build script './Allwmake'. In principle this will build everything,
121 but if problems occur with the build order it may be necessary to update the
122 environment variables and re-execute 'Allwmake'. If you experience
123 difficulties with building the source-pack, or your platform is not currently
124 supported, please contact <enquiries@wikki.co.uk> to negotiate a support
125 contract and we will do the port and maintain it for future releases.
127 * Testing the installation
128 To check your installation setup, execute the 'foamInstallationTest' script
129 (in the bin/ directory of the OpenFOAM installation). If no problems are
130 reported, proceed to getting started with OpenFOAM; otherwise, go back and
131 check you have installed the software correctly and/or contact your system
135 Create a project directory within the $HOME/OpenFOAM directory named
136 <USER>-<VERSION> (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5)
137 and create a directory named 'run' within it, e.g. by typing:
139 + mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
141 Copy the 'tutorial' examples directory in the OpenFOAM distribution to the
142 'run' directory. If the OpenFOAM environment variables are set correctly,
143 then the following command will be correct:
145 + cp -r $WM_PROJECT_DIR/tutorials
146 $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
148 Run the first example case of incompressible laminar flow in a cavity:
150 + cd $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run/tutorials/icoFoam/cavity
155 * Compiling Paraview 3.3 and the PV3FoamReader module
156 A version of Qt 4.3.x must be installed to compile ParaView. The compilation
157 is a fairly simple process using the supplied buildParaView3.3-cvs script that
158 has worked is our tests with other packages supplied in the ThirdParty
159 directory, namely cmake-2.4.6 and gcc-4.3.1. Execute the following:
160 + cd $FOAM_INST_DIR/ThirdParty
161 + rm -rf ParaView3.3-cvs/platforms
162 + buildParaView3.3-cvs
164 The PV3FoamReader module is an OpenFOAM utility that can be compiled in the
165 usual manner as follows:
166 + cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
171 http://www.OpenFOAM.org/doc
174 http://www.OpenFOAM.org http://www.OpenFOAM.org/discussion.html
176 * Reporting Bugs in OpenFOAM
177 http://www.OpenFOAM.org/bugs.html
178 * Running OpenFOAM in 32-bit mode on 64-bit machines
179 Linux users with a 64-bit machine may install either the OpenFOAM 32-bit
180 version (linux) or the OpenFOAM 64-bit version (linux64), or both. The 64-bit
181 is the default mode on a 64-bit machine. To use an installed 32-bit version,
182 the user must set the environment variable $WM_32 (to anything, e.g. "on")
183 before sourcing the etc/bashrc (or etc/cshrc) file.
185 * List of Contributors