Section 9.1 of Chapter 9: 2D Stress Analysis: Finite Element Types, Linear Case
CST Finite Element
A complete constant-strain triangular finite element formulation for linear plane-stress analysis, followed by a reproducible MATLAB cantilever example and comparison model for ANSYS.
Plane stressCST elementLinear analysisMATLABANSYS
01
CST element and hypotheses
The constant-strain triangle (CST) is a three-node finite element with two translational degrees of freedom at each node. The standard formulation introduced here follows the finite element treatment presented by Felippa [1].
StrainSmall
DisplacementSmall
MaterialLinear elastic
Stress statePlane stress
Element definition
Three nodes; two translational degrees of freedom per node: ui and vi.
Figure 1. Three-node CST element: nodal displacements and the corresponding nodal force components.
Here E is Young's modulus and ν is Poisson's ratio.
05
Potential energy and virtual work
For an assemblage of finite elements, the total potential energy may be written in either of the equivalent forms. Here u is the global vector containing all nodal displacement degrees of freedom of the finite element discretization.
Π=21el∑∫VelεTσdV−uTF
Π=21el∑∫VelεTDεdV−uTF
The virtual-work statement is:
δΠ=el∑∫VelδεTDεdV−δuTF=0
Using ε=Buel, this becomes:
δΠ=el∑δuelT(∫VelBTDBdV)uel−δuTF=0
for every geometrically admissible virtual displacement δu.
06
Element and assembled stiffness matrices
The virtual-work equation leads to the assembled linear system through the usual element assembly process:
A denotes the standard finite element assembly operator, so that
K=A(kel)
Because B and D are constant over a CST element, its stiffness matrix is:
kel=∫VelBTDBdV=BTDB∣Ael∣h
Vel=h∣Ael∣
Here h is the thickness, ∣Ael∣ is the geometric area, and Vel is the element volume.
07
MATLAB example
The example is a rectangular cantilever fixed at x=0 and loaded at x=L by a total downward force distributed over the end nodes.
LengthL=200mm
HeightH=50mm
Thicknessh=5mm
Young's modulusE=2.1×105MPa
Poisson's ratioν=0.3
End forceF0=1000N
Figure 2. CST mesh, supports at x=0, and distributed nodal forces at x=L.
The mesh contains 40 subdivisions along the beam and 16 through the height: 1280 CST finite elements, 697 nodes, and 1394 equations.
gen defines the data, generates the mesh, applies the fixed-end constraints, and distributes the end force.
triang2d forms the element stiffness matrices, assembles the global system, imposes the boundary conditions, and solves for the nodal displacements.
plot_disp plots the selected displacement component.
plot_stress calculates element stresses, forms nodally averaged values, and plots the selected stress component.
08
Displacement and stress results
The program was executed in MATLAB R2026a. The four contour maps below use the turbo(16) colormap; the numerical calculations and plotted data are unchanged.
The calculated extrema agree with the values reported in the numerical example after rounding. The MATLAB results also agree very closely with the ANSYS comparison results.
Limitation of the CST shear-stress field
The shear stress τxy is poorly represented by the CST mesh used here. This is a consequence of the constant-stress approximation within each triangular element. In Section 9.4, the same problem will be analyzed with a four-node isoparametric quadrilateral element; for a comparable mesh density, the τxy distribution is represented much more accurately.
09
Programs and downloads
Verification status
The program was executed in MATLAB R2026a and reproduced all four published extrema. The ANSYS macro was inspected against the MATLAB geometry, material, thickness, mesh, constraints, and total load, but was not executed.