extract surface from 3d mesh and compute gradient of solution vector

Dear all,

I have a vtu file which contains a displacement vector on a 3d mesh obtained from a finite element solution.

I interpolated 2d measured displacements on this mesh using the ResampleWithDataset filter:

In this picture, you can see that some of the displacements at the front surface are non-zero, but the displacements at the remaining five surfaces are zero (since these were not measured).

I want to compute the gradient of the displacement vector, but it does not make much sense to do this on the 3d mesh, since the gradient is dominated by the jump to the surfaces with the non-zero values.

That said, is there a way to extract the surface (containing the measured values), thus, having a 2d mesh, and compute the gradient on this surface? The surface is characterized by the points with z-coordinate zero.

Thank you for your help!

Best regards,

Use ExtractSurface filter ?

But how can I select the front surface (z=0)?

If I just press “Apply”, I get again the entire volume

I missed that point. You can slice with z=0, or select the surface on z = 0.

The slice filter works!

But applying the gradient filter to it, still gives 9 components + magnitude. So the displacement is still going to be considered in 3d.

I could ignore some components of the gradient, of course, but is there a way to get only 4 components + magnitude directly?

A vector will stay in 3D unless you compute a scalar from it ? This is expected. Do you want to compute the magnitude ?

After the slice filter, the contour plot is a surface with a displacement in x- and y-direction.

What I want is to get the displacement as a vector in 2d rather than in 3d by simply “forgetting” about the z-coordinate. So the gradient has 4 components.
Can I do this in paraview?

You could force the Z component to 0 with a calculator but you will not be able top transform it into a two component array easily.

The Z component is already Zero everywhere.

But if I understand you, the best way is to simply ignore components of the gradient in Z-direction, right?