An error says: det J = xxxx is negative for element xxxx

Dear all,

Good day. I have a question shown as follows.

When I ran the OGS-6, it says:

error: det J = -5.45767 is negative for element 0. 
......
error: Please check whether the node numbering of the element is correct, or additional elements (like boundary elements) are still present in the mesh.

However, I am sure that I defined all the required files and followed the OGS input data format.
I don’t have any idea why the error occurred.

Thanks for your help in advance,
Luyu

Did you check the things OGS has complained about?

error: Please check whether the node numbering of the element is correct, or additional elements (like boundary elements) are still present in the mesh.

I guess there is also a mesh referenced for the error. A bulk mesh should consist of bulk elements only and each element should have a volume (or area in 2D) >0. The same holds for boundary meshes, all elements should have an area (length in 2D) >0. Degenerated elements could stem from the conversion from other formats (e.g., GMSH), or from applying clipping tools in Paraview.
You can check that with Paraview (there is a mesh quality filter, for example). From the value ( -5.45767), I suspect that the error might more related to the node reordering. If OGS was compiled with utils, you find a NodeReordering tool in the bin folder that you can use. However, I would recommend to check for the mesh quality first.

1 Like

Thanks for your suggestion! I will work on it.

Best regards,
Luyu

A common reason are meshers which do not enforce a positive node numbering. If elements are not numbered in correct order they appear correct at first glance, but their volume (and Jacobian) are negative and thus they are useless for finite element methods. Other common possibilities are degenerated elements or “leftovers” from intermediate meshes.

Thank you, Dominik.
Yes, I checked the mesh.vtu by checkMesh. It says that the format is corrected.
But when I launched the simulator, the error was reported. I will check it more deeply.

Best regards,
Luyu