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

From OpenFOAMWiki
(Moved instructions for Windows and Mac OS X)
(Installing from source code: updated description for how to add the aliases)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<span style="color: red">
 
<span style="color: red">
''For acute installation issues, please post on the corresponding [http://www.cfd-online.com/Forums/openfoam-installation/ cfd-online forum].''
+
''For acute installation issues, please post on the corresponding [http://www.cfd-online.com/Forums/openfoam-installation/ OpenFOAM Installation forum at CFD-Online].''
 
</span>
 
</span>
 
; Maintainer: The current maintainer of this page is [[User:Wyldckat|Wyldckat]] ([[User talk:Wyldckat|talk]]).
 
; Maintainer: The current maintainer of this page is [[User:Wyldckat|Wyldckat]] ([[User talk:Wyldckat|talk]]).
  
  
This page explains how to install {{-Extend}} {{version4.0-ext}} 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.  
+
This page explains how to install {{-Extend}} {{version4.0-ext}} on various Linux distributions (the other main OSes have their own pages: [[Installation/Windows/foam-extend-4.0|Windows]] and [[Installation/Mac_OS/foam-extend-4.0|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 post at [http://www.cfd-online.com/Forums/openfoam-installation/ OpenFOAM Installation forum at CFD-Online] (and send a message to the maintainer).
  
 
To quote<ref>http://sourceforge.net/p/foam-extend/foam-extend-4.0/ci/master/tree/ReleaseNotes.txt</ref> from the release notes of the project:
 
To quote<ref>http://sourceforge.net/p/foam-extend/foam-extend-4.0/ci/master/tree/ReleaseNotes.txt</ref> from the release notes of the project:
Line 96: Line 96:
  
 
<ol>
 
<ol>
<li>Set the environment variables and add them to your initial shell settings:
+
<li>Set the environment variables and add them to your initial shell settings, simply by running the following commands:
 
<ul {{NoIndentStyle}}>
 
<ul {{NoIndentStyle}}>
 
<li>On bash (if unsure whether you are using bash, run "echo $SHELL"):
 
<li>On bash (if unsure whether you are using bash, run "echo $SHELL"):
Line 180: Line 180:
  
 
See section [[#First steps|First steps]].
 
See section [[#First steps|First steps]].
 
  
 
= First steps =
 
= First steps =

Revision as of 14:32, 3 February 2018

For acute installation issues, please post on the corresponding OpenFOAM Installation forum at CFD-Online.

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


This page explains how to install the foam-extend project OF Version 40ext.png on various Linux distributions (the other main OSes have their own pages: Windows and 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 post at OpenFOAM Installation forum at CFD-Online (and 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 file ListOfContributors), such as dynamic mesh and topological change support, turbomachinery extensions including general grid interpolation (GGI), cyclic GGI and mixing plane, block-coupled matrix support, implicitly coupled conjugate heat transfer and other physics coupling, finite area method, comprehensive dynamic mesh (motion and topological changes) capability and GPU support. For a full list, see below and previous release notes at: [1]
Version 4.0, nicknamed "Guimaraes", is the current version of foam-extend. The release 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 reverted 18 December 2013 to the original numbering scheme (foam-2.3.2, 13 December 2004) as release number 3.0. Visit 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/foam-extend/foam-extend-4.0/ci/master/tree/ReleaseNotes.txt


In the following chapters and sections is explained how to generally install foam-extend-4.0 and related dependencies, such as ParaView, although you should first refer to the folder doc/buildInstructions/ on the official repository for dedicated instructions for each supported Operating System.


1 Installation Instructions

The following sections describe two ways on how to install foam-extend 4.0 on Linux Distributions. For instructions on how to install on Mac OS X and Windows, see the respective wiki pages:


1.1 Installing from binary package

Binary packages are available for Ubuntu 16.04 as well as Fedora 24.

Download

Packages can be downloaded on SourceForge.net:


Install packages

  • For Ubuntu (and similar), download .deb package and run:
    software-center foam-extend-4.0_amd64_Ubuntu1604_8bc571e.deb
  • For Fedora (and similar), download .rpm package and run:
    sudo dnf localinstall foam-extend-4.0-1.fc24.x86_64_8bc571e.rpm

Setup user directory

See chapter First steps.


1.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-4.0/UbuntuInstallation/Linux/foam-extend-4.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/foam-extend/foam-extend-4.0 foam-extend-4.0
  • If for some reason the official Git repository is not working, you can try using one of the following mirrors:
    • Extend's official repository (https mode, if you're behind a firewall):
      git clone http://git.code.sf.net/p/foam-extend/foam-extend-4.0 foam-extend-4.0
    • Mirror at repo.or.cz repository:
      git clone git://repo.or.cz/foam-extend-4.0.git foam-extend-4.0
    • Mirror at repo.or.cz repository (http mode, if you're behind a firewall):
      git clone http://repo.or.cz/foam-extend-4.0.git foam-extend-4.0
    • Mirror Unofficial-Extend-Project-Mirror@github repository:
      git clone https://github.com/Unofficial-Extend-Project-Mirror/foam-extend-foam-extend-4.0.git foam-extend-4.0

Compile

  1. Set the environment variables and add them to your initial shell settings, simply by running the following commands:
    • On bash (if unsure whether you are using bash, run "echo $SHELL"):
      cd ~/foam/foam-extend-4.0
      source etc/bashrc
       
      echo "alias fe40='source \$HOME/foam/foam-extend-4.0/etc/bashrc'" >> $HOME/.bashrc
    • On csh:
      cd ~/foam/foam-extend-4.0
      source etc/cshrc
       
      echo "alias fe40 'source $HOME/foam/foam-extend-4.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 4.0 shell environment. In other words, whenever you start a new terminal, you should run:
    fe40
    
    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_directory
      echo "export QT_BIN_DIR=$QT_BIN_DIR" >> etc/prefs.sh
      • Note: If you don't know what is /path/to/qmake, try checking what the following commands give you:
        which qmake
        which qmake-qt4

        For example, you might get the following answer:

        /usr/bin/qmake-qt4

        from which the path /usr/bin/ should be used for replacing /path/to/qmake_directory, which means that you would run the following commands:

        export QT_BIN_DIR=/usr/bin/
        echo "export QT_BIN_DIR=$QT_BIN_DIR" >> etc/prefs.sh
    • On csh:
      setenv QT_BIN_DIR=/path/to/qmake
      echo "setenv QT_BIN_DIR $QT_BIN_DIR" >> etc/prefs.csh
      • Note: If you don't know what is /path/to/qmake, try checking what the following commands give you:
        which qmake
        which qmake-qt4

        For example, you might get the following answer:

        /usr/bin/qmake-qt4

        from which the path /usr/bin/ should be used for replacing /path/to/qmake_directory, which means that you would run the following commands:

        setenv QT_BIN_DIR=/usr/bin/
        echo "setenv QT_BIN_DIR $QT_BIN_DIR" >> 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.

2 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-4.0


For questions, please refer to the following forums: