Contents
Validation
Examples

Validation / 3 of 10

Cantilever beam, linear hexahedra

A beam clamped at one end and loaded at the other is the standard bending benchmark. Bending is where simple solid elements struggle, so this case tests the element as much as the solver.

Cantilever beam, linear hexahedra: displacement magnitude |u| on the deformed shape, displacements drawn 50 times enlarged
0.00 mm1.84 mm
Displacement magnitude |U|, deformed shape, displacements drawn 50 times enlarged. Drawn from the analysis file that Open in KoFEM loads.
Tip deflection δ; reference δ = P·L³ / (3·E·I)
Reference KoFEM Difference
−1.9048 mm −1.8378 mm −3.51 %
within ±6 %

Open in KoFEMOpens the solved model in the app.

The problem

𝑃 𝛿 𝐿 𝑥𝑦 𝑏 ℎ section
Beam of span L along x, b × h section, I = b·h³/12. Sketch, not to scale; thin lines show the element mesh.
L1000 mm
b×h100 × 100 mm
E210 GPa
ν0.3
P10 kN
Supportsx = 0 face fixed (Ux, Uy, Uz).
LoadP in −y as a force on the x = L face.
MeasuredMean y-displacement of the x = L face.

Analytical solution

Euler–Bernoulli beam theory assumes that cross-sections stay plane and perpendicular to the deformed axis, which neglects shear deformation. Take w(x) as the deflection, positive upwards, with the load P acting downwards at the tip. Equilibrium of the part beyond a section x gives the bending moment

M(x)=−P(L−x),

and the curvature is proportional to it:

EId2wdx2=M(x),I=bh312.

Integrating twice with the clamp conditions w(0)=0 and dwdx(0)=0 gives the deflection curve

w(x)=−Px26EI(3L−x),

and at the tip

δ=w(L)=−PL33EI.

For this beam I=8.3333×106 mm4 and δ=−1.9048 mm.

Timoshenko beam theory adds the shear deformation that Euler–Bernoulli leaves out. For a cantilever with a tip load it adds a second term,

δs=−PLκGA,κ=56,G=E2(1+ν),

which is 0.78 % of the bending term for this beam (span ten times the depth). A converged 3-D solid model should therefore deflect slightly more than PL3/(3EI).

Finite element model

Mesh40 × 4 × 4 grid: 640 linear 8-node hexahedra (P1)
Unknowns1,025 nodes, 3,075 degrees of freedom
MaterialLinear elastic, isotropic
SolverKoFEM engine (MFEM), the WebAssembly build the app runs: engine-5ceb743373dd

The beam is meshed with linear 8-node hexahedra. Each element is a cube with sides one quarter of the beam depth. The tip load is a force on the end face, which the app integrates as a uniform traction.

Results

Quantitytip deflection δ
Referenceδ = P·L³ / (3·E·I) = −1.9048 mm (Euler–Bernoulli beam theory)
KoFEM−1.8378 mm
Difference−3.51 % within ±6 %

Mesh convergence: Cantilever beam, P1 vs. P2

P1 (linear)P2 (quadratic)below the referenceabove
|difference| % 100 1k 10k 100k 0.1 1 10 100 tolerance ±6 % P1 (linear), 10 × 1 × 1: 132 DOFs, difference −35.22 %P1 (linear), 20 × 2 × 2: 567 DOFs, difference −12.42 %P1 (linear), 40 × 4 × 4: 3,075 DOFs, difference −3.51 % (the example's mesh)P1 (linear), 80 × 8 × 8: 19,683 DOFs, difference −0.88 %P2 (quadratic), 5 × 1 × 1: 297 DOFs, difference −1.05 %P2 (quadratic), 10 × 2 × 2: 1,575 DOFs, difference +1.84 % (the example's mesh)P2 (quadratic), 20 × 4 × 4: 9,963 DOFs, difference +1.48 % degrees of freedom
Difference from the reference on refined meshes, logarithmic axes. The ringed point is this example's mesh.

Linear elements lock in bending and approach from far below; quadratic ones are within a few percent on every mesh and level off slightly above the reference, since Euler–Bernoulli theory neglects shear deformation.

Data
Order Mesh DOFs KoFEM Difference
P1 (linear) 10 × 1 × 1 132 −1.2339 mm −35.22 %
P1 (linear) 20 × 2 × 2 567 −1.6682 mm −12.42 %
P1 (linear) 40 × 4 × 4 (this example) 3,075 −1.8378 mm −3.51 %
P1 (linear) 80 × 8 × 8 19,683 −1.8879 mm −0.88 %
P2 (quadratic) 5 × 1 × 1 297 −1.8847 mm −1.05 %
P2 (quadratic) 10 × 2 × 2 (this example) 1,575 −1.9398 mm +1.84 %
P2 (quadratic) 20 × 4 × 4 9,963 −1.9330 mm +1.48 %

Discussion

KoFEM's deflection differs from the reference by −3.51 %: the linear elements are too stiff. The reason is shear locking. The edges of a linear hexahedron stay straight, so it cannot take the curved shape of a bent piece of beam; to bend at all, it has to shear. In a beam under pure bending the true shear strain is zero, so this spurious, parasitic shear stores strain energy that the real beam does not have, and the element is too stiff. The longer the element compared with the depth it spans, the worse it gets.

Refining the mesh cures it slowly. In the convergence study above the linear-element error goes −35.22 % → −12.42 % → −3.51 % → −0.88 % as the element size halves, approaching a factor of four per step: the second-order convergence of displacements with linear elements, once locking is under control.

Quadratic elements can bend, so they do not lock; see the quadratic hexahedra and the beam meshed from a STEP file. Their series settles near +1.48 %, above the reference. About +0.78 % of that is the shear deformation that Euler–Bernoulli theory leaves out. The rest comes from the 3-D stress state at the clamped root and the loaded end.

Reproduce

In the app: open the model, then Studies → Static 1 → Run static solve, select the result plot and set Field to Uy. The Result summary shows Min Uy -1.838e+0 mm.

From a clone (Node.js 20+, bash, curl), this solves the model with the same engine and prints its line:

git clone https://github.com/mkofler96/KoFEM.git && cd KoFEM
bash scripts/fetch-wasm-engine.sh
node examples/validation/run.mjs --case cantilever
Case                                  Quantity                                  FE   Reference     Err%  Tol%  Status
Cantilever beam, linear hexahedra     tip deflection δ                     -1.8378     -1.9048    -3.51     6  PASS

References

  1. J. M. Gere and B. J. Goodno, Mechanics of Materials, Cengage Learning: axially loaded members, torsion, deflections of beams.
  2. S. P. Timoshenko, “On the correction for shear of the differential equation for transverse vibrations of prismatic bars”, Philosophical Magazine 41 (1921) 744–746.
  3. R. D. Cook, D. S. Malkus, M. E. Plesha and R. J. Witt, Concepts and Applications of Finite Element Analysis, 4th ed., Wiley, 2002.
  4. T. J. R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element Analysis, Dover, 2000.

KoFEM is research software and is not certified for safety-critical design. It solves linear-static, linear-elastic problems. Check results that matter against your own references.