I decided to write this after attempting to install Openfoam7 on my Mac. The original instructions on https://openfoam.org/ seem more complex than need be.


This following list will help figure-out if Openfoam7 will run on your mac.

1. MMU

Run the following code to check if your computer has intel support for memory management unit (MMU).

sysctl kern.hv_support

This should return kern.hv_support: 1. If this returns kern.hv_support: 0, then your mac is not enabled for virtualization and may not support Openfoam.

2. OSX Version

Run the following code the check your macs version.

sw_vers -productVersion

This should return a number equal or bigger than 10.10.3.

3. Memory

Run the following code to check total ram in your mac.

system_profiler SPHardwareDataType | grep "  Memory:"

This should return at least 4 GB.

4. Virtual Box

Run the following code if you have VirtualBox installed.

VBoxManage -version

This should return a number equal to or greater than 4.3.30. If you get an error, then you might not have virtual box installed (and thats okay). If the number is lower, then upgrade or remove.

Install Openfoam7

  1. Install Homebrew. This will make life much easier.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Install and open docker.
brew cask install docker
open -a docker
  1. Install openfoam7-macos
sudo curl --create-dirs -o /usr/local/bin/openfoam7-macos http://dl.openfoam.org/docker/openfoam7-macos
sudo chmod 755 /usr/local/bin/openfoam7-macos
  1. Install and open xquartz.
brew cask install xquartz
  1. Setup xQuartz
    • Open XQuartz.
    • XQuartz → Preferences → Security
    • Check the following and restart app:
XQuartz Openfoam7 for mac

Test Case Sensitivity

Run the following code, it will create a folder called ‘testFolder’, inside two case sensitive files will be made.

mkdir Downloads/testFolder
cd Downloads/testFolder
touch cancase && touch canCASE

# If not case-sensitive, one file will be made. Run this code. 

If not case-sensitive, run this code.

# if NOT case-sensitive 

sudo curl -o /usr/local/bin/openfoam-macos-file-system http://dl.openfoam.org/docker/openfoam-macos-file-system
sudo chmod 755 /usr/local/bin/openfoam-macos-file-system

If case-sensitive, two files will be made. Nothing else needs to be done, but if you ran the code above… run this code.

# IF case-sensitive
openfoam-macos-file-system -h

Launching openfoam7

Create openfoam (Initialize case-sensitive volume, only needed first time)

openfoam-macos-file-system create

Now run the following code to open Openfoam

cd $HOME/openfoam


If you made it this far, you have successfully installed openfoam7. If something is missing here feel free to comment below.

There are currently no comments.