HomeArticlesEngineering & Materials

How FEM Analyses a Truss Bridge: The Direct Stiffness Method

Bridges are designed today with the same underlying tool: the direct stiffness method, where a bar's stiffness matrix comes from an exact analytical solution — no numerical integration required.

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

The direct stiffness method

Structural FEM predates general continuum FEM by decades, growing out of matrix analysis of frameworks developed for aircraft design in the 1950s. The core idea: model a bridge as a network of one-dimensional bars connected at discrete nodes. Each bar has a known relationship between the forces at its ends and the displacements at its ends — its element stiffness matrix. Combine every member's stiffness matrix into one large global stiffness matrix, apply loads and supports, and solve a linear system F = K·D for the unknown nodal displacements.

Truss (bar) elements: axial force only

A truss member carries only axial force — tension or compression along its length — and is pinned at both ends, so it transmits no bending moment. In local coordinates (x′ along the bar), a 2-node bar with axial stiffness EA/L has an exact stiffness matrix:

Local bar stiffness (axial DOF only, 2×2):
  k_local = (EA/L) · [ 1  -1 ]
                      [-1   1 ]

Derivation: axial force N = EA·(du/dx). Since displacement u(x)
varies linearly between nodes, du/dx is constant along the
element, so the strain energy integral is exact — no Gauss
quadrature needed, unlike a general FEM element.

In 2D, each node has 2 translational degrees of freedom, so the local axial stiffness must be rotated into global x-y coordinates using the direction cosines of the bar before assembly. A truss model of a bridge typically has only a few hundred bars and nodes — small enough to solve by hand in the pre-computer era, which is exactly why the method was developed for trusses first.

live demo · a lattice network settling under load● LIVE

Assembling and solving the global system

Assembly maps each element's local degrees of freedom to their position in the global numbering, adding the transformed element matrix into the global stiffness matrix. Boundary conditions then partition the degrees of freedom into free (f) and supported (s):

[ K_ff  K_fs ] [ D_f ]   [ F_f ]
[ K_sf  K_ss ] [ D_s ] = [ R_s ]

Solve:  K_ff · D_f = F_f - K_fs · D_s   for unknown D_f
Then reactions:  R_s = K_sf · D_f + K_ss · D_s

K is sparse and banded — each node only connects to a handful of neighbouring members, so most entries are zero, and renumbering DOFs to minimise bandwidth speeds up the solve considerably. Once the free displacements D_f are known, each element's internal axial force is recovered directly from k_local · d_e for that member.

Reading the tension/compression map

Different truss geometries — Pratt, Howe, Warren — distribute forces through their diagonals differently under the same load, which is exactly what a stiffness-method solver reveals member by member. A positive recovered axial force means the member is being stretched (tension); a negative value means it is being squeezed (compression) — the basis of the colour-coded heat map used to visualise how a load moves through a truss bridge, and the same calculation an engineer runs to size every member for a real structure.

Frequently asked questions

Why can truss members be modelled with a simple 2×2 stiffness matrix?

A truss member carries only axial force and is pinned at both ends, so it transmits no bending moment. Because the displacement field along the bar is linear, the strain du/dx is constant, and the exact stiffness matrix k = (EA/L)·[[1,-1],[-1,1]] falls straight out of the strain energy without any numerical integration — unlike a beam or a general continuum element.

How does the solver know which members are in tension and which are in compression?

After solving K_ff·D_f = F_f for the unknown nodal displacements, each element's local displacements are recovered and multiplied by its local stiffness matrix (k_local · d_e) to get the internal axial force. A positive value corresponds to tension (the member is being stretched) and a negative value to compression (the member is being squeezed) — this is exactly what colours each bar in a tension/compression heat map.

Why was the direct stiffness method developed for trusses before general FEM existed?

Structural matrix analysis of frameworks predates general continuum FEM by decades — it grew out of aircraft design in the 1950s. A truss model of a bridge or roof typically has only a few hundred bars and nodes, small enough that engineers could assemble and solve the stiffness equations by hand or with early computers, long before general-purpose finite element software existed for arbitrary continuum shapes.

Try it live

Everything above runs in your browser — open Bridge Structural Analysis and assemble the global stiffness matrix for a Pratt, Howe or Warren truss, apply a load, and watch member forces resolve into a live tension/compression colour map. Nothing is installed, nothing is uploaded.

▶ Open Bridge Structural Analysis simulation

What did you find?

Add reproduction steps (optional)