Difference between revisions of "Installation/Linux/foam-extend-3.0"

From OpenFOAMWiki
m (Installing from source code: added missing / to the subpages list)
 
(15 intermediate revisions by 2 users not shown)
Line 29: Line 29:
 
''' Download '''
 
''' Download '''
  
Packages can be downloaded on SourceForge:
+
Packages can be downloaded on SourceForge: [http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ Download foam-extend files on SourceForge]
 
+
[http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ Download foam-extend files on SourceForge]
+
  
 
'''Install packages'''
 
'''Install packages'''
  
* For Ubuntu (and similar), download .deb package and run:
+
<ul>
 
+
<li>For Ubuntu (and similar), download .deb package and run:
 
<bash> software-center foam-extend_3.0-1_amd64.precise.deb
 
<bash> software-center foam-extend_3.0-1_amd64.precise.deb
 
</bash>
 
</bash>
 +
</li>
  
* For Fedora (and similar), download .rpm package and run:
+
<li>For Fedora (and similar), download .rpm package and run:
 
+
 
<bash> sudo yum localinstall foam-extend-3.0-1.fc19.x86_64.rpm
 
<bash> sudo yum localinstall foam-extend-3.0-1.fc19.x86_64.rpm
 
</bash>
 
</bash>
 +
</li>
 +
</ul>
  
 
'''Setup user directory'''
 
'''Setup user directory'''
  
 
See section [[#First steps|First steps]].
 
See section [[#First steps|First steps]].
 
 
  
 
== Installing from source code ==
 
== Installing from source code ==
  
''' Install required packages '''
+
''' System preparations '''
  
''If you installed on a system that is not mentioned here, please contribute and add it here''
+
The preparations depend on the Linux Distribution being used, therefore please go to the following sub-pages for the respective details:
 
+
{{subpages|Installation/Linux/foam-extend-3.0/}}
* On Ubuntu 12.04 and Ubuntu 13.10 run:
+
 
+
<bash> sudo apt-get install git-core build-essential binutils-dev flex \
+
bison zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev \
+
libxt-dev rpm mercurial
+
</bash>
+
 
+
and create an additional link:
+
 
+
<bash>sudo ln -s /usr/bin/make /usr/bin/gmake
+
</bash>
+
 
+
* On Fedora 19 run:
+
 
+
<bash>sudo yum groupinstall "Development Tools"
+
sudo yum install gcc-c++ binutils-devel bison flex m4 zlib-devel \
+
qt-devel qtwebkit-devel mercurial
+
</bash>
+
  
 +
''If you installed on a system that is not mentioned on the pages above, please contribute and add it to the respective page.''
  
 
''' Get the source code '''
 
''' Get the source code '''
  
* The '''recommended way''' is to get the source code through git source code management system. This way, you can get updates and bugfixed easily by running "git pull". To install into the default location run:
+
<ul>
 +
<li>The '''recommended way''' is to get the source code through git source code management system. This way, you can get updates and bugfixes easily by running "git pull". To install into the default location run:
 
<bash>cd ~
 
<bash>cd ~
 
mkdir foam
 
mkdir foam
Line 85: Line 67:
 
git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0
 
git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0
 
</bash>
 
</bash>
 +
</li>
 +
<li>Alternatively, you can download a snapshot (.tgz) of the source code at SourceForce: [http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ Download foam-extend files on SourceForge]
  
* Alternatively, you can download a snapshot (.tgz) of the source code at SourceForce:
+
Then create installation directory and unpack:
 
+
[http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ Download foam-extend files on SourceForge]
+
 
+
Create installation directory and unpack:
+
 
<bash>cd ~
 
<bash>cd ~
 
mkdir foam
 
mkdir foam
Line 96: Line 76:
 
tar zxvf foam-extend-VERSION_NUMBER__COMMIT_NUMBER.tgz
 
tar zxvf foam-extend-VERSION_NUMBER__COMMIT_NUMBER.tgz
 
</bash>
 
</bash>
 +
</li>
  
 +
<li>If for some reason, neither the official Git repository is working nor the snapshot is available, you can try using one of the following mirrors:
 +
* Extend's official repository (''https'' mode, if you're behind a firewall): <bash>git clone https://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0</bash>
 +
* Mirror at repo.or.cz repository: <bash>git clone git://repo.or.cz/openfoam-extend-foam-extend-3.0.git foam-extend-3.0</bash>
 +
* Mirror at repo.or.cz repository (''http'' mode, if you're behind a firewall): <bash>git clone http://repo.or.cz/r/openfoam-extend-foam-extend-3.0.git foam-extend-3.0</bash>
 +
* Mirror Unofficial-Extend-Project-Mirror@github repository: <bash>git clone https://github.com/Unofficial-Extend-Project-Mirror/openfoam-extend-foam-extend-3.0.git foam-extend-3.0</bash>
 +
</li>
 +
</ul>
  
 
''' Compile '''
 
''' Compile '''
  
* Set the environment variables
+
<ol>
On bash (if unsure whether you are using bash, run "echo $SHELL"):
+
<li>Set the environment variables and add them to your initial shell settings:
 +
<ul>
 +
<li>On bash (if unsure whether you are using bash, run "echo $SHELL"):
 +
<bash>cd ~/foam/foam-extend-3.0
 +
source etc/bashrc
  
<bash>cd ~/foam/foam-extend-3.0 <>
+
echo "alias fe30='source \$HOME/foam/foam-extend-3.0/etc/bashrc'" >> $HOME/.bashrc
source etc/cshrc
+
 
</bash>
 
</bash>
 
+
</li>
On csh:
+
<li>On csh:
 
+
 
<bash>cd ~/foam/foam-extend-3.0
 
<bash>cd ~/foam/foam-extend-3.0
 
source etc/cshrc
 
source etc/cshrc
 +
 +
echo "alias fe30 'source $HOME/foam/foam-extend-3.0/etc/cshrc'" >> $HOME/.cshrc
 
</bash>
 
</bash>
 +
</li>
 +
</ul>
  
* Optionally, set environment variable for Qt to compile ParaView:
+
{{Installation/Linux/AliasNote|foam-extend 3.0|fe30}}
  
On bash (if unsure whether you are using bash, run "echo $SHELL"):
+
</li>
  
<bash> export QT_BIN_DIR=/path/to/qmake
+
<li>Optionally, set environment variable for Qt to compile ParaView and add it to the respective preferences shell file:
 +
<ul>
 +
<li>On bash (if unsure whether you are using bash, run "echo $SHELL"):
 +
<bash>export QT_BIN_DIR=/path/to/qmake
 +
echo "export QT_BIN_DIR=/path/to/qmake" >> etc/prefs.sh
 
</bash>
 
</bash>
 
+
</li>
On csh:
+
<li>On csh:
 
+
<bash>setenv QT_BIN_DIR=/path/to/qmake
<bash> setenv QT_BIN_DIR=/path/to/qmake
+
echo "setenv QT_BIN_DIR=/path/to/qmake" >> etc/prefs.csh
 
</bash>
 
</bash>
 +
</li>
 +
</ul>
  
* Optionally, set environment variable for compiling Cuda solvers:
+
</li>
 
+
<li>Optionally, set environment variable for compiling Cuda solvers:
On bash, for example (replace "sm_30" with value according to your GPU architecture):
+
<ul>
 
+
<li>On bash, for example (replace "sm_30" with value according to your GPU architecture):
<bash> export CUDA_ARCH=sm_30
+
<bash>export CUDA_ARCH=sm_30
 +
echo "export CUDA_ARCH=sm_30" >> etc/prefs.sh
 
</bash>
 
</bash>
 
+
</li>
On csh:
+
<li>On csh:
 
+
<bash>setenv CUDA_ARCH=sm_30
<bash> setenv CUDA_ARCH=sm_30
+
echo "setenv CUDA_ARCH=sm_30" >> etc/prefs.csh
 
</bash>
 
</bash>
 +
</li>
 +
</ul>
  
 +
</li>
  
* Start compiling:
+
<li>Start compiling:
<bash> ./Allwmake.firstInstall
+
<bash>./Allwmake.firstInstall
 
</bash>
 
</bash>
 +
</li>
 +
</ol>
  
 
'''Setup user directory'''
 
'''Setup user directory'''
  
 
See section [[#First steps|First steps]].
 
See section [[#First steps|First steps]].
 
 
  
 
== Installing on Apple with sparse image ==
 
== Installing on Apple with sparse image ==
  
* Download the sparse image from SourceForge:
+
<ol>
 
+
<li>Download the sparse image from SourceForge: [http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ Download foam-extend files on SourceForge]
[http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ Download foam-extend files on SourceForge]
+
</li>
 
+
<li>Unpack and mount the image by clicking on the file
*Unpack and mount the image by clicking on the file
+
</li>
 
+
<li>Open a terminal and run:
*Open a terminal and run:
+
 
+
 
<bash>mkdir foam
 
<bash>mkdir foam
 
cd foam
 
cd foam
Line 163: Line 165:
 
. foam-extend-3.0/etc/bashrc
 
. foam-extend-3.0/etc/bashrc
 
</bash>
 
</bash>
 
+
</li>
 
+
</ol>
  
 
== First steps ==
 
== First steps ==
  
After installing the foam-extend core, the first step should be to create the directory, where simulation cases will be held (this assumes that you have sourced etc/bashrc or etc/cshrc as described above):
+
After installing the foam-extend core, the first step should be to create the directory, where simulation cases will be held (this assumes that you have sourced {{tt|etc/bashrc}} or {{tt|etc/cshrc}} as described above):
 
+
<bash>mkdir -p $FOAM_RUN
<bash> mkdir -p $FOAM_RUN
+
 
</bash>
 
</bash>
  
When you have sourced etc/bashrc or etc/cshrc, you can use a shortcut to change to your run directory by typing:
+
When you have sourced {{tt|etc/bashrc}} or {{tt|etc/cshrc}}, you can use a shortcut to change to your run directory by typing:
 
+
<bash>run
<bash> run
+
 
</bash>
 
</bash>
  
 
You can now explore the tutorial cases, type:
 
You can now explore the tutorial cases, type:
<bash>tut</bash>
+
<bash>tut</bash>
to change to the corresponding directory. To run a case, copy it to $FOAM_RUN and execute the solver application there.
+
to change to the corresponding directory. To run a case, copy it to {{tt|$FOAM_RUN}} and execute the solver application there.
  
 +
The User Guide can be found inside the folder "doc/Guides-a4/". To know where this is located, run:
 +
<bash>echo $WM_PROJECT_DIR/doc/Guides-a4</bash>
 +
It can also be downloaded from here: [https://sourceforge.net/p/openfoam-extend/foam-extend-3.0/ci/master/tree/doc/Guides-a4/UserGuide.pdf?format=raw UserGuide.pdf from foam-extend-3.0]
  
For any questions, please refer to the [http://www.cfd-online.com/Forums/openfoam-installation/ forums at cfd-online.com]
 
  
 +
For questions, please refer to the following forums:
 +
* For general questions: [http://www.cfd-online.com/Forums/openfoam/ OpenFOAM forum at cfd-online.com]
 +
* For specific installation questions: [http://www.cfd-online.com/Forums/openfoam-installation/ OpenFOAM Installation subforum at cfd-online.com]
  
 +
== See also ==
 +
* [http://wikki.gridcore.se/foam-extend/download Download & Install at wikki.gridcore.se]
  
  
[[Category:Installing OpenFOAM on Linux]]
+
[[Category:Installing OpenFOAM on Linux]][[Category:Installing OpenFOAM on Mac OS]]
 
+
 
+
== See also ==
+
* [http://wikki.gridcore.se/foam-extend/download Download & Install at wikki.gridcore.se]
+

Latest revision as of 15:13, 15 June 2014

For acute installation issues, please post on the corresponding cfd-online forum.

Maintainer
The current maintainer of this page is Dchrist (talk).


This page explains how to install the foam-extend project OF Version 30ext.png on various Linux distributions and Apple Mac OS X. If you have installed foam-extend on a platform that is not mentioned here or had to take other/additional steps for successful installation, please contribute and edit this page or send a message to the maintainer.

To quote[1] from the release notes of the project:

The foam-extend project is a fork of the OpenFOAM® open source library for Computational Fluid Dynamics (CFD). It is an open project welcoming and integrating contributions from all users and developers. Previously known as OpenFOAM®-dev and OpenFOAM®-extend, it contains bug fixes and performance improvements, as well as extensions and additional features provided by community contributors (see list below), such as dynamic mesh and topological change support, turbomachinery extensions including general grid interpolation (GGI), cyclic GGI and mixing place, block-coupled matrix support, finite area method, comprehensive mesh motion capability and GPU support. For a full list, see below.
Version 3.0, nicknamed "Jeju", is the current version of foam-extend. The release now continues the tradition and spirit of the original FOAM code developed by prof. Jasak and Mr. Weller during their time at Imperial College and released as the general purpose CFD/CCM package by Nabla Ltd. in 2000. In this spirit, we shall revert to original numbering scheme (foam-2.3.2, 13 December 2004) as release number 3.0. Visit http://foam-extend.org for more information.
OPENFOAM® is a registered trademark of ESI Group. OpenFOAM-extend and foam-extend are a community effort not endorsed by ESI Group.
  1. http://sourceforge.net/p/openfoam-extend/foam-extend-3.0/ci/master/tree/ReleaseNotes-foam-extend-3.0


In the following chapters and sections is explained how to generally install foam-extend-3.0 and related dependencies, such as ParaView.


1 Installing from binary package

Binary packages are available for Ubuntu 12.04 and 13.10 as well as Fedora 19.

Download

Packages can be downloaded on SourceForge: Download foam-extend files on SourceForge

Install packages

  • For Ubuntu (and similar), download .deb package and run:
     software-center foam-extend_3.0-1_amd64.precise.deb
  • For Fedora (and similar), download .rpm package and run:
     sudo yum localinstall foam-extend-3.0-1.fc19.x86_64.rpm

Setup user directory

See section First steps.

2 Installing from source code

System preparations

The preparations depend on the Linux Distribution being used, therefore please go to the following sub-pages for the respective details:

Installation/Linux/foam-extend-3.0/Arch LinuxInstallation/Linux/foam-extend-3.0/CentOS SL RHELInstallation/Linux/foam-extend-3.0/Debian
Installation/Linux/foam-extend-3.0/FedoraInstallation/Linux/foam-extend-3.0/UbuntuInstallation/Linux/foam-extend-3.0/openSUSE

If you installed on a system that is not mentioned on the pages above, please contribute and add it to the respective page.

Get the source code

  • The recommended way is to get the source code through git source code management system. This way, you can get updates and bugfixes easily by running "git pull". To install into the default location run:
    cd ~
    mkdir foam
    cd foam
    git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0
  • Alternatively, you can download a snapshot (.tgz) of the source code at SourceForce: Download foam-extend files on SourceForge Then create installation directory and unpack:
    cd ~
    mkdir foam
    cd foam
    tar zxvf foam-extend-VERSION_NUMBER__COMMIT_NUMBER.tgz
  • If for some reason, neither the official Git repository is working nor the snapshot is available, you can try using one of the following mirrors:
    • Extend's official repository (https mode, if you're behind a firewall):
      git clone https://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 foam-extend-3.0
    • Mirror at repo.or.cz repository:
      git clone git://repo.or.cz/openfoam-extend-foam-extend-3.0.git foam-extend-3.0
    • Mirror at repo.or.cz repository (http mode, if you're behind a firewall):
      git clone http://repo.or.cz/r/openfoam-extend-foam-extend-3.0.git foam-extend-3.0
    • Mirror Unofficial-Extend-Project-Mirror@github repository:
      git clone https://github.com/Unofficial-Extend-Project-Mirror/openfoam-extend-foam-extend-3.0.git foam-extend-3.0

Compile

  1. Set the environment variables and add them to your initial shell settings:
    • On bash (if unsure whether you are using bash, run "echo $SHELL"):
      cd ~/foam/foam-extend-3.0
      source etc/bashrc
       
      echo "alias fe30='source \$HOME/foam/foam-extend-3.0/etc/bashrc'" >> $HOME/.bashrc
    • On csh:
      cd ~/foam/foam-extend-3.0
      source etc/cshrc
       
      echo "alias fe30 'source $HOME/foam/foam-extend-3.0/etc/cshrc'" >> $HOME/.cshrc
    Note: This last line means that whenever you start a new terminal window or tab, you should run the alias command associated to the foam-extend 3.0 shell environment. In other words, whenever you start a new terminal, you should run:
    fe30
    
    For more information on this topic, read section Using aliases to help manage multiple OpenFOAM versions in the page Installation/Working with the Shell.
  2. Optionally, set environment variable for Qt to compile ParaView and add it to the respective preferences shell file:
    • On bash (if unsure whether you are using bash, run "echo $SHELL"):
      export QT_BIN_DIR=/path/to/qmake
      echo "export QT_BIN_DIR=/path/to/qmake" >> etc/prefs.sh
    • On csh:
      setenv QT_BIN_DIR=/path/to/qmake
      echo "setenv QT_BIN_DIR=/path/to/qmake" >> etc/prefs.csh
  3. Optionally, set environment variable for compiling Cuda solvers:
    • On bash, for example (replace "sm_30" with value according to your GPU architecture):
      export CUDA_ARCH=sm_30
      echo "export CUDA_ARCH=sm_30" >> etc/prefs.sh
    • On csh:
      setenv CUDA_ARCH=sm_30
      echo "setenv CUDA_ARCH=sm_30" >> etc/prefs.csh
  4. Start compiling:
    ./Allwmake.firstInstall

Setup user directory

See section First steps.

3 Installing on Apple with sparse image

  1. Download the sparse image from SourceForge: Download foam-extend files on SourceForge
  2. Unpack and mount the image by clicking on the file
  3. Open a terminal and run:
    mkdir foam
    cd foam
    ln -s /Volumes/foam-extend-3.0 .
    . foam-extend-3.0/etc/bashrc

4 First steps

After installing the foam-extend core, the first step should be to create the directory, where simulation cases will be held (this assumes that you have sourced etc/bashrc or etc/cshrc as described above):

mkdir -p $FOAM_RUN

When you have sourced etc/bashrc or etc/cshrc, you can use a shortcut to change to your run directory by typing:

run

You can now explore the tutorial cases, type:

tut

to change to the corresponding directory. To run a case, copy it to $FOAM_RUN and execute the solver application there.

The User Guide can be found inside the folder "doc/Guides-a4/". To know where this is located, run:

echo $WM_PROJECT_DIR/doc/Guides-a4

It can also be downloaded from here: UserGuide.pdf from foam-extend-3.0


For questions, please refer to the following forums:

5 See also