/ challenges-old / cymbal-solutions
Sign in
challenges-old / cymbal-solutions
README: the chain runs on the GPU
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 30c79977ab6a parent 9011bbb Browse files
1 changed file+2−3
README.mdmodified+2−3View file
@@ -19,11 +19,10 @@ Field exports are about 40 MB each and are stored with git LFS (`.gitattributes`
1919 `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.
2020
2121 ```
22-bash solvers/vonkarman-modal-disk/run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json cpu # 8 mm members
23-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
22+bash solvers/vonkarman-modal-disk/run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json gpu # needs a CUDA GPU and PyTorch; 'cpu' works but takes hours
2423 ```
2524
26-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.
25+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 chain was run on a workstation GPU with `--device cuda`, where a step takes a fraction of a millisecond; the CPU path is the reference implementation, the two 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.
2726
2827 ## Adding a submission
2928
↑↓ move↵openescclose