CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Using Python in Openfoam in-built paraFoam (paraView 3.8.0)

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 19, 2012, 00:32
Default Using Python in Openfoam in-built paraFoam (paraView 3.8.0)
  #1
New Member
 
anonymous
Join Date: Mar 2011
Posts: 11
Rep Power: 15
Man Yue is on a distinguished road
My have installed and used OpenFoam 1.7.0. However, I would like to compute the average flow field (like U+ vs y+, urms+ vs y+, etc) for channel flows with python calculator. However, I can't even see the filter "python calculator" in the paraFoam. Anyone knows how to enable the python function in the openfoam in-built paraFoam? Or it cannot be done so that I have to install new paraView from www.paraview.org?
Man Yue is offline   Reply With Quote

Old   October 19, 2012, 16:17
Default
  #2
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 Man Yue,

It depends on which instructions you followed for installing OpenFOAM, but most instructions do not include Python in ParaView. It could also depend on the Linux Distribution you're using, since the most recent ones already provide a recent version of ParaView, which should also already have Python integrated in it.

You can install any pre-built version of ParaView from www.paraview.org with OpenFOAM, if you follow these instructions:
http://www.cfd-online.com/Forums/blo...-openfoam.html - it's written for 3.10.1, but you can easily adapt the instructions to use a more recent version of ParaView.

You could also re-build ParaView yourself, with the option to build with Python.

Last but not least, you can also use swak4Foam to help you to do the necessary calculations while OpenFOAM is running: http://openfoamwiki.net/index.php/Contrib/swak4Foam

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 22, 2012, 00:49
Default
  #3
New Member
 
anonymous
Join Date: Mar 2011
Posts: 11
Rep Power: 15
Man Yue is on a distinguished road
Thank you for your reply. I have tried the commands below:
http://www.cfd-online.com/Forums/blo...-openfoam.html

Then, I opened paraFoam, but I get the followings:

Input:
lam@lam-laptop:~/OpenFOAM/lam-1.7.0/run/Arthur/channelFoam/channel395$ paraFoam

Output:
created temporary 'channel395.foam'
/opt/openfoam170/bin/paraFoam: line 137: paraview: command not found

And when I attempted:

Input:
lam@lam-laptop:~$ source /opt/openfoam170/etc/apps/paraview3/bashrc

It gives no reply. What should I do?
Man Yue is offline   Reply With Quote

Old   October 22, 2012, 09:31
Default
  #4
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
What do the following commands output?
Code:
echo $ParaView_DIR
ls -l $ParaView_DIR
If both output nothing, then that's because you've only removed the target folder and did not unpack and move the new folder properly.
__________________
wyldckat is offline   Reply With Quote

Old   October 23, 2012, 03:45
Default
  #5
New Member
 
anonymous
Join Date: Mar 2011
Posts: 11
Rep Power: 15
Man Yue is on a distinguished road
May be the problem is I have attempted paraView 3.14, which is not pre-built.

I tested also pre-built v3.10.1 but still failed.

I tested then pre-built v3.8.0, i.e. re-getting the v.3.8.0 with:
wget http://www.paraview.org/files/v3.8/P...-x86_64.tar.gz
and then
tar -xzf /home/lam/ParaView-3.8.0-Linux-x86_64.tar.gz
mv ParaView-3.8.0-Linux-x86_64/* .
rmdir ParaView-3.8.0-Linux-x86_64this time is a success, with the python calculator on (without doing things on the post for using v3.10 since step 8).

I guess some of the scripts inside the files originally operated well with v3.8.0 may also need changes to shift to v3.10.1 (e.g. possibly /opt/openfoam170/etc/apps/paraview3/bashrc).

For me, the key is to use python and now it is there for v.3.8.0.
Anyway, thanks .
Man Yue is offline   Reply With Quote

Old   October 23, 2012, 04:28
Default
  #6
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
You're welcome and I'm glad you managed to fix things on your own!
__________________
wyldckat is offline   Reply With Quote

Old   November 30, 2012, 07:57
Default Changes
  #7
New Member
 
anonymous
Join Date: Mar 2011
Posts: 11
Rep Power: 15
Man Yue is on a distinguished road
Sorry for jumping to the conclusion, but after testing, paraview 3.8 does not work (it shows the option "programmable filter", but does not run) but 3.12.0 does. I don't know why, but should be related to how it is compiled.
Man Yue 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
[OpenFOAM.org] Using OpenFOAM 2.3.0 from Deb pack in Ubuntu 14.04 + ParaView 5 from OpenFOAM 4.1 ad2eb OpenFOAM Installation 12 May 28, 2017 15:30
[OpenFOAM.org] set up python path for python in paraview compiled with openfoam seanread OpenFOAM Installation 7 October 31, 2015 21:20
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
[OpenFOAM] ParaView 33 Python Shell error mschoenberg ParaView 2 August 20, 2008 11:42


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