OpenFOAM is a free, open source CFD software released and developed by OpenCFD Ltd since 2004. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. See documentation
OpenFOAM is professionally released every six months to include customer sponsored developments and contributions from the community - individual and group contributors, integrations (eg, from FOAM-extend and OpenFOAM Foundation Ltd) as well as governance guided activities.
OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file COPYING in this directory or http://www.gnu.org/licenses/, for a description of the GNU General Public License terms under which you may redistribute files.
OpenCFD Ltd grants use of its OpenFOAM trademark by Third Parties on a licence basis. ESI Group and OpenFOAM Foundation Ltd are currently permitted to use the Name and agreed Domain Name. For information on trademark use, please refer to the trademark policy guidelines.
Please contact OpenCFD if you have any questions about the use of the OpenFOAM trademark.
Violations of the Trademark are monitored, and will be duly prosecuted.
If OpenFOAM has already been compiled on your system, simply source
etc/cshrc file and get started.
For example, for the OpenFOAM-v2212 version:
If you are compiling OpenFOAM from source, please see the relevant guides:
If you need to modify the versions or locations of ThirdParty software, please read how the OpenFOAM configuration is structured.
The value of the
$WM_PROJECT_DIR or even
not guaranteed to have any correspondence to the OpenFOAM release
(API) value. If OpenFOAM has already been compiled, the build-time
information is embedded into each application. For example, as
Using: OpenFOAM-com (2012) - visit www.openfoam.com Build: b830beb5ea-20210429 (patch=210414) Arch: LSB;label=32;scalar=64
This output contains all of the more interesting information that we need:
|version||com (eg, local development branch)|
|label/scalar size||32/64 bits|
The Arch information may also include the
if different than the
As can be seen in this example, the git build information is
supplemented by the date when the last change was authored, which can
be helpful when the repository contains local changes. If you simply
wish to know the current API and patch levels directly, the
wmake -build-info provides the relevant information even
when OpenFOAM has not yet been compiled:
$ wmake -build-info make api = 2012 patch = 210414 branch = master build = 308af39136-20210426
Similar information is available with
foamEtcFile, using the
-show-patch options. For example,
$ foamEtcFile -show-api 2012 $ foamEtcFile -show-patch 210414
This output will generally be the easiest to parse for scripts.
$FOAM_API convenience environment variable may not reflect the
patching changes made within the currently active environment and
should be used with caution.
OpenFOAM normally ships with a directory of 3rd-party software and build scripts for some 3rd-party software that is either necessary or at least highly useful for OpenFOAM, but which are not necessarily readily available on every operating system or cluster installation.
These 3rd-party sources are normally located in a directory parallel to the OpenFOAM directory. For example,
/path/parent |-- OpenFOAM-v2212 \-- ThirdParty-v2212
There are, however, many cases where this simple convention is inadequate:
When no additional 3rd party software is actually required (ie, the operating system or cluster installation provides it)
When we have changed the OpenFOAM directory name to some arbitrary directory name, e.g. openfoam-sandbox2212, etc..
When we would like any additional 3rd party software to be located inside of the OpenFOAM directory to ensure that the installation is encapsulated within a single directory structure. This can be necessary for cluster installations, or may simply be a convenient means of performing a software rollout for individual workstations.
When we have many different OpenFOAM directories for testing or developing various different features but wish to use or reuse the same 3rd party software for them all.
The solution for these problems is a newer, more intelligent discovery when locating the ThirdParty directory with the following precedence:
v2212-myCustom, without requiring a renamed ThirdParty. The API value would still be
2212and the original
ThirdParty-v2212/would be found.
If none of these directories are found to be suitable, it reverts to using PROJECT/ThirdParty as a dummy location (even if the directory does not exist). This is a safe fallback value since it is within the OpenFOAM directory structure and can be trusted to have no negative side-effects. In the above, the following notation has been used:
||The OpenFOAM directory|
||The OpenFOAM parent directory|
||The api or release version|
||The version we have chosen|
To reduce the potential of false positive matches (perhaps some other
software also uses ThirdParty-xxx for its naming), the directory test
is accompanied by a OpenFOAM-specific sanity test. The OpenFOAM
ThirdParty directory will contain either an
Allwmake file or a
Copyright 2016-2022 OpenCFD Ltd
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容，可点击提交进行申诉，我们将尽快为您处理。