Skip to content

Linear elasticity

LINEAR_ELASTICITY solves the small displacements, stresses and strains of a linear elastic solid, in 3D under a solid frame and on a planar section, in plane stress or plane strain, under a Cartesian 2D frame. See Conditions and physics for how conditions attach and where they land.

Frame Solves as Solver stack
Solid LINEAR_ELASTICITY StressSolver, ResultOutputSolver
Axisymmetric no form
Cartesian2D LINEAR_ELASTICITY StressSolver, ResultOutputSolver

LINEAR_ELASTICITY reads Youngs Modulus and Poisson Ratio from every body, so leave air bodies out of an elasticity model. The run writes the displacement, the stress and strain components, the von Mises stress and the principal stresses; Run.strain_energy() integrates the strain energy femforge derives from the stress and strain. See Results.

Clamp one end and load the other

Tag the two end faces of a beam as named faces, clamp one and load the other:

import build123d as b3d

import femforge as ff

box = b3d.Box(100, 10, 10)
beam = ff.TaggedPart([box], tags={ff.TagKey.MATERIAL: "Steel316"}, name="Beam")
x_faces = box.faces().filter_by(b3d.Axis.X).sort_by(b3d.Axis.X)
model = ff.TaggedCompound(children=[beam, ff.TaggedFace(x_faces[0], name="Root"), ff.TaggedFace(x_faces[-1], name="Tip")])

clamp = ff.EntityTag(selector={ff.TagKey.NAME: "Root"}, conditions=[ff.FixedDisplacement()])
load = ff.EntityTag(selector={ff.TagKey.NAME: "Tip"}, conditions=[ff.SurfaceForce(force=ff.quantity(ff.Vec3(0, 0, -100), "N"))])

domain = ff.DomainConfig(materials=[ff.materials.Steel_316()], tags=[clamp, load])
physics = ff.PhysicsSelection(selected=ff.Physics.LINEAR_ELASTICITY)

Boundary conditions

Condition Target Sets Frames
FixedDisplacement boundary x [m], y [m], z [m] Solid, Cartesian2D
SurfaceForce boundary force [N] Solid, Cartesian2D

FixedDisplacement

Physics LINEAR_ELASTICITY · Target boundary · Section Boundary Condition · Kind fixed_displacement · API FixedDisplacement

A prescribed displacement on a boundary, clamped to zero in every direction by default.

Field Symbol Unit Meaning Sif keyword Default
x u_x m Prescribed x displacement; None leaves x free. Displacement 1 0.0 m
y u_y m Prescribed y displacement; None leaves y free. Displacement 2 0.0 m
z u_z m Prescribed z displacement; None leaves z free. Displacement 3 0.0 m

Writes: The Displacement i keywords of the components the frame of site solves; a zero component along a 2D normal is dropped.

Set a component to None to leave it free, as in FixedDisplacement(z=None) for a roller. A frame rejects a nonzero component along a direction it has no solve coordinate for, and a Cartesian 2D frame drops a zero one along its normal.

SurfaceForce

Physics LINEAR_ELASTICITY · Target boundary · Section Boundary Condition · Kind surface_force · API SurfaceForce

A total force spread uniformly over a named face as a traction.

Field Symbol Unit Meaning Sif keyword Default
force F⃗ N Total force spread uniformly over the face, in the authored frame. required

Writes: The Force i traction components, the solve-frame force share over the measured area of site.

The traction is the force over the face's measured area, so SurfaceForce needs a named face; on a body's tag it raises.