Skip to content
LumenaryAcademy
Mechanics 70 min

Trusses and frames

Triangles, two-force members and a truss solver in NumPy — and how frames and machines differ from trusses.

Code tested · 5AI-draftedAwaiting review by a mechanical engineer

Your guides: Chloe · The Designer, Margaret · The Test Engineer, Gideon · The Checker

MotivationH

Why bridges are full of triangles

Look at a railway bridge, an electricity pylon, a stadium roof or the jib of a tower crane and you will see the same pattern: slender straight bars joined into triangles. In Structures you saw why. A square of four bars pinned at the corners folds flat at the slightest push, while a triangle cannot change shape without one of its bars changing length. Put enough triangles together and you get a truss: a structure that carries large loads over long spans using very little material, because each bar is only pulled or pushed along its own length, which is the most efficient way to use a material.

A truss is also the ideal next step after Statics and equilibrium, because it is nothing but many small equilibrium problems linked together: Newton's laws with zero acceleration, as in Lumenary Math's classical mechanics. Solve them one joint at a time by hand, or all at once as one linear system, and you know the force in every member, which is what a designer needs in order to choose each member's size. By the end of this lesson you will have a twenty-line truss solver in NumPy and will have used it to decide how deep a bridge truss should be.

DefinitionsH

The ideal truss

Definition— truss

A truss is a structure of straight members connected at their ends by joints. Truss analysis assumes that:

  1. the joints are frictionless pins, so they cannot transmit moments;
  2. loads and support reactions act only at the joints;
  3. the members' own weights are either neglected or split between their two end joints;
  4. the deformations are small, so equilibrium can be written using the undeformed geometry.

Under these assumptions every member is touched at only two points, its end pins, and so it is a two-force member: the forces at its two ends must be equal, opposite and along the line between them, or the member would turn. A member's whole state is therefore a single number, its axial force NN. By convention N>0N > 0 is tension (the member pulls on its joints) and N<0N < 0 is compression (it pushes on them).

Counting: determinacy and rigidity

Each joint of a plane truss gives two equilibrium equations, ∑Fx=0\sum F_x = 0 and ∑Fy=0\sum F_y = 0. With jj joints, mm members and rr reaction components there are 2j2j equations and m+rm + r unknowns. This gives Maxwell's rule, a necessary test:

  • m+r<2jm + r < 2j: too few members or supports; the truss is a mechanism and will move.
  • m+r=2jm + r = 2j: possibly statically determinate: the equilibrium equations alone give every force.
  • m+r>2jm + r > 2j: statically indeterminate; there are redundant members, and their forces depend on how the members stretch.

A simple truss, built from one triangle by repeatedly adding a joint with two new members, always has m=2j−3m = 2j - 3; supported by a pin and a roller (r=3r = 3), it satisfies m+r=2jm + r = 2j and is rigid and determinate. In three dimensions the counts become 3j3j equations and the simple truss grows from a tetrahedron.

Worked examplesH

The method of joints and the method of sections

Our running example is a Pratt truss, a layout patented by Thomas and Caleb Pratt in the United States in 1844 and still used for short-span bridges and roofs: vertical posts, with diagonals that slope down towards the middle of the span. This one has six panels of 4 m, a span of 24 m and a depth of 4 m. The deck hangs from the lower joints, which each carry 50 kN, and the truss rests on a pin at L0L_0 and a roller at L6L_6.

L0L1L2L3L4L5L6U1U2U3U4U550 kN50 kN50 kN50 kN50 kN6 panels × 4 m = 24 m; depth 4 msection
A six-panel Pratt truss, 24 m long and 4 m deep, with lower joints L0 to L6 and upper joints U1 to U5. Each inner lower joint carries 50 kN from the deck. The dashed line is the section used in the method of sections: it cuts the top chord U2–U3, the diagonal U2–L3 and the bottom chord L2–L3.

By symmetry, each support carries half of the 250 kN total: Ay=By=125A_y = B_y = 125 kN, and with no horizontal load Ax=0A_x = 0.

Example— Method of joints: start where there are only two unknowns

Cut out one joint at a time, drawing every member force as tension (pulling away from the joint); a negative answer then means compression.

Joint L0L_0. Three forces act: the reaction of 125 kN upwards, the bottom chord L0L1L_0L_1 (horizontal) and the end post L0U1L_0U_1 at 45°. Vertically, 125+NL0U1sin⁡45°=0125 + N_{L_0U_1}\sin 45° = 0, so NL0U1=−176.8N_{L_0U_1} = -176.8 kN: compression, as expected for a post pushing up on the end of the bridge. Horizontally, NL0L1+NL0U1cos⁡45°=0N_{L_0L_1} + N_{L_0U_1}\cos 45° = 0, so NL0L1=+125N_{L_0L_1} = +125 kN, tension.

Joint L1L_1. Now only two members are unknown: the vertical L1U1L_1U_1 and the chord L1L2L_1L_2. Vertically, NL1U1−50=0N_{L_1U_1} - 50 = 0: the vertical hangs the 50 kN deck load from the upper joint, 50 kN tension. Horizontally, NL1L2=NL0L1=125N_{L_1L_2} = N_{L_0L_1} = 125 kN.

You can carry on across the truss, always choosing a joint with at most two unknowns. It works, but errors accumulate along the way, and the force in a member in the middle needs every joint before it.

Example— Method of sections: one cut, one member

To find the forces in panel 3 directly, cut the whole truss along the dashed line and keep the left part. Three unknown member forces cross the cut — NU2U3N_{U_2U_3}, NU2L3N_{U_2L_3} and NL2L3N_{L_2L_3} — and the left part offers three equilibrium equations. The trick, due to August Ritter (1862), is to take moments about the point where two of the unknown forces meet, so that the third appears alone.

Bottom chord L2L3L_2L_3: take moments about U2U_2 at (8, 4) m, where the top chord and the diagonal meet. The reaction at L0L_0 has lever arm 8 m, the 50 kN at L1L_1 has 4 m, the load at L2L_2 passes through U2U_2's vertical and has none, and the bottom chord acts 4 m below U2U_2:

4 NL2L3−125×8+50×4=0  ⇒  NL2L3=200 kN (tension).4\,N_{L_2L_3} - 125 \times 8 + 50 \times 4 = 0 \;\Rightarrow\; N_{L_2L_3} = 200 \text{ kN (tension)}.

Top chord U2U3U_2U_3: moments about L3L_3 at (12, 0), where the diagonal and the bottom chord meet: −4 NU2U3−125×12+50×8+50×4=0-4\,N_{U_2U_3} - 125 \times 12 + 50 \times 8 + 50 \times 4 = 0, so NU2U3=−225N_{U_2U_3} = -225 kN (compression).

Diagonal U2L3U_2L_3: the two chords are horizontal, so vertical equilibrium involves only the diagonal: 125−50−50−NU2L3sin⁡45°=0125 - 50 - 50 - N_{U_2L_3}\sin 45° = 0, so NU2L3=35.4N_{U_2L_3} = 35.4 kN (tension).

The pattern is worth noticing: the top chord is squeezed and the bottom chord stretched, together forming a couple that resists the bending moment of the load, much as the top and bottom of a beam do. The chord forces are largest at mid-span, where the bending moment is largest; the diagonals carry the shear and are busiest near the supports. A Pratt truss slopes its diagonals so that, under gravity loads, they are in tension and the shorter verticals take the compression — sensible in steel, because long members in compression can buckle.

Zero-force members

Some members carry no force under a given load, and spotting them first saves work. Two rules follow from the equilibrium of a single joint:

  • At an unloaded joint with exactly two members that are not collinear, both members carry zero force.
  • At an unloaded joint with three members, two of them collinear, the third member carries zero force.

In the Pratt truss, joint U3U_3 is unloaded and has two collinear top-chord members and the vertical L3U3L_3U_3, so that vertical is a zero-force member. It is not useless. Without it, U3U_3 would hang between two collinear bars with nothing to stop it moving up or down, so the truss would no longer be rigid; it also halves the length of top chord free to buckle in the plane of the truss, and it carries load the moment any is applied at U3U_3.

ComputationC

A general truss solver in NumPy

The method of joints, done for every joint at once, is a linear system. Number the unknowns: one axial force per member, one force per support restraint. Number the equations: ∑Fx\sum F_x and ∑Fy\sum F_y at each joint. A member from joint aa to joint bb, with unit vector u\mathbf u from aa to bb, contributes +u+\mathbf u to joint aa's equations and −u-\mathbf u to joint bb's, since in tension it pulls each end towards the other. The result is the equilibrium matrix A\mathbf A, and the truss is in equilibrium when A x+f=0\mathbf A\,\mathbf x + \mathbf f = \mathbf 0, where f\mathbf f holds the applied loads.

python
import numpy as np

def solve_truss(nodes, members, supports, loads):
    """Member forces (tension positive) and reactions of a pin-jointed plane truss.

    nodes:    list of (x, y) joint coordinates in metres
    members:  list of (a, b) pairs of joint indices
    supports: list of (joint, direction): each restraint can push along a unit vector
    loads:    dict joint -> (Fx, Fy) in kN
    """
    nodes = np.asarray(nodes, dtype=float)
    j, m, r = len(nodes), len(members), len(supports)
    A = np.zeros((2 * j, m + r))           # row 2i: sum of Fx at joint i; row 2i + 1: sum of Fy
    for e, (a, b) in enumerate(members):
        u = (nodes[b] - nodes[a]) / np.linalg.norm(nodes[b] - nodes[a])
        A[2*a:2*a+2, e] += u               # a member in tension pulls joint a towards b ...
        A[2*b:2*b+2, e] -= u               # ... and joint b towards a
    for k, (node, direction) in enumerate(supports):
        A[2*node:2*node+2, m + k] = direction
    F = np.zeros(2 * j)
    for node, (fx, fy) in loads.items():
        F[2*node:2*node+2] = fx, fy
    rank = np.linalg.matrix_rank(A)
    if A.shape[0] != A.shape[1] or rank < A.shape[1]:
        raise ValueError(f"not determinate: {2*j} equations, {m + r} unknowns, rank {rank}")
    x = np.linalg.solve(A, -F)             # equilibrium at every joint: A x + F = 0
    return x[:m], x[m:]

# A Pratt truss: 6 panels of 4 m (span 24 m), 4 m deep. Lower joints L0..L6, upper U1..U5.
names = [f"L{i}" for i in range(7)] + [f"U{i}" for i in range(1, 6)]
nodes = [(4.0 * i, 0.0) for i in range(7)] + [(4.0 * i, 4.0) for i in range(1, 6)]
J = {name: k for k, name in enumerate(names)}
pairs = ["L0 L1", "L1 L2", "L2 L3", "L3 L4", "L4 L5", "L5 L6",     # bottom chord
         "U1 U2", "U2 U3", "U3 U4", "U4 U5",                       # top chord
         "L1 U1", "L2 U2", "L3 U3", "L4 U4", "L5 U5",              # verticals
         "L0 U1", "L6 U5",                                         # inclined end posts
         "U1 L2", "U2 L3", "U5 L4", "U4 L3"]                       # diagonals
members = [(J[p.split()[0]], J[p.split()[1]]) for p in pairs]
supports = [(J["L0"], (1.0, 0.0)), (J["L0"], (0.0, 1.0)), (J["L6"], (0.0, 1.0))]  # pin, roller
loads = {J[f"L{i}"]: (0.0, -50.0) for i in range(1, 6)}            # 50 kN at each deck joint

N, R = solve_truss(nodes, members, supports, loads)
print(f"{len(nodes)} joints, {len(members)} members, {len(supports)} reactions")
print("reactions Ax, Ay, By (kN):", np.round(R, 1) + 0.0)
for p, n in zip(pairs, N):
    state = "zero-force" if abs(n) < 1e-9 else ("tension" if n > 0 else "compression")
    print(f"  {p.replace(' ', '-'):6}  {abs(n):6.1f} kN  {state}")

# The right count in the wrong place: move panel 3's diagonal into panel 2, beside U1-L2.
moved = [p for p in pairs if p != "U2 L3"] + ["L1 U2"]
try:
    solve_truss(nodes, [(J[a], J[b]) for a, b in (p.split() for p in moved)], supports, loads)
except ValueError as err:
    print("diagonal moved:", err)
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Twelve joints give 24 equations; 21 members and 3 reactions give 24 unknowns; the matrix has full rank. Every hand result reappears: L0L1L_0L_1 125 kN tension, L1U1L_1U_1 50 kN tension, L2L3L_2L_3 200 kN tension, U2U3U_2U_3 225 kN compression, U2L3U_2L_3 35.4 kN tension, and the zero-force vertical L3U3L_3U_3. The largest force is the 225 kN of compression in the top chord at mid-span; the inclined end posts follow with 176.8 kN, and the hip verticals L1U1L_1U_1 and L5U5L_5U_5 simply hang the deck from the end panels.

The same twenty lines solve any determinate plane truss: a roof, a crane jib, a footbridge. The rank check turns Maxwell's and Laman's conditions into a computation, and the last lines show why it is needed. Moving one diagonal from panel 3 into panel 2 keeps 24 unknowns and 24 equations, so the count is satisfied, but the rank drops to 23: panel 2 is over-braced, panel 3 has no diagonal and folds, and the solver refuses instead of returning nonsense.

How deep should a truss be?

A deeper truss has longer lever arms, so its chords carry less force. But its diagonals and posts get longer, and long members in compression must be made fatter to stop them buckling. Where is the balance? The block below sizes every member in steel: tension members by stress alone (150 MPa allowed), compression members also against Euler buckling as thin round tubes, with a factor of 2 on the buckling load. You will meet the buckling formula properly in Deflection and buckling; here it is enough that the force a slender strut can carry falls with the square of its length.

python
import numpy as np

def member_forces(nodes, members, supports, loads):
    """The solver above, condensed: tension-positive member forces of a plane truss."""
    P = np.asarray(nodes, dtype=float)
    A = np.zeros((2 * len(P), len(members) + len(supports)))
    for e, (a, b) in enumerate(members):
        u = (P[b] - P[a]) / np.linalg.norm(P[b] - P[a])
        A[2*a:2*a+2, e] += u
        A[2*b:2*b+2, e] -= u
    for k, (node, d) in enumerate(supports):
        A[2*node:2*node+2, len(members) + k] = d
    F = np.zeros(2 * len(P))
    for node, f in loads.items():
        F[2*node:2*node+2] = f
    return np.linalg.solve(A, -F)[:len(members)]

def pratt(depth, panels=6, width=4.0, load=50.0):
    """Joints, members, supports and loads of a Pratt truss like the one above."""
    n = panels
    nodes = [(width * i, 0.0) for i in range(n + 1)] + [(width * i, depth) for i in range(1, n)]
    U = lambda i: n + i                                   # index of the upper joint above L_i
    members = [(i, i + 1) for i in range(n)] + [(U(i), U(i + 1)) for i in range(1, n - 1)]
    members += [(i, U(i)) for i in range(1, n)] + [(0, U(1)), (n, U(n - 1))]
    members += [(U(i), i + 1) for i in range(1, n // 2)] + [(U(i), i - 1) for i in range(n // 2 + 1, n)]
    supports = [(0, (1.0, 0.0)), (0, (0.0, 1.0)), (n, (0.0, 1.0))]
    return nodes, members, supports, {i: (0.0, -load) for i in range(1, n)}

# Size every member of steel: tension members by stress alone; compression members also
# against Euler buckling, as thin round tubes (wall = diameter / 20), with a factor of 2.
E, sigma, factor, rho = 210e9, 150e6, 2.0, 7850.0        # Pa, Pa, -, kg/m^3
def area(N, L):
    A = abs(N) / sigma
    if N < 0:
        d = (160 * factor * abs(N) * L**2 / (np.pi**3 * E)) ** 0.25
        A = max(A, np.pi * d**2 / 20)
    return A

print("depth  span/depth  largest force   steel (kg): stress only  with buckling")
for depth in [2.0, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 8.0]:
    nodes, members, supports, loads = pratt(depth)
    N = member_forces(nodes, members, supports, loads) * 1e3          # newtons
    P = np.asarray(nodes)
    L = np.array([np.linalg.norm(P[b] - P[a]) for a, b in members])
    m_stress = rho * np.sum(np.abs(N) / sigma * L)
    m_buckle = rho * sum(area(n, l) * l for n, l in zip(N, L))
    print(f"{depth:4.1f} m   {24 / depth:5.1f}     {np.abs(N).max() / 1e3:6.1f} kN"
          f"              {m_stress:5.0f}           {m_buckle:5.0f}")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

If strength were all that mattered, deeper would always be lighter: the stress-only column keeps falling. Once buckling is included, the lightest truss in this family is about 4 m deep, with its diagonals at 45°, and the minimum is flat: anything from 3.5 m to 4.5 m is within a couple of per cent. With smooth formulas for the member sizes you could find the optimum by calculus, setting the derivative of mass with respect to depth to zero; the table does it by brute force. The flatness of the minimum is typical, and it is why the final choice of depth is made on other grounds — clearance under and over the deck, wind area, stiffness, how the members are fabricated and transported. The model is deliberately crude (no self-weight, no connections, no moving loads, plain Euler buckling instead of a design code's column curves), so trust its trend more than its 824 kg.

Worked examplesH

Frames and machines

Not every structure is a truss. A frame is a structure, designed to stay put, with at least one multi-force member: a member loaded at three or more points, or along its length, which therefore bends. A machine is the same kind of assembly designed to move and to transmit or change forces: pliers, bolt cutters, a car jack, an excavator arm. The method is the same for both. Take the assembly apart at its pins, draw a free-body diagram of each member, remember that the force a pin exerts on one member is equal and opposite to the force it exerts on the other (Newton's third law), and use two-force members wherever you find them, since each one reduces two unknowns to one.

PQ (from the object)C17 mm85 mmhandlejawpin force = P + Q
One half of a pair of pliers, cut free at its pivot C. The hand presses on the handle with force P at 85 mm from the pivot; the gripped object pushes back on the jaw with force Q at 17 mm; the pivot supplies the rest.

Example— How hard do pliers grip?

A hand squeezes the handles of a pair of pliers with P=120P = 120 N each, 85 mm from the pivot; the object is held 17 mm from the pivot on the other side. Cut one half free. Its forces are PP on the handle, the object's push QQ on the jaw and the pin force at C. Moments about C eliminate the pin force:

Q×17=P×85  ⇒  Q=5P=600 N.Q \times 17 = P \times 85 \;\Rightarrow\; Q = 5P = 600 \text{ N}.

Vertical equilibrium then gives the pin force: P+Q=720P + Q = 720 N, larger than either. That is why a pliers pivot is the part that wears, and why a hard object should be gripped deep in the jaws, close to the pivot, where the mechanical advantage is greatest. The geometry, not the hand, sets the ratio of 5: the lever of Simple machines doing real work.

A jib crane, the kind bolted to a workshop wall or a loading bay, is a frame. Its horizontal beam is pinned to the wall at A and propped by a diagonal strut CD; a trolley carrying the load runs along the beam. The strut, pinned at both ends and loaded nowhere else, is a two-force member. The beam is not: it is loaded at A, D and the trolley, and it bends.

ABCDWxstrut
A wall-mounted jib crane. The beam AB is pinned to the wall at A; the strut CD, pinned at C and D, is a two-force member. A trolley carries the load W at a distance x from the wall.

With A at (0, 2.0) m, B at (3.0, 2.0) m, C at (0, 0.5) m and D at (2.0, 2.0) m, the strut points along (0.8, 0.6). The beam's free-body diagram has three unknowns, AxA_x, AyA_y and the strut force FF, and three equations; the block solves them for the trolley at several positions with a 10 kN load.

python
import numpy as np

# A wall-mounted jib crane. The beam runs from a pin A on the wall to its free end B;
# a strut (a two-force member) runs from a pin C lower on the wall to a pin D on the beam.
A = np.array([0.0, 2.0])
B = np.array([3.0, 2.0])
C = np.array([0.0, 0.5])
D = np.array([2.0, 2.0])
W = 10.0                                  # kN hanging from a trolley at distance x from the wall

u = (D - C) / np.linalg.norm(D - C)       # a compressed strut pushes the beam along C -> D

def cross(r, f):                          # moment of force f at offset r (2-D)
    return r[0] * f[1] - r[1] * f[0]

print(" trolley x   strut force   pin A: Ax      Ay")
for x in [0.5, 1.0, 1.5, 2.0, 2.5, 3.0]:
    # Free-body diagram of the beam. Unknowns [Ax, Ay, F] (F > 0: strut in compression).
    M = np.array([[1.0, 0.0, u[0]],
                  [0.0, 1.0, u[1]],
                  [0.0, 0.0, cross(D - A, u)]])      # the third row: moments about A
    rhs = -np.array([0.0, -W, cross(np.array([x, 0.0]), np.array([0.0, -W]))])
    Ax, Ay, F = np.round(np.linalg.solve(M, rhs), 6) + 0.0
    print(f"   {x:3.1f} m     {F:5.1f} kN C    {Ax:6.1f}  {Ay:6.1f} kN")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

With the trolley at the tip, the strut is squeezed with 25 kN, two and a half times the load. The signs of the pin force tell the rest: Ax=−20A_x = -20 kN means the pin must pull the beam towards the wall, so the beam is trying to pull the pin's anchors out of the wall with 20 kN; and once the trolley passes D, AyA_y turns negative, because the beam becomes a lever with the strut as its fulcrum and the pin must hold its back end down. The anchors at A are designed for that pull-out and uplift, and a crane like this carries a plate stating its safe working load, which must never be exceeded: the margins in that number cover exactly the forces this table shows.

History & global context

From carpenters' rules to the stiffness matrix

Timber trusses were built for centuries by rule and experience, in roofs across Europe and Asia and in the covered bridges of Switzerland and New England. The first rational analysis came from the American engineer Squire Whipple, whose 1847 book A Work on Bridge Building computed member forces joint by joint; in Russia, Dmitry Zhuravsky worked out the forces in the timber trusses of the Saint Petersburg–Moscow railway's bridges at about the same time. In Germany, August Ritter published the method of sections in 1862, and Karl Culmann in Zürich turned truss analysis into geometric construction, graphic statics; James Clerk Maxwell's papers of 1864 gave both the counting rule and the reciprocal force diagrams that Luigi Cremona developed further in Italy. For a century, graphic statics was how bridge and roof trusses were designed.

Failures taught as much as theory. In 1907 the Quebec Bridge in Canada, then under construction as the longest cantilever span in the world, collapsed, killing about 75 workers. The inquiry found that lower-chord compression members had buckled, and that the structure's own weight had been underestimated and not rechecked when the span was lengthened. A century later, in 2007, the I-35W bridge in Minneapolis, a steel deck truss, collapsed with the loss of 13 lives; the US National Transportation Safety Board found that some gusset plates, the plates that join members at a truss's joints, had been undersized in the original design. The ideal truss has frictionless pins; a real one depends on its joints.

ExplanationH

Trusses in professional practice

Analysis. Today a truss is rarely analysed as an ideal pin-jointed truss alone. Design offices use frame-analysis and finite element software that models members as beams with real connections, includes self-weight, moving loads, wind and temperature, and checks every member against a design code's rules for tension, compression and buckling (for steel, for example, Eurocode 3 in Europe and the AISC specification in the United States). The equilibrium matrix you built here is, up to sign, the transpose of the compatibility matrix that maps joint displacements to member stretches; combine the two with each member's stiffness and you get the stiffness method, the foundation of every structural program and of the finite element method.

Tools. Open-source options include CalculiX, driven by FreeCAD's FEM workbench, and OpenSees for earthquake engineering; commercial packages from firms in the United States, Germany, South Korea and elsewhere are the everyday tools of design offices. A CalculiX model of a simple three-bar truss looks like this (an input deck, shown for its structure; not run here):

text
** A three-bar plane truss in CalculiX (Abaqus-style) input. Not run here.
*NODE, NSET=NALL
1, 0.0, 0.0, 0.0
2, 4.0, 0.0, 0.0
3, 2.0, 3.0, 0.0
*ELEMENT, TYPE=T3D2, ELSET=EALL
1, 1, 2
2, 2, 3
3, 3, 1
*MATERIAL, NAME=STEEL
*ELASTIC
210000.E6, 0.3
*SOLID SECTION, ELSET=EALL, MATERIAL=STEEL
0.0012
*BOUNDARY
1, 1, 3
2, 2, 3
3, 3, 3
*STEP
*STATIC
*CLOAD
3, 2, -20000.
*EL PRINT, ELSET=EALL
S
*END STEP

The cards name the joints (*NODE), the members as two-node truss elements (*ELEMENT), the material and cross-sectional area, the supports (*BOUNDARY: node, first and last restrained direction) and the load (*CLOAD), then ask for member stresses. The physics is exactly the one in solve_truss; the program adds stiffness, so it can also report deflections and handle indeterminate trusses.

Inspection. Real trusses are inspected throughout their lives for corrosion at joints, cracked welds, loose bolts and vehicle strikes. Standards bodies such as ASTM International and ISO publish the material and testing standards that inspections rely on, and bridge owners keep inspection records for decades.

Optional Christian reflection · A duty of care

A reflection from the Christian tradition that inspires Lumenary Academy. It is not part of the mathematics and you are welcome to skip it.

Since 1925, many engineering graduates in Canada have taken part in a ceremony, written by Rudyard Kipling, in which they receive an iron ring to wear on the working hand as a reminder of their obligations to the public; its story is often told alongside the Quebec Bridge collapse. Christians recognise in that obligation the command to love one's neighbour: the people who will cross a bridge are neighbours the engineer will never meet. Checking the joints, rechecking the weights when the design changes, and saying so when something is wrong are the ordinary forms that love takes in this work. This reflection is optional, and nothing in the lesson depends on it.

Common misconceptionsH

Common misconceptions

Misconception

"Zero-force members can be removed." They carry nothing under one particular load case. Move the load, add wind, or consider buckling of the long chord they brace, and they matter. Removing L3U3L_3U_3 from the Pratt truss would leave U3U_3 free to move up and down between two collinear bars, and the top chord twice as long between braced points against buckling in the plane of the truss.

Misconception

"If m+r=2jm + r = 2j, the truss is rigid and determinate." The count is necessary, not sufficient. A truss can be over-braced in one panel and missing a diagonal in another, and still satisfy the count while that second panel folds. The rank of the equilibrium matrix, or Laman's condition, settles it.

Misconception

"Every member of a frame is a two-force member." Only members pinned at two points and loaded nowhere else are. A beam with a load in its middle, or a lever with a pin at its centre, is a multi-force member: its end forces need not point along it, and it bends.

Misconception

"A Pratt truss's diagonals are always in tension." Only under loads like the symmetric deck load above. Put a single 100 kN load at L2L_2 alone and the solver gives the diagonal U2L3U_2L_3 47.1 kN of compression. Moving loads such as trains reverse the forces in diagonals near mid-span, so designers check every load position and add extra diagonals, called counters, where a reversal would matter.

Misconception

"Compression members just need the same area as tension members carrying the same force." A tension member fails by yielding or fracture, at a stress that does not depend on its length. A long compression member can buckle sideways at a far lower stress. That asymmetry is behind the Pratt layout, the depth study above, and the Quebec Bridge.

Exercises

Exercises

Several exercises use the Pratt truss of this lesson. Two ask for Python: one classifies a truss by the rank of its equilibrium matrix, the other builds a Warren truss and checks it against the method of sections.

1. Trusses and frames

Warm-upHuman

A plane truss has 11 joints and rests on a pin and a roller. How many members must it have for Maxwell's count m+r=2jm + r = 2j to hold?

2. Trusses and frames

CoreHuman

Take the lesson's Pratt truss, but with one load only: 100 kN at L2L_2, and no load at any other joint. Which of these members carry zero force? Choose all that apply.

Choose all that apply

3. Trusses and frames

CoreHuman

The lesson's Pratt truss (six 4 m panels, 4 m deep, pin at L0L_0, roller at L6L_6) now carries 40 kN at each of L1L_1 to L5L_5.

Use the method of sections to find the magnitude of the force in the top chord U2U3U_2U_3, in kN.

4. Trusses and frames

CoreHuman

A Howe truss has the same chords and verticals as the lesson's Pratt truss, but every diagonal slopes the other way: L1U2L_1U_2, L2U3L_2U_3, U3L4U_3L_4, U4L5U_4L_5 instead of U1L2U_1L_2, U2L3U_2L_3, U5L4U_5L_4, U4L3U_4L_3. Under the same five 50 kN deck loads, what happens to the web members?

Choose one

5. Trusses and frames

CoreHuman

You squeeze a pair of pliers with a force of 150 N on each handle, 90 mm from the pivot. The jaws grip a wire 18 mm from the pivot on the other side.

Cut one half of the pliers free. What is the force on the pivot pin, in newtons?

6. Trusses and frames

CoreComputational

Write classify(nodes, members, supports) for a pin-jointed plane truss, in the input format of the lesson's solve_truss. Build the equilibrium matrix A\mathbf A (two rows per joint; one column per member and per support restraint), find its rank, and return:

  • "mechanism" if the rank is less than the number of equations 2j2j (some loads cannot be balanced);
  • otherwise "indeterminate" if the rank is less than the number of unknowns m+rm + r (there is a self-stress);
  • otherwise "determinate".

The tests include the lesson's Pratt truss, the same truss with one diagonal moved, triangles and squares on various supports.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

7. Trusses and frames

StretchComputational

A Warren truss has no verticals: its diagonals zigzag between the chords, forming equilateral or isosceles triangles. Write warren(n, panel, depth) that returns (nodes, members) for one with n panels along the bottom:

  • bottom joints 0 to n at (i * panel, 0);
  • top joints n + 1 to 2n at ((i + 0.5) * panel, depth), so top joint n + 1 + i sits above the middle of bottom panel i;
  • members: the bottom chord, the top chord (between neighbouring top joints), and two diagonals per panel, from bottom joint i up to top joint n + 1 + i and down to bottom joint i + 1.

The lesson's solver is provided. The tests check your geometry and then compare the solver's chord forces with the method of sections.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Further reading and resources