Hope you’re well. I have been struggling with this one for a bit and haven’t been able to figure it out.
My simulation output is in .vtk format (so far so good). However, the code I’m using exports a solution output for each of my mesh domains (I have 93 for this geometry) as well as one for each time step. So each .vtk file is specific to a mesh domain and to a timestep. One example would be: solution.1029000.domain.002.time.2.087042809.vtk (describing the solution at domain number 2 and time 2.087 seconds).
I have been able to see one time step by importing all domains (0 to 92) at once and then grouping them using “Group DataSets”. But now I would like to view the whole solution in the domain changing with time.
The filter ‘Group Time Steps’ sounds like it could solve things but when I try to group multiple data set groups, ‘Group Time Steps’ is not available as an option because it doesn’t allow for “multiple input files” which is confusing…
I hope I have explained things properly but could use some help as soon as possible as it’s for a deadline.
Is this something that can be done?
Put together a vtk.series file for each domain. See this for the format of a vtk.series file. Thus solution.1029000.domain.002.time.2.08.vtk and solution.1029000.domain.002.time.3.08.vtk and all other timesteps for that domain will be added to solution.1029000.domain.vtk.series. Create a vtk.series for each of the 93 domains. You should be able to do that with a simple batch/python script.
Now, open each domain and apply Group Datasets to group all domains to put it in a single multiblock dataset. That should do it. Since each of the inputs to the Group Datasets filter would be temporal dataset, you should be able to animate it over time without any additional work.
That how ParaView will know which file to load for a particular time.
You should be able to put together such a file manually too, but doing it 93 times can be tedious :), hence my suggestion to automate it using some scripting language of your choice.
Yes, JSON is simply a text file. It just a format specification that requires the use of {} and [] etc. for example, a series file for a domain could look like
I have taken your advice and managed to write a code up to assemble each .vtk.series file for each domain.
They’re saved as .vtk.series (not .vtk.series.txt). When opening them on paraview 5.4.1 64-bit, I got the error below. I chose to open with .vtk but paraview didn’t recognise the file format and I couldn’t see any of my domains…
Thanks for the prompt reply! I really appreciate your support with this.
Downloaded Paraview 5.6 (but not the version with MPI) and still get this error below… For some reason, there’s no option to choose .vtk.series reader, but I’d assume it would automatically accept the files?
Unfortunately really struggling with this one… feel like I’m so close!
Please don’t add the .txt extension to your filename. The filename needs to end with vtk.series. Hope that helps. Extensions are often used to decide what type of file it is. If you change extension, ParaView cannot determine what contents to expect in the file.
Attached is a working series example. data.zip (4.9 KB)
I suspect the extra “,” in your JSON file after the last entry in list may also be causing issues since that makes the file an invalid JSON. Try removing the last comma:
I am dealing with the same question that you had earlier. Did you open .vtk files before reading the .vtk.series file. Or how did you open all of your data?