Beam analysis is one of the most common tasks in structural engineering — sizing a floor beam, checking a crane runway girder, or verifying a pipe rack member all come down to the same question: what are the deflections, reactions, shear forces, and bending moments along this beam under its applied loads? This tutorial walks through the Finite Element Method (FEM), specifically the direct stiffness method, that professional tools (including my own free Beam Analysis Tool) use to answer that question — and works a complete example by hand so you can see exactly what's happening behind the scenes.
Why Use FEM for Beam Analysis
For a single-span simply-supported beam with one point load, closed-form formulas (from any structural handbook) are faster than setting up a finite element model. But real beams rarely stay that simple — multiple spans, mixed support types (fixed, pinned, roller), combinations of point loads and distributed loads, and varying cross-sections quickly make closed-form solutions impractical. The Finite Element Method handles all of these cases with the same systematic procedure, which is exactly why it's the standard approach in commercial structural software (SAP2000, STAAD.Pro, Autodesk Robot, and this site's own beam tool all use variations of it).
The core idea: break the beam into a series of elements connected at nodes. Each element has a known stiffness relationship between the forces/moments applied at its ends and the resulting displacements/rotations at those ends. Assemble all the individual element stiffnesses into one global system, apply the known boundary conditions (supports) and loads, and solve — the beam's entire deflected shape, and everything derived from it (shear, moment), falls out of that single linear system.
The Beam Element Stiffness Matrix
Each beam element uses the classical Euler-Bernoulli beam theory, with two degrees of freedom per node: vertical deflection (\(v\)) and rotation (\(\theta\)). A two-node element therefore has 4 degrees of freedom total, related to the nodal forces by a 4×4 stiffness matrix:
where \(E\) is the modulus of elasticity, \(I\) is the second moment of area of the cross-section, and \(L\) is the element's length. This single matrix encodes how a unit deflection or rotation at either end produces resisting forces and moments at both ends — it's the mathematical statement of "how stiff is this beam segment."
Assembling the Global Stiffness Matrix
For a beam with multiple elements, each element's local 4×4 matrix gets placed into a larger global matrix at the rows/columns corresponding to its two nodes' degrees of freedom, with overlapping terms at shared nodes added together. A distributed load on an element is converted to statically equivalent forces and moments at its two end nodes (fixed-end reactions), and added into the global force vector alongside any directly-applied point loads. The result is one system:
where \(K\) is the global stiffness matrix, \(U\) is the vector of unknown nodal displacements and rotations, and \(F\) is the vector of applied nodal forces and moments.
Worked Example: Two-Span Beam with a Cantilever
Consider a wide-flange W310×52 steel beam with a fixed support at one end, a pinned support 5 m along its length, and a free end 2.5 m beyond that — carrying a uniformly distributed load of 25 kN/m along its entire 7.5 m length. This is a genuinely useful configuration: it behaves partly like a propped cantilever and partly like an overhang, and it's exactly the kind of mixed-support problem where hand formulas get cumbersome and FEM earns its keep.
- Section: W310×52 — Area A = 6615.8 mm², Second moment of area I = 117.20 × 10⁶ mm⁴
- Modulus of elasticity: E = 200 GPa
- Node 1 (x = 0 m): Fixed support
- Node 2 (x = 5 m): Pinned support
- Node 3 (x = 7.5 m): Free end
- Loading: Uniformly distributed load w = 25,000 N/m across both spans
Two elements: Element 1 spans node 1 to node 2 (L₁ = 5 m), Element 2 spans node 2 to node 3 (L₂ = 2.5 m). Each element's stiffness matrix follows the formula above:
Each element also gets an equivalent nodal load vector from its share of the UDL (standard fixed-end reactions for a uniformly loaded beam, \(wL/2\) for force and \(wL^2/12\) for moment at each end):
Placing both elements into the global 6×6 system (3 nodes × 2 DOF each) and summing the overlapping terms at node 2 gives the assembled global stiffness matrix and force vector:
Applying Boundary Conditions and Solving
The fixed support at node 1 restrains both degrees of freedom there (\(U_{11} = U_{12} = 0\)); the pinned support at node 2 restrains only its vertical deflection (\(U_{21} = 0\)). Removing those three rows/columns from the 6×6 system leaves a reduced 3×3 system for the three remaining unknowns — rotation at node 2, deflection at node 3, and rotation at node 3:
Solving \(u = K_r^{-1} \cdot F_r\):
With the displacements known, the reactions at the restrained nodes follow from \(R = K \cdot U - F\), and the internal shear force and bending moment at any point along the beam follow from equilibrium — summing reactions, point loads, and UDL contributions to the left of that point.
Results and Verification
| Node | Position [m] | Deflection [mm] | Rotation [mrad] |
|---|---|---|---|
| 1 | 0.00 | 0.0000 | 0.0000 |
| 2 | 5.00 | 0.0000 | 1.3888 |
| 3 | 7.50 | 8.6797 | 4.1663 |
| Support | Vertical Reaction [kN] | Moment Reaction [kN·m] |
|---|---|---|
| Node 1 (Fixed) | 54.69 | 39.06 |
| Node 2 (Pinned) | 132.81 | N/A |
Equilibrium check: total applied load = 25 kN/m × 7.5 m = 187.50 kN. Total vertical reactions = 54.69 + 132.81 = 187.50 kN — matching exactly, confirming the solution.
Maximum shear force is 70.31 kN (at node 2, just inside the second span), and maximum bending moment is 78.13 kN·m (at node 3 — actually the peak sagging moment location within the first span; see the full shear/bending moment diagrams by running this model in the tool below).
✅ Independently Verified
This exact problem was solved three independent ways: by hand using the direct stiffness method shown above, using this site's free Beam Analysis Tool, and using Autodesk Robot Structural Analysis (industry-standard commercial software). All three agree to within 0.02% on every displacement, rotation, and reaction value — well inside the ±1% (displacement/rotation) and ±0.5% (reactions) acceptance criteria used for this validation. The full validation report, including the Autodesk Robot output and complete hand-calculation appendix, is available as a downloadable PDF.
Try It Yourself
The fastest way to build intuition for this method is to reproduce the example above and then change one thing at a time — swap the pinned support for a roller, move the load, or add a point load at the free end — and watch how the reactions and diagrams respond.
- Open the Beam Analysis Tool.
- Set Modulus of Elasticity to 200 GPa, and enter the section as Manual Input with A = 0.0066158 m² and I = 1.1720e-4 m⁴ (or pick I-Beam Section and enter the W310×52 dimensions directly).
- Set Number of Nodes to 3, with positions 0, 5, and 7.5 m.
- Add a Fixed support at Node 1 and a Pinned support at Node 2.
- Add a UDL of 25 kN/m on both Element 1 and Element 2.
- Click Analyze Beam and compare your results to the tables above.
Run This Example (or Your Own Beam) Right Now
Free, browser-based, no account required. Point loads, UDLs, any mix of fixed/pinned/roller supports, instant SFD/BMD diagrams.
Open the Beam Analysis Tool →