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.
Run the following code to check if your computer has intel support for memory management unit (MMU).
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.
This should return a number equal or bigger than 10.10.3.
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.
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 Homebrew. This will make life much easier.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install and open docker.
brew cask install docker open -a docker
- 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
- Install and open xquartz.
brew cask install xquartz
- Setup xQuartz
- Open XQuartz.
- XQuartz → Preferences → Security
- Check the following and restart app:
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 ls # 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
Create openfoam (Initialize case-sensitive volume, only needed first time)
Now run the following code to open Openfoam
cd $HOME/openfoam openfoam7-macos
If you made it this far, you have successfully installed openfoam7. If something is missing here feel free to comment below.