← All virtual labs
Structural Analysis · Virtual lab

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

Select a determinate truss, apply a joint load, and solve every member force with tension/compression colouring and support reactions
To determine the axial force in every member of a statically determinate plane truss using the method of joints, to identify each member as in tension or compression, and to verify the computed support reactions against global equilibrium.

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.

Determinacy: m + r = 2 j   (2j independent equilibrium equations)

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 Fx = 0:  sum of N(i) cos theta(i) + Px = 0
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.

  1. 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.
  2. Set the load magnitude and pick the loaded joint; the downward arrow appears at that joint.
  3. 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.
  4. Read the reactions and the per-member force table; zero-force members are greyed.
  5. Confirm the global checks in the panel: vertical reactions sum to the total load and the moment residual is essentially zero.
  6. Change the load or geometry and re-solve to see how the force path through the truss changes.

Truss & member forcesready

Tension Compression Zero-force Reaction
Sign convention: a positive member force is tension (the member pulls its joints inward). Numbers on members are kN; arrows at the supports are the reaction components.

Controls

40
Members m
--
Joints j
--
m + r - 2j
--
Max |force|
--
Pin Ax
--
Pin Ay
--
Roller By
--
Moment check
--
memberforce kNstate
  • 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

Pass a cut through a Pratt truss and solve a chosen member directly from equilibrium of one free body
To find the force in a single chosen truss member directly — without working joint by joint — by cutting the truss into two free bodies and applying the equilibrium equations to one of them.

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.

Sum Fx = 0,  Sum Fy = 0,  Sum M(P) = 0  (for the free body on one side of the cut)

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.

Diagonal: Sum Fy = 0 ⇒ (net shear) + N(diag) · sin(theta) = 0
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.

  1. Open Simulation. A Pratt truss with its reactions already computed is shown.
  2. Set the panel load. The reactions update from global equilibrium.
  3. Choose a cut position (between panels). The dashed section line appears, the members it crosses are highlighted, and the left free body is shaded.
  4. Pick the member to solve from the crossed members. The solver writes the equilibrium equation that isolates it.
  5. 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

Shaded region is the free body kept for equilibrium. The dashed line is the cut; highlighted members are exposed by it. The amber member is the one being solved.

Controls

30
Reaction Ay
--
Reaction By
--
Member force
--
State
--
Method: summing vertical forces on the free body isolates a diagonal; moments about the joint where two unwanted members meet isolates a chord.
  • 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

Build any combination of point loads, distributed loads and applied moments on a simply-supported or cantilever beam
To compute and plot the shear-force diagram (SFD) and bending-moment diagram (BMD) for a beam carrying point loads, uniformly distributed loads and applied couples, and to read off the maximum shear and maximum bending moment with their locations.

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:

dV/dx = − w(x)   and   dM/dx = V(x)

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:

V(x) = R(left) − (sum of point loads to left) − (integral of w to 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.

  1. Open Simulation. Pick the beam type (simply supported or cantilever) and its length L.
  2. 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.
  3. The reactions are recomputed instantly and the SFD (cyan) and BMD (amber) are redrawn beneath the loaded beam.
  4. Read Vmax, Mmax and the location of the maximum moment — note it coincides with the point where the shear crosses zero.
  5. Try a central point load, then spread it as a UDL of the same total, and compare the peak moments.

Beam, SFD & BMDready

Shear V(x) Moment M(x) Reaction

Beam & loads

Simply sup.
Cantilever
8
Reaction R(A)
--
Reaction R(B)
--
V max
--
M max
--
Loads
typemagat
  • 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

The elastic curve from the Macaulay bracket method, with slope, deflection and the maximum deflection located
To obtain the deflected shape (elastic curve) of a beam by integrating the bending-moment equation twice using the Macaulay step-function method, applying the support boundary conditions, and to locate and report the maximum deflection.

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):

EI · d²y/dx² = 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 − P<x−a> − (w/2)<x−c>²
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.

  1. Open Simulation. Choose the support (simply supported or cantilever) and set length L and rigidity EI.
  2. 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.
  3. The elastic curve is drawn (exaggerated), with the slope and deflection at any queried x available below.
  4. Read the maximum deflection and its location; compare it with the classic closed-form value shown for the standard case.
  5. Increase EI and watch the curve flatten in inverse proportion; move the query marker to inspect slope and deflection along the beam.

Elastic curveready

Deflection is exaggerated for clarity — the readouts are the true values in millimetres. The dashed line is the undeflected beam; the cyan marker is your query point and the amber marker is the maximum.

Controls

Simply sup.
Cantilever
20
2
6
12000
3.0
y(max) mm
--
at x = m
--
y(query) mm
--
slope(query)
--
  • 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

Sweep a unit load across a simply-supported span and trace the influence line for a reaction, shear or moment at a chosen section
To construct the influence line for a chosen response quantity — a support reaction, or the shear or bending moment at a fixed section — by moving a unit load across the span, and to use it to find the load position that maximises that response.

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(A):  IL value = (L − a) / L  (falls linearly from 1 to 0)
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:

Shear at C:  IL = −a/L for a < c,  IL = (L−a)/L for a > c  (jump of 1 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.

  1. Open Simulation. Set the span length L and the section position c (for shear/moment influence lines).
  2. Choose the response: reaction R(A), reaction R(B), shear at C, or moment at C.
  3. Press Sweep (or drag the load slider). The moving load animates across the span and the influence line is traced point by point beneath.
  4. Read the ordinate under the current load position — that is the response value if the unit load sat there.
  5. 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

Top: the beam with the unit load at its current position. Bottom: the influence line for the chosen response — the ordinate under the load is the response value. Positive ordinates lie above the baseline.

Controls

10
4
3.0
Ordinate now
--
Peak ordinate
--
Critical pos m
--
Units
--
To maximise the response from a single concentrated load, place it at the critical position; for a UDL the response is the load intensity times the net area under the influence line.
  • 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

Critical load and critical stress versus slenderness ratio for four end conditions, with the buckled mode shape
To compute the Euler critical buckling load of a slender column for pinned, fixed-fixed, fixed-free and fixed-pinned end conditions, to plot the critical stress against the slenderness ratio, and to mark the slenderness limit beyond which Euler theory applies.

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:

P(cr) = pi² E I / (K L)²   (I = A r², r = radius of gyration)

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:

sigma(cr) = P(cr)/A = pi² E / lambda²,  lambda = K L / r

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.

  1. Open Simulation. Choose the end condition; the effective length factor K is shown in the menu.
  2. Set the length L, the section radius of gyration r, the cross-section area A, Young's modulus E and the yield stress fy.
  3. The panel computes the slenderness ratio, the critical load and the critical stress; the operating point is plotted on the Euler curve.
  4. Watch whether the point lies on the Euler branch (slender, buckling governs) or under the yield cap (stocky, yielding governs); the badge says which.
  5. 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

Curve is Euler's hyperbola capped at the yield stress; the vertical line is the slenderness boundary lambda(c). The marker is your column; the small inset is its buckled mode.

Controls

3.0
25
30
200
250
Slenderness K L/r
--
Boundary lambda(c)
--
P critical kN
--
sigma critical MPa
--
  • 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.