🌡️Boundary Value Problems and Partial Differential Equations
The Finite Element Method in One Dimension
Energy and the Ritz method, the weak form and Galerkin, hat functions, element matrices and assembly, bars, beams and mass matrices
Göttingen, 1909
In 1787 Ernst Chladni, a musician and physicist from Wittenberg, scattered sand on a thin metal plate and stroked its edge with a violin bow. The plate sang, and the sand jumped away from the parts that vibrated and gathered along the lines that stayed still — a different pattern for every note. Chladni drew dozens of these figures and demonstrated them across Europe, in Paris in 1808.
Explaining them took a century. Sophie Germain worked on the theory of vibrating plates for years after Chladni's visit to Paris. In 1850 Gustav Kirchhoff wrote down the correct equation — fourth order, with complicated conditions along a free edge — and could solve it only for a circular plate. For the square plates in Chladni's drawings, nobody could.
Walther Ritz, a Swiss physicist, had been fighting tuberculosis since 1900. Back in Göttingen in 1908 after years of cures, he published a way around the equation. Do not try to satisfy the differential equation at every point. The vibrating plate takes the shape that makes its energy stationary; so write the shape as a combination of a few well-chosen functions, express the energy in terms of their coefficients, and minimise that — a problem in a handful of unknowns. With it, in 1909, he computed the Chladni figures of the free square plate and the pitches of their notes, and compared them with Chladni's measurements. The agreement was remarkable.
Ritz died in Göttingen on 7 July 1909, aged 31. Göttingen, absorbed in existence proofs, hardly noticed his method. Engineers did: in 1915 Boris Galerkin in Petrograd recast it for rods and plates, and in 1941 Richard Courant proposed building the functions out of small local pieces. Ritz's idea with Courant's pieces is, almost exactly, the finite element method.
Take the simplest structure there is: an elastic bar along , axial stiffness , fixed at , loaded by per unit length. There are two ways to say what its displacement is.
- Equilibrium, point by point: everywhere in the bar, with and no force at the free end, .
- Energy, all at once: among all displacements with , the true one makes the total potential energy smallest,
the strain energy stored minus the work done by the loads. You have met this principle twice already: solving as minimising (lesson 4-3), and the draughtsman's spline settling into its least-energy shape (lesson 7-3).
Derivation
Minimising the energy gives the differential equation
Let be the minimiser and try a nearby displacement , where is any function with (it must respect the support). Expand:
For to be the minimum, the term linear in must vanish — otherwise a small of the right sign would lower the energy. So for every admissible :
Integrate the left side by parts:
using . Then becomes
Choosing concentrated anywhere inside the bar forces the bracket to vanish: , the equilibrium equation. Choosing then forces : the free end carries no force. The energy principle contains the equation and the free-end condition — nobody had to impose the second one. The term, half the strain energy of , is positive, which confirms a minimum.
💡The weak form and the Ritz–Galerkin method
Equation is the weak form: 'for every virtual displacement , internal virtual work equals external virtual work' — the principle of virtual work. It contains only first derivatives, while the differential equation needs second ones, so it accepts functions with kinks.
Ritz: choose a few functions (each with ), look for , and minimise over the coefficients . Galerkin: require only for . For problems with an energy the two give the same equations; Galerkin's version also works when there is no energy to minimise (convection, for example). Either way the result is a linear system
Derivation
From the energy to
Put into the energy. The derivative is , so , and
This is exactly the quadratic energy of lesson 4-3. is symmetric (swap and ) and positive definite (it is twice the strain energy of a nonzero displacement), so the minimum is where the gradient vanishes: . A differential equation has become a symmetric positive definite linear system — the kind Units 3 and 4 solve best.
💡Courant's idea: hat functions and elements
Ritz used global functions — polynomials or sines spread over the whole plate — so every was nonzero and each new problem needed new functions. Courant's choice makes the method automatic. Divide the bar into elements and give each node a hat function: 1 at its own node, 0 at every other node, straight in between. Then
- the coefficient is simply the displacement at node ;
- a hat overlaps only its neighbours, so unless and share an element: is sparse (here tridiagonal);
- every integral splits into a sum over elements, each computed once from the same small recipe.
Derivation
The bar element's stiffness and load
On one element, and (each changes by 1 over the length ). The element's share of is then a constant times the length:
That is a spring of stiffness between the two nodes — which is what a short bar is. A uniform load per metre gives
half of the element's load to each end. Assembly adds each into the rows and columns of its two nodes, and each into their entries — the COO accumulation of lesson 3-4. A node shared by two elements receives two contributions, so the global matrix has on its interior diagonal and beside it: the tridiagonal matrix of lesson 3-3 again, now derived from energy rather than from difference quotients.
📐What converges — and what does not
A 30 m steel bar hanging under its own weight. The exact solution is , with stress , largest at the support. One linear element already gives the exact tip displacement, 18.000 mm — in one dimension, linear elements with consistent loads are exact at the nodes for problems like this one. But stress is the derivative of displacement, constant within each element: the top element's stress is 120, 180, 210, 225 MPa with 1, 2, 4, 8 elements, against the exact 240 MPa at the support.
A cantilever under uniform load with beam elements (below): the tip deflection is exact with one element (100.000 mm), but the root moment is 33.3, 38.3, 39.6 kN m for 1, 2, 4 elements against the exact 40.0. Displacements converge first; stresses and moments — the quantities that decide failure — converge more slowly.
💡Beam elements
A beam stores bending energy , which contains second derivatives. A kinked deflection would have an infinite curvature at the kink, so the slope must be continuous between elements as well as the deflection. Each node therefore carries two unknowns, deflection and rotation , and each element uses the four cubic Hermite shape functions that match them:
The element stiffness and the load for a uniform come out as
Derivation
One entry of the beam stiffness, worked out
Check the Hermite functions first: at , and the others vanish; at , and the others vanish; and at , at , with all other slopes zero at the ends. So takes the right values and slopes at both nodes.
For the corner entry, differentiate twice with respect to (each brings a factor ):
The other fifteen entries follow the same way. The load vector is ; for example . These are the matrices supplied in lesson 6-4's footbridge lab and used in this lesson's cantilever.
Derivation
Mass matrices, and why consistent mass overestimates frequencies
Consistent mass. Kinetic energy is . Interpolating the velocity with the same shape functions gives a mass matrix exactly as the strain energy gave : . For the bar element, and , so
The beam element's consistent mass, by the same integrals with the Hermite functions, is times a matrix with and on its diagonal — the one in lesson 6-4. The lumped alternative simply puts half of each element's mass at each node, : diagonal and cheap.
An upper bound. The lowest natural frequency squared is the smallest value of the Rayleigh quotient, strain energy over kinetic energy (lessons 6-1 and 6-2), over all possible shapes. The finite element model with consistent mass searches over a smaller set — only the shapes its elements can represent — so the minimum it finds can only be higher. Every computed frequency is above the true one, and refining the mesh brings it down. Lumped mass is not a Ritz approximation and usually errs below; the lab finds the first mode of a steel bar 0.64% high with consistent mass and 0.64% low with lumped mass on four elements.
When a change occurs in Nature, the quantity of action necessary for that change is as small as possible.
🕰From Galerkin to Boeing
Boris Galerkin, a structural engineer, published the version without energy — require the weak form for each basis function — in 1915, in a paper on rods and plates in the Vestnik Inzhenerov in Petrograd; in Russian texts it is often called the Bubnov–Galerkin method, after Ivan Bubnov's closely related work of 1913. Richard Courant, addressing the American Mathematical Society on 3 May 1941, proposed functions that are linear on each triangle of a mesh, and showed a torsion calculation with them — the first finite element computation that historians have found (lesson 10-6). Fifteen years later Turner, Clough, Martin and Topp at Boeing reached the same method from the engineering side (lesson 3-4), and in 1960 Clough named it.
⚠Finite element models are too stiff, never too flexible
Because the method minimises energy over a restricted set of shapes, a displacement-based finite element model can only be stiffer than the real structure: under a given load its displacements are, overall, too small and its natural frequencies too high. Coarse meshes therefore err on the unsafe side for deflection limits and resonance checks. (Stresses can be wrong in either direction locally — the hanging bar's top element is 25% low with two elements.)
💡Where you will use this
Structures: frame and truss programs are exactly these bar and beam elements, assembled in two and three dimensions. Rocket Propulsion and Aircraft Engines: rotor and shaft models for critical speeds, with consistent mass matrices. Spacecraft structures and Attitude Control: beam models of booms and solar arrays, reduced to a few modes for the controller. Geotechnics: piles and retaining walls as beams on springs.
📚Further reading
- Martin Gander and Gerhard Wanner, 'From Euler, Ritz, and Galerkin to modern computing', SIAM Review 54(4), 627–666 (2012) — the full story of the cold open, with Ritz's own Chladni figures.
- Gilbert Strang and George Fix, An Analysis of the Finite Element Method (Prentice-Hall, 1973; 2nd ed., Wellesley–Cambridge, 2008) — the Ritz–Galerkin view of finite elements, from one dimension up.
- Thomas J. R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element Analysis (Prentice-Hall, 1987; Dover reprint 2000), chapter 1 — the one-dimensional model problem, weak form and element matrices.
↓But there is a problem
In one dimension every element is a line segment and every mesh is a row of them. The method's real power — and its real danger — appears in two and three dimensions, where elements are triangles and bricks fitted to curved walls, holes and fillets by a mesh generator, and the analyst must judge whether the mesh is fine enough where it matters.
On 23 August 1991 the concrete base of the Sleipner A gas platform, a structure of twenty-four linked cells taller than a twenty-storey building, was being lowered in a controlled test in a Norwegian fjord. A wall cracked, water poured in, and the whole base sank to the floor of the fjord in minutes. The cause was traced to its computer model: a finite element analysis that had underestimated the stresses in the walls by 47%.