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

Problem starting OpenFoam 2.2.2.

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 23, 2014, 10:07
Default Problem starting OpenFoam 2.2.2.
  #1
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
I had an old version of OF on Ubuntu and guess i moved something around because i couldn't start it. So I simply removed the OpenFoam folder in the Home directory and reinstalled the new version 2.2.2. The old version was 2.1.0,

But trying to open using icoFoam i get the following:

--> FOAM FATAL IO ERROR:
cannot find file

file: /home/marcus/OpenFOAM/marcus-2.1.0/run/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.


So it tries to open the old version of openfoam ?

I followed these instructions when installing, both times.
http://www.openfoam.org/download/ubuntu.php

Any ideas?
Marcus_L is offline   Reply With Quote

Old   January 23, 2014, 10:37
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,046
Rep Power: 18
alexeym will become famous soon enough
Hi,

Quote:
Originally Posted by Marcus_L View Post
--> FOAM FATAL IO ERROR:
cannot find file

file: /home/marcus/OpenFOAM/marcus-2.1.0/run/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.
Actually it tries to find case files. I guess you're trying just run icoFoam in $FOAM_RUN folder, while you need to run it in case folder.
alexeym is offline   Reply With Quote

Old   January 23, 2014, 10:45
Default
  #3
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
Thank you.

It seems I have two versions of OF installed now, looking in the /opt directory. What is the best way to get rid of the old version ?
Marcus_L is offline   Reply With Quote

Old   January 23, 2014, 10:49
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,046
Rep Power: 18
alexeym will become famous soon enough
If you installed old version with a package manager, you can use the package manager to uninstall it.

Guess on Ubuntu it should be something like 'dpkg -r openfoam211'
alexeym is offline   Reply With Quote

Old   January 23, 2014, 10:51
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,046
Rep Power: 18
alexeym will become famous soon enough
Though it seems that you're still using old version (2.1.0). Are you sure, you've corrected shell initialization file to source bashrc of new version?

Last edited by alexeym; January 23, 2014 at 10:51. Reason: typo
alexeym is offline   Reply With Quote

Old   January 23, 2014, 10:56
Default
  #6
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
Thank you for your help.

I removed the 2.1.0. version but when I try the "mkdir -p $FOAM_RUN " command it still makes a folder with 2-1-0 in it, why is $FOAM_RUN still connected to the old version number?
Same problem with icoFoam command, it also looks for the old version folders?
Marcus_L is offline   Reply With Quote

Old   January 23, 2014, 10:59
Default
  #7
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Though it seems that you're still using old version (2.1.0). Are you sure, you've corrected shell initialization file to source bashrc of new version?
yes in the bashrc the line added is source /opt/openfoam222/etc/bashrc
Marcus_L is offline   Reply With Quote

Old   January 23, 2014, 11:05
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,046
Rep Power: 18
alexeym will become famous soon enough
Did you remove source /opt/openfoam210/etc/bashrc line?
As there can be lots of reasons (from you're still using old shell session with old environment variables), we'll spend much time guessing what has really happened. Can you describe the way you've made upgrade? Can you show relevant parts of your .bash_profile?
alexeym is offline   Reply With Quote

Old   January 23, 2014, 11:11
Default
  #9
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
You said old shell sessions so I tried just restarting the terminal. And now it's updated to the 2-2-2 version.

The only thing is when I just type icoFoam and I get an error about it not finding something in a directory where I originally moved the 2.1.0. version to, which was the whole error from the start.

Maybe this isn't even an issue when I got a real case running, working in that case folder?
Marcus_L is offline   Reply With Quote

Old   January 23, 2014, 11:15
Default
  #10
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,046
Rep Power: 18
alexeym will become famous soon enough
Maybe. Just try:

Code:
$ cd $FOAM_RUN
$ cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
$ cd cavity
$ blockMesh
$ icoFoam

Last edited by alexeym; January 23, 2014 at 11:23. Reason: forgot -r flag
alexeym is offline   Reply With Quote

Old   January 23, 2014, 11:22
Default
  #11
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
when i try to cp the cavity directory it just says it's ommitting the cavity directory, not allowing the cp.
Marcus_L is offline   Reply With Quote

Old   January 23, 2014, 11:24
Default
  #12
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,046
Rep Power: 18
alexeym will become famous soon enough
I forgot -r flag for cp, it should be

Code:
$ cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
alexeym is offline   Reply With Quote

Old   January 23, 2014, 11:40
Default
  #13
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
Yea it seems to run when going at a case.

Thank you very much for your help.
Marcus_L is offline   Reply With Quote

Old   January 24, 2014, 03:01
Default
  #14
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 541
Rep Power: 12
vasava will become famous soon enough
If you have multiple versions of openfoam installed then it is advisable to have alias for each version and then 'activate' version before running the simulation.

alias is a short name that you use for a command. Its like a hyperlink in windows. You can go through this link (http://openfoamwiki.net/index.php/In...M-2.2.2/Ubuntu) for installing openfoam and this link (http://openfoamwiki.net/index.php/In...nFOAM_versions) for alias.

Once you have made the alias (e.g. of222 for openfoam 2.2.2 and of22x for openfoam 2.2.x) then you can activate any version by of222+enter or of22x+enter.
vasava is offline   Reply With Quote

Old   January 24, 2014, 07:12
Default
  #15
New Member
 
Marcus
Join Date: Jan 2014
Posts: 8
Rep Power: 3
Marcus_L is on a distinguished road
Thank you, but I uninstalled the old version, why would you want two versions anyway ?
Marcus_L is offline   Reply With Quote

Reply

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
Installation problem: openfoam 2.1.0 on opensuse 11.4 raphael7 OpenFOAM Installation 4 April 12, 2012 07:10
Problem when installing Openfoam 2.0.x with mac giovaniharyadi OpenFOAM Installation 0 March 24, 2012 19:45
Problem? with Installation of OpenFOAM 2.1.0 on to Ubuntu 10.4.4 VirtualBox Stubby OpenFOAM Installation 8 March 5, 2012 16:12
Problem with mpirun with OpenFOAM jiejie OpenFOAM 3 July 7, 2010 19:30
OpenFOAM 1.6 CreatePatch Problem TarifaPirata OpenFOAM Bugs 1 September 10, 2009 04:35


All times are GMT -4. The time now is 03:25.