CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Installing OpenFOAM 1.6 on ubuntu 9.10

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2010, 06:59
Default
  #21
Member
 
G B
Join Date: Mar 2010
Posts: 37
Rep Power: 16
Disco_Caine is on a distinguished road
ok gijs, i think that just about did it!

Well at least i typed this in the terminal: . $HOME/.bashrc (should i type source instead of the period?)

And nothing happened, just a new line came, i think that is good. Now i have to run the foamInstallationScript.

And it worked!

Base configuration ok.

critical systems ok.

Thank you so much for your time gijs, and for your patience. I know it is hard, but you have no idea how much you have helped me!
Disco_Caine is offline   Reply With Quote

Old   March 10, 2010, 07:09
Default
  #22
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Fantastic! That is good to hear, I am happy it works now! Happy foaming!

Quote:
should i type source instead of the period?
The dot and "source" are equivalent, so you can choose.

Quote:
nothing happened, just a new line came, i think that is good.
Yep, that's good, you're just making the shell aware of new environment variables (in this case that OF has its own bashrc and that it should be read).
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   March 17, 2010, 02:01
Default
  #23
Member
 
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 16
Javed is on a distinguished road
Hi, I am installing OF-1.6 on Ubuntu 8.1.
I have extracted files successfully into the Home/<username>/OpenFoam/
But not able to source bashrc file.
Also from the comments of previous forum had confused me, which file to edit bashrc i n home location or from OpenFoam/OpenFOAM-1.6/etc location.
I m getting following msg after using source bashrc command..


bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/etc/settings.sh: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/etc/aliases.sh: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/etc/apps/paraview3/bashrc: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/etc/apps/ensight/bashrc: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: No such file or directory
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/bin/foamCleanPath: No such file or directory

plz help me
Javed is offline   Reply With Quote

Old   March 17, 2010, 02:37
Default
  #24
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Javed,

There are two bashrc files; one of OpenFOAM (that lives in ~/OpenFOAM/OpenFOAM-1.6/etc/) and one of your system (the user that is) (that lives in ~/.bashrc). Now, for a normal installation of OF (no compilation) you only need to change ~/.bashrc (notice the dot (".")) to make the shell aware of OF's environment variables. So, the recipe is as follows:
  1. Extract the files in the right location (which you seemingly already did)
  2. Open file ~/.bashrc
    Code:
    gedit ~/.bashrc &
  3. Add the line
    Code:
    . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
    to file ~/.bashrc (notice the dot "." in the code to add)
  4. Save file ~/.bashrc
  5. Source the newly edited ~/.bashrc by
    Code:
    . $HOME/.bashrc
    (notice the dot again)
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   March 17, 2010, 03:14
Default
  #25
Member
 
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 16
Javed is on a distinguished road
Thanks Gijs for the quick reply.
I followed the same procedure considering . in every single command. But still getting the error like

iyer@iyer-desktop:~$ . $HOME/.bashrc
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/etc/bashrc: No such file or directory

want to clear two things
1) i m editing ~/.bashrc file of system and typing the command . $HOME/.bashrc in my home directory (name-/home/iyer).
2) Should i run :/$ source OpenFOAM-1.6/etc/bashrc before editing bashrc file.

I need ur help. plz reply. Thanks
Javed is offline   Reply With Quote

Old   March 17, 2010, 03:39
Default
  #26
Member
 
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 16
Javed is on a distinguished road
Sir, One more thing, we i remove the . $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc form the ~/.bashrc file,
1) I m neither getting an error or comment see the following.(as per ur direction)
iyer@iyer-desktop:~$ . $HOME/.bashrc
iyer@iyer-desktop:~$


but when i check in the OpenFoam command I m getting one error as follow

iyer@iyer-desktop:~/OpenFoam$ source /OpenFOAM-1.6/etc/bashrc
bash: /OpenFOAM-1.6/etc/bashrc: No such file or directory


I m not getting what is going on..plz help
Javed is offline   Reply With Quote

Old   March 17, 2010, 04:37
Default ok, let's get some things vlear here
  #27
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Javed,

Quote:
we i remove the . $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc form the ~/.bashrc file,
1) I m neither getting an error or comment see the following.(as per ur direction)
Ok, now things are getting a bit messy here . I'll try to explain what to do and why.

First, let's get some syntax clear:
  • "$HOME" is the same as "~"
  • "source" is the same as "."
  • "OF" means "OpenFOAM"

Now, the idea behind the "environment variable and sourcing" stuff is that OF has its own bashrc file, through which OF makes the shell (the terminal where you type and calculate stuff) aware of the different parts OF needs to run. There it is stated what C++ compiler to use, where it is, what ParaView to use etc. The thing is that you need to make your "own shell" (the terminal you open to type commands) aware of these rules for OF (stated in the $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc file). To do that, you do not need to change $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc, but you need to make $HOME/.bashrc aware of $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc. This is done by adding the line
Code:
. $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc
to $HOME/.bashrc and sourcing $HOME/.bashrc. The dot (".") at the start of the line to add is shorthand for "source". Every time you open up a terminal $HOME/.bashrc is sourced (kind of checked for rules). So, if you add
Code:
. $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc
to your $HOME/.bashrc, OF's "rules" are automatically sourced when you start a terminal. Then, the terminal recognizes OF commands like "foam", "run", "blockMesh" etc.

When you remove the line
Code:
. $HOME/OpenFoam/OpenFOAM-1.6/etc/bashrc
from $HOME/.bashrc and then source $HOME/.bashrc by
Code:
. $HOME/.bashrc
or
Code:
source $HOME/.bashrc
no erro is given because the shell doesn't care whether you source OF or not. It only complains when you write something wrong in it or something with the wrong path.

So, to make a long story short, do this:
Quote:
  1. Open file ~/.bashrc Code:
    gedit ~/.bashrc &
  2. Add the line Code:
    . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
    to file ~/.bashrc (notice the dot "." in the code to add)
  3. Save file ~/.bashrc
  4. Source the newly edited ~/.bashrc by Code:
    . $HOME/.bashrc
    (notice the dot again)
Then, your two other questions.
Quote:
1) i m editing ~/.bashrc file of system and typing the command . $HOME/.bashrc in my home directory (name-/home/iyer).
Yes, you need to edit ~/.bashrc (which btw is the same as $HOME/.bashrc) and source ~/.bashrc. It doesn't matter "where" you do that, you don't have to be in your home dir. Alternatively, you could just close the terminal and open a new one. Then, ~/.bashrc is automatically sourced.

Quote:
2) Should i run :/$ source OpenFOAM-1.6/etc/bashrc before editing bashrc file.
No, you don't need to do that. This is what ~/.bashrc does for you when you source ~/.bashrc or open a new terminal, because you put the line ". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" in ~/.bashrc. By the way, "OpenFOAM-1.6/etc/bashrc" is a relative path, that is it doesn't work from just any directory, but only when you are in the ~/OpenFOAM directory.



Quote:
iyer@iyer-desktop:~$ . $HOME/.bashrc
bash: /home/iyer/OpenFOAM/OpenFOAM-1.6/etc/bashrc: No such file or directory
Right, did you unpack OF in ~/OpenFOAM? If so, the path name is right and it looks like you actually deleted (or renamed) the file /home/iyer/OpenFOAM/OpenFOAM-1.6/etc/bashrc. If you have done that, please put it back into place (for the reason explained above).

Hope this clears up some things.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   March 18, 2010, 00:21
Default
  #28
Member
 
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 16
Javed is on a distinguished road
Thanks Gijs,

I have successfully installed the openfoam, thanks a lot for the procedure(step by step) u sent.
Can u plz do one more favour just want to know how to open GUI , or any link which can guide for further work.

Thanks a lot again.
Javed
Javed is offline   Reply With Quote

Old   March 18, 2010, 02:58
Default
  #29
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
You're very welcome Javed, I'm glad it worked .

Quote:
how to open GUI
Well, to my knowledge, OF-1.4.1 had a GUI called FoamX, but OF-1.5 and later not anymore. It is better and more powerful IMHO if you learn command line. It may be a bit challenging in the beginning, but you'll learn.

Quote:
any link which can guide for further work
I suggest you start with some tutorials in the user guide (lives in $HOME//OpenFOAM/OpenFOAM-1.6/doc) and then there are some nice tuts in the wiki.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   March 18, 2010, 07:04
Default
  #30
Member
 
Javed
Join Date: Mar 2010
Location: Mumbai,India
Posts: 32
Rep Power: 16
Javed is on a distinguished road
Thanks Gijs for the encouragement..
I will start from the tuts now..

Thanks a lot again for the help..
Javed is offline   Reply With Quote

Old   May 3, 2010, 08:34
Default
  #31
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Hi,

It worked for me also to set up .bashrc file. Thanks for your valuable advice.
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   May 9, 2010, 06:23
Default openfoam installation
  #32
New Member
 
VENKATESH T LAMANI
Join Date: Mar 2009
Location: BANGALORE, KARNATAKA, INDIA
Posts: 11
Rep Power: 17
openfoam is on a distinguished road
please send me the detail procedure for installation of openfoam1.6 working on ubuntu 9.10, 32 bit system
openfoam is offline   Reply With Quote

Old   May 10, 2010, 03:09
Default
  #33
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Venkatesh,

Quote:
please send me the detail procedure for installation of openfoam1.6 working on ubuntu 9.10, 32 bit system
Please have a look at Mads' script and cookbook in this thread.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Installing OF 1.6 Ubuntu 9.10 (64 bit) - How to use GCC 4.4.1 Future Science OpenFOAM Installation 43 November 10, 2011 07:17
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 14:43
OpenFoam 1.6 Permissions in Ubuntu 9.04 AlanR OpenFOAM Installation 14 December 28, 2009 19:45
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 01:31.