[vtkusers] How does vtk compute gradients on unstructured mesh?

Kevin H. Hobbs hobbsk at ohio.edu
Fri Jul 19 09:17:41 EDT 2013


On 06/05/2013 06:02 PM, Emilie Sauvage wrote:
> Dear vtk users & developers,

Hi Emilie,

> 
>  could you please explain how does vtk compute gradients on a tetrahedral
> mesh with node - based data? I have a data file as a result of a finite
> element cfd simulation and need to compute velocity gradients in order to
> obtain wall shear stress. I would like to have a bit of information about
> what happens in vtk/paraview in order to understand how accurate is the
> obtained wall shear stress field.
> 
> Does vtk for example use the P1 shape functions to compute gradients in
> cells? Some averaging of these gradients could give gradients in nodes.
> 

Did you ever get an answer to your question from an expert?

I've had to paw through the VTK source a few times to figure out exactly
how a gradient was calculated so I understand your concern.

Which class and what options are you using?

The documentation for vtkGradientFilter is here :

  http://www.vtk.org/doc/release/5.10/html/classvtkGradientFilter.html

and it does seem a little sparse.

Can you expand on your concern?

Do you want the gradient of v as a 3 by 3 matrix of partial derivatives

[ dv_x/dx  dv_y/dx  dv_z/dx ]
[                           ]
[ dv_x/dy  dv_y/dy  dv_z/dy ]
[                           ]
[ dv_x/dz  dv_y/dz  dv_z/dz ]?

Do you want to calculate the gradient of v at each vertex based on the
vertices to which it is connected?

Do you want to calculate the gradient of v for each tetrahedral cell
based on the four vertices of the cell?

Do you want to want to calculate the gradient of v anywhere based on an
interpolation of one of the above?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 255 bytes
Desc: OpenPGP digital signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130719/def17259/attachment.pgp>


More information about the vtkusers mailing list