HomeArticlesCivil Engineering

Finite Element Method Explained: From Mesh to Bridge Forces

Every modern bridge design depends on FEM — converting a physical structure into a system of algebraic equations by dividing it into small, connected elements.

mysimulator teamUpdated July 2026≈ 9 min read▶ Open the simulation

From governing equations to an algebraic system

A loaded bridge is governed by the equations of linear elasticity: equilibrium (∇·σ = 0), the constitutive law relating stress to strain (σ = C:ε), and the strain-displacement relation (ε = ½(∇u + (∇u)ᵀ)). Analytical solutions exist only for the simplest geometries, so FEM instead solves the equivalent weak (variational) form — integrating the equilibrium condition against a virtual displacement rather than solving the differential equation pointwise. This reformulation is what allows a computer to handle arbitrarily complex structures, from a single truss bar to a full bridge deck.

Shape functions: approximating the unknown field

Within each element, the unknown displacement field is approximated as a weighted sum of shape functions N_i(x), where the weights are the nodal values:

u(x) ≈ Σᵢ Nᵢ(x) · uᵢ   (within one element)

Key properties of any valid shape function set:
  Nᵢ(xⱼ) = δᵢⱼ   (1 at its own node, 0 at every other node)
  Σᵢ Nᵢ = 1      (partition of unity — rigid-body motion is exact)

For a truss bar the shape functions are simply linear along the member's length; general 2D and 3D continuum elements use triangular, quadrilateral, tetrahedral or brick shape functions of increasing polynomial order. Higher-order (p-refinement) shape functions improve accuracy without shrinking the mesh, and can achieve exponential convergence for smooth problems.

live demo · a meshed lattice deforming under load● LIVE

Element stiffness and assembly

Substituting shape functions into the weak form gives each element's stiffness matrix K_e = ∫ Bᵀ C B dV, where B contains derivatives of the shape functions and C is the elasticity matrix built from Young's modulus E and Poisson's ratio ν. For simple bar and beam elements, this integral has an exact closed form; for general continuum elements it is evaluated numerically via Gauss quadrature. Every element's K_e is then assembled into the global system K·u = F — for a truss with N nodes and 2 DOF per node, K has size 2N×2N and is sparse, since a node only connects to its neighbouring members.

Boundary conditions and solving

A bridge model needs two kinds of boundary conditions: Dirichlet (essential) conditions prescribe known displacements, such as a pinned or roller support with u = 0, applied by modifying rows and columns of the stiffness matrix; Neumann (natural) conditions prescribe applied forces, which appear directly in the load vector F. For a linear elastic structure, K·u = F is solved once using a direct method (LU or Cholesky decomposition) or an iterative method (conjugate gradient) — no Newton-Raphson iteration is needed unless the deck undergoes large deformation or the members can yield plastically.

Trusting the result: convergence and error

FEM produces an approximate solution, so accuracy is checked by refining the model: h-refinement shrinks element size (displacement error scales roughly with h², stress error with h for linear elements); p-refinement raises the polynomial order instead. Error estimators such as the Zienkiewicz-Zhu method compare a smoothed, recovered stress field against the raw, discontinuous FEM stress across element boundaries, flagging regions — like a truss joint carrying a concentrated load — where the mesh should be refined. Engineering practice typically targets an estimated error under 5-10% before trusting a computed force or displacement for design.

Frequently asked questions

What does FEM actually solve for?

FEM approximates the unknown displacement field u within each element as a weighted sum of shape functions N_i(x), with the nodal displacements as the unknown weights. Substituting these shape functions into the governing equilibrium equations produces an element stiffness matrix K_e = ∫ Bᵀ C B dV, where B contains derivatives of the shape functions and C is the material's elasticity matrix. Assembling every element gives the global system K·u = F, solved once for a linear elastic structure like a bridge truss.

Why does mesh quality matter for a truss or frame model?

Poorly shaped elements — very elongated (high aspect ratio) or nearly collapsed (low Jacobian ratio) — degrade the accuracy of the stiffness matrix and can even produce a singular or ill-conditioned system. For a bar or beam element the geometry is simpler than a 2D or 3D continuum mesh, but the same principle holds: element length, connectivity and coordinate transformation must be well-conditioned for the solved displacements and forces to be trustworthy.

How do engineers know a FEM result is accurate enough?

Accuracy improves with h-refinement (smaller elements), p-refinement (higher polynomial order), or both together. For linear elements, displacement error scales roughly with element size squared and stress error with element size. Error estimators such as the Zienkiewicz-Zhu method compare a smoothed, recovered stress field against the raw discontinuous FEM stress to flag regions needing refinement — engineering practice typically targets an error estimate under 5-10%.

Try it live

Everything above runs in your browser — open Bridge Truss Analyser and load a Pratt truss to watch a stiffness-method solver colour each member by tension or compression while the deck deflects under the applied force. Nothing is installed, nothing is uploaded.

▶ Open Bridge Truss Analyser simulation

What did you find?

Add reproduction steps (optional)