Wolf Dynamics - Multiphysics simulations, optimization, and data analytics

OpenFOAM in Windows Subsystem for Linux (WSL)

If you are a Windows user, and new to Linux and OpenFOAM, and if you do not want to go thru the hustle and bustle of partitioning your hard drive, backing-up your data, and installing Linux and OpenFOAM, we highly recommend use Windows Subsystem for Linux (WSL).

The Windows Subsystem for Linux (WSL) is a feature of the Windows operating system that enables you to run a Linux file system, along with Linux command-line tools and GUI apps, directly on Windows, alongside your traditional Windows desktop and apps.

WSL requires fewer resources (CPU, memory, and storage) than a full virtual machine. WSL also allows you to run Linux command-line tools and apps alongside your Windows command-line, desktop and store apps, and to access your Windows files from within Linux. This enables you to use Windows apps and Linux command-line tools on the same set of files if you wish.

This WSL distribution is based on OpenSUSE 15.5 and comes with OpenFOAM 10, OpenFOAM 12, OpenFOAM v2406, paraview, and DAKOTA 6.20 pre-installed. It also comes with all the compilers and libraries necessary to compile most of the applications. The latest distribution is code named WSL-SUSEFoam2024v1.

 

To download the distribution in .vhdx format (compressed in .zip format, you will need to unzip it in order to install it). The .vhdx format only works using the latest version of WSL in Windows 11. The zipped archive is about 16.9 GB.

 

If you are using the latest version of WSL (Windows Subsystem for Linux), the maximum size of the virtual Linux distribution is 1TB. Have in mind that the size of the virtual hard drive can be expanded to any dimension, just follow these instructions.

 

User information:

User:            cfd
Password:    cfd1234

User:            root
Password:    cfd1234

 

To load OpenFOAM, type in the terminal: of10, of12, of2406

 
Type alias in the terminal window to know all the predefined aliases, or open the .bashrc file using your favorite text editor.

 

At this link, you can find the WSL documentation.

At this link, you can find a Youtube video with general instructions on how to import this virtual Linux distribution.

At this link, you can find a Youtube video the main differences between WSL in Windows 10 and Windows 11.

At this link, you can find a Youtube playlist with detailed  instructions on how to install WSL, how to use WSL, and how to compile OpenFOAM in the WSL. And this is a much newer playlist.