CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

paraview isolines

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

Like Tree3Likes
  • 1 Post By wallace
  • 2 Post By javier_b

Reply
 
LinkBack Thread Tools Display Modes
Old   March 9, 2014, 12:48
Default paraview isolines
  #1
New Member
 
jas
Join Date: Feb 2014
Posts: 5
Rep Power: 3
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, 14:46
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,511
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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 14: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: 7
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: 7
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, 04:56
Default
  #5
New Member
 
Join Date: Oct 2012
Posts: 4
Rep Power: 4
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, 68 views)
wyldckat and nanavati like this.
javier_b is offline   Reply With Quote

Old   February 19, 2015, 07:15
Default
  #6
Member
 
Pratik Nanavati
Join Date: May 2014
Location: Munich, Germany
Posts: 40
Rep Power: 3
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

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paraview version update errors Dan Pearce OpenFOAM Installation 5 January 8, 2014 06: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 03:32
Paraview not found fusij OpenFOAM Installation 2 January 1, 2011 21:44
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41


All times are GMT -4. The time now is 00:58.