Comparative Analysis: Ansys vs. FEniCSx [von Mises in Linear Elasticity]

Hi,

I’m working on validating my code with Ansys. As you can see in this topic, the displacements are quite close with only minor differences. However, for the von Mises stress, the discrepancy is larger:

I’ve been following this tutorial by @dokken. However, since I need the von Mises stress at the nodes and I’m using a serendipity family, I’ve interpolated it as follows:

V_von_mises = fem.FunctionSpace(domain, ("S", 1))
stress_expr = fem.Expression(von_Mises, V_von_mises.element.interpolation_points())
stresses = fem.Function(V_von_mises)
stresses.interpolate(stress_expr)

I suspect that the error might be in this interpolation.

Does this method calculate the von Mises stress at the Gauss points? I’m asking because Ansys calculates it at the Gauss points and then interpolates to the nodes.

Any suggestions or insights would be greatly appreciated.

Thanks,
João

From your previous post, if you already have differences in displacement, the issue does not come from the stress interpolation which is only a post-processing step.

1 Like

I get your point, but even with minor errors in displacements, it appears that the von Mises stress is significantly larger. Could this discrepancy be related to the way the stress is calculated and interpolate?