Section 1.2 of Chapter 1: Two-Dimensional Truss Structures

Buckling Analysis — Part I

A second-order strain formulation leading to the elastic and geometric stiffness matrices, the buckling eigenproblem, and a compact MATLAB implementation.

Small displacementSmall strainLinear elastic materialMATLAB tested in R2017b and R2026a

01

Second-order axial strain

Consider a straight, prismatic two-node truss element. Although the displacements are small, the terms of second degree in the nodal displacements are retained.

Initial and displaced configurations of a two-node 2D truss element
Figure 1.Initial and displaced configurations in the global frame.

WithΔu=u2u1\Delta u=u_2-u_1,Δv=v2v1\Delta v=v_2-v_1, and initial element angleθ\theta, the exact engineering strain is:

ε=(cosθ+ΔuL)2+(sinθ+ΔvL)21\varepsilon=\sqrt{\left(\cos\theta+\frac{\Delta u}{L}\right)^2+\left(\sin\theta+\frac{\Delta v}{L}\right)^2}-1

This expression can be written as:

ε=1+a1\varepsilon=\sqrt{1+a}-1
a=2cosθΔuL+2sinθΔvL+(Δu)2L2+(Δv)2L2a=2\cos\theta\frac{\Delta u}{L}+2\sin\theta\frac{\Delta v}{L}+\frac{(\Delta u)^2}{L^2}+\frac{(\Delta v)^2}{L^2}

The binomial expansion [1] is:

1+a=1+12a18a2+116a35128a4+7256a5\sqrt{1+a}=1+\frac{1}{2}a-\frac{1}{8}a^2+\frac{1}{16}a^3-\frac{5}{128}a^4+\frac{7}{256}a^5-\cdots

For a1|a|\ll1, the first three terms are required becauseaa itself already contains terms of second degree:

1+a1+12a18a2\sqrt{1+a}\approx1+\frac{1}{2}a-\frac{1}{8}a^2

After discarding terms of degree three and higher inuu andvv,

εΔuLcosθ+ΔvLsinθ+(Δu)22L2sin2θ+(Δv)22L2cos2θΔuΔv2L2sin2θ\varepsilon\approx\frac{\Delta u}{L}\cos\theta+\frac{\Delta v}{L}\sin\theta+\frac{(\Delta u)^2}{2L^2}\sin^2\theta+\frac{(\Delta v)^2}{2L^2}\cos^2\theta-\frac{\Delta u\,\Delta v}{2L^2}\sin2\theta

02

Compact matrix form

Introduce the element displacement vector:

uel=(u1v1u2v2)T\boldsymbol{u}_{el}=\begin{pmatrix}u_1&v_1&u_2&v_2\end{pmatrix}^{T}

The second-order strain can then be written as:

εBuel+12uelTCuel=ε0+12uelTCuel\varepsilon\approx\boldsymbol{B}\boldsymbol{u}_{el}+\frac{1}{2}\boldsymbol{u}_{el}^{T}\boldsymbol{C}\boldsymbol{u}_{el}=\varepsilon_0+\frac{1}{2}\boldsymbol{u}_{el}^{T}\boldsymbol{C}\boldsymbol{u}_{el}
ε0=Buel\varepsilon_0=\boldsymbol{B}\boldsymbol{u}_{el}
B=1L(cosθsinθcosθsinθ)\boldsymbol{B}=\frac{1}{L}\begin{pmatrix}-\cos\theta&-\sin\theta&\cos\theta&\sin\theta\end{pmatrix}

Using the column vector:

q=(sinθcosθsinθcosθ)T\boldsymbol{q}=\begin{pmatrix}-\sin\theta&\cos\theta&\sin\theta&-\cos\theta\end{pmatrix}^{T}

the symmetric matrix in the quadratic term is:

C=1L2qqT\boldsymbol{C}=\frac{1}{L^2}\boldsymbol{q}\boldsymbol{q}^{T}

03

Element deformation energy

For a linear elastic truss element,

Uel=12EALε2U_{el}=\frac{1}{2}EAL\varepsilon^2

Substitution of the second-order strain would generate terms up to degree four. Neglecting terms of degree four gives:

Uel12EALε02+12EALε0uelTCuelU_{el}\approx\frac{1}{2}EAL\varepsilon_0^2+\frac{1}{2}EAL\varepsilon_0\boldsymbol{u}_{el}^{T}\boldsymbol{C}\boldsymbol{u}_{el}

Since displacements are small, the axial force obtained from the preliminary linear analysis is:

N=EAε0N=EA\varepsilon_0

Therefore,

Uel=12uelT(kel+kG,el)uelU_{el}=\frac{1}{2}\boldsymbol{u}_{el}^{T}\left(\boldsymbol{k}_{el}+\boldsymbol{k}_{G,el}\right)\boldsymbol{u}_{el}

04

Elastic and geometric stiffness matrices

Define

p=(cosθsinθcosθsinθ)T\boldsymbol{p}=\begin{pmatrix}-\cos\theta&-\sin\theta&\cos\theta&\sin\theta\end{pmatrix}^{T}

The two element matrices are:

kel=EALBTB=EALppT\boldsymbol{k}_{el}=EAL\boldsymbol{B}^{T}\boldsymbol{B}=\frac{EA}{L}\boldsymbol{p}\boldsymbol{p}^{T}
kG,el=NLC=NLqqT\boldsymbol{k}_{G,el}=NL\boldsymbol{C}=\frac{N}{L}\boldsymbol{q}\boldsymbol{q}^{T}

This decomposition is the usual stress-stiffening formulation [2] [3]

The element matrices are assembled in the usual way to obtain the structural elastic stiffness matrixK\boldsymbol{K} and geometric stiffness matrixKG\boldsymbol{K}_{G}.

05

The buckling eigenproblem

Let the axial forces andKG\boldsymbol{K}_{G} correspond to a reference load. At a load factorλ\lambda, the tangent stiffness becomes singular:

det(K+λKG)=0\det\left(\boldsymbol{K}+\lambda\boldsymbol{K}_{G}\right)=0

With the program conventionN>0N>0 in tension and N<0N<0 in compression, the corresponding generalized eigenproblem is:

Kϕ=λKGϕ\boldsymbol{K}\boldsymbol{\phi}=-\lambda\boldsymbol{K}_{G}\boldsymbol{\phi}

Here λ\lambda is the buckling load factor andϕ\boldsymbol{\phi} is the buckling mode. Usually, the smallest positive eigenvalue is the quantity of interest.

Sign convention

The minus sign is required by the signed axial-force convention used in the MATLAB files and produces positive critical load factors for compression.

06

MATLAB implementation

The calculation has two stages:

  1. truss2d.m solves the small-displacement linear problem, and stress2d.m computes the signed axial forces.
  2. buckling.m assemblesKG\boldsymbol{K}_{G} and solves the generalized eigenproblem.
buckling.mSigned eigenproblem
% Solve for the free degrees of freedom
fixedDofs=2*(cond(:,1)-1)+cond(:,2);
freeDofs=setdiff((1:neq)',fixedDofs);
Kff=K(freeDofs,freeDofs);
KGff=KG(freeDofs,freeDofs);

[Vfree,lambda]=eig(Kff,-KGff,'vector');
valid=isfinite(lambda) & real(lambda)>0;
lambda=sort(real(lambda(valid)));
MATLAB verification

Tested in MATLAB R2017b and MATLAB R2026a. In both versions the package solves only for the unconstrained degrees of freedom, removes nonphysical infinite eigenvalues, and returns the same positive critical load factors. The code uses standard MATLAB syntax and is expected to be compatible with intermediate and newer MATLAB versions.

07

Example 1 — eigenvalue buckling

The geometry, material data, constraints, and reference loads are specified in gen.m. The first two buckling modes are shown below.

First and second buckling modes of the example truss tower
Figure 2.First and second buckling modes; the undeformed structure is blue and the normalized mode shape is magenta.
SolutionFirst buckling loadSecond buckling load
MATLAB R2026a and R2017b940,978.71316,181,251.434
ANSYS9.4098 × 1056.1813 × 106

08

Example 2 — nonlinear response near buckling

The same structure is analysed with the nonlinear program from Section 1.1. The vertical force increases from zero toF=940980 NF=940\,980\ \mathrm{N}, while a small horizontal force increases from zero toHH.

With the residual convention used in the Section 1.1 program, downward and rightward loads are entered with negative signs:

gen.mApplied loads
forze=[11  1  -H
       11  2  -470490
       12  2  -470490];
Nonlinear deformation of the truss tower under vertical and horizontal loads
Figure 3.Representative nonlinear deformation.
Vertical load versus maximum horizontal displacement for four horizontal forces
Figure 4.Vertical load versus maximum horizontal displacement for four values of HH.

For H=2000, 5000, 10000H=2\,000,\ 5\,000,\ 10\,000, and 20000 N20\,000\ \mathrm{N}, the load-displacement curves tend asymptotically to the first buckling load, as expected.

Load sign convention

The negative signs are included so that the data agree with the coordinate directions, the arrows in the figure, and the residual convention implemented in stiff.m.

09

Why the third binomial term matters

If the expansion is stopped after only two terms,

1+a1+12a\sqrt{1+a}\approx1+\frac{1}{2}a

the resulting strain is:

εΔuLcosθ+ΔvLsinθ+(Δu)22L2+(Δv)22L2\varepsilon\approx\frac{\Delta u}{L}\cos\theta+\frac{\Delta v}{L}\sin\theta+\frac{(\Delta u)^2}{2L^2}+\frac{(\Delta v)^2}{2L^2}

This is not the complete second-order expansion of the exact engineering strain: the orientation-dependent quadratic terms, including the mixed termΔuΔv\Delta u\,\Delta v, are lost.

The corresponding alternative geometric matrix would be

kG,el=NL[1010010110100101]\boldsymbol{k}_{G,el}^{*}=\frac{N}{L}\begin{bmatrix}1&0&-1&0\\0&1&0&-1\\-1&0&1&0\\0&-1&0&1\end{bmatrix}

This matrix is invariant under a rotation of the global axes, but it is not identical to the consistent geometric stiffness obtained from the complete second-order expansion above. It should therefore be regarded as an alternative formulation, not as an algebraically equivalent form ofkG,el\boldsymbol{k}_{G,el}.

10

Program files

11

References

  1. Wikipedia contributors, “Binomial theorem”
  2. Ansys, Inc., Ansys Mechanical APDL Theory Reference, Release 2026 R1, sections “Stress Stiffening,” “Eigenvalue and Eigenvector Extraction,” and “Buckling Analysis,” 2026. The supplied comparison macro uses syntax compatible with ANSYS Release 12.0.
  3. I. Němec, M. Trcala, I. Ševčík, and H. Štekbauer, “New Formula for Geometric Stiffness Matrix Calculation”, Journal of Applied Mathematics and Physics, 4 (2016), 733–748.