🎉 OpenFOAM v2406 is now available! |
---|
Native OpenFOAM as a Mac app, with binaries compiled from the OpenFOAM source code. Intel and Apple silicon variants.
- An Apple silicon or Intel Mac
- A recent version of macOS
- Apple silicon: macOS 14 Sonoma
- Intel: macOS 12 Monterey or later
- Running an older version of macOS? See here
-
✨ Get the latest OpenFOAM version with Homebrew (recommended):
brew install --no-quarantine gerlero/openfoam/openfoam
-
Or, choose the OpenFOAM version(s) you want:
-
OpenFOAM v2406
-
Install with Homebrew:
brew install --no-quarantine gerlero/openfoam/openfoam@2406
-
Manual download: ⬇️ Apple silicon | ⬇️ Intel
-
-
OpenFOAM v2312
-
Install with Homebrew:
brew install --no-quarantine gerlero/openfoam/openfoam@2312
-
Manual download: ⬇️ Apple silicon | ⬇️ Intel
-
-
-
Need an older version of OpenFOAM? See here
Just open the OpenFOAM app to start an OpenFOAM session in a new Terminal window.
That's it! When using OpenFOAM, a read-only volume will be loaded and visible in the Finder. The OpenFOAM installation lives inside this virtual disk. When you're not actively using OpenFOAM, it is safe to "eject" the volume from the Finder sidebar.
💻 From the command line: when installed with Homebrew, the app includes a terminal command that starts an OpenFOAM session:
openfoam
If you did not install with Homebrew, you can get the same by invoking the following command (replace the path and app name as needed):
/Applications/OpenFOAM-v2312.app/Contents/Resources/etc/openfoam
Get the native macOS version of ParaView from the official site or install with Homebrew (prefer the latter if you'd like to use OpenFOAM's paraFoam
command).
Why do I see a dialog that says the app "cannot be opened because the developer cannot be verified"?
This message appears because the app is not notarized by Apple. You can tell macOS to allow the app to run by right-clicking on the app in a Finder window and selecting Open from the context menu. You only need to do this for the first launch of the app.
If you're installing with Homebrew, the suggested --no-quarantine
option does this for you on install.
Yes. Just a few things to keep in mind:
-
The OpenFOAM installation itself is not user-writable. This is very much intentional (and is similar with how it works with packaged OpenFOAM on Linux). The right way to install additional solvers and libraries is to place the binaries in
$FOAM_USER_APPBIN
and$FOAM_USER_LIBBIN
respectively. See here for an example of a project that installs this way. -
The compiler used on macOS is Apple's Clang, which is not the same as the GCC compiler used by default on Linux. If your code was never tested with Clang before, some lines might require a little tweaking (this is the most common fix that is needed) to be able to build across both compilers.
-
The default macOS filesystem is case-insensitive, which differs from Linux. See below for what this means.
OpenFOAM is notably developed with a case-sensitive filesystem in mind. This is a non-issue on Linux systems, which conventionally use case-sensitive filesystems. In practice, a case-sensitive filesystem means that two different files named phi
and Phi
in the same directory can exist just fine. In contrast, a case-insensitive filesystem, as is the default on macOS, will only allow one of those files to exist in the same folder.
This project gets around potential case-sensitivity issues by putting OpenFOAM itself inside a (read-only) disk image with its own case-sensitive filesystem, which is mounted as a virtual volume during use. This is enough to accommodate OpenFOAM, and for most purposes you can just use your regular filesystem for everything else (e.g. to store OpenFOAM cases).
However, there are a few circumstances where this is not sufficient (e.g. solvers/cases using case-sensitive field names). If you fall under one of these, consider creating a case-sensitive disk image with the macOS Disk Utility for the case-sensitive stuff.
You are attempting something that requires development tools (e.g. a compiler), and you do not have such tools installed yet. Just follow the steps to install the necessary tools from Apple and you should be good to go.
If you cannot upgrade to a newer macOS, you still have a few alternatives:
-
Try installing the latest release anyway. The required macOS versions are those on which the latest release has been tested and is known to work. It is likely that the app will work too on some previous versions of macOS, but due to limited resources I cannot test with older OS versions
-
Download an older release that was tested with your configuration:
-
Apple silicon — last release tested with macOS 13 Ventura: OpenFOAM.app 1.10.2 (⬇️ OpenFOAM v2306, ⬇️ OpenFOAM v2212, ⬇️ OpenFOAM v2206, ⬇️ OpenFOAM v2112)
-
Apple silicon — last release tested with macOS 12 Monterey: OpenFOAM.app 1.8.5 (⬇️ OpenFOAM v2206, ⬇️ OpenFOAM v2112)
-
Intel — last release tested with macOS 11 Big Sur: OpenFOAM.app 1.11.1 (⬇️ OpenFOAM v2306, ⬇️ OpenFOAM v2212)
-
Intel — last release tested with macOS 10.15 Catalina: OpenFOAM.app 1.8.5 (⬇️ OpenFOAM v2206, ⬇️ OpenFOAM v2112)
-
-
Or, you can try building the app from source on the system where you'll be using it
Whatever alternative you choose, please avoid opening an issue if something doesn't work as expected when running an older version of macOS.
If you need an older version of OpenFOAM, you can:
-
Use an older release of OpenFOAM.app (note that these apps are no longer updated):
-
- Homebrew:
brew install --no-quarantine gerlero/openfoam/openfoam@2306
- ⬇️ Apple silicon: tested with macOS 14 Sonoma
- ⬇️ Intel: tested with macOS 12 Monterey through macOS 14 Sonoma
- Homebrew:
-
- Homebrew:
brew install --no-quarantine gerlero/openfoam/openfoam@2212
- ⬇️ Apple silicon: tested with macOS 14 Sonoma
- ⬇️ Intel: tested with macOS 11 Big Sur through macOS 13 Ventura
- Homebrew:
-
- Homebrew:
brew install --no-quarantine gerlero/openfoam/openfoam@2206
- ⬇️ Apple silicon: tested with macOS 13 Ventura and macOS 14 Sonoma
- ⬇️ Intel: tested with macOS 11 Big Sur through macOS 13 Ventura
- Homebrew:
-
- Homebrew:
brew install --no-quarantine gerlero/openfoam/openfoam@2112
- ⬇️ Apple silicon: tested with macOS 13 Ventura and macOS 14 Sonoma
- ⬇️ Intel: tested with macOS 11 Big Sur through macOS 13 Ventura
- Homebrew:
-
-
Or, you can try your luck at building the app from source with the version of OpenFOAM you need
Please avoid opening an issue if something doesn't work as expected when using an older version of OpenFOAM.
Can I get an app for a version from the OpenFOAM Foundation (openfoam.org, e.g. OpenFOAM 10)?
No. The OpenFOAM Foundation's distribution does not support native compilation on macOS.
If you installed with Homebrew, uninstall with brew uninstall
. If you downloaded manually, delete the app.
If you need to, building an OpenFOAM.app entirely from source is easy as cloning this repo and running make
, i.e.:
git clone https://github.com/gerlero/openfoam-app.git
cd openfoam-app
make
The Xcode Command Line Tools are required. See the available configuration variables and alternative targets for make
in the Makefile
. Note that the compilation of OpenFOAM and the necessary dependencies from source may take a while.
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks.
OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.