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

[OpenFOAM] paraview isolines

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By wallace
  • 4 Post By javier_b

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2014, 11:48
Default paraview isolines
  #1
New Member
 
jas
Join Date: Feb 2014
Posts: 5
Rep Power: 12
jasxxx is on a distinguished road
hi
is it possible to do isolines over a clipped surface, with the actual numbers on the isolines for pressure or velocity magnitude?
thanks
jas
jasxxx is offline   Reply With Quote

Old   March 23, 2014, 13:46
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 jas,

In ParaView, it's possible, but not easily done. The only two possible solutions I can find are:
  1. Coding a Programmable Filter in Python, using this code in C++ as reference: http://www.paraview.org/Wiki/VTK/Exa.../LabelContours
  2. Using matplotlib: http://www.kitware.com/blog/home/post/588
But probably the easiest is to export the isolines into a CSV file ("File -> Save Data", if I'm not mistaken) and then plot them elsewhere, such as with gnuplot.

You might also want to ask for this feature at ParaView's bug tracker and/or ParaView's UserVoice:

Best regards,
Bruno
__________________

Last edited by wyldckat; March 23, 2014 at 13:47. Reason: see "EDIT:"
wyldckat is offline   Reply With Quote

Old   May 18, 2014, 07:52
Default
  #3
New Member
 
Wallace Green
Join Date: May 2010
Posts: 19
Rep Power: 15
wallace is on a distinguished road
Hi Bruno,

I hope this doesn't seem to off-topic but this thread is the only hit for "matplotlib in ParaView" on the forum. Have you managed to build ParaView 4.1.0 and use the new matplotlib capabilities?

My installation:
OF23x on SL 6.5 largely following your excellent instructions over on the OpenFOAMWiki. For ParaView, I've set the python (and mesa) option to true in makeParaView4. Prior to build python 2.6.6, numpy 1.4.1 and python-matplotlib 0.99.1.2 were installed via yum. Qt 4.8.5 is built from source. Compiler is clang 3.3.

ParaView builds without error and python scripting features work fine, but if I try to open a "Python View" to do some matplotlib plots, I get the following error:

Code:
ERROR: In /home/william/OpenFOAM/ThirdParty-2.3.x/ParaView-4.1.0/ParaViewCore/ClientServerCore/Rendering/vtkMatplotlibUtilities.cxx, line 302
vtkMatplotlibUtilities (0x4940540): Could not call 'dpiCanvas.print_to_buffer()'


Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'inf' is not defined
ERROR: In /home/william/OpenFOAM/ThirdParty-2.3.x/ParaView-4.1.0/ParaViewCore/ClientServerCore/Rendering/vtkMatplotlibUtilities.cxx, line 302
vtkMatplotlibUtilities (0x4940540): Could not call 'pythonViewCanvas.print_to_buffer()'
Is some VTK dependency missing perhaps, or some configuration in the ParaView?
wallace is offline   Reply With Quote

Old   May 18, 2014, 09:38
Default
  #4
New Member
 
Wallace Green
Join Date: May 2010
Posts: 19
Rep Power: 15
wallace is on a distinguished road
Problem solved: removed SL python-matplotlib 0.99.1.2, built and installed matplotlib-1.2.0. (Thanks to Cory Kwammen at Kitware.)
wyldckat likes this.
wallace is offline   Reply With Quote

Old   October 31, 2014, 03:56
Default
  #5
New Member
 
Join Date: Oct 2012
Posts: 4
Rep Power: 13
javier_b is on a distinguished road
Hi Jas,

I was looking for a similar solution and I came across your thread.

There is another possibility that hasn't been mentioned here… It is a bit tedious but the results are nice.

1. You need to have first the contour lines.
2. Make a slice over the contour lines you want to label (in order to make points)
3. Select the points you just created.
4. Open the selection inspector and make the label of the points “visible”.
5. You can choose the format of the float number (i.e. %.2f), the color, size etc..

Note: the picture attached uses a constant value just for illustration purposes.

This method has been taken from the following paraview thread:
http://public.kitware.com/pipermail/...er/018798.html

Regards,
Javier
Attached Images
File Type: png cfd_online.png (32.3 KB, 406 views)
javier_b is offline   Reply With Quote

Old   February 19, 2015, 06:15
Default
  #6
Member
 
Pratik Nanavati
Join Date: May 2014
Location: Munich, Germany
Posts: 40
Rep Power: 11
nanavati is on a distinguished road
Quote:
Originally Posted by javier_b View Post
Hi Jas,

I was looking for a similar solution and I came across your thread.

There is another possibility that hasn't been mentioned here… It is a bit tedious but the results are nice.

1. You need to have first the contour lines.
2. Make a slice over the contour lines you want to label (in order to make points)
3. Select the points you just created.
4. Open the selection inspector and make the label of the points “visible”.
5. You can choose the format of the float number (i.e. %.2f), the color, size etc..

Note: the picture attached uses a constant value just for illustration purposes.

This method has been taken from the following paraview thread:
http://public.kitware.com/pipermail/...er/018798.html

Regards,
Javier
Many thanks for sharing this info. it worked like a charm ! and i found it very easy compared to gnuplot and MATLAB.
nanavati is offline   Reply With Quote

Old   October 27, 2016, 20:51
Default Non-steady isotherms/ Slice misfit
  #7
New Member
 
Omer Faruk Bodur
Join Date: Oct 2016
Location: Sydney
Posts: 1
Rep Power: 0
ofbodur is on a distinguished road
Send a message via Skype™ to ofbodur
Hello,

The solution given here assumes that these contours will be steady. I have a simulation in which isotherms change during the model evolution, which means that slices will not fit in the isotherms for other time intervals. Is there any other way just to put the values of isotherms on the lines as we do in MATLAB?

Cheers

Omer
ofbodur is offline   Reply With Quote

Reply


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] Two different versions of ParaView with same OpenFOAM release FJSJ OpenFOAM Installation 2 July 23, 2017 05:48
Paraview version update errors Dan Pearce OpenFOAM Installation 5 January 8, 2014 05:47
Installing OpenFOAM and ParaView in VirtualBox(Ubuntu on Win8) chrisb2244 OpenFOAM Installation 2 August 21, 2013 13:24
Newbie: Install ParaView 3.81 on OF-1.6-ext/OpenSuse 11.2? lentschi OpenFOAM Installation 1 March 9, 2011 02:32
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41


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