[GIF] Drumbeat (Vibration mode of a circular drum)

Posted 3 years ago
5081 Views
|
3 Replies
|
12 Total Likes
|
 DrumbeatInspired by a comment made by @J. M. on Square Up, this is an animation showing the (1,2) vibrational mode of a circular drum. I've added a (quite possible completely unphysical) exponential decay term, just because. As you can see on the Wikipedia page, the $(m,n)$ vibrational mode of a circular membrane is given, as a function whose input is the position and whose output is the (vertical) displacement from the rest state, by $u_{mn} (r,\theta,t) = (A \cos c \lambda_{mn} t + B \sin c \lambda_{mn} t) J_m(\lambda_{mn} r) (C \cos m\theta + D \sin m \theta)$,where $\lambda_{mn}$ is the $n$th root of the Bessel function $J_m$, $c$ is a constant giving the speed of wave propogation, and $A$, $B$, $C$, and $D$ are constants.This is of course easy enough to define, especially since Mathematica has a handy BesselJZero function: BesselZeros = N@Table[BesselJZero[m, n], {m, 0, 5}, {n, 1, 5}]; λ[m_, n_] := BesselZeros[[m + 1, n]]; u[m_, n_, r_, θ_, t_, c_, A_, B_, C_, D_] := (A Cos[c λ[m, n] t] + B Sin[c λ[m, n] t]) BesselJ[m, λ[m, n] r] (C Cos[m θ] + D Sin[m θ]); So then I just took an (automatically generated) triangulation of the disk and evaluated the above function u (with various more or less arbitrary choices of parameters) on the vertices. Here's the code: DynamicModule[ {m = 1, n = 2, k = 3, c = 5, cols, mesh, planarverts, drumverts, lines, cl}, cols = RGBColor /@ {"#08D9D6", "#FF2E63", "#252A34"}; mesh = DiscretizeRegion[Disk[], MaxCellMeasure -> .009]; planarverts = MeshCoordinates[mesh]; lines = MeshCells[mesh, 1]; Manipulate[ drumverts = Append[#, 1.5 E^(-k t) u[m, n, Norm[#], ArcTan[#[[1]], #[[2]]], t, c, 1/2, 0, 1/2, 0]] & /@ planarverts; cl = Blend[cols[[;; 2]], Abs[#[[3]]]/.2] & /@ drumverts; Graphics3D[ GraphicsComplex[ drumverts, {Thickness[.004], Append[#, VertexColors -> Automatic] & /@ lines}, VertexColors -> cl ], PlotRange -> 1, Boxed -> False, Axes -> None, ImageSize -> {540, 405}, ViewAngle -> π/10, ViewCenter -> {1/2, 1/2, .46}, Background -> cols[[-1]] ], {t, 0., 2 π/λ[m, n]}] ] 
3 Replies
Sort By:
Posted 3 years ago
 Yes, I definitely started with a polar mesh, but it wasn't quite working for me, so I went for something a little more asymmetrical.