Installation on Windows Subsystem for Linux

It is possible to run OpenQBMM directly on computers executing Windows 10, on which the Windows Subsystem for Linux (WSL) has been installed. This guide will show you how to install WSL, and run OpenFOAM and OpenQBMM on it. Windows 10 Fall Creators Update or following is required to use this procedure.

Installing WSL on Windows 10 Fall Creators Update

The following steps illustrate how to install the Windows Subsystem for Linux (WSL) on Windows 10 Falls Creators Update. The procedure is slightly different from previous versions of WSL, because the possibility of using different distributions was added in this update. Each distribution can be obtained from the Microsoft Store.

  1. The first step consists in launching the tool to add extra features to Windows 10. This tool can be found by pressing Win + S, and typing “Features”. The menu will show the icon in the figure.
    1. In the tool, scroll down and select “Windows Subsystem for Linux”. Check the box, and click on OK.
    2. Soon after, Windows will confirm the installation was successful. A reboot is necessary to complete it.
    3. Once the system has rebooted, open the Microsoft Store app, which can be found pressing Win-S, and searching “store”.
    4. In the Microsoft Store app, search for Ubuntu, and select the Ubuntu app.
    5. Click on the “Install” button. After the installation is complete you should see the following screen, with the “Launch” button.
    6. Press the “Launch button”. A terminal will open, asking to wait for the installation to complete.
    7. When the installation is complete, the system will ask to insert a user name for the UNIX system, and the corresponding password. Select the user name you prefer, and specify a secure password.
    8. After the password is confirmed successfully, the terminal prompt will appear, indicating that WSL is working properly, as shown below.
    9. The installation can be tested by typing some commands like free or df, which report the amount of free RAM and disc space, respectively.

Installing OpenFOAM on WSL – Ubuntu

The installation steps for OpenFOAM on Ubuntu are straightforward because the OpenFOAM Foundation provides packages for Ubuntu which can be directly used in WSL. The following steps summarize how to rapidly set OpenFOAM up on WSL.

  1. Open the Ubuntu bash terminal on Windows 10, and add the OpenFOAM repository and the corresponding signatures with the commands:
    • sudo add-apt-repository ""
    • sudo sh -c "wget -O - | apt-key add -"
  2. Refresh the repository with the command: sudo apt-get update
  3. Install OpenFOAM with: sudo apt-get install openfoam5
  4. Add the configuration file for OpenFOAM to bashrc with the command:
    • echo "source /opt/openfoam5/etc/bashrc" >> .bashrc
  5. Source the user’s bashrc file with:
    • source ~/.bashrc
  6. Verify the functionality of OpenFOAM by invoking the command:
    • icoFoam -help

Installing OpenQBMM

The installation steps for OpenQBMM are the the following:

  1. Create a directory called OpenQBMM 
  2. Open a terminal in that directory
  3. Use the command
    • git clone
  4. Optional: If the development version is desired, checkout the development branch:
    • git checkout -b development origin/development
  5. Build OpenQBMM by running the following command in the OpenQBMM directory:
    • ./Allwmake -j

This will create a working installation of OpenQBMM on Windows 10. Further details on using OpenFOAM with WSL can be found on the OpenFOAM Foundation website here.