While going through the visualization manual of a software, I encountered the following documentation for visualizing in Visit. Is there anything equivalent in ParaView?
This is Chombo hdf5 data and whenever I load it, the wrap by vector filter is unavailable. However, I could do this in VisIt using the instructions in the manual I shared.
This is possible if there’s no 3-component field in the dataset. Assuming that the displacement field is being loaded, is the displacement vector being loaded as three 1-component arrays? If so, you can use the Calculator filter to create a 3-compoment vector out of it.
If you have sample dataset to share, that’ll make it easier to confirm why Warp by Vector may not be available.
I’m unable to find the displacement in ParaView. However, that is available from in VisIt.
I’m sharing one such file: data.0000.hdf5 - Google Drive @utkarsh.ayachit Please have a look at this and let me know.
I don’t see the displacement field anywhere in ParaView but it gets shown in VisIt on loading the same data. Using velocity to morph doesn’t cause the correct geometry of the simulation (spherical in this case) to be produced. I’m attaching what I get in VisIt for your reference. Things become even messier as turbulence develops in the velocity fields.
For the dataset you shared, there read is not detecting any field named displacement. The only field that resembled a vector field was v? and hence I used that for illustration purposes. It’s possible that the Chombo reader in ParaView needs to be updated to read the displacement field, if it is indeed present in the file. Sounds like a bug. I’d recommend reporting an issue on the issue tracker so the development team can track it down.
In that case, I think probably somehow the Chombo reader on ParaView is missing out the displacement field. This is because the same data on VisIt gets to know this field. Any quick way you can suggest to get this done in ParaView? Can you also direct me where I can post an issue regarding this?
this is of course Visit-specific syntax. It is not difficult to translate that into a Python Programmable Filter. Of course the result of warping your AMR collection of regular cartesian grids would be an AMR collection of structured grids, which ParaView does not support. A quick hack is to convert your data to MultiBlock, then merge it into a single unstructured grid, which can be easily warped by ‘Displacement’. Visit’s Expression would be translated to the following code:
coords = inputs[0].Points
Phi = 2.400000e-02 * coords[:,2] -1.200000e-01
R = coords[:,0] + 3.500000e+01
Theta = 2.500000e-02 * coords[:,1] + 1.450000e+00
X = R*sin(Theta)*cos(Phi)
Y = R*sin(Theta)*sin(Phi)
Z = R*cos(Theta)
Displacement = make_vector(X,Y,Z) - coords
output.PointData.append(Displacement, "Displacement")
output.PointData.append(mag(Displacement), "Displacement_magnitude")
P.S. This is a proof-of-concept. A proper solution would be to conserve the multiblock structure in the Python programmable filter.
@jfavre Wow! This is extremely detailed. Thanks a lot for taking so much time to look into this. This works although I get an error message. For a larger dataset (around 13 GB). Most probably MergeBlocks take forever and ParaView crashes maybe due to RAM overflow.
On loading the state and choosing the file, I get this error.
EDIT:
I was able to run larger data with pvserver on a cluster. While VisIt was able to do this on my PC ParaView needed a cluster. This is probably because the filter is unable to the AMR grid directly on ParaView. Comparison of slice with VisIt is not exact but they are very close and can do a decent job for the time being.
@jfavre Thanks a lot. This is awesome. It is working and is much more responsive and much less memory demanding with larger data compared to the previous one you shared.
Can you please share some article/resources that has documentation and tutorials on using these custom Programmable filters?
Now for the larger dataset, I didn’t need a cluster and I could do it in my PC with just ParaView client. Also, the VisIt and ParaView dumps are identical.