Hello Robert! I got a question about the energy calculation again :)
If you remember, in my programm there is function get_Wh that is called in postproc. This function compute the determinant of the right Cauchy-Green deformation tensor. When I was trying to do a large deformation, a situation arose, where in some cells the determinant is very small or even negative.
I can analyze the results on these elements in Paraview, so I see that the field of displacements of these cells are normal. I can deform my sample by displacement, so I find out that the volume of element is normal too, determinant haven't been far from 1. But If I calculate the determinant from the components of strain tensor by hands, I'll get this negative value, so that the computation of the determinant is right too.
It seems to me that this is the problem of the Green strain tensor computation.
I attached the screenshot from Paraview, where you can see the determinant value, the volume of element, and components of the Green strain tensor, the file of programm and a simple mesh, and file with the results (for paraview or some other similar programm) of one of the first steps, when the negative determinant appears.
At the function get_Wh I get the the Green strain tensor, compute the right Cauchy-Green deformation tensor (C = 2E+I), and get i3 = nm.linalg.det(C). I need the sqrt of i3 to get a J = dV/dV_0, and the error appears there.
Perhaps, it's too difficult to understand all this, so I will be glad to any advices. Thank you anyway.