Why does KoFEM solve the weak form instead of pointwise equilibrium?
Linear elasticity
links displacement, strain and stress. Two ingredients remain: force
balance, and the conditions on the body’s surface. Together they form a
boundary-value problem. This page states it, then rewrites it as the
weak form that the finite element method discretises. The same static,
small-strain, isotropic assumptions apply. Units are N, mm and MPa.
Equilibrium inside the body
Take any piece of the body, with boundary and outward normal
. In a static state, the
tractions on its surface and the
body force (N/mm³) inside it must add to zero:
The divergence theorem
turns the surface integral into . Because the balance holds for
every piece, however small, the integrand itself must vanish wherever
the stress is smooth:
Each of the three equations has units MPa/mm = N/mm³. The
stress divergence
takes the divergence of each row of . Balance of moments adds the
symmetry already used on the previous page.
Boundary conditions and signs
Equilibrium alone has infinitely many solutions; the surface fixes
which one applies. At every boundary point and in each direction, exactly
one of two quantities is prescribed. The
boundary splits accordingly:
Displacement (Dirichlet, essential) on : a fixed support is
; a prescribed displacement is a nonzero in mm.
Traction (Neumann, natural) on : in MPa.
A free surface is ; it is the default wherever nothing is applied.
Mixed by component: a frictionless roller on a face with normal
prescribes and zero traction in and .
The sign follows the outward normal. A positive on a face whose outward
normal is pulls the body outward. A
pressure is positive when it
pushes into the surface, so . A total
face force becomes the uniform traction over the
face area ;Loads and constraints
works through that conversion.
A body Ω with a prescribed displacement on ΓD, a traction t on ΓN, a body force b and the outward normal n. Every boundary point belongs to ΓD or ΓN for each displacement component.
The complete boundary-value problem
Collecting the pieces gives the strong form: find a
displacement such that
where is the
isotropic law applied to the strain of . Substituting it shows the
cost: equilibrium contains second derivatives of displacement.
The uniform bar of the previous page satisfies every line. Its stress is
constant, so . On the loaded end
and MPa, the applied . The sides have
, so they are traction-free. Only a fully clamped end breaks
this: it forbids the lateral contraction the uniform solution needs,
so near that end the true 3D field is not uniform.
Why not solve equilibrium pointwise?
The finite element method approximates with
shape functions
that are continuous across elements but whose slopes jump at shared
faces. Such a field has no second derivative there, so the strong form
cannot even be evaluated. Real models have the same difficulty:
where two bodies with different materials meet, strain, and hence
some stress components, jump; only the traction across the interface is continuous;
at re-entrant corners and under concentrated loads, stress is unbounded; and
traction boundary conditions would have to be imposed as separate
equations on derivatives at surface points.
The weak form avoids all three. It needs only first derivatives, it
handles material interfaces without extra conditions, and traction
conditions enter automatically as work terms. When the solution is
smooth, it is equivalent to the strong form.
Derive the weak form
Choose a test displacement (mm):
any sufficiently regular field that is zero on . Think of it as a
virtual displacement compatible with the supports. Take the
dot product of equilibrium with and
integrate over the body:
Now apply the boundary conditions. On the test displacement is zero,
so that part of the boundary integral drops out. On replace
by the prescribed . Because is symmetric,
. The result is the
principle of virtual work:
Every term is work, in N·mm. The traction condition no longer appears as
a separate equation; it is satisfied naturally by any solution, hence the name.
The displacement condition is not in the equation at all; it is
essential and must be built into the space of trial
displacements. A zero test field on does not make zero.
Bilinear and linear forms
Writing the two sides as separate functions gives the standard
abstract statement. Define the trial set and the test space
both restricted to fields with finite strain energy (first derivatives
that are square-integrable). Then find with
The bilinear form is the isotropic law inserted into internal
virtual work, using . It is linear in each argument and symmetric:
. The linear form collects the loads.
Replacing and by shape-function expansions turns
into the stiffness matrix
and into the load vector .
A concentrated force applied at a node adds
at that node. It is admissible only after discretisation: in the continuous
problem a point force produces infinite displacement beneath it.
Uniqueness and minimum potential energy
Setting shows , twice the
strain energy.
It is zero only for rigid-body motions: three translations and three rotations.
If the displacement conditions exclude those motions, for
every nonzero admissible . Korn’s inequality turns this into
a lower bound, and the weak form then has exactly one solution. Without
enough supports, the discrete matrix is singular;
Rigid-body modes
shows what happens.
Because is symmetric and positive, the weak form is also the
condition for the minimum of the total potential energy
Of all displacements that satisfy the supports, the elastic solution has
the least stored energy minus load work. This explains why the discrete
stiffness matrix is symmetric positive definite and why the
conjugate gradient method applies.
Worked check: a two-material bar
A one-dimensional bar shows the weak form at work, including a
material interface. It is 1000 mm long with section mm²:
steel ( MPa) for mm, aluminium
( MPa) for mm. The left end is fixed,
; the right end carries N. There is no body force.
In one dimension the weak form reads:
Try a displacement with constant force in each segment, so
or . Then the left side is
. The equation holds for every
admissible exactly when . The weak form imposed the end load
without any separate boundary equation. It also needed no interface
condition. The displacement is continuous but has a kink at 500 mm,
where the strong form has no classical second derivative.
Two-material bar, N, mm²
Segment
Stress
Strain
Extension over 500 mm
Steel
100 MPa
0.2381 mm
Aluminium
100 MPa
0.7143 mm
The stress is continuous; the strain jumps by a factor of three. The tip
displacement is mm. Units check:
is N, is 1, is mm, so both sides are N·mm. Order-1
elements whose nodes include mm reproduce this solution exactly,
because it is piecewise linear. In 3D, a free lateral surface would also contract
differently in each material near the interface, which this 1D model ignores.
KoFEM implementation
KoFEM’s Rust finite-element module builds and directly.
Bilinear form. The element stiffness implements
exactly above, ported from MFEM’s elasticity integrator
(element.rs;
MFEM ElasticityIntegrator).
It uses piecewise-constant and , one pair per body
(assembly.rs). The mixed
solid–shell solve uses the same solid stiffness.
Linear form. Face forces become uniform tractions ,
tractions are applied directly, and pressures as ;
they are integrated against the test functions on the selected faces
(surface.rs). Nodal forces are added to
the load vector (amg.ts).
There is no body-force term: , so self-weight is not modelled.
Essential conditions. Fixed and prescribed translation
components are collected
(amg.ts), and the constrained
equations are replaced by the prescribed values
(constraints.rs). This is how
and are enforced.
The shell path solves a different weak form with rotations; see
Shell formulation. The
axial bar example runs this complete
solid path in the browser.
Decision: a displacement formulation
Choice: KoFEM solves the weak form for displacement only
(a primal, or irreducible, Galerkin formulation), with continuous
shape functions for and the isotropic law above.
Alternatives: collocation or finite differences on the strong
form; mixed displacement–pressure formulations; stress-based or
hybrid elements; B-bar and reduced-integration variants; nonlinear
formulations for large deformation or plasticity.
Why it fits: it needs only first derivatives and two material
constants, imposes tractions and material interfaces naturally, and
yields a symmetric positive definite system suited to a conjugate
gradient solve in the browser. It is the standard, well-tested
formulation of FEM libraries such as MFEM, from which KoFEM’s element
integrals are ported.
Tradeoffs: stress comes from derivatives of the solution and is
less accurate than displacement; it is discontinuous between
elements. Linear tetrahedra can lock in bending and with near ½.
Revisit when: nearly incompressible materials, large
deformation, plasticity or contact become supported features, or when
stress accuracy in thin sections needs a different element.
It is the standard formulation for linear-elastic solid FEM and has no
separate decision record.
Limitations and practical consequences
The weak form is only as good as the model: it inherits every
linear-elastic limit.
Point forces and point supports are acceptable only as discrete
loads. Refining the mesh near them makes local stress grow without bound;
spread a load over a realistic area.
A fixed support on a whole face also blocks lateral contraction. It
adds stiffness and local stress that a real joint may not have.
Supports that leave a rigid-body motion free make the problem
unsolvable. Supports that block more than needed change the answer.
Gravity and other body forces are not available in the current solver.
Sources and further reading
Hughes, The Finite Element Method: Linear Static and Dynamic
Finite Element Analysis (2000), the strong and weak forms of
elastostatics and their equivalence.
Bathe, Finite Element Procedures (1996), the principle of
virtual displacements.
Brenner and Scott, The Mathematical Theory of Finite Element
Methods (3rd ed., 2008), Korn’s inequality and well-posedness of
linear elasticity.
Zienkiewicz, Taylor and Zhu, The Finite Element Method: Its Basis
and Fundamentals (7th ed., 2013), minimum potential energy and
mixed formulations for incompressibility.