Producing movies from *.vtu and *.nek5000 simultabeously

Hello all,

I am new here.

I have very technical problem. I have a run a fluid mechanics code called nek5000 (open source), and I have coupled it to a a particle transport library called ppiclF. However, they produce slightly different data file formats: nek5000 has files like ‘uniform0.f0000’ etc., which I can put into paraview readable format by using a ‘visnek’ command. These contain the velocity field on a mesh, essentially 2D at the current time. The ppiclF part of the code prioduces *.vtu files – these contain the location of particles in then flow field.

I can read both sets of files separately in paraview, and visualize and produce movies separately. The problem is that I want to put the particles on top of the velocity field, and run them simultaneously. Something goes wrong – it appears that when I read the two sets of datafiles in paraview, the first set (particle) is labeled in terms of the actual timestep i.e. 0, 0.01, 0.02, … etc and it runs this ok. But then, paraview appears to store the 2nd datafile (velocity fields) sequentially and is also labeled integer-wise i.e. 0,1,2,3, … etc. I cannot get both sets of data on to the same plkot, or get the movies to run simultaneously.

I hope that there is a simple solution. The datafiles are small and I can make a very short set of files for experts to test with?


It sounds like you described exactly what the problem is. ParaView uses the reported simulation time to synchronize temporal data from multiple sources. That works great as long as all sources report the simulation time and match up. That fails if not all sources report the simulation time. As you said, the .vtu files do not have time values, so ParaView assumes a time value of the index.

Your description of the actual time values, 0, 0.01, 0.02,… imply that the actual time values linearly increment by 0.01 for each time step. If that is the case, you can use the Temporal Shift Scale filter on the .vtu files to apply the correct increment to the time index. Setting the Scale to 0.01 should do the trick.

Thanks Ken, I was hoping that was a simple silution.

However, being a complete nurd on *.vtu files, could I trouble you to give me an explicit example of how to do the necessary change. Can this be done a simple code (fortran preferred) because I am planning to generated tens of thousands of such files?


I don’t know what you mean. No change to your data is necessary. It is all done in ParaView. Just load your .vtu file sequence and your nek5000 files in ParaView. Then add the Temporal Shift Scale filter to the .vtu input as described, and your data should get synchronized over time.

Alternatively, you can create a .pvd or .series file containing the values of the times steps.

I have had partial success – I can run the movies simultaneously with the Temporal Shift Scale filter suggested. However, there is still a problem: on the time sequence of ParaView, some of the numbers appear repeated (additional snapshots appear); therefore, the data don’t quite sync correctly, particularly after those repeated times, everything appear shifted.

This is quite important and potentially a genuine bug in how paraview reads *.vtu data. So I am going going to raise this as a new thread.


For completion : Possible bug in how Paraview reads *.vtu (time stamp in particular)