CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Running Tutorial (http://www.cfd-online.com/Forums/openfoam-installation/65843-running-tutorial.html)

vinkar June 28, 2009 17:51

Running Tutorial
 
Hi,

This is my first time doing anything in linux and OpenFOAM, and by reading the instructions from the forum I was able to get rid of the two critical errors except the fatal error during installation of OpenFOAM 1.5. Per the previous threads Fatal error is not an issue for stand alone installation.

I tried following the instructions in the readme and got as far as running the installation test, and I simply could not get the cavity problem running. Following is the error

~/OpenFOAM/vinay-1.5/run/tutorials/icoFoam/cavity/$ blockMesh .cavity
blockMesh: error while loading shared libraries: libmeshTools.so: cannot open shared object file: No such file or directory

Any help would be greatly appreciated.
Vinay

PattiMichelle July 19, 2009 13:09

some help?
 
If you're new to Linux, you may not have everything set up properly. Here are the steps I followed to set up (for the 64-bit linux I use):

(Note that I'm using the pre-built binaries, not compiling OpenFOAM myself)

1. download the 4 files to a single directory
OpenFOAM-1.5.General.gtgz
OpenFOAM-1.5.linux64GccDPOpt.gtgz
ThirdParty.General.gtgz
ThirdParty.linux64Gcc.gtgz

2. unpack them in a single directory using the commands
tar -xzvf OpenFOAM-1.5.General.gtgz
tar -xzvf OpenFOAM-1.5.linux64GccDPOpt.gtgz
tar -xzvf ThirdParty.General.gtgz
tar -xzvf ThirdParty.linux64Gcc.gtgz

... the directory should wind up being named: OpenFOAM

3. Move the directory under your home directory ( /home/yourname ) - now you will have a directory in your tree: /home/yourname/OpenFOAM

4. Put these lines at the bottom of your /home/yourname/.bashrc file (note the dot!)
echo "setting up OpenFOAM"
export FOAM_INST_DIR=/home/patti/OpenFOAM
foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.5/etc/bashrc
[ -f $foamDotFile ] && . $foamDotFile
# $HOME/OpenFOAM/OpenFOAM-1.5/etc/bashrc
echo "... OpenFOAM set up!"


... in the above, /home/patti is my home directory - you have to change it to your name...

5. When you start a command-prompt shell, it will automatically read your .bashrc file and "source" the OpenFOAM bashrc file and you should see something like:
setting up OpenFOAM
... OpenFOAM set up!
patti@new-host:~>

Now OpenFOAM and all it's necessary programs are linked into your command-prompt shell. You should be able to change directories to the tutorials and run everything. Be sure and follow the instructions here to set up your "run" directory:
http://www.opencfd.co.uk/openfoam/doc/tutorials.html
...basically it's:
mkdir -p $FOAM_RUN
cp -r $FOAM_TUTORIALS $FOAM_RUN

and here:

http://www.opencfd.co.uk/openfoam/do...tml#x5-40002.1

In OpenSuSE linux with KDE, the command-prompt is called Konsole. It takes some effort to get the .bashrc set up correctly, and the above is how I did it, and I got it from the installation web page. If you're using tcsh or csh, they need to be slightly different, so see the installation web page.

Hope this helps,
Patti

PS: This method of delivering OpenFOAM provides MPI and gcc in subdirectories of the OpenFOAM directory. Your Linux system has its own version of gcc, and maybe MPI. So, if you want do compile other software, you have to remove the lines from .bashrc that direct the OS to use OpenFOAM's versions of gcc and MPI, (i.e., the lines in bold above), and then put them back when you want to use OpenFOAM...


All times are GMT -4. The time now is 23:53.