vtu/xdmf synchronisation

Hi paraview users,
I’m using two coupled applications. One save vtu files, the other save hdf5/xdmf files. Is there a way to synchronize these files when viewing them in a paraview session and building an animation ? I have one VTU file for each hdf5/xdmf file but in vtu format I have not the time information .
At this time, creating animation show some additionnal step (a total of nearly 300 steps for only 200 steps), advancing only one of the coupled file (the vtu only, then the xdmf one) and there are a lot of bad images saved.

Personally I use a script to generate a PVD file to visualize them as animation. Check the details about PVD here.

Thanks Liu for your suggestion. Indeed I do not understand clearly how to associate these two sets of data in a PVD file. Do you provide two collections of datasets with same range of timestep ? A dataset seams to be only on file for me.
Or do you use two PVD files (one for each set of data) with same time steps in the datasets of the collections ?


When you say synchronize vtu && hdf5/xdmf files, what do you want to achieve?

If you just want to remove duplicate time steps, can you mix them?(Ex. Step 0 uses vtu file and step 1 use hdf5 file.)

IMO there is nothing prevent you from mixing vtu files and hdf5/xdmf files in the PVD file which provides an easy way to generate animation data.

Sample PVD file:

<?xml version="1.0"?>
<VTKFile type="Collection" version="0.1"
    <DataSet timestep="0" group="" part="0"
    <DataSet timestep="1" group="" part="0"
    <DataSet timestep="2" group="" part="0"
    <DataSet timestep="3" group="" part="0"
    <DataSet timestep="4" group="" part="0"

Hi Liu,

it is a coupled application with 2 different codes A and B.
For each time step I have a vtu file from code A showing one part of the geometry and an xdmf file from code B showing the second part of the geometry. The goal is to build an animation with the 2 parts of the géometry.
Reading 200 vtu files and 200 xdmf file give 317 steps (don’t know why) as time to time only one of the two code results are updated in my Paraview session. Ex:
step 1 datas from code A and B are synchronized (view is OK)
step 2 datas from code A and B are synchronized (view is OK)
step 3 only data from code A goes to next step (view is bad)
step 4 only data from code B goes to next step (view is OK)
step 5 datas from code A and B are synchronized (view is OK)
So I need 2 file per timestep (file N°1 xdmf and file n°1 vtu,…etc) to set the synchronization of the data

Humm, can you group the 2 files into some vtkCompositeDataset(Ex vtkMultiBlockDataset)? It can be an expensive operation, but basically you are conbining the two files into one. Other than that, I don’t know how to read 2 files per time step.

PS: Also you can check how Paraview handles the pvd file and extend its functionality to support your case.

Hello everyone,
I know this is an old conversation, but I am facing the same issue today.
I have an XDMF file that represents a time series of HDF5 files, with timesteps and all, that have volume data (its CFD). There are 101 files.
I also have a set of 101 VTU files representing some data on a surface inside the volume.
I would like to display them in sync as a time series, but somehow I have the same problem as Mr Bégou … Was anything done on this topic since 2019 ?
Thanks guys !!!