Ubuntu 14.04以上版本支持pack安装。
1. add repository
sudo add-apt-repository "http://dl.openfoam.org/ubuntu dev"
2. add public keys
sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
3. Update 源
sudo apt-get update
4. 安装
sudo apt-get -y install openfoam-dev
5. 环境变量配置
vim ~/.bashrc
在最后新加入一行:source /opt/openfoam-dev/etc/bashrc
Enjoy!