Real structures rarely live in one plane. A pipe rack, an equipment support frame, or a small platform structure carries loads in three dimensions at once — axial, bending about two axes, and torsion, all coupled together at every joint. This tutorial extends the beam analysis tutorial's Finite Element Method into full 3D space frames — the same method my free 3D Structure Analysis Tool uses — and walks through a complete worked example verified against Autodesk Robot Structural Analysis.
Why 3D Frames Need 6 Degrees of Freedom per Node
A 2D beam element only needs 2 degrees of freedom (DOF) per node — vertical deflection and in-plane rotation — because everything happens in one plane. A 3D frame member can translate along all three global axes and rotate about all three, so each node carries 6 DOF: three translations (\(u_x, u_y, u_z\)) and three rotations (\(\theta_x, \theta_y, \theta_z\)). A two-node 3D frame element therefore has 12 degrees of freedom total — six at each end — and its stiffness matrix is 12×12 instead of the 2D case's 4×4.
This is exactly the same direct stiffness method as the 2D beam case — assemble element stiffnesses into a global system, apply boundary conditions, solve \(K \cdot U = F\) — just with a bigger matrix per element and an extra step: because each element has its own local orientation in 3D space, its local stiffness matrix has to be transformed into global coordinates before it can be assembled alongside every other element.
The 3D Frame Element Stiffness Matrix
In an element's own local coordinate system (local x along the member axis), the 12×12 stiffness matrix combines four independent effects that don't interact with each other locally: axial stretching, torsion about the member axis, and bending in each of the two transverse planes.
where \(E\) is the modulus of elasticity, \(G\) the shear modulus, \(A\) the cross-sectional area, \(J\) the torsional constant, \(I\) the second moment of area (one value for each bending plane — \(I_y\) and \(I_z\)), and \(L\) the element length. The full 12×12 matrix places these four sub-blocks at the DOF positions for axial (\(u_x\)), torsion (\(\theta_x\)), and bending about y and z at both nodes — everything else in the matrix is zero, because in local coordinates these four behaviors don't couple.
Local-to-Global Coordinate Transformation
A member running diagonally through 3D space has a local x-axis pointing along its own length — not aligned with any global axis. Before an element's 12×12 local stiffness matrix can be added into the global system, it has to be rotated into the global X-Y-Z frame using a transformation matrix \(T\) built from the member's direction cosines:
\(T\) is a 12×12 block-diagonal matrix made of four repeated 3×3 rotation matrices (one for each node's translation triplet and rotation triplet), derived from the member's unit direction vector. Once every element's stiffness is in global coordinates, assembly works exactly like the 2D case — each element's 12×12 contribution is scattered into the global matrix at the 12 global DOF indices (6 per node) for its two end nodes, with overlapping terms at shared nodes summed together.
Worked Example: A 3D Frame with 4 Pinned Supports
Consider a small 3D frame structure — ten nodes forming a braced rectangular frame roughly 2 m × 1.7 m in plan, standing 1 m tall, built from a C3×5 steel channel section — with pinned supports at its four base nodes and a combined 3-axis point load applied at the midpoint of one of its diagonal brace members.
- Section: C3×5 channel — A = 9.48 cm², Iy = 77.00 cm⁴, Iz = 10.03 cm⁴, J = 166.70 cm⁴
- Modulus of elasticity: E = 200 GPa, Shear modulus: G = 77 GPa
- 10 nodes, 11 frame elements (see node table below)
- Nodes 1–4: Pinned supports (all restrain ux, uy, uz; rotations free)
- Load: applied at the midpoint of the element connecting nodes 8 and 7 — Fx = 35 kN, Fy = −180 kN, Fz = −55 kN
| Node | X [m] | Y [m] | Z [m] | Support |
|---|---|---|---|---|
| 1 | 0.00 | 0.00 | 0.00 | Pinned |
| 2 | 0.00 | 1.00 | 0.00 | Pinned |
| 3 | 0.00 | 1.00 | -1.70 | Pinned |
| 4 | 0.00 | 0.00 | -1.70 | Pinned |
| 5 | 0.50 | 1.00 | -1.70 | — |
| 6 | 0.50 | 1.00 | 0.00 | — |
| 7 | 1.20 | 1.00 | -1.70 | — |
| 8 | 1.20 | 1.00 | 0.00 | — |
| 9 | 2.00 | 1.00 | -1.70 | — |
| 10 | 2.00 | 1.00 | 0.00 | — |
With 10 nodes × 6 DOF each, the full global system is a 60×60 matrix — far beyond what's practical to write out by hand (unlike the 2D beam tutorial's 6×6 example). This is exactly the point where 3D frame analysis stops being a hand-calculation exercise and becomes a job for software: the underlying math is the same direct stiffness method, but at this scale the matrix assembly, transformation, and solve genuinely need a computer. What is worth doing by hand — and what actually validates a tool — is checking that the final answer satisfies global equilibrium and matches an independent solution.
Results and Verification
The support reactions, solved via the direct stiffness method described above:
| Node | Fx [kN] | Fy [kN] | Fz [kN] |
|---|---|---|---|
| 1 | 113.09 | 94.22 | 3.82 |
| 2 | -91.77 | 0.28 | 23.68 |
| 3 | -159.23 | -0.26 | 23.68 |
| 4 | 102.91 | 85.76 | 3.82 |
Equilibrium check: summing all four reactions gives ΣFx = 113.09 − 91.77 − 159.23 + 102.91 = −35.00 kN, ΣFy = 94.22 + 0.28 − 0.26 + 85.76 = 180.00 kN, ΣFz = 3.82 + 23.68 + 23.68 + 3.82 = 55.00 kN — each exactly balancing the applied load (35, −180, −55 kN) in the opposite direction, confirming the solution satisfies global force equilibrium.
✅ Independently Verified
This exact structure was modeled two independent ways: using this site's free 3D Structure Analysis Tool, and using Autodesk Robot Structural Analysis (industry-standard commercial software). Every reaction component agrees to within about 1–3.8 kN (under the ±1% acceptance criterion used for this validation) — the small remaining difference comes from the two tools using different underlying solvers (this tool uses a direct sparse matrix solver), not from any error in either result. The full validation report, including the complete Autodesk Robot output, is available as a downloadable PDF.
Try It Yourself
This exact validated example loads automatically as the tool's default/example structure — so you can see the full 3D model, run the analysis, and compare your own reactions to the table above without building anything from scratch.
- Open the 3D Structure Analysis Tool — it opens with this exact example structure pre-loaded.
- Orbit and zoom the 3D view to see the frame's geometry: 4 pinned base supports, the diagonal bracing, and the load arrow on the element between nodes 8 and 7.
- Click Run Analysis and compare the reported reactions to the table above.
- Then try changing something — move the load, add a member, or change a support type — and see how the reactions respond.
Run This Example (or Build Your Own 3D Frame) Right Now
Free, browser-based, no account required. Truss and frame elements, full 6-DOF analysis, any mix of supports, DXF import.
Open the 3D Structure Analysis Tool →