Skip to content

Guide · 2D frames

Frame stiffness method example

A frame is a truss whose members also bend. This guide writes out the beam-column element matrix, shows how it is rotated and assembled, and works a fixed-base portal frame with sway through to moments and reactions.

Quick answer. In a 2D frame each joint has three degrees of freedom (horizontal and vertical displacement, and rotation), and each member has a 6×6 matrix combining axial stiffness \(EA/L\) with bending stiffness \(EI/L^3\). Rotate each member matrix to global axes, assemble, remove the supported degrees of freedom, and solve \(\mathbf{K}_{ff}\mathbf{u}_f=\mathbf{F}_f\). Member end forces come from \(\mathbf{f}=\mathbf{k}\,\mathbf{u}_{local}\), and the reactions are the end forces at the supports.

1. The beam-column element

In the member’s own axes (\(x'\) along the member) the six degrees of freedom are \((u_i,v_i,\theta_i,u_j,v_j,\theta_j)\), and the element matrix combines a truss bar and a beam:

$$\mathbf{k}'=\begin{bmatrix}\frac{EA}{L} & 0 & 0 & -\frac{EA}{L} & 0 & 0\\ 0 & \frac{12EI}{L^3} & \frac{6EI}{L^2} & 0 & -\frac{12EI}{L^3} & \frac{6EI}{L^2}\\ 0 & \frac{6EI}{L^2} & \frac{4EI}{L} & 0 & -\frac{6EI}{L^2} & \frac{2EI}{L}\\ -\frac{EA}{L} & 0 & 0 & \frac{EA}{L} & 0 & 0\\ 0 & -\frac{12EI}{L^3} & -\frac{6EI}{L^2} & 0 & \frac{12EI}{L^3} & -\frac{6EI}{L^2}\\ 0 & \frac{6EI}{L^2} & \frac{2EI}{L} & 0 & -\frac{6EI}{L^2} & \frac{4EI}{L}\end{bmatrix}.$$

For a member inclined at angle \(\theta\) (\(c=\cos\theta,\ s=\sin\theta\)) the matrix is rotated into global axes with \(\mathbf{k}=\mathbf{T}^{T}\mathbf{k}'\mathbf{T}\), where

$$\mathbf{T}=\begin{bmatrix}\mathbf{R} & \mathbf{0}\\ \mathbf{0} & \mathbf{R}\end{bmatrix},\qquad \mathbf{R}=\begin{bmatrix}c & s & 0\\ -s & c & 0\\ 0 & 0 & 1\end{bmatrix}.$$
Fixed-base portal frame with a lateral load A portal frame with two columns of height h and a beam of span L. Both column bases are fixed. A horizontal load H acts at the top left joint. Joints are numbered 1 to 4. H 2314 h L beam: E, Ibcolumns: E, Ic
The portal frame of the worked example: fixed bases, a lateral load \(H\) at joint 2, and joints numbered as in the calculator.

2. The procedure

  1. Number the joints and members, and give each member its \(E\), \(A\), \(I\) and direction.
  2. Form each local matrix \(\mathbf{k}'\) and rotate it to global axes.
  3. Add every member matrix into the global matrix \(\mathbf{K}\) at the three degrees of freedom of its two joints.
  4. Remove the rows and columns of supported degrees of freedom (a fixed support removes all three).
  5. Solve \(\mathbf{K}_{ff}\mathbf{u}_f=\mathbf{F}_f\) for the joint displacements and rotations, including the sway of the frame.
  6. For each member, rotate the displacements back to local axes and compute the end forces \(\mathbf{f}'=\mathbf{k}'\mathbf{u}'\) (plus fixed-end forces for loads along members).
  7. Read the reactions from the end forces of the members that meet at each support, and check equilibrium.

3. Worked example: a fixed-base portal frame

A steel portal frame (\(E=210\) GPa) has two 4 m columns (\(A=7808\ \mathrm{mm^2}\), \(I_c=5.696\times10^{-5}\ \mathrm{m^4}\)) and a 6 m beam (\(A=7273\ \mathrm{mm^2}\), \(I_b=1.627\times10^{-4}\ \mathrm{m^4}\)). Both bases are fixed and a wind load \(H=50\) kN acts horizontally at joint 2. The free degrees of freedom are \((u,v,\theta)\) at joints 2 and 3, so \(\mathbf{K}_{ff}\) is a 6×6 matrix and the solution gives the sway directly.

Before trusting a computer result, compare it with a hand method. Neglecting axial deformation, the slope-deflection solution for a sway portal depends on the stiffness ratio

$$k=\frac{I_b/L}{I_c/h}=\frac{1.627\times10^{-4}/6}{5.696\times10^{-5}/4}=1.904,\qquad M_{base}=\frac{Hh}{2}\cdot\frac{3k+1}{6k+1}=54.0\ \text{kN m},\qquad M_{knee}=\frac{Hh}{2}\cdot\frac{3k}{6k+1}=46.0\ \text{kN m},$$

with each column carrying a shear \(H/2=25\) kN. The stiffness solution, which keeps axial deformation, gives:

Results for the portal frame
QuantityStiffStructHand check
Sway of the beam (horizontal displacement of joints 2 and 3)13.91 mm and 13.81 mm–
Base moment, left and right column54.22 and 53.89 kN·m54.0 kN·m
Horizontal reaction, left and right base25.07 and 24.93 kN25.0 kN each
Vertical reactions (overturning pair)−15.31 and +15.31 kN\((Hh-M_A-M_D)/L\)
Equilibrium residual< 1×10−9 kN–

The base moments differ from the hand value by under 0.4%, because the slope-deflection formula ignores the small axial shortening of the columns. The vertical reactions check by statics: the wind overturning moment \(Hh=200\) kN·m is resisted by the two base moments (about 108 kN·m together) and the vertical couple \(15.31\times6=91.9\) kN·m, and \(108.1+91.9=200\).

Live result: the portal frame solved in your browser

Solving the example in your browser…

Axial force, shear, bending moment and the swayed shape of the frame, from the same solver as the calculator.

4. Common mistakes in frame analysis

Solve this frame, or your own, in StiffStruct

Open the portal frame with its bending moment diagram and matrices, or draw a frame of your own with columns, beams, supports and loads.

Frequently asked questions

What is the difference between a truss and a frame in the stiffness method?

A truss member has two degrees of freedom per joint and only axial stiffness. A frame member also resists bending, so it has three degrees of freedom per joint (including rotation) and the 6×6 matrix above, with joints that can transmit moment.

How does the stiffness method capture sway?

The horizontal joint displacements are ordinary unknowns, so sway is solved for automatically. Hand methods such as slope-deflection need an extra sway equation, which the matrix method does not.

Is axial deformation included?

Yes. The matrix contains the axial terms \(EA/L\), which is why StiffStruct’s results differ slightly from hand formulas that neglect axial deformation.

What changes for a 3D frame?

Each joint has six degrees of freedom and each member a 12×12 matrix with bending about both axes and torsion. StiffStruct solves 3D frames with the same procedure.

An educational tool: verify results independently before using them for design. All values on this page come from the same solver that powers the calculator.