Build element matrices for beams and frames. Combine supports, releases, and loads in minutes securely. Get stiffness, reactions, and displacements with clean reports today.
This calculator implements the direct stiffness method for a 2D truss. Each node has two DOFs (ux, uy). Use consistent units throughout.
Try this small triangular truss. It matches the prefilled inputs above.
| Nodes | ||||||
|---|---|---|---|---|---|---|
| Node | x | y | Fx | Fy | Fix X | Fix Y |
| 1 | 0 | 0 | 0 | 0 | Yes | Yes |
| 2 | 4 | 0 | 0 | 0 | No | Yes |
| 3 | 4 | 3 | 0 | -10 | No | No |
| Elements | ||||
|---|---|---|---|---|
| Elem | Node i | Node j | Area (A) | Young's (E) |
| 1 | 1 | 2 | 0.003 | 2.0e11 |
| 2 | 2 | 3 | 0.003 | 2.0e11 |
| 3 | 1 | 3 | 0.003 | 2.0e11 |
For a 2D truss element between nodes i and j: L = √((xj−xi)² + (yj−yi)²), c = (xj−xi)/L, s = (yj−yi)/L, and k0 = AE/L.
Element stiffness in global coordinates (DOFs: ix, iy, jx, jy):
|
ke = k0 ·
[ c² c s −c² −c s ] [ c s s² −c s −s² ] [ −c² −c s c² c s ] [ −c s −s² c s s² ] |
Assemble all element matrices into the global matrix K. Apply boundary conditions by restraining DOFs (fixed displacements). Solve Kff·uf = Ff for free displacements, then compute reactions: R = K·u − F.
The solver on this page uses the direct stiffness workflow for a 2D truss: build member stiffness, assemble a global matrix, apply restraints, then solve for nodal displacements and support reactions. With consistent units, the same steps work for very small hand examples and larger classroom models.
It analyzes pin-jointed trusses where members carry axial force only. Each node has two translational degrees of freedom, so a model with N nodes has 2N DOFs. The global stiffness matrix is 2N×2N, and loads are entered as nodal forces in X and Y directions.
You need node coordinates, member connectivity, cross‑sectional area A, and Young’s modulus E. Typical steel E is about 200 GPa, while aluminum is near 69 GPa. If you work in US customary units, keep length, force, and modulus consistent to avoid distorted displacements.
For each member, length is L = √((xj−xi)²+(yj−yi)²). Direction cosines are c = (xj−xi)/L and s = (yj−yi)/L. These values rotate the local axial stiffness into the global coordinate system during assembly.
The axial stiffness factor is k0 = AE/L. The calculator forms the standard 4×4 truss element matrix using c and s, then adds it into the correct global DOF locations. Larger A or E increases stiffness and reduces displacements; larger L reduces stiffness.
Assembly is a bookkeeping step: every element contributes to four DOFs (ix, iy, jx, jy). Overlapping contributions add together. When multiple members meet at a node, their stiffness terms accumulate, which is why the final K matrix captures the whole structure’s connectivity.
Supports are modeled by restraining DOFs using Fix X and Fix Y. At least one restraint is required. If the free stiffness submatrix becomes singular, the model is unstable or under‑constrained, or it contains disconnected nodes or zero‑length elements.
The solver forms Kff and Ff for free DOFs and solves Kff·uf = Ff. Reactions are computed from R = K·u − F at restrained DOFs. Member axial force is k0 times axial deformation, and stress is force/A, with tension taken as positive.
Reasonable models show small displacements relative to member lengths and reactions that balance applied loads. Very large displacements may indicate tiny A, low E, long spans, or inconsistent units. Use the global matrix display to verify DOF ordering and to spot missing connectivity.
This page solves 2D trusses with axial members. Full frames need rotational DOFs, bending stiffness terms, and larger element matrices, so the input set and solver are different.
It usually means the structure is unstable or under‑restrained, a node is disconnected, or an element has near‑zero length. Add missing supports, connect members properly, and recheck coordinates.
Any consistent system works. For SI, use E in Pa and A in m². For US customary, use E in psi and A in in². Keep length units consistent with your chosen area units.
Very stiff members (large A or E) produce tiny displacements. Also check that your loads are not entered in the wrong scale, and confirm you did not accidentally restrain the DOF you intended to be free.
For trusses, loads are typically applied at joints. If you must represent a member load, convert it into equivalent nodal forces at its end nodes before entering them into the nodal load columns.
Positive force indicates tension, while negative indicates compression. Stress follows the same sign convention because it is computed as force divided by area.
Exports include model summary, nodal displacements, applied nodal loads, restrained‑DOF reactions, and element axial force and stress. If enabled, the global stiffness matrix is also shown on the page for verification.