CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Merge VTK files

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2013, 05:05
Default Merge VTK files
  #1
EnK
New Member
 
Join Date: Mar 2013
Posts: 2
Rep Power: 0
EnK is on a distinguished road
Hi all

i'm trying to merge several .vtk files which have the same geomtry but are referred to different timesteps in order to obtain just one file to be processed with Paraview. Anyone knows if exist a filter or a trick to do that?

Thanks in advance

EnK
EnK is offline   Reply With Quote

Old   September 2, 2013, 04:47
Default
  #2
New Member
 
Join Date: Jan 2012
Location: Germay - Stuttgart
Posts: 21
Rep Power: 0
HaZe is on a distinguished road
Hi I'm trying to do the same. Did you make any progress?
HaZe is offline   Reply With Quote

Old   September 4, 2013, 17:05
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 130
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

The ".vtk" files are legacy files, which means that they have some limitations on what can be done with them. For example, only 1 time instance can be stored in a single VTK file. You'll have to rely on multiple VTK files, as explained here: http://paraview.org/Wiki/Animating_l...TK_file_series

Although, I did some tests and we still have to rely on several files (using the same criteria explained in the link above) when saving on the more recent VTK format ".vtu".

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 5, 2013, 04:59
Default
  #4
New Member
 
Join Date: Jan 2012
Location: Germay - Stuttgart
Posts: 21
Rep Power: 0
HaZe is on a distinguished road
Hi there,

thanks to the Animating legacy VTK files page I was able to achieve what I wanted to.

My case was split into several sub cases including the time directories. So the vtks were always named starting at ..._1.vtk.
For example:
case0280 with vtks case0280_1.vtk, case0280_2.vtk, ... case0280_n.vtk
case0310 with vtks case0310_1.vtk, case0310_2.vtk, ... case0310_n.vtk

So I copied all vtks to a new directory and renamed them (via script) in ascending order and the same suffix:
case_0.vtk ... case_n.vtk

Now everything works fine :-)

A better solution would may be to just link to every *.vtk and have the links named in ascending order. But unfortunately I'm having the data on a FAT formatted HDD which doesn't support symbolic links.
HaZe is offline   Reply With Quote

Old   September 17, 2016, 11:08
Default
  #5
New Member
 
mayank bhuwal
Join Date: Jun 2016
Posts: 3
Rep Power: 11
mayankbhuwal89 is on a distinguished road
Hi there ,

Could you please tell how did you merge those set of vtk files into one.

I also have set of vtk files like plot01.vtk, plot02.vtk...plot07.vtk. I want to merge those files into one.
mayankbhuwal89 is offline   Reply With Quote

Old   September 18, 2016, 15:41
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 130
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by mayankbhuwal89 View Post
I also have set of vtk files like plot01.vtk, plot02.vtk...plot07.vtk. I want to merge those files into one.
Quick answer: In the previous posts it's already answered that it's not possible to merge these files into a single one, at least not with the same file extension.

If you want to open all of the files in ParaView as a time series, ParaView will shown you a group name "plot..vtk", which you can open directly, without selecting any of the other files; then you can use the play button (the green triangle in the time controls).

The closest to storing all files in a single package will still generate two files. In ParaView, menu "File -> Save Data" and choose the "Xmdf Data file" format, which will create an ".h5" and an ".xmf" file.
wyldckat is offline   Reply With Quote

Old   February 19, 2025, 07:26
Default Solution to merge vtk files
  #7
Member
 
Tarang
Join Date: Feb 2011
Location: Delhi, India
Posts: 48
Rep Power: 16
gtarang is on a distinguished road
Quote:
Originally Posted by EnK View Post
Hi all

i'm trying to merge several .vtk files which have the same geomtry but are referred to different timesteps in order to obtain just one file to be processed with Paraview. Anyone knows if exist a filter or a trick to do that?

Thanks in advance

EnK
I was also facing the same problem. I used following method:
In paraview I used ExtractTimeSteps filter and then File>Save Data and saved data in vtm format
In new paraview I opened data_*.vtm. This data was coming as with timesteps.
I then used the filter "GroupTimeSteps" to group all the data in single step.
Save the "GroupTimeSteps" as a new vtm file.
gtarang is offline   Reply With Quote

Reply

Tags
merge vtk files

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Time variable in ParaView from VTK files egallyamov ParaView 1 June 30, 2017 17:17
Compiled library vs. inInclude Files, DSMC solver crashes after run GPesch OpenFOAM Programming & Development 8 April 18, 2013 07:17
Split and Merge CGNS files Reichstein Main CFD Forum 0 January 30, 2011 06:42
CFX crash recovery, is there a way to merge mon and trn files? jrl4444 CFX 1 October 30, 2010 11:52
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01


All times are GMT -4. The time now is 20:51.