Skip to content

Euler buckling of a column

The model before it is solved: parts, supports and loads

The model before it is solved: its parts, supports (red) and loads (blue).

Open in 3D turn it, cut it, hide parts: in xfea's viewer, in your browser

In the latest verification run, on 2026-11-21, through the conversion service as users solve, 1 of 1 checks pass.

Quantity / reference fromxfeaReferenceDeviationTolerance
First critical load [N]
Euler, pinned-pinned: pi^2 E I / L^2
8737.98743.90.07 %2 %

examples/scripts/04_reference_cases/euler_buckling.py. Run it from the repository with uv run python examples/scripts/04_reference_cases/euler_buckling.py, or, with xfea-examples installed, xfea-examples run 04_reference_cases/euler_buckling.py.

import math
from xfea.model import GeneralBC
from xfea.model.fields import MechanicalBCField
from xfea.problem import BucklingAnalysis
from xfea.problem import Problem
from xfea.problem import StaticStep
from xfea_examples import out_dir
from xfea_examples.models import cantilever_beam_model
from xfea_examples.verify import check
beam_width = 15 # [mm] square cross-section width
beam_height = 15 # [mm] square cross-section height
mesh_target = 50 # [mm] target element size
reference_load = -1_000 # [N] axial compressive preload
model, part, tip_nodes, material, section, length = cantilever_beam_model(
name="reference_euler_buckling",
width=beam_width,
height=beam_height,
target=mesh_target,
fix_start=False,
)
start_nodes = part.nodes.subgroup(lambda node: abs(node.x - 0.0) <= 1e-6)
end_nodes = tip_nodes
hinge = GeneralBC(x=False, y=True, z=True, xx=True, yy=False, zz=False)
model.add_pin_bc(nodes=start_nodes)
model.add_bcs(MechanicalBCField(distribution=end_nodes, condition=hinge))
problem = model.add_problem(Problem(name="buckling_reference_problem"))
preload = problem.add_step(StaticStep(name="preload"))
preload.add_uniform_forcefield(nodes=end_nodes, x=reference_load, load_case="service")
buckling = BucklingAnalysis(modes=3, algorithm="SUBSPACE")
problem.add_step(buckling)
problem.analyse_and_extract(path=out_dir(model.name), verbose=True)
critical_load = (math.pi**2) * material.E * section.Iyy / (length**2)
print("Euler buckling")
print(f"- Reference critical load: {critical_load}")
print(f"- First buckling factor: {buckling.mode_factor(1)}")
check("First critical load [N]", buckling.mode_factor(1) * abs(reference_load), critical_load, tol_pct=2.0, unit="N",
source="Euler, pinned-pinned: pi^2 E I / L^2")

© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them