/ proof-of-concept / steelsim31
Sign in
proof-of-concept / steelsim31
steelsim31 / README.md
5.7 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 push excitation the sheet is pushed at the bottom-right corner over the ramp time, held with heavy artificial damping until it settles, and released by ramping the finger force to zero over the release time; the recording of audio and movie frames starts at the release. With the drumstick excitation a free mass strikes the sheet at a configurable point and speed through a Hertz contact, and the recording starts at the impact. 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.3 microseconds at 8 mm, so 4 s of sound take about 3 million steps. On an Intel Iris Xe integrated GPU this runs at about 33k steps per second, or roughly 1.5 minutes for 4 s of sound; a discrete GPU is considerably faster. Halving the spacing to 4 mm costs about eight times as much (about 5 minutes for 4 s on the same GPU) and moves the 3 percent point to about 4 kHz.

Tests#

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

Layout#

↑↓ move↵openescclose