CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ParaView

Question about VTK Format, Time and ParaView

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

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   April 5, 2013, 05:20
Default Question about VTK Format, Time and ParaView
  #1
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Posts: 1,118
Rep Power: 19
ngj will become famous soon enough
Dear all,

I am working on a small conversion tool for a specific mesh type in OF into VTK format (UNSTRUCTURED_GRID). The file names are given a name and a incrementing index, though, I would also like to be able to put a string with the actual time in animations, etc.

Therefore, I have added this part into the VTK file:

Code:
FIELD FieldData 1
TIME 1 1 double
204.0048
and this makes it possible for me to see this variable in the Information tab in ParaView.

My question is how I can get this data in a string in paraview, i.e. similar to the Annotate Time filter, though, this does not work on my case. I have uploaded a small VTK sample for your convenience here:

http://www.student.dtu.dk/~ngja/vtkSample.tar.gz

Thank you for your attention,

Niels
ngj is offline   Reply With Quote

Old   April 7, 2013, 11:55
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 4,228
Blog Entries: 31
Rep Power: 45
wyldckat has a spectacular aura aboutwyldckat has a spectacular aura about
Hi Niels,

I gave it a few shots in ParaView and Googled around to check on this topic... and I think I've seen where you've gotten this idea: http://www.visitusers.org/index.php?...e_in_VTK_files

Problem is that this specific time information is something that VisIt implemented:
Quote:
Since VTK files do not have a specific construct for doing so, VisIt implements a convention where CYCLE and TIME values can be added as FieldData in the file.
If you do switch to VisIt, I think you should move the time information closer to the beginning of the file:
Code:
# vtk DataFile Version 2.0
faMesh
ASCII
DATASET UNSTRUCTURED_GRID
FIELD FieldData 1
TIME 1 1 double
204.0028
POINTS 1763 float
Because the wiki page clearly states that:
Quote:
Pay attention that the field data comes right after the DATASET type in the VTK file.
If you do want time associated with your VTK files, you'll have to use the XML version of VTK files, as presented here: http://paraview.org/Wiki/images/2/20...n-ParaView.ppt

Best regards,
Bruno
ngj likes this.
wyldckat is offline   Reply With Quote

Old   April 7, 2013, 16:22
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Posts: 1,118
Rep Power: 19
ngj will become famous soon enough
Hi Bruno,

Thank you very much. This have given me some directions to work with. Most appreciated.

Kind regards,

Niels
ngj 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
Legacy VTK for time dependent variables. Splatzo ParaView 1 February 22, 2013 04:02
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34
paraview ignores SPACING in STRUCTURED_POINTS vtk data? jaffar ParaView 0 November 27, 2012 09:36
AMI speed performance danny123 OpenFOAM 19 October 24, 2012 07:44
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:21.