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.

Installing WSL on Windows 10

The following steps illustrate how to install the Windows Subsystem for Linux (WSL) on Windows 10 Falls Creators Update or newer. 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 openSUSE Leap (the current version is 15.5), and select the corresponding 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 be completed.
    7. When the installation is complete, the system will ask to insert a username for the UNIX system, and the corresponding password. Select the username 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 – openSUSE

  • To use RPM packages:
      • Execute the following commands in sequence (as root):
        • zypper addrepo https://download.opensuse.org/repositories/science/openSUSE_Leap_15.5/science.repo
        • zypper refresh
        • zypper install openfoam2312-default gnuplot git
        • Note: If you receive an error like the following, when adding the repository:Problem encountered while trying to read the file at the specified URI:
          ABORT request: Aborting requested by user
          History:
          - Download (curl) error for 'https://download.opensuse.org/repositories/science/openSUSE_Leap_15.5/science.repo':
          Error code: Curl error 60
          Error message: SSL certificate problem: unable to get local issuer certificatethen execute the following two commands as root:ln -s /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT /etc/pki/trust/anchors/RHN-ORG-TRUSTED-SSL-CERT.pem
          /usr/sbin/update-ca-certificates
    • Execute (as root):
      • openfoam-selector-menu
    • Select openfoam2312
    • Apply to the system
    • Close the WSL terminal and open it again to load the settings
    • Test if icoFoam can execute
    • Test if wmake is available
  • If you prefer to use the source code and compile it yourself, follow the installation instruction to install OpenFOAM from source code reported here.

Installing OpenFOAM on WSL – Ubuntu

Ubuntu is also available in the Windows Store and can be installed following similar steps to those reported above for openSUSE Leap. Once Ubuntu is installed in the system, instructions to install OpenFOAM are available here.

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 https://github.com/OpenQBMM/OpenQBMM.git
  4. Optional: If the development version is desired, checkout the development branch:
    • git checkout -b development origin/development-openfoam.com
  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.

Note: [Obsolete version not containing bug fixes and new features] if your preferred version of OpenFOAM is OpenFOAM 7 instead of OpenFOAM v1912, install OpenQBMM as follows:

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