Skip to content

Materially non-linear static analysis

Models a cantilever beam with a bilinear ElasticPlastic (S355 steel) material and runs a non-linear static analysis with automatic incrementation.

The applied tip load (200 kN) exceeds the elastic yield limit of the cross section, so the FEA deflection is larger than the elastic Euler–Bernoulli reference. This illustrates how material plasticity affects structural response.

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

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

The result: the deformed shape coloured by displacement (magnitude [mm])

The deformed shape, coloured by displacement (magnitude [mm]), in xfea’s 3D viewer.

Open in 3D turn it, cut it, pick any field: in xfea's viewer, in your browser

examples/scripts/02_core_concepts/steps/nonlinear_analysis.py. Run it from the repository with uv run python examples/scripts/02_core_concepts/steps/nonlinear_analysis.py, or, with xfea-examples installed, xfea-examples run 02_core_concepts/steps/nonlinear_analysis.py.

from xfea.geometry import Line
from xfea.meshing import MeshingSettings
from xfea.model import BeamElement
from xfea.model import ElasticPlastic
from xfea.model import Model
from xfea.model import Part
from xfea.model import RectangularSection
from xfea.problem import Problem
from xfea.problem import StaticStep
from xfea.results import DisplacementFieldResults
from xfea.results import ReactionFieldResults
from xfea_examples import out_dir
# Geometry
length = 2000 # [mm] beam length
width = 100 # [mm] cross-section width
height = 200 # [mm] cross-section height
target = 200 # [mm] target element length
# Material — S355 bilinear steel with plastic plateau (SI-mm)
E = 210_000 # [MPa] Young's modulus
v = 0.3 # [-] Poisson's ratio
density = 7.85e-9 # [t/mm^3] mass density
fy = 355 # [MPa] yield stress
fu = 450 # [MPa] ultimate stress (hardening branch fu > fy)
eps_u = 0.02 # [-] ultimate strain
eps_y = fy / E # [-] yield strain
strain_stress = [(0.0, 0.0), (eps_y, fy), (eps_u, fu)]
material = ElasticPlastic(
E=E,
v=v,
density=density,
strain_stress=strain_stress,
name="SteelS355Plastic",
)
section = RectangularSection(w=width, h=height, material=material)
# Model and mesh
model = Model(name="nonlinear_cantilever")
with model:
part = model.add_part(Part(name="cantilever"))
p_start = (0.0, 0.0, 0.0)
p_end = (length, 0.0, 0.0)
part.base_geometry = Line(p_start, p_end)
part.mesh(
settings=MeshingSettings(max=target),
section=section,
element_cls=BeamElement,
orientation=[0, 1, 0],
)
fixed_nodes = part.find_closest_nodes_to_point(p_start, 1)
tip_nodes = part.find_closest_nodes_to_point(p_end, 1)
model.add_fix_bc(nodes=fixed_nodes)
# Problem — load beyond the elastic yield limit
tip_load = -200_000 # [N] downward tip force (-200 kN); triggers plasticity
problem = model.add_problem(Problem(name="nonlinear_cantilever"))
step = problem.add_step(
StaticStep(
name="loading",
max_increments=50,
initial_inc_size=0.1,
min_inc_size=1e-4,
nlgeom=False,
)
)
step.add_uniform_forcefield(nodes=tip_nodes, z=tip_load, load_case="LL")
disp = DisplacementFieldResults()
react = ReactionFieldResults()
step.add_field_outputs([disp, react])
# Analysis
problem.analyse_and_extract(path=out_dir(model.name), verbose=True)
# Results — compare with elastic reference
delta_fea = disp.get_min_result("z").z
# Euler–Bernoulli elastic formula (valid only below yield)
# z-bending with orientation [0,1,0] is about the strong axis: Ixx = w·h³/12
delta_elastic = (tip_load * length**3) / (3.0 * material.E * section.Ixx)
print("Materially non-linear cantilever beam (S355 steel, bilinear)")
print(f" Tip load: {tip_load}")
print(f" FEA deflection: {delta_fea}")
print(f" Elastic reference: {delta_elastic}")
# Shear deformation alone makes the beam ~0.5 % softer than Euler–Bernoulli;
# anything well beyond that is plasticity.
ratio = delta_fea / delta_elastic
if ratio > 1.05:
print(f" → FEA is {ratio:.2f}× the elastic reference: the section has yielded.")
else:
print(f" → FEA is {ratio:.3f}× the elastic reference: the response stayed elastic,")
print(" although the load exceeds the plastic moment. Check that the backend")
print(" received the plastic material data.")

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