CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   WM_PROJECT_DIR: parameter not set or null. How to setup an environment for OpenFOAM? (https://www.cfd-online.com/Forums/main/255183-wm_project_dir-parameter-not-set-null-how-setup-environment-openfoam.html)

prusso March 23, 2024 20:23

WM_PROJECT_DIR: parameter not set or null. How to setup an environment for OpenFOAM?
 
I installed on Ubuntu Jammy Jellyfish (WSL2):

Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

from these instructions. After adding a repository:
sudo apt-get install openfoam2312-default

OK... So I have some examples:
/usr/lib/openfoam/openfoam2312/tutorials/incompressible/pimpleFoam/LES/vortexShed

```
/usr/lib/openfoam/openfoam2312/tutorials/incompressible/pimpleFoam/LES/vortexShed$ sudo ./Allrun
./Allrun: 3: WM_PROJECT_DIR: parameter not set or null
```
I also ran "source bashrc" from the openfoam/etc folder.

How can I get Allrun to run?

LuckyTran March 23, 2024 20:55

Your installer isn't working. The environmental variable should be set during the install but is generally a big no-no without root privileges (that's the best way to get a virus!).

source the etc/bashrc again and run ./Allwmake to compile OF again. If still the same error then echo $WM_PROJECT_DIR and verify that it is set. If still unset then check the bashrc to make sure it is set and then set it and compile.


In general I recommend to never read a guide that has sudo in it (it's generally written by dummies for dummies).

Kiolspa April 10, 2024 04:44

Good
 
It is recommended to set and double-check the environmental variable during the installation process.


-----------------------------------
run 3


All times are GMT -4. The time now is 13:03.