VTKOutput - include time information


i know .vtk files can be aware of the time information of the frame. This would allow animations in ParaView which is played back evenly, even if the frames are not stored with even time differences.
Is there a possibility to use that with the NGSolve VTKOutput?

Hi creativeworker,

Paraview has the “ParaView Data” (pvd) File Format which is essentially a collection of vtk data files along with the time steps, see here: ParaView/Data formats - KitwarePublic

Haven’t tried this in years, but in principle that should allow you to wrap the pvd around a collection of vtk files and time stamps. You would need to write this file yourself a.t.m., it’s not featured in NGSolve.


Ok, I checked this myself and have to admit that my answer was a bit premature. The pvd-file solution doesn’t work with the legacy vtk-files that we export to in NGSolve. You need to convert to vtu-files first. This however can easily be done for example with meshio (pip install --user meshio) and the call
meshio-convert a.vtk a.vtu
All in all, this requires a small amount of scripting (you can also call the meshio-functionality from within python of course) but should easily be set up.


Thank you very much for your effort. That helps a lot!