# Shell and beam expansion in code

Hi,
I’m trying to find in the Calculix code where shell (S6) and beam elements (B32) get expanded into 3D elements but my coding knowledge is limiting me here. My goal is to try to find a way to tie expanded element numbers to the original shell and beam elements, particularly when using composites, because using composites causes a renumbering of the elements. Does anyone know where in the code the expansion is happening?

This expansion is described in detail in the documentation chapter 10.3 Expansion of the one-dimensional and two-dimensional elements. This can be a good starting point.

From CalculiX 2.15 onwards, the expansion is written to the “[jobname].12d” file.

The contents of that file look like this:

`````` ELEMENT            1 with label "S6      " and with nodes:
14         15         69        407        537        538
is expanded into a "C3D15 L " element with topology:
1527       1530       1692       1529       1532       1694       2706       3096       3099       2708
3098       3101       1528       1531       1693
``````

Some time ago, I wrote a Python script named calculix-post to add the displacements for the expanded nodes in the “[jobname].frd” file. I wrote it for S6 elements, but it should not be hard to adapt it to other elements.

I’m hoping to find the same thing for composites so please post your findings if you manage!

It looks like it’s in changekon.f (called from gen3delem.f) but I’m not sure how the numbering ends up working out. Comment in that file says:

``````!     for composites the connectivity has to be changed to
!     allow for the multiple expansions of the composite elements.
!
!     for a 8-node composite shell the connectivity is set up as follows:
!     1..20: simple expansion of the shell
!     21..28: original connectivity of the element
!     29..48: expansion of the first layer of the shell
!     49..68: expansion of the second layer of the shell
!     ..
!     29+(n-1)*20..28+n*20: expansion of the nth layer of the shell
!
!     similar for 6-node composite shell elements; at the start of the present
!     routine the connectivity does not provide for the expansion of the
!     layers yet. At the end of the routine appropriate space has been
!     provided and the regular connectivity of the elements appropriately
!     moved
``````

Element numbers only seem change for composite shells. Expanded beams and single-layer shells have the same element numbers as the original ones.

@rsmith, unfortunately the .12d file doesn’t include composites and doesn’t really tell you anything you can’t already work out from the descriptions of element expansion in the manual together with the node numbering on the expanded elements in the solution.

It would be nice to have this info in the documentation.

1 Like