# Pyramid elements C3D5 & C3D13

**URL:** <https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881>\
**Category:** Code development\
**Created:** [October 20, 2023, 9:19am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881 "2023-10-20T09:19:56Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![vicmw](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vicmw](https://calculix.discourse.group/u/vicmw)\
**Post date:** [February 13, 2024, 12:00am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/21 "2024-02-13T00:00:12Z")

</div>

> under the GNU profiler to recognize in which routines the C3D15 have been used, further I also did a complete search for all places where C3D15 had been implemented in

Clever way! That would have given you a lot more confidence than trying to walk through it all by hand.

I don’t think it’s too big of a deal if there are some bugs. They’ll get discovered soon enough and can be fixed one by one. If it makes it into official CCX, I’ll be making my own set of test cases too.

Thanks for spending the time on such a useful (from my POV) piece of work!

---

<div class="post-metadata">

**Author:** ![fgr](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@fgr](https://calculix.discourse.group/u/fgr)\
**Post date:** [February 20, 2024, 9:35pm UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/22 "2024-02-20T21:35:46Z")

</div>

@vicmw  
During the implementing of the pyramid element I got by incident implement an error in the 2’order wedge element which I just have discovered with a test of the pre-tension card.

 ![Wedge_error](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/b/b4e4b211f799c39ae435a9240a40adbf6db1d6d1.jpeg)  
I have updated the code so the result now should be correct.  
 ![Wedge_fixed](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/1/1649c1b7bb7d9e3b04bf0bd7ee49816d13533e94.jpeg)

I actual don’t who are using my pyramid code, but if you should need the updated source code and the windows exe you can get it at the link in the beginning in this thread.

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [February 21, 2024, 2:38am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/23 "2024-02-21T02:38:01Z")

</div>

I may want to test them later this year… thank you @fgr!

---

<div class="post-metadata">

**Author:** ![vicmw](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vicmw](https://calculix.discourse.group/u/vicmw)\
**Post date:** [February 21, 2024, 6:00am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/24 "2024-02-21T06:00:47Z")

</div>

I’m not using it but I have code to generate / read solution with these new elements for CCX and hope Guido includes it.

I just ran my big set of test cases on it and found these failures. I only had a quick look so let me know if you need more details.

Thermal doesn’t work but I’m not sure if you intended that or not.

CCX S30 density.inp [CCX\_S30\_density.inp - Pastebin.com](https://pastebin.com/bVGZ1qvP) C3D5 Small difference with with gravity compared to collapsed hex and Mecway’s internal pyramids. Not sure if it’s worse or better.

CCX S30 Pressure pyramids.inp [CCX\_S30\_Pressure\_pyramids.inp - Pastebin.com](https://pastebin.com/Li52KLtQ) Bad stress and displacement

CCX S30 solid element force.inp [CCX\_S30\_solid\_element\_force.inp - Pastebin.com](https://pastebin.com/mUHKsDkx) Slight increase in error of reaction force over collapsed hex pyramids.

CCX L30 compression only support cylinder rotating.inp [CCX\_L30\_compression\_only\_support\_cylinder\_rotating.inp - Pastebin.com](https://pastebin.com/d5UJkFBK) C3D13 won’t converge whereas it would for collapsed hex pyramids.

---

<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:** [February 21, 2024, 9:05am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/25 "2024-02-21T09:05:41Z")

</div>

When I recently e-mail Guido, I asked him to take a look at this code. He said that he would do it.

---

<div class="post-metadata">

**Author:** ![fgr](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@fgr](https://calculix.discourse.group/u/fgr)\
**Post date:** [February 21, 2024, 11:48am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/26 "2024-02-21T11:48:24Z")

</div>

@vicmw  
I really appreciate your test files. It helps a lot to have to alternative input in order to make verification test. 👍

I’ll return when I have looked into your test files, which I really have had time to look into yet, but in advance I also would like to refer from “Advanced Finite Element Methods” by Carlos Felippa, that some discrepancy should be taken into account when running tests with few elements.

---

<div class="post-metadata">

**Author:** ![rafal.brzegowy](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@rafal.brzegowy](https://calculix.discourse.group/u/rafal.brzegowy)\
**Post date:** [August 18, 2026, 8:00am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/27 "2026-08-18T08:00:14Z")

</div>

I think that since pyvista supports the .frd format, it is worth adding support for these unofficial element types (C3D5 and C3D13 pyramids) to pyvista:

> [@CalculiX (.frd) and pyvista](https://calculix.discourse.group/t/calculix-frd-and-pyvista/3816):
>
> I am pleased to inform you that I have successfully added native support for reading .frd files directly into PyVista. This feature is currently slated for release with version 0.48, which is expected to be available around April. This implementation will allow users to load .frd file seamlessly without requiring external conversion scripts or intermediate steps.

feature-request pyvista:

> <https://github.com/pyvista/pyvista/issues/8923>
>
> \### Describe the feature you would like to be added.
> 
> Could you please add to th…e .frd reader the ability to read the not yet officially introduced pyramid-type elements: C3D5 and C3D13? 
> 
> There is a patch file available on the CalculiX forum thanks to which the solver supports these elements, but the official post processor (cgx) does not support them:
> 
> https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/19
> 
> 
> 
> 
> \### Links to VTK Documentation, Examples, or Class Definitions.
> 
> https://github.com/Dhondtguido/CalculiX/pull/130
> 
> C3D5 -\> VTK\_PYRAMID
> \<img width="138" height="151" alt="Image" src="https://github.com/user-attachments/assets/5de22e71-eb61-4eb9-acaf-5c1948e55ba0" /\>
> 
> C3D13 -\> VTK\_QUADRATIC\_PYRAMID
> \<img width="165" height="154" alt="Image" src="https://github.com/user-attachments/assets/bf58dea2-8397-43a6-a3e5-d8e35c73da9c" /\>
> 
> \### Pseudocode or Screenshots
> 
> \<img width="554" height="379" alt="Image" src="https://github.com/user-attachments/assets/5e6c96ee-4dbf-4a6d-a31c-f5cb3c6495da" /\>

---

<div class="post-metadata">

**Author:** ![johanngil](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@johanngil](https://calculix.discourse.group/u/johanngil)\
**Post date:** [August 18, 2026, 9:22am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/28 "2026-08-18T09:22:31Z")

</div>

Some more good news on pyramids: Salome also supports the pyramid Export to unv file with its newest Release being published some weeks ago.

---

<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:** [August 18, 2026, 4:37pm UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/29 "2026-08-18T16:37:46Z")

</div>

@Durbul Is there a plan to add those pyramid elements in the near future? There is a PR adding them, but from what I understand, it will need a detailed review and maybe even manual implementation: [An attempt to adapt C3D5 and C3D13 elements originally by fgr (calculix forum, 2.21) by 3rav · Pull Request #130 · Dhondtguido/CalculiX · GitHub](https://github.com/Dhondtguido/CalculiX/pull/130)

---

<div class="post-metadata">

**Author:** ![Durbul](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Durbul](https://calculix.discourse.group/u/Durbul)\
**Post date:** [August 22, 2026, 6:39pm UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/30 "2026-08-22T18:39:13Z")

</div>

There is no such plan at the moment (for the near future at least). Adding new elements is always quite an effort, since you have to make sure they work with all the available features. I haven’t looked in detail at the maturity of the code in the PR though.

- Has anyone tested the implementation lately?
- How is the implementation status?
- How do the results compare to Abaqus / other solvers?

And out of curiosity:

- What do you use/require pyramids for?
- How important is this feature for your work?

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [August 22, 2026, 10:59pm UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/31 "2026-08-22T22:59:03Z")

</div>

> [@Durbul](#):
>
> - What do you use/require pyramids for?

Some pre-processors would create them by default, unless you tell it to split pyramids into tetras.

> [@Durbul](#):
>
> - How important is this feature for your work?

In my case not as important because I generally try to request the pyramids are split into tetras. But I’ve received models that have pyramids and it would certainly make it easier to compare if the element is available.

---

<div class="post-metadata">

**Author:** ![NorbertH](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@NorbertH](https://calculix.discourse.group/u/NorbertH)\
**Post date:** [August 23, 2026, 9:36am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/32 "2026-08-23T09:36:50Z")

</div>

> [@Durbul](#):
>
> - What do you use/require pyramids for?

They could also be used for transition between hex and tets. Which would be good to decrease the element count for complicated geometry.

---

<div class="post-metadata">

**Author:** ![Stefano4000](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@Stefano4000](https://calculix.discourse.group/u/Stefano4000)\
**Post date:** [August 23, 2026, 10:54am UTC](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881/33 "2026-08-23T10:54:52Z")

</div>

This is mostly useful in Cfd for perfect transitions by simple to complicated parts.

Other FEA-Codes use Contact elements from quad to tri at face of simple section to complicated section.  
The mesher should make same nodes and 2 tri to one quad for good interpolation of nodal and elemental results.

A hex mesh needs only 1/6 elements for same Tetraeder with better numerics inside.

Important is here a possible good contact from hex8 to tet10 elements with mixing first order and second order parts.

So an alternative is a simple and good contact management of parts with full „welded“ contact.  
Good Meshing for good contact elements is here essential and good interpolation and robust Implementation of contact by solver.

Intelligent partitioning is here important for good performance at multithreaded cpu or gpu.

[Previous page](https://calculix.discourse.group/t/pyramid-elements-c3d5-c3d13/1881.md?page=1)
