I recently wanted to add some extra functionality in a couple of solvers I am working on.
For all visualization purposes, I am using CGNS files.
I managed to solve all problems thus far; with ParaView + CGNS I was pretty much able to do all things I wanted to up until this point (with some valuable help from this forum!).
So this brings me to my current situation; adding the final functionality that is missing.
What I have
I have a solution for a couple variables on a particle mesh.
Particles are, of course, plain vertices without connectivity (no Cells).
For this purpose, number of cells in the CGNS zone is equal to number of Nodes (which is the number of particles/vertices) and each “Cell” is of type “NODE”, as per the following link:
ParaView is able to plot the relevant variable on particles very well, thus declaring the particles as type “NODE” cells works correctly for visualization purposes.
What I want to do
I want to have the particle solution for all iterations on a single CGNS file, and be able to choose the time I want to display in ParaView.
This was easy to achieve for the underlying CFD mesh, since the number of Nodes and Cells remains constant.
Be properly defining the BaseIterativeData and ZoneIterativeData nodes, ParaView works falwlessly and I am able to choose the time value that I want to display.
However, the particle mesh changes at every iteration. as particles are created and destroyed.
Therefore, I cannot use a single CGNS Zone, because a CGNS zone has a fixed, constant number of Nodes and Cells.
I need to use multiple zones for the changing number of particles at every iteration that I write.
What I tried thus far
Searching online for CGNS resources, I found this:
My problem is kinda similar to the “Adapted Unstructured Mesh” example; I have a changing mesh that needs to be defined in separate zones, and I need to define BaseIterativeData and ZoneIterativeData accordingly.
However, ParaView does not seem to display the contents properly. Below are two pictures from a file that contains two time instances and two zones, each zone corresponding to one time instance.
As you can see, the visualization is not correct.
ParaView understands that Time Value 5 is different than 6 and colors the particles accordingly.
This is also noted by the name of the variable which is stated as “Velocity (partial)”.
However, particles that are not part of this instance are also visible (these are the black particles in the example images).
I can go to the Multiblock Inspector and toggle Zone visibility manually, but this is of course not automated.
Can I, somehow, remedy this, or is this functionality not possible in ParaView?
Below is a link to the file, if anyone wants to check its contents and try it out: