Free worked example · complete calculation

Portal Frame Analysis Worked Example

See the complete reactions and force diagrams first, then work through the direct stiffness calculation for this 6 m × 4 m fixed-base frame.

6 m span 4 m height Fixed column bases 8 kN/m roof load 12 kN horizontal load
One worked loading condition First-order linear elastic analysis 6 active joint DOFs
Model OB-EX-FRAME-001 Geometry and applied loading
Optimal Beam diagram
Optimal Beam model diagram for the 6 metre by 4 metre fixed-base portal frame with an 8 kilonewton-per-metre roof load and a 12 kilonewton horizontal load

Answer at a glance

Roof sway at N2
1.289 mm right
Maximum roof-beam vertical movement
1.462 mm down
Left / right vertical reactions
20.811 / 27.189 kN
Governing bending moment
27.558 kN·m
Right-column compression
27.189 kN

Portal frame fundamentals

What is portal frame analysis?

A portal frame is a structural system formed by columns connected to a beam or rafters through rigid joints. The frame carries vertical and horizontal loads through a combination of axial force, shear force and bending moment, while the moment-resisting joints allow the columns and roof member to act together as one continuous frame.

Portal frame analysis calculates the horizontal, vertical and moment support reactions; the translations and rotations of the joints; and the axial-force, shear-force and bending-moment response of each member. A fixed-base rigid portal frame is statically indeterminate, so this worked example uses the matrix direct stiffness method to enforce both equilibrium and displacement compatibility and to calculate frame sway and deflection.

Geometry, joints and load path

How to recognize a portal frame

  • Two or more columns connected by a horizontal beam or inclined rafters to form an open structural bay.
  • Rigid beam-to-column or rafter-to-column joints that transfer bending moment as well as axial force and shear.
  • Fixed, pinned or partially restrained column bases that define the available support reactions.
  • Gravity and lateral loading that can produce combined column bending, roof-member bending and horizontal frame sway.
Matrix-analysis workflow

How to analyze a portal frame

  1. Define the portal-frame geometry, member properties, rigid joints, support restraints and applied loads.
  2. Number the joint translations and rotations and write the local axial-and-bending stiffness matrix for each frame member.
  3. Convert member loads into consistent nodal actions, transform each member matrix into global axes and assemble the global stiffness matrix.
  4. Apply the support boundary conditions and solve the reduced matrix equation for joint displacements, rotations and frame sway.
  5. Recover the horizontal, vertical and moment reactions together with the member axial, shear and bending end actions.
  6. Plot the axial-force, shear-force, bending-moment and deflected-shape diagrams, then close the global equilibrium checks.

How is a portal frame analyzed?

For a rigid, statically indeterminate portal frame, the direct stiffness method is commonly used. Each beam and column contributes an element stiffness matrix; the matrices and equivalent nodal loads are transformed and assembled; support restraints are applied; and the resulting joint displacements are solved before reactions and member end forces are recovered.

What results does portal frame analysis calculate?

The analysis calculates horizontal and vertical support reactions, base moments, joint translations, joint rotations, frame sway, member axial force, shear force and bending moment. These values are presented in reaction, deflected-shape, axial-force, shear-force and bending-moment diagrams.

Why does a portal frame sway?

Horizontal loading, unsymmetrical gravity loading or unequal stiffness can translate the roof joints laterally. In this example, the 12 kN horizontal load causes rightward sway; the rigid roof beam couples the columns so both columns bend and participate in resisting the lateral shear.

Is portal frame analysis the same as portal frame design?

No. Analysis determines reactions, internal forces and displacements for the idealized frame. Design must additionally verify member strength, buckling, stability, connections, base plates, bracing, serviceability, load combinations and the requirements of the applicable structural code.

01 · Model inputs

The worked portal-frame model

A single-bay portal frame spans 6 m and rises 4 m. Both column bases are fixed and all three members meet at rigid beam-to-column joints. The roof carries an 8 kN/m downward UDL and node N3 carries a 12 kN rightward load.

Span6 mSingle bay
Height4 mBoth columns
SupportsFixed + fixedSix restrained base DOFs
ConnectionsRigidNo member-end releases
Section5000 mm²I = 200 × 10⁶ mm⁴
MaterialSteelE = 200 GPa
Input table

Nodes and restraints

Coordinates in metres
NodeXYSupportRestrained DOFs
N1 0.0 0.0 Fixed UX, UY, RZ
N2 0.0 4.0 Free
N3 6.0 4.0 Free
N4 6.0 0.0 Fixed UX, UY, RZ
Input table

Applied loads

One worked loading condition
LoadTargetDefinition
L1N312 kN in global +X
L2M28 kN/m downward over the full 6 m beam

02 · Solved answer

Complete support reactions and member-force diagrams

The 8 kN/m roof load and 12 kN horizontal load act together as the one worked loading condition. The diagrams below are exported by the Optimal Beam calculator from this exact model.

Optimal Beam output

Support reaction diagram

Global axes · kN and kN·m
Optimal Beam support reaction diagram showing horizontal, vertical and moment reactions at both fixed bases
All six fixed-base components

Support reactions

+X right · +Y up · +Mz counter-clockwise
SupportHorizontal Rx (kN)Vertical Ry (kN)Moment Mz (kN·m)
N1 0.743 kN 20.811 kN 5.455 kN·m
N4 -12.743 kN 27.189 kN 23.413 kN·m
Optimal Beam output

Axial-force diagram

kN
Optimal Beam axial-force diagram for the worked portal frame
Tension positive · compression negative
Optimal Beam output

Shear-force diagram

kN
Optimal Beam shear-force diagram for the worked portal frame
Member local axes
Optimal Beam output

Bending-moment diagram

kN·m
Optimal Beam bending-moment diagram for the worked portal frame
Sagging positive
Optimal Beam output

Deflected shape

Amplified
Optimal Beam deflected shape for the worked portal frame
Values remain unamplified
Calculated joint response

Roof-joint movement

Translations and rotation
NodeUX (mm)UY (mm)RZ (mrad)
N2 1.289 -0.083 -0.694
N3 1.285 -0.109 0.207
Calculated member response

Member end actions

Local i-to-j axes
MemberAxial (kN)Vi / Vj (kN)Mi / Mj (kN·m)
M1 -20.811 -0.743 / -0.743 -5.455 / -8.426
M2 -0.743 20.811 / -27.189 -8.426 / -27.558
M3 -27.189 12.743 / 12.743 -27.558 / 23.413

03 · Hand calculation

Direct stiffness calculation, step by step

This is the numerical path from the applied loads to the six reactions. The same model values are used by the calculator.

From three member matrices to the six unknown roof displacements

Each member is written in its own local axes, transformed to global X/Y, and assembled by matching common joint degrees of freedom. The fixed bases are then removed from the unknown set, leaving the six-by-six system shown below.

Global +X is right, +Y is up and +θ is counter-clockwise. Each member local x-axis runs from its i-node to its j-node.
Step 1

Number the global degrees of freedom

Start with every joint translation and rotation, then identify which values are known.

{d} = {u₁, v₁, θ₁, u₂, v₂, θ₂, u₃, v₃, θ₃, u₄, v₄, θ₄}ᵀ {dc} = {u₁, v₁, θ₁, u₄, v₄, θ₄}ᵀ = {0, 0, 0, 0, 0, 0}ᵀ {df} = {u₂, v₂, θ₂, u₃, v₃, θ₃}ᵀ

The complete frame has twelve global degrees of freedom. The fixed bases set six of them to zero, leaving the six roof-joint translations and rotations as the unknown vector.

JointGlobal DOFsStatus
N1u₁, v₁, θ₁Restrained
N2u₂, v₂, θ₂Free
N3u₃, v₃, θ₃Free
N4u₄, v₄, θ₄Restrained
Static-indeterminacy check Ds = 3m + r − 3j → Ds = 3(3) + 6 − 3(4) = 3

The frame is stable but statically indeterminate to degree three, so equilibrium alone cannot determine all reactions and member end actions.

Step 2

Write the local 2D frame-element stiffness matrix

This is the complete axial-and-bending matrix used for each unreleased member.

{d′e} = {uᵢ, vᵢ, θᵢ, uⱼ, vⱼ, θⱼ}ᵀ {f′e} = [k′e]{d′e}
uᵢvᵢθᵢuⱼvⱼθⱼ
uᵢa00−a00
vᵢ0bc0−bc
θᵢ0cd0−ce
uⱼ−a00a00
vⱼ0−b−c0b−c
θⱼ0ce0−cd

The DOF order is [uᵢ, vᵢ, θᵢ, uⱼ, vⱼ, θⱼ]. Because translations are in metres and rotations in radians, the matrix contains compatible kN/m, kN and kN·m terms.

Section properties in calculation units

E = 200 GPa, A = 5000 mm², I = 200,000,000 mm⁴

E = 200,000,000 kN/m²; A = 0.005 m²; I = 0.0002 m⁴; EA = 1,000,000 kN; EI = 40,000 kN·m²
CoefficientDefinitionPurpose
aEA/LAxial stiffness
b12EI/L³Transverse stiffness
c6EI/L²Shear–rotation coupling
d4EI/LNear-end rotational stiffness
e2EI/LFar-end rotational coupling
Term4 m column6 m beam
EA/L250,000.000 kN/m166,666.667 kN/m
12EI/L³7,500.000 kN/m2,222.222 kN/m
6EI/L²15,000.000 kN6,666.667 kN
4EI/L40,000.000 kN·m26,666.667 kN·m
2EI/L20,000.000 kN·m13,333.333 kN·m
Numerical [k′e]

Columns M1 and M3

Local 6 × 6 matrix for L = 4 m
uᵢvᵢθᵢuⱼvⱼθⱼ
uᵢ250,000.0000.0000.000-250,000.0000.0000.000
vᵢ0.0007,500.00015,000.0000.000-7,500.00015,000.000
θᵢ0.00015,000.00040,000.0000.000-15,000.00020,000.000
uⱼ-250,000.0000.0000.000250,000.0000.0000.000
vⱼ0.000-7,500.000-15,000.0000.0007,500.000-15,000.000
θⱼ0.00015,000.00020,000.0000.000-15,000.00040,000.000
Numerical [k′e]

Roof beam M2

Local 6 × 6 matrix for L = 6 m
uᵢvᵢθᵢuⱼvⱼθⱼ
uᵢ166,666.6670.0000.000-166,666.6670.0000.000
vᵢ0.0002,222.2226,666.6670.000-2,222.2226,666.667
θᵢ0.0006,666.66726,666.6670.000-6,666.66713,333.333
uⱼ-166,666.6670.0000.000166,666.6670.0000.000
vⱼ0.000-2,222.222-6,666.6670.0002,222.222-6,666.667
θⱼ0.0006,666.66713,333.3330.000-6,666.66726,666.667
Step 3

Rotate each member matrix into global X/Y

Direction cosines connect the member’s local axial/transverse directions to the frame axes.

[ke] = [Te]ᵀ[k′e][Te]

The beam is already aligned with global X. The left column local x-axis points upward, while the right column local x-axis points downward because M3 is defined from N3 to N4.

M1 · N1 → N2

θ = +90°

c = 0 · s = 1
010000
-100000
001000
000010
000-100
000001
M2 · N2 → N3

θ = 0°

c = 1 · s = 0
100000
010000
001000
000100
000010
000001
M3 · N3 → N4

θ = −90°

c = 0 · s = -1
0-10000
100000
001000
0000-10
000100
000001
Step 4

Convert the roof UDL into consistent nodal actions

The member load must enter the same joint-DOF system as the 12 kN nodal load.

V = wL/2; M = wL²/12 V = 8(6)/2 = 24.000 kN; M = 8(6²)/12 = 24.000 kN·m {pM2} = {0, −24, −24, 0, −24, 24}ᵀ {Ff} = {0, −24, −24, 12, −24, 24}ᵀ

The beam consistent-load vector is first placed at the M2 element DOFs. Adding the +12 kN nodal force at u₃ produces the complete free-DOF load vector.

Free DOFApplied action
u20.000 kN
v2-24.000 kN
θ2-24.000 kN·m
u312.000 kN
v3-24.000 kN
θ324.000 kN·m
Step 5

Assemble the three member contributions

Common joint DOFs land in the same rows and columns, so their stiffness terms add directly.

[K] = Σ[Ae]ᵀ[ke][Ae] [Kff] = [Kff]M1 + [Kff]M2 + [Kff]M3

Each transformed member matrix is placed into the global rows and columns belonging to its end nodes. The tables show the actual contribution of each member after retaining only the six free roof DOFs.

MemberElement DOFsGlobal placement
M11–6u₁, v₁, θ₁, u₂, v₂, θ₂
M21–6u₂, v₂, θ₂, u₃, v₃, θ₃
M31–6u₃, v₃, θ₃, u₄, v₄, θ₄
[Kff]M1

Left-column contribution at N2

u₂v₂θ₂u₃v₃θ₃
u₂7,500.0000.00015,000.0000.0000.0000.000
v₂0.000250,000.0000.0000.0000.0000.000
θ₂15,000.0000.00040,000.0000.0000.0000.000
u₃0.0000.0000.0000.0000.0000.000
v₃0.0000.0000.0000.0000.0000.000
θ₃0.0000.0000.0000.0000.0000.000
[Kff]M2

Roof-beam contribution at N2 and N3

u₂v₂θ₂u₃v₃θ₃
u₂166,666.6670.0000.000-166,666.6670.0000.000
v₂0.0002,222.2226,666.6670.000-2,222.2226,666.667
θ₂0.0006,666.66726,666.6670.000-6,666.66713,333.333
u₃-166,666.6670.0000.000166,666.6670.0000.000
v₃0.000-2,222.222-6,666.6670.0002,222.222-6,666.667
θ₃0.0006,666.66713,333.3330.000-6,666.66726,666.667
[Kff]M3

Right-column contribution at N3

u₂v₂θ₂u₃v₃θ₃
u₂0.0000.0000.0000.0000.0000.000
v₂0.0000.0000.0000.0000.0000.000
θ₂0.0000.0000.0000.0000.0000.000
u₃0.0000.0000.0007,500.0000.00015,000.000
v₃0.0000.0000.0000.000250,000.0000.000
θ₃0.0000.0000.00015,000.0000.00040,000.000
Assembled result

Reduced global stiffness matrix [Kff]

DOF order: u₂, v₂, θ₂, u₃, v₃, θ₃
DOFu₂v₂θ₂u₃v₃θ₃
u₂174,166.6670.00015,000.000-166,666.6670.0000.000
v₂0.000252,222.2226,666.6670.000-2,222.2226,666.667
θ₂15,000.0006,666.66766,666.6670.000-6,666.66713,333.333
u₃-166,666.6670.0000.000174,166.6670.00015,000.000
v₃0.000-2,222.222-6,666.6670.000252,222.222-6,666.667
θ₃0.0006,666.66713,333.33315,000.000-6,666.66766,666.667
Step 6

Apply the fixed-base boundary conditions and solve

Partitioning removes the six known zero displacements without discarding their reaction rows.

[[Kcc, Kcf], [Kfc, Kff]] {dc, df}ᵀ = {Fc, Ff}ᵀ {dc} = 0 ⇒ [Kff]{df} = {Ff} [Kff]{df} = {Ff}

The transformed member matrices and consistent member-load vector are assembled into the global system. Applying the six base restraints leaves this 6 × 6 roof-joint equation.

Solved vector in calculation units

DOFValueUnit
u₂0.001289030548m
v₂-0.000083245350m
θ₂-0.000694027884rad
u₃0.001284574413m
v₃-0.000108754650m
θ₃0.000207225404rad

Same answer in readable units

DOFValueUnit
u21.289031mm
v2-0.083245mm
θ2-0.694028mrad
u31.284574mm
v3-0.108755mm
θ30.207225mrad
Two rows written out 174166.667(0.001289031) + 15000(−0.000694028) − 166666.667(0.001284574) = 0.000000 kN −166666.667(0.001289031) + 174166.667(0.001284574) + 15000(0.000207225) = 12.000000 kN
Row[Kff]{df}Applied FfResidual
u₂0.000000 kN0.000000 kN0.000000000
v₂-24.000000 kN-24.000000 kN0.000000000
θ₂-24.000000 kN·m-24.000000 kN·m0.000000000
u₃12.000000 kN12.000000 kN0.000000000
v₃-24.000000 kN-24.000000 kN0.000000000
θ₃24.000000 kN·m24.000000 kN·m0.000000000
Step 7

Recover the horizontal, vertical and moment reactions

The restrained rows were not solved for displacement; they are now used to recover all six base actions.

{Rc} = [Kcf]{df} − {Fc}

Recovering the restrained rows gives every fixed-base component, not only the vertical reactions.

Column coupling block

Reaction recovery matrix

Maps the roof-node [u, v, θ] vector to [Rx, Ry, Mz]
-7,500.0000.000-15,000.000
0.000-250,000.0000.000
15,000.0000.00020,000.000
N1 [R] = [Kcf] {0.001289030548, -0.000083245350, -0.000694027884}ᵀ {0.742689, 20.811337, 5.454901}ᵀ Rx kN · Ry kN · Mz kN·m
N4 [R] = [Kcf] {0.001284574413, -0.000108754650, 0.000207225404}ᵀ {-12.742689, 27.188663, 23.413124}ᵀ Rx kN · Ry kN · Mz kN·m
SupportRx (kN)Ry (kN)Mz (kN·m)
N10.74268920.8113375.454901
N4-12.74268927.18866323.413124
Step 8

Recover member end actions and close the equilibrium checks

The beam displacement vector is returned to its local stiffness equation, including the UDL fixed-end actions.

{f′M2} = [k′M2]{d′M2} − {pM2} {f′M2} = {0.742689, 20.811337, 8.425657, -0.742689, 27.188663, -27.557632}ᵀ

The recovered vector contains the actions exerted by M2 at its two nodes. The plotted internal-force signs follow the corresponding member cut-face convention.

M2 component[k′M2]{d′M2}−{pM2}Recovered end action
Nᵢ0.742689 kN0.000000 kN0.742689 kN
Vᵢ-3.188663 kN24.000000 kN20.811337 kN
Mᵢ-15.574343 kN·m24.000000 kN·m8.425657 kN·m
Nⱼ-0.742689 kN0.000000 kN-0.742689 kN
Vⱼ3.188663 kN24.000000 kN27.188663 kN
Mⱼ-3.557632 kN·m-24.000000 kN·m-27.557632 kN·m
ΣFx = 0.742689 − 12.742689 + 12.000000 = 0.000000 kNΣFy = 20.811337 + 27.188663 − 48.000000 = 0.000000 kNΣMN1 = 5.454901 + 23.413124 + 6(27.188663) − 48(3) − 12(4) = 0.000000 kN·m

04 · Hand-versus-solver verification

The hand calculation matches the Optimal Beam result

Independent values from the calculation above are compared directly with the stored calculator result.

All declared checks passedVerified July 29, 2026
CheckHand calculationOptimal BeamDifferenceStatus
Horizontal reaction at N4 -12.742689 kN -12.742689 kN 0.000000% Pass
Vertical reaction at N1 20.811337 kN 20.811337 kN 0.000000% Pass
Vertical reaction at N4 27.188663 kN 27.188663 kN 0.000000% Pass
Base moment at N1 5.454901 kN·m 5.454901 kN·m 0.000000% Pass
Base moment at N4 23.413124 kN·m 23.413124 kN·m 0.000000% Pass
Roof sway at N2 1.289031 mm 1.289031 mm 0.000000% Pass
Rotation at N2 -0.694028 mrad -0.694028 mrad 0.000000% Pass
Beam end moment at N3 -27.557632 kN·m -27.557632 kN·m 0.000000% Pass
Right-column compression -27.188663 kN -27.188663 kN 0.000000% Pass

05 · Analysis scope

What the worked model includes

This is a first-order structural analysis example, not a completed member or connection design.

Included in the model

  • Straight, prismatic 2D frame elements with axial and flexural stiffness.
  • Rigid, unreleased beam-to-column connections.
  • Fixed bases restraining horizontal translation, vertical translation and rotation.
  • The 8 kN/m roof UDL and 12 kN horizontal nodal load shown in the diagram.
  • First-order, small-displacement, linear-elastic response.
  • Member axial force, shear force, bending moment and deflected shape.

Outside the analysis scope

  • P-Delta effects, geometric nonlinearity or large-displacement response.
  • Member yielding, buckling, local instability or plastic hinge formation.
  • Connection panel-zone flexibility, semi-rigid joints or base-plate flexibility.
  • Out-of-plane behavior, lateral-torsional buckling or three-dimensional load paths.
  • Code load factors, resistance checks, drift limits or member design.
  • Member self-weight unless it is entered as an applied load.
P-Delta boundary

Optimal Beam currently performs first-order linear-elastic analysis and does not include P-Delta effects. Use an appropriate second-order method when axial compression acting through sway may materially amplify moments or drift.

06 · Common modeling mistakes

Configuration errors that change the answer

01

Using pinned beam-to-column joints when the intended frame is moment-resisting.

02

Leaving either base rotation unrestrained when the idealization requires a fixed base.

03

Applying the roof UDL in global X or local X instead of transverse to the horizontal beam.

04

Reporting only vertical reactions and omitting the horizontal and moment reactions at fixed bases.

05

Reading a local member sign as a global direction without checking the member i-to-j axis.

06

Treating first-order sway as a P-Delta result or using the analysis as a code design check.

Continue with the exact model

Open the free example or download the Optimal Beam report

The model, diagrams, result tables and calculation report come from this same calculator analysis.

Engineering authorship

Prepared and reviewed by Tamer Hijjawi, P.Eng.

Analysis scope: First-order linear elastic 2D frame analysis. Last model verification: July 29, 2026.

Review solver verification