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

Visualization with ParaView (in general)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 8, 2010, 13:28
Default Visualization with ParaView (in general)
  #1
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Hello World.

My questions is not directly related to OpenFOAM, but to the usage of ParaView in CFD-Simulations in general.

What I want to know is how I can learn to visualize data with ParaView.
OpenFOAM uses the VTK-format? Is this applicabel to any kind of data?

I'm working with a selfmade CFD-code from a small company and they want to visualize their data with ParaView.

Have nice day. S.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 25, 2010, 08:17
Default
  #2
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Hello, me again.

I had a quick look into the VTK.
Seems like there are well defined file formats for the creation of VTK-files, which can be read from inside ParaView.

How does the conversion from the OpenFOAM data structure to the VTK format work? This should be foamToVTK?

Just for basic understandung: This tool reads the data from OpenFOAM and writes it to the specific VTK-file-format?
Just to make sure: This is the only way of dealing with this?

If yes, then I know what to do: Write a code, which converts the data from our selfmade CFD-code into the VTK-file-format!

Have a nice day.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 26, 2010, 03:33
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by sega View Post
... This tool reads the data from OpenFOAM and writes it to the specific VTK-file-format?
Just to make sure: This is the only way of dealing with this?

If yes, then I know what to do: Write a code, which converts the data from our selfmade CFD-code into the VTK-file-format!
Note that the VTK files that OpenFOAM writes are the so-called 'legacy' format. The more modern XML-based VTK streaming formats are much more annoying to generate - I haven't bothered.
I would personally suggest writing Ensight format (ASCII and/or C binary) for your output instead. IMO this has several distinct advantages over using VTK files.
  • Paraview and VTK provide reasonable support for Ensight format.
  • Other visualization programs may also support Ensight format.
  • The Ensight format provides a native way of storing nfaced (polyhedral) cells that is currently impossible with VTK formats.
  • In the Ensight format, you can have a single time-invariant geometry with multiple time-varying field values. In the legacy VTK, you would need to store the geometry for every field, for each time. There is a paraview format that could avoid some of the redundant geometry, but then you definitely need to use the XML-based VTK formats.
As another alternative, you might also find it useful/interesting to see if a solution with XDMF/HDF5 might also work for your in-house CFD code.
olesen is offline   Reply With Quote

Old   January 26, 2010, 05:13
Default
  #4
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Quote:
Originally Posted by olesen View Post
Note that the VTK files that OpenFOAM writes are the so-called 'legacy' format. The more modern XML-based VTK streaming formats are much more annoying to generate - I haven't bothered.
I would personally suggest writing Ensight format (ASCII and/or C binary) for your output instead. IMO this has several distinct advantages over using VTK files.
  • Paraview and VTK provide reasonable support for Ensight format.
  • Other visualization programs may also support Ensight format.
  • The Ensight format provides a native way of storing nfaced (polyhedral) cells that is currently impossible with VTK formats.
  • In the Ensight format, you can have a single time-invariant geometry with multiple time-varying field values. In the legacy VTK, you would need to store the geometry for every field, for each time. There is a paraview format that could avoid some of the redundant geometry, but then you definitely need to use the XML-based VTK formats.
As another alternative, you might also find it useful/interesting to see if a solution with XDMF/HDF5 might also work for your in-house CFD code.
Very interesting response, thank you for that.
I will have a look into the Ensight format.
As a matter of fact our code is using cubic cells exclusively, so basically I'm not in need of polyhedral cell support.

As I have mentioned this is the first step towards visualization.
Later our case contain of up to 2 million cells. In this case writing VTK-files and reading them into ParaView may not the right approach for obvious memory reasons. I have read something about "pipeline" visualization.
What is this? If the user wants to have a specific field visualization, ParaView communitcates via VTK with the data from our simulation?!
So there doesn't have to be a new (gigabyte) file of VTK-data?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 29, 2010, 10:05
Default
  #5
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
So, simple question again: How does OpenFOAM and Paraview communicate?
Are there temporary VTK files or is there a 'direct' communication?

I'm still not sure ...
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 29, 2010, 10:39
Default
  #6
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by sega View Post
So, simple question again: How does OpenFOAM and Paraview communicate?
Are there temporary VTK files or is there a 'direct' communication?

I'm still not sure ...
One means is the reader module:
Code:
applications/utilities/postProcessing/graphics/PV3FoamReader/

This would, of course, be yet another means of solving your problem. Write a reader module to handle your in-house data format.
olesen is offline   Reply With Quote

Old   January 31, 2010, 06:42
Default
  #7
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Thank you olesen.

vtkPV3FoamReader.h looks like the only file worth looking at...
That can't be all?!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   February 1, 2010, 03:24
Default
  #8
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by sega View Post
Thank you olesen.

vtkPV3FoamReader.h looks like the only file worth looking at...
That can't be all?!
Nope. IMO you need to look at and study all of them. The PV3FoamReader directory has the paraview server-manager plugin (this is where you'd have found the vtkPV3FoamReader.h header). The vtkPV3Foam directory contains the ''real" work - the transformation from OpenFOAM structures and data types into VTK.
olesen 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
welding sim visualization problems in Paraview Aorus ParaView 0 December 25, 2009 15:39
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
Paraview installation troubles jjhall OpenFOAM Installation 3 April 17, 2008 12:59
ParaView patch visualisation error in Development version philippose OpenFOAM Paraview & paraFoam 17 March 26, 2007 06:45
PARAVIEW Grid visualization simone Marras ParaView 2 January 23, 2007 09:05


All times are GMT -4. The time now is 14:44.