Chapter 6

Beam Finite Element — Nonlinear Double-Clamped Beam

A two-node cubic Euler–Bernoulli beam formulation for linear elastic material, small strains, and moderately large displacements, solved by the Newton–Raphson method.

Euler–Bernoulli beamGeometric nonlinearityNewton–RaphsonMATLAB and ANSYS

01

Model and constitutive relations

A double-clamped beam is loaded at its midpoint by the force FF [2].

MaterialLinear elastic
StrainSmall
DisplacementModerately large
Double-clamped beam of span d with a midpoint force F and midpoint displacement v sub C
Figure 1. Double-clamped beam, geometry, load, and displacement notation.

Points AA and BB are completely fixed. Because the axial displacements of both ends are restrained, an axial force develops as the beam deflects.

{uA=0vA=0φA=0\left\{\begin{array}{c}u_A=0\\[4pt]v_A=0\\[4pt]\varphi_A=0\end{array}\right.
{uB=0vB=0φB=0\left\{\begin{array}{c}u_B=0\\[4pt]v_B=0\\[4pt]\varphi_B=0\end{array}\right.

The displacement-dependent axial strain makes the problem nonlinear. For the Euler–Bernoulli beam model, the generalized strain and work-conjugate generalized stress vectors are:

ε={ε0κ},σ={NM}\boldsymbol{\varepsilon}=\left\{\begin{array}{c}\varepsilon_0\\[4pt]\kappa\end{array}\right\},\qquad \boldsymbol{\sigma}=\left\{\begin{array}{c}N\\[4pt]M\end{array}\right\}

In this planar analysis, TT and TyT_y denote the same transverse force component, while MM and MzM_z denote the same bending moment component.

Hooke's law is:

σ=Dε,D=[EA00EI]\boldsymbol{\sigma}=\boldsymbol D\boldsymbol{\varepsilon},\qquad \boldsymbol D=\left[\begin{array}{cc}EA&0\\[4pt]0&EI\end{array}\right]

or, component by component,

N=EAε0,M=EIκN=EA\varepsilon_0,\qquad M=EI\kappa
ε0\varepsilon_0
axial strain of the neutral axis
κ\kappa
curvature of the neutral axis
NN
axial force
MM
bending moment
EE
Young's modulus
A, IA,\ I
cross-sectional area and second moment of area

02

Cubic beam finite element

Cubic two-node beam finite element with nodal axial and transverse displacements and rotations
Figure 2. Two-node cubic beam finite element and its six nodal degrees of freedom.

With the normalized coordinate ξ=x/L\xi=x/L, the axial displacement is interpolated linearly and the transverse displacement cubically. These are the standard Euler–Bernoulli interpolation functions used in Section 5.1 [1].

u(x)=[1ξ, 0, 0, ξ, 0, 0]uel=Nuuelu(x)=\left[1-\xi,\ 0,\ 0,\ \xi,\ 0,\ 0\right]\boldsymbol u_{el}=\boldsymbol N_u\boldsymbol u_{el}
v(x)=[0, 2ξ33ξ2+1, (ξ32ξ2+ξ)L, 0, 2ξ3+3ξ2, (ξ3ξ2)L]uel=Nvuelv(x)=\left[0,\ 2\xi^3-3\xi^2+1,\ (\xi^3-2\xi^2+\xi)L,\ 0,\ -2\xi^3+3\xi^2,\ (\xi^3-\xi^2)L\right]\boldsymbol u_{el}=\boldsymbol N_v\boldsymbol u_{el}
φ(x)=dvdx=[0, 6ξ26ξL, 3ξ24ξ+1, 0, 6ξ2+6ξL, 3ξ22ξ]uel=Nv,xuel\varphi(x)=\frac{dv}{dx}=\left[0,\ \frac{6\xi^2-6\xi}{L},\ 3\xi^2-4\xi+1,\ 0,\ \frac{-6\xi^2+6\xi}{L},\ 3\xi^2-2\xi\right]\boldsymbol u_{el}=\boldsymbol N_{v,x}\boldsymbol u_{el}
uel={u1v1φ1u2v2φ2}\boldsymbol u_{el}=\left\{\begin{array}{c}u_1\\[3pt]v_1\\[3pt]\varphi_1\\[3pt]u_2\\[3pt]v_2\\[3pt]\varphi_2\end{array}\right\}

Here LL is the element length and uel\boldsymbol u_{el} is the element nodal-displacement vector.

03

Moderately large-displacement strain

Differential neutral-axis segment before and after axial and transverse displacement
Figure 3. Differential geometry used to derive the axial strain.

The exact axial strain of the neutral axis obtained from Figure 3 is:

ε0=(dx+du)2+dv2dxdx=(1+dudx)2+(dvdx)21\varepsilon_0=\frac{\sqrt{(dx+du)^2+dv^2}-dx}{dx}=\sqrt{\left(1+\frac{du}{dx}\right)^2+\left(\frac{dv}{dx}\right)^2}-1
ε0=1+2dudx+(dudx)2+(dvdx)21\varepsilon_0=\sqrt{1+2\frac{du}{dx}+\left(\frac{du}{dx}\right)^2+\left(\frac{dv}{dx}\right)^2}-1

The square root is expanded as:

1+a1+12a18a2,a=2dudx+(dudx)2+(dvdx)2\sqrt{1+a}\approx1+\frac12a-\frac18a^2,\qquad a=2\frac{du}{dx}+\left(\frac{du}{dx}\right)^2+\left(\frac{dv}{dx}\right)^2

After terms of third or higher degree are neglected, the moderately large-displacement approximation is:

ε0dudx+12(dvdx)2\varepsilon_0\approx\frac{du}{dx}+\frac12\left(\frac{dv}{dx}\right)^2

The generalized strain vector is therefore:

ε={ε0κ}={dudx+12(dvdx)2d2vdx2}\boldsymbol{\varepsilon}=\left\{\begin{array}{c}\varepsilon_0\\[5pt]\kappa\end{array}\right\}=\left\{\begin{array}{c}\dfrac{du}{dx}+\dfrac12\left(\dfrac{dv}{dx}\right)^2\\[10pt]\dfrac{d^2v}{dx^2}\end{array}\right\}

The derivatives of the interpolation functions are:

dudx=1L[1, 0, 0, 1, 0, 0]uel=Nu,xuel\frac{du}{dx}=\frac1L\left[-1,\ 0,\ 0,\ 1,\ 0,\ 0\right]\boldsymbol u_{el}=\boldsymbol N_{u,x}\boldsymbol u_{el}
dvdx=[0, 6ξ26ξL, 3ξ24ξ+1, 0, 6ξ2+6ξL, 3ξ22ξ]uel=Nv,xuel\frac{dv}{dx}=\left[0,\ \frac{6\xi^2-6\xi}{L},\ 3\xi^2-4\xi+1,\ 0,\ \frac{-6\xi^2+6\xi}{L},\ 3\xi^2-2\xi\right]\boldsymbol u_{el}=\boldsymbol N_{v,x}\boldsymbol u_{el}
κ=d2vdx2=[0, 12ξ6L2, 6ξ4L, 0, 12ξ+6L2, 6ξ2L]uel=Nκuel\kappa=\frac{d^2v}{dx^2}=\left[0,\ \frac{12\xi-6}{L^2},\ \frac{6\xi-4}{L},\ 0,\ \frac{-12\xi+6}{L^2},\ \frac{6\xi-2}{L}\right]\boldsymbol u_{el}=\boldsymbol N_{\kappa}\boldsymbol u_{el}

Hence,

ε0=Nu,xuel+12(Nv,xuel)2,κ=Nκuel\varepsilon_0=\boldsymbol N_{u,x}\boldsymbol u_{el}+\frac12\left(\boldsymbol N_{v,x}\boldsymbol u_{el}\right)^2,\qquad \kappa=\boldsymbol N_{\kappa}\boldsymbol u_{el}

04

Potential energy and nonlinear equilibrium

The total potential energy, summed over all beam elements, is:

Π=12el0LεTDεdxU  uTFV\Pi=\underbrace{\frac12\sum_{el}\int_0^L\boldsymbol{\varepsilon}^{T}\boldsymbol D\boldsymbol{\varepsilon}\,dx}_{U}\;\underbrace{-\boldsymbol u^{T}\boldsymbol F}_{V}
Π=12el0L(EAε02+EIκ2)dxU  uTFV\Pi=\underbrace{\frac12\sum_{el}\int_0^L\left(EA\varepsilon_0^2+EI\kappa^2\right)dx}_{U}\;\underbrace{-\boldsymbol u^{T}\boldsymbol F}_{V}

UU is the deformation energy, VV is the potential of the external nodal-force vector F\boldsymbol F, and u\boldsymbol u is the assembled nodal-displacement vector.

The minimum-total-potential-energy condition is:

Ψ=Πu=0\boldsymbol\Psi=\frac{\partial\Pi}{\partial\boldsymbol u}=\boldsymbol0

This condition produces the nonlinear algebraic system Ψ(u)=0\boldsymbol\Psi(\boldsymbol u)=\boldsymbol0. At iteration ii, the Newton–Raphson update is:

Δu(i)=[Kt ⁣(u(i))]1Ψ ⁣(u(i))\Delta\boldsymbol u^{(i)}=-\left[\boldsymbol K_t\!\left(\boldsymbol u^{(i)}\right)\right]^{-1}\boldsymbol\Psi\!\left(\boldsymbol u^{(i)}\right)
u(i+1)=u(i)+Δu(i)\boldsymbol u^{(i+1)}=\boldsymbol u^{(i)}+\Delta\boldsymbol u^{(i)}

The residual and tangent stiffness are:

Ψ=UuF=elfelF\boldsymbol\Psi=\frac{\partial U}{\partial\boldsymbol u}-\boldsymbol F=\sum_{el}\boldsymbol f_{el}-\boldsymbol F
Kt(u)=2Uu2=el2Ueluel2=elkel\boldsymbol K_t(\boldsymbol u)=\frac{\partial^2U}{\partial\boldsymbol u^2}=\sum_{el}\frac{\partial^2U_{el}}{\partial\boldsymbol u_{el}^2}=\sum_{el}\boldsymbol k_{el}

05

Element residual and tangent stiffness

The deformation energy of one finite element is:

Uel=120LεTDεdx=120L(EAε02+EIκ2)dxU_{el}=\frac12\int_0^L\boldsymbol{\varepsilon}^{T}\boldsymbol D\boldsymbol{\varepsilon}\,dx=\frac12\int_0^L\left(EA\varepsilon_0^2+EI\kappa^2\right)dx

Using Gaussian quadrature,

Uel=12G=1nGηG(EAε0G2+EIκG2)L2,ε0G=ε0(ξG),κG=κ(ξG)U_{el}=\frac12\sum_{G=1}^{n_G}\eta_G\left(EA\varepsilon_{0G}^{2}+EI\kappa_G^{2}\right)\frac L2,\qquad \varepsilon_{0G}=\varepsilon_0(\xi_G),\quad \kappa_G=\kappa(\xi_G)

Two Gauss points are sufficient, nG=2n_G=2. On 0ξ10\leq\xi\leq1, their coordinates and weights are:

ξG=12(1±33),ηG=1\xi_G=\frac12\left(1\pm\frac{\sqrt3}{3}\right),\qquad \eta_G=1

The element unbalanced-force vector and tangent stiffness matrix follow by differentiation:

fel=Ueluel,kel=feluel=2Ueluel2\boldsymbol f_{el}=\frac{\partial U_{el}}{\partial\boldsymbol u_{el}},\qquad \boldsymbol k_{el}=\frac{\partial\boldsymbol f_{el}}{\partial\boldsymbol u_{el}}=\frac{\partial^2U_{el}}{\partial\boldsymbol u_{el}^2}
fel=G=12(EAε0ε0uel+EIκκuel)GL2\boldsymbol f_{el}=\sum_{G=1}^{2}\left(EA\varepsilon_0\frac{\partial\varepsilon_0}{\partial\boldsymbol u_{el}}+EI\kappa\frac{\partial\kappa}{\partial\boldsymbol u_{el}}\right)_G\frac L2
kel=G=12[EAε02ε0uel2+EAε0uel(ε0uel)T+EIκ2κuel2+EIκuel(κuel)T]GL2\boldsymbol k_{el}=\sum_{G=1}^{2}\left[EA\varepsilon_0\frac{\partial^2\varepsilon_0}{\partial\boldsymbol u_{el}^2}+EA\frac{\partial\varepsilon_0}{\partial\boldsymbol u_{el}}\left(\frac{\partial\varepsilon_0}{\partial\boldsymbol u_{el}}\right)^T+EI\kappa\frac{\partial^2\kappa}{\partial\boldsymbol u_{el}^2}+EI\frac{\partial\kappa}{\partial\boldsymbol u_{el}}\left(\frac{\partial\kappa}{\partial\boldsymbol u_{el}}\right)^T\right]_G\frac L2

The required first and second derivatives are:

ε0uel=Nu,xT+(Nv,xTNv,x)uel,κuel=NκT\frac{\partial\varepsilon_0}{\partial\boldsymbol u_{el}}=\boldsymbol N_{u,x}^{T}+\left(\boldsymbol N_{v,x}^{T}\boldsymbol N_{v,x}\right)\boldsymbol u_{el},\qquad \frac{\partial\kappa}{\partial\boldsymbol u_{el}}=\boldsymbol N_{\kappa}^{T}
2ε0uel2=Nv,xTNv,x,2κuel2=06×6\frac{\partial^2\varepsilon_0}{\partial\boldsymbol u_{el}^2}=\boldsymbol N_{v,x}^{T}\boldsymbol N_{v,x},\qquad \frac{\partial^2\kappa}{\partial\boldsymbol u_{el}^2}=\boldsymbol0_{6\times6}

Element vectors and matrices are assembled in the standard way:

Ψ=elfelF,Kt=elkel=elfeluel\boldsymbol\Psi=\sum_{el}\boldsymbol f_{el}-\boldsymbol F,\qquad \boldsymbol K_t=\sum_{el}\boldsymbol k_{el}=\sum_{el}\frac{\partial\boldsymbol f_{el}}{\partial\boldsymbol u_{el}}

The iterative process stops when the displacement-correction norm is smaller than the prescribed tolerance.

06

Example 1 — double-clamped beam

The beam has a rectangular cross-section w×t=5 mm×1 mmw\times t=5\ \mathrm{mm}\times1\ \mathrm{mm}, span d=100 mmd=100\ \mathrm{mm}, Young's modulus E=2×105 MPaE=2\times10^5\ \mathrm{MPa}, and midpoint force F=100 NF=100\ \mathrm N. The MATLAB result agrees with the ANSYS large-deformation model. At the final load step,

vC=1.86555 mm,vCd=0.0186555,NF=8.01210v_C=-1.86555\ \mathrm{mm},\qquad \frac{|v_C|}{d}=0.0186555,\qquad \frac NF=8.01210

Although vC/d<0.02|v_C|/d<0.02, the difference from the linear response is clearly visible. The axial force induced by the two axial restraints is constant along the beam.

Dimensionless force versus midpoint displacement, comparing the presented method, ANSYS, and linear analysis
Figure 4. Force versus midpoint displacement. The MATLAB and ANSYS curves coincide; the linear response is also shown.
Dimensionless axial force versus midpoint displacement
Figure 5. Axial force versus midpoint displacement. The axial force is constant along the beam at every load step.
Normalized shear-force diagram at 100 newtons
Figure 6. Shear-force diagram for F=100 NF=100\ \mathrm N.
Normalized bending-moment diagram at 100 newtons
Figure 7. Bending-moment diagram for F=100 NF=100\ \mathrm N.
Constant normalized axial force along the double-clamped beam
Figure 8. Constant axial-force ratio along the beam: N/F=8.012N/F=8.012.

07

Example 2 — cantilever

Consider a cantilever with w×t=5 mm×1 mmw\times t=5\ \mathrm{mm}\times1\ \mathrm{mm}, L=100 mmL=100\ \mathrm{mm}, E=2×105 MPaE=2\times10^5\ \mathrm{MPa}, and a transverse free-end force F=4 NF=4\ \mathrm N. The normalized maximum displacement is:

linear model:vmaxL=FL23EI=0.160presented method, 40 elements:vmaxL=0.1424exact elastica:vmaxL=0.1183\begin{aligned}\text{linear model:}\quad &\frac{v_{max}}L=\frac{FL^2}{3EI}=0.160\\[5pt]\text{presented method, 40 elements:}\quad &\frac{v_{max}}L=0.1424\\[5pt]\text{exact elastica:}\quad &\frac{v_{max}}L=0.1183\end{aligned}

The error of the moderately large-displacement approximation relative to the exact elastica result is about 20%. The approximation is suitable when the slope φ\varphi is less than approximately 100.175 rad10^\circ\approx0.175\ \mathrm{rad}, for which

φ2=(dvdx)20.03\varphi^2=\left(\frac{dv}{dx}\right)^2\approx0.03

This term is then small compared with unity [2]. In the present example, φmax0.21 rad12\varphi_{max}\approx0.21\ \mathrm{rad}\approx12^\circ.

Deformed cantilever comparison between the presented method and exact elastica
Figure 9. Deformed cantilever: moderately large-displacement approximation and exact elastica.
Cantilever geometry with free-end displacement and rotation
Figure 10. Cantilever load, displacement, and rotation notation.

08

MATLAB and ANSYS files

The MATLAB package contains the complete nonlinear analysis, result recovery, diagram generation, and a README. The code follows the element equations above: deriv.m evaluates ε0\varepsilon_0, κ\kappa, and their derivatives; stiff.m integrates and assembles fel\boldsymbol f_{el} and kel\boldsymbol k_{el}; and main.m performs the load-step and Newton–Raphson loops.

deriv.mStrain and curvature
%*** deriv ***
ep = Nux*uel + 1/2*(Nvx*uel)^2;
ep1 = Nux' + (Nvx'*Nvx)*uel;
ep2 = Nvx'*Nvx;

ka = Nka*uel;
ka1 = Nka';
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.

The ANSYS macro uses symmetry: it models half of the beam, imposes the midpoint symmetry conditions, and applies F/2=50 NF/2=50\ \mathrm N to represent the 100 N100\ \mathrm N force on the complete beam. The macro was inspected against the model definition; ANSYS was not available in the local execution environment.

09

References

  1. C. A. Felippa, Introduction to Finite Element Methods.
  2. Massachusetts Institute of Technology, Lecture 6: Moderately Large Deflection Theory of Beams, Structural Mechanics, 2013.