Time in VTK files

I am running a case with multiple file saving times therefore it is important to be able to have the time in the vtk files for post-processing purposes. I couldn't find an option to save the Part Time neither by using the PartVTK4 or by having DualSPHysics save VTK files in addition to binary files.

I checked out the "ToVTK4" source file included in the beta distribution and there doesn't seem to be a straight-forward way to do it.

I would appreciate any help or suggestions anyone might have.

Thanks and regards,

Jabir

Comments

Thanks for your reply, but that field in the VTK files is the same as the part number, or number of file and not proper time. I tried adding it as a variable like the example mentioned in the documentation but unfortunately it was added to each particle, which increasaed the size of vtk files by about 20% (even though I assigned a singular value to be written, and not an array).

Actually, time data can be included in VTK files as part of the "Field Data" and it is the case with some CFD codes.However, I have found the following work-around by saving the data from ParaView as VTU files, then editing the values of the Time Field in the ASCII PVD file generated with the VTU files, which will result in displaying the correct time in ParaView for each file. This feature also allows compressing the legacy VTK files generated by DualSPHysics and saving space, although a bit time consuming.