CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   [] Cannot install OpenFOAM in another drive on Windows WSL (

SSG_NJ June 23, 2020 02:31

Cannot install OpenFOAM in another drive on Windows WSL

I'm new to OpenFOAM. I tried to install it on a different drive other than the C: drive, and I face an error when I try to execute "blockMesh" command.


command 'blockMesh' not found, but can be installed with:
sudo apt install openfoam

These are the steps I followed so far:
  1. Enabled WSL on windows 10
  2. Installed Ubuntu from the Windows store
  3. Downloaded OpenFOAM to a folder named 'OF' in H: drive
  4. Untarred the openfoam-v1912.tar file in H: drive under the same 'OF' folder
  5. Created a bashrc file in the 'OF' folder which contains in it the line

    source /mnt/h/OF/OpenFOAM/OpenFOAM-v1912/etc/bashrc
  6. Restarted the linux shell in the 'OF' folder and entered command 'blockMesh' which gave the above mentioned error
  7. I also tried using the command "sudo blockMesh" but it still gives me a similar error:

    sudo: blockMesh: command not found

I had also tried to follow what was said in this post :

but unfortunately I am unable to understand what is being communicated.

I cannot install it on my C: (home) drive as there isn't enough space left. :(

Please help ASAP..

All times are GMT -4. The time now is 15:52.