Particle Motion with Varying time steps

I’m working on plotting the path of a particle over time. The integrator I use is a variable step integrator that sometimes changes the step size significantly when the dynamics become more complicated. I have an array of positions along with time values for each position. Currently, I can import the positions by generating a set of files named traj1_00000.txt, traj1_00001.txt, traj1_00002.txt … etc. and importing them as a set to Paraview. I then use the table to points filter to show the point at each time step. However, Paraview assumes that each file is an equal timestep apart and won’t let me choose a different time array to describe my set of points. Is there a way to incorporate the actual time for each step so that Paraview animates my trajectory in real time?

Thanks,
Jared

traj1_00000.txt (99 Bytes) traj1_00001.txt (97 Bytes) traj1_00002.txt (98 Bytes)

Yes, by using a .pvd file instead of a time series.

Here is an example, take a look with a text editor : steps.pvd (2.9 KB)

Thank you! So do I need to use the XML based “.vtu” or “.vtp” files rather than the legacy “.vtk” files? I’ve been using a matlab code (vtkwrite() from Mathworks file exchange) that writes .vtk files using the legacy format.

Yes, .pvd format supports only .vtu or .vtp or other XML based.

.vtk files do not support to associate time values with it.