# \[HELP\] ERROR in e\_c3d: nonpositive jacobian

**URL:** https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320
**Category:** Uncategorized
**Created:** [November 6, 2022, 2:35pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320 "2022-11-06T14:35:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 6, 2022, 2:35pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/1 "2022-11-06T14:35:32Z")

</div>

I am using CalculiX to solve a force simulation problem on a power pole tower. I am currently using a tower footing model for initial testing, but the following error is generated.

```auto
 *ERROR in e_c3d: nonpositive jacobian
        determinant in element 3761

```

I had never been exposed to the field of FEM before and was not very familiar with the modeling requirements and theory associated with FEM.

The relevant documents are in the following link.  
[https://drive.google.com/drive/folders/1jbE36uDU3mUVf0y7VWsin14ZPIyyOrGZ?usp=sharing](https://drive.google.com/drive/folders/1jbE36uDU3mUVf0y7VWsin14ZPIyyOrGZ?usp=sharing)

- `JGU2-foot4c.step` is the STEP file format tower foot model I used.
- `JGU2-foot4c.inp` is the INP file generated using pygccx.
- `JGU2-foot4c_mesh.log` is the log file generated using gmsh.
- `JGU2-foot4c_fem.log` is the log file generated using ccx.

I hope I can get some help from you all.

---

<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 6, 2022, 2:44pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/2 "2022-11-06T14:44:13Z")

</div>

I would try solving this with beam elements first. If you want to use solid elements, you will have to fix the geometry (connections between members) and ensure proper mesh size. Currently, elements are way to stretched and otherwise distorted to be usable in an analysis.

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 6, 2022, 3:11pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/3 "2022-11-06T15:11:34Z")

</div>

Thank you for your reply.  
I don’t really understand the difference between beam elements and solid elements. From what the FreeCAD interface shows, my models are solid elements and use embedded connections. I feel I need to learn the difference between modeling elements such as beams and solids.

 ![image](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/c/ccc0a076e0cb94b4d88930f5348c389b1cf1ec0f.png)

---

<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 6, 2022, 4:41pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/4 "2022-11-06T16:41:12Z")

</div>

To use beam elements you would have to model the structure with lines (Draft module can be used for this purpose). There are some examples of such analyses on the FreeCAD forum:  
[https://forum.freecadweb.org/viewtopic.php?f=18&t=61036&start=60](https://forum.freecadweb.org/viewtopic.php?f=18&t=61036&start=60)  
[https://forum.freecadweb.org/viewtopic.php?f=18&t=23318&start=10](https://forum.freecadweb.org/viewtopic.php?f=18&t=23318&start=10)

---

<div class="post-metadata">

### Author: ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)
#### Post date: [November 6, 2022, 7:26pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/5 "2022-11-06T19:26:47Z")

</div>

Hello,  
you can do a first calc. with your power pole tower without any fem calc. but by hand.  
you make all beam like truss elements, and then you need no fem software.  
these step you can also do with an free spreadsheet:

[http://www.tm-aktuell.de/TM5/TM5S/Kran3D/kran3d.html](http://www.tm-aktuell.de/TM5/TM5S/Kran3D/kran3d.html)

you should use beam fem software.  
I would recommend you demo version like RSTAB from Dlubal,  
you can not safe it, but you can create a quarter, rotate it and you have your model,  
and do your cal. and get all results. another fem software is ruckzuck, but not for free.  
For free is Z88, what is recommended before from other users.

> **[Fachwerk3D - Strut-and-tie models Software](https://www.cesdb.com/fachwerk3d.html)**
>
> Fachwerk3D is the spatial version of the program Fachwerk. It intends to simplify the application of discontinuous stress fields and strut-and-tie models. Download structural analysis software Fachwerk3D 0.4.5 developed by A. Vontobel.

second step is mixing truss elements with bending beam elments

Update: Here is a software with a power pole tower as example:

[Analysis3D: Download Free FEA Software for Structural Design (cuylaerts.net)](https://cuylaerts.net/)

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 7, 2022, 7:52am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/6 "2022-11-07T07:52:33Z")

</div>

Thank you, Calc\_em.  
The tower model I am currently using was converted using an STL file and therefore does not have a very clear sketch. I retrieve to see if I can use this mesh to get the beam elements.

 ![image](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/3/3f3def267ab8ee8b7e3e5ed047dd48d175815f14.png)

---

<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 7, 2022, 8:02am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/7 "2022-11-07T08:02:49Z")

</div>

Unfortunately, FreeCAD doesn’t have any tools for automated midline extraction so you would have to manually draw the lines based on this solid geometry. But there aren’t that many members and it should be doable with proper snaps in the Draft workbench. Ask on the FreeCAD forum if you encounter any difficulties with this procedure.

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 7, 2022, 8:06am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/8 "2022-11-07T08:06:02Z")

</div>

Thanks for your reply, dichtstoff.  
Your reply helped me to open new thoughts. I think going to calculate the truss structure first is an appropriate solution idea. But currently I don’t have a truss model.  
The COMMPUS program in the link looks great, but I can’t download it. Hope I can get your share.  
I am shocked and happy with the update, thank you again. I will go ahead and learn about learning this software.

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 7, 2022, 8:11am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/9 "2022-11-07T08:11:06Z")

</div>

Thanks again for your patient response. I would be happy to try it.

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 21, 2022, 6:49am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/10 "2022-11-21T06:49:52Z")

</div>

After listening to your suggestions, I used the tower model in analysis3D for FEA and chose B32R as the beam element. However, I again encountered the non-positive Jacobian error. It seems to be because CalculiX extended B32R to C3D20R element. The analysis works fine when I use B31 as the beam element.  
Here is my input file.  
[tower\_test.inp](https://drive.google.com/drive/folders/10lGfJVhQuyU7kJouIVqx_cKUosZtMd1X?usp=sharing)

In order to get more accurate results, I would like to know if there is any better strategy to solve the non-positive Jacobian error when B32R is used as a beam element.

Thanks

---

<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: [November 21, 2022, 7:46am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/11 "2022-11-21T07:46:25Z")

</div>

Might be related to this issue: [Beam not reconstructed properly - CalculiX](https://calculix.discourse.group/t/beam-not-reconstructed-properly/1301)

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 21, 2022, 8:20am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/12 "2022-11-21T08:20:15Z")

</div>

I didn’t use \*NORMAL card. I defined the proper 1-direction vector in the 3rd lines of \*BEAM SECTION card. However, the model of tower exists lots of knots, which seems to be the problem.

---

<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: [November 21, 2022, 8:14pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/13 "2022-11-21T20:14:19Z")

</div>

connectivity improperly defined, check beam32r definition, you have used beam element middle node to connect the next element

 ![imagen](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/8/8f4b86799fc69284fb34e76f450b49d7a1220e14.png)  
 ![imagen](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/6/69c9839d64989a8e0b8e83099a90a977470475d5.png)

---

<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: [November 21, 2022, 10:08pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/14 "2022-11-21T22:08:52Z")

</div>

Yep,

You have many of those elements. They are not well conected.

 ![imagen](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/5/540b9eff30976727281d11d5f63023ab0794cb3f.png)

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 22, 2022, 3:21pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/15 "2022-11-22T15:21:55Z")

</div>

Thanks.  
I really didn’t think about the connection after the B32 element expansion. Should I use the \*MPC card to establish the connection? Or is it some other way?

---

<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: [November 22, 2022, 6:14pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/16 "2022-11-22T18:14:53Z")

</div>

you have to remesh the geometry to have it done properly.

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 23, 2022, 8:23am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/17 "2022-11-23T08:23:27Z")

</div>

Thanks.  
I got it. It is just a geometry problem. After searching through Gmsh’s functions, I don’t seem to have found a good way to handle it. Gmsh uses the knot point as middle node when using high order meshing. Maybe I should just use B31 element to solve this analysis.

---

<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: [November 23, 2022, 9:19am UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/18 "2022-11-23T09:19:40Z")

</div>

If you can provide the geometry or better a small part of it, I can try to give you some guidance to mesh it in gmsh with parabolic elements. this should be feasible as well.

---

<div class="post-metadata">

### Author: ![GH-Li](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GH-Li](https://calculix.discourse.group/u/GH-Li)
#### Post date: [November 23, 2022, 12:57pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/19 "2022-11-23T12:57:34Z")

</div>

Thank you very much！  
I use a point collection and an edge collection in csv file format to draw the model. Here are the files I used.  
[tower\_node.csv](https://drive.google.com/file/d/1PGDPXBYFh8reHjXvrUenYoLY4hR0VWt-/view?usp=sharing)  
[tower\_ele.csv](https://drive.google.com/file/d/1ZHRko5k3oKaJmSvNBgOtC8Qz5nmhWqoV/view?usp=sharing)

---

<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: [November 23, 2022, 3:45pm UTC](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320/20 "2022-11-23T15:45:38Z")

</div>

but there’s is no geometry in those files. Are you building the FEM model with an spreadsheet?

[Next page](https://calculix.discourse.group/t/help-error-in-e-c3d-nonpositive-jacobian/1320.md?page=2)
