# Negative jacobian

**URL:** <https://calculix.discourse.group/t/negative-jacobian/1358>\
**Category:** Uncategorized\
**Created:** [November 30, 2022, 3:15pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358 "2022-11-30T15:15:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [November 30, 2022, 3:15pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/1 "2022-11-30T15:15:04Z")

</div>

I have a model with shell elements that when expanded result in a number of negative jacobians. These elements are in regions of my geometry that are not of interest and have no effect on the FE result, but the only way I can find to address them is to pluck them out of the mesh file one by one.  
Does anyone know of a way to delete them all at once, perhaps by outputting the element numbers to a file?

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [November 30, 2022, 3:36pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/2 "2022-11-30T15:36:18Z")

</div>

Are you using any of the preprocessors for CalculiX ?

---

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [November 30, 2022, 4:26pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/3 "2022-11-30T16:26:45Z")

</div>

No. Thanks for the thought. Have used PrePoMax for post.

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [November 30, 2022, 5:41pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/4 "2022-11-30T17:41:42Z")

</div>

When an analysis is submitted, PrePoMax automatically creates a set with elements having this negative jacobian issue. Of course, you can export the input file and access this set from it.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [November 30, 2022, 7:18pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/5 "2022-11-30T19:18:14Z")

</div>

You can try Salome instead since it have further processing after the mesh generated by Netgen. A smoothing feature to eliminate bad shape of quad dominate shell element.

Instead of use a quad dominate mesh which probably generate bad shapes at curved geometry, someone still can use fully triangular mesh to eliminate the problems.

---

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [November 30, 2022, 11:24pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/6 "2022-11-30T23:24:31Z")

</div>

My model is a human vertebra, which consists more or less of a core of what is called cancellous bone and a shell a mm or so thick of harder bone. I am meshing in Salome because it conveniently creates shell elements on top of the cancellous Tet elements. I don’t know how to get T10 elements with a S6 shell on the outside in PrePoMax.  
The geometry is sort of wedge shaped in spots and the sharp edge of the wedges is where, I think, the majority of the negative Jacobian elements are, but they don’t play a part in the analysis at all.  
I just wish there was an easier way to eliminate them without having to pick them out of the .msh file one-by-one.

---

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [November 30, 2022, 11:26pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/7 "2022-11-30T23:26:54Z")

</div>

I am using Salome, and in addition to the 10 node tets I also have 6 node shells (S6) that expand into 15 node wedge elements. I have no quad elements.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [December 1, 2022, 5:46am UTC](https://calculix.discourse.group/t/negative-jacobian/1358/8 "2022-12-01T05:46:04Z")

</div>

Triangular shell element generated mesh usually accepted by the solver, maybe it’s related to face orientation.

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [December 1, 2022, 8:16am UTC](https://calculix.discourse.group/t/negative-jacobian/1358/9 "2022-12-01T08:16:31Z")

</div>

Can you show the mesh or at least the problematic part of it ?

Did you consider using FEBio for this analysis ? It’s also open-source and meant specifically for biomechanics.

---

<div class="post-metadata">

**Author:** ![Disla](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/disla/32/3548_2.png) [@Disla](https://calculix.discourse.group/u/Disla)\
**Post date:** [December 1, 2022, 10:23am UTC](https://calculix.discourse.group/t/negative-jacobian/1358/10 "2022-12-01T10:23:47Z")

</div>

> [@ashinbrot](#):
>
> they don’t play a part in the analysis at all

¿What do you mean they don’t play a part in the analysis?. If they don’t play a role, ¿why do you have that mm shell?.  
The negative Jacobian comes from too much thickness in that layer overlapping with the inside elements or with themselves. If you set the shell layer thickness to 0.01mm and offset it to the outside , ¿do you solve the issue?

Other option is maybe using real shell element for that surface shell. A true not expanded shell element (US3).

---

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [December 1, 2022, 3:44pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/11 "2022-12-01T15:44:04Z")

</div>

Sorry I wasn’t clear. The elements with negative Jacobians do not play a part in the analysis, not all the shell elements.

Thank you for your help and suggestion.

---

<div class="post-metadata">

**Author:** ![JuanP74](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@JuanP74](https://calculix.discourse.group/u/JuanP74)\
**Post date:** [December 1, 2022, 5:12pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/12 "2022-12-01T17:12:40Z")

</div>

I’d say that if the “skin” expansion gives a mesh quality error, that means your solid mesh behind isn’t adequate, depite no errors casted by the program. I’d consider refining the mesh localy on those spots.

---

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [December 1, 2022, 10:26pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/13 "2022-12-01T22:26:44Z")

</div>

I don’t think there’s any question the mesh isn’t sufficient to properly capture the geometry in those locations but those locations are far from the locations of interest to me, they’re just “along for the ride”, and while I could refine the mesh all it would do is slow the solver down.

What I want to do is ignore those elements without having to delete them one-by-one from the mesh files.

I’ve thought about modifying the geometry to eliminate the sharp edges and other features, but I’d prefer not to; it’s something that might get noticed in a design review and will then call for explanation, whereas if the elements just aren’t there I think the FE result looks more like the natural geometry.

---

<div class="post-metadata">

**Author:** ![Disla](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/disla/32/3548_2.png) [@Disla](https://calculix.discourse.group/u/Disla)\
**Post date:** [December 1, 2022, 10:53pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/14 "2022-12-01T22:53:53Z")

</div>

Hi Shinbrot,

I have just test on a similar problem (Knee bone) and while 1mm S6 failed, real shell elements have been able to solve the problem.  
Although limited, ccx has real shell elements that do not expand. I would give it a try.

 ![screenshot.36](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/3/3eb695965251cbf2a0640f9486cc55e79532a85a.png)  
 ![screenshot.35](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/2/21cfba23b75d89744f871df7c8147689fa34eadb.png)

---

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [December 2, 2022, 1:44am UTC](https://calculix.discourse.group/t/negative-jacobian/1358/15 "2022-12-02T01:44:24Z")

</div>

Sounds like this is the way to go, thank you!

---

<div class="post-metadata">

**Author:** ![JuanP74](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@JuanP74](https://calculix.discourse.group/u/JuanP74)\
**Post date:** [December 2, 2022, 7:05am UTC](https://calculix.discourse.group/t/negative-jacobian/1358/16 "2022-12-02T07:05:12Z")

</div>

Impossible to say without more information.

---

<div class="post-metadata">

**Author:** ![Disla](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/disla/32/3548_2.png) [@Disla](https://calculix.discourse.group/u/Disla)\
**Post date:** [December 2, 2022, 7:35am UTC](https://calculix.discourse.group/t/negative-jacobian/1358/17 "2022-12-02T07:35:44Z")

</div>

HI,

Yep. If it works, it doesn’t mean the solution is right. Shell and solid are overlapping in an area in which each one has different properties. There is not too much information on how you manage that interface so please take it carefully.

If I were looking for some sort of boundary layer I would work with the geometry first to split the body into two components (internal and external) before meshing.

I would build a scaled or extruded copy (smaller) of the bone + some Boolean operations to get an acceptable geometry with an approximately uniform external thickness.

Seems an interesting FEA area.

 ![imagen](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/4/429b5763e648888c792f9be8ff2ec10ef9d21f51.png)

---

<div class="post-metadata">

**Author:** ![ashinbrot](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ashinbrot](https://calculix.discourse.group/u/ashinbrot)\
**Post date:** [December 2, 2022, 9:22pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/18 "2022-12-02T21:22:22Z")

</div>

The advantage to using the expandable shells is you get a conformal mesh, or at least Netgen delivers one. That is to say the outer and inner regions share common nodes at their mating surface.  
I don’t know how to create a conformal mesh with non-expanding shells, but it looks like I should try to find out.

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [December 2, 2022, 9:32pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/19 "2022-12-02T21:32:11Z")

</div>

You can use tie constraint or tied contact to connect shells with solids. Shell section offset may help with that.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [December 4, 2022, 3:19pm UTC](https://calculix.discourse.group/t/negative-jacobian/1358/20 "2022-12-04T15:19:11Z")

</div>

Right, bonding shell element face with tied contact or constraint may give better result since no over stiffening the model as another approach due to offset definition in shell sections.
