From OpenFOAMWiki
Well, my head's full of questions
My temp'rature's risin' fast
Bob Dylan (Mixed Up Confusion)

Questions that have been asked more than once. This is a full list of all questions in the FAQ.


1 FAQ/General

General questions about OpenFOAM. Legal etc

1.1 What is OpenFOAM?

OpenFOAM is an open source library designed for development of parallel or serial multi-dimensional modeling codes. OpenFOAM includes numerous C++ classes for finite volume, finite element, and Lagrangian particle tracking. OpenFOAM also comes with numerous computational fluid dynamics, combustion, and heat transfer programs that demonstrate the capabilities and usage of OpenFOAM. These solvers are useful for a wide range of scientific and engineering applications and can be customized as needed. Read more...

1.2 Can I use OpenFOAM?

Yes. OpenFOAM has been released by OpenCFD under the terms of the GNU GPL 2 license.

According to this licence, you can freely download, install and use OpenFOAM. Moreover, you have full access to the source code of OpenFOAM and you can modify it to customize it on your needs.

1.3 How can I properly reference OpenFOAM?

You can cite the www.openfoam.org website, if web-referencing is allowed, otherwise, cite the OpenFOAM documentation.

1.4 Where can I find support or ask questions about openFOAM?

OpenFOAM is developed by OpenCFD, which also offer support packages for corporations, consultants and academic institutions.

You can ask questions on the OpenFOAM message board.

There also is an IRC channel at freenode. The configuration parameters are:

  • Server: irc.freenode.net
  • Channel: #openFOAM-IRC

For a direct access to the IRC channel click here, if you have a browser configured to start your IRC client.

1.5 How do the OpenFOAM versions, variants and forks differ?

The official version is OpenFOAM, provided by the OpenFOAM Foundation, where:

  • Version 4.0 is the current stable release, which the latest stable version to be released as binary. This should be the version of choice for most users.
  • OpenFOAM 4.x is the official bug fix branch and thus contains the newest bug-fixes and features, but comes at the price of being less tested.
  • If you're looking for an even more bleeding edge version, you can find the development repository here: OpenFOAM-dev @ GitHub

Known forks and variants of OpenFOAM are all listed at this page: Forks and Variants

1.6 Where is FoamX?

FoamX was only developed up to OpenFOAM 1.4.x and is obsolete as of version 1.5. For more information, read the section Appendix A: The FoamX case manager from the Main UserGuideAddendum, which has got annotations concerning the OpenFOAM User Guide.

If you are looking for a GUI for using OpenFOAM, check this page: GUI

Nonetheless, if you are willing to be stubborn enough to spend countless hours delving into the World of Java, feel free to get the original source code for FoamX from the official OpenFOAM project at SourceForge.net:

  1. The last known version of FoamX is part of the main source code package: OpenFOAM-1.4.1.General.gtgz
  2. Download the file and then unpack it with the following command:
    tar -xzf OpenFOAM-1.4.1.General.gtgz
  3. The source code for FoamX is inside the folder: applications/utilities/preProcessing/FoamX
  4. Since building FoamX is part of the OpenFOAM build structure, then the last known instructions related to building FoamX are part of these instructions: Installation/Outdated/Howto compile OpenFOAM
Warning: Estimated amount of time necessary to get FoamX (barely) working with any of the latest OpenFOAM versions: 40 to 80 hours of dedicated work in coding in Java, depending on your level of experience.

2 FAQ/Installation and Running

Problems with the installation and running of applications

2.1 How to install OpenFOAM and any of its variants?

These are the known installation instructions for OpenFOAM and many of its forks/variants:

  1. The instructions for the official OpenFOAM versions are provided at the OpenFOAM Foundation website.
  2. The instructions for the Extend variant foam-extend are provided at the Wikki website, in the page Download & Install.
  3. The instructions for installing FreeFOAM are provided at their official website: FreeFOAM Installation Instructions
  4. The instructions for installing Caelus-CML are provided at their official website: Caelus-CML Download
  5. Instructions written by the community are mostly centralized here at openfoamwiki.net, in the page Installation.
  6. Questions about installing any of these versions/variants can be asked at the (unofficial) forum at CFD-Online:

2.2 Which platforms are supported by OpenFOAM ?

Officially, only Linux Distributions are supported: OpenFOAM Repo: 1. Software for Compilation. But POSIX systems in general should be compatible, with a few changes here and there.

Ports to other operating systems that have been discussed on the message board are (somewhat out-of-date list):

Beyond this, visit the page Installation for a more up-to-date list of known (unofficially) supported platforms.

2.3 Why isn't there a Windows port of OpenFOAM ?

Actually, nowadays, there are a few ports for Windows. The only feasible way in the past, was to port OpenFOAM to Windows using Cygwin, an application that implements the most common UNIX APIs on Windows. Now MinGW is the more popular porting solution, because while it still integrates parts of Cygwin (MinGW forked from version 1.3.3 of Cygwin [1]), it can run natively in Windows and be linked with other native Windows libraries and applications.

One problem is that the file-system NTFS, that is used by most modern Windows Versions, is (by default) only case-preserving (hello.c and Hello.C are the same file, when in the same folder). The OpenFOAM-sources need a fully case-sensitive file-system and can't even be unpacked properly on a Windows system (see [2]). There is a possibility of enabling full case-sensitivity in Windows [3], but can lead to some Windows programs to not work properly.

2.3.1 (Cross-)Compiling with Cygwin

A (relatively old) way to compile OpenFOAM on cygwin is described on the Message-Board. The resultant binary distribution of version 1.3 is available here (and there is a relating discussion thread on the Message-Board). This port does not include FoamX and paraFoam, although postprocessing can be done with ParaView by using foamToVTK, and FoamX exists for OpenFOAM 1.4.x. This port is not part of the official distribution.

Another unofficial port of OpenFOAM 1.4.x is available here, with FoamX and ParaView. Support is available here and here.

FreeFOAM should prove to be more successful, but it's still in development, and uses CMake instead of wmake.

Cygwin 1.5 introduced a mount type named managed mounts, that can handle fully case sensitive files and folders, and some special characters that Linux can use and Windows can't [4]. In theory, if OpenFOAM is built under this interpretation layer, than it should be compilable directly in Windows. After some testing, it was discovered that OpenFOAM has some very long path names, which aren't handled properly by Cygwin's managed mounts, due to path size limit [5].

With Cygwin 1.7, managed mounts were dropped and POSIX mounts were introduced [6], as well as file paths increased to 4096 characters [7]. The POSIX mount relies on a hidden feature of Windows [8], that enables NTFS POSIX compatibility system, also used by Interix's SFU/SUA [9], thus enabling full case sensitivity. In other words, as of Cygwin 1.7, it is possible to compile and cross-compile OpenFOAM directly in Windows, without major reconstruction of the files and structure of the source code. Nonetheless, the whole build system has to be done under Cygwin's layer, because the flag obcaseinsensitive doesn't actually make all of Windows applications aware of full file name case sensitivity. For more information, see Using Cygwin for cross-compiling OpenFOAM.

2.3.2 (Cross-)Compiling with MinGW

There are already a few variants of cross-compiling with MinGW and one port that compiles directly in Windows with MinGW and CodeBlocks. The complete list is available here in the wiki. This link is part of a full step-by-step tutorial on how to Cross Compile OpenFOAM in Linux for Windows with MinGW and Mingw-w64.

2.4 How do I port OpenFOAM to an unsupported platform ?

If your platform is not some kind of UNIX-flavour you're probably going to have a hard time.

For a starter see Porting to a new platform.

2.5 Why is OpenFOAM built and installed in my home directory ?

Building and installing and running OpenFOAM in your home directory gives you some advantages. It is common practice to share the home directories across all machines machines on a network. In this setup all computers will have access to and run the same binaries compiled by the same compiler to help ensure consistent results. It also makes sharing data for cluster work easier. Also to really leverage the power of OpenFOAM you will want to write code to link to and extend it. If it was installed in a common directory individual users programs could clash via naming conflicts etc...

Unfortunately this is not a winning situation for everybody. If you build and install OpenFOAM in your home directory you can't use it on heterogeneous machines on a network, i.e. a z80 based machine cannot run OpenFOAM compiled for a 6502 based machine, unless it has emulation software in which case it would be slow. Fear not because it is possible to configure OpenFOAM to compile and install in a common directory on each machine to accommodate heterogeneous machines on a network.

2.6 Why am I not able to install the official OpenFOAM Deb packages on Ubuntu ?

If when following the instructions from the official instructions, e.g. Download v2.2.1 | Ubuntu, you get an error like this:

The following packages have unmet dependencies:
 openfoam221 : Depends: g++ but it is not installable
               Depends: libreadline-dev but it is not installable
               Depends: libopenmpi1.3 but it is not going to be installed
               Depends: libptscotch-5.1 but it is not going to be installed
               Depends: flex
               Depends: libscotch-dev but it is not going to be installed
               Depends: libopenmpi-dev but it is not going to be installed
               Depends: libxt-dev but it is not going to be installed
               Depends: openmpi-bin but it is not going to be installed
               Recommends: libptscotch-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Then the problem is that the necessary repository universe is not installed, as explained here: Repositories/Ubuntu

To fix the problem, follow these steps:

  1. Edit the file /etc/apt/sources.list:
    sudo nano /etc/apt/sources.list
  2. You should find contents similar to this:
    # /etc/apt/sources.list
    deb http://archive.ubuntu.com/ubuntu/ precise main restricted
    deb http://security.ubuntu.com/ubuntu/ precise-security main restricted
    deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted
  3. Append to each line the word universe (you can add multiverse as well if you want to):
    # /etc/apt/sources.list
    deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe
    deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe
    deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe
  4. Hit the key combination Ctrl+X, press the Y key, then the Enter or Return key.
  5. Now, update the list of packages by running:
    sudo apt-get update

And it's done. You can now proceed with the official installation instructions: OpenFOAM Download and Installation

2.7 Building and installing ParaView

2.7.1 Building ParaView and plug-ins without Qt

Instructions on how to build ParaView 3.12.0 and the official OpenFOAM 2.2 plug-ins for ParaView, are available at the CFD-Online OpenFOAM forum, here: OpenFOAM 2.2.2 on a server (no X) - post #7 to #9

2.8 Why do I get the error message "fileName::stripInvalid() called for invalid"?

There are several threads at the CFD-Online Forums which give examples of such situations. One of the most describing one is this: reconstructPar --> fileName::stripInvalid() called for invalid fileName commandtouse

In summary, this error message always appears when a file name is provided that OpenFOAM considers invalid. This is because OpenFOAM follows a strict rule to use file names as if they were C/C++ coding names, where the following characteristics must be followed:

  • A name can start with an alphabet character or an underscore.
  • A name cannot have spaces in it.
  • A name cannot start with a digit (0 to 9), but it can have digits in any other place of its name.
  • A name cannot have quote symbols, namely: " '
  • A name can be a composite of several names, by using dots and parenthesis, namely: . ( )
  • A name cannot have unconventional symbols, including there characters: \ / : ; , |

This rule mostly applies to the names of items inside OpenFOAM dictionaries, where the only exception is regular expressions can be used inside dictionaries.

2.9 How to run the tutorials in OpenFOAM?

First of all, the tutorials being referred to here are the ones addressed in the introduction of chapter 2 in the OpenFOAM User Guide. In other words, the tutorials folder to be used, should be a copy of the original copy of tutorials, which can be done by running:

mkdir -p $FOAM_RUN
cd $FOAM_RUN/tutorials

which will create the default running folder, then copy the tutorials to said folder and then switch to the folder with our new copy of the tutorials. If you're wondering where this folder is located, run:

echo $FOAM_RUN

Now please study chapter 2 in the OpenFOAM User Guide.

Once the chapter is studied, here are a few guidelines regarding OpenFOAM's tutorials:

  1. The simplest way to run a tutorial in OpenFOAM is to run blockMesh followed by the name of the solver, such as icoFoam. To know the name of the solver in question, have a look into the file system/controlDict and see the name defined for the keyword application.
  2. But the situation changes when the case is more complicated. In those cases, there are a couple of helper scripts inside the case folder or inside the parent folder of that case, named Allrun and Allclean. To run them, simply prepend ./ to the script's name, e.g.:
    Some examples of tutorials that have these scripts:
    1. In OpenFOAM 2.1, the tutorial incompressible/simpleFoam/motorBike has got the Allrun script.
    2. Also in OpenFOAM 2.1, the tutorial incompressible/icoFoam/cavity does not have the Allrun script, but the parent folder incompressible/icoFoam does have that script. This means that this Allrun script will run all tutorials within the folder incompressible/icoFoam.

2.10 Common errors when building OpenFOAM from source code

This section of the FAQ addresses many of the known common building errors that can occur when building OpenFOAM from source code. It is not a thorough list, but it should at least help with some of the more common issues.

In addition to this, please keep in mind to use a compiler version which is known to be compatible with OpenFOAM, for which a list is being kept in the page Installation/Compatibility_Matrix.

2.10.1 icoFoam or blockMesh cannot be found?

Something went wrong when you tried to build OpenFOAM, but didn't notice it until you tried to run icoFoam or blockMesh and got a message like this:

blockMesh: command not found

And/or perhaps you did notice an error at the end of the build, something like this:

make: *** [multiphase] Error 2
make: Target `application' not remade because of errors.

Well, both issues are likely related. To diagnose what in fact went wrong, run the Allwmake script once again like this:

./Allwmake > log.make 2>&1

This will make a full log into the file log.make, including errors that are outputted during the building process (i.e. "2>&1" does the redirect of stderr to stdout).

You can then check if there are any errors by opening the file log.make with a text editor and search for lines have the expression "Error " (including the space after the word "Error"). Keep in mind that if your terminal is returning error messages in another language, then you should search for the respective word for "Error".

If you do find errors, the first one is usually the one to blame for all of the other errors after that. Unless of course you've spotted the error explained in the subsection below, namely: Weird error message: make: [install] Error 1 (ignored) - what does it mean? - in that case, you can ignore that particular error message and search for the next one, if there is any.

Once you've spotted the first real error message, search online for the main keywords in that error message, because it has likely already been found by other people and already solved.

2.10.2 Compilation error, something about triad.C:36, what's wrong?

As of OpenFOAM 2.2.0 it was no longer possible to compile OpenFOAM with GCC 4.4 and older. At that time the limitation was introduced in a somewhat artificial way, because the authors no longer could support building OpenFOAM with all versions of GCC from 4.3 to 4.8.

The error message in question is as follows:

primitives/triad/triad.C:36: error: expected initializer before '<' token
primitives/triad/triad.C:39: error: expected initializer before '<' token

More detailed information about this is provided on the following forum thread: Compile Error of OpenFOAM-2.2.0 on RedHat EL5 - but the short solution is simple: upgrade to using GCC 4.5 or newer.

2.10.3 Weird error message: make: [install] Error 1 (ignored) - what does it mean?

This error message usually occurs when building the Scotch library, through OpenFOAM's Allwmake script in the ThirdParty-* folder:

cp: cannot stat `../bin/d[agm]*': No such file or directory
make: [install] Error 1 (ignored)

This particular message occurs usually only occurs when cleaning up the Scotch building folder and can be ignored. If there are any problems, it's not because of this error message.

The explanation is simple: Scotch's building procedure requires one to build it directly in the source code folder, which makes it a requirement to clean up after the building and installation steps are complete, so that one can also build other architectures of OpenFOAM and Scotch. For example, if you need both 32 and 64-bit builds, you will need Scotch's source code folder to be cleaned from the previous build, so that the next build can occur with success.

2.10.4 CMake is refusing to configure my build of ParaView, what's going on?

Usually there are 2 situations where this can occur:

  1. When you're using a CMake version that is not compatible with the CMakeLists.txt present in the source code you're trying to build.
  2. When there is a conflict with another custom installation of CMake.

Therefore, the two above are somewhat related: either you need a newer CMake version or the one you're using is too new. Either way, you will likely have to build a custom CMake version.

For ideas on how to build CMake from source code, please refer to the pages dedicated to detail how to install OpenFOAM and ParaView on Linux: Installation/Linux. For example, see the step #12 on this page/section: Installation/Linux/OpenFOAM-2.2.2/Ubuntu#Ubuntu_10.04

But if the custom build you've made of CMake on purpose for a specific OpenFOAM version isn't working as intended, then perhaps you're getting an error message like this one:

CMake Error at /opt/cmake/Modules/CMakeTestCCompiler.cmake:52

This was discovered in the following forum thread: openfoam 2.3.0 installation in RHEL 5. The solution was as simple as running:


Then you should be able to use the custom build of CMake you've made for building ParaView.

2.10.5 wget keeps complaining something about an insecure connection?

The error message in question is for example this one:

ERROR: certificate common name `www.github.com' doesn't match requested host name `raw.github.com'.
To connect to raw.github.com insecurely, use `--no-check-certificate'.

As the error message implies, you can use the option --no-check-certificate when using wget. Another somewhat easier solution is to run the following command, before running wget several times:

alias wget="wget --no-check-certificate"

As the command implies, it's an alias for the command wget, which will automatically use the options defined in the command above.

Now, please keep in mind that this can be considered a security risk, because this means that you'll be accessing a secure website through HTTPS, but without a valid certificate for said communication. This is usually because the local copy of the certificate list installed on your system is outdated and you can still go ahead safely with the download. But in some situations it might mean that either the target website is in fact insecure/compromised or that there is a man-in-the-middle attack going on; this could at the very least mean that the data you're getting might be getting corrupted on download.

2.10.6 Unable to build setSet without readline?

The error message occurs something along these lines:

Found <readline/readline.h>  --  enabling readline support.
Making dependency list for source file writePointSet.C
Making dependency list for source file writeFuns.C
Making dependency list for source file writePatch.C
Making dependency list for source file setSet.C

... fast-forwarding a bit to the error message:

Make/linux64GccDPOpt/writePatch.o Make/linux64GccDPOpt/setSet.o -L/home/ofuser/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib \
	     -lmeshTools -lreadline -lOpenFOAM -ldl   -lm -o /home/ofuser/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/setSet
/usr/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status
make: *** [/home/ofuser/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/setSet] Error 1

Notice the very first line on the start of this description? Namely "enabling readline support"? The reason for this is that the readline library is only partially installed, where the header is present but the respective library isn't.

The quickest solution is to build setSet like this:

$FOAM_UTILITIES/mesh/manipulation/setSet/Allwmake NO_READLINE

If all goes well, it will have built setSet successfully without the readline library.

2.11 Uncommon errors when building OpenFOAM from source code

This section of the FAQ addresses many of the known and very rare building errors that can occur when building OpenFOAM from source code. It is not a thorough list, therefore please do add more as needed.

2.11.1 Wrong createFields.H file is included?

This was detected while debugging report #2386 at the OpenFOAM Foundation bug tracker.

The error was as follows:
In file included from /home/ofuser/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/postProcess.H:129:0,
                 from coldEngineFoam.C:47:
../XiFoam/createFields.H: In function ‘int main(int, char**)’:
../XiFoam/createFields.H:3:9: error: ‘psiuReactionThermo’ was not declared in this scope
 autoPtr<psiuReactionThermo> pThermo
CPLUS_INCLUDE_PATH the environment variable was incorrectly defined. For example, if the following command:
 export | grep  CPLUS_INCLUDE_PATH
shows something like this:
then the colon at the end is breaking the installation path. It seems to be a hard to reproduce bug in GCC, where an open definition of a path will lead to the first directory include path -I. be ignored.
Either unset the shell variable, for example by running:
or correct it, for example by running:
export CPLUS_INCLUDE_PATH="/home/ofuser/installed/hdf5/include"

2.11.2 Strange error message: target pattern contains no `%'. Stop.

This was (at least) detected back in 2012, namely here: OpenFOAM 2.1.1 Installation Errors on RHEL 6.3

The error was as follows:
$HOME/OpenFOAM/OpenFOAM-2.1.1/wmake/Makefile:148: *** target pattern contains no `%'. Stop.
$HOME/OpenFOAM/OpenFOAM-2.1.1/wmake/Makefile:148: *** target pattern contains no `%'. Stop.
GREP_OPTIONS was set in the shell environment with the option -n for also listing the lines where it occurs, which is used by grep, but which can affect all calls to this application, including within OpenFOAM's scripts and give weird outputs.
Unset this variable and use an alias instead. For example, by running the following commands:
alias grep='grep --color=auto'

2.11.3 Unable to source the file etc/bashrc, unless I use the complete path?

This was reported in #2310 at the OpenFOAM Foundation bug tracker.

Valid versions: OF Version 40.png OF Version 41.png

If the relative path to etc/bashrc is used for sourcing/activating the OpenFOAM environment, the following error will occur:
$ source etc/bashrc
bash: cd: etc/bashrc: Not a directory
bash: /OpenFOAM-4.1/etc/config.sh/functions: No such file or directory
bash: /OpenFOAM-4.1/bin/foamEtcFile: No such file or directory
bash: /OpenFOAM-4.1/bin/foamCleanPath: No such file or directory
bash: /OpenFOAM-4.1/etc/config.sh/functions: No such file or directory
This was a bug that was introduced before OpenFOAM 4.0 was released, but it was fixed with the aforementioned bug report #2310.
Solution 1
Do the modification mentioned in the respective commit 423ac54eabed at OpenFOAM 4.x, which is the following change to the file etc/bashrc:
-export FOAM_INST_DIR=$(cd ${BASH_SOURCE%/*/*/*} && pwd -P) || \
+export FOAM_INST_DIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) || \

Valid versions: OF Version 4.pngOF Version FoundationDev.png

Solution 2
As described in bug report #2310, it is possible that the shell environment CDPATH may be interfering. To check if it is affecting this, by running the following command:
echo $CDPATH
and if it outputs anything, then unset it:
unset CDPATH

2.12 How to uninstall/remove OpenFOAM?

It all depends on how you installed it in the first place:

Built from Source Code
If you built from source code (and assuming you didn't do anything outside of the usual steps), the removal/uninstallation steps are as follows:
  1. Go to the base folder where your OpenFOAM installation is located. For example:
    cd ~/OpenFOAM
  2. Now check the contents of this folder:
    ls -l
  3. Now you can try to remove the desired version, for example:
    rm -r OpenFOAM-2.3.0 ThirdParty-2.3.0
  4. Now check below the paragraph entitled "Common to all instructions".

Installed from Deb packages
If you installed on Ubuntu by following the Deb packages installation instructions, for example the official installation instructions for: Download v2.3.0 | Ubuntu - then you need to revert the installation steps used. For example, if the installation steps were these:
sudo apt-get install openfoam230 paraviewopenfoam410
then the command to remove/uninstall is this:
sudo apt-get remove openfoam230 paraviewopenfoam410
Now check below the paragraph entitled "Common to all instructions".

Installed from RPM packages
Here is depends on whether you installed on Fedora/RHEL or openSUSE:
  • Instructions for installing on Fedora are for example given here: Download v2.1.1 | Fedora - in this case, the uninstallation/removal command is:
    sudo rpm -e OpenFOAM-scotch-5.1.12-1 OpenFOAM-ParaView-3.12.0-1 OpenFOAM-2.1.1-1
    The same is applicable for RHEL.
  • Instructions for installing on openSUSE are for example given here: Download v2.1.1 | SuSE - in this case, the uninstallation/removal command is:
    sudo rpm -e OpenFOAM-scotch-5.1.12-1 OpenFOAM-ParaView-3.12.0-1 OpenFOAM-2.1.1-1
  • Note: the difference between Fedora/RHEL and openSUSE is pretty much none in these examples, because both used the rpm command for installing, therefore for uninstalling the same should be used. But the major difference between the two is the package manager:
    • For removing packages on Fedora/RHEL:
      sudo yum remove package_name
    • For removing packages on openSUSE:
      sudo zypper rm package_name
Now check below the paragraph entitled "Common to all instructions".

Common to all instructions
You need to fix your personal ~/.bashrc file, in order to remove the command line that loads the OpenFOAM shell environment. For more details, please refer to the section: Using aliases to help manage multiple OpenFOAM versions in the page Installation/Working_with_the_Shell.

2.13 What is root mode?

All Operating Systems usually have at least one administrator account, which is able to control all aspects of how the operating system that is installed in a computer (aka machine) and what other global installation packages are available to the users of that machine. In Linux and most Unix-like operating systems, there is a primary account named root, which is the primary (and usually only) administrator account (also known as the super-user).

To switch into root mode requires to either:

  1. Login as root, instead of logging in a as normal user. Note: Do not login as root for using the Desktop interface.
  2. Or start a new terminal/console and explicitly switch to root:
    su -
    Note: You can exit root mode by running:
  3. Or start a new terminal/console and implicitly switch to root using sudo (if you have premissions):
    sudo -s
    Note: You can exit root mode by running:
  4. Or in a new terminal/console use sudo (if you have premissions) to run the desired command, for example:
    sudo apt-get update

And how can you know if you're in root mode? Run in the terminal/console/command line:


If it tells you:


then you're in root mode.

2.14 Why am I getting "Permission denied" when I try to run a local script or application?

Sometimes when you run a local script, the command line will tell you that the permission is denied to do so. For example the Allrun scripts that OpenFOAM has got in its tutorial folders, which you're meant to run like this:


You might get an error message like this one:

bash: ./Allrun: Permission denied

There are at least two possible reasons for this to happen:

  1. In UNIX-like file systems (used in Linux and sometimes in Mac OS X), the files also need to have defined the permission executable. In order to give the permission to execute the script or application, you need to run chmod with the +x option. For example, run this command:
    chmod +x Allrun
    for giving the execution permission to the file Allrun.
    • This is because in these file systems, files and folders have at least types of permissions per category: read, write and executable. For more details, read about chmod.
    • In contrast, other operating systems (like Microsoft Windows) will simply rely on the file extension in order to know if the file is executable or not, for example: calc.exe where .exe is what tells the operating system that this file alleges to be executable.
  2. The other possibility is if you are trying to run the script inside a folder where you don't have enough permissions to use this folder and its contents. For example, if the folder is defined as read-only. In such a situation, there are two possible workarounds:
    1. If the folder is located in a read-only location, such as /opt/openfoam240/tutorials/incompressible/icoFoam/cavity, then it's advisable to make a copy to your own work folder, for example by running:
      cp -r /opt/openfoam240/tutorials/incompressible/icoFoam/cavity $FOAM_RUN/myCavity
    2. If the folder is already in your personal working folder path, then you need to either:
      • Change the write permissions for the folder, for example:
        chmod -R +w myCavity
        • -R is for recursively go into sub-folders.
        • +w is for making it writable.
      • Or change the ownership of the folder and files:
        chown -R user:group myCavity
        • The user is meant to be your user-name. When in doubt, run:
        • The group is meant to be the main group your user-name is assigned to. When in doubt, run:
          id -gn
        • Example:
          chown -R ofuser:users myCavity

3 FAQ/Physical

Questions about the physics implemented (boundary conditions and similar)

3.1 General

3.1.1 What is the meaning of the Field X

A table of the fields most commonly written by OpenFOAM-solvers can be found here.

3.1.2 Where do I enter the fluid-density for icoFoam, turbFoam and other incompressible solvers?

You don't. Instead of the dynamic viscosity \mu the kinematic viscosity \nu=\frac{\mu}{\rho} is used by the OpenFOAM-solvers.

Note: the pressure has to be normalized with the density, too. One consequence of this is that the dimensions of pressure become pressure divided by density.

3.1.3 What is the field phi that the solver is writing?

The mass flow through the cell faces (\rho \vec u \cdot \vec A with \vec A the area of the face). Keep in mind that solvers for incompressible flow will unlikely use \rho.

For more information, see also this table.

3.2 Boundary Conditions

3.2.1 What's the difference between the symmetryPlane and the zeroGradient boundary conditions?

The zeroGradient boundary condition sets the boundary value to the near-wall cell value.

A symmetryPlane boundary condition is a symmetry-plane which is equivalent to a zeroGradient for scalars, but not for vectors or tensors.

(Source: [10])

3.2.2 What does the lInf parameter mean in pressureTransmissive boundary condition?

lInf is the relaxation length-scale (in m) for outgoing pressure waves to return to pInf. This stops the pressure in the domain from floating about if the inlet pressure is not specified. (source: [11])

3.3 Turbulence modeling

3.3.1 How is wall-functions for RANS disabled and enabled?

All high-Re RANS turbulence models include wall-functions because it is inappropriate to use them without. Only the low-Re models operate without wall-functions as they include model-specific wall treatments.

(Source: [12])

3.4 Additional models

Has OpenFOAM been used to calculate this type of problems?

3.4.1 Eulerian two fluid model and granular flow

They are implemented in twoPhaseEulerFoam.

3.4.2 Viscoelastic flows?

Have been done. Will be released. For details see this thread on the Message Board.

4 FAQ/Solution procedure

Manipulating the solution procedure by non-programming means

4.1 How does one turn off the dimensional checking?

Dimensional checking is one of the cool features in OpenFOAM that helps to develop solvers that do something physically meaningful. Therefore: don't do this if not absolutely necessary.

To switch it off at run-time:

dimensionSet 0;

in the global controlDict file or in the local one. A few example paths:

  • In OpenFOAM 1.1: OpenFOAM-1.1/.OpenFOAM-1.1/controlDict
  • In OpenFOAM 1.5 and newer: OpenFOAM-1.5/etc/controlDict

For more details on how to set these options, see section Getting built-in feedback from OpenFOAM at HowTo_debugging.

A more controlled way is to use the dimensions()-method to set the dimension of the volXXXField in question to the desired dimension.

(source: How does one turn off the dimensional checking)

4.2 Is there a way to switch between single and double precision?

For Version 1.2 and older
Only by editing src/OpenFOAM/primitives/scalar/scalar.H and recompiling OpenFOAM. But why would you want to do that (except for memory issues)?

(source: [13])

For Version 1.3 and newer
Recompile OpenFOAM with single-precision enabled, by setting the environment variable WM_PRECISION_OPTION to SP. For more details, see section OpenFOAM Environment Variables at Installation/Working_with_the_Shell.

4.3 Why doesn't my solver have any residuals for the velocity equations?

  1. Edit the file system/fvSolution.
  2. Look inside the SIMPLE, PISO or PIMPLE block that you have configured for the solver you're using.
  3. You will find that you probably have momentumPredictor set to no.

    5 FAQ/Preprocessing

Preparing the simulations

5.1 How to quickly change the mesh with blockMesh

A description how to achieve this with m4 can be found here: How to quickly change the mesh with blockMesh

5.2 How do I set up a two-dimensional axisymmetric problem?

You use a contributed utility called makeAxialMesh.

5.3 How to export a Fluent mesh in ASCII?

For more information, read these posts:

5.4 How to convert Fluent mesh to OpenFOAM?

Read these wiki pages:

5.5 Why do I always get the error message "cannot find file" when converting a mesh?

For example, you're trying to convert a Fluent mesh to OpenFOAM and you get this error message after you run the conversion utility:

Create time
cannot find file
file: /home/ofuser/Desktop/system/controlDict at line 0.
    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 73.
FOAM exiting

Well, the error message should be self-explanatory: it cannot find a file that doesn't exist, namely the file system/controlDict. This is because OpenFOAM's applications almost always need a configured case folder to work in, so that it can know that it can operate within that folder and what are the settings to be used for doing what you want it to do.

Confused? Please read and study the chapter 2 of the OpenFOAM User Guide, which has 3 tutorials which explain most of the bases of what's needed for using OpenFOAM. Then study the tutorial case incompressible/icoFoam/elbow, where you will find a fully prepared cases folder and the file elbow.msh which has the mesh to be converted from Fluent format to OpenFOAM format. The script Allrun that is present in the parent folder incompressible/icoFoam/ has the steps for running this case, but essentially it sums up to running these commands:

fluentMeshToFoam elbow.msh
The first one is what you're looking for. Then it runs the solver and then it runs the commands for exporting the mesh and then results to Fluent format.

6 FAQ/Postprocessing

Working with the results

6.1 Postprocessing of Lagrangian particles

The following subsections describe the basics on how to post-process by Using foamToVTK and by Using paraFoam.

Beyond this, have a look into:

6.1.1 Using foamToVTK

With the latest OpenFOAM and ParaView versions, it's possible to post-process Lagrangian data directly in ParaView. However, if for some reason you cannot open the OpenFOAM case directly in ParaView, the workaround is to use foamToVTK and ParaView's existing ability to handle point data.

Follow these steps:

  1. Run the foamToVTK post-processing utility. As with all OpenFOAM programs, it requires at a minimum, the root and case paths.
  2. Read in your Eulerian data, if you wish.
  3. Read the Lagrangian data separately and 'Glyph' it. Glyphs are how ParaView represents point data. Usually, the sphere glyph is the most appropriate.

The glyphs used to represent particles can be colored and sized to reflect the data associated with the particle. If you cannot see your particles, check that indeed you have represented them as glyphs and that the size scaling you have chosen is adequately large.

6.1.2 Using paraFoam

First you execute paraFoam as usual but you select only in the data to be load the fields and the mesh of the continuous phase.

Then you click on the Open button (or File -> Open in the menu). You select the case.OpenFOAM file created by paraFoam. So you can load again the data of the case. But this time, you select:

  1. In Mesh Parts the lagrangian clouds (be sure that only lagrangian geometries are selected),
  2. In Volume Fields unselect everything.
  3. In Lagragian Fields select the fields you are interested in.
Example from ParaView using the .OpenFOAM case reader, showing which fields to select.

Then click on the Apply button.

To visualize the particle, use the Glyph filter (cf. end of previous paragraph).

Remark: Should work as of OpenFOAM-1.6 and ParaView 3.6.1.

6.2 Postprocessing of simulations on multiple mesh-regions

Two possibilites to do this are described on How To Postprocess Multiple Regions

6.3 Post-processing multiphase results

OpenFOAM handles multiphase simulations with multiphase flow solver through using a single field that represents the phase present at a certain cell, face or vertex. The field is usually named alpha or alpha1. For more information on how to analyse this field, see this page: How to post-process multiphase results

6.4 Artificial particle tracking in ParaView

This question refers to non-Lagrangian simulations, such as the ones done with icoFoam and simpleFoam, where the objective is to calculate the path that a particle would have if placed inside the flow domain. This is explained in some detail in the following forum post: do particle tracking in paraview? - post #3

6.5 Visual mesh diagnosis in ParaView

People usually tend to use the filters Slice and Clip to diagnose the interior mesh of a case. Although it's an idea in the right direction (wanting to look inside the mesh), it will not give you the best results for assessing if the mesh is OK or not. This is because these filters require that the polyhedral cells in the mesh be decomposed to tetrahedral cells and the resulting surfaces will all be composed by triangles.

The correct way to diagnose the cell structure mesh in ParaView is to use the filter Extract Cells by Region. In addition, you should load the mesh for the case without polyhedral decomposition:

To the right is an example of selecting the Use VTKPolyhedron option in the official reader, which usually appears when the file extension .OpenFOAM is used. Notice mesh representation shown in 3D by the filter Extract Cells by Region.

The file extension .OpenFOAM is usually used automatically when you simply run:

Example of selecting the "Use VTKPolyhedron" option in the official reader.
To the right is another example of how to not select the Decompose polyhedra option when the file extension .foam is used. Notice mesh representation shown in 3D by the filter Extract Cells by Region.

The file extension .foam is usually used automatically when you run:

  • In OpenFOAM:
      paraFoam -builtin
  • In foam-extend:
      paraFoam -nativeReader
Example of not selecting the "Decompose polyhedra" option in the internal reader.
If for some reason you cannot use the official or internal readers in ParaView, you can use foamToVTK to export the mesh without decomposing cells, by using the -poly option:
foamToVTK -poly
(no image available)

In addition to visual inspection, ParaView provides a Mesh Quality filter that is useful for identifying degenerate elements. It assigns a floating-point "quality" to each cell (many of these quality metrics are related to the condition number of the Jacobian which is used during numerical integration). Once the quality has been computed for each cell, you can use the Threshold filter to isolate only those cells that misbehave. Rendering the original mesh with transparency turned on (or in wireframe mode) will show the thresholded cells even if they are inside the mesh and would not otherwise be visible.

6.6 Using the internal .foam reader in ParaView

Depending on the OpenFOAM version or fork you're using, the paraFoam script is able to use the internal .foam reader:

  • OF Version 20.png OF Version 21.png OF Version 22.png OF Version 23.png and newer:
      paraFoam -builtin
  • OF Version 16ext.png OF Version 30ext.png OF Version 31ext.png:
      paraFoam -nativeReader

Otherwise, at least in most OpenFOAM versions, the default file extension used is .OpenFOAM, which usually is associated to the official OpenFOAM plug-in for ParaView, which needs to be built from OpenFOAM's source code.

6.7 Post-processing sub-domains (parallel/decomposed cases) in ParaView

Note: The following description assumes you've already studied the topic Using the internal .foam reader in ParaView.

There are a few ways to post-process cases that have been decomposed into sub-domains and that have been run in parallel, which as listed as follows:

Reconstructing the case
Sometimes the only accurate way of post-processing a case is to reconstruct it first (the opposite of decomposing). There are 2 main types of reconstruction:
  1. Using reconstructParMesh is only needed when a new mesh was generated in parallel. Usually this happens when using snappyHexMesh in parallel.
  2. Using reconstructPar should work on all other situations, where it will reconstruct the fields and dynamic meshes.
Using foamToVTK in parallel
When all fails, i.e. if you're not able to open the case directly in ParaView for whatever reason, you can still run foamToVTK in parallel, the exact same way you executed the solver or mesher in parallel. For example, if you ran the solver like this:
foamJob -p simpleFoam
Then you can also run foamToVTK like this:
foamJob -p foamToVTK
Then you can open the respective files for the respective sub-domains that are related to each processor* folder.
Opening one processor* folder at a time
paraFoam can be used for opening directly a sub-domain, by running something like this:
paraFoam -case processor0
Using the internal reader
Example from ParaView 4.1.0 where the option for reconstructed and decomposed case type is selectable.
As mentioned before, the topic Using the internal .foam reader in ParaView already addresses the fact that the internal reader can be used in many cases. What might not have been mentioned, is that there is an option to open the decomposed case, instead of using the default option of opening the reconstructed case, as shown in the image on the right.
The idea here is that this will allow you to post-process the case without having to first reconstruct the case.

6.8 I'm using Ubuntu, where is the main menu in ParaView?

That's a feature of Ubuntu's Unity, where the menu is on the bar on the top of the screen. To see the menu, follow these steps:

  1. Look at the top bar on your screen.
  2. Move your mouse cursor over that bar...
  3. Aim a bit to the middle/middle-left of the screen...
  4. See the menu appearing there?

6.9 Using the internal reader in ParaView cannot load unknown boundary conditions?

There are several special boundary conditions in OpenFOAM that do not write/use the entry value in a boundary condition, which leads to the internal reader that opens with the file extension .foam to fail to load the fields.

  1. Artificially add the value entry with Template:ChangeDictionary.
  2. Use foamToVTK to export the results.
  3. Use the official OpenFOAM reader that is built with OpenFOAM.

7 FAQ/Programming

Questions about writing applications and solvers

7.1 Compiling

7.1.1 Where does wmake get the values for the environmental variables from?

All wmake variables come from (in this order)

  1. $WM_DIR/rules/General/general
  2. $WM_DIR/rules/${WM_ARCH}${WM_COMPILER}/general
  3. $WM_DIR/rules/${WM_ARCH}/c++

(Source: [14])

For a complete list of foam related environment variables, see Environment_variables.

7.1.2 What does "-lOpenFOAM" and '-lfiniteVolume' mean?

For example, in the file src/finiteVolume/Make/options is the following content: EXE_INC = \

   -I$(LIB_SRC)/triSurface/lnInclude \
   -I$(LIB_SRC)/meshTools/lnInclude \


   -lOpenFOAM \
   -ltriSurface \

The last 3 lines refer to the libraries OpenFOAM, triSurface and meshTools:

  • On Linux, this equates to the respective 3 files: libOpenFOAM.so, libtriSurface.so and libmeshTools.so
  • On Mac OS X, this equates to the respective 3 files: libOpenFOAM.dylib, libtriSurface.dylib and libmeshTools.dylib
  • On Window, this equates to the respective 3 files, although there are two variants of files:
    • The interface files: libOpenFOAM.a, libtriSurface.a and libmeshTools.a - these are always needed for building on Windows with GCC.
    • The actual binary library files, i.e. the ones used for running OpenFOAM: libOpenFOAM.dll, libtriSurface.dll and libmeshTools.dll

For a lot mode details about this, read: 3. Shared Libraries chapter at tldp.org

7.2 Working with fields

7.2.1 How to calculate the field value of an arbitrary point?

See Calculating the field value at an arbitrary point.

7.3 OpenFOAM's template library

7.3.1 What is the object registry?

See objectRegistry explained.

7.3.2 What do the filenames mean?

OpenFOAM's file naming convention. For exampleClass, these filenames may exist:

  • exampleClass.H - Main header.
  • exampleClass.C - Main body.
  • exampleClassFwd.H - Forward declarations.
  • exampleClassI.H - Inline functions implemented.
  • exampleClassIO.C - IO functions implemented.
  • exampleClassM.H - Macros.
  • exampleClassFunctionName.C - FunctionName's implementation (seperated for no other reason than aesthetics).

There may be others as well. Unknown naming conventions:

  • exampleClasss.H
  • exampleClasss.C

Some filenames add an s to the end. These may be associated with static variables / functions. They may also be associated with the NoRepository flag.

7.3.3 What is tmp<>?

See tmp explained.

7.3.4 What is runtime selection?

See Runtime selection mechanism.

7.4 Adding new features

7.4.1 How do I add a new wall-function?

See the How-To: Adding a new wall-function.

7.4.2 How do I add a new boundary condition?

See the How-To: Adding a new boundary condition.

7.5 Frequently occurring issues

7.5.1 error: call of overloaded ‘sqrt(double)’ is ambiguous

For example, if you use a piece of code like this one:

volScalarField strainRate = sqrt(2.0)*mag(symm(fvc::grad(U)));

you're likely to get this error message:

error: call of overloaded ‘sqrt(double)’ is ambiguous

Possible solutions, instead of simply using sqrt(2.0):


The reason for this is that OpenFOAM has got several function overloads for sqrt for dealing with fields, but it does not overload the original function sqrt, which leads to the compiler getting confused with which overload it should uses.

For more details, please refer to posts #10 and #11 on this thread: adding strainRate in a solver

8 FAQ/Troubleshooting

Figuring out what went wrong

8.1 An application ends with a segmentation fault. What is wrong?

A segmentation fault usually occurs when a program tries to access memory outside its bounds (see Segmentation Fault on Wikipedia). In OpenFOAM this usually occurs when a List<> or similar is accessed with an index outside of the allocated domain. To find out where this occurs see make a separate copy of the OF-sources, recompile them with the switch WM_COMPILE_OPTION set to Debug (just uncomment the right lines in the bashrc/cshrc files). This makes OF run slower, but accesses to List<> etc are checked for ranges and the program aborts if you access outside of a range (plus you get a stack trace). This won't solve your problem, but it will help you find out where it occurs.

See also General debugging tips. For recompiling OpenFOAM look at Installation (specially page Installation/Working_with_the_Shell) or the older page Howto_compile_OpenFOAM.

8.2 My program stops with an output that starts with #0 Foam::error::printStack(Foam::Ostream&)

You encountered a program error. Upon hitting that error OpenFOAM produced a stack trace (a list of the functions that were called) which is very useful to find the location at which the problem occured. It is possible to get that stack-trace with the source files and the line numbers of the functions which might help to find out what the problem is. To do so you have to compile a debug version of OpenFOAM. (see also the segmentation fault-question above)

8.3 I'm unable to reproduce a crash. What's going on?

If you run the same exact simulation twice or more times, but there is an occasional crash in different places, then there are a few possibilities:

  • There could be a numerical instability in the calculations. This could be due to the compiler options used (such as --fast-math).
  • There could be some randomness introduced somewhere by a pseudo-random number generator. This is common in the particle/chemical type solvers in OpenFOAM.
  • There could be a hardware problem. In this case, check this page: How to Check if RAM and CPU are OK

8.4 Cannot open script file?

The common error messages for this scenario are:
./Allwmake: 7: .: Can't open /wmake/scripts/AllwmakeParseArguments
./Allrun: 5: .: Can't open /bin/tools/RunFunctions
Reason and solution
The OpenFOAM environment is not properly activated. For more details, read Installation/Working_with_the_Shell.

8.5 Cannot use the -fields option in foamToVTK?

Using the following command:
foamToVTK -fields p
gives the following (somewhat) cryptic error message:
incorrect first token, expected <int> or '(', found on line 0 the word 'p'
As listed in foamToVTK, the help message states: the following:
-fields <wordList>
                   only convert the specified fields - eg '(p T U)'
this means that the complete list structure needs to be used, including quotes and parenthesis:
foamToVTK -fields '(p)'
because the parenthesis are needed for the list that OpenFOAM was complaining that it wasn't finding and the quotes are needed for the shell to not think that this was a sub-shell request.

9 FAQ/Specific solvers and utilities

Issues related to specific solvers and/or utilities

9.1 The porous-solvers

9.1.1 Where do I find rhoPorousSimpleFoam etc ?

These solvers are found in $FOAM_TUTORIALS along with their example cases. You have to compile them yourself before using them.

10 FAQ/Outdated

Very old topics, mostly because the development was stopped on these items or because the default options have changed

10.1 FoamX doesn't know my new solver

Look here: Howto_adding_a_new_solver_to_foamX

10.2 FoamX is unable to contact name server

These problems are almost always one of the following:

  1. the hostname is not set ('localhost' is not acceptable to Corba)
  2. the hostname is not (or twice) in /etc/hosts
  3. only the truncated name is present in /etc/hosts
  4. some port opening problem due to security
  5. libelf is missing
  6. libXp is missing
  7. SELinux is conflicting
  8. nscd (the name service caching daemon) is not running

(see the Message Board for issues on hostname, libelf, libXp, SELinux and nscd, and for general discussion on FoamX problems)

10.3 Why doesn't FoamX allow me to enter numbers?

FoamX is set up to run on a system where the default language is English. If you want to run it on a system which uses another language, you have to manually modify the ~/OpenFOAM/OpenFOAM-1.3/bin/FoamX script.

  • For Linux and other UNIX-like systems, add the line:
export LANG=en_EN

at the beginning of the FoamX script, and the line:


at the end of the same file, replacing your_LANGUAGE_CODE with the corresponding code of the language in use in your system (for example, it_IT for italian).

(Source [15])

  • For a Cygwin/Windows system, add the line
    -Duser.language=en \

in the last part of the FoamX script so that it looks like as follows.

"$jdkhome/bin/java" \
    -cp "$jars" \
    -DFoamX.SystemPath="$WM_PROJECT_DIR" \
    -DFoamX.SystemConfigPath="$FOAMX_CONFIG" \
    -DFoamX.UserConfigPath="$FOAMX_CONFIG" \
    -Duser.language=en \
    FoamX.App $orbArgs $args

(Source [16])

10.4 How can I make a solver stop if the solution contains NaNs ?

Usually OpenFOAM keeps calculating even if the solution contains NaNs (Not a number) and therefore is of no use. To avoid this set the environment variable FOAM_SIGFPE to a non-zero value. In tcsh:

setenv FOAM_SIGFPE 1

or in bash:

export FOAM_SIGFPE=1

11 FAQ/Wiki

About this Wiki

11.1 Is this Wiki affiliated with OpenCFD/ESI ?

No. This Wiki is a community effort. Its aim is to give people a place where they can collect/publish information about OpenFOAM and related projects.

11.2 Am I allowed to contribute?

Yes. That is the idea behind a Wiki: if you have something valuable to say, then do it. If your fellow contributors think that it is inappropriate/erroneous they will edit it accordingly. But you'd be surprised how seldom this is necessary

11.3 I found an error/outdated information/missing stuff. Whom do I contact?

Nobody. Get an account and edit the information with the error. That is the idea behind a Wiki: everyone is an editor

11.4 If the policy is so liberal why do I have to apply for an account to edit?

In the past lots of accounts were created by programs (so called bots) for spamming purposes. As this couldn't be prevented with automatic measures it is now necessary that people apply for an account via this form. The application will be reviewed by a human (usually within a workday) and an account will be created.

To make sure that requests are filed by real humans that have an interest in OpenFOAM two things are checked

  • A valid EMail-address (this is checked automatically by sending you an EMail)
  • A short (200 characters) biography. Information of interest is your current affiliation, your formal qualifications and what you're using OpenFOAM for (or what you're planning to use for). Applications where this is nonsense or copy/paste from other places will be denied.

After the creation of the account almost all pages can be edited.

11.5 I have a valid account but am no able to edit some pages

Certain pages (most notably landing page) are only editable for admins. The purpose of this is to prevent vandalism and avoid the breaking of pages with complex layouts

11.6 Are there any rules to what should go where?

Yes there are. They can be found here. But they are a bit outdated. Most of the time common sense and looking at how other people did it is sufficient.

11.7 I want to help, but I don't know what I should write about

If you don't know yet what to write about, and even if you're still getting familiar with OpenFOAM, then use this opportunity to pick a topic for studying and documenting one or more of several OpenFOAM features, topics and projects, by picking one or more from the following lists:

  • The category Category:Incomplete pages lists all of the pages that are known to be still incomplete. Feel free to browse through them and to pick a topic to study upon and to then add information to that page based on what you learned.
  • The page FAQ/Wiki/Ideas provides a good list of ideas for new pages and for improvements to existing pages.
  • The Installation page can always use more help, so browse around there and be sure to read the help sections at the end of each major installation topic.

11.8 I have some information (an event, news, my company ...) that I want to add to the front page

The front page is not directly editable, but there are certain places where users can add their information and it will be included. Information that can be added is

  • Events: Section 2 of the front page
  • News: Section 10 of the front page
  • Learning (Training): Section 3 of the front page
  • Links: Section 8 of the front page

Details can be found in this and this news-item

11.8.1 The News Item/Event information I added doesn't show up on the front page

This is discussed here. The reason is that for performance reasons the Wiki-software caches queries with dynamic content and changes might take a couple of hours to show up.

11.9 How to use OpenFOAM version templates?

See the page Help:Editing, section Version Templates.

11.10 How to create new OpenFOAM version templates?

The version templates are built in an hierarchical way, as demonstrated by the following list:

  • Template:VersionTemplate - This is the main automated version template, which will automatically generate the image and the category for any version, as long as the correct options are provided. Further instructions regarding it are provided on its own talk page, but here is a summary/example description:
    • Template:Version2.2 - This is an example of a template page that simply has the following wiki-code inside it:
      • The first option - "22" - is the version name for the image file associated to this version.
      • The second option - "2.2" - is the version number used for the category name.
      • The third option - "V" - is meant to either be "v" or "V", because some image files used the name "version" and others use "Version".
  • Template:VersionTemplateExtend - This is the automated version template for the old Extend variants of OpenFOAM, such as 1.5-dev and 1.6-ext. Further information is also available at its own talk page, but here is a summary/example description:
    • Template:Version1.6-ext - Uses the following wiki-code:
      The reasoning for each argument is the same as for the description made for the (official) OpenFOAM version templates.
  • Template:VersionTemplateFoamExtend - This is the automated version template for the new Extend variants of OpenFOAM, which are named "foam-extend". For practical wiki editing reasons, the version template mechanism to be followed should remain the same, namely:
    • Template:Version3.0-ext - This is the template for "foam-extend-3.0", which follows the same version numbering as before, but the main Template:VersionTemplateFoamExtend will take care of giving the correct category name to this variant (fork) of OpenFOAM. The wiki-code used inside this version template is:

All of these templates use the same image file naming convention, e.g.:


Therefore, be sure to use the same convention.

11.11 How to create new template images for the OpenFOAM versions?


  1. Download this package: Toolkit for creating OF version logos using Gimp
  2. Unpack it in your own computer.
  3. The files with the extension .xcf are the template files and are meant to be edited with Gimp. The files are as follows:
    • OF_Dev_Version_Major.xcf - This is for the old "-dev" variants of OpenFOAM 1.4 and 1.5. OF Version 15dev.png
    • OF_Ext_Version_Major.xcf - This is for the old "-ext" variants of OpenFOAM 1.6, e.g.: OF Version 16ext.png
    • OF_Version_Major.xcf - This is for the major version numbers of the official releases of OpenFOAM, e.g.: OF Version 21.png
    • OF_Version_Minor.xcf - This is for the minor version numbers of the official releases of OpenFOAM, e.g.: OF Version 220.png
  4. The objective is to edit the desired template file and modify the text layer for the version number and update it.
  5. Export in Gimp the resulting edited file to PNG.
  6. As for the name of the file and upload to the wiki, check the section How to create new OpenFOAM version templates?