# Producing movies from \*.vtu and \*.nek5000 simultabeously

**URL:** https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992
**Category:** ParaView Support
**Created:** [April 18, 2021, 12:28am UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992 "2021-04-18T00:28:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![nadeem](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nadeem/32/6444_2.png) [@nadeem](https://discourse.paraview.org/u/nadeem)
#### Post date: [April 18, 2021, 12:28am UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992/1 "2021-04-18T00:28:52Z")

</div>

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?

Thaanks  
Nadeem

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [April 19, 2021, 1:23pm UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992/2 "2021-04-19T13:23:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![nadeem](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nadeem/32/6444_2.png) [@nadeem](https://discourse.paraview.org/u/nadeem)
#### Post date: [April 19, 2021, 4:45pm UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992/3 "2021-04-19T16:45:19Z")

</div>

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?

Thanks  
Nadeem

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [April 19, 2021, 5:50pm UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992/4 "2021-04-19T17:50:17Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 19, 2021, 6:30pm UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992/5 "2021-04-19T18:30:34Z")

</div>

Alternatively, you can create a .pvd or .series file containing the values of the times steps.  
[https://gitlab.kitware.com/paraview/paraview/blob/v5.5.0/Documentation/release/ParaView-5.5.0.md#json-based-new-meta-file-format-for-series-added](https://gitlab.kitware.com/paraview/paraview/blob/v5.5.0/Documentation/release/ParaView-5.5.0.md#json-based-new-meta-file-format-for-series-added)

---

<div class="post-metadata">

### Author: ![nadeem](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nadeem/32/6444_2.png) [@nadeem](https://discourse.paraview.org/u/nadeem)
#### Post date: [April 22, 2021, 11:18pm UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992/6 "2021-04-22T23:18:55Z")

</div>

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.

Nadeem

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 23, 2021, 8:36am UTC](https://discourse.paraview.org/t/producing-movies-from-vtu-and-nek5000-simultabeously/6992/7 "2021-04-23T08:36:16Z")

</div>

For completion : [Possible bug in how Paraview reads \*.vtu (time stamp in particular)](https://discourse.paraview.org/t/possible-bug-in-how-paraview-reads-vtu-time-stamp-in-particular/7059)
