Cantilever beam — Static linear elastic — 3D Solid elements
A cantilever beam modelled as a solid box (L x b x h). Fixed at x=0 face, tip load P distributed across x=L face nodes.
Analytical (Euler-Bernoulli), all in mm / N / MPa: I = b * h^3 / 12 = 50 * 100^3 / 12 = 4,166,667 mm^4 delta_tip = P * L^3 / (3 * E * I) Rz = -P

The model before it is solved: its parts, supports (red) and loads (blue).
![The result: the deformed shape coloured by stress (vonMises [MPa])](/examples/reference-cases/benchmarks/cantilever-static-3d-results.webp)
The deformed shape, coloured by stress (vonMises [MPa]), in xfea’s 3D viewer.
Open in 3D turn it, cut it, pick any field: in xfea's viewer, in your browser
Verification
Section titled “Verification”In the latest verification run, on 2026-11-21, through the conversion service as users solve, 2 of 2 checks pass.
| Quantity / reference from | xfea | Reference | Deviation | Tolerance | |
|---|---|---|---|---|---|
| Tip deflection (z) [mm] analytical | -0.38184 | -0.38095 | 0.23 % | 5 % | |
| Reaction force Rz [N] analytical | 1000 | 1000 | 0.00 % | 5 % |
The script
Section titled “The script”examples/scripts/04_reference_cases/benchmarks/cantilever_static_3d.py. Run it from the repository with uv run python examples/scripts/04_reference_cases/benchmarks/cantilever_static_3d.py, or, with xfea-examples installed, xfea-examples run 04_reference_cases/benchmarks/cantilever_static_3d.py.
from xfea.problem import Problem, StaticStepfrom xfea.results import DisplacementFieldResults, ReactionFieldResults, StressFieldResultsfrom xfea.viewers.viewer import Viewer
from _bench_utils import ( cantilever_beam_3d, compare, out_dir, sum_reactions,)from xfea_examples import viewer_wanted
# ── Model ─────────────────────────────────────────────────────────────────model, part, fixed_nodes, tip_nodes, material, section, L, b, h = cantilever_beam_3d()
# ── Problem ───────────────────────────────────────────────────────────────P_total = -1000load_per_node = P_total / max(1, len(tip_nodes))
problem = model.add_problem(Problem(name="cantilever_static_3d"))step = problem.add_step(StaticStep(name="service"))step.add_uniform_forcefield(nodes=tip_nodes, z=load_per_node, load_case="service")
disp = DisplacementFieldResults()react = ReactionFieldResults()stress = StressFieldResults()step.add_field_outputs([disp, react, stress])
problem.analyse_and_extract(path=out_dir(model.name), verbose=True)
# ── Analytical references (raw numbers, independent of library) ───────────P_val = -1000.0L_mm = 1000.0E_MPa = 210_000.0b_mm = 50.0h_mm = 100.0I_mm4 = b_mm * h_mm**3 / 12.0
delta_ref_mm = P_val * L_mm**3 / (3.0 * E_MPa * I_mm4)Rz_ref_N = -P_val
# ── Comparison ────────────────────────────────────────────────────────────print()print("=" * 65)print("Cantilever Beam — Static Linear Elastic — 3D Solid Elements")print("=" * 65)print()
delta_fea = disp.get_min_result("z").zfea_mm = float(delta_fea)compare("Tip deflection (z) [mm]", fea_mm, delta_ref_mm, tol_pct=5.0)
Rz_fea = sum_reactions(react, fixed_nodes, "z")fea_rz = float(Rz_fea)compare("Reaction force Rz [N]", fea_rz, Rz_ref_N, tol_pct=5.0)
# Via plugin registryviewer = Viewer(plugin="browser")viewer.add_model(model)viewer.add_results({disp: "z"}, units="mm")viewer.add_results({stress: "von_mises_stress"}, units="MPa")if viewer_wanted(): # XFEA_EXAMPLES_SHOW_VIEWER=1, or `xfea-examples config set-show-viewer on` viewer.run()© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them