Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

VTKOutput - include time information

More
3 years 6 months ago #3195 by creativeworker
Hello,

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?
More
3 years 6 months ago #3197 by schruste
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: www.paraview.org/Wiki/ParaView/Data_formats#PVD_File_Format

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.

Best,
Christoph
More
3 years 6 months ago #3198 by schruste
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.

Best,
Christoph
More
3 years 6 months ago #3199 by creativeworker
Thank you very much for your effort. That helps a lot!
Time to create page: 0.148 seconds