Monday, January 12, 2026

OpenFoam Configuration WSL Ubuntu

Monday 12th January 2026

After installation of WSL and Ubuntu, the next step is to install and configure OpenFoam. A few steps may be optional if you have already gone through. 

Step 1. From the OpenFoam wiki

# Add the repository

curl -s https://dl.openfoam.com/add-debian-repo.sh | sudo bash

# Update the repository information

sudo apt-get update

# Install preferred package

sudo apt-get install openfoam2512-default

Step 2. PATH

~$ nano ~/.bashrc

# Add the following line at the end
. /usr/lib/openfoam/openfoam2512/etc/bashrc

# verify by the command echo $PATH

Step 3. Copy tutorials to run folder 

# Source /usr/lib/openfoam/openfoam2512

# Destination /home/tiger/OpenFOAM/tiger-v2512/run


Lessons learned

1. The default login was root

2. During reinstall from MS Store, new user was created 

3. Included cd command at the end (~$ nano ~/.bashrc) for /home/tiger as working directory

4. Need to create the run and preceding directory structure as mentioned in the $PATH

No comments:

Post a Comment