1
$\begingroup$

I am using an FEM code written in Fortran which I did not design. For a particular problem, the program complains that the determinant of the Jacobian matrix is inferior to zero.

I vaguely understand that the Jacobian matrix is related to the shape functions and that it must be inverted to map shape function coordinates to global coordinates. To invert the matrix it must compute the determinant. Therefore I suspect this is a mesh problem.

Could someone provide added insight into this? What conditions in an FE problem would typically lead to a Jacobian determinant that is less than zero? Why is this a problem? How can it be avoided?

$\endgroup$
  • 1
    $\begingroup$ to follow up on @HBR's answer below - you should double check that the element node ordering associated with the mesh that you input into the model matches what the basis functions expect. An incorrect ordering of the element nodes would cause issues related to the Jacobian and determinant. $\endgroup$ – cbcoutinho Sep 7 '17 at 8:13
  • 4
    $\begingroup$ Since this error occurs only for a particular problem, it is likely the mesher that created the mesh produced one or more "bad" elements. A bad element would be one where the coordinates of the nodes don't define a solid with a positive volume; that is what a negative jacobian means in this context. $\endgroup$ – Bill Greene Sep 7 '17 at 10:51
  • 1
    $\begingroup$ I don't think I understand what the error message means -- what does it mean for the determinant to be "inferior to zero"? That it is negative? And is it the determinant of the cell matrix, or of the global matrix? $\endgroup$ – Wolfgang Bangerth Sep 11 '17 at 19:12
4
$\begingroup$

The determinant of the Jacobian, as a determinant changes its sign when odd permutations of columns (or rows) are applied.

Imagine, for simplicity a two dimensional case in which the reference element is a triangle with vertices $V_1$, $V_2$ and $V_3$ (chosen counter-clockwise), and basis functions $1-\lambda-\mu$, $\lambda$ and $\mu$ respectively. The pair of reference coordinates will be defined such as: $F:(\lambda,\mu)\to(x, y)$ where $F=[x,y]^T=F(\lambda,\mu)$ and it is given by: $$F(\lambda,\mu) = V_1(1-\lambda-\mu)+V_2\lambda + V_3\mu$$

It is clear that the Jacobian is: $$J=\vec{\textrm{grad}}\,F=[V_2-V_1,V_3-V_1]$$

Note, that the determinant of this Jacobian coincides with two times the area of the triangle: $det(J) = (y_3-y_1)(x_2-x_1)-(x_3-x_1)(y_2-y_1)$.

On the contrary, if vertices are chosen in a clockwise fashion, the Jacobian turns to: $$\vec{\textrm{grad}}\,F=[V_3-V_1,V_2-V_1]$$ interchanging its columns resulting in a negative determinant.

Other causes may result from the fact that the vertices are not ordered consecutively, leading to edge crosses which cause a negative area (or volume in 3D).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.