Mixed-boundary linear elasticity
Model a two-dimensional linear-elastic square with a fixed left edge and traction-free remaining edges, then compare its original and deformed mesh.
Before you begin
Section titled “Before you begin”Follow Get started and keep its eqiora-source checkout and
.venv. From the folder containing both, add plotting support and save the
computed displacement:
uv add 'eqiora[matplotlib]'uv run python eqiora-source/examples/python/mixed_boundary_elasticity.py --displacement-png displacement.pngStage 1 Problem and boundaries
Create a rectangle. The left edge has zero displacement; the right, lower, and upper edges have zero traction. A Cartesian mesh covers the domain.
graph = eqiora.geometry.GeometryGraph()rectangle = graph.rectangle(x_bounds=(0.0, 1.0), y_bounds=(0.0, 1.0))geometry = graph.build( rectangle, named_topology={ "body": rectangle.region, "x_lower": rectangle.boundaries[0], "x_upper": rectangle.boundaries[1], "y_lower": rectangle.boundaries[2], "y_upper": rectangle.boundaries[3], },)Stage 2 Eqiora model definition
The .eqi component defines displacement, material parameters, load potential,
equilibrium, the body support and its four boundary supports. With displacement
, shear modulus , Lamé coefficient , and length
, its stress and load are
The balance relation is
Stage 3 Choose numerical settings
Compile the model, then select Q1 elements and linear-solve settings.
model = eqiora.compile( path=files(eqiora).joinpath("examples", "mixed-boundary-elasticity.eqi"), geometry=geometry, entry="MixedBoundaryElasticity2d", bindings={ "body": geometry.selection("body"), **{ side: (geometry.selection(side), geometry.selection("body")) for side in ("x_lower", "x_upper", "y_lower", "y_upper") }, "mu": 3.0, "lambda": 0.0, "length_scale": 1.0, },)plan = eqiora.resolve( model, mesh=mesh, spatial=eqiora.fem.Q1(), solve=eqiora.solve.Linear(...),)Stage 4 Run and inspect displacement
The example function runs the plan and returns it with the result:
return plan, eqiora.run(plan)Select the displacement field:
displacement = result.output(plan.fields[0])The plotting code calls the same function, so it does not repeat the geometry, physics, mesh, or solver settings.
Stage 5 Displacement presentation

The dashed mesh is the undeformed geometry; the orange mesh shows it displaced at scale 1. Changing the plot scale does not change the computed displacement.
Stage 6 Reading the deformation
Compare the fixed left edge with the displacement toward the loaded interior. The equations use small-strain linear elasticity; a visually large deformation does not make this a large-deformation material model.
Next steps
Section titled “Next steps”Derive strain, stress, and equilibrium in the structural mechanics lessons, then follow the same model in the Python guide.