CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Gnuplot usage

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2007, 03:42
Default Hi all. I'm either an idiot
  #1
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
Hi all.

I'm either an idiot or something isn't working, or both. I'm trying to set up plotting with gnuplot of the various fields created with OpenFOAM, however, I don't seem to see a straightforward way of doing this. When I try to alter the output format to something other than raw, (like gnuplot, but I just tried xmgr), nothing gets output except the raw format. So, nothing changes.

So, is there some easy way of outputting things to a gnuplot-friendly output, or will I be left with hand altering the input files. What files will I need to accomplish this and does anyone have any suggestions?

While I love paraview and all, I've come to appreciate the very small file size associated with gnuplot created graphics and the ease with which I can put them in my latex docs. Any advice is greatly appreciated.

Regards,
Mike
mike_jaworski is offline   Reply With Quote

Old   December 16, 2007, 05:52
Default Hi Mike! The output format
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mike!

The output format you are referring to is not for the fields, but for the sample-utility which lets you extract the data of the fields on lines. Have a look in the user-guide in section 7.5. A similar utility is sampleSurface, but I know of no docu for it except for the sources and a sample dictionary (no pun intended) that is located with the sources

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 16, 2007, 10:29
Default Hi Everybody, why not use the
  #3
Member
 
ville vuorinen
Join Date: Mar 2009
Posts: 67
Rep Power: 17
ville is on a distinguished road
Hi Everybody,
why not use the cutting plane??! I found about this option which really makes many things about postprocessing just flexible and I think it should be put into the manual as well. So what you can do
is to add top-level code to your solver for printing out data just from a single cutplane that you choose. This can be done as follows:

1) define a plane
point xyz(0,0,0) // choose the point through which //the plane goes

vector dir(0,0,1) // normal direction
plane plane1(xyz,dir)

cuttingPlane plane1(mesh, plane1);


Now it is very easy to refer to the cell indeces
by e.g.


planeCell = plane1.cells()[cutplaneIterator];
xpoint = mesh.C()[planeCell].x();

and so on..

This enables the user to print out the coordinate
points to a file and to refer to the field values in the cells that are on the plane. It is then possible to print out stuff from the defined cutplanes as often as you wish. This really
makes post processing with matlab, gnuplot etc
handy since you can just load the data to
those programs, interpolate to a cutplane using
e.g. griddata in matlab etc. I found this
necessary since my cases are so big that
running paraview or other postprocessors is
really unpractical for making animations etc.

Regards,
Ville
ville is offline   Reply With Quote

Old   December 17, 2007, 12:43
Default Hi all! Thank you both for
  #4
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
Hi all!

Thank you both for the advice. I apparently skipped that section of the solidDisplacementFoam tutorial so I was unaware of the sample utility.

Thank you also for the suggestion of a cutting plane. I haven't gotten into the coding parts yet, but this will soon be becoming more important in my research... which now that I think of it, is something I said this summer but something kept pushing it back... such is life.

Regards,
Mike
mike_jaworski 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
Help with Gnuplot Sham FLUENT 0 April 23, 2008 02:12
Help with GNUPlot Renato. Main CFD Forum 6 June 6, 2007 19:51
gnuplot Mich Main CFD Forum 0 August 7, 2006 07:30
about gnuplot Tom,L. Main CFD Forum 3 December 30, 2002 13:55
Related to using gnuplot ANIL LAL Main CFD Forum 2 October 22, 1999 11:20


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