Negative Jacobian
Hi,
I wonder if you can help me here. I have created a bodyfitted 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. Thanks in advance 
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: ijk or ikj 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 counterclockwise for positive Jacobians. ps: It can also be due distorted/invalid elements Cheers Renato. 
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}

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? 
Re: Negative Jacobian
Your problem can be solved in the same way described previously. For a tetrahedra formed by ijkl nodes you might have the following conectivities:
(assuming FEM standard mapping) IJKL = positive Jacobian IKJL = negative Jacobian You can use the following piece of Fortran code to compute the element volume (x6) V6 = x21*(z31*y14y31*z14) + x31*(z12*y14y12*z14) + x41*(z12*y31y12*z31) where: xij = xi  xj (regarding the nodal coordinates) Regards Renato. 
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. 
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 crossovers at small cells, maybe related to floating point precision, or simply incomplete convergence of your grid generator. you should inspect the grid. 
Re: Negative Jacobian (NOTE)
If all your jacobians are negative, then you are fine also.

Quote:
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 ij k if I get negative jacobian, I considered ikj. In most of the cases it did work. But in few cases, even this did not work. In that case, I just permutated like: 123 132 213 231 312 321 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. Thanking you in advance Vijayendra 
All times are GMT 4. The time now is 22:35. 