CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Running Tutorial

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   June 28, 2009, 17:51
Unhappy Running Tutorial
New Member
Join Date: Jun 2009
Posts: 2
Rep Power: 0
vinkar is on a distinguished road

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: cannot open shared object file: No such file or directory

Any help would be greatly appreciated.
vinkar is offline   Reply With Quote

Old   July 19, 2009, 13:09
Default some help?
Join Date: Apr 2009
Posts: 38
Rep Power: 10
PattiMichelle is on a distinguished road
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

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
[ -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!

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:
...basically it's:
mkdir -p $FOAM_RUN

and here:

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,

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...

Last edited by PattiMichelle; July 24, 2009 at 10:41.
PattiMichelle is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in running tutorial cases preetham OpenFOAM Installation 2 June 13, 2009 16:36
Kubuntu uses dash breaks All scripts in tutorials platopus OpenFOAM Bugs 8 April 15, 2008 07:52
Compilation Error when running Tutorial 2.4 zhihuali Siemens 7 April 1, 2008 07:34
Running Tutorial Eulerian Granular Heat file Femi FLUENT 0 March 8, 2007 13:01
Tutorial is not running on star-CD version 3.2 Arnab Siemens 0 August 30, 2004 15:43

All times are GMT -4. The time now is 17:14.