Tools › Structures › Frames and Trusses › Truss and Frame Analysis › Method
Truss and Frame Analysis: Method
Open the Truss and Frame Analysis tool
Truss and Frame Analysis: Method, Input Format, Sign Conventions and Checks
What the tool does
The tool analyses a plane truss (pin-jointed bars carrying axial force only) or a plane rigid frame (members carrying axial force, shear and bending) by the direct stiffness method. The structure is typed as text: nodes with coordinates, members with their end nodes and section properties, supports, joint loads and, for frames, loads along the members. It reports the joint displacements and rotations, the support reactions with an equilibrium check, the end forces of every member, the axial force and stress of every member, the extreme shear and bending moment of every frame member, a figure of the deformed structure with its supports and loads, moment and shear diagrams drawn on the frame and the internal-force diagrams of a chosen member. When the stiffness matrix is singular the tool names the degree of freedom at which the elimination failed, which points to the missing support or the mechanism.
Theory
Every member is a linear elastic prismatic element. In its local axes (x from node i to node j, y at 90° counter-clockwise) a frame member relates its six end displacements (u, v, θ at each end) to the six end forces through the familiar 6 × 6 stiffness matrix built from EA/L for the axial terms and 12EI/L³, 6EI/L², 4EI/L and 2EI/L for bending; a truss bar keeps only the EA/L terms. The matrix is rotated to the global X–Y axes with the transformation matrix of the member's direction cosines, k = TᵀkʹT, and added into the structure matrix K at the rows and columns of the member's degrees of freedom (two per node for a truss, three for a frame).
Loads applied between the joints are replaced by their equivalent joint loads, the negatives of the fixed-end forces of the loaded member: for a uniform load q along the local y axis the fixed-end shears are qL/2 and the fixed-end moments qL²/12; for a point load P at a from node i they are Pb²(L + 2a)/L³, Pa²(L + 2b)/L³, Pab²/L² and Pa²b/L². A load written with the word global acts along the global Y axis and is resolved into its components along the member's local y and x axes, the axial component giving fixed-end axial forces qₓL/2.
The supported degrees of freedom are removed from the system (or set to their prescribed settlements, which move their stiffness columns to the load side), and the reduced equations Kff uf = Pf − Kfs us are solved by Gaussian elimination with partial pivoting. A pivot smaller than 10⁻¹² of the largest diagonal term means a singular matrix: the structure can move without straining (a mechanism, or too few or badly placed supports), and the tool reports the node and direction at which the elimination failed. The reactions are R = K u − P at the supported degrees of freedom; the member end forces are f = kʹ T u + fixed-end forces in each member's local axes.
A released member end (pin_i or pin_j in a frame) is condensed out of the member before assembly: with the released rotation(s) b and the kept displacements a, kc = kaa − kab kbb⁻¹ kba and fc = fa − kab kbb⁻¹ fb; the moment at the released end is zero and the end rotation of the member, which differs from the joint's, is recovered afterwards for the deflected shape. A joint at which every member end is released has no rotational stiffness; the tool removes that rotation from the equations (it carries no moment) instead of reporting a singular matrix.
Input format
Each box holds one item per line; items are separated by spaces or commas and anything after # is a comment. Ids may be numbers or names.
Nodes: id x y in the chosen length unit, X to the right and Y up.
Members: id node_i node_j [E A I] [pin_i] [pin_j]. E, A and I are optional and positional, in the units of the Default E, A and I inputs (a dash keeps the default for that position); they may also be written E=200000 A=6000 I=200e6. pin_i and pin_j release the bending moment at that end of a frame member; pins releases both (a bar within a frame). In a truss model I and the releases are ignored.
Supports: node code with pin (X and Y restrained), roller-x (rolls along X, restrains Y), roller-y (rolls along Y, restrains X), fixed (X, Y and rotation), or three flags bx by br (1 restrained, 0 free). Numbers after the code are prescribed support movements dx dy (length unit) and rz (rad).
Joint loads: node Fx Fy [M] in the force unit and the moment unit, M counter-clockwise positive. Several lines for one node add up.
Member loads (frames): member w for a uniform load (line-load unit) or member P a for a point load at a from node i (force unit, length unit). The load acts along the member's local y axis, 90° counter-clockwise from the direction from node i to node j, so for a beam running left to right upward is positive and a gravity load is negative; with the word global after the numbers the load acts along the global Y axis instead (per unit length of member for w), upward positive.
Units: the four reference inputs (Length Unit, Force Unit, Moment Unit, Line Load Unit) are set to 1 and their unit dropdowns name the units of the pasted numbers; the conversion factors come from the site's unit dictionary. Displacements are reported in the smaller length unit (mm or in) and stresses in MPa or ksi.
Sign conventions of the results
Joint displacements are global components, X right, Y up, θ counter-clockwise. Reactions are the forces the supports exert on the structure in the global directions. Member end actions Ni, Vi, Mi and Nj, Vj, Mj are the forces on the member at its ends in its local axes (moments counter-clockwise). The axial force N is tension positive, N = −Ni. Along a member (x from node i) the shear V is positive when the part toward node i is pushed toward local +y, and the bending moment M is positive when it puts the local −y side in tension, so dM/dx = V and the diagram of a beam running left to right with y up is sagging positive; the moment diagram is drawn on the tension side. The extreme moment of a member is taken at its ends, under the point loads and where the shear passes through zero.
Checks
The equilibrium check sums the reactions with every applied load (joint loads and the resultants of the member loads) and takes moments about the origin; the residual should be round-off only (10⁻¹⁰ or less of the applied load). The library is checked against the printed examples of McGuire, Gallagher and Ziemian's Matrix Structural Analysis (Examples 3.2, 4.13 and 5.7: displacements, reactions and bar forces), against the closed forms of Kleinlogel's Rigid Frame Formulas for fixed-base and pinned-base portal frames under uniform and lateral loads, against the AISC Table 3-23 beam formulas for single members (cantilever, fixed-fixed, propped cantilever, point load, settlement), against the method of joints for a two-member truss, and against an independent numpy direct-stiffness solve of every case (frame_check.py in the References folder).
Limits
Linear elastic small-displacement analysis in a plane. Not included: shear deformation, second-order (P–Δ) effects and buckling, plastic hinges, semi-rigid connections, temperature and lack-of-fit loads, inclined (skew) supports, elastic spring supports, curved or tapered members and three-dimensional structures. The dense solver is limited to 200 nodes. Member stresses are the axial stress N/A; the bending stress M c/I of a frame member and the combined check belong to the Beam Stress tool.