CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Negative Jacobian (http://www.cfd-online.com/Forums/main/11888-negative-jacobian.html)

 PC July 27, 2006 16:31

Negative Jacobian

Hi,

I wonder if you can help me here. I have created a body-fitted mesh inside a circular nozzle where I have some negative jacobians, I dont undertand how I can remove these negative jacobian. These happens if I increase the mesh points.

 Renato. July 27, 2006 16:42

Re: Negative Jacobian

You can work out it by changing the nodal connectivity of the negative elements, e.g.:

A triangle with nodes i, j, k can be described by:

i-j-k or i-k-j

one will have positive Jacobian while the other will have negative. You only need to set the nodal mapping accordingly. In finite element method this ordering is usually counter-clockwise for positive Jacobians.

ps: It can also be due distorted/invalid elements

Cheers

Renato.

 Dr.Nick July 28, 2006 01:19

Re: Negative Jacobian

Renato's right. it depends on the vector product and normal, i.e. say Normal=(V1xV2), angle(Normal,i)=+R1. Hence, Normal=(V2xV1), angle(Normal,i)=-R1; where i={1,0,0}

 Arambatzis George July 28, 2006 08:59

Re: Negative Jacobian

I am also writing a 3D code using tetrahedrals. My problem is that some elements have negative Jacobian.

Have you any ideas to solve this prolem? Or any books or lecture notes or links?

 Renato. July 28, 2006 10:16

Re: Negative Jacobian

Your problem can be solved in the same way described previously. For a tetrahedra formed by i-j-k-l nodes you might have the following conectivities:

(assuming FEM standard mapping) I-J-K-L = positive Jacobian I-K-J-L = negative Jacobian

You can use the following piece of Fortran code to compute the element volume (x6) V6 = x21*(z31*y14-y31*z14) + x31*(z12*y14-y12*z14) + x41*(z12*y31-y12*z31)

where: xij = xi - xj (regarding the nodal coordinates)

Regards

Renato.

 Renato. July 28, 2006 10:31

Re: Negative Jacobian (NOTE)

I should have also emphasized that negative Jacobians can be due to distorted and invalid elements!!! In this cases, you can't do anything else remeshing your model or fixing the bad elements locally (usually made by hand, picking and moving nodes). Another possibility can be some float point problem related to nodal coordinates. You can always be facing the range the machine number representation -- usually IEEE for PCs (*). In this case, changing the scale of your model can helpful.

Mesh problems usually happen when you import/export your model through several softwares due to loss of accuracy when representing the model entities (nodes, edges, faces, etc...).

Regards

Renato.

(*) (unfortunately or fortunately) computers have limited floating point representation.

 Mani July 28, 2006 12:46

Re: Negative Jacobian (NOTE)

if you get negative Jacobians in "some" cells of your structured grid, it will hardly be a problem of coordinate orientation.

the fact that it happens only with fine grids suggests small inaccuracies in your grid that lead to cross-overs at small cells, maybe related to floating point precision, or simply incomplete convergence of your grid generator. you should inspect the grid.

 R Andom. July 30, 2006 05:44

Re: Negative Jacobian (NOTE)

If all your jacobians are negative, then you are fine also.

 Vijayendra January 22, 2012 15:34

Quote:
 Originally Posted by Renato. ;44158 You can work out it by changing the nodal connectivity of the negative elements, e.g.: A triangle with nodes i, j, k can be described by: i-j-k or i-k-j one will have positive Jacobian while the other will have negative. You only need to set the nodal mapping accordingly. In finite element method this ordering is usually counter-clockwise for positive Jacobians. ps: It can also be due distorted/invalid elements Cheers Renato.
Hello,
I found this message regarding the naegative Jacobian helpful as I also have a similar problem. I have the following question regarding the triangular elements:
Considering i-j k if I get negative jacobian, I considered i-k-j. In most of the cases it did work. But in few cases, even this did not work. In that case, I just permutated like:
1-2-3
1-3-2
2-1-3
2-3-1
3-1-2
3-2-1
one of the permutation did give a positive jacobian. Can I consider this permutation and proceed with the further calculation?
Any clarification will be highly appreciated.