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


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:

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

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.

openfoam-macos-file-system -h

Launching openfoam7

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

openfoam-macos-file-system create

Open Openfoam

cd $HOME/openfoam


Everything else can be followed on https://openfoam.org/download/7-macos/ site.