Summary
The internal nodal forces of the user element U1 (the 2-node Timoshenko beam) have the wrong sign for the axial force at the element’s first node and for the shear forces at its second node. As a result RF at U1 nodes does not balance the applied loads, and a step that ccx iterates does not converge.
Version
ccx 2.23 (conda-forge build pl5321h484372f_2, macOS arm64). The code involved (src/resultsmech_u1.f) is the same on master (checked 2026-10-17).
Minimal input (u1_rf.inp)
** One U1 cantilever element, clamped at node 1, tip load (10, 1, 2) at node 2.
** RF = external force: the reaction at node 1, the applied load at node 2.
** k = 1.e4 only makes the shear deformation negligible, so that the
** displacements are the Euler-Bernoulli ones; the signs of RF are the
** same with k = 5/6.
*NODE, NSET=NALL
1, 0., 0., 0.
2, 10., 0., 0.
*USER ELEMENT, TYPE=U1, INTEGRATION POINTS=2, MAXDOF=6, NODES=2
*ELEMENT, TYPE=U1, ELSET=EBEAM
1, 1, 2
*MATERIAL, NAME=STEEL
*ELASTIC
1.e7, 0.3
*BEAM SECTION, ELSET=EBEAM, MATERIAL=STEEL, SECTION=GENERAL
0.01, 8.333333e-6, 0., 8.333333e-6, 1.e4
0., 1., 0.
*BOUNDARY
1, 1, 6
*STEP
*STATIC
*CLOAD
2, 1, 10.
2, 2, 1.
2, 3, 2.
*NODE PRINT, NSET=NALL
U
*NODE PRINT, NSET=NALL, TOTALS=YES
RF
*EL PRINT, ELSET=EBEAM
S
*END STEP
How to run
ccx u1_rf
Expected
The manual (*NODE PRINT) defines RF as the external force: the reaction plus any *CLOAD at the node. So:
| node | RF expected |
|---|---|
| 1 (clamped) | reaction (−10, −1, −2) |
| 2 (free, loaded) | the *CLOAD (10, 1, 2) |
| total | (0, 0, 0) |
The displacements ccx prints are correct: u = FL/EA = 1.0e-3, v = PL³/3EI = 4.0, w = 8.0, θy = −1.2, θz = 0.6. Only the forces are wrong.
Actual
forces (fx,fy,fz) for set NALL and time 0.1000000E+01
1 1.000000E+01 -9.999999E-01 -2.000000E+00
2 1.000000E+01 -1.000000E+00 -2.000000E+00
total force (fx,fy,fz) for set NALL and time 0.1000000E+01
2.000000E+01 -2.000000E+00 -4.000000E+00
stresses (elem, integ.pnt.,sxx,syy,szz,sxy,sxz,syz) for set EBEAM and time 0.1000000E+01
1 1 1.000000E+01 -1.000000E+01 -2.000000E+01 -9.999999E-01 -2.000000E+00 0.000000E+00
1 2 1.000000E+01 -2.600000E-07 -5.200000E-07 -1.000000E+00 -2.000000E+00 0.000000E+00
fx has the wrong sign at node 1, and fy and fz have the wrong sign at node 2. With k = 5/6 the signs are the same.
Iterated steps put these forces into the residual. Two C3D8 cubes in node-to-surface contact converge in 3 iterations on their own. Add this cantilever to the same deck, unconnected to the cubes, and the step diverges: “largest increment of disp” goes 4, 8, 16, 32, then come the cutbacks and *ERROR: too many cutbacks. A moment on either U1 node, or a torque, has the same effect.
Where it goes wrong
src/resultsmech_u1.f, lines 616–621, in the loop over jj = 1, 2. Here ξ = 0 at node 1 and ξ = 1 at node 2, and stre(1..6) = N, M2, M1, Q1, Q2, T at that end. The local axes are e1 along the element, e2 = n1 (the second data line) and e3 = e1 × e2:
fn(j,node)=fn(j,node)+tm(1,j)*stre(1)
& +tm(2,j)*stre(4)
& +tm(3,j)*stre(5)
fn(j+3,node)=fn(j+3,node)+tm(1,j)*stre(6)
& +tm(2,j)*stre(2)
& +tm(3,j)*stre(3)
- The end section forces are added with the same sign at both nodes. A 2-node element needs −stre at node 1 and +stre at node 2, which is why fx is wrong at node 1. The shear force comes out right at node 1 only because stre(4) and stre(5) have the wrong sign themselves. For this load the exact v′ − θ3 and w′ + θ2 are positive, yet S prints the shear forces as −1 and −2 (sxy, sxz). That is the U1 shear-term problem, reported separately.
- The bending moments go on the wrong axes:
- stre(2) = E·I11·(−θ3′) is a moment about e3, but it is added to the rotation about e2 (n1).
- stre(3) = E·I22·θ2′ is a moment about e2, but it is added to the rotation about e3.
- stre(6) = xk·G·(I11+I22)·θ1′ (line 507) includes the shear coefficient k. The torsional stiffness
s(4,4)=um*(xi11+xi22)/dline_c3d_u1.fdoes not. So the torque in S and in fn is k times the real torque: a tip torque of 1 with k = 0.5 prints 0.5.
I tested the following fix in a Python re-implementation of both routines:
- −stre at node 1 and +stre at node 2;
- stre(3) as the moment about e2 and −stre(2) as the moment about e3;
- the torque without k;
- the shear term corrected (separate issue).
With all four changes, the assembled forces equal K_e·u_e from e_c3d_u1.f to round-off for arbitrary u_e. Computing fn directly as Tᵀ·K′·T·u_e would also work. Neither fix has been built and tested in ccx itself.
Workaround
Support the U1 node through stiff SPRING2 elements, one per translational DOF, to a fixed node, and read RF at the fixed node. That gives (−10, −1, −2) for this deck. No workaround found for iterated steps.