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: its parts, supports (red) and loads (blue).
![The result: the deformed shape coloured by displacement (magnitude [mm])](/examples/core-concepts/steps/nonlinear-analysis-results.webp)
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
The script
Section titled “The script”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 MeshingSettingsfrom xfea.model import BeamElementfrom xfea.model import ElasticPlasticfrom xfea.model import Modelfrom xfea.model import Partfrom xfea.model import RectangularSectionfrom xfea.problem import Problemfrom xfea.problem import StaticStepfrom xfea.results import DisplacementFieldResultsfrom xfea.results import ReactionFieldResultsfrom xfea_examples import out_dir
# Geometrylength = 2000 # [mm] beam lengthwidth = 100 # [mm] cross-section widthheight = 200 # [mm] cross-section heighttarget = 200 # [mm] target element length
# Material — S355 bilinear steel with plastic plateau (SI-mm)E = 210_000 # [MPa] Young's modulusv = 0.3 # [-] Poisson's ratiodensity = 7.85e-9 # [t/mm^3] mass densityfy = 355 # [MPa] yield stressfu = 450 # [MPa] ultimate stress (hardening branch fu > fy)eps_u = 0.02 # [-] ultimate straineps_y = fy / E # [-] yield strainstrain_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 meshmodel = 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 limittip_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])
# Analysisproblem.analyse_and_extract(path=out_dir(model.name), verbose=True)
# Results — compare with elastic referencedelta_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³/12delta_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_elasticif 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