Section 9.4 of Chapter 9: 2D Stress Analysis: Finite Element Types, Linear Case

Isoparametric 4-node quadrilateral finite element

A complete bilinear isoparametric quadrilateral formulation for linear plane-stress analysis, followed by a reproducible MATLAB cantilever example and an accompanying ANSYS comparison model.

Plane stress4-node quadrilateral2×2 Gauss quadratureMATLABANSYS

01

Element and hypotheses

The four-node bilinear isoparametric quadrilateral is introduced following the standard finite element formulation presented by Felippa [1]. The element has four nodes and two translational DOFs per node.

StrainSmall
DisplacementSmall
MaterialLinear elastic
Stress statePlane stress
fel=keluel \boldsymbol{f}_{el}=\boldsymbol{k}_{el}\boldsymbol{u}_{el}
fel={X1Y1X2Y2X3Y3X4Y4},uel={u1v1u2v2u3v3u4v4} \boldsymbol{f}_{el}= \begin{Bmatrix} X_1\\Y_1\\X_2\\Y_2\\X_3\\Y_3\\X_4\\Y_4 \end{Bmatrix}, \qquad \boldsymbol{u}_{el}= \begin{Bmatrix} u_1\\v_1\\u_2\\v_2\\u_3\\v_3\\u_4\\v_4 \end{Bmatrix}

Here fel\boldsymbol{f}_{el} is the nodal-force vector, uel\boldsymbol{u}_{el} is the nodal-displacement vector, and kel\boldsymbol{k}_{el} is the element stiffness matrix.

02

Natural coordinates and interpolation

Four-node quadrilateral in natural and Cartesian coordinates
Figure 1. The four-node element in the natural (s,t)(s,t) and Cartesian (x,y)(x,y) coordinate systems.

The displacement field is interpolated from the nodal values:

{u(s,t)v(s,t)}=[NuNv]uel=[N1(s,t)0N2(s,t)0N3(s,t)0N4(s,t)00N1(s,t)0N2(s,t)0N3(s,t)0N4(s,t)]uel \begin{Bmatrix}u(s,t)\\v(s,t)\end{Bmatrix} =\begin{bmatrix}\boldsymbol{N}_u\\\boldsymbol{N}_v\end{bmatrix}\boldsymbol{u}_{el} = \begin{bmatrix} N_1(s,t)&0&N_2(s,t)&0&N_3(s,t)&0&N_4(s,t)&0\\ 0&N_1(s,t)&0&N_2(s,t)&0&N_3(s,t)&0&N_4(s,t) \end{bmatrix}\boldsymbol{u}_{el}

The same interpolation functions are used for the geometry:

{x(s,t)y(s,t)}=[NuNv]xel=[N1(s,t)0N2(s,t)0N3(s,t)0N4(s,t)00N1(s,t)0N2(s,t)0N3(s,t)0N4(s,t)]xel \begin{Bmatrix}x(s,t)\\y(s,t)\end{Bmatrix} =\begin{bmatrix}\boldsymbol{N}_u\\\boldsymbol{N}_v\end{bmatrix}\boldsymbol{x}_{el} = \begin{bmatrix} N_1(s,t)&0&N_2(s,t)&0&N_3(s,t)&0&N_4(s,t)&0\\ 0&N_1(s,t)&0&N_2(s,t)&0&N_3(s,t)&0&N_4(s,t) \end{bmatrix}\boldsymbol{x}_{el}
xel=[x1y1x2y2x3y3x4y4]T \boldsymbol{x}_{el} =\begin{bmatrix}x_1&y_1&x_2&y_2&x_3&y_3&x_4&y_4\end{bmatrix}^{T}

The four bilinear interpolation functions are:

N1(s,t)=(1+s)(1+t)4,N2(s,t)=(1s)(1+t)4 N_1(s,t)=\frac{(1+s)(1+t)}{4},\qquad N_2(s,t)=\frac{(1-s)(1+t)}{4}
N3(s,t)=(1s)(1t)4,N4(s,t)=(1+s)(1t)4,s,t[1,1] N_3(s,t)=\frac{(1-s)(1-t)}{4},\qquad N_4(s,t)=\frac{(1+s)(1-t)}{4}, \qquad s,t\in[-1,1]

03

Strains and Jacobian

The engineering strain vector is:

ε={εxεyγxy}={uxvyuy+vx} \boldsymbol{\varepsilon} =\begin{Bmatrix}\varepsilon_x\\\varepsilon_y\\\gamma_{xy}\end{Bmatrix} =\begin{Bmatrix} \dfrac{\partial u}{\partial x}\\[4pt] \dfrac{\partial v}{\partial y}\\[4pt] \dfrac{\partial u}{\partial y}+\dfrac{\partial v}{\partial x} \end{Bmatrix}
ε=[100001]{uxuy}+[000110]{vxvy} \boldsymbol{\varepsilon} = \begin{bmatrix}1&0\\0&0\\0&1\end{bmatrix} \begin{Bmatrix}\dfrac{\partial u}{\partial x}\\[3pt]\dfrac{\partial u}{\partial y}\end{Bmatrix} + \begin{bmatrix}0&0\\0&1\\1&0\end{bmatrix} \begin{Bmatrix}\dfrac{\partial v}{\partial x}\\[3pt]\dfrac{\partial v}{\partial y}\end{Bmatrix}

Cartesian derivatives are obtained from derivatives with respect to the natural coordinates:

{uxuy}=J1{usut},{vxvy}=J1{vsvt} \begin{Bmatrix}\dfrac{\partial u}{\partial x}\\[3pt]\dfrac{\partial u}{\partial y}\end{Bmatrix} =\boldsymbol{J}^{-1} \begin{Bmatrix}\dfrac{\partial u}{\partial s}\\[3pt]\dfrac{\partial u}{\partial t}\end{Bmatrix}, \qquad \begin{Bmatrix}\dfrac{\partial v}{\partial x}\\[3pt]\dfrac{\partial v}{\partial y}\end{Bmatrix} =\boldsymbol{J}^{-1} \begin{Bmatrix}\dfrac{\partial v}{\partial s}\\[3pt]\dfrac{\partial v}{\partial t}\end{Bmatrix}

The Jacobian is:

J(s,t)=[xsysxtyt] \boldsymbol{J}(s,t)= \begin{bmatrix} \dfrac{\partial x}{\partial s}&\dfrac{\partial y}{\partial s}\\[5pt] \dfrac{\partial x}{\partial t}&\dfrac{\partial y}{\partial t} \end{bmatrix}

Using the interpolation functions gives the complete coordinate transformation

J(s,t)=H(s,t)[x1y1x2y2x3y3x4y4] \boldsymbol{J}(s,t) =\boldsymbol{H}(s,t) \begin{bmatrix} x_1&y_1\\x_2&y_2\\x_3&y_3\\x_4&y_4 \end{bmatrix}
H(s,t)=14[1+t(1+t)(1t)1t1+s1s(1s)(1+s)] \boldsymbol{H}(s,t)=\frac{1}{4} \begin{bmatrix} 1+t&-(1+t)&-(1-t)&1-t\\ 1+s&1-s&-(1-s)&-(1+s) \end{bmatrix}
ε=[100001]J1{usut}+[000110]J1{vsvt} \boldsymbol{\varepsilon} = \begin{bmatrix}1&0\\0&0\\0&1\end{bmatrix}\boldsymbol{J}^{-1} \begin{Bmatrix}\dfrac{\partial u}{\partial s}\\[3pt]\dfrac{\partial u}{\partial t}\end{Bmatrix} + \begin{bmatrix}0&0\\0&1\\1&0\end{bmatrix}\boldsymbol{J}^{-1} \begin{Bmatrix}\dfrac{\partial v}{\partial s}\\[3pt]\dfrac{\partial v}{\partial t}\end{Bmatrix}

04

Strain-displacement matrix

Differentiating the displacement interpolation in the natural coordinates gives:

{usut}=H(s,t){u1u2u3u4},{vsvt}=H(s,t){v1v2v3v4} \begin{Bmatrix}\dfrac{\partial u}{\partial s}\\[3pt]\dfrac{\partial u}{\partial t}\end{Bmatrix} =\boldsymbol{H}(s,t)\begin{Bmatrix}u_1\\u_2\\u_3\\u_4\end{Bmatrix}, \qquad \begin{Bmatrix}\dfrac{\partial v}{\partial s}\\[3pt]\dfrac{\partial v}{\partial t}\end{Bmatrix} =\boldsymbol{H}(s,t)\begin{Bmatrix}v_1\\v_2\\v_3\\v_4\end{Bmatrix}

Therefore:

ε=[100001]b{u1u2u3u4}+[000110]b{v1v2v3v4} \boldsymbol{\varepsilon} = \begin{bmatrix}1&0\\0&0\\0&1\end{bmatrix}\boldsymbol{b} \begin{Bmatrix}u_1\\u_2\\u_3\\u_4\end{Bmatrix} + \begin{bmatrix}0&0\\0&1\\1&0\end{bmatrix}\boldsymbol{b} \begin{Bmatrix}v_1\\v_2\\v_3\\v_4\end{Bmatrix}
b=J1H=[b11b12b13b14b21b22b23b24] \boldsymbol{b}=\boldsymbol{J}^{-1}\boldsymbol{H} =\begin{bmatrix} b_{11}&b_{12}&b_{13}&b_{14}\\ b_{21}&b_{22}&b_{23}&b_{24} \end{bmatrix}

Collecting the nodal displacement components yields:

ε=Buel \boldsymbol{\varepsilon}=\boldsymbol{B}\boldsymbol{u}_{el}
B(s,t)=[b110b120b130b1400b210b220b230b24b21b11b22b12b23b13b24b14] \boldsymbol{B}(s,t)= \begin{bmatrix} b_{11}&0&b_{12}&0&b_{13}&0&b_{14}&0\\ 0&b_{21}&0&b_{22}&0&b_{23}&0&b_{24}\\ b_{21}&b_{11}&b_{22}&b_{12}&b_{23}&b_{13}&b_{24}&b_{14} \end{bmatrix}

05

Constitutive law and stiffness matrix

The element stiffness matrix is:

kel=hAelBTDBdA \boldsymbol{k}_{el} =h\int_{A_{el}}\boldsymbol{B}^{T}\boldsymbol{D}\boldsymbol{B}\,dA

For the plane stress state, the constitutive matrix is:

D=E1ν2[1ν0ν10001ν2] \boldsymbol{D}=\frac{E}{1-\nu^2} \begin{bmatrix} 1&\nu&0\\ \nu&1&0\\ 0&0&\dfrac{1-\nu}{2} \end{bmatrix}

Here EE is Young's modulus, ν\nu is Poisson's ratio, hh is the element thickness, and AelA_{el} is the element area.

Because B\boldsymbol{B} depends on ss and tt, the stiffness integral is evaluated in natural coordinates:

kel=h1111BT(s,t)DB(s,t)det ⁣(J(s,t))dsdt \boldsymbol{k}_{el} =h\int_{-1}^{1}\int_{-1}^{1} \boldsymbol{B}^{T}(s,t)\boldsymbol{D}\boldsymbol{B}(s,t) \det\!\bigl(\boldsymbol{J}(s,t)\bigr)\,ds\,dt

det ⁣(J(s,t))\det\!\bigl(\boldsymbol{J}(s,t)\bigr) is the determinant of the Jacobian.

06

Gauss quadrature

Using a 2×22\times2 Gauss quadrature, with two Gauss points in each natural-coordinate direction:

(s,t)=(±13,±13) (s,t)=\left(\pm\frac{1}{\sqrt{3}},\,\pm\frac{1}{\sqrt{3}}\right)

All four weights are equal to one. With the scalar integrand

E(s,t)=hBT(s,t)DB(s,t)det ⁣(J(s,t)) \mathcal{E}(s,t)=h\boldsymbol{B}^{T}(s,t)\boldsymbol{D}\boldsymbol{B}(s,t) \det\!\bigl(\boldsymbol{J}(s,t)\bigr)

the quadrature gives:

kelE ⁣(33,33)+E ⁣(33,33)+E ⁣(33,33)+E ⁣(33,33) \boldsymbol{k}_{el}\approx \mathcal{E}\!\left(\frac{\sqrt{3}}{3},\frac{\sqrt{3}}{3}\right) +\mathcal{E}\!\left(\frac{\sqrt{3}}{3},-\frac{\sqrt{3}}{3}\right) +\mathcal{E}\!\left(-\frac{\sqrt{3}}{3},\frac{\sqrt{3}}{3}\right) +\mathcal{E}\!\left(-\frac{\sqrt{3}}{3},-\frac{\sqrt{3}}{3}\right)

07

MATLAB example

The cantilever has length L=200 mmL=200\ \mathrm{mm}, height H=50 mmH=50\ \mathrm{mm}, and thickness h=5 mmh=5\ \mathrm{mm}. The material properties are E=2.1×105 MPaE=2.1\times10^5\ \mathrm{MPa} and ν=0.3\nu=0.3. The left edge at x=0x=0 is clamped, so u=v=0u=v=0. A total force F=1000 NF=1000\ \mathrm{N} is uniformly distributed in the negative vertical direction over the free edge at x=Lx=L.

Quadrilateral finite element mesh of the clamped cantilever with distributed free-end load
Figure 2. Cantilever geometry, constraints, structured quadrilateral mesh, and uniformly distributed free-end force.

The MATLAB program is organized as follows:

  • gen generates the cantilever mesh, boundary conditions, loads, material data, and model plot.
  • plane2d forms all element stiffness matrices, assembles the global system, imposes the boundary conditions and loads, and solves for the nodal displacements.
  • plot_disp plots the horizontal or vertical displacement map.
  • plot_stress plots the selected stress map.

The stiffness routine preserves the explicit Jacobian operations used in the derivation:

J=H*[xel yel];
detJ=abs(det(J));
J1=inv(J);
b=J1*H;

The results are obtained with 40 quadrilateral elements along the beam and 16 elements through its height: 640 finite elements, 697 nodes, and 1394 equations.

Execution status

The complete program was executed in MATLAB R2026a. The mesh counts and all reported displacement and stress extrema were reproduced.

08

Displacement results

Figure 3. Horizontal displacement uu, in millimetres.
Figure 4. Vertical displacement vv, in millimetres.
umin=0.04574×102 mm,umax=0.04574×102 mm u_{\min}=-0.04574\times10^{-2}\ \mathrm{mm},\qquad u_{\max}=0.04574\times10^{-2}\ \mathrm{mm}
vmin=0.2535 mm,vmax=0 v_{\min}=-0.2535\ \mathrm{mm},\qquad v_{\max}=0

For comparison, the magnitude of the free-end displacement predicted by the Timoshenko beam model is:

vmaxTimoshenko=FL33EI+1.2FLGA=0.2557 mm \left|v_{\max}\right|_{\mathrm{Timoshenko}} =\frac{FL^3}{3EI}+1.2\frac{FL}{GA} =0.2557\ \mathrm{mm}

The finite element displacement is negative because the applied force acts in the negative vertical direction.

09

Stress results

For plotting, stresses are evaluated at the element nodes and averaged at nodes shared by adjacent elements.

Figure 5. Normal stress σx\sigma_x, in MPa.
Figure 6. Von Mises stress σVM\sigma_{\mathrm{VM}}, in MPa.
σx,min115.22 MPa,σx,max115.22 MPa \sigma_{x,\min}\approx-115.22\ \mathrm{MPa},\qquad \sigma_{x,\max}\approx115.22\ \mathrm{MPa}
σVM,min4.442 MPa,σVM,max109.17 MPa \sigma_{\mathrm{VM},\min}\approx4.442\ \mathrm{MPa},\qquad \sigma_{\mathrm{VM},\max}\approx109.17\ \mathrm{MPa}
Figure 7. Shear stress τxy\tau_{xy}, in MPa.

For the rectangular cross-section, the Jourawski formula gives:

τmax=32VA=1.51000505=6 MPa\tau_{\max}=\frac{3}{2}\frac{V}{A} =1.5\frac{1000}{50\cdot5} =6\ \mathrm{MPa}

At the node located at the center of the rectangular beam domain, the Q4 solution gives τxy=5.9199 MPa|\tau_{xy}|=5.9199\ \mathrm{MPa}, compared with 6 MPa6\ \mathrm{MPa} from the Jourawski formula, a difference of about 1.34%1.34\%.

The MATLAB results agree with those obtained with the accompanying ANSYS model.

10

Programs and downloads

The MATLAB package was executed in MATLAB R2026a. The ANSYS macro was inspected for consistency with the same geometry, thickness, material, plane-stress model, loading, constraints, and mesh, but was not executed during preparation of this page.

11

Reference

  1. C. A. Felippa, Introduction to Finite Element Methods, University of Colorado Boulder, course notes and syllabus.