Installing OpenFOAM
Fondamental :
OpenFOAM is originally available and developed for Linux environment. However, since recently, some possibilities works well in a Windows environment. The following gives you two alternatives for using it in Windows and also directly on Linux Ubuntu.
Running OpenFOAM on Windows 10
The packaged distributions of OpenFOAM for Ubuntu can be installed directly on Microsoft Windows 10 using Bash on Ubuntu on Windows, a full compatibility layer for running Linux applications on Windows through the Windows Subsystem for Linux (WSL). Additional X server software is needed to run graphical applications, such as the version of ParaView that includes the official OpenFOAM reader module.
The updated guidelines from OpenFOAM fundation are here :
Méthode : Activate Windows Subsystem for Linux
Follow the Guide to Install the Windows Subsystem for Linux and install the Ubuntu Linux Distribution.
Launch the Ubuntu distribution through WSL.
Méthode : Installing OpenFOAM
Type the following command lines in the Ubuntu shell :
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam7
One installed, you have to type some additional command lines to finish the configuration and make OpenFOAM commands recognizable by the system :
echo ". /opt/openfoam7/etc/bashrc" >> $HOME/.bashrc
. $HOME/.bashrc
You can test if installation is working by typing :
simpleFoam -help
Méthode : Enabling graphical applications
In order to have access to some graphical applications (Paraview for post-processing, notepad...), you have to install a X server software :
Download the Xming installer.
Run the Xming installer using the default settings.
Launch Xming and it runs in the background, visible in the system tray, waiting for a graphical Linux application to be launched.
Type the following command to make your Xming installation works :
echo "export DISPLAY=:0" >> ${HOME}/.bashrc
. $HOME/.bashrc
Finally, you can install the gedit editor which can be useful :
sudo apt-get install gedit gedit-plugins