🌡️Boundary Value Problems and Partial Differential Equations
The Finite Element Method in Two Dimensions
The weak form in the plane, linear triangles, assembly, Prandtl torsion, the patch test, corner singularities and mesh convergence
Gandsfjord, 23 August 1991
Sleipner A is to be a gas platform in the North Sea. Its gravity base — a cluster of twenty-four concrete cells, each about 24 m across, standing on the sea bed — is built in a dry dock and then floated to a fjord near Stavanger, where it is ballasted down step by step in a controlled test, to check its strength before the deck is installed.
Partway through the test a loud noise is heard. A wall of one of the 'tricells' — the triangular spaces where three cylinders meet — has failed. Water floods in faster than the pumps can remove it. Within minutes the base sinks to the bottom of the fjord, 220 m down, and hits the sea floor with the force of a small earthquake. Nobody is hurt. The economic loss is estimated at around 700 million dollars.
The investigation by SINTEF traced the failure to the design calculations. A finite element analysis of the cells, using elements that were too coarse and too distorted for the steep stress gradients in the tricell walls, had underestimated the shear stresses by 47%. The walls were designed too thin.
The replacement platform was designed with a refined analysis and installed in 1993. Sleipner became the standard case study on the most important habit in computational engineering: check that your mesh has converged.
Lesson 10-5 built the method on a line. In the plane the recipe is identical — energy or weak form, shape functions on elements, element matrices, assembly — and only the geometry changes. The model problem is Poisson's equation, which covers steady heat conduction, seepage (lesson 10-4) and the torsion of shafts:
Its energy is , and the region is now covered by a mesh of triangles that can follow any outline: a curved wall, a hole, a fillet.
Derivation
The weak form in two dimensions
Multiply by a test function that vanishes on the boundary and integrate over . The two-dimensional version of integration by parts is Green's identity (the divergence theorem applied to ):
The boundary integral vanishes because there, leaving the weak form
exactly the bar's with the derivative replaced by the gradient. Writing and taking gives with . Again only first derivatives appear, so functions that are merely continuous — planes glued along edges — are allowed.
💡The linear triangle
Courant's 1941 choice: on each triangle, is a plane, , fixed by its values at the three corners. Its shape functions are the planes that equal 1 at one corner and 0 at the other two, so
- the gradient of is constant on each triangle — flux, stress or shear is one value per element, the 2-D version of the bar's constant stress;
- neighbouring planes agree along their shared edge (a straight line is fixed by its two end values), so is continuous across the mesh;
- the element stiffness is , where is the triangle's area and is the matrix whose columns are the three constant gradients.
Derivation
The triangle's gradients and stiffness
The gradients. Write each shape function as . The conditions '1 at corner , 0 at the others' for all three functions at once say that the matrix
times the coefficient matrix is the identity. So the coefficients are , and its last two rows are the gradients — the matrix . (The lab computes it exactly this way. , so a nearly flat triangle makes nearly singular and the gradients huge: distorted elements are badly conditioned.)
The stiffness. The integrand is constant over the triangle, so the integral is that constant times the area: , or .
Two built-in checks. The three shape functions add up to 1 everywhere, so their gradients add up to zero: every row of sums to zero — a constant temperature stores no energy and drives no flux. And because a linear field has constant gradient, a mesh of linear triangles can represent any linear field exactly. That is the patch test: impose a linear field on the boundary of any mesh, however distorted, and a correct element must reproduce it everywhere to rounding error.
💡Torsion of a shaft: Prandtl's stress function
In 1903 Ludwig Prandtl showed that twisting a prismatic shaft of any cross-section reduces to a Poisson problem for a stress function over the section:
with the shear modulus and the twist per unit length. The two shear stresses are the derivatives of (their size is ), and the torque the shaft carries is , which defines the torsion constant through . Prandtl's membrane analogy makes it visible: has the shape of a soap film stretched over a hole of the section's outline and inflated by a uniform pressure — the steepest slopes of the film are where the shear stress is highest. For a square of side the exact values (from series) are and a peak shear of at the middle of each side.
📐Sleipner's lesson in miniature
Torsion of a square shaft, solved with linear triangles for Prandtl's stress function. The torsion constant — a global, energy-like quantity — is within 5% on a mesh and within 0.1% on . The peak shear stress at the middle of each side — the local quantity a designer checks — is underestimated by 28% on a mesh, 18% on , 9% on , 4.6% on and still 2.3% on . Every coarse answer looked plausible. Only the sequence of refinements shows how far from the truth each one was.
A map is not the territory it represents, but, if correct, it has a similar structure to the territory, which accounts for its usefulness.
💡How fast does it converge — and where does it not?
For a smooth solution and linear triangles of size , the error in falls like , but the error in its gradient — the stress, the flux, the shear — only like : halving the elements halves the stress error and quarters the displacement error, the same pattern as the bar. Energy-type quantities such as the torsion constant converge like , because errors in the gradient enter the energy squared.
Corners spoil this. At a re-entrant corner — one that points into the material, such as the inside corner of an L-shaped plate or the root of an unfilleted bracket — the exact solution behaves like in the distance from the corner, so its gradient behaves like and is infinite at the corner itself. The computed peak stress there never converges: each halving of raises it by about . And the singularity slows convergence everywhere else as well. Real designs round such corners with fillets; analysts refine the mesh locally around them, or report stresses at a distance from the corner rather than at it.
🕰Courant's 1941 address
On 3 May 1941 Richard Courant gave an address to the American Mathematical Society on variational methods, published in 1943. To show what Ritz's method could do with simple local functions, he computed the torsion of a square shaft with a square hole using functions that were linear on each triangle of a mesh, on four successively finer meshes: the torsional stiffness came out 0.344, 0.352, 0.353, 0.353. It is the earliest finite element computation that historians of the method have found — done by hand, fifteen years before engineers at Boeing rediscovered the idea with computers.
⚠Checking a finite element model
Before believing any FE result: (1) check reactions sum to the applied loads; (2) compare with a hand calculation or a simpler model; (3) run the patch test on a new element or code; (4) refine the mesh, especially at corners, holes and load points, until the quantity of interest converges — stresses at re-entrant corners may never converge, because the exact stress is infinite there; (5) check element shapes — badly distorted elements degrade accuracy, as at Sleipner; (6) check units. Most famous FE failures were not software bugs but unchecked models.
💡Where you will use this
Structures and Mechanical design: every modern stress analysis, from brackets to bridges, is finite elements — triangles and quadrilaterals in 2-D, tetrahedra and bricks in 3-D, with element integrals evaluated at the Gauss points of lesson 8-4. Geotechnical Engineering: foundations, tunnels, slopes and dams with nonlinear soil models. Aircraft and Spacecraft structures: stress, buckling and modal analysis (Unit 6) of airframes and launch vehicles. Heat transfer, electromagnetics, CFD: the same machinery with different weak forms.
📚Further reading
- Gilbert Strang and George Fix, An Analysis of the Finite Element Method (2nd ed., Wellesley–Cambridge, 2008) — convergence rates, the patch test and singularities, with proofs.
- Thomas J. R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element Analysis (Dover, 2000), chapters 2–3 — two-dimensional elements, isoparametric mapping and Gauss quadrature.
- Richard Courant, 'Variational methods for the solution of problems of equilibrium and vibrations', Bulletin of the American Mathematical Society 49, 1–23 (1943) — the address with the first triangle computation.
- Bernt Jakobsen and Finn Rosendahl, 'The Sleipner platform accident', Structural Engineering International 4(3), 190–193 (1994).
↓But there is a problem
Everything in the course so far has answered the question given this model, what happens? — how the beam deflects, how the orbit evolves, how the water seeps.
Engineering asks the opposite question: which design is best? The lightest bracket that does not yield, the fuel-optimal trajectory to orbit, the gain that minimises tracking error, the parameters that best fit a test. These are optimisation problems — and in 1847 Augustin-Louis Cauchy, studying the orbits of celestial bodies, described the simplest method for them: go downhill.