/ challenges-old / cymbal
Sign in
challenges-old / cymbal
cymbal-flat-disk-v1: flat bronze disk struck with a stick, geometrically nonlinear
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 64f7060c5edc Browse files
5 changed files+274−0
.mochi/workflows/results.ymladded+30−0View file
@@ -0,0 +1,30 @@
1+name: Results
2+on:
3+ push:
4+ workflow_dispatch:
5+concurrency:
6+ group: results
7+ cancel-in-progress: true
8+jobs:
9+ results:
10+ runs-on: ubuntu-latest
11+ steps:
12+ - uses: actions/checkout@v4
13+ - uses: actions/setup-python@v5
14+ with:
15+ python-version: '3.12'
16+ - run: pip install git+https://vault1.magland.org/challenges/challenge-tools
17+ - name: Fetch the registered solution repositories
18+ run: challenge-tools fetch --registry registry/solution-repos.json --clones clones --vault-url https://vault1.magland.org
19+ - name: Build the comparison site
20+ run: >
21+ challenge-tools build --challenges challenges --registry registry/solution-repos.json --clones clones
22+ --out site --vault-url https://vault1.magland.org --challenge-repo-url https://vault1.magland.org/challenges/cymbal
23+ - if: github.ref == 'refs/heads/main'
24+ uses: actions/configure-pages@v4
25+ - if: github.ref == 'refs/heads/main'
26+ uses: actions/upload-pages-artifact@v3
27+ with:
28+ path: site
29+ - if: github.ref == 'refs/heads/main'
30+ uses: actions/deploy-pages@v4
README.mdadded+27−0View file
@@ -0,0 +1,27 @@
1+# Instrument simulation challenges: cymbal (tier 2)
2+
3+This repository defines simulation challenges that approach a cymbal one feature at a time, and publishes the comparison of every registered solution at [challenges/cymbal/site](https://vault1.magland.org/challenges/cymbal/site/). It follows the same arrangement as the [string](https://vault1.magland.org/challenges/string) and [plate](https://vault1.magland.org/challenges/plate) repositories: the model is defined in the continuum, solutions live in separate registered repositories, and the shared [challenge-tools](https://vault1.magland.org/challenges/challenge-tools) package scores them against a reference chosen from among the submissions.
4+
5+## Challenges
6+
7+| ID | Title | Deliverable |
8+| --- | --- | --- |
9+| [cymbal-flat-disk-v1](challenges/cymbal-flat-disk-v1/README.md) | Flat bronze disk struck with a drum stick, geometrically nonlinear (Saint Venant-Kirchhoff): radiated pressure | 6 s mono wav, 48 kHz, float32 |
10+
11+The starting point is the simplest object that can sound like a cymbal: a flat, free disk of bell bronze with the diameter and thickness of a 16 inch crash, uniformly thick, struck near the rim by a short stick-like force pulse and radiating to a listener above it through the Rayleigh integral. The material model is Saint Venant-Kirchhoff, so the strain is exact and the response geometrically nonlinear; the material remains elastic. This is the model of the plate tier's second challenge applied to a disk with a harder, shorter strike, and it produces the pitch glide and broadband cascade that distinguish a cymbal from a struck plate. Thin-plate theories (von Kármán with or without in-plane inertia) are approximations to this model, and their error relative to a converged three-dimensional solution includes the modeling error of plate theory. Until such a solution is submitted, the reference is the best thin-plate solution and the reported errors measure only differences within plate theory; the results page says which it is.
12+
13+## Planned challenges
14+
15+The features of a real cymbal are added one at a time, each as a new challenge on the same material and strike, so that the effect of each on the sound and on the difficulty of the computation can be seen in isolation. In the intended order: a central bell (a spherical dome around the mounting hole, which stiffens the center and raises the low modes), a radial bow (the shallow conical or curved profile of the main body, which couples bending and stretching even at small amplitude), hammering (a pattern of local dents that breaks the axisymmetry and detunes the degenerate mode pairs), and a thickness that varies with radius (thinner at the rim). Curved and dented geometries also make the Cartesian-grid discretizations of the flat disk less natural, and polar or mapped grids are expected to appear among the solutions.
16+
17+Each challenge lives in `challenges/<challenge-id>/` and consists of a `README.md`, which is the authoritative specification, and a `challenge.json` with the parameters, output format, error measures, and the recommended grid for optional field exports in machine-readable form. A challenge is never changed once solutions exist for it; a corrected or modified model gets a new ID.
18+
19+## Solution repositories and the registry
20+
21+The repositories that take part in the comparison are listed in [registry/solution-repos.json](registry/solution-repos.json). To register one, open a pull request adding an entry (repository, branch, path of its `solutions` directory). A solution repository contains `solutions/<challenge-id>/<submission-id>.json` files following the [submission schema](https://vault1.magland.org/challenges/challenge-tools/blob/main/schema.json), with wav files beside them or at URLs, and optionally field exports (about 40 MB each for this challenge, so git LFS or an external URL is advisable). [challenges/cymbal-solutions](https://vault1.magland.org/challenges/cymbal-solutions) is the first one and serves as an example.
22+
23+The comparison workflow clones every registered repository at the head of its branch and runs on any push to this repository or when dispatched by hand (`mochi workflow run .mochi/workflows/results.yml --repo challenges/cymbal`). Nothing in the vault triggers across repositories, so a push to a solution repository is picked up at the next run here.
24+
25+## Scoring
26+
27+Every solution is compared with the reference under the two error measures defined in the challenge README, the relative waveform and spectrogram errors; the waveform error ranks. The reference is chosen automatically from the accuracy orderings that submissions assert about their own solutions, by the rule described in the [string repository README](https://vault1.magland.org/challenges/string/blob/main/README.md#how-solutions-are-scored) and implemented in challenge-tools, with the same limitations. A challenge may override the choice by naming a solution in `reference_solution` in its `challenge.json`; this will be the natural thing to do once a verified three-dimensional solution exists.
challenges/cymbal-flat-disk-v1/README.mdadded+141−0View file
@@ -0,0 +1,141 @@
1+# cymbal-flat-disk-v1: flat bronze disk struck with a drum stick, geometrically nonlinear
2+
3+This is the first challenge of the cymbal tier: a flat, free, uniformly thick disk of bell bronze with the diameter and thickness of a 16 inch crash cymbal, struck once near the rim by a short, stick-like force pulse. The deliverable is a six second mono wav file containing the acoustic pressure at a fixed listener point, computed from the disk's surface acceleration by the Rayleigh integral. The material model is a Saint Venant-Kirchhoff hyperelastic solid, so the strain is measured exactly and the response is geometrically nonlinear; the material itself remains elastic. The strike is strong enough that the transverse displacement is many times the thickness, and the nonlinearity produces what a listener recognizes as a cymbal: a downward pitch glide of the low partials and a cascade of energy from the struck modes into a broadband wash that builds up after the strike and then decays. The disk has no bell, no curvature, no hammering and no variation of thickness; later challenges in this tier add those one at a time. Every quantity below is defined in the continuum, so the true solution is a specific function of time that does not depend on any discretization.
4+
5+The machine-readable version of this specification is [challenge.json](challenge.json).
6+
7+## Model
8+
9+The disk occupies the cylinder
10+
11+$$
12+\Omega = \{ (x, y, z) : x^2 + y^2 < R^2,\ -h/2 < z < h/2 \},
13+$$
14+
15+with the mid-plane at $z = 0$, the center at the origin, and the top face $S^+ = \{ z = h/2 \}$. Let $\mathbf{u}(\mathbf{x}, t) \in \mathbb{R}^3$ be the displacement in meters, $\mathbf{F} = \mathbf{I} + \nabla \mathbf{u}$ the deformation gradient, and
16+
17+$$
18+\mathbf{E} = \tfrac{1}{2} \left( \nabla \mathbf{u} + \nabla \mathbf{u}^{\mathsf{T}} + \nabla \mathbf{u}^{\mathsf{T}} \nabla \mathbf{u} \right)
19+$$
20+
21+the Green-Lagrange strain. The material is homogeneous and isotropic. The second Piola-Kirchhoff stress is linear in $\mathbf{E}$ and in its rate,
22+
23+$$
24+\mathbf{S} = \lambda\, \mathrm{tr}(\mathbf{E} + \eta\, \dot{\mathbf{E}})\, \mathbf{I} + 2 \mu\, (\mathbf{E} + \eta\, \dot{\mathbf{E}}),
25+$$
26+
27+where the Lamé constants follow from Young's modulus $E$ and Poisson's ratio $\nu$ in the usual way, $\lambda = E\nu / ((1+\nu)(1-2\nu))$ and $\mu = E / (2(1+\nu))$. The equation of motion in the reference configuration is
28+
29+$$
30+\rho\, \frac{\partial^2 \mathbf{u}}{\partial t^2} = \nabla \cdot (\mathbf{F} \mathbf{S}) - 2 \sigma_0 \rho\, \frac{\partial \mathbf{u}}{\partial t}, \qquad \mathbf{x} \in \Omega, \quad t > 0,
31+$$
32+
33+where $\nabla \cdot$ acts on the reference coordinates. The constant $\eta$ has units of time; in the linear regime the Kelvin-Voigt term damps a mode of angular frequency $\omega$ at the rate $\eta \omega^2 / 2$, and $\sigma_0$ adds a rate that is the same for every mode. For small displacement gradients the model reduces to linear elastodynamics with the same constants.
34+
35+All faces are traction-free except for the applied strike on the top face. The boundary conditions are the reference-configuration tractions
36+
37+$$
38+\mathbf{F} \mathbf{S}\, \mathbf{N} = \mathbf{0} \text{ on } \partial\Omega \setminus S^+, \qquad
39+\mathbf{F} \mathbf{S}\, \mathbf{N} = -\, p(x, y, t)\, \mathbf{e}_z \text{ on } S^+,
40+$$
41+
42+with $\mathbf{N}$ the outward unit normal of the reference configuration, so the strike is a dead load: a force per unit reference area, always directed along $-z$, whatever the disk's deformation. The disk starts at rest, $\mathbf{u} = \partial \mathbf{u} / \partial t = \mathbf{0}$ at $t = 0$. It is free, so rigid-body translation and rotation are possible and the strike imparts net momentum; this is intended, and the output, which depends on acceleration, is unaffected by uniform drift.
43+
44+### The strike
45+
46+The strike is a raised-cosine bump in space, of radius $R_s$ centered at $(x_s, y_s)$, times a Hann pulse in time, of duration $T_s$:
47+
48+$$
49+p(x, y, t) = \frac{F_{\max}}{c_\phi\, \pi R_s^2}\; \phi\!\left( \frac{r}{R_s} \right) \psi\!\left( \frac{t}{T_s} \right), \qquad r = \sqrt{(x - x_s)^2 + (y - y_s)^2},
50+$$
51+
52+$$
53+\phi(s) = \begin{cases} \tfrac{1}{2}(1 + \cos \pi s), & 0 \le s \le 1, \\ 0, & s > 1, \end{cases} \qquad
54+\psi(\tau) = \begin{cases} \tfrac{1}{2}(1 - \cos 2\pi \tau), & 0 \le \tau \le 1, \\ 0, & \text{otherwise,} \end{cases} \qquad
55+c_\phi = \frac{1}{2} - \frac{2}{\pi^2}.
56+$$
57+
58+The constant $c_\phi$ is $\int_0^1 2 s\, \phi(s)\, ds$, so that the total force $\int_{S^+} p\, dS = F_{\max}\, \psi(t / T_s)$ peaks at $F_{\max}$ at $t = T_s / 2$, and the total impulse is $F_{\max} T_s / 2$. Both factors are continuously differentiable and compactly supported, and the strike footprint lies inside the top face. The footprint radius and the duration are those of a drum stick tip on a cymbal: a contact patch a centimeter across and a contact time of a couple of milliseconds. The pulse is prescribed rather than produced by a contact model, so that the problem has no unknown other than the disk's motion.
59+
60+## Parameters
61+
62+| Symbol | Value | Unit | Meaning |
63+| --- | --- | --- | --- |
64+| $R$ | 0.2032 | m | disk radius (16 in diameter) |
65+| $h$ | 0.001 | m | thickness |
66+| $E$ | 110e9 | Pa | Young's modulus (B20 bell bronze) |
67+| $\nu$ | 0.34 | | Poisson's ratio |
68+| $\rho$ | 8800 | kg/m^3 | density |
69+| $\sigma_0$ | 1.1 | 1/s | frequency-independent loss rate |
70+| $\eta$ | 1.2e-8 | s | Kelvin-Voigt viscosity |
71+| $(x_s, y_s)$ | (0.17272, 0) | m | strike center, at $0.85 R$ from the center |
72+| $R_s$ | 0.005 | m | strike footprint radius |
73+| $T_s$ | 0.002 | s | strike duration |
74+| $F_{\max}$ | 100 | N | peak total force |
75+| $\rho_a$ | 1.204 | kg/m^3 | air density |
76+| $c_a$ | 343 | m/s | speed of sound in air |
77+| $\mathbf{x}_L$ | (0.06, 0.08, $h/2$ + 0.5) | m | listener point |
78+
79+All values are exact decimal numbers, not rounded measurements. The material constants are representative of the tin bronze (about 80 percent copper, 20 percent tin) that most cymbals are made of; the challenge does not claim to match any particular instrument. The listener is 0.5 m above the top face and 0.1 m from the axis, at an azimuth of about 53 degrees from the strike direction. It is deliberately not on the strike's symmetry axis: the exact solution is symmetric about the $x$ axis and never excites the modes that are antisymmetric in $y$, so a discretization that breaks this symmetry, a Cartesian grid whose staircase boundary is not symmetric about the axis for instance, exposes that error at the listener.
80+
81+With these constants the disk's lowest elastic modes in the linear thin-plate limit are the two-nodal-diameter mode at 21.9 Hz, the first axisymmetric mode at 38.0 Hz, and the three-nodal-diameter mode at 50.9 Hz (see the appendix). The constant $\sigma_0$ gives the lowest modes a sixty-decibel decay time of about 6.3 s, and $\eta$ makes a mode at 5 kHz decay in about 1 s, one at 10 kHz in 0.28 s, and one at 20 kHz in 72 ms. The impulse of the strike is $F_{\max} T_s / 2 = 0.1$ N s, with a contact time of two milliseconds, a stick with a soft tip or a firm rather than a violent stroke. Under the linear model this strike would bend the disk by about four thicknesses under the stick, well into the regime where membrane stiffening matters, and the previews used to choose it showed the pitch glide and the slow build-up of the cascade over the first half second without the metallic slam that harder, shorter pulses produce. The pulse itself feeds mainly the modes below about a kilohertz, so the treble content of the sound is produced by the nonlinear cascade rather than by the strike. The disk is free, so the impulse also sets it drifting at about 0.09 m/s; this rigid motion carries no acceleration after the strike and does not enter the output, but it dominates the raw displacement in the field export.
82+
83+## Output signal
84+
85+The output is the acoustic pressure at the listener point given by the Rayleigh integral over the top face, using the normal acceleration of the top face and the retarded time,
86+
87+$$
88+s(t) = \frac{\rho_a}{2\pi} \int_{S^+} \frac{1}{|\mathbf{x}_L - \mathbf{y}|}\; \frac{\partial^2 u_z}{\partial t^2}\!\left( \mathbf{y},\; t - \frac{|\mathbf{x}_L - \mathbf{y}|}{c_a} \right) dS(\mathbf{y}), \qquad \text{in Pa},
89+$$
90+
91+with $\partial^2 u_z / \partial t^2$ taken as zero for negative arguments and evaluated on $S^+$ in the reference configuration (the deformation is small compared with the listener distance, and the integral is defined over the reference surface). This is the field of a planar radiator in an infinite rigid baffle; it is an idealization of the true radiation from a free disk, adopted because it is an explicit formula that needs no solution of the acoustic wave equation. A later challenge will replace it with the coupled acoustic problem.
92+
93+The deliverable is a wav file with the following properties.
94+
95+| Property | Value |
96+| --- | --- |
97+| channels | 1 |
98+| sample rate $f_s$ | 48000 Hz |
99+| number of samples $N$ | 288000 (6.0 s) |
100+| sample format | 32-bit IEEE float (WAVE_FORMAT_IEEE_FLOAT) |
101+| sample $k$, for $k = 0, \dots, N-1$ | $s(k / f_s) / s_\text{ref}$ |
102+| $s_\text{ref}$ | see `output.signal_scale` in challenge.json (Pa) |
103+
104+The first sample is at $t = 0$, the onset of the strike. The signal is zero until the first sound arrives at the listener, about 1.46 ms after onset. Samples are pointwise values of the continuum signal, with no anti-aliasing filter; the Kelvin-Voigt term keeps the content above the Nyquist frequency small except during the first tens of milliseconds. The scale $s_\text{ref}$ is a fixed constant chosen so that the peak sample magnitude is roughly 0.5. Do not normalize the signal; absolute amplitude is compared. The signal has a large crest factor, a loud transient followed by a long, much quieter ring, so it sounds faint when played raw; `playback.gain_db` in challenge.json is a suggested listening gain, which the results sites apply at playback together with a limiter, and it is not part of the deliverable.
105+
106+## Error measures
107+
108+The error measures are the same two as for the string and plate challenges, applied to the 288000 samples: the relative waveform $\ell^2$ error (primary) and the relative spectrogram $\ell^2$ error with a periodic Hann window of length 2048 and hop 512, no padding, over $\lfloor (N - 2048) / 512 \rfloor + 1$ frames. See [string-pluck-v1](https://vault1.magland.org/challenges/string/blob/main/challenges/string-pluck-v1/README.md#error-measures) for the formulas. Strong nonlinearity makes long waveform agreement between different methods hard to achieve, since small differences in the low modes shift the timing of the cascade; the spectrogram error will usually be the more informative of the two, and both are reported.
109+
110+## Reference solution
111+
112+There is no externally supplied ground truth. The reference is chosen automatically from the submitted solutions by the procedure described in the [collection README](../../README.md), unless `reference_solution` in challenge.json names one explicitly. Until a converged three-dimensional solution is submitted, the reference will be the best thin-plate solution, and the errors of other thin-plate solutions relative to it measure only discretization differences within plate theory.
113+
114+## Optional field export
115+
116+A submission may provide the normal displacement of the mid-plane for visualization; this is not scored. The file is HDF5 with datasets `x`, float64, shape (61,), $x_i = -R + 2 R\, i / 60$; `y`, float64, shape (61,), $y_j = -R + 2 R\, j / 60$; `t`, float64, shape (3001,), $t_k = k / 1000$; and `u`, float32, shape (3001, 61, 61), with `u[k, j, i]` $= u_z(x_i, y_j, 0, t_k)$ in meters for grid points inside the disk ($x_i^2 + y_j^2 \le R^2$) and NaN outside. The grid covers the first three seconds, where the visible motion is; the export is about 40 MB and should be stored with git LFS or at an external URL. Root attributes `challenge_id`, `solution_id`, `quantity` and `units` are recommended. Thin-plate methods report their transverse displacement $w$ as $u_z$. The disk is free, so the raw displacement is dominated by rigid drift after the strike, and a viewer will want to remove the best-fit rigid motion from each frame.
117+
118+## Appendix: thin-plate reductions and the linear disk
119+
120+Two thin-plate reductions of this model are in common use for gongs and cymbals. The von Kármán equations keep the membrane strain to second order in the transverse displacement $w$ and either neglect in-plane inertia, in which case the in-plane state is an Airy stress function $\Phi$ with
121+
122+$$
123+\rho h\, \frac{\partial^2 w}{\partial t^2} + 2 \sigma_0 \rho h\, \frac{\partial w}{\partial t} + D\, \nabla^4 \left( w + \eta\, \frac{\partial w}{\partial t} \right) = \mathcal{L}(w, \Phi) + p, \qquad \nabla^4 \Phi = -\frac{E h}{2} \mathcal{L}(w, w), \qquad D = \frac{E h^3}{12 (1 - \nu^2)},
124+$$
125+
126+with $\mathcal{L}(f, g) = f_{xx} g_{yy} + f_{yy} g_{xx} - 2 f_{xy} g_{xy}$, or retain it, in which case the in-plane displacements are unknowns with their own wave equations coupled to $w$ through the membrane strain. Both are approximations of the three-dimensional model above, and the form with in-plane inertia is the closer one. The free edge requires vanishing bending moment and effective (Kirchhoff) shear force for $w$, and vanishing in-plane tractions, which for the Airy function on a simply connected domain means $\Phi = \partial \Phi / \partial n = 0$ on the rim. Here $D \approx 10.37$ N m and $\rho h = 8.8$ kg/m^2. Note that the strike pressure enters with a positive sign here because $w$ is measured in the $-z$ direction in the usual plate convention; a submission must report $u_z = -w$ in that case, or use $w$ measured in $+z$ with $-p$ on the right-hand side.
127+
128+For checking a discretization, the linear Kirchhoff-Love free disk has closed-form modes $[A J_n(kr) + B I_n(kr)] \cos n\theta$ with frequencies $f = \lambda_{ns}^2 \sqrt{D / \rho h} / (2 \pi R^2)$, where $\lambda_{ns}$ is a root of the free-edge determinant (Leissa, Vibration of Plates, chapter 2). With $\nu = 0.34$ the lowest values are as follows ($n$ nodal diameters, $s$ nodal circles).
129+
130+| $(n, s)$ | $\lambda^2$ | $f$ (Hz) |
131+| --- | --- | --- |
132+| (2, 0) | 5.229 | 21.87 |
133+| (0, 0) | 9.091 | 38.03 |
134+| (3, 0) | 12.18 | 50.94 |
135+| (1, 0) | 20.53 | 85.86 |
136+| (4, 0) | 21.42 | 89.61 |
137+| (5, 0) | 32.91 | 137.7 |
138+| (2, 1) | 35.24 | 147.4 |
139+| (0, 1) | 38.53 | 161.2 |
140+
141+Modes with $n \ge 1$ come in degenerate pairs ($\cos n\theta$ and $\sin n\theta$); the strike on the $x$ axis excites only the cosine member. A discretization on a Cartesian grid splits some of these pairs; the size of the split is a convenient measure of the geometric error.
challenges/cymbal-flat-disk-v1/challenge.jsonadded+66−0View file
@@ -0,0 +1,66 @@
1+{
2+ "challenge_id": "cymbal-flat-disk-v1",
3+ "title": "Flat bronze disk struck with a drum stick, geometrically nonlinear: radiated pressure",
4+ "version": 1,
5+ "output": {
6+ "type": "wav",
7+ "sample_rate_hz": 48000,
8+ "num_samples": 288000,
9+ "channels": 1,
10+ "sample_format": "float32",
11+ "signal": "acoustic pressure at the listener point from the Rayleigh integral over the top face",
12+ "signal_unit": "Pa",
13+ "signal_scale": 10.0
14+ },
15+ "playback": {
16+ "gain_db": 30,
17+ "note": "Suggested playback gain for listening; presentation only, not part of the deliverable."
18+ },
19+ "parameters": {
20+ "disk_radius": 0.2032,
21+ "h": 0.001,
22+ "E": 110000000000.0,
23+ "nu": 0.34,
24+ "rho": 8800.0,
25+ "sigma0": 1.1,
26+ "eta": 1.2e-08,
27+ "strike_x": 0.17272,
28+ "strike_y": 0.0,
29+ "strike_radius": 0.005,
30+ "strike_duration": 0.002,
31+ "strike_peak_force": 100.0,
32+ "rho_air": 1.204,
33+ "c_air": 343.0,
34+ "listener_x": 0.06,
35+ "listener_y": 0.08,
36+ "listener_height": 0.5
37+ },
38+ "metrics": {
39+ "primary": "waveform_l2",
40+ "waveform_l2": {},
41+ "spectrogram_l2": {
42+ "window": "hann_periodic",
43+ "n_fft": 2048,
44+ "hop": 512
45+ }
46+ },
47+ "fields": {
48+ "format": "hdf5",
49+ "quantity": "normal displacement of the mid-plane, u_z(x, y, 0, t); NaN outside the disk",
50+ "units": "m",
51+ "axes": [
52+ "t",
53+ "y",
54+ "x"
55+ ],
56+ "shape": [
57+ 3001,
58+ 61,
59+ 61
60+ ],
61+ "frame_rate_hz": 1000,
62+ "dtype": "float32"
63+ },
64+ "reference_solution": null,
65+ "model": "saint-venant-kirchhoff"
66+}
registry/solution-repos.jsonadded+10−0View file
@@ -0,0 +1,10 @@
1+{
2+ "repos": [
3+ {
4+ "repo": "challenges/cymbal-solutions",
5+ "branch": "main",
6+ "path": "solutions",
7+ "description": "Example submissions by the challenge authors: von Karman plate on a Cartesian grid masked to the disk, modal method."
8+ }
9+ ]
10+}
↑↓ move↵openescclose