Shell moment near the normal: the drilling check in gen3dforc.f never triggers (dot.gt.999d0), so the moment is amplified, not removed; a second moment is dropped

Summary

A moment on a shell node that is not a knot becomes a mean-rotation MPC about the moment’s axis (gen3dforc.f). Section 6.2.14 (Eight-node shell element (S8 and S8R)) of the 2.23 manual: “the use of mean rotation MPC’s prohibits the application of drilling moments, i.e. moments about an axis perpendicular to a shell surface. […] Starting with version 2.15 any nonzero drilling moment or rotation is automatically removed and a warning is issued.”

gen3dforc.f has a check for that, but:

  1. The check can never trigger. It reads if(dot.gt.999d0) then (line 667), where dot is the cosine between the moment axis and the normal. Its counterpart for rotational SPCs in gen3dboun.f (line 643) reads if(dabs(dot).gt.0.999d0) cycle. So a moment nearly along the normal is neither removed nor reported. On an S8R strip whose normal is 1 deg from x, a moment of 0.2 about x (cosine 0.99985) deflects the tip 7586 along the normal: 57.3 = 1/sin(1 deg) times the 132.4 that the same moment gives about y, which lies in the shell plane to within 1 deg. At 0.5 deg it is 15172. With the normal exactly along x, the moment gets no MPC (usermpc: “no MPC is generated for the mean rotation in node 17 and direction 4”) and the tip does not move. Turning the shell by 1 deg thus changes the response from 0 to 7586.
  2. The warning contradicts the action. The message in that check says “this load is taken into account”, and the next statement is cycle, which skips the MPC and the load. Once the threshold is fixed, users would read the opposite of what happens.
  3. A second moment at the node is dropped. When a second moment’s MPC would read the same in-plane rotation as the first (axes a1, a2 with n·(a1×a2) = 0), usermpc prints “no MPC is generated for the mean rotation in node … and direction 5”, and gen3dforc.f skips that moment’s load (line 730). Nothing says that the load is lost, and the result depends on the order of the *CLOAD lines.

All runs exit with status 0.

Below the threshold, gen3dforc.f does not project the moment axis onto the shell plane either (gen3dboun.f does this for rotational SPCs). For a moment about x on a strip whose normal is 15 deg from x, the response is 14.93 = 1/sin²(15 deg) times that of its in-plane part applied in local axes. Section 6.2.14 advises local axes for such loads (“prescribing a moment or rotation aboun [sic] an axis perpendicular to the drilling direction may require the definition of a local coordinate system”), and with local axes the result is right. So this part is given here only as the size of the effect of item 1, not as a separate claim.

Version

ccx 2.23 (macOS arm64). Source: master 9ba5d76 (16 Oct 2026).

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 21 Oct 2026). Not fixed: the mean-rotation part of gen3dforc.f is unchanged on master (9ba5d76).

Related:

Minimal input

moment_1deg.inp: a flat S8R strip along z, 2 x 2 elements, clamped at the root. Its normal is 1 deg from the x axis. A moment of 0.2 about x acts on each of the five tip nodes.

** S8R strip along z (length 1, width 0.2, t 0.01), clamped at z = 0; its normal is
** (cos 1, sin 1, 0), 1 deg from x; a moment of 0.2 about x on each tip node
*NODE, NSET=NALL
1, 0.001745240644, -0.09998476952, 0
2, 0.0008726203219, -0.04999238476, 0
3, 0, 0, 0
4, -0.0008726203219, 0.04999238476, 0
5, -0.001745240644, 0.09998476952, 0
6, 0.001745240644, -0.09998476952, 0.25
7, 0, 0, 0.25
8, -0.001745240644, 0.09998476952, 0.25
9, 0.001745240644, -0.09998476952, 0.5
10, 0.0008726203219, -0.04999238476, 0.5
11, 0, 0, 0.5
12, -0.0008726203219, 0.04999238476, 0.5
13, -0.001745240644, 0.09998476952, 0.5
14, 0.001745240644, -0.09998476952, 0.75
15, 0, 0, 0.75
16, -0.001745240644, 0.09998476952, 0.75
17, 0.001745240644, -0.09998476952, 1
18, 0.0008726203219, -0.04999238476, 1
19, 0, 0, 1
20, -0.0008726203219, 0.04999238476, 1
21, -0.001745240644, 0.09998476952, 1
*ELEMENT, TYPE=S8R, ELSET=EALL
1, 1, 3, 11, 9, 2, 7, 10, 6
2, 3, 5, 13, 11, 4, 8, 12, 7
3, 9, 11, 19, 17, 10, 15, 18, 14
4, 11, 13, 21, 19, 12, 16, 20, 15
*NSET, NSET=ROOT
1, 2, 3, 4, 5
*NSET, NSET=TIP
17, 18, 19, 20, 21
*MATERIAL, NAME=M
*ELASTIC
210000., 0.3
*SHELL SECTION, ELSET=EALL, MATERIAL=M
0.01
*BOUNDARY
ROOT, 1, 6
*STEP
*STATIC
*CLOAD
TIP, 4, 0.2
*NODE PRINT, NSET=TIP
U
*END STEP

Variants:

  • moment_1deg_y.inp: TIP, 5, 0.2 instead of TIP, 4, 0.2 (the moment about y, which lies in the shell plane to within 1 deg).
  • the same deck with the strip turned to 0.5 deg, and back to 0 deg (normal along x), moment about x. The node coordinates of all these strips follow one rule: with θ the angle between the normal and x, and w the node’s position across the width (w = -0.1 for nodes 1, 6, 9, 14, 17; -0.05 for 2, 10, 18; 0 for 3, 7, 11, 15, 19; 0.05 for 4, 12, 20; 0.1 for 5, 8, 13, 16, 21), x = -w sin θ and y = w cos θ; z is unchanged. For θ = 1 deg this gives the coordinates above, and for θ = 15 deg those of moment_x.inp below.
The 15 deg strip: no projection below the threshold, and the dropped second moment

moment_x.inp: the same strip with its normal at 15 deg from x, a moment of 0.2 about x on each tip node.

*NODE, NSET=NALL
1, 0.0258819045, -0.0965925826, 0
2, 0.0129409523, -0.0482962913, 0
3, 0, 0, 0
4, -0.0129409523, 0.0482962913, 0
5, -0.0258819045, 0.0965925826, 0
6, 0.0258819045, -0.0965925826, 0.25
7, 0, 0, 0.25
8, -0.0258819045, 0.0965925826, 0.25
9, 0.0258819045, -0.0965925826, 0.5
10, 0.0129409523, -0.0482962913, 0.5
11, 0, 0, 0.5
12, -0.0129409523, 0.0482962913, 0.5
13, -0.0258819045, 0.0965925826, 0.5
14, 0.0258819045, -0.0965925826, 0.75
15, 0, 0, 0.75
16, -0.0258819045, 0.0965925826, 0.75
17, 0.0258819045, -0.0965925826, 1
18, 0.0129409523, -0.0482962913, 1
19, 0, 0, 1
20, -0.0129409523, 0.0482962913, 1
21, -0.0258819045, 0.0965925826, 1
*ELEMENT, TYPE=S8R, ELSET=EALL
1, 1, 3, 11, 9, 2, 7, 10, 6
2, 3, 5, 13, 11, 4, 8, 12, 7
3, 9, 11, 19, 17, 10, 15, 18, 14
4, 11, 13, 21, 19, 12, 16, 20, 15
*NSET, NSET=ROOT
1, 2, 3, 4, 5
*NSET, NSET=TIP
17, 18, 19, 20, 21
*MATERIAL, NAME=M
*ELASTIC
210000., 0.3
*SHELL SECTION, ELSET=EALL, MATERIAL=M
0.01
*BOUNDARY
ROOT, 1, 6
*STEP
*STATIC
*CLOAD
TIP, 4, 0.2
*NODE PRINT, NSET=TIP
U
*END STEP

The in-plane part of a moment of 0.2 about x is 0.2 sin(15 deg) = 0.05176380902 about the in-plane axis e = (sin 15, -cos 15, 0) = -t, with t = (-sin 15, cos 15, 0) the strip’s width direction. moment_local.inp applies exactly that moment in the shell’s own axes (local 1 = normal, local 2 = t):

 *NSET, NSET=TIP
 17, 18, 19, 20, 21
+*TRANSFORM, NSET=TIP, TYPE=R
+0.9659258263, 0.2588190451, 0., -0.2588190451, 0.9659258263, 0.
 *MATERIAL, NAME=M
...
 *CLOAD
-TIP, 4, 0.2
-*NODE PRINT, NSET=TIP
+TIP, 5, -0.05176380902
+*NODE PRINT, NSET=TIP, GLOBAL=YES

moment_xy.inp has two load lines, TIP, 4, 0.2 and then TIP, 5, 0.2; moment_yx.inp has them the other way round.

How to run

ccx moment_1deg
ccx moment_1deg_y
ccx moment_x
ccx moment_local
ccx moment_xy
ccx moment_yx

Expected

  • moment_1deg.inp: the moment is 99.985 % drilling (cosine 0.99985 > 0.999). Per section 6.2.14 it is removed and a warning is issued, as gen3dforc.f’s own check intends: the tip does not move, as with the normal exactly along x.
  • moment_xy.inp and moment_yx.inp carry the same loads and must give the same result; if a load cannot be applied, a message must say so.

Actual

Tip node 19, exit 0 in all runs, no warning from gen3dforc.f in any of them:

deck normal moment U1, U2 at node 19 along the normal
moment_1deg 1 deg from x 0.2 about x -7585.296, -132.4018 -7586.45
moment_1deg_y 1 deg from x 0.2 about y 132.4018, 2.311083 132.42
0.5 deg 0.5 deg from x 0.2 about x -15171.75, -132.4018 -15172.3
0 deg x 0.2 about x 0, 0 0 (usermpc: “no MPC is generated”)

7586.45 / 132.42 = 57.29 and 15172.3 / 132.42 = 114.6: 1/sin of the angle between the moment axis and the normal (57.30 and 114.59).

The 15 deg strip:

deck U1, U2 at node 19 along the normal expected ratio
moment_local -33.10046, -8.869242 -34.2681
moment_x -494.1304, -132.4018 -511.561 -34.2681 14.93 = 1/sin² 15
moment_xy -494.1304, -132.4018 -511.561 (same as moment_yx) equals moment_x: the DOF 5 moment is lost
moment_yx 132.4018, 35.47697 137.072 (same as moment_xy) equals TIP, 5, 0.2 alone: the DOF 4 moment is lost

For moment_xy.inp the only message is, for each tip node:

 *WARNING in usermpc: no MPC is 
          generated for the mean
          rotation in node           17
          and direction            5

Where it goes wrong

gen3dforc.f (master 9ba5d76), mean-rotation part (lines 598-745):

  • The drilling check (lines 664-679):

                  if(dot.gt.999d0) then
                    write(*,*) '*WARNING in gen3dforc: applied'
    ...
                    write(*,*) '         direction; this load is'
                    write(*,*) '         taken into account'
                    write(*,*)
                    cycle
                  endif
    

    dot is a cosine, so the condition is never true, and the text says the opposite of the cycle that follows.

  • The MPC axis is the global (or *TRANSFORM) axis a as it is (lines 650-659, then co(k,nodeact)=a(k,idirref), line 706), and the moment goes unscaled onto the MPC’s extra node (forcadd(nk,idir,val,...), line 732). For a rotational SPC, gen3dboun.f projects the axis onto the shell plane and scales the value by sqrt(1 - dot²) (gen3dboun.f lines 663-682); gen3dforc.f does neither. For a shell the MPC reads the rotation of the two expanded nodes on the normal (knor(indexk+3) and knor(indexk+1), lines 614-623). About an axis a at an angle to the shell, an in-plane rotation phi about e reads phi (a·e)/(1 - (a·n)²), so the moment acts as M (a·e)/(1 - (a·n)²) about e. That matches the measured ratios (1/sin and 1/sin²); this reading of the cause is my own.

  • A second moment whose axis projects onto the same in-plane direction gets no MPC: usermpc finds no free dependent DOF (“no MPC is generated”), nodeact is -1, and line 730 skips the forcadd, so that moment is dropped without a message of its own.

Fix

Not built or tested:

  • Line 667: if(dabs(dot).gt.0.999d0) then, as in gen3dboun.f, and make the warning say that the load is not taken into account.
  • When the MPC of a second moment cannot be generated, add its in-plane part to the first moment’s MPC load (as gen3dboun.f does for a second SPC), or at least warn that the moment is not applied.
  • Optionally, treat shell moments as gen3dboun.f treats rotational SPCs: project the axis onto the shell plane and scale the value by sqrt(1 - dot²), which removes the drilling part as section 6.2.14 describes.

Workaround: give such nodes a *TRANSFORM whose local axes are the shell normal and an in-plane direction, and apply only the in-plane moment components (moment_local.inp).

Confirmed using official build of ccx 2.23 on Windows, needs a GitHub ticket.

moment_1deg.dat:

                        S T E P       1


                                INCREMENT     1


 displacements (vx,vy,vz) for set TIP and time  0.1000000E+01

        17 -7.564621E+03 -1.320409E+02 -1.659117E-09
        18 -7.580618E+03 -1.323202E+02 -2.394074E-09
        19 -7.585297E+03 -1.324018E+02  2.080114E-12
        20 -7.580618E+03 -1.323202E+02  2.391921E-09
        21 -7.564621E+03 -1.320409E+02  1.603407E-09

moment_1deg_y.dat:

                        S T E P       1


                                INCREMENT     1


 displacements (vx,vy,vz) for set TIP and time  0.1000000E+01

        17  1.320409E+02  2.304783E+00  1.905136E-10
        18  1.323202E+02  2.309657E+00  1.219560E-10
        19  1.324018E+02  2.311083E+00 -7.479017E-13
        20  1.323202E+02  2.309657E+00 -1.232214E-10
        21  1.320409E+02  2.304783E+00 -1.915900E-10

moment_x.dat:

                        S T E P       1


                                INCREMENT     1


 displacements (vx,vy,vz) for set TIP and time  0.1000000E+01

        17 -4.927835E+02 -1.320409E+02 -4.782418E-08
        18 -4.938257E+02 -1.323202E+02  2.782497E-08
        19 -4.941304E+02 -1.324018E+02 -1.846190E-12
        20 -4.938257E+02 -1.323202E+02 -2.782708E-08
        21 -4.927835E+02 -1.320409E+02  4.781986E-08

moment_xy.dat:

                        S T E P       1


                                INCREMENT     1


 displacements (vx,vy,vz) for set TIP and time  0.1000000E+01

        17 -4.927835E+02 -1.320409E+02 -4.762306E-08
        18 -4.938257E+02 -1.323202E+02  2.792904E-08
        19 -4.941304E+02 -1.324018E+02 -1.727951E-12
        20 -4.938257E+02 -1.323202E+02 -2.792771E-08
        21 -4.927835E+02 -1.320409E+02  4.762698E-08
1 Like

Posted: Shell moment near the normal: the drilling check in gen3dforc.f never triggers (dot.gt.999d0), so the moment is amplified, not removed; a second moment is dropped · Issue #247 · Dhondtguido/CalculiX · GitHub

1 Like