Direct Stiffness Method Calculator

Build element matrices for beams and frames. Combine supports, releases, and loads in minutes securely. Get stiffness, reactions, and displacements with clean reports today.

Model inputs

This calculator implements the direct stiffness method for a 2D truss. Each node has two DOFs (ux, uy). Use consistent units throughout.

Units are labels only—keep inputs consistent.
Affects tables and exports.

Nodes (coordinates, loads, supports)

Node x y Fx Fy Fix X Fix Y
1
2
3

Elements (connectivity and properties)

Elem Node i Node j Area (A) Young's (E)
1
2
3
Tip: Use at least one fixed node. Large stiffness values can cause rounding noise.

Example data table

Try this small triangular truss. It matches the prefilled inputs above.

Nodes
NodexyFxFyFix XFix Y
10000YesYes
24000NoYes
3430-10NoNo
Elements
ElemNode iNode jArea (A)Young's (E)
1120.0032.0e11
2230.0032.0e11
3130.0032.0e11

Formula used

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.

How to use this calculator

  1. Enter node coordinates (x, y) and nodal loads (Fx, Fy).
  2. Select supports using Fix X and Fix Y at restrained nodes.
  3. Define each element using start node, end node, area A, and modulus E.
  4. Click “Solve using direct stiffness” to compute displacements and reactions.
  5. Use CSV/PDF buttons in the results panel to export.

Direct stiffness method guide

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.

1) What this calculator solves

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.

2) Inputs you should prepare

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.

3) Element geometry and direction cosines

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.

4) Element stiffness data

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.

5) Assembly into the global matrix

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.

6) Boundary conditions and stability

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.

7) Solving, reactions, and member results

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.

8) Checking results with quick data cues

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.

FAQs

1) Is this for trusses or full frames?

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.

2) What causes a “singular matrix” error?

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.

3) What units should I use for E and A?

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.

4) Why are my displacements extremely small?

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.

5) Can I model distributed loads on a member?

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.

6) What does a positive member force mean here?

Positive force indicates tension, while negative indicates compression. Stress follows the same sign convention because it is computed as force divided by area.

7) What does the CSV/PDF export include?

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.

Note: This page targets truss analysis (axial members). For full beam/frame bending (rotational DOFs), the stiffness matrices are larger and require member end releases and local-to-global transformations for bending terms.