Summary
Section 7.86 (*MEMBRANE SECTION) of the 2.23 manual says: “The syntax is identical to *SHELL SECTION”. Section 7.118 (*SHELL SECTION) offers the COMPOSITE parameter for S8R and S6 elements, and sections 6.2.17 and 6.2.18 describe M3D6 and M3D8R as the S6 and S8R shells with hinges. membranesections.f has a COMPOSITE branch, and its error message says that branch is meant for M3D8R and M3D6 elements.
Yet *MEMBRANE SECTION, COMPOSITE stops on every element. An M3D8R element gives
*ERROR reading *MEMBRANE SECTION: *MEMBRANE SECTION
with the option COMPOSITE can
only be used for M3D8R or M3D6 membrane elements.
Element 1 is not a M3D8R nor a M3D6 membrane element.
and an M3D6 element the same, with exit status 201. Composite membranes cannot be used at all. The same deck with S8R and S6 shells and *SHELL SECTION, COMPOSITE runs.
The cause is a substring length: the element type is compared as lakon(1:3) with 'M3D8R' and as lakon(1:2) with 'M3D6', which can never be equal.
Version
ccx 2.23 (macOS arm64). Source: master 9ba5d76 (16 Oct 2026). A build of master 9ba5d76 stops with the same two messages, and runs the two other decks with the same numbers.
Already reported or fixed?
Not reported: I found no matching GitHub issue (open or closed) or pull request in Dhondtguido/CalculiX, and no calculix.discourse.group topic (searched 22 Oct 2026). Not fixed: the two comparisons in membranesections.f are unchanged on master (9ba5d76).
Related:
- shellsections.f: a composite layer without orientation takes the section's by sandervdbroek · Pull Request #236 · Dhondtguido/CalculiX · GitHub (open, the fix for *SHELL SECTION, COMPOSITE: a layer without an orientation inherits the previous layer's orientation instead of the section's ORIENTATION or the global axes · Issue #220 · Dhondtguido/CalculiX · GitHub in
shellsections.f) notes in one sentence that the COMPOSITE branch ofmembranesections.frejects every element, and leaves that file unchanged. - *SHELL SECTION, COMPOSITE: a layer without an orientation inherits the previous layer's orientation instead of the section's ORIENTATION or the global axes · Issue #220 · Dhondtguido/CalculiX · GitHub (*SHELL SECTION, COMPOSITE: a layer without an orientation inherits the previous layer's orientation instead of the section's ORIENTATION or the global axes): in
*SHELL SECTION, COMPOSITEa layer without an orientation takes the previous layer’s orientation. The COMPOSITE branch ofmembranesections.fhas the same pattern; it becomes reachable once the comparison here is fixed (see Fix). - Quadratic membranes (M3D6, M3D8, M3D8R) fail the uniaxial patch test, and two M3D8R elements form a mechanism · Issue #215 · Dhondtguido/CalculiX · GitHub (Quadratic membranes (M3D6, M3D8, M3D8R) fail the uniaxial patch test, and two M3D8R elements form a mechanism): M3D6, M3D8 and M3D8R fail the uniaxial patch test. A different problem with the same elements.
- Fix malformed input followups by oursland · Pull Request #194 · Dhondtguido/CalculiX · GitHub (open) adds a check for a missing ELSET parameter to
membranesections.f. It does not touch these lines.
Minimal input
memb_composite.inp:
** Element 1: an M3D8R membrane, unit square in the x-y plane.
** Element 2: a separate M3D6 membrane (triangle), held at all nodes.
** Both get a two-layer *MEMBRANE SECTION, COMPOSITE.
*NODE, NSET=NALL
1, 0., 0., 0.
2, 1., 0., 0.
3, 1., 1., 0.
4, 0., 1., 0.
5, 0.5, 0., 0.
6, 1., 0.5, 0.
7, 0.5, 1., 0.
8, 0., 0.5, 0.
11, 3., 0., 0.
12, 4., 0., 0.
13, 3., 1., 0.
14, 3.5, 0., 0.
15, 3.5, 0.5, 0.
16, 3., 0.5, 0.
*ELEMENT, TYPE=M3D8R, ELSET=E1
1, 1, 2, 3, 4, 5, 6, 7, 8
*ELEMENT, TYPE=M3D6, ELSET=E2
2, 11, 12, 13, 14, 15, 16
*MATERIAL, NAME=EL
*ELASTIC
1000., 0.
*MEMBRANE SECTION, ELSET=E1, COMPOSITE
0.05, , EL
0.05, , EL
*MEMBRANE SECTION, ELSET=E2, COMPOSITE
0.05, , EL
0.05, , EL
*NSET, NSET=LEFT
1, 4, 8
*NSET, NSET=TRI
11, 12, 13, 14, 15, 16
*BOUNDARY
LEFT, 1, 1
1, 2, 2
NALL, 3, 3
TRI, 1, 2
*STEP
*STATIC
*CLOAD
2, 1, 0.1666666667
6, 1, 0.6666666667
3, 1, 0.1666666667
*NODE PRINT, NSET=NALL
U
*END STEP
shell_composite.inp: the same deck with shells. Replace TYPE=M3D8R by TYPE=S8R, TYPE=M3D6 by TYPE=S6, and *MEMBRANE SECTION by *SHELL SECTION (both cards).
memb_single.inp: the same membranes with one layer. Replace each *MEMBRANE SECTION card and its two layer lines by
*MEMBRANE SECTION, ELSET=E1, MATERIAL=EL
0.1
(and the same with ELSET=E2).
How to run
ccx memb_composite
ccx shell_composite
ccx memb_single
Expected
memb_composite runs. Element 1 is a two-layer membrane of total thickness 0.1, pulled by a total force of 1 on its edge x = 1, so U1 at nodes 2, 3 and 6 is close to F L / (E t W) = 1 / (1000 · 0.1) = 0.01 (L = W = 1).
Actual
memb_composite stops while reading the input (exit status 201):
*ERROR reading *MEMBRANE SECTION: *MEMBRANE SECTION
with the option COMPOSITE can
only be used for M3D8R or M3D6 membrane elements.
Element 1 is not a M3D8R nor a M3D6 membrane element.
*ERROR reading *MEMBRANE SECTION: *MEMBRANE SECTION
with the option COMPOSITE can
only be used for M3D8R or M3D6 membrane elements.
Element 2 is not a M3D8R nor a M3D6 membrane element.
shell_composite runs (exit 0): U1 = 1.000000E-02 at nodes 2, 3 and 6. memb_single runs too (exit 0): U1 = 1.006700E-02 at nodes 2, 3 and 6.
Where it goes wrong
src/membranesections.f, lines 314-315 (explicit set members; lines 340-341 repeat it for generated ranges):
if((lakon(ialset(j))(1:3).ne.'M3D8R').and.
& (lakon(ialset(j))(1:2).ne.'M3D6')) then
Fortran pads the shorter operand of a character comparison with blanks. 'M3D' is therefore compared with 'M3D8R', and 'M3' with 'M3D6'. Both always differ, so the condition is true for every element and the routine stops. At this point lakon holds the element type as read (elements.f line 474, lakon(i)=label), so an M3D8R element has 'M3D8R' there.
The lengths look copied from src/shellsections.f (lines 338-339 and 365-366), where they match their literals:
if((lakon(ialset(j))(1:3).ne.'S8R').and.
& (lakon(ialset(j))(1:2).ne.'S6')) then
No test deck in test/ uses *MEMBRANE SECTION, COMPOSITE (membrane1 to membrane3 use MATERIAL).
Fix
Possible fix (not built or tested), at lines 314-315 and 340-341:
if((lakon(ialset(j))(1:5).ne.'M3D8R').and.
& (lakon(ialset(j))(1:4).ne.'M3D6')) then
and the same with lakon(k). Once composite membranes get past this check, the layer loop has the orientation pattern of Issues · Dhondtguido/CalculiX · GitHub iorientation is set only when a layer names an orientation (lines 295-308), so a layer without one keeps the previous layer’s. The fix proposed for shellsections.f in PR #236 (start every layer from the section’s ORIENTATION) applies here too.
Workaround: none that keeps a layered membrane. *SHELL SECTION, COMPOSITE on S8R or S6 elements runs, but adds bending stiffness.