/ proof-of-concept / steelsim31
Sign in
proof-of-concept / steelsim31
steelsim31 / README.md
6.9 KBPreviewCodeBlameHistoryRaw

steelsim31#

A browser simulation of the sound of a thin stainless steel sheet, rectangular or elliptical, that hangs from a thread and is either pushed at a corner and released or struck with a drumstick. The sheet rings like a gong, so the simulator solves the geometrically nonlinear (von Karman) plate equations with in-plane inertia retained, stepped explicitly on the GPU through WebGPU. The model and the numerical method are described in THEORY.md.

This is a clean rebuild of steelsim21, reduced to the parts that matter for the sound: the plate model with a stress-free bow, the two excitations, the two-parameter loss model plus an in-plane loss, the Rayleigh listener, and the tests. The sound-matching additions of steelsim21 (the k^4 loss term, the dipole heuristic, the matching scripts) and its command-line renderer and gallery were left out.

The app is deployed by the deploy workflow on every push to main: https://steelsim31--proof-of-concept.vault1-sites.magland.org/

Running#

Requires Node 20 or later and a browser with WebGPU (Chrome or Edge 113+; Firefox and Safari with WebGPU enabled).

npm install
npm run dev        # development server
npm run build      # static site in dist/
npm test           # all tests (see below)

Using the simulator#

Press Start. With the drumstick excitation (the default) a free mass strikes the sheet at a configurable point and speed through a Hertz contact, and the recording of audio and movie frames starts at the impact. The Hits selector turns the single hit into a series: a fixed number of hits at a fixed interval, all at the same speed or rising or falling between the softest and the loudest speed; the Excitation panel reports the schedule and how much ring the recorded duration leaves after the last hit. With the push excitation the sheet is pushed at the bottom-right corner over the ramp time, held with heavy artificial damping until it settles (its kinetic energy drops below the threshold or stops falling), and released by ramping the finger force to zero over the release time; the recording starts at the release. The view shows the transverse displacement as a color map (2D) or a lit height field (3D; drag to orbit, wheel to zoom), the spectrogram shows the listener signal, and the audio can be played or downloaded as a 16-bit WAV at any time.

The default grid spacing of 8 mm (39 by 58 nodes) keeps the simulation interactive but lowers the bending partials by 3 percent near 1 kHz and by 10 percent near 3.6 kHz through grid dispersion; the Sheet panel reports these two frequencies for the chosen spacing. The stable time step is set by the in-plane wave speed, about 1.4 microseconds at 8 mm, so 4 s of sound take about 2.9 million steps. On an Intel Iris Xe integrated GPU this runs at about 57k steps per second, or roughly 50 s for 4 s of sound plus a few seconds for the push and hold; a discrete GPU is considerably faster. On grids of this size the cost of a step is the latency of one workgroup rather than the arithmetic, so a finer grid costs less than the node count suggests: halving the spacing to 4 mm costs about three times as much (about 2.5 minutes for 4 s on the same GPU) and moves the 3 percent point to about 4 kHz. The Numerics panel also offers an in-plane mass factor that lengthens the time step by its square root at the expense of lowering the in-plane modes of the sheet; see THEORY.md, Section 5.

Tests#

npm test runs two groups of tests with Node's built-in runner.

Layout#

↑↓ move↵openescclose