Flow-visualisation: spurious discontinuities between elements

If I’m plotting something like magnitude of velocity contours in either Tecplot or Paraview, everything looks as it should. However, once I calculate something like magnitude of vorticity from the velocity field, the contour plot no longer looks continuous (see attached). Is there a solution to resolve this?

Hi Zach,

Are you doing a CleanToGrid filter in Paraview before you calculate the gradients/vorticity? That might help fix your issue since the solution is discontinuous by definition and the VTU file will have coincident points at the element interfaces which can cause problems when you try to calculate the gradients.


I tried your suggestion of applying the Clean To Grid filter prior to using a PythonCalculator to calculate the Velocity Gradients (i.e., gradient(Velocity) ) where Velocity has been defined via a Calculator filter as Velocity_X * iHat + Velocity_Y * jHat. Similarly, I used a separate PythonCalculator to calculate Vorticity as curl(Velocity). There is also a Clean Cells to Grid filter that I tried, but in both cases I end up with individual cells lighting up as in the attached screenshot.

Hi @Zach-Davis ,

Are you using the latest release of PyFR? Could you try the Gradient of Unstructured Dataset filter (selecting the Compute Vorticity checkbox). If it still does not work, please send me a link with the VTU file and I’ll take a look at it.

PS: which version of ParaView are you using?

Hi @GonzaloS,

I am using PyFR v1.12.1 and ParaView 5.9.1. I don’t believe I can use the Gradient of Unstructured Dataset filter to compute vorticity, because that filter requires a 3-D dataset, and mine is only 2-D. (I get an error indicating that the input array must contain exactly three components). Hence, I was attempting to calculate them myself, but I must be overlooking something.

I’ve linked to a compressed tar archive (40MB) of my output dataset from PyFR below.

Best Regards,



Your conf is alright, it might be a bug in the output to VTU files with high-order cells that we implemented a while ago. Are you using the -d option?

The link that you posted is down. Could you please try to reupload? Ty

I double-checked. The issue appeared with using the -k option I believe. Using the -d option seems to work fine. I can use the Calculator filter to create the Velocity vector, and then use a Python Calculator to use the curl(Velocity). The contours look much better. I’ve re-posted the link below. I’m not sure why the other one stopped working.


1 Like

So it there might be an issue with high-order VTK cells. The links are still not working on my end!

I just updated the link. Would you give it one more try? Thanks

Still not working, let’s talk through DM.

Did we decide if there was a bug in the high-order export code or not? I am looking to make a point release of v1.12.2 soon and so if there is an issue it would be good to get it fixed.

Regards, Freddie.

Hi Freddie,

I believe we determined this may be a bug with ParaView and how it’s handling high-order elements. I think Will was going to, or has already, submitted a bug report to the ParaView developers.

Best Regards,


I haven’t really been following this thread, @GonzaloS were you or did you submit a bug report to Paraview?

Hi all, sorry for the delay. I think that this can be fixed on the PyFR side by adding a zero-component to the Velocity in the VTU files. I’ll try to submit a PR to fix this soon, although the fix might be a bit convoluted.

Fix VTU vector components in 2D meshes by GonzaloSaez · Pull Request #236 · PyFR/PyFR · GitHub should fix the issue. @Zach-Davis could you please try to export data with this branch and see if the GradientOfUnstructuredDataSet filter works on your side? Thank you!