CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   paraFoam problem soon after installing OpenFOAM (https://www.cfd-online.com/Forums/openfoam-installation/142688-parafoam-problem-soon-after-installing-openfoam.html)

Antoniorp October 7, 2014 07:33

paraFoam problem soon after installing OpenFOAM
 
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

alexeym October 7, 2014 08:17

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


blacksquirrel October 7, 2014 10:03

Which OpenFOAM Version did you install?
On which system does it run?

Antoniorp October 8, 2014 05:07

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

alexeym October 8, 2014 05:19

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.

Antoniorp October 8, 2014 05:55

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

blacksquirrel October 8, 2014 06:26

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

Antoniorp October 8, 2014 06:50

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

alexeym October 8, 2014 07:18

Quote:

Originally Posted by Antoniorp (Post 513338)
...
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.

wyldckat October 11, 2014 17:06

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

Antoniorp October 21, 2014 06:59

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

wyldckat October 26, 2014 10:15

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

Antoniorp October 27, 2014 06:24

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

wyldckat October 27, 2014 15:48

Hi António,

Quote:

Originally Posted by Antoniorp (Post 516142)
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 (Post 516013)
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 (Post 516142)
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

Antoniorp October 28, 2014 04:48

Ah, you're right, it was really easy to solve, sorry about that.

Thanks again

António


All times are GMT -4. The time now is 19:52.