Trusses, beams, deflection & buckling
Six self-contained experiments, each a genuinely working structural solver written in plain JavaScript — no libraries. Plane trusses are solved member-by-member by the method of joints and cut directly by the method of sections; beams give live shear-force and bending-moment diagrams for point loads, distributed loads and applied moments; deflection is integrated by the Macaulay bracket method; influence lines are swept by a moving unit load; and Euler buckling plots the critical load against slenderness for four end conditions. Pick an experiment on the left, then move through Aim, Theory, Procedure, the live Simulation, a graded Self-assessment, and References.
1 · Plane truss by the method of joints
A plane truss is an assembly of straight two-force members pin-connected at joints and loaded only at the joints. Each member carries pure axial force — tension (pulling on its joints) or compression (pushing). A truss is statically determinate and stable when m + r = 2j, where m is the number of members, r the number of reaction components and j the number of joints; if m + r exceeds 2j it is redundant, if it is less the assembly is a mechanism.
In the method of joints we isolate each pin and write the two scalar equilibrium equations of a concurrent force system. With member i making angle theta(i) with the horizontal at the joint, summing forces along x and y gives:
Sum Fy = 0: sum of N(i) sin theta(i) + Py = 0
Solving joints in an order where no joint has more than two unknown members yields every member force. Equivalently the whole truss is one linear system A·N = L, where A is the 2j by (m + r) matrix of unit member direction cosines plus reaction columns, N the unknown member and reaction forces and L the applied joint loads. We assemble and solve that system by Gaussian elimination with partial pivoting, so a positive N means tension and a negative N means compression. Global checks — vertical reactions sum to the total downward load, and the moment about a support is zero — confirm the reactions.
- Open Simulation and choose a truss from the geometry menu (Warren, Pratt, Howe, a simple triangle or a cantilever bracket). The supports are a pin and a roller, giving r = 3.
- Set the load magnitude and pick the loaded joint; the downward arrow appears at that joint.
- Press Solve. The full equilibrium system is assembled and solved; members turn red for tension and cyan for compression, with line thickness scaled to force.
- Read the reactions and the per-member force table; zero-force members are greyed.
- Confirm the global checks in the panel: vertical reactions sum to the total load and the moment residual is essentially zero.
- Change the load or geometry and re-solve to see how the force path through the truss changes.
Truss & member forcesready
Controls
| member | force kN | state |
|---|
- Hibbeler — Structural Analysis, 10th ed., Ch. 3 (Analysis of Statically Determinate Trusses). Pearson.
- Timoshenko & Young — Theory of Structures, 2nd ed. McGraw-Hill.
- Virtual Labs (IIT) — Structural Analysis: Analysis of a Truss, sa-nitk.vlabs.ac.in.
2 · Method of sections
The method of sections exploits the fact that any free body of a structure in equilibrium must itself be in equilibrium. We pass an imaginary cut through the truss, slicing at most three members whose forces are unknown, and consider the equilibrium of everything on one side of the cut. Because a rigid body in a plane has exactly three independent equations, one cut through three members lets us solve all three — or any one of them in a single equation by choosing a clever moment centre.
To isolate one diagonal, sum vertical forces — the horizontal chords contribute nothing — so the diagonal carries the net shear across the cut. To isolate a chord, take moments about the joint where the diagonal and the other chord meet; their lines of action pass through that point and drop out, leaving one equation in the chord force. The cut force is drawn as tension (arrow pulling away from the free body); a negative result means compression.
Chord: Sum M(joint) = 0 ⇒ N(chord) · (lever arm) = moment of external loads on the free body
The method is the engineer's shortcut: to grade one member of a large bridge truss you need not march through every joint — one well-placed section gives the answer immediately. Here the cut is shown as a dashed line, the chosen free body is shaded, and the chosen member force is solved and cross-checked against the full joint solution.
- Open Simulation. A Pratt truss with its reactions already computed is shown.
- Set the panel load. The reactions update from global equilibrium.
- Choose a cut position (between panels). The dashed section line appears, the members it crosses are highlighted, and the left free body is shaded.
- Pick the member to solve from the crossed members. The solver writes the equilibrium equation that isolates it.
- Read the worked equation in the log and the resulting force, with tension or compression labelled. Use Show all to list every crossed member at once.
Section cutready
Controls
- Hibbeler — Structural Analysis, 10th ed., Sec. 3.5 (The Method of Sections). Pearson.
- Kassimali — Structural Analysis, 6th ed., Ch. 4. Cengage.
- Virtual Labs (IIT) — Structural Analysis: Method of Sections, sa-nitk.vlabs.ac.in.
3 · Shear-force & bending-moment diagrams
Cut the beam at a distance x from the left and consider the left free body. The shear force V(x) is the algebraic sum of all transverse forces to the left; the bending moment M(x) is the sum of their moments about the cut. With the sagging-positive convention, V and M obey the fundamental differential relations:
So under a uniform load w the shear varies linearly and the moment parabolically; under no load the shear is constant and the moment linear. A point load P makes a jump of −P in V; an applied couple M0 makes a jump in M; the moment is locally maximum where V passes through zero (dM/dx = 0). Integrating from the left:
M(x) = integral of V dx − (sum of applied couples to left)
For a simply supported span the two reactions follow from sum of moments = 0 and sum of vertical forces = 0; for a cantilever the fixed end supplies a vertical reaction and a fixing moment. The solver samples x finely along the span, accumulates V and M exactly using these rules, and draws both diagrams with their extreme values marked.
- Open Simulation. Pick the beam type (simply supported or cantilever) and its length L.
- Add loads: a point load at position a, a UDL w over an interval a to b, or an applied moment at a point. Use the add button; each load is listed and can be removed.
- The reactions are recomputed instantly and the SFD (cyan) and BMD (amber) are redrawn beneath the loaded beam.
- Read Vmax, Mmax and the location of the maximum moment — note it coincides with the point where the shear crosses zero.
- Try a central point load, then spread it as a UDL of the same total, and compare the peak moments.
Beam, SFD & BMDready
Beam & loads
| type | mag | at |
|---|
- Hibbeler — Structural Analysis, 10th ed., Ch. 4 (Internal Loadings — Shear and Moment Diagrams). Pearson.
- Gere & Goodno — Mechanics of Materials, 9th ed., Ch. 4. Cengage.
- Virtual Labs (IIT) — Strength of Materials: Bending Moment in a Beam, mm-coep.vlabs.ac.in.
4 · Beam deflection by double integration
For small deflections the curvature of the neutral axis is proportional to the bending moment. The Euler-Bernoulli beam equation relates the transverse deflection y(x) to M(x):
Integrating once gives the slope EI·dy/dx and again gives EI·y, each step introducing a constant of integration. The Macaulay method writes the moment with bracket terms (x − a) that are taken as zero when x is less than a, so one single expression covers the whole beam and integrates termwise — a point load contributes a bracket of power one, a UDL a bracket of power two:
EI y' = R x²/2 − (P/2)<x−a>² − (w/6)<x−c>³ + C1
EI y = R x³/6 − (P/6)<x−a>³ − (w/24)<x−c>⁴ + C1 x + C2
The constants C1 and C2 follow from the boundary conditions: zero deflection at both supports of a simply supported beam, or zero deflection and zero slope at the fixed end of a cantilever. The maximum deflection occurs where the slope y' is zero; the solver scans for that point. Results scale inversely with the flexural rigidity EI, so doubling EI halves the deflection.
- Open Simulation. Choose the support (simply supported or cantilever) and set length L and rigidity EI.
- Choose a standard load case — central point load, off-centre point load or full UDL (for the cantilever, an end load, a load at a, or full UDL) — and set its magnitude.
- The elastic curve is drawn (exaggerated), with the slope and deflection at any queried x available below.
- Read the maximum deflection and its location; compare it with the classic closed-form value shown for the standard case.
- Increase EI and watch the curve flatten in inverse proportion; move the query marker to inspect slope and deflection along the beam.
Elastic curveready
Controls
- Hibbeler — Structural Analysis, 10th ed., Ch. 8 (Deflections — Double Integration / Macaulay). Pearson.
- Gere & Goodno — Mechanics of Materials, 9th ed., Ch. 9 (Deflections of Beams). Cengage.
- Roark & Young — Formulas for Stress and Strain, beam deflection tables. McGraw-Hill.
5 · Influence lines
An influence line plots the value of one structural response (say the moment at a section C) as a function of the position of a single moving unit load. It answers a different question from a bending-moment diagram: the BMD shows M at every section for a fixed load, while the influence line shows one quantity as the load travels. Influence lines are the basis of design for moving loads — vehicles on bridges, gantry cranes.
For a simply supported span of length L with a unit load at position a from the left, equilibrium gives the reactions, and these define the lines directly:
Reaction R(B): IL value = a / L
For shear and moment at a section a distance c from the left support, evaluating V and M as the load passes left and right of C gives two straight segments meeting at C:
Moment at C: IL = a(L−c)/L for a ≤ c, IL = c(L−a)/L for a > c (peak c(L−c)/L at a = c)
By the Muller-Breslau principle the influence line for any reaction or internal action has the shape of the deflected structure produced by releasing that action and giving it a unit displacement — which is exactly the piecewise-linear shapes above for a determinate beam. The solver sweeps the unit load, evaluates the chosen response at each step, traces the influence line, and reports its peak value and the critical load position.
- Open Simulation. Set the span length L and the section position c (for shear/moment influence lines).
- Choose the response: reaction R(A), reaction R(B), shear at C, or moment at C.
- Press Sweep (or drag the load slider). The moving load animates across the span and the influence line is traced point by point beneath.
- Read the ordinate under the current load position — that is the response value if the unit load sat there.
- Read the peak ordinate and its critical position; placing the heaviest wheel there maximises the response. Note the unit jump of the shear influence line right at the section.
Moving load & influence lineready
Controls
- Hibbeler — Structural Analysis, 10th ed., Ch. 6 (Influence Lines for Statically Determinate Structures). Pearson.
- Wang — Intermediate Structural Analysis, chapter on the Muller-Breslau Principle. McGraw-Hill.
- Virtual Labs (IIT) — Structural Analysis: Influence Lines, sa-nitk.vlabs.ac.in.
6 · Euler column buckling
A straight elastic column under axial compression remains straight until the load reaches a critical value, at which it suddenly bows sideways — buckling. Euler solved the governing differential equation EI y'' = −P y for a pin-ended strut and obtained the smallest non-trivial load:
The effective length factor K captures the end restraints: K = 1 for pinned-pinned, K = 0.5 for fixed-fixed, K = 2 for fixed-free (a flagpole), and K is about 0.7 for fixed-pinned. Dividing by area and writing the slenderness ratio lambda = K L / r gives the critical (buckling) stress:
Euler's hyperbola sigma(cr) = pi² E / lambda² is valid only while sigma(cr) stays below the yield (or proportional) limit; for stocky columns (small lambda) the column yields or crushes before it buckles, so the curve is capped at the yield stress. The boundary slenderness is lambda(c) = pi · sqrt(E / sigma(y)). The solver draws this curve, marks the operating point for the chosen geometry, and animates the corresponding buckled mode shape.
- Open Simulation. Choose the end condition; the effective length factor K is shown in the menu.
- Set the length L, the section radius of gyration r, the cross-section area A, Young's modulus E and the yield stress fy.
- The panel computes the slenderness ratio, the critical load and the critical stress; the operating point is plotted on the Euler curve.
- Watch whether the point lies on the Euler branch (slender, buckling governs) or under the yield cap (stocky, yielding governs); the badge says which.
- Vary L and the end condition and see the critical load fall with the square of effective length; the buckled mode shape redraws to match the end restraints.
Critical stress vs slendernessready
Controls
- Gere & Goodno — Mechanics of Materials, 9th ed., Ch. 11 (Columns). Cengage.
- Timoshenko & Gere — Theory of Elastic Stability, 2nd ed. McGraw-Hill.
- Virtual Labs (IIT) — Strength of Materials: Buckling of Columns, mm-coep.vlabs.ac.in.