|
[Sponsors] |
[General] Question about VTK Format, Time and ParaView |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 5, 2013, 05:20 |
Question about VTK Format, Time and ParaView
|
#1 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
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 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 |
|
April 7, 2013, 11:55 |
|
#2 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
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:
Code:
# vtk DataFile Version 2.0 faMesh ASCII DATASET UNSTRUCTURED_GRID FIELD FieldData 1 TIME 1 1 double 204.0028 POINTS 1763 float Quote:
Best regards, Bruno
__________________
|
|||
April 7, 2013, 16:22 |
|
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi Bruno,
Thank you very much. This have given me some directions to work with. Most appreciated. Kind regards, Niels |
|
December 17, 2013, 09:05 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Good afternoon,
I wanted to follow up on this. I finally had the time to re-visit the time stamp for VTK files in ParaView, and the hint by Bruno worked beautifully. Now, I merely have to clean up my code (a lot). Thanks again, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 12, 2014, 18:07 |
|
#5 |
New Member
Bruno Bellier
Join Date: Jul 2014
Posts: 2
Rep Power: 0 |
Hello,
I am very interesting by using the time in a VTK file but I don't succeed to do that yet. Is-it possible to give me a sample ? Thank you in advance. |
|
July 13, 2014, 06:32 |
|
#6 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Good morning,
Yes, please find an example attached to this post. All you need to do is to open the file collection.pvd in paraFoam/paraView and you are set. You see a deforming sand bed and the VTK-format is for the faMesh of my computational domain. Now you will be able to insert the "Time Annotation", and it will change the time, when you go through the indices. The writer itself, however, utilises some code, which we have decided to keep in-house for the moment, so I can unfortunately not share the code itself. One thing, which I was unsuccessful in doing, was to write in binary format, so if you get around to understand the formatting of the *vtp files in binary, please share your knowledge. Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 13, 2014, 13:02 |
|
#7 |
New Member
Bruno Bellier
Join Date: Jul 2014
Posts: 2
Rep Power: 0 |
Ok Thank you, don't worry I have yet done the Writer is yet done. I wanted to improve it and thank to you I will succeed.
For the binary file I don't use it because I have to read data in the text file if I want. good lucke |
|
November 16, 2016, 10:38 |
|
#8 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Niels,
Thanks to your example I have written a program to get my data in VTK XML format (StructuredGrid) in order to use ParaView as visualization tool. If my complete flow domain is hexahedral (for example, 4 blocks) it works well. But if my complete flow has an L shape, for example, it doesn't work. ParaView asks more data. Do you know the reason ? Best regards, Stephane. |
|
August 9, 2022, 09:29 |
time in binary vtk file
|
#9 |
New Member
Join Date: Jun 2018
Posts: 20
Rep Power: 7 |
Has anybody managed to add time to a binary vtk file yet?
Adding the above mentioned entries to the header works for ascii but paraview crashes when using binary: Code:
# vtk DataFile Version 2.0 sampleSurface BINARY DATASET POLYDATA FIELD FieldData 1 TIME 1 1 double 204.0028 POINTS 4693 float <# ;;r<# ;V;C<# Thanks! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 21:00 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |
[OpenFOAM] Paraview problem: loading the VTK cellSets changes the time | anon_q | ParaView | 1 | November 3, 2018 20:53 |
[General] Time variable in ParaView from VTK files | egallyamov | ParaView | 1 | June 30, 2017 17:17 |
[General] Paraview data format conversion from vtk to parallel prog data format. | odho | ParaView | 0 | September 20, 2016 07:01 |