CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Cannot configure OpenFOAM environment variable in CAE Linux 2011 (https://www.cfd-online.com/Forums/openfoam-installation/124774-cannot-configure-openfoam-environment-variable-cae-linux-2011-a.html)

TommiPLaiho October 12, 2013 14:21

Cannot configure OpenFOAM environment variable in CAE Linux 2011
 
Hi,

I try to set environment variable for OpenFOAM 2.0.1 in CAE Linux 2011 which is Ubuntu 10.04 LTS. I try to accurately follow the instructions according to OpenFOAM pages but I am not able to create functional environment variable for OpenFOAM.

I have used instructions as follows:

Quote:

In order to use the installed OpenFOAM package, complete the following
  1. Open the .bashrc file in the user’s home directory in an editor, e.g. by typing in a terminal window (note the dot) gedit ~/.bashrc
  2. At the bottom of that file, add the following line (see Note 1) and save the file source /opt/openfoam201/etc/bashrc
  3. Open a new terminal window (see Note 2) and test that the icoFoam application, from the OpenFOAM package, is working by typing icoFoam -help

But without any help. Please help me and thanks in advance.

wyldckat October 12, 2013 14:58

Greetings Tommi and welcome to the forum!

A quick question: did you install OpenFOAM 2.0.1 from OpenFOAM's website, or are you using the installation already provided with CAELinux?

Best regards,
Bruno

TommiPLaiho October 12, 2013 15:12

The OpenFOAM 2.0.1. is a default installation what came within the CAE Linux. The installation is fresh except I removed open java and installed Sun Java 8 to my Ubuntu.

wyldckat October 12, 2013 15:23

Unfortunately I don't a CAELinux installation at hand, but according to this post of mine: http://www.cfd-online.com/Forums/ope...tml#post376326 post #26 - it looks like that CAELinux provides OpenFOAM 2.1.0?

Try these two commands:
Code:

ls -l /opt/openfoam201
ls -l /opt/openfoam210

Do any of them give any information?

TommiPLaiho October 12, 2013 23:26

Hi,

The OpenFOAM 2.0.1 is present but 2.1.0 is not. I have tried to install 2.1.0 but the problem was same...no environments set.

Here is the result of the command ls -l /opt/openfoam201:

Quote:

total 84
-rwxr-xr-x 1 root root 923 2011-08-02 15:07 Allwmake
drwxr-xr-x 5 root root 4096 2011-10-09 16:09 applications
drwxr-xr-x 3 root root 4096 2011-10-09 16:09 bin
-rw-r--r-- 1 root root 0 2011-08-02 18:54 build-stamp
-rw-r--r-- 1 root root 35627 2011-08-02 15:07 COPYING
drwxr-xr-x 6 root root 4096 2011-10-14 09:24 doc
drwxr-xr-x 5 root root 4096 2011-10-09 16:09 etc
drwxr-xr-x 3 root root 4096 2011-10-09 16:08 platforms
-rw-r--r-- 1 root root 6106 2011-08-02 17:18 README.html
-rw-r--r-- 1 root root 1784 2011-08-02 17:18 README.org
drwxr-xr-x 32 root root 4096 2011-10-09 16:09 src
drwxr-xr-x 15 root root 4096 2011-10-09 16:09 tutorials
drwxr-xr-x 6 root root 4096 2011-10-09 16:09 wmake
And the command ls -l /opt/openfoam210 gave this:

Quote:

ls: cannot access /opt/openfoam210: No such file or directory

TommiPLaiho October 13, 2013 00:51

I tested the installation DVD with a md5 testers just for fun. There were no errors in the installation disk.

I also run:

Quote:

./foamInstallationTest
and I got this kind of result in Ubuntu:


Quote:

Checking basic setup...
-------------------------------------------------------------------------------

FATAL ERROR: OpenFOAM environment not configured.

Please refer to the installation section of the README file:
<OpenFOAM installation dir>/OpenFOAM-2.0.1/README
to source the OpenFOAM environment.

wyldckat October 13, 2013 04:29

Hi Tommi,

CAE Linux was designed to make it easier for people to use the software provided with it. Therefore, at the very least, they provide the following capabilities for using OpenFOAM:
  • You can start a terminal with OpenFOAM ready to use, if you go to the main menu and choose the item at "Applications -> CAELinux -> OpenFOAM Terminal".
  • Or from a standard terminal, run:
    Code:

    source /opt/.bashrc-OpenFOAM
I've tested this on both the installed version and the DVD Live version.

Best regards,
Bruno

TommiPLaiho October 13, 2013 04:55

Hi,

I just wonder why it says that environment variable is not set when I test it. Is it somehow unusable command in Ubuntu?

I tested this OpenFoam terminal with

Code:

icoFoam -help
It give me output as follows:

Quote:

Usage: icoFoam [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
-noFunctionObjects
do not execute functionObjects
-parallel run in parallel
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage

Using: OpenFOAM-2.0.1 (see www.OpenFOAM.com)
Build: 2.0.1-51f1de99a4bc
Everything seems to be ok from this point of view? Many thanks for help.

wyldckat October 13, 2013 04:58

The OpenFOAM 2.0.1 installation provided in CAE Linux was done from the Deb packages that are provided at openfoam.org, which is why foamInstallationTest doesn't work.

This is because the foamInstallationTest script was created for testing the environment where OpenFOAM is built by the user and therefore doesn't work on pre-built installations.

francescomarra October 15, 2013 08:44

Dear Tommy,

CAELinux is configured with a special terminal for OpenFOAM. You will find it under Applications -> CAELinux .
You have to open this terminal to have the environment correctly configured.

Regards,

Franco


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