Week 06 — Structural Dynamics (Modes, Newmark, Rayleigh Damping) · Linear Buckling (SLEPc)
Process Systems Laboratory
Department of Chemical and Biomolecular Engineering, SeoulTech
| Part | Topic | Time |
|---|---|---|
| Quiz on Week 5 (closed-AI) | 10 min | |
| A | Dynamics — M\ddot{\mathbf u}+C\dot{\mathbf u}+K\mathbf u=\mathbf f, modes, the Newmark family, stability and period error, Rayleigh damping | 50 min |
| B | Eigenproblems with SLEPc — natural frequencies, linear buckling, the geometric stiffness, shift-invert | 35 min |
| C | Verification — an exact semi-discrete solution, energy, damping ratio, Euler loads, the original sources re-run | 55 min |
| D | LLM pitfalls · assignment | 20 min |
Lab notebook: W06_lab.ipynb · Assignment: W06_HW6.ipynb (due before Week 7)
Today: time enters through inertia. The semi-discrete system is a set of oscillators; the time scheme must be stable for all of them and accurate for the ones we care about. Then the same matrices in an eigenproblem: frequencies and buckling loads with SLEPc.
M\ddot{\mathbf u}+C\dot{\mathbf u}+K\mathbf u=\mathbf f(t),\qquad M=\int_\Omega\rho\,\mathbf N^\top\mathbf N,\quad K=\int_\Omega\mathbf B^\top\mathbb C\,\mathbf B
\mathbf u_{n+1}=\mathbf u_n+\Delta t\,\dot{\mathbf u}_n+\Delta t^2\big[(\tfrac12-\beta)\ddot{\mathbf u}_n+\beta\ddot{\mathbf u}_{n+1}\big],\qquad \dot{\mathbf u}_{n+1}=\dot{\mathbf u}_n+\Delta t\big[(1-\gamma)\ddot{\mathbf u}_n+\gamma\ddot{\mathbf u}_{n+1}\big]
Predictor–corrector form: (M+\gamma\Delta t\,C+\beta\Delta t^2K)\,\ddot{\mathbf u}_{n+1}=\mathbf f_{n+1}-C\tilde{\dot{\mathbf u}}-K\tilde{\mathbf u} — one matrix, factorised once.
| (\beta,\gamma) | name | stability | accuracy |
|---|---|---|---|
| (\tfrac14,\tfrac12) | average acceleration (trapezoidal) | unconditional | 2nd order, no amplitude error, energy conserved |
| (\tfrac16,\tfrac12) | linear acceleration | \omega\Delta t\le\sqrt{12}=3.46 | 2nd order |
| (0,\tfrac12) | central difference | \omega\Delta t\le2 | 2nd order, explicit with a lumped M |
| \gamma>\tfrac12, \beta=\tfrac14(\gamma+\tfrac12)^2 | numerically damped | unconditional | 1st order |
The initial acceleration follows from the equation: M\ddot{\mathbf u}_0=\mathbf f_0-C\dot{\mathbf u}_0-K\mathbf u_0 (for a step load, \ddot{\mathbf u}_0=M^{-1}\mathbf f\ne0).
The amplification matrix of one step (\Omega=\omega\Delta t). Central difference: \rho=1.000 at \Omega=1.99, 1.221 at 2.01. Average acceleration: \rho=1 for all \Omega (no damping, also none of the spurious high modes); period error \approx\Omega^2/12 (measured 1.00524 at T/\Delta t=25, formula 1.00526).
C=\alpha_MM+\alpha_KK is diagonal in the modes: mode i gets
\zeta_i=\frac{\alpha_M}{2\omega_i}+\frac{\alpha_K\omega_i}{2}\qquad\Rightarrow\qquad \zeta_1=\zeta\ \text{ for }\ \alpha_M=\zeta\omega_1,\ \alpha_K=\zeta/\omega_1
K = assemble_matrix(k_form, bcs=[bc], diag=1.0); K.assemble() # BC rows: identity
M = assemble_matrix(m_form, bcs=[bc], diag=0.0); M.assemble() # BC rows: zero -> the BC "modes" go to infinity
eps = SLEPc.EPS().create(comm); eps.setOperators(K, M); eps.setProblemType(SLEPc.EPS.ProblemType.GHEP)
eps.setDimensions(6); eps.setTarget(0.0); eps.setWhichEigenpairs(SLEPc.EPS.Which.TARGET_MAGNITUDE)
st = eps.getST(); st.setType("sinvert"); st.getKSP().setType("preonly"); st.getKSP().getPC().setType("lu")
eps.solve(); lam = eps.getEigenpair(i, x) # omega = sqrt(lam)diag=0.0 on M: a constrained DOF has K_{ii}=1, M_{ii}=0 → \lambda=\infty, never near the target.20\times4 P2 cantilever, L/H=10, plane stress, E=210 GPa, \rho=7800 kg/m³:
| # | \omega [rad/s] | axial share | Euler–Bernoulli | |
|---|---|---|---|---|
| 1 | 523.59 | 0.005 | 526.65 | bending 1 (−0.58 %) |
| 2 | 3141.78 | 0.03 | 3300.46 | bending 2 (−4.8 %) |
| 3 | 8161.80 | 1.00 | — | axial (exact \frac{\pi}{2L}\sqrt{E/\rho}=8150.46) |
| 4 | 8278.64 | 0.06 | 9241.39 | bending 3 (−10.4 %) |
Two steps: a pre-buckling solve under a reference load \mathbf f_{\rm ref} → stress \boldsymbol\sigma_0; then the load factor at which the stiffness becomes singular:
(K+\lambda K_G)\boldsymbol\phi=0,\qquad K_G(\mathbf u,\mathbf v)=\int_\Omega\boldsymbol\sigma_0:(\nabla\mathbf u\,\nabla\mathbf v^\top)\,dV=\int_\Omega\sigma^0_{ij}\,u_{k,i}\,v_{k,j}\,dV
diag=0.0 on the BC rows: no spurious eigenvalues, no “diag = 1e-12” trick.Clamped–free, b\times h\times L=0.05\times0.025\times1 m, hexahedra, compressive traction on the top. Euler: P_n=\frac{(2n-1)^2\pi^2EI}{4L^2}; with P_{\rm ref}=P_1 (weak axis): \lambda = 1, 4, 9, 25, 36, 49 (deflection y, x, y, y, x, y).
| mesh | DOFs | \lambda_1 … \lambda_6 | time |
|---|---|---|---|
| P2 4\times4\times40 | 19683 | 1.0030, 4.0061, 9.0160, 24.985, 35.849, 48.797 | 2.0 s |
| P2 6\times6\times60 | 61347 | 1.0026, 4.0045, 9.0118, 24.970, 35.833, 48.760 | 10.9 s |
| P1 4\times4\times30 | 2325 | 1.7066, 4.7380, 15.377, 42.53, 42.81, 84.18 | 0.1 s |
Modes 1–3 lie 0.1–0.3 % above Euler (discretisation, falling with refinement); modes 4–6 up to 0.5 % below (and further below on the finer mesh): shorter waves feel shear deformation, P_E/(\kappa GA)=1.4\,\% for the x-2 mode (Engesser’s beam estimate \lambda=35.49).
sdof.py (NumPy) |
dyn.py (DOLFINx, SLEPc) |
buckle.py (DOLFINx, SLEPc) |
|---|---|---|
amplification(Omega, beta, gamma, zeta) |
Cantilever(L, H, nx, ny, E, nu, rho, P, plane) |
Column(b, h, L, nx, ny, nz, E, nu, deg, kg) |
spectral_radius, period_ratio |
.static(), .modes(n) → (\omega,\boldsymbol\phi, axial share) |
.solve(nev) → (\lambda, axis, mode) |
integrate(w, dt, n, ...), step_exact |
.newmark(dt, n, beta, gamma, aM, aK, record) |
.euler(n, axis), .Pref, .u0 |
.dense_modal() (serial): the exact solution |
newmark works on PETSc vectors: predictor and corrector are axpys, the matrix M+\gamma\Delta tC+\beta\Delta t^2K is factorised once.
| T_1/\Delta t | 25 | 50 | 100 | 200 |
|---|---|---|---|---|
| error, mode-1 coordinate | 5.8\times10^{-2} | 1.4\times10^{-2} | 3.6\times10^{-3} | 9.1\times10^{-4} |
| error, tip (all 720 modes) | 0.10 | 0.062 | 0.024 | 0.012 |
| \omega_{\max}\Delta t | 955 | 477 | 239 | 119 |
Dynamics (cantilever, step load):
Buckling (the same column):
| Pitfall | Measured symptom (this week) |
|---|---|
| Static/beam reference with another 2D reduction than the model (plane strain vs E) | “DAF 1.815” instead of 1.99 |
| Initial acceleration set to 0 for a load applied at t=0 | the load arrives one step late; O(\Delta t) phase error |
| Rayleigh coefficients 2\zeta\omega_1, 2\zeta/\omega_1 | twice the intended damping |
| Modes numbered by index (“mode 3 = third bending mode”) | mode 3 is axial (99.97 % u_x^2) |
| Explicit scheme with \Delta t from the lowest frequency | central difference needs \omega_{\max}\Delta t\le2: here \Delta t\le1.0\,\mus, not T_1/100=120\,\mus |
A.convert("dense") to inspect a matrix |
in place: the PETSc matrix is now dense, MUMPS fails afterwards — use A.convert("dense", B) |
f(obj.static().x.petsc_vec) |
the temporary Function is freed before use: segmentation fault — keep the Function in a variable |
| K_G with only the axial component, or BC rows “fixed” by tiny diagonals | no buckling (\lambda=7744) / spurious eigenvalues; use \sigma^0_{ij}u_{k,i}v_{k,j} and B=K |
| Q | Topic | Points |
|---|---|---|
| 1 | Newmark stability and period error, Rayleigh damping, the buckling eigenproblem (theory) | 20 |
| 2 | Dynamics: the explicit stability limit, a numerically damped scheme, slenderness and Euler–Bernoulli | 30 |
| 3 | Buckling: element order and mesh, slenderness and shear, which K_G | 30 |
| 4 | Debugging an LLM-generated Newmark script | 20 |
Week 7 starts with a 10-minute quiz on today’s material (closed-AI).
| Concept | Key point | DOLFINx 0.11 / SLEPc |
|---|---|---|
| Semi-discrete dynamics | modes decouple; step load: each mode peaks at 2× static | assemble_matrix(m, bcs, diag=0.0) |
| Newmark | (\tfrac14,\tfrac12): unconditional, energy-conserving, period error \Omega^2/12 | one factorisation of M+\gamma\Delta tC+\beta\Delta t^2K |
| Explicit | central difference: \omega_{\max}\Delta t\le2 | \omega_{\max} from the eigen solver |
| Rayleigh | \zeta_i=\alpha_M/2\omega_i+\alpha_K\omega_i/2 | C=\alpha_MM+\alpha_KK |
| Frequencies | shift-invert at 0; classify by shape | EPS, GHEP, ST sinvert |
| Buckling | \sigma^0_{ij}u_{k,i}v_{k,j}; (-K_G)\phi=\theta K\phi | GHEP with B=K |
Next week: beams — trusses, 3D Timoshenko beams, finite rotations.
