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

paraFoam problem soon after installing OpenFOAM

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 7, 2014, 07:33
Default paraFoam problem soon after installing OpenFOAM
  #1
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
I recently installed OpenFOAM and i am now trying to do the tutorials in the user guide.

In the first one, as i am trying to enter the command "paraFoam" i get this message:

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
./Allwclean
./Allwmake

Anyone knows why this happens and how to solve it?

Thank you
Antoniorp is offline   Reply With Quote

Old   October 7, 2014, 08:17
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

The error is self-explanatory in fact. To use paraFoam, you have to build OpenFOAM reader module using commands provided in error message. If you'd like to use Paraview's built-in OpenFOAM reader, you have to edit paraFoam script (located in $WM_PROJECT_DIR/bin) and change two lines:

Code:
# reader extension
extension=OpenFOAM

requirePV=1
to

Code:
# reader extension
extension=foam

requirePV=0
alexeym is offline   Reply With Quote

Old   October 7, 2014, 10:03
Default
  #3
Member
 
Join Date: Jun 2011
Posts: 53
Rep Power: 14
blacksquirrel is on a distinguished road
Which OpenFOAM Version did you install?
On which system does it run?
blacksquirrel is offline   Reply With Quote

Old   October 8, 2014, 05:07
Default
  #4
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
I'm using OpenFOAM 2.2 2 in ubuntu 12.04 LTS.

How do i edit that script? im a little lost with this problem. I was following everything in the tutorial with no problem until i tried to use paraFoam.

Maybe it's an installation error?

Thank you all
Antoniorp is offline   Reply With Quote

Old   October 8, 2014, 05:19
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

did you install binary distribution (i.e. with apt-get) or build OF from sources? If the first is the case, then it's a bug.

To edit paraFoam script you should go to $WM_PROJECT_DIR/bin and open it with text editor Something like:

Code:
$ cd $WM_PROJECT_DIR/bin
$ gedit paraFoam
Then press Ctrl-F, it'll open Search dialog, enter 'requirePV=1' to locate the line, change it to 'requirePV=0' and also the line above to correct extension. In case of OpenFOAM 2.2.2 line numbers are 71 and 73.
alexeym is offline   Reply With Quote

Old   October 8, 2014, 05:55
Default
  #6
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Yeah, i installed binary distribution, i followed the steps in "Ubuntu Deb Pack Installation" in openfoam.org

So, how do i solve it? i am thinking about removing completely openfoam and start fresh

I used the command

"sudo apt-get remove openfoam230 paraviewopenfoam410"

but now, everytime i open terminal, in the first line appears this:

"bash: /opt/openfoam222/etc/bashrc: No such file or directory"

I dont seem to be able to install openfoam again.

I have no idea how to solve this..

Thanks
Antoniorp is offline   Reply With Quote

Old   October 8, 2014, 06:26
Default
  #7
Member
 
Join Date: Jun 2011
Posts: 53
Rep Power: 14
blacksquirrel is on a distinguished road
bash error:
open your .bashrc or .bash_aliases file and remove the line
'alias of222= /opt/openfoam222/etc/bashrc'

for any new installation you can set an alias in your bash file again, using then the right installation folder. For example, if you install OF per SourcePack in your home folder, the installation path would be /home/[user]/OpenFoam-2.???.
blacksquirrel is offline   Reply With Quote

Old   October 8, 2014, 06:50
Default
  #8
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Now when i try to install it again, using the Deb Pack Installation, when i use the command "sudo apt-get install openfoam222" i get this message


** To use OpenFOAM please add
**
** . /opt/openfoam222/etc/bashrc
**
** To your ~/.bashrc

And i already made the changes in the .bashrc file..
Antoniorp is offline   Reply With Quote

Old   October 8, 2014, 07:18
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Quote:
Originally Posted by Antoniorp View Post
...
I used the command

"sudo apt-get remove openfoam230 paraviewopenfoam410"

but now, everytime i open terminal, in the first line appears this:

"bash: /opt/openfoam222/etc/bashrc: No such file or directory"
...
It is normal, as you uninstalled OpenFOAM, this file has gone also.

Quote:
Now when i try to install it again, using the Deb Pack Installation, when i use the command "sudo apt-get install openfoam222" i get this message


** To use OpenFOAM please add
**
** . /opt/openfoam222/etc/bashrc
**
** To your ~/.bashrc

And i already made the changes in the .bashrc file..
I guess it is standard message written upon successful installation (install script doesn't check .bashrc for this line). And as you've got this line in your .bashrc, you can start using OpenFOAM.
alexeym is offline   Reply With Quote

Old   October 11, 2014, 17:06
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

António sent me a private message a few minutes after Alexey's answer, so I'm not sure if he had the chance to read Alexey's answer first or not.

My advice is as follows:
  1. Start a new terminal window and run:
    Code:
    ls -l /opt/openfoam222/etc/bashrc
    It should tell you if the file exists or not, the access permissions, ownership and size of the file.
  2. Run this command:
    Code:
    ls -l /opt/
    Check if there is any OpenFOAM version installed at all.
  3. If the above 2 give you positive responses, then run:
    Code:
    source /opt/openfoam222/etc/bashrc
    this is the same as:
    Code:
    . /opt/openfoam222/etc/bashrc
    Does this give you any errors?
Beyond this, if there are still errors, knowing the exact commands you used to install OpenFOAM 2.2.2 would make it easier to diagnose what happened.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 21, 2014, 06:59
Default
  #11
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Thank you all for your answers!

I've been out so only now i was able to do everything you told me to do.

I think i have no mistakes, as i followed wyldckat advice.

When i run

"ls -l /opt/openfoam222/etc/bashrc"

I get the message

"-rw-r--r-- 1 root root 7295 Oct 4 2013 /opt/openfoam222/etc/bashrc"

and when i run

"ls -l /opt/ "

i get

"
total 8
drwxr-xr-x 10 root root 4096 Oct 21 11:15 openfoam222
drwxr-xr-x 6 root root 4096 Oct 21 11:17 paraviewopenfoam3120
"

and after that, with the last command i get no message so i guess everything is ok no?

Once again thank you all
Antoniorp is offline   Reply With Quote

Old   October 26, 2014, 10:15
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi António,

From your description, everything seems to be OK!

I hope you don't mind, but I'll answer the other question you sent me via PM, regarding these instructions:
Quote:
Originally Posted by http://www.openfoam.org/download/ubuntu.php
Create a project directory within the $HOME/OpenFOAM directory named <USER>-2.3.0 (e.g. chris-2.3.0 for user chris and OpenFOAM version 2.3.0) and create a directory named run within it, e.g. by typing:

mkdir -p $FOAM_RUN

Copy the tutorial examples directory in the OpenFOAM distribution to the run directory. If the OpenFOAM environment variables are set correctly, then the following command will be correct:

cp -r $FOAM_TUTORIALS $FOAM_RUN
I believe that if you had studied the page I told you about the other day, namely this one: http://openfoamwiki.net/index.php/In...with_the_Shell - you would have understood what those instructions at http://www.openfoam.org/download/ubuntu.php were referring to.
My advice is that you carefully follow the OpenFOAM User Guide, starting from the beginning of chapter 2: http://www.openfoam.org/docs/user/tutorials.php - well, you can/should read chapter 1 as well, but I'm pointing to chapter 2 because it's where they give more details on what they were referring to in the installation page, namely in the "Getting Started" section.


If by any chance you still aren't seeing the bigger picture, try running these two commands:
Code:
echo $FOAM_TUTORIALS
echo $FOAM_RUN
it should become clearer what's going on

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 27, 2014, 06:24
Default
  #13
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Ok, i think i got it now and i did the first part of the tutorial

I have another question now.

Why can't i run any commands in terminal while paraview is open? When i run paraFoam and paraview is open, no matter what i write in terminal it wont do anything. Only when i close paraview i am able to run any commands again.

Also,

In the tutorial they ask us to produce a finer mesh which i have done and also i have mapped the results of the first mesh onto the second one. But as soon as i open paraview again it lists a lot of errors like this one:

QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action


Anyone can help me?

Thank you a lot

António
Antoniorp is offline   Reply With Quote

Old   October 27, 2014, 15:48
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi António,

Quote:
Originally Posted by Antoniorp View Post
Why can't i run any commands in terminal while paraview is open? When i run paraFoam and paraview is open, no matter what i write in terminal it wont do anything. Only when i close paraview i am able to run any commands again.
Remember when I wrote the following:
Quote:
Originally Posted by wyldckat View Post
I believe that if you had studied the page I told you about the other day, namely this one: http://openfoamwiki.net/index.php/In...with_the_Shell
Looks like you haven't read it yet . In there is a link that tells the person who is reading the page to study a tutorial entitled "Learning the shell". In that particular tutorial, if you read chapter 8 "Job Control", you'll find the answer to your question.


Quote:
Originally Posted by Antoniorp View Post
In the tutorial they ask us to produce a finer mesh which i have done and also i have mapped the results of the first mesh onto the second one. But as soon as i open paraview again it lists a lot of errors like this one:

Code:
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
That looks familiar to me... I've seen that several times here on the forum... I vaguely remember that those messages can be ignored. Check if you can still see the first "cavity" case in ParaView without those errors.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 28, 2014, 04:48
Default
  #15
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Ah, you're right, it was really easy to solve, sorry about that.

Thanks again

António
Antoniorp is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Installing OpenFOAM at Ubuntu Maralady OpenFOAM Installation 1 August 25, 2013 18:22
Installation paraFoam - still problem nhl OpenFOAM Installation 7 June 22, 2010 09:22
Problem with baffles from Harpoon in OpenFoam OMN OpenFOAM 0 June 9, 2010 08:59
Problem running paraFoam on OpenFOAM 1.5 sonny OpenFOAM 3 June 6, 2009 20:24
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 07:08.