# Particle Motion with Varying time steps

**URL:** https://discourse.paraview.org/t/particle-motion-with-varying-time-steps/5040
**Category:** ParaView Support
**Created:** [August 5, 2020, 5:55pm UTC](https://discourse.paraview.org/t/particle-motion-with-varying-time-steps/5040 "2020-08-05T17:55:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jared711](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jared711/32/4530_2.png) [@jared711](https://discourse.paraview.org/u/jared711)
#### Post date: [August 5, 2020, 5:55pm UTC](https://discourse.paraview.org/t/particle-motion-with-varying-time-steps/5040/1 "2020-08-05T17:55:03Z")

</div>

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](https://discourse.paraview.org/uploads/short-url/9rlCLsaRhBskNWy2d9cldDJPaxC.txt) (99 Bytes) [traj1\_00001.txt](https://discourse.paraview.org/uploads/short-url/qmsYpIC4tn8psaAPvPJJzVOCfdH.txt) (97 Bytes) [traj1\_00002.txt](https://discourse.paraview.org/uploads/short-url/fgY14nPm2QhSjIE3Bk1sjOQhcde.txt) (98 Bytes)

---

<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: [August 6, 2020, 6:40am UTC](https://discourse.paraview.org/t/particle-motion-with-varying-time-steps/5040/2 "2020-08-06T06:40:54Z")

</div>

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

Here is an example, take a look with a text editor : [steps.pvd](https://discourse.paraview.org/uploads/short-url/1o1APv0I3n2GDupedTcZ1JEFPde.pvd) (2.9 KB)

---

<div class="post-metadata">

### Author: ![jared711](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jared711/32/4530_2.png) [@jared711](https://discourse.paraview.org/u/jared711)
#### Post date: [August 6, 2020, 8:13pm UTC](https://discourse.paraview.org/t/particle-motion-with-varying-time-steps/5040/3 "2020-08-06T20:13:47Z")

</div>

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.

---

<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: [August 7, 2020, 6:50am UTC](https://discourse.paraview.org/t/particle-motion-with-varying-time-steps/5040/4 "2020-08-07T06:50:27Z")

</div>

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

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