Section 5.1 of Chapter 5: 2D Beam Element, Linear Case
Beam Finite Element — Euler–Bernoulli Beam Model
Classical and energy-based derivations of the two-node planar Euler–Bernoulli beam element for small displacements, small strains, and linear elastic material behaviour.
2D beamEuler–BernoulliLinear analysisMATLAB
01
Model and notation
The element is straight and prismatic, with two nodes and a constant cross-section. Each node has two translations and one rotation. The analysis is performed in the globalxy plane.
In this planar analysis, Tand Ty denote the same transverse force component, while Mand Mz denote the same bending moment component.
01Small strains
02Small displacements
03Linear elastic material
The local xˉaxis coincides with the neutral axis. The localyˉ axis is a principal axis of the cross-section, andθ is the angle from the global frame to the local frame.
Figure 1. Global and local coordinate systems and positive element displacement components.
The local and global element displacement vectors are:
uˉel=⎩⎨⎧uˉ1vˉ1φ1uˉ2vˉ2φ2⎭⎬⎫
uel=⎩⎨⎧u1v1φ1u2v2φ2⎭⎬⎫
In accordance with the site-wide beam convention, the axial strain of the neutral axis, the rotation, and the curvature are:
ε0=dxˉduˉ,φz=dxˉdvˉ,κz=dxˉdφz=dxˉ2d2vˉ
Thus positive curvature is consistent with the convention inNomenclature and Conventions. The generalized constitutive relation is:
σ=Dε,{NMz}=[EA00EIz]{ε0κz}
Here N is the axial force, Mz is the bending moment, E is Young's modulus, and A andIz are the cross-sectional area and second moment of area.
02
Classical approach
Let ξ=xˉ/L, with 0≤ξ≤1. Linear interpolation is used for the axial displacement, while cubic Hermite interpolation is used for the transverse displacement. The rotation follows by differentiation[1][2].
The transformation from global to local element coordinates is:
uˉel=Ruel,R=[R003×303×3R0]
R0=cosθ−sinθ0sinθcosθ0001
The stiffness matrix in the global frame is:
kel=RTkˉelR
04
Energy formulation with Gaussian quadrature
The same stiffness matrix can be obtained by differentiating the deformation energy directly. This form is particularly convenient when the formulation is later extended to nonlinear problems.
Uel=21∫0L(EAε02+EIzκz2)dxˉ
Uel=4LG=1∑nGwG[EAε0(ξG)2+EIzκz(ξG)2]
Two Gauss points give the exact result because the highest-order term in the integrand is quadratic. On0≤ξ≤1, their coordinates and weights are:
A quarter-circular cantilever of radiusR=50mmis discretized with 100 straight beam elements. The rectangular cross-section has width w=5mmand thickness t=1mm. The material and tip loads areE=2×105MPa,V=10N, andH=20N.
Figure 2. Undeformed and deformed beam centreline. The displacements are shown at their true scale.Figure 3. Axial force N.Figure 4. Shear force Ty.Figure 5. Bending moment Mz.
06
MATLAB programs
The package contains five commented files. gen.mdefines the geometry, cross-section, loads, and constraints;deriv.m evaluates the axial-strain and curvature-displacement matrices; stiff.m performs two-point Gauss integration and global assembly;stress.m recovers the internal force resultants; and main.m controls the analysis and plots the results.
The implementation uses the same positive-curvature convention as the derivation above. Accordingly, deriv.mevaluates κz = d²v/dx², whilestress.m recovers the shear force from dMz/dx = −Ty.
stiff.mTwo-point Gauss integration
% Local stiffness matrix in the current element frame.
for ig = 1:2
xc = 1/2*(1 + xg(ig));
deriv
kel = kel + L/2*(ea*ep1*ep1' + ei*ka1*ka1');
end
K(ip,ip) = K(ip,ip) + Re'*kel*Re;
MATLAB compatibility
Tested in MATLAB R2024a. The code uses standard MATLAB syntax and is expected to be compatible with newer MATLAB versions. No additional toolbox is required.