| .mochi | |
| solvers | |
| web | |
| .gitattributes | |
| README.md |
Solutions to the cymbal challenges#
This repository holds solutions to the challenges defined in challenges/cymbal. It is one of possibly several solution repositories registered with that challenge repository, which clones each of them, compares every solution against a common reference, and publishes the comparison at challenges/cymbal/site. This repository's own site, at challenges/cymbal-solutions/site, lists its submissions with audio players and animates the exported displacement fields as a 3D surface.
Layout#
solutions/<challenge-id>/<submission-id>.json one submission: metadata and one or more solutions
solutions/<challenge-id>/<submission-id>/*.wav the scored output files, referenced from the JSON
solutions/<challenge-id>/<submission-id>/*.h5 optional displacement fields for visualization (git LFS)
solvers/ source code of the submissions
web/ this repository's site (built by web/build.py)
Field exports are about 40 MB each and are stored with git LFS (.gitattributes routes *.h5 there). Cloning without git-lfs leaves pointer files in their place; the validator tolerates that and the site marks such fields as unavailable.
The example submission#
vonkarman-modal solves the von Kármán thin-plate reduction of the challenge model (Airy stress function, in-plane inertia neglected, damping on bending only) by a modal method on a Cartesian grid. The disk is approximated by the square cells of a uniform grid whose centers lie inside it, a staircase boundary, with grid spacings of 8 mm and 4 mm. The linear free-plate modes of that domain and the clamped Airy modes come from Bogner-Fox-Schmit C1 finite elements on the cells and a sparse shift-invert eigensolver; the cubic coupling tensor is integrated on the same cells; the time stepping is a two-step scheme exact in the linear part; and the retarded Rayleigh integral is evaluated with cubic fractional delays. The chain is ordered by grid spacing, number of modes, and time step. It is a thin-plate approximation on an approximate domain, so its converged limit differs from the three-dimensional model that defines the challenge.
bash solvers/vonkarman-modal-disk/run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json cpu # 8 mm members
bash solvers/vonkarman-modal-disk/run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json gpu # 4 mm members, needs a CUDA GPU and PyTorch
The chain is g8-w100-a100-m1, g8-w200-a200-m1, g4-w200-a200-m2, g4-w300-a300-m2, g4-w450-a450-m2, g4-w600-a600-m4 (grid spacing in mm, transverse modes, Airy modes, time steps per output sample). Because the strike is centered on the x axis the solution is even in y, and the modal bases are restricted to that symmetric subspace, which is exact and halves the number of modes needed for a given frequency reach: 200 symmetric modes reach about 6 kHz, 300 about 9 kHz, 450 about 13.5 kHz and 600 about 18 kHz. The cost of a time step is the memory bandwidth of the cubic coupling tensor (8 bytes times the cube of the mode count, 1.7 GB at 600 modes), so the 8 mm members were run on a laptop CPU and the 4 mm members on a workstation GPU with --device cuda, where a step takes a few milliseconds at most; the two code paths agree to round-off, and the hardware is recorded per solution. The 8 mm grid has 2024 cells and 8500 degrees of freedom, the 4 mm grid 8112 cells and 33268. On the 8 mm grid the lowest elastic frequencies are 21.76 and 21.88 Hz for the two-nodal-diameter pair (21.87 Hz analytically), 38.01 Hz for the first axisymmetric mode (38.03) and 87.6 and 90.2 Hz for the four-nodal-diameter pair (89.61); on the 4 mm grid the last pair is 89.03 and 89.19 Hz. The staircase splits degenerate pairs by about a percent at 8 mm and a few tenths of a percent at 4 mm. The linear limit of the nonlinear solver agrees with the closed-form linear modal solution on the same mesh to 5e-4 at one step per sample and 1.3e-4 at two. A caution: the free disk's low modes radiate to the listener as a near-cancelling sum, and the staircase edge breaks the cancellation. In the linear closed-form solution the ring level after the strike falls from 0.040 Pa rms at 8 mm to 0.016 at 6 mm, 0.012 at 4 mm and 0.0096 at 3 mm, while the mode frequencies agree to within a percent, so the radiated pressure converges only at first order in the grid spacing and the 8 mm members ring several times too loud. This is the main reason the errors between the 8 mm and 4 mm members are large, and it is why a boundary-conforming (polar or mapped) grid is the natural next solver for this challenge.
Adding a submission#
Follow the same steps as in challenges/string-solutions: produce the output exactly as the specification says, write solutions/<challenge-id>/<submission-id>.json following the schema, record known accuracy orderings in more_accurate_than, and open a pull request.
Validating locally#
pip install git+https://vault1.magland.org/challenges/challenge-tools
challenge-tools validate --challenges <path-to-cymbal-repo>/challenges --solutions solutions
python web/build.py --out site