Using the official pre-built ParaView 3.8.0 version with OpenFOAM...
Posted July 17, 2010 at 16:19 by wyldckat
Updated September 5, 2011 at 06:17 by wyldckat (Generalized instructions for any version of OpenFOAM; now with sed :D And some more adjustments and instructions)
Updated September 5, 2011 at 06:17 by wyldckat (Generalized instructions for any version of OpenFOAM; now with sed :D And some more adjustments and instructions)
<-- Related issues to ParaView with OpenFOAM - Fixes and solutions
NOTE - New instructions available here: Using the official pre-built ParaView 3.10.1 version with OpenFOAM
NOTE 2: Instructions for doing a custom build: Building ParaView 3.8.0 with custom Qt 4.6.3
_________________________________________________
Greetings to all!
[When this post was first written] Less than a month ago OpenFOAM 1.7.0 was released. With it also came ParaView 3.8.0, which is currently also available at www.paraview.org.
This blog post comes to try and help new (and old) users of OpenFOAM to quickly get ParaView 3.8.0 working with OpenFOAM 1.7.0, without having to go through the somewhat hazardous building procedure that it currently looks like it to be...
I hope that this should work for any Linux distribution for x86/x86_64 based architectures.
NOTE: these instructions should also work with future versions of ParaView. You'll need to adapt version numbers for ParaView, such as 3.8.0 -> 3.8.1 or 3.9.0.
So, the steps are as follows:
By the way, some additional tips:
Good luck! Best regards,
Bruno
NOTE - New instructions available here: Using the official pre-built ParaView 3.10.1 version with OpenFOAM
NOTE 2: Instructions for doing a custom build: Building ParaView 3.8.0 with custom Qt 4.6.3
_________________________________________________
Greetings to all!
[When this post was first written] Less than a month ago OpenFOAM 1.7.0 was released. With it also came ParaView 3.8.0, which is currently also available at www.paraview.org.
This blog post comes to try and help new (and old) users of OpenFOAM to quickly get ParaView 3.8.0 working with OpenFOAM 1.7.0, without having to go through the somewhat hazardous building procedure that it currently looks like it to be...
I hope that this should work for any Linux distribution for x86/x86_64 based architectures.
NOTE: these instructions should also work with future versions of ParaView. You'll need to adapt version numbers for ParaView, such as 3.8.0 -> 3.8.1 or 3.9.0.
So, the steps are as follows:
- Start a new terminal (and activate the OpenFOAM environment if not already active).
- Check if you already have something installed in paraview's binary folder:Code:
ls $ParaView_DIR
Code:rm -rf $ParaView_DIR
- Now run:Code:
cd $HOME/OpenFOAM mkdir -p $ParaView_DIR
- Now, depending on the architecture you are running on your Linux box (i?86 or x86_64), run one of these commands:
- For i?86:Code:
wget http://www.paraview.org/files/v3.8/ParaView-3.8.0-Linux-i686.tar.gz
- For x86_64:Code:
wget http://www.paraview.org/files/v3.8/ParaView-3.8.0-Linux-x86_64.tar.gz
- For i?86:
- Now do:Code:
cd $ParaView_DIR
- Again, depending on what architecture you are using, do:
- For i?86:Code:
tar -xzf $HOME/OpenFOAM/ParaView-3.8.0-Linux-i686.tar.gz mv ParaView-3.8.0-Linux-i686/* . rmdir ParaView-3.8.0-Linux-i686
- For x86_64:Code:
tar -xzf $HOME/OpenFOAM/ParaView-3.8.0-Linux-x86_64.tar.gz mv ParaView-3.8.0-Linux-x86_64/* . rmdir ParaView-3.8.0-Linux-x86_64
- For i?86:
- Now open the file "$WM_PROJECT_DIR/bin/paraFoam" in your favorite simple text editor and replace every entry ".OpenFOAM" with ".foam". Now save and close the file.
NOTE: if you're feeling too lazy to open a text editor, try this:Code:sed -i -e 's=\.OpenFOAM=\.foam=' $WM_PROJECT_DIR/bin/paraFoam
- Edit the file "$WM_PROJECT_DIR/etc/bashrc" and find the line that says:Code:
paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` \ && _foamSource $paraview3 unset paraview3
Code:#paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` \ # && _foamSource $paraview3 #unset paraview3
- Next, edit again the script "$WM_PROJECT_DIR/bin/paraFoam". Go to the line right after the first block of comments and add the lines that were commented in "$WM_PROJECT_DIR/etc/bashrc", although with a little tweak. With the tweak, it should look something like this (bold is the new addition):Code:
# Description # start paraview with the OpenFOAM libraries # #------------------------------------------------------------------------------ paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` \ && source $paraview3 unset paraview3 usage() {
- Start a new terminal once again and activate the OpenFOAM environment if not already active.
By the way, some additional tips:
- If your Linux installation isn't in English, then you better follow these instructions:
Edit again the file paraFoam and add this line right after the first block of comments:Code:export LC_ALL=C
- If you are having problems with rescaling data (the colour labels) in ParaView, you might have tripped on a now known bug in ParaView 3.8.0. To get past this, read this post (and its thread): paraview 3.8 auto rescale doesn't work #6
- Usual problems with ParaView and some hints on how to fix them: Segmentation fault when visualizing in ParaView
- ParaFoam error could not find a decent visual - solution in post #4
Good luck! Best regards,
Bruno
Total Comments 16
Comments
-
Thanks!!
You help me a lot.Posted September 5, 2010 at 13:04 by ulisses -
Thanks!!! Works great. I have saved plenty of time on debugging the compilation.
Do you know how to make OpenFoam reader default? The window on paraView start-up.Posted October 15, 2010 at 11:50 by kprzysowagmailcom -
Hi kprzysowagmailcom,
Did you read the point 7Quote:7. Now open the file "$WM_PROJECT_DIR/bin/paraFoam" in your favorite simple text editor and replace every entry ".OpenFOAM" with ".foam". Now save and close the file.Code:gedit $WM_PROJECT_DIR/bin/paraFoam
BrunoPosted October 15, 2010 at 11:57 by wyldckat
Updated October 15, 2010 at 11:58 by wyldckat (added example) -
This helped me a lot, thank you. Replacing .OpenFOAM by .foam got rid of the "assertion 'extent !=0' failed" that I got when running paraFoam from a case dir. Now I believe I can finally run the first tutorial example of OpenFOAM in its full glory. :')
Posted December 14, 2010 at 06:55 by Aneirin -
Hi, I created the following note which is very similar to your notes above. sorry I understood this better
It says the same thing, the only difference is that it is the same for all architectures and linux versions ( not sure about that ). And this installs the paraview in the main OpenFOAM folder, so that it would be the same paraview for all OF versions, if you have several versions (like 1.5 , 1.5.x , 1.6 , 1.7) on your computer simultaneously, you just have to do the step 1 and 2 for each version, after calling that version.
I'm trying to make a shell script to do everything automatically. Should you need the script, don't hesitate to contact.
Thank You Wyldckat for your good note. you can edit your notes and remove mine.
1- Remove The Old ParaView Folder. This folder is usually set with OpenFOAM Installation.
The following file defines every parameter regarding ParaView and ParaFOAM:$WM_PROJECT_DIR/etc/apps/paraview3/bashrc
and this file is sourced from main OpenFOAM bashrc file:
$WM_PROJECT_DIR/etc/bashrc
- Look if Old ParaView Folder exists:Code:
ls $ParaView_DIR
- If it says something like Quote:ls: cannot access /home/..../paraview-3.8.0: No such file or directory
If it doesn't say something like that , then remove the folder:
Code:rm -rf $ParaView_DIR
$WM_PROJECT_DIR/etc/apps/paraview3/bashrc
set the paraview version and folders by finding the similar lines and changing to new version and folders:
ParaView_VERSION=3.8.1
paraviewInstDir=$WM_PROJECT_INST_DIR/ParaView-$ParaView_VERSION-Linux-$KUSU_DIST_ARCH
3- Set the ParaView Reader format inside paraFoam command:
export ParaView_DIR=$WM_PROJECT_INST_DIR/ParaView-$ParaView_VERSION-Linux-$KUSU_DIST_ARCH
Open the file "$WM_PROJECT_DIR/bin/paraFoam" in your favorite simple text editor and replace every entry ".OpenFOAM" with ".foam". Now save and close the file.
The following code does the same thing:
Code:sed -i -e 's=\.OpenFOAM=\.foam=' $WM_PROJECT_DIR/bin/paraFoam
Code:wget http://www.paraview.org/files/v3.8/ParaView-$ParaView_VERSION-Linux-$KUSU_DIST_ARCH.tar.gz tar -xzf ParaView-$ParaView_VERSION-Linux-$KUSU_DIST_ARCH.tar.gz
Code:mv ParaView-$ParaView_VERSION-Linux-$KUSU_DIST_ARCH/ $WM_PROJECT_INST_DIR/
Posted January 14, 2011 at 03:13 by sahm - Look if Old ParaView Folder exists:
-
Interesting Problem occured:
I did what I've written above, and parafoam works,
but other openfoam programs don't work as I get the following message:
blockMesh: /home/sahm/OpenFOAM/ParaView-3.8.1-Linux-x86_64/lib/paraview-3.8/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/sahm/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libfiniteVolume.so)
and many other things. any idea for that?Posted January 14, 2011 at 04:07 by sahm -
Hi Sahm,
I'm sorry for taking so long to reply to you, but I didn't receive any email from cfd-online server when you posted the comments
OK, first thing, the following command tells you if you have i?86 or x86_64:Code:uname -m
Second thing, the error you got at the end, happened to me today as well - this is why I only saw your comments today!!
The fix is quite simple:
- Make sure that a certain line in "$WM_PROJECT_DIR/bin/apps/paraview3/bashrc" is like this:Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ParaView_DIR/lib/paraview-$ParaView_MAJOR
- Make sure which architecture your system is, by running:Code:
uname -m
- Now, edit the file "$HOME/.bashrc" file. Now, this is where things get a bit confusing:
- Search for the first line where you placed something related to OpenFOAM.
- Now, before that first line, put this line before it, depending on your architecture - for i?68:
Code:#For i?68 export LD_LIBRARY_PATH=/lib:/usr/lib:$LD_LIBRARY_PATH
Code:#For x86_64 export LD_LIBRARY_PATH=/lib64:/usr/lib64:$LD_LIBRARY_PATH
- Start a new terminal. If necessary, activate the OpenFOAM environment. And test if all is working!
Best regards,
BrunoPosted January 25, 2011 at 19:49 by wyldckat - Make sure that a certain line in "$WM_PROJECT_DIR/bin/apps/paraview3/bashrc" is like this:
-
Hello Bruno,
Just a comment, my system (Scientific Linux 5.5 64 bit) this line does not exist: "$WM_PROJECT_DIR/bin/apps/paraview3/bashrc".
Instead, I have "$WM_PROJECT_DIR/etc/apps/paraview3/bashrc". Edited this file as you suggested above and blockMesh works.
Thank you for your post and insight.Posted February 9, 2011 at 18:57 by namCFD -
Hi Nam,
Quote:Just a comment, my system (Scientific Linux 5.5 64 bit) this line does not exist: "$WM_PROJECT_DIR/bin/apps/paraview3/bashrc".
Instead, I have "$WM_PROJECT_DIR/etc/apps/paraview3/bashrc". Edited this file as you suggested above and blockMesh works.
Thank you for your post and insight.
I'll fix it right away before I forget to fix it...
And you're welcome
Best regards,
BrunoPosted February 9, 2011 at 20:19 by wyldckat -
Posted February 24, 2011 at 05:48 by maysmech
Updated February 24, 2011 at 07:13 by maysmech -
Hello,
Is this procedure useful even for OpenFOAM 2.0.x with Paraview 3.10.1?
In the step 2, you mentioned if it doesn't say something like this "blah blah blah" then remove the directory and go to step 3. But when I type ls $Paraview_DIR, it gives me that line, so what should I do next? do I have to still remove the folder?
Thank youPosted August 24, 2011 at 12:23 by vetnav -
Hi Naveen,
You must be getting very stressed out Didn't you read the top of this blog post?
Quote:NOTE - New instructions available here: Using the official pre-built ParaView 3.10.1 version with OpenFOAM
edit: I forgot to mention that if the folder does exist in step 2, then do remove it!
Best regards and good luck!
BrunoPosted August 24, 2011 at 17:01 by wyldckat
Updated August 24, 2011 at 17:03 by wyldckat (see "edit:") -
Hi Bruno,
Thank you for the reply. I installed OpenFOAM 2.0.x, and I overlooked the instructions for Paraview 3.10.1. So I installed paraview and used foamtoVTK. Now I will try the above thread.
You are right I am stressed out even though I felt happy after 2.0.x installed properly, after running a test case I closed my konsole, when I try to open a new konsole, it didn't respon. I restarted the computer and tried again, to my dismay nothing seems working, konsole, editors and other fedora applications are not responding. So I am still struggling
Thank you again for your time
NaveenPosted August 24, 2011 at 21:15 by vetnav -
Hi Naveen,
Oh !"#$%&... You must remove this ParaView pre-built version!! It carries it's own Qt and maybe libc or stdc++ and that's why your Fedora applications stopped working
Sorry about that... sometimes it's a hit and miss with these pre-built things You better build your own ParaView instead!
Best regards and good luck!
BrunoPosted August 25, 2011 at 04:33 by wyldckat -
Hello,
I have some questions regarding ParaView:
1. How to re_built ParaView 3.12.0?
2. Do we need to install a third-party 2.2.1 with OpenFoam 2.2.1 or ParaFOAM is enough for OpenFOAM 2.2.1 to work properly?
3.When I apply the cavity case in paraView 3.12.0 the Apply icom is not activating, what's the problem?
Help me please to answer these three questions.
Many thanksPosted October 13, 2013 at 13:42 by Maimouna -
Hi Maimouna,
Why do you want to rebuild ParaView? According to this post: http://www.cfd-online.com/Forums/ope...tml#post456364 post #10 - you installed the one supplied for OpenFOAM, correct?
Quote:
Quote:
So, please open a new thread on that sub-forum and please describe in detail what steps you've taken and please provide a snapshot of what you're seeing.
Best regards,
BrunoPosted October 13, 2013 at 15:37 by wyldckat