Direct stiffness method
The direct stiffness method is the displacement method written in matrix form. The unknowns are the displacements and rotations of the nodes; equilibrium at every node yields a system of linear equations. Statically determinate and indeterminate structures follow exactly the same path, which is why the method underlies practically every frame analysis program – including this calculator. This page derives it step by step for plane frames and works through a complete example.
1. Basic idea
A frame structure consists of straight members connected at nodes. Once the displacements and rotations of all nodes are known, so is the position of both ends of every member. For a single member it is possible to state exactly which forces are needed at its ends to move it into that position. That is precisely what its element stiffness matrix describes.
The method therefore proceeds in three steps:
- For every member, set up the relation between the displacements and the forces at its ends.
- At every node, require the forces of all connected member ends to be in equilibrium with the external load. This gives with the global stiffness matrix , the vector of all nodal displacements and the load vector .
- Introduce the supports, solve the system of equations, and recover the member end forces, the support reactions and the internal force diagrams from the nodal displacements.
Compatibility is satisfied automatically: all members rigidly connected at a node share its displacements and rotation. Unlike the force method, there is no need to know the degree of static indeterminacy or to choose a statically determinate primary structure.
2. Degrees of freedom and sign convention
Every node of a plane frame has three degrees of freedom: the displacements and and the rotation . With nodes this gives unknowns, collected in the vector
Node occupies positions , and . On this page and in the calculator, the following sign convention applies:
- Global system: to the right, upwards. A downward load therefore has .
- Rotations and moments are positive counter-clockwise.
- Every member has a direction from its start node to its end node . Its local axis points in that direction; the local axis follows by rotating it 90° counter-clockwise. For a horizontal member running from left to right, therefore points upwards.
- The member inclination is the angle from the global to the local axis, with and .
Many textbooks let the local axis point downwards. That changes the signs of individual matrix entries, not the method. The internal forces output by the calculator follow the usual structural engineering convention in any case, see section 8.
3. Element stiffness matrix in local coordinates
In local coordinates, each member end has three displacement quantities: the axial displacement , the transverse displacement and the rotation . The member end forces act in the same directions:
are the forces exerted by the nodes on the member. For a straight, unloaded member with constant axial stiffness and bending stiffness , Euler–Bernoulli beam theory (first-order theory, no shear deformation) gives exactly with
Each column is a unit displacement state: column contains the member end forces needed to impose while all other member end quantities remain zero.
Where the entries come from
- Axial direction: a member lengthened by carries the axial force . This gives the entries . In local coordinates the axial and the bending parts are independent of each other.
- Rotation of one end: if the start of the member is rotated by while the other end stays fixed, the moment develops at the start and half of it, , at the fixed end (carry-over factor ½). The shear forces keep these moments in equilibrium.
- Transverse displacement of one end: with both end rotations held produces the end moments and the shear forces .
Formally, the bending entries follow from the differential equation . For an unloaded member the deflection curve is a cubic polynomial, which can be written in terms of the four end values using Hermite polynomials:
The stiffness entries are then ; for instance, gives exactly .
is symmetric, as Maxwell–Betti's reciprocal theorem requires, and on its own it is singular: a free member can translate and rotate as a rigid body without any forces arising. These three rigid-body modes only disappear once the member is held by nodes and supports.
4. Transformation into the global system
The nodal displacements are expressed in the global system, while the element stiffness matrix applies in local coordinates. The conversion is a rotation by , separately for both member ends; the rotation is the same in both systems:
contains the six global displacement quantities of the two member nodes. is orthogonal, , so forces are rotated back with . Substituting both into gives the element stiffness matrix in the global system:
For a horizontal member running from left to right, . For a vertical member running upwards (, ), the axial stiffness becomes the stiffness in the global direction and the bending stiffness the one in the direction – exactly what one expects of a column.
5. Loads on the member
Loads acting on a member between the nodes enter the system of equations as work-equivalent nodal loads. They are chosen so that they do the same work on the member end displacements as the actual load:
This applies to the transverse load; in the axial direction the same is done with the linear shape functions and . For a uniformly distributed load over the whole member and for a point load at a distance from the start, with :
With the opposite sign, these are the end forces of the member fixed at both ends – the fixed-end forces known from tables, such as or and . For a loaded member the element equation therefore reads
is also rotated into the global system with . Trapezoidal, triangular and partial distributed loads are handled with the same integral.
6. Assembly of the global stiffness matrix
Equilibrium at a node requires the external nodal load to equal the sum of the forces the node exerts on the connected member ends. For all nodes together:
In practice this means: every member connects two nodes, and its location vector lists the six global numbers of its degrees of freedom. For a member from node to node :
Each entry of the global element matrix is added to at its position, and each entry of to :
Nodal loads go straight to their position in . is symmetric and sparse: an entry is non-zero only if the degrees of freedom and belong to the same node or are connected by a member. Where several members meet at a node, their stiffnesses add up on the main diagonal.
7. Supports and boundary conditions
Without supports, is singular – the whole structure could move as a rigid body. Supports fix individual degrees of freedom. The unknowns are split into free () and restrained () degrees of freedom, and the system of equations is partitioned accordingly:
The restrained displacements are known: usually zero, or the settlement value for a prescribed support settlement. What is unknown there instead are the support reactions . The first row contains only the free displacements as unknowns:
The second row then gives the support reactions:
A spring support does not restrain a degree of freedom. Its spring stiffness is added to the main diagonal entry of that degree of freedom, and the support reaction is then . More on this, including support settlements, on the page Support types.
If is singular, there is a motion of the free nodes that requires no force: the system is a mechanism. The calculator detects this during the solution from a vanishing pivot and names the node and the degree of freedom where it first occurs.
8. Solution and recovery
The reduced system of equations is solved by Gaussian elimination. This gives all nodal displacements, and for every member the following are obtained:
- the local member end displacements ,
- the member end forces ,
- the internal forces at any position from equilibrium of a cut-off part of the member.
The internal forces follow the structural engineering convention: positive in tension, positive when the bottom side (the side facing away from the local axis) is in tension, and such that . At the start of the member this gives
and along the member, with the axial load and the transverse load ,
Point loads on the member cause jumps in and , point moments jumps in . At the end of the member, the result must again be , and – a useful check for any hand calculation.
9. Worked example: two-span beam
Structure
Two spans of m, uniformly distributed load kN/m downwards over the full length, cross-section 30/30 cm with MN/m², so kNm². Node (left) is a pinned support, (middle) and (right) are roller supports. Both members run from left to right.
Degrees of freedom
Three nodes give nine degrees of freedom. Restrained are , , and ; free are , and the three rotations. In a straight beam the axial displacements are uncoupled from bending and stay zero without an axial load. That leaves the rotations , and .
System of equations
Both members are horizontal, . Of the element matrix, the entries and remain for the rotations. With kN/m, the work-equivalent moments are kNm at the start of each member and kNm at its end. Assembled:
The entry at shows how the stiffnesses of the two connected members add up; on the right-hand side their contributions cancel there.
Solution
By symmetry, and . The first row then gives
The minus sign means that the beam rotates clockwise at the left support, i.e. it sags into the span.
Recovery for member A–B
The only non-zero quantities are and . With kNm, kNm and kN, from :
Result
- Support moment kNm, i.e. .
- Support reactions kN and, from both members together, kN ; by symmetry .
- Maximum span moment where , at m: kNm.
This is the familiar result for a two-span beam with equal spans – obtained here without the force method and without tables, purely from nodal equilibrium and the element matrix.
10. What the calculator does
The frame calculator follows exactly this path:
- the same order of degrees of freedom, the same element matrix and the same transformation as above,
- assembly via the location vectors, with nodal loads and work-equivalent member loads in the load vector,
- trapezoidal, triangular, parabolic and partial distributed loads integrated exactly,
- supports by removing the restrained degrees of freedom, springs on the main diagonal, support settlements on the right-hand side,
- solution by Gaussian elimination with partial pivoting,
- internal forces and deflection curve computed exactly from the member end forces and the load, with extreme values at the zeros of the shear force.
Releases at member ends are taken into account by static condensation of the element matrix before assembly. After every analysis the calculator checks global equilibrium of loads and support reactions; for this check the distributed loads are integrated independently of the solution.
Try it in the calculator
The worked example is available as the two-span beam in the example list. The “Reactions” tab shows 22.5, 75 and 22.5 kN, the bending moment diagram shows −45 kNm over , and the “Displacements” tab lists the rotation at as −2.222e-3 rad.
Open the two-span beam in the calculator