Virtual Work Principle Simulator Back
Structural Analysis Simulator

Virtual Work — Unit Load Method for Truss Deflection

Compute the apex deflection of a 3-bar truss in real time with the principle of virtual work. Adjust geometry, load and stiffness to see which member dominates the displacement.

Parameters
Base length b
m
Height h
m
Load P
kN
Stiffness EA — all members
kN

EA is taken as common to all three members (two diagonals plus the base). The deflected shape is drawn with an exaggeration factor.

Results
Apex vertical deflection δ
Diagonal force N_AC (comp.)
Base force N_AB (tension)
Diagonal contribution to δ
Truss Geometry and Member Forces

Blue = tension member, red = compression members, green arrow = external load P, dashed = deflected shape (exaggerated)

Per-member Contribution to Deflection

Compares each member's N·n·L/EA. A taller bar means a larger share of the apex deflection.

Theory & Key Formulas

In the principle of virtual work (unit load method), a fictitious unit load is applied in the direction of the displacement of interest, and the displacement is obtained by summing N_i · n_i · L_i / (E·A_i) over all members.

Truss deflection (sum over all members). N_i is the member force under the real load P, n_i under a unit virtual load, L_i the member length, E·A_i the stiffness:

$$\delta = \sum_i \frac{N_i\,n_i\,L_i}{E A_i}$$

Internal forces of this truss (from symmetry and apex vertical equilibrium):

$$N_\text{AC}=N_\text{BC}=\frac{P\,L_\text{AC}}{2h},\quad N_\text{AB}=\frac{P\,b}{4h}$$

Under the unit virtual load, the same formulas apply with P = 1:

$$n_\text{AC}=\frac{L_\text{AC}}{2h},\quad n_\text{AB}=\frac{b}{4h}$$

When EA is common to all members, each contribution is proportional to N·n·L. Note that the two diagonals are both included in the sum.

What is the Virtual Work Simulator

🙋
Is truss deflection just "force over spring constant"? But a truss has so many members — how do I tell which one is doing the work?
🎓
Good question. A truss has many bars, so a naive F/k can't track it. That's where the principle of virtual work — the unit load method — comes in. Roughly: apply a fictitious "unit load" at the point whose displacement you want, then sum N · n · L / (EA) over every member. As a formula, $\delta = \sum N_i n_i L_i / (EA_i)$. In the simulator above, move the base length and the height, and watch how the contribution bars change.
🙋
What exactly does "a unit load" mean? You're not really pushing on it, right?
🎓
Right — it's a calculational fiction. You "pretend" to apply a load of magnitude 1 at the location and in the direction of the displacement you want, then compute the member forces n_i that result. Combined with the real-load forces N_i through energy conservation (external work equals internal work), it yields the displacement. The strength of the unit load method is that the procedure is the same for trusses, beams and frames.
🙋
The simulator says the diagonals contribute 85% — what should I read from that?
🎓
That's where this method really shines. Of the apex vertical deflection δ, the two diagonals alone account for 85%. So if you want more stiffness, thickening the bottom chord barely helps; enlarging the diagonal area A is the way. In the simulator you can vary "stiffness EA", but it's applied to all members; in real design you would tune each member individually. That's the core idea of structural optimization.
🙋
Why does raising the height h shrink the deflection so quickly?
🎓
Sharp eye. Look at the formula: $N_\text{AC} = P L_\text{AC}/(2h)$ — h sits in the denominator. Doubling h halves the internal force, and because the deflection multiplies N by n (both inversely proportional to h), it scales like h². That's why deeper trusses are lighter and stiffer in practice. The real catch in the field is that h is usually capped by architectural or clearance limits, and the designer's skill is finding the best b/h ratio within those constraints.

Frequently Asked Questions

Mathematically yes. Castigliano's second theorem δ = ∂U/∂P applied to a truss with U = Σ N²L/(2EA) gives ∂N/∂P, which is exactly the internal force n under a unit virtual load. The result is δ = Σ N·n·L/(EA), identical to the unit load method. For hand calculation the unit load method is preferred because its procedure is more mechanical, but both start from the same energy principle.
To decide which member to reinforce. If the diagonals contribute 85%, enlarging the base chord barely reduces δ and the diagonals should be enlarged instead. This intuition also helps when reading commercial FEM results — it is the first step toward spotting which members govern overall stiffness.
Yes. For beams it becomes δ = ∫ M·m·dx/(EI) — the sum over members turns into an integral over length. In frames you add contributions from moment, axial and shear separately, though the moment term usually dominates and the others can be neglected. This tool focuses on a truss with axial forces only, to build intuition for the principle.
Yes, with one extra step. When the structure is indeterminate, equilibrium alone does not fix the internal forces N, so you take the redundant forces as unknowns and impose compatibility (continuity of displacement). Those compatibility equations are themselves written with the unit load method, which is why it sits at the heart of the standard indeterminate-analysis approach (flexibility / force method). The 3-bar truss here is determinate — the simplest case where equilibrium alone fixes N.

Real-World Applications

Preliminary design of buildings and bridges: For large truss bridges and roof trusses, the unit load method is used to set initial member sizes before any commercial FEM is run. Spotting the governing members by hand and producing a reasonable first-pass section makes the subsequent FEM analysis far more efficient and reliable.

Stiffness assessment of cranes, jibs and towers: The tip deflection of a construction jib or a tower crane directly affects operating accuracy. The unit load method clarifies how much each member contributes to the tip displacement, giving a clear path to combining weight reduction with stiffness improvement.

Starting point for structural optimization: "Minimize weight subject to a stiffness target" requires knowing each member's sensitivity (contribution to the displacement). The principle of virtual work expresses this sensitivity in a physically transparent form, which is why it underpins the initial-design phase of size and topology optimization algorithms.

Theoretical basis of FEM: The variational principles that drive commercial FEM software (Ansys, Abaqus, Nastran and others) are generalizations of the principle of virtual work to many degrees of freedom. Element stiffness assembly and the global system K·u = f are direct consequences of evaluating virtual work. Whether you can read FEM results physically often depends on how well you understand this principle.

Common Misconceptions and Cautions

The most common mistake is to confuse the "virtual unit load" with a real applied load. The virtual unit load is a calculational "what-if" — it is never physically applied. You assume a load of magnitude 1 at the point and direction of the desired displacement and compute the internal force n for that state. It is purely a mathematical tool. Mixing it up with the real load P leads to swapping N and n and getting an answer that does not match anything.

Second, people get tripped up by the sign convention for compression and tension. This simulator treats internal forces as magnitudes and labels them "C" (compression) or "T" (tension). The justification is that when the real and virtual loads produce internal forces in the same sense at the same location, their product N·n is positive and contributes positively to deflection. Some practitioners use signed values instead; in that case the virtual loads must follow a sign convention consistent with the real loads. Mixing the two conventions can cancel terms incorrectly and underestimate the deflection.

Finally, remember the simplification that EA is common to all members in this tool. In real structures the diagonals and the base usually have different cross sections. This tool is designed to build intuition for the principle of virtual work; if you need per-member EA, move on to hand calculation with separate terms or to commercial FEM. The tool also covers only linear elastic behaviour — no buckling, plasticity or joint flexibility — so real designs must add those effects together with appropriate safety factors.