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.
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:
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 ls
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.
Create openfoam (Initialize case-sensitive volume, only needed first time)
cd $HOME/openfoam openfoam7-macos
Everything else can be followed on https://openfoam.org/download/7-macos/ site.