Vous êtes sur la page 1sur 2

Ubuntu Deb Pack Installation

Pgina 1 de 2

The OpenFOAM Foundation


Home
Legal

Download

Documentation

Licensing

Code Development

OpenFOAM.com

Download
Overview Latest Release Ubuntu Deb Pack SuSE RPM Pack Fedora RPM Pack Source Pack Repository Release Release History Old Versions

Ubuntu Deb Pack Installation


Version 2.2.2, released 14/10/13

Ubuntu Versions
OpenFOAM and Paraview are currently available for the following versions of Ubuntu: 12.04 LTS, codename precise 12.10, codename quantal 13.04, codename raring 13.10, codename saucy

Installation
OpenFOAM and Paraview can be simply installed using the apt package management tool. The user will need to provide superuser password authentication when executing the following commands with sudo 1. In a terminal window, add OpenFOAM to the list of repository locations for apt to search, by copying and pasting the following in a terminal prompt (Applications -> Accessories -> Terminal).

VERS=$(lsb_release -cs) sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $VERS main > /etc/apt/sources.list.d/openfoam.list"

Note 1: Line 1 stores the version name of your Ubuntu distribution (e.g. raring) under $VERS, which is used in line 2 Note 2: This only needs to be done once for a given system 2. Update the apt package list to account for the new download repository location

sudo apt-get update


3. Install OpenFOAM (222 in the name refers to version 2.2.2):

sudo apt-get install openfoam222


4. Install Paraview ( 3120 in the name refers to version 3.12.0):

sudo apt-get install paraviewopenfoam3120


OpenFOAM-2.2.2 is now installed in the /opt directory (along with and Paraview-3.12.0)

Installation Problems
Networking must be enabled in order to be able to install software packages in Ubuntu. Installation failure due to networking problems usually results in an error message that reports failures in fetching archives and ends with a line like the following:

E: Unable to fetch some archives...


The .deb files for different versions of Ubuntu supplied can be downloaded directly from the following locations:
http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb

User Configuration
In order to use the installed OpenFOAM package, complete the following

http://www.openfoam.org/download/ubuntu.php

13/11/2013

Ubuntu Deb Pack Installation

Pgina 2 de 2

1.

Open the .bashrc file in the users home directory in an editor, e.g. by typing in a terminal window (note the dot)

gedit ~/.bashrc
2. At the bottom of that file, add the following line (see Note 1 ) and save the file

source /opt/openfoam222/etc/bashrc
3. Open a new terminal window (see Note 2) and test that the icoFoam application, from the OpenFOAM package, is working by typing

icoFoam -help
4. A Usage message should appear. Your installation and user configuration is complete.

Note 1: If a similar line has already been added to the users .bashrc file, e.g. for a previous version of OpenFOAM, then the line should be deleted or, alternatively, commented out by inserting a # at the beginning of the line. Note 2: If a user wishes to execute icoFoam in the same terminal window, they must first register the change to the .bashrc file by typing at the terminal prompt (note the dots): source $HOME/.bashrc

Getting Started
Create a project directory within the $HOME/OpenFOAM directory named <USER>-2.2.2 (e.g. chris-2.2.2 for user chris and OpenFOAM version 2.2.2) 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
Run the first example case of incompressible laminar flow in a cavity:

cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity blockMesh icoFoam paraFoam


Refer to the OpenFOAM User Guide to get started.

Reporting Bugs in OpenFOAM


We appreciate that bugs in OpenFOAM are reported so we can fix them. Please refer to the OpenFOAM bugs pages to report bugs.

Copyright 2011-2013 OpenFOAM Foundation | OPENFOAM and OpenCFD are registered trademarks of OpenCFD Ltd. Design by 1234.info | Modified by OpenFOAM Foundation | Content generated using tex4ht

http://www.openfoam.org/download/ubuntu.php

13/11/2013

Vous aimerez peut-être aussi