Alert - Please ensure that you refresh this webpage without using your browsers cache. Issues have been reported that the website otherwise may be out of date. See here for more information.
Your homework solution has to be handed in as a group solution via Moodle.
Your notebooks must run without errors in our environment on the RWTH-Cluster. See here for more information on how to get started.
Participant list
Please add your names and student ID (Matrikelnummer) here:
Name, ID
Name, ID
Name, ID
Name, ID
Learning goals
Hooke’s law and its weak formulation in 2D plane strain
FEM implementation of static linear elasticity in FenicsX
Validating an FE implementation against an analytical reference (Rod Elongation)
Connecting the full 2D elasticity solution to the dimensionally reduced Euler-Bernoulli beam theory (Cantilever Beam Bending)
Understand generalised eigenvalue problems for free vibration: natural frequencies and mode shapes
Before you start
Make sure that you update the library folder in your CMM directory. Download link: library.tar.gz
Make sure that you update your dolfinx_latest.sif container image.
You can use the following command on the RWTH cluster/Linux:
This notebook, in particular task 2 and task 3, are inspired by the work of
@software{bleyer2024comet,
author = {Bleyer, Jeremy},
title = {{Numerical tours of Computational Mechanics with
FEniCSx}},
month = jan,
year = 2024,
publisher = {Zenodo},
version = {v0.1},
doi = {10.5281/zenodo.10470942},
url = {https://doi.org/10.5281/zenodo.10470942}
}
TODOs:
Linear Elasticity Problem Settting
Throughout this notebook we work in 2D plane strain on a rectangular domain \(\Omega = [0, L] \times [0, h]\). Plane strain corresponds to a material slab that is uniform and constrained in the third (out-of-plane) direction. The relevant constitutive law is Hooke’s law
\[
\sigma = \lambda\,\mathrm{tr}(D)\,\mathbf I_{2\times 2} + 2\mu D,
\qquad D = \tfrac{1}{2}\bigl(\nabla \mathbf w + (\nabla \mathbf w)^T\bigr),
\]
Three exercises follow. In P1 we validate the implementation by recovering \(E\) and \(\nu\) from a uniaxial test. In P2, we look at bending of a cantilever beam, and continue with a free-vibration eigenmode analysis of the same cantilever beam geometry in P3.
# Material parameters (steel)E =210e9nu =0.3rho =7850.0lambda_ = (E*nu) / ((1+ nu)*(1-2*nu))mu = E / (2*(1+ nu))print(f'E = {E:.3e} Pa, nu = {nu}, rho = {rho} kg/m^3')print(f'lambda = {lambda_:.3e} Pa, mu = {mu:.3e} Pa')
E = 2.100e+11 Pa, nu = 0.3, rho = 7850.0 kg/m^3
lambda = 1.212e+11 Pa, mu = 8.077e+10 Pa
Before we trust any downstream FE result, we run a calibration test: apply a known uniaxial stress to a 2D slab and use the resulting strains to recover\(E\) and \(\nu\) from the numerical solution. If the implementation is correct, the recovered values must match the inputs.
Setup
Take a thin rectangle \([0,\ell]\times[0,s]\) with \(\ell = 0.10\ \mathrm m\) and \(s = 0.01\ \mathrm m\). Apply a tensile traction \(\mathbf t = (P/(s\cdot 1\ \mathrm m),\,0)\) to the right edge (the \(1\ \mathrm m\) accounts for the unit out-of-plane thickness in plane strain). Constrain the left edge in \(x\) (roller), and pin the bottom-left corner in \(y\) to remove the rigid-body translation.
For \(P = 10^7\) N (per unit out-of-plane metre) the imposed stress is \(\sigma_{xx} = P / (s \cdot 1\,\mathrm m) = 10^9\ \mathrm{Pa} = 1\) GPa, which gives a strain \(\sigma_{xx}/E \approx 4.76\cdot 10^{-3}\) — well within the linear regime, and large enough that a small visualisation scale already makes the deformation visible.
Strong problem
Let \(\Omega = [0,\ell]\times[0,s]\) with boundary partitioned into \(\Gamma_L\) (left, \(x=0\)), \(\Gamma_R\) (right, \(x=\ell\)), \(\Gamma_T\cup\Gamma_B\) (top/bottom, traction-free), and the corner point \(\mathbf x_c = (0,0)\). The strong problem is:
with the constitutive law \(\sigma(\mathbf w) = \lambda\,\mathrm{tr}(D(\mathbf w))\,\mathbf I + 2\mu\,D(\mathbf w)\) and \(D(\mathbf w) = \tfrac{1}{2}(\nabla\mathbf w + \nabla\mathbf w^{\!T})\).
Weak problem
Define the (Ritz–Galerkin) trial-and-test space
\[
V = \bigl\{\,\mathbf w \in [H^1(\Omega)]^2 \;\big|\; w_x = 0 \text{ on } \Gamma_L,\ w_y(\mathbf x_c) = 0\,\bigr\}.
\]
Multiplying the momentum balance by \(\mathbf v \in V\), integrating over \(\Omega\), applying the divergence theorem and inserting the Neumann data on \(\Gamma_R\) (with \(\Gamma_T\cup\Gamma_B\) traction-free) yields:
Find\(\mathbf w \in V\) such that \[
\int_\Omega \sigma(\mathbf w):\nabla\mathbf v \,dx \;=\; \int_{\Gamma_R} \mathbf t\cdot\mathbf v \,ds
\]for all\(\mathbf v \in V\).
From the 3D rod analytic to a 2D plane-strain simulation
In §6.7.1 we derived the 3D rod result by imposing \(\sigma_{xx}\ne 0\) with all other stress components zero — in particular \(\sigma_{yy} = \sigma_{zz} = 0\) (the rod is laterally free). Hooke’s law inverted gives
Our 2D simulation is not a 3D rod — it is a plane-strain slice. Plane strain is the limit of an infinitely-long out-of-plane geometry where every section deforms identically, so \(D_{33} = 0\) is enforced kinematically. With \(D_{33}=0\) the third row of Hooke’s law no longer says \(\sigma_{zz}=0\); instead it says
i.e. the rod is now squeezed by a non-zero \(\sigma_{zz}\) that the constraint generates. Substituting this back, the in-plane Hooke’s law (with the free-surface condition \(\sigma_{yy}=0\) from the unloaded top/bottom) becomes
So if we blindly apply the 3D rod formulas \(D_{11}=\sigma_{xx}/E_\text{meas}\) and \(D_{22}=-\nu_\text{meas}\sigma_{xx}/E_\text{meas}\) to the in-plane numbers, we do not recover \(E\) and \(\nu\) — we recover the apparent plane-strain constants
These two quantities are not new physics; they are exactly the bookkeeping needed to map the 3D rod relations onto a plane-strain measurement. (The same \(1/(1-\nu^2)\) factor reappears in the plate-bending stiffness \(K_b = E h^3/[12(1-\nu^2)]\) in §6.11, but via a different clamping: a Kirchhoff plate is in plane stress through the thickness, and the factor arises from the lateral kinematic constraint \(\varepsilon_{yy} = 0\) blocking anticlastic curvature. Same algebra, different transverse direction clamped.) In the limit \(\nu\to 0\) the constraint is inactive and \(E^*\to E\), \(\nu^*\to\nu\).
The conversion back is one-to-one:
\[
\nu = \frac{\nu^*}{1+\nu^*}, \qquad E = E^*(1-\nu^2).
\]
Analysis Procedure
Solve the static plane-strain problem.
Read off \(D_{11}\) from the elongation \(\Delta\ell/\ell\) and \(D_{22}\) from the contraction \(\Delta s/s\).
Compute \(E^*_\text{measured}\) and \(\nu^*_\text{measured}\).
Convert back to physical\(E,\nu\) via \(\nu = \nu^*/(1+\nu^*)\) and \(E = E^*(1-\nu^2)\).
Implement the weak form for static plane-strain elasticity in weak_form_uniaxial. Build the bilinear and linear forms using the small-strain tensor \(D(\mathbf{w}) = \tfrac{1}{2}(\nabla\mathbf{w} + \nabla\mathbf{w}^T)\), the Cauchy stress \(\sigma = \lambda\,\mathrm{tr}(D)\,\mathbf{I} + 2\mu D\), and the traction integral on the right edge \(\Gamma_R\).
def weak_form_uniaxial(V, domain, bb, P_per_metre=1e4):'''Static plane-strain weak form for a slab under uniaxial right-edge traction. Left edge is a vertical roller; bottom-left corner is pinned in y to remove rigid-body translation.''' u = ufl.TrialFunction(V) v = ufl.TestFunction(V)# Define ds on the different facets of the boundary (2D)# [ds(1)=left, ds(2)=right, ds(3)=bottom, ds(4)=top] facet_tags = library.helpers.generate_facets_tags(domain, bb[0], bb[1]) ds = ufl.Measure('ds', domain=domain, subdomain_data=facet_tags) dx = ufl.dx### TODO ############################################## Build the weak form for static plane-strain elasticity:# - small-strain tensor D(w) = 0.5*(grad(w) + grad(w).T)# - stress sigma = lambda_ * tr(D(u)) * I + 2*mu*D(u), with I = ufl.Identity(2)# - body force is zero in this section# - traction t = (P_per_metre/length_y, 0) acts on the right edge ds(2)# where length_y = bb[1][1] - bb[0][1] I = ufl.Identity(2) weak_form =0###################################################### lhs = ufl.lhs(weak_form) rhs = ufl.rhs(weak_form)return lhs, rhs
The following cell verifies our implementation by checking that the recovered \(E\) and \(\nu\) match the input values to within numerical tolerance. If the weak formulation was correctly implemented, the test passes :)
library.tests.test_hw02_new_rod(E_recovered, nu_recovered, E, nu)
Passed test_hw02_new_rod?: True
P2 — Cantilever Beam Bending
We now solve the cantilever-bending problem in 2D plane strain. A rectangular slab of length \(L = 1\ \mathrm m\) and thickness \(h\) is clamped at \(x=0\) and loaded by a uniform downward traction \(\mathbf t_y\) on the right edge (\(x=L\)), with total line load\(F\) (force per unit out-of-plane metre).
Analytical reference: Euler-Bernoulli
§6.11 of the script reduces the 3D linear elasticity equations to the Euler-Bernoulli beam equation (EB) in the limit \(\eta = h/L \to 0\). For a cantilever clamped at \(x=0\), free at \(x=L\), with a tip point load \(F\), the closed-form deflection is
\[
w_\text{tip}^{EB} = \frac{F\,L^3}{3\, E^*\,I}, \qquad
I = \frac{h^3}{12} \quad\text{(per unit out-of-plane metre)}.
\]
Two important asymptotic facts:
The bending stiffness\(E^*\, I \propto h^3\) — a factor of two thicker beam is eight times stiffer (this is the central geometric scaling of plate/beam reduction).
For 2D plane strain the relevant modulus is the apparent \(E^* = E/(1-\nu^2)\), exactly the prefactor of \(K_b\) in §6.11.
We sweep \(h/L \in \{0.01, 0.05, 0.10, 0.20, 0.50\}\) and compare the FE tip deflection to the EB prediction. The agreement should be excellent at \(h/L = 0.01\) and progressively worse as \(h/L\) grows — that growing deviation is the price of the asymptotic reduction.
Strong problem
Let \(\Omega = [0,L]\times[0,h]\) with boundary partitioned into \(\Gamma_C\) (clamped, \(x=0\)), \(\Gamma_R\) (loaded right edge, \(x=L\)), and \(\Gamma_T \cup \Gamma_B\) (traction-free top/bottom). The strong problem is:
\[
V = \bigl\{\,\mathbf w \in [H^1(\Omega)]^2 \;\big|\; \mathbf w = \mathbf 0 \text{ on } \Gamma_C\,\bigr\}.
\]
Testing the momentum balance with \(\mathbf v\in V\) and using the Neumann data on \(\Gamma_R\):
Find\(\mathbf w \in V\) such that \[
\int_\Omega \sigma(\mathbf w):\nabla\mathbf v \,dx \;=\; \int_{\Gamma_R} \mathbf t\cdot\mathbf v \,ds
\]for all\(\mathbf v \in V\).
3. The weak form and UFL: From Math to Code
Task 2
STUDENT TODO
Implement the weak form for the Cantilever Beam Bending problem in weak_form_cantilever. Build the bilinear and linear forms using the small-strain tensor \(D(\mathbf{w}) = \tfrac{1}{2}(\nabla\mathbf{w} + \nabla\mathbf{w}^T)\), the Cauchy stress \(\sigma = \lambda\,\mathrm{tr}(D)\,\mathbf{I} + 2\mu D\), and the uniform downward traction on the right edge \(\Gamma_R\).
def weak_form_cantilever(V, domain, bb, F_per_metre=10.0):'''Static plane-strain cantilever: clamped at x=0, uniform downward traction on the right edge equivalent to a tip line-load F (N/m).''' u = ufl.TrialFunction(V) v = ufl.TestFunction(V) facet_tags = library.helpers.generate_facets_tags(domain, bb[0], bb[1]) ds = ufl.Measure('ds', domain=domain, subdomain_data=facet_tags) dx = ufl.dx### TODO ############################################## Build the weak form for static plane-strain elasticity:# - small-strain D(w), stress sigma (use ufl.Identity(2))# - no body force# - the right-edge traction is t = (0, -F_per_metre/h_y) so that the# total downward line-load on the right edge equals F_per_metre N/m# - the traction acts on ds(2) (the right edge marker) I = ufl.Identity(2) weak_form =0###################################################### lhs = ufl.lhs(weak_form) rhs = ufl.rhs(weak_form)return lhs, rhs
# Sweep h/LL =1.0F =10.0# line load N/mE_star = E / (1.0- nu**2)results = []sol = {}for h in [0.01, 0.05, 0.10, 0.20, 0.50]: bb = [[0.0, 0.0], [L, h]] nx =100 ny =max(4, int(round(h / L * nx))) domain_c = generate_domain(bb[0], bb[1], nx=nx, ny=ny) V_CG2, V_CG1 = generate_functionspaces(domain_c) lhs, rhs = weak_form_cantilever(V_CG2, domain_c, bb, F_per_metre=F) prob = fem.petsc.LinearProblem(lhs, rhs, bcs=boundary_conditions_cantilever(V_CG2, domain_c, bb), petsc_options={'ksp_type': 'preonly', 'pc_type': 'lu'}) u_c = prob.solve() u_c_cg1 = library.helpers.project(u_c, V_CG1) coords = V_CG1.tabulate_dof_coordinates() uy = u_c_cg1.x.array.reshape(-1, 2)[:, 1]# Tip deflection = mean of uy on the right edge (mid-line could differ slightly) mask_right = np.isclose(coords[:, 0], L) w_tip_FE =-uy[mask_right].mean() I_section = h**3/12.0 w_tip_EB = F * L**3/ (3.0* E_star * I_section) ratio = w_tip_FE / w_tip_EB results.append((h, w_tip_FE, w_tip_EB, ratio))print(f'h/L = {h:.2f} w_FE = {w_tip_FE:.4e} m w_EB = {w_tip_EB:.4e} m FE/EB = {ratio:.4f}')if h ==0.10: # keep this case for the visualisation below sol =dict(L=L, h=h, F=F, u=u_c_cg1, V=V_CG1, domain=domain_c, bb=bb)
h/L = 0.01 w_FE = 1.7321e-04 m w_EB = 1.7333e-04 m FE/EB = 0.9993
h/L = 0.05 w_FE = 1.3870e-06 m w_EB = 1.3867e-06 m FE/EB = 1.0003
h/L = 0.10 w_FE = 1.7421e-07 m w_EB = 1.7333e-07 m FE/EB = 1.0050
h/L = 0.20 w_FE = 2.2255e-08 m w_EB = 2.1667e-08 m FE/EB = 1.0272
h/L = 0.50 w_FE = 1.6573e-09 m w_EB = 1.3867e-09 m FE/EB = 1.1952
Looking at the results from the sweep, we can draw the following conclusions:
For thin beams (\(h/L \le 0.05\)) the FE solution agrees with Euler-Bernoulli to better than \(0.1\)%. As \(h/L\) grows the ratio rises above 1: the FE beam deflects more than EB predicts. Euler-Bernoulli assumes plane sections remain plane and normal to the deformed mid-surface, which neglects transverse shear; the full plane-strain FE retains it, adding a softening contribution that scales as \(\mathcal O((h/L)^2)\). At \(h/L = 0.20\) this is already a few-percent effect, and at \(h/L = 0.50\) the EB approximation has clearly stopped being asymptotically tight.
Verification
The following cell verifies our cantilever beam implementation by checking the tip-deflection ratios across all \(h/L\) values. If the weak formulation was correctly implemented, the test passes :)
So far P2 was a static problem: the right-hand side was a prescribed traction, and we solved a single linear system. Now we ask a different question: with no external load, in what shapes and at what frequencies does the clamped-free beam naturally oscillate?
From dynamics to an eigenvalue problem
The dynamic momentum balance for a linear-elastic body (no body force) is
i.e. spatial mode shapes that all oscillate at one common frequency \(\omega\). Substituting gives \(\ddot{\mathbf w} = -\omega^2\hat{\mathbf w}\,e^{i\omega t}\), the time factor cancels, and what remains is a spatial equation for the unknown pair \((\omega^2, \hat{\mathbf w})\):
This is structurally the same as \(A\hat{\mathbf w} = \lambda\,\hat{\mathbf w}\) with \(\lambda = \omega^2\) — i.e. an eigenvalue problem: we are looking for the (infinitely many) scalar/function pairs that the operator \(-\rho^{-1}\nabla\cdot\sigma\) admits. The frequencies \(\omega_n\) at which non-trivial \(\hat{\mathbf w}_n\) exist are the natural frequencies, and the corresponding \(\hat{\mathbf w}_n\) are the mode shapes. Once we discretise with finite elements the operator becomes a matrix, and we get the generalised matrix eigenvalue problem\(K\hat{\mathbf w} = \omega^2 M\,\hat{\mathbf w}\) written out below.
Strong problem
Let \(\Omega = [0,L]\times[0,h]\) with \(\Gamma_C\) the clamped edge (\(x=0\)). The strong eigenvalue problem reads:
We want all \((\omega^2,\mathbf w)\) pairs with \(\mathbf w \neq \mathbf 0\).
Weak problem
Define the (Ritz–Galerkin) trial-and-test space
\[
V = \bigl\{\,\mathbf w \in [H^1(\Omega)]^2 \;\big|\; \mathbf w = \mathbf 0 \text{ on } \Gamma_C\,\bigr\}.
\]
Testing the strong form with \(\mathbf v\in V\) and integrating by parts (the boundary term vanishes because \(\sigma\mathbf n = \mathbf 0\) on the free part of \(\partial\Omega\) and \(\mathbf v = \mathbf 0\) on \(\Gamma_C\)):
Find\((\omega^2, \mathbf w) \in \mathbb R_{\ge 0} \times V\setminus\{\mathbf 0\}\) such that \[
\int_\Omega \sigma(\mathbf w):\nabla\mathbf v \,dx \;=\; \omega^2 \int_\Omega \rho\,\mathbf w\cdot\mathbf v \,dx
\]for all\(\mathbf v \in V\).
After FE discretisation this becomes the generalised matrix eigenvalue problem\(K\,\hat{\mathbf w} = \omega^2\,M\,\hat{\mathbf w}\) with
which we solve with SLEPc (shift-invert around zero).
Bridging to the Euler-Bernoulli closed-form spectrum
In the lecture (§6.11) we stated the closed form of the EB eigenfrequencies but did not derive them. Here is the missing step. Recall the Euler-Bernoulli PDE (per unit out-of-plane metre, plane strain) for the mid-line deflection \(w(x,t)\):
The four constants are fixed by the four boundary conditions of a clamped-free beam:
\[
\underbrace{\hat w(0) = 0,\quad \hat w'(0) = 0}_{\text{clamp at }x=0}, \qquad
\underbrace{\hat w''(L) = 0,\quad \hat w'''(L) = 0}_{\text{moment- and shear-free at }x=L}.
\]
Imposing all four BCs gives a \(4\times 4\) homogeneous linear system \(A(\beta L)\,\mathbf c = \mathbf 0\) for the unknown coefficients \(\mathbf c=(c_1,\dots,c_4)\). A non-trivial mode shape exists iff \(\det A(\beta L) = 0\), which collapses to the transcendental characteristic equation
This equation has a discrete sequence of positive roots \(\beta_1 L < \beta_2 L < \dots\). As \(n\) grows, \(1/\cosh(\beta L)\to 0\) rapidly, so the roots approach \((n-\tfrac12)\pi\) (the zeros of \(\cos\)). Each root then maps back to a frequency through the definition of \(\beta\):
with \(A = h\cdot 1\,\mathrm m\) and \(I = h^3/12\). We compute the \(\beta_n L\) roots numerically below using scipy.optimize.brentq rather than hard-coding them.
1. Mesh and computational domain
# Eigenmode geometry (thin beam where EB is most accurate)L_eig =1.0h_eig =0.01bb_eig = [[0.0, 0.0], [L_eig, h_eig]]domain_eig = generate_domain(bb_eig[0], bb_eig[1], nx=100, ny=4)
2. Setup our Continuous Galerkin (Finite) elements
We first assemble K, M, matrices for the free-vibration eigenproblem on the clamped-free beam. Dirichlet rows of M are scaled to a tiny diagonal so the spurious BC modes are pushed to very large eigenvalues.
7. Analysis: Comparison to Euler-Bernoulli frequencies
We solve \(\cos(\beta L)\cosh(\beta L) + 1 = 0\) by bracketing each root and applying Brent’s method. To avoid cosh overflowing for large arguments, we equivalently solve \(\cos(x) + \mathrm{sech}(x) = 0\) — same roots, but bounded.
Note
The following code is only for the interested reader. Feel free to skip it.
def char_eq(x):# cos(x) + 1/cosh(x) = 0 is equivalent to cos(x)*cosh(x) + 1 = 0return np.cos(x) +1.0/np.cosh(x)beta_L = []for n inrange(1, N_MODES +1):# roots are near (n - 1/2)*pi for n>=2, and approx 1.875 for n=1 centre = (n -0.5)*np.pi if n >=2else1.875 a, b = centre -0.6, centre +0.6# Make sure we bracket a sign change; widen if neededwhile char_eq(a)*char_eq(b) >0: a -=0.1; b +=0.1 beta_L.append(brentq(char_eq, a, b, xtol=1e-12))print('beta_n * L (computed):')for n, bL inenumerate(beta_L, start=1):print(f' n={n:2d} beta_n L = {bL:.10f}')# Analytical Euler-Bernoulli frequenciesA = h_eig *1.0# per unit out-of-plane metreI_sec = h_eig**3/12.0omega_eb =lambda bL: bL**2* np.sqrt(E_star * I_sec / (rho * A * L_eig**4))f_FE_list = [freq for (_, _, freq) in eig_freq[:N_MODES]]f_EB_list = [omega_eb(bL)/(2*np.pi) for bL in beta_L]print(f'\n{"mode":>4}{"f_FE [Hz]":>14}{"f_EB [Hz]":>14}{"FE/EB":>10}')for n inrange(N_MODES):print(f'{n+1:>4}{f_FE_list[n]:>14.4f}{f_EB_list[n]:>14.4f}{f_FE_list[n]/f_EB_list[n]:>10.4f}')
beta_n * L (computed):
n= 1 beta_n L = 1.8751040687
n= 2 beta_n L = 4.6940911330
n= 3 beta_n L = 7.8547574382
n= 4 beta_n L = 10.9955407349
n= 5 beta_n L = 14.1371683910
n= 6 beta_n L = 17.2787595321
n= 7 beta_n L = 20.4203522510
n= 8 beta_n L = 23.5619449018
n= 9 beta_n L = 26.7035375555
n=10 beta_n L = 29.8451302091
mode f_FE [Hz] f_EB [Hz] FE/EB
1 8.7624 8.7586 1.0004
2 54.8862 54.8892 0.9999
3 153.5620 153.6913 0.9992
4 300.5754 301.1735 0.9980
5 496.1367 497.8614 0.9965
6 739.7975 743.7188 0.9947
7 1031.0574 1038.7477 0.9926
8 1355.9408 1382.9482 0.9805
9 1369.3274 1776.3201 0.7709
10 1753.9379 2218.8635 0.7905
Verification
The following cell verifies our implementation: the lowest FE eigenfrequencies must match the Euler-Bernoulli closed-form values to within \(\sim 1\)%.
# Test: the lowest 3 FE bending modes must match the EB closed formlibrary.tests.test_hw02_new_eigenmodes(f_FE_list, f_EB_list, n_compare=3)# Predicted frequency of the first longitudinal (axial) mode of a fixed-free bar:# f_long_1 = c_L / (4 L) with c_L = sqrt(E*/rho).c_long = np.sqrt(E_star/rho)f_long_1 = c_long / (4*L_eig)print(f'\nFirst longitudinal (axial) mode prediction: f = c_L/(4L) = {f_long_1:.2f} Hz 'f'(c_L = {c_long:.1f} m/s)')
Passed test_hw02_new_eigenmodes?: True
First longitudinal (axial) mode prediction: f = c_L/(4L) = 1355.48 Hz (c_L = 5421.9 m/s)
The first three FE frequencies should agree with Euler-Bernoulli to better than \(\sim 1\)%. Higher modes deviate more — the Euler-Bernoulli ansatz \(w(x,y,z,t) \approx -y\,\partial_x w(x,t)\) fails when the wavelength becomes comparable to the thickness.
Why does one of the FE modes not “wave”
Looking at the visualisations below, mode 8 does not look like a sine wave — the beam appears to keep its straight shape and only stretch/contract along its length. That is not a numerical artefact and the coefficient is not zero. It is a longitudinal (axial) mode: a pure compression-extension wave along \(x\) that keeps cross-sections planar and parallel to themselves. The 2D slab obviously supports such modes — they are perfectly physical.
What is going on is that we wrote down the Euler-Bernoulli bending equation \(\rho A\,\ddot w + E^*I\,w'''' = 0\) and that equation only describes the transverse deflection \(w(x,t)\). Axial extension/compression in linear elasticity is governed by a separate 1D rod equation \(\rho A\,\ddot u - E^*A\,u'' = 0\), decoupled from the bending equation. The FE eigensolver, on the other hand, sees the full plane-strain operator and returns the union of all elastic modes — bending and axial. The table only compares against the bending spectrum, so axial modes that show up between the bending ones simply don’t have an entry to compare to.
For a clamped-free bar the rod equation gives the longitudinal eigenfrequencies
i.e. the standing-wave frequencies of a quarter-wavelength resonator. The lowest one comes out around \(f_1^{long} \approx c_L/(4L) \approx 1355\) Hz for our steel beam, which slots into the FE spectrum between the seventh and eighth bending modes — and that is precisely what we see at mode 8 in the table. The FE/EB ratio for that row is therefore meaningless: the row is comparing an axial FE mode to the eighth bending frequency of EB, which describes a different physical phenomenon.
This also explains why the EB-bending comparison stays good for modes 1–7 here but breaks down at the row where an axial mode squeezes into the sequence.
Prepare for your presentation
During the presentation, be prepared to answer the following questions/tasks. We will ask 1-2 questions per person.
What was this exercise about?
What does the consistency check in P1 tell us that simply staring at the deformed shape does not? Why is recovering \(E\) and \(\nu\) a stronger test than visual inspection?
Why does the rod test in 2D plane strain give an apparent\(E^* = E/(1-\nu^2)\) rather than \(E\)? What constraint causes this?
The cantilever tip deflection scales as \(L^3\) and the bending stiffness as \(h^3\). Where does each cubic power come from?
Why does the FE/EB ratio in P2 deviate from \(1\) at \(h/L = 0.10\)? In which direction (FE softer or stiffer than EB), and why?
What sets the frequency ratio \(\omega_2/\omega_1\) for the clamped-free beam? Is it material-dependent or purely geometric?