Numerics of "Gradient Of Unstructured DataSet" Filter

Hi Edward!
I’ve just read your pre-print, 4DFlowNet, very interesting work congratulations. I’m personally working with 4D flow in the left atria and super-resolution could be of great help to fully characterize the complex hemodynamics inside this heart cavity.

In regards to the WSS calculation, I was waiting for the people from Ansys to answer how they specifically calculate in the Fluent solver but I still haven’t received any response from them. I’m familiar with PyVista so I will definitely give a try to your code. I will let you know how it goes.
Thanks for your help!

Hi Kenneth and Chiara,

I also stuck on calculating WSS from velocity field in paraview.

I have a 3D flow over cylinder case in openfaom, and I want to derive the WSS around cylinder, which is a no-slip wall. Here are my steps in paraview:

(1) use Filter (Calculator): calculate mag(U) for all mesh grids
(2) use Filter (Gradients of Unstructured Dataset): generate grad(U) for all mesh grids
(3) use Filter (Calculator): calculate shear stress tau = mu * grad(U) for all mesh grids

Up to now, I have the shear stress tau for all mesh grids. And the next step is to obtain the shear stress for cylinder wall.

(4) use Filter (Extract Block) to extract cylinder
(5) use Filter (Extract surface) to extract cylinder surface

Here mistakes appear. The values for U, mag(U), grad(U), tau are all zero because the no-slip wall has zero velocity. Although it seems that I find the reason but I don’t know how to solve it. In order to calculate the WSS, maybe I need to extract the first layer mesh cells around cylinder instead of cylinder surface itself, but I don’t know how to do it in Paraview…

I would be very appreciated if you could give me some help! Thanks!

Hi Kenneth,

I need to calculate the iso-counters of the vorticity norm and compare it with reference data. There are 2 ways to do that; 1- computing vorticity norm inside ParaView using the velocity field obtained from the CFD code (with Gradient Of Unstructured DataSet Filter) or 2- calculating the vorticity inside the CFD code using the velocity field by applying a second-order approximation to calculate the partial derivatives.

The ParaView shows somehow a better job as the iso-contours of vorticity are close to the reference results. However, the iso-contours obtained from the CFD code show additional (spurious) structures.

I suspect that the approximation to compute the partial derivatives inside the CFD code (which is a second-order approximation) is not as accurate as what is computed in ParaView. Could you please explain how the derivatives (gradients) are calculated within ParaView?
My test case has uniform structured cells.

Best Regards,

@Elyas I’m glad the ParaView gradients are giving good approximations. The answer to how they are computed has not changed since my first reply back in 2018. Do you have a more specific question about the operation?