Problems synchronizing using *.pvd and *.nek5000 formats

Hello,

I am having major problems synchronizing between two different datasets: a format using the nek5000 code, labeled *.f00001, etc, and *.vtu using the nek5000+ppiclf code for particle tracking in a flow.

Currently, the nek5000 outputs voruniform0.f000001, etc. files – at 0.1 time intervals (I have 61, so simulation time is 6). Before visualization I do:

visnek voruniform, and I get a new file called voruniform.nek5000 whose content is very simple:

filetemplate: voruniform%01d.f%05d
firsttimestep: 1
numtimesteps: 61

I run this in paraview – I can see 61 datasets, at 0.1 timeintervals. OK so far.

At the same time, I output datasets of particle motion, which are contained in files named par000001.vtu, etc. Again at 0.1 timeintervals, I have 61 such files. However, in order to synchronize the times with voruniform data, I create a par.pvd file whose first few lines look like:

....

When I run this alone in paraview, again no problem, I can see the 61 datafiles at 0.1 time intervals.

The problem is when I run paraview with both the voruniform.nek5000 and par.pvd – 80 files are listed – there should only be 61. When I look at the timestamp in paraview, I see that many of the datafiles are double-defined in the sense I have two files for times “0.8”, “0.9”, “1.1”, … and others. For example, I see the sequence “0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.8, …” Note that 0.8 appears twice. This destroys my visualization sequence. What is more puzzling that this doubling up appears to be somewhat random.

I think that there must be a subtle way in which timestamps are defined. Hence, although running each dataset on its own approximates to 0.1, 0.2, 0.3, … etc, when run together some files are given different timestamps internally – even though they are both “0.8”. To illustrate, suppose vorunifor0.f000008 has timestamp 0.800001 internally, and par.pvd shows this as 0.8000000; then although they both appear to be “0.8”, paraview reads them as different files?

I cannot think of anything else.

One solutin would be if paraview could read in the file number (0-60), and then use the timestamp from *.visnek?

Can this be done? How?

Please treat this as urgent.

Thank you,
Nadeem

Sorry, I forgot the *.par file details:

<?xml version="1.0"?> ....

You have not specified how you look at timestamps in ParaView. My advice would be to not look at the information tab, but to rely only on the true timestep value which is available as

reader = GetActiveSource()
reader.TimestepValues

Similarly, the active view has its own time
GetActiveView().ViewTime()

I have verified with my own Nek5000 reader that both give me the exact timestep value as stored in the dataset.%01d.f%05d files. In my own test example, the true timestep value is 17.30014856921, whereas the GUI information gives me

Current time = 17.3001

My advice would be to use the reader.TimestepValues array of timestamps in your *pvd file

source code at GitHub - jfavre/ParaViewNek5000Plugin