ikarus-project / ikarus

Ikarus is a C++-based library that uses DUNE modules to solve partial differential equations with the finite element method and more.
https://ikarus-project.github.io/
Other
6 stars 3 forks source link

checkFESByAutoDiff Test fails for the vanishing stress case when displacements are zero #326

Closed tarun-mitruka closed 3 weeks ago

tarun-mitruka commented 3 weeks ago

When the displacements are zero, the strains are zero. This doesn't perform any iteration in the Newton-Raphson method when a VanishingStress material is used along with automatic differentiation. AutoDiff doesn't see the Newton-Raphson method when no iterations are performed and thereby doesn't provide the correct stiffness matrix. This, for instance, makes the plane stress case behave like a plane strain case, resulting in wrong results when the Poisson's ratio is non-zero.

Possible fixes:

tarun-mitruka commented 3 weeks ago

@rath3t Which fix option would you recommend? On one hand I think the Newton-Raphson method should not be modified for such a fix as then Trust Region and NewtonRaphsonWithSubsidiaryFunction should also be modified to have a symmetry on how the number of iterations are counted. On the other hand, perturbing the strain can also may lead to some inaccuracies depending on the perturbation. Is there a better way? The branch bug/nlelastic now reproduces this error.

rath3t commented 3 weeks ago

You can add the minIter parameter to the Newton-Rhapson settings and make it default to =0. This is the cleanest way I suppose