Installation/Linux/foam-extend-4.1

From OpenFOAMWiki
< Installation‎ | Linux
Revision as of 13:49, 6 August 2020 by Tschenkel (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Maintainer
The current maintainer of this page is Tschenkel (talk) - adapted from the foam-extend-4.0 pages.

This page explains how to install the foam-extend project OF Version 41ext.png on various Linux distributions (as I only use Linux, I cannot help with that at the moment. If you have instructions for these, either get in touch or edit these pages). 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).

Overview

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). For a full list, see below and previous release notes at: http://sourceforge.net/p/foam-extend/wiki/Home/

Version 4.1, nicknamed "Duisburg", is the current version o 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 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.

This is a major release of foam-extend-4.1

  1. http://sourceforge.net/p/foam-extend/foam-extend-4.1/ci/master/tree/ReleaseNotes.txt


1 Installation Instructions

The following sections describe two ways on how to install foam-extend 4.1 on Linux Distributions.

1.1 Installing from binary package

Binary packages are available for Ubuntu 18.04

Note that at the time of writing this (26/11/2019) these packages include a bug, that makes parallel runs crash with an MPI error if the GAMG solver is used for the pressure equation. For this reason I cannot recommend these packages.

Packages timestamped after 02/11/2019 should have this bug fixed.

Download

Packages can be downloaded on SourceForge.net:


Install packages

For Ubuntu (and similar), download .deb package and run:

 apt-get install ~/Downloads/foam-extend-4.1_amd64_Ubuntu1804_<buildcode>.deb

or accept the browser suggestion to open in Software Install. This will install a precompiled binary version of foam-extend-4.1 and all dependencies.

Note that at the time of writing this (26/11/2019) these packages include a bug, that makes parallel runs crash with an MPI error if the GAMG solver is used for the pressure equation. For this reason I cannot recommend these packages.


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.1/CentOSInstallation/Linux/foam-extend-4.1/Ubuntu

If you installed on a system that is not mentioned on the pages above, please contribute and add it to the respective page. Basically the preparation involves installation of the required packages (gcc/g++ toolchain, bison, curl, rpm, ...) and ensuring that the correct gcc/g++ version is used (version 7 ), as foam-extend uses compiler options that are not available in older versions, and also does not like newer versions of gcc/g++

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.1 foam-extend-4.1
  • 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.1 foam-extend-4.1

</li>

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.1
      source etc/bashrc
       
      echo "alias fe41='source \$HOME/foam/foam-extend-4.1/etc/bashrc'" >> $HOME/.bashrc
    • On csh:
      cd ~/foam/foam-extend-4.1
      source etc/cshrc
       
      echo "alias fe41 'source $HOME/foam/foam-extend-4.1/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.1 shell environment. In other words, whenever you start a new terminal, you should run:
    fe41
    
    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. Start compiling:
    ./Allwmake.firstInstall

1.3 Install Paraview

I do not use the paraview that comes with foam-extend (5.4) but install the latest version on all my systems, 5.7 works fine on Ubuntu 18.04.3 LTS:

Download paraview 5.7 from paraview.org:

cd /opt
sudo tar xvfz ~/Downloads/ParaView-5.7.0-MPI-Linux-Python3.7-64bit.tar.gz

and then add

# Paraview
export PATH=/opt/ParaView-5.7.0-MPI-Linux-Python3.7-64bit/bin:$PATH

to the end of ~/.bashrc

Depending on your graphics card you'll need an OpenGL variant for paraview to work:

 
sudo apt install libopengl0

works for me.

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.1


For questions, please refer to the following forums: