CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Openfoam 8 Installation Error - 'FOAM FATAL ERROR' (https://www.cfd-online.com/Forums/openfoam-installation/234007-openfoam-8-installation-error-foam-fatal-error.html)

LS1554 February 20, 2021 06:28

Openfoam 8 Installation Error - 'FOAM FATAL ERROR'
 
Hi, apologies for my ignorance this is the first time I am attempting to use openfoam. I am using virtualbox to run ubuntu client and have followed instructions on openfoam website to install openfoam 8.
I had no error with the install directly, after performing updates/upgrades it suggests everything is installed correctly.
I then edit my bashrc file by adding a new line:

"source /opt/openfoam8/etc/bashrc"

Save this and try to run the next command:

"simpleFoam -help"

and receive the following error:

--> FOAM FATAL ERROR :
Could not find mandatory etc entry (mode=ugo)
'controlDict'

I have tried to run tutorial cases also and receive the same error when I attempt to use blockMesh function.

I can open the opt/openfoam8/bashrc file and notice it is read-only.
I made a seperate run directory in documents directory and this made no difference.

Using Ubuntu 20.10 if that helps.

olesen February 21, 2021 02:48

Out of curiosity, why run in a virtualbox (and why openfoam.org instead of openfoam.com)?
The error about etc/controlDict indicates that the environment variable WM_PROJECT_DIR is either not set or set incorrectly. Perhaps the path mapping with virtualbox is messing things up.

LS1554 February 21, 2021 05:41

Hi, thanks for the reply.

The PC I intend to use is for everyday use, so I have a windows 10 host. It seemed the simplest way was to use virtualbox.

I did not realise the software was different from .org/.com. I will follow instructions on openfoam.com and see if I get a different outcome.

Could you tell me where the $WM_PROJECT_DIR should be pointing? To the \opt\openfoam8 ?

olesen February 21, 2021 13:53

Quote:

Originally Posted by LS1554 (Post 796851)
Hi, thanks for the reply.

The PC I intend to use is for everyday use, so I have a windows 10 host. It seemed the simplest way was to use virtualbox.

I did not realise the software was different from .org/.com. I will follow instructions on openfoam.com and see if I get a different outcome.

Could you tell me where the $WM_PROJECT_DIR should be pointing? To the \opt\openfoam8 ?

If you have a Windows 10 host you have the choice of three different deployment methods for the openfoam.com version: a docker container, a mingw cross-compiled windows version and an Ubuntu version installed via WSL2.
I can't tell you which one is best for you - this will depend on what you want to do with it. If you are a Windows-only kind of person, then maybe the mingw version. I personally would probably go for the WSL solution with Ubuntu and then install the Ubuntu packages directly there. However this heavily biased since I don't actually have Windows anywhere and this solution would just be me trying to make a windows machine not look like one.

For your last question, yes the WM_PROJECT_DIR should point to the root of the OpenFOAM installation like you thought, but this isn't Windows - the path separators are '/' and not backslashes.


All times are GMT -4. The time now is 08:30.