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.
Hi paraview users,
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" byte_order="LittleEndian" compressor="vtkZLibDataCompressor"> <Collection> <DataSet timestep="0" group="" part="0" file="examplePVD/examplePVD_T0000.vtu"/> <DataSet timestep="1" group="" part="0" file="examplePVD/examplePVD_T0001.xdmf"/> <DataSet timestep="2" group="" part="0" file="examplePVD/examplePVD_T0002.vtu"/> <DataSet timestep="3" group="" part="0" file="examplePVD/examplePVD_T0003.vtu"/> <DataSet timestep="4" group="" part="0" file="examplePVD/examplePVD_T0004.vtu"/> </Collection> </VTKFile>
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.
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 !!!
I have come across the same issue – but still there is no resolution?
I have 2 sets of datafiles in vtu and some other format (nek5000). But, like Patrick, I see times being duplicated and more numbers than there are files. (I think that the underlaying problem must be the rounding errors in the timestamps in different formats are not compatible; thus in vtu “0.8” is exact, but other format may be 0.800001, for example, which paraview may see as a different file.
I have thought of a simple solution; if there is some way in paraview to ignore the timestamp, and just work on the file number instead? That is, Nt=0,1,2,3, … 60 say. Then I know that in .pvd file you can also set the timestep=“0”, or “1” and so on i.e. Nt. Thus, provide that you two file sets correspond to the same Nt, then you can visualize against Nt the file number (which is off course proportional to the real time itself t=NtDt, where Dt=numerical timestep assumed constant).
But how can this be done in paraview – i.e., ignore the time itself and work as a function of the file number alone?
If someone could post two toy datasets that show the issue, I could take a look.
In fact, I have found that this topic was previously raised, so I have revived the issue just now under the title “Time sync between two datasets”. However, I cannot see a resolution of the issue.
Please continue in that thread.
I am running a short simulation, and I will post the screen shots on that thread – if you still need it.