Professional Documents
Culture Documents
Source Pack Installation
Source Pack Installation
Source Pack Installation
php
Download
Source Pack Installation
Overview
Ubuntu/Debian Version 1.7.1, released 26/08/10
Source Pack
Git Repository
Packs
Release History
The following tar-zipped gtgz source packs are available for download.
Old Versions
After the installation directory is chosen (and, if necessary, created), simply copy the 2 source pack files into the directory and
unpack using tar xzf <filename>, e.g. from the installation directory:
System Requirements
OpenFOAM is developed and tested on Linux, but should work with other POSIX systems. OpenFOAM-1.7.1 and
ThirdParty-1.7.1 have been tested on standard Ubuntu 10.04 and OpenSuSE 11.1, 11.2 and 11.3 Linux distributions.
OpenFOAM-1.7.1 also builds on many other and older Linux distributions but the ParaView-3.8.0 version supplied in ThirdParty
requires cmake-2.6.4 or higher and Qt-4.5 or higher which can be obtained from various repositories for many Linux distributions.
To check your system setup, you can execute the foamSystemCheck script, described in “Checking the System” (below).
$HOME/OpenFOAM/OpenFOAM-1.7.1/etc
EITHER
if running bash or ksh (if in doubt type echo $SHELL), source the etc/bashrc file by adding the following line to the
end of your $HOME/.bashrc file:
. $HOME/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc
OR
if running tcsh or csh, source the etc/cshrc file by adding the following line to the end of your $HOME/.cshrc file:
1 of 4 12/21/2010 17:04
Source Pack Installation http://www.openfoam.com/download/source.php
source $HOME/OpenFOAM/OpenFOAM-1.7.1/etc/cshrc
Copyright © 2004-2010 OpenCFD Limited |
then type “source $HOME/.cshrc” in the current terminal window OPENFOAM and OpenCFD are registered
trademarks of OpenCFD Ltd.
Design by 1234.info | Modified by OpenCFD |
Content generated using tex4ht
Setting environment variables for alternative locations
OpenFOAM may also be installed in alternative locations. However, the installation directory should be network available (e.g.
NFS) if parallel calculations are planned.
The environment variable FOAM_INST_DIR can be used to find and source the appropriate resource file. Here is a
bash/ksh/sh example:
export FOAM_INST_DIR=/data/app/OpenFOAM
foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.7.1/etc/bashrc
[ -f $foamDotFile ] && . $foamDotFile
The value set in $FOAM_INST_DIR will be used to locate the remaining parts of the OpenFOAM installation.
In particular your system will need to include a recent version of gcc (check with gcc --version, we recommend gcc-4.4.?
but gcc-4.3.? is sufficient). If the installed version is not recent source pack for newer versions are available from
http://gcc.gnu.org/.
To build OpenFOAM you will also need the flex software installed on your system. If that is missing (type flex --version to
check), then install it.
If you experience difficulties with building the source-pack, or your platform is not currently supported, please contact software
support to arrange a support contract and we will do the port and maintain it for future releases.
wmake
OpenFOAM uses wmake to perform compilation (building, linking) of its C++ source code into executable code. wmake is called
from the Allwmake scripts during the initial build of the complete OpenFOAM project but can be executed directly to update the
compilation of any of the OpenFOAM components:
2 of 4 12/21/2010 17:04
Source Pack Installation http://www.openfoam.com/download/source.php
export WM_SCHEDULER=wmakeScheduler
export WM_HOSTS="dm:1 noisy:4"
export WM_NCOMPPROCS=$($WM_SCHEDULER -count)
export WM_COLOURS="black blue green cyan red magenta yellow"
wmakeScheduler uses ssh to spawn jobs on the listed machines so needs passwordless access and a network mounted
installation
cd $WM_THIRD_PARTY_DIR
./Allclean
./makeParaView
The PV3blockMeshReader and the PV3FoamReader ParaView plugins are compiled as usual for OpenFOAM utilities:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
./Allwclean
./Allwmake
Getting Started
Create a project directory within the $HOME/OpenFOAM directory named <USER>-1.7.1 (e.g. chris-1.7.1 for user chris
and OpenFOAM version 1.7.1) and create a directory named run within it, e.g. by typing:
mkdir -p $FOAM_RUN
Copy the tutorial examples directory in the OpenFOAM distribution to the run directory. If the OpenFOAM environment
variables are set correctly, then the following command will be correct:
cp -r $FOAM_TUTORIALS $FOAM_RUN
cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
blockMesh
icoFoam
paraFoam
3 of 4 12/21/2010 17:04
Source Pack Installation http://www.openfoam.com/download/source.php
bugs.
4 of 4 12/21/2010 17:04