- Thank you received: 0
VTKOutput - include time information
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
4 years 1 month ago #3195
by creativeworker
VTKOutput - include time information was created 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?
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?
4 years 1 month ago #3197
by schruste
Replied by schruste on topic VTKOutput - include time information
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
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
4 years 1 month ago #3198
by schruste
Replied by schruste on topic VTKOutput - include time information
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
`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
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
- Thank you received: 0
4 years 1 month ago #3199
by creativeworker
Replied by creativeworker on topic VTKOutput - include time information
Thank you very much for your effort. That helps a lot!
Time to create page: 0.108 seconds