intersection with triangle plane for miss
[OpenFOAM-1.5.x.git] / README
Commit [+]AuthorDateLineData
f5cdec33
O
OpenCFD2008-08-05 10:14:36 +01001# -*- mode: org; -*-
2#
3#+TITLE: *OpenFOAM README for version 1.5*
4#+AUTHOR: OpenCFD Ltd.
5#+DATE: 14 July 2008
6#+LINK: http://www.opencfd.co.uk
7#+OPTIONS: author:nil
8
9* Copyright
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.
15
16* System requirements
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
21 administrator.
22
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".
25
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,
30 type:
31 + qmake --version
32
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."
41
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
48
49 Compilation and running of ParaView has been successful using the libraries
50 downloaded in the "libqt4-dev" package on ubuntu.
51
52 If you don't have an appropriate version of Qt installed you can download
53 the sources from TrollTech e.g.:
54 ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2
55 and compile and install in /usr/local or some other location that does to
56 conflict with the pre-installed version.
57
58* Installation
59 Download and unpack the files in the $HOME/OpenFOAM directory as described in:
60 http://www.OpenFOAM.org/download.html
61
62 The environment variable settings are contained in files in an etc/ directory
63 in the OpenFOAM release. e.g. in
64
65 + $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/
66 + where <VERSION> corresponds to the version 1.4, 1.5, ...
67
68 1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the
69 etc/bashrc file by adding the following line to the end of your
70 $HOME/.bashrc file:
71
72 + . $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/bashrc
73
74 Then update the environment variables by sourcing the $HOME/.bashrc file by
75 typing in the terminal:
76
77 + . $HOME/.bashrc
78
79 2) OR, if running tcsh or csh, source the etc/cshrc file by adding the
80 following line to the end of your $HOME/.cshrc file:
81
82 + source $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/cshrc
83
84 Then update the environment variables by sourcing the $HOME/.cshrc file by
85 typing in the terminal:
86
87 + source $HOME/.cshrc
88
89*** Installation in alternative locations
90 OpenFOAM may also be installed in alternative locations. However, the
91 installation directory should be network available (e.g., NFS) if parallel
92 calculations are planned.
93
94 The environment variable 'FOAM_INST_DIR' can be used to find and source the
95 appropriate resource file. Here is a bash/ksh/sh example:
96
97 + export FOAM_INST_DIR=/data/app/OpenFOAM
98 + foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
99 + [ -f $foamDotFile ] && . $foamDotFile
100
101 and a csh/tcsh example:
102
103 + setenv FOAM_INST_DIR /data/app/OpenFOAM
104 + foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
105 + if ( -f $foamDotFile ) source $foamDotFile
106
107 The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts
108 of the OpenFOAM installation.
109
110* Building from Sources (Optional)
111 If you cannot find an appropriate binary pack for your platform, you can build
112 the complete OpenFOAM from the source-pack. You will first need to compile or
113 obtain a recent version of gcc (we recomend gcc-4.3.?) for your platform,
114 which may be obtained from http://gcc.gnu.org/.
115
116 Install the compiler in
117 $WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/
118 and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and
119 $WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the
120 environment variables as in section 3.
121
122 Now go to the top-level source directory $WM_PROJECT_DIR and execute the
123 top-level build script './Allwmake'. In principle this will build everything,
124 but if problems occur with the build order it may be necessary to update the
125 environment variables and re-execute 'Allwmake'. If you experience
126 difficulties with building the source-pack, or your platform is not currently
127 supported, please contact <enquiries@OpenCFD.co.uk> to negotiate a support
128 contract and we will do the port and maintain it for future releases.
129
130* Testing the installation
131 To check your installation setup, execute the 'foamInstallationTest' script
132 (in the bin/ directory of the OpenFOAM installation). If no problems are
133 reported, proceed to getting started with OpenFOAM; otherwise, go back and
134 check you have installed the software correctly and/or contact your system
135 administrator.
136
137* Getting Started
138 Create a project directory within the $HOME/OpenFOAM directory named
139 <USER>-<VERSION> (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5)
140 and create a directory named 'run' within it, e.g. by typing:
141
142 + mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
143
144 Copy the 'tutorial' examples directory in the OpenFOAM distribution to the
145 'run' directory. If the OpenFOAM environment variables are set correctly,
146 then the following command will be correct:
147
148 + cp -r $WM_PROJECT_DIR/tutorials
149 $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
150
151 Run the first example case of incompressible laminar flow in a cavity:
152
153 + cd $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run/tutorials/icoFoam/cavity
154 + blockMesh
155 + icoFoam
156 + paraFoam
157
158* Compiling Paraview 3.3 and the PV3FoamReader module
159 A version of Qt 4.3.x must be installed to compile ParaView. The compilation
160 is a fairly simple process using the supplied buildParaView3.3-cvs script that
161 has worked is our tests with other packages supplied in the ThirdParty
162 directory, namely cmake-2.4.6 and gcc-4.3.1. Execute the following:
163 + cd $FOAM_INST_DIR/ThirdParty
164 + rm -rf ParaView3.3-cvs/platforms
165 + buildParaView3.3-cvs
166
167 The PV3FoamReader module is an OpenFOAM utility that can be compiled in the
168 usual manner as follows:
169 + cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
170 + ./Allwclean
171 + ./Allwmake
172
173* Documentation
174 http://www.OpenFOAM.org/doc
175
176* Help
177 http://www.OpenFOAM.org http://www.OpenFOAM.org/discussion.html
178
179* Reporting Bugs in OpenFOAM
180 http://www.OpenFOAM.org/bugs.html
181
182* Running OpenFOAM in 32-bit mode on 64-bit machines
183 Linux users with a 64-bit machine may install either the OpenFOAM 32-bit
184 version (linux) or the OpenFOAM 64-bit version (linux64), or both. The 64-bit
185 is the default mode on a 64-bit machine. To use an installed 32-bit version,
186 the user must set the environment variable WM_ARCH_OPTION to 32 before
187 sourcing the etc/bashrc (or etc/cshrc) file.