1// Built-in configurations: the example YAML files of the cymsim Python package, verbatim.
3export interface Preset { id: string; name: string; yaml: string }
5export const PRESETS: Preset[] = [
6 { id: "crash_mallet", name: "Crash, mallet stroke", yaml: "# Soft mallet, gong-like stroke on an 18 inch medium-thin crash (the prototype's default run).\n# The mallet injects only low frequencies; everything above a few hundred Hz comes from the\n# nonlinear cascade. Units are SI throughout (m, kg, s, Pa). See docs/model.md.\nmaterial:\n E: 110000000000.0\n nu: 0.34\n rho: 8700.0\n sigma0: 0.9\n sigma1: 0.0005\nprofile:\n radius: 0.2286\n bell_height: 0.013\n bell_top_radius: 0.025\n bell_shoulder_radius: 0.08\n bow_height: 0.03\n bow_power: 1.4\n h_rim: 0.001\n h_shoulder: 0.0017\n h_bell: 0.0026\n max_slope: 0.4\nimperfections:\n seed: 1\n n_dents: 400\n dent_depth: 0.00025\n dent_sigma: 0.007\n dent_margin: 0.01\n rim_warp: 0.0006\n rim_warp_modes:\n - 2\n - 3\n - 4\n - 5\n shoulder_ovality: 0.03\n bell_offset: 0.0015\nmesh:\n element_size: 0.006\n smoothing: 1\nhits:\n- time: 0.0\n r: 0.13716\n phi: 0.3\n velocity: 8.0\n exciter:\n kind: mallet\n mass: 0.3\n alpha: 2.5\n compression: 0.012\n radius: 0.012\n gap: 0.0001\nlistener:\n position:\n - 0.4\n - 0.3\n - 0.9\n c_air: 343.0\n rho_air: 1.2\n back_diffraction_gain: 1.0\nnumerics:\n fs: 44100\n duration: 2.0\n cfl_safety: 0.6\n rot_inertia_factor: 0.015625\n inplane_mass_scale: 1.0\n steps_per_block: 20000\n dtype: float32\n nonlinear: true\n n_progress: 20\noutput:\n prefix: crash_mallet\n wav: true\n npz: true\n cascade_plot: true\n" },
7 { id: "crash_stick", name: "Crash, stick shoulder hit", yaml: "# Hard stick shoulder crash near the rim: Hertz contact (alpha = 1.5) along a 3 cm line.\nmaterial:\n E: 110000000000.0\n nu: 0.34\n rho: 8700.0\n sigma0: 0.9\n sigma1: 0.0005\nprofile:\n radius: 0.2286\n bell_height: 0.013\n bell_top_radius: 0.025\n bell_shoulder_radius: 0.08\n bow_height: 0.03\n bow_power: 1.4\n h_rim: 0.001\n h_shoulder: 0.0017\n h_bell: 0.0026\n max_slope: 0.4\nimperfections:\n seed: 1\n n_dents: 400\n dent_depth: 0.00025\n dent_sigma: 0.007\n dent_margin: 0.01\n rim_warp: 0.0006\n rim_warp_modes:\n - 2\n - 3\n - 4\n - 5\n shoulder_ovality: 0.03\n bell_offset: 0.0015\nmesh:\n element_size: 0.006\n smoothing: 1\nhits:\n- time: 0.0\n r: 0.19430999999999998\n phi: 0.3\n velocity: 7.0\n exciter:\n kind: stick\n mass: 0.03\n k: 500000000.0\n alpha: 1.5\n patch_length: 0.03\n patch_points: 7\n patch_angle: 0.6\n gap: 0.0001\nlistener:\n position:\n - 0.4\n - 0.3\n - 0.9\n c_air: 343.0\n rho_air: 1.2\n back_diffraction_gain: 1.0\nnumerics:\n fs: 44100\n duration: 2.0\n cfl_safety: 0.6\n rot_inertia_factor: 0.015625\n inplane_mass_scale: 1.0\n steps_per_block: 20000\n dtype: float32\n nonlinear: true\n n_progress: 20\noutput:\n prefix: crash_stick\n wav: true\n npz: true\n cascade_plot: true\n" },
8 { id: "hit_train", name: "Train of four hits", yaml: "# A train of four hits: a mallet stroke, two stick crashes on the ringing cymbal, and a second\n# mallet stroke. Each hit has its own exciter, released at its time just above the moving surface.\nmaterial:\n E: 110000000000.0\n nu: 0.34\n rho: 8700.0\n sigma0: 0.9\n sigma1: 0.0005\nprofile:\n radius: 0.2286\n bell_height: 0.013\n bell_top_radius: 0.025\n bell_shoulder_radius: 0.08\n bow_height: 0.03\n bow_power: 1.4\n h_rim: 0.001\n h_shoulder: 0.0017\n h_bell: 0.0026\n max_slope: 0.4\nimperfections:\n seed: 1\n n_dents: 400\n dent_depth: 0.00025\n dent_sigma: 0.007\n dent_margin: 0.01\n rim_warp: 0.0006\n rim_warp_modes:\n - 2\n - 3\n - 4\n - 5\n shoulder_ovality: 0.03\n bell_offset: 0.0015\nmesh:\n element_size: 0.006\n smoothing: 1\nhits:\n- time: 0.0\n r: 0.137\n phi: 0.3\n velocity: 8.0\n exciter:\n kind: mallet\n mass: 0.3\n alpha: 2.5\n compression: 0.012\n radius: 0.012\n gap: 0.0001\n- time: 0.8\n r: 0.194\n phi: 2.0\n velocity: 7.0\n exciter:\n kind: stick\n mass: 0.03\n k: 500000000.0\n alpha: 1.5\n patch_length: 0.03\n patch_points: 7\n patch_angle: 0.6\n gap: 0.0001\n- time: 1.4\n r: 0.194\n phi: 2.3\n velocity: 5.0\n exciter:\n kind: stick\n mass: 0.03\n k: 500000000.0\n alpha: 1.5\n patch_length: 0.03\n patch_points: 7\n patch_angle: 0.6\n gap: 0.0001\n- time: 2.0\n r: 0.137\n phi: -1.0\n velocity: 6.0\n exciter:\n kind: mallet\n mass: 0.3\n alpha: 2.5\n compression: 0.012\n radius: 0.012\n gap: 0.0001\nlistener:\n position:\n - 0.4\n - 0.3\n - 0.9\n c_air: 343.0\n rho_air: 1.2\n back_diffraction_gain: 1.0\nnumerics:\n fs: 44100\n duration: 3.0\n cfl_safety: 0.6\n rot_inertia_factor: 0.015625\n inplane_mass_scale: 1.0\n steps_per_block: 20000\n dtype: float32\n nonlinear: true\n n_progress: 20\noutput:\n prefix: train\n wav: true\n npz: true\n cascade_plot: true\n" },
9 { id: "quick_cpu", name: "Quick preview (coarse mesh)", yaml: "# Coarse, short run that finishes in about a minute on a CPU. Element size 20 mm resolves only\n# the low modes; use it to exercise the pipeline, not for listening.\nmaterial:\n E: 110000000000.0\n nu: 0.34\n rho: 8700.0\n sigma0: 0.9\n sigma1: 0.0005\nprofile:\n radius: 0.2286\n bell_height: 0.013\n bell_top_radius: 0.025\n bell_shoulder_radius: 0.08\n bow_height: 0.03\n bow_power: 1.4\n h_rim: 0.001\n h_shoulder: 0.0017\n h_bell: 0.0026\n max_slope: 0.4\nimperfections:\n seed: 1\n n_dents: 100\n dent_depth: 0.00025\n dent_sigma: 0.007\n dent_margin: 0.01\n rim_warp: 0.0006\n rim_warp_modes:\n - 2\n - 3\n - 4\n - 5\n shoulder_ovality: 0.03\n bell_offset: 0.0015\nmesh:\n element_size: 0.02\n smoothing: 1\nhits:\n- time: 0.0\n r: 0.13716\n phi: 0.3\n velocity: 8.0\n exciter:\n kind: mallet\n mass: 0.3\n alpha: 2.5\n compression: 0.012\n radius: 0.012\n gap: 0.0001\nlistener:\n position:\n - 0.4\n - 0.3\n - 0.9\n c_air: 343.0\n rho_air: 1.2\n back_diffraction_gain: 1.0\nnumerics:\n fs: 44100\n duration: 0.3\n cfl_safety: 0.6\n rot_inertia_factor: 0.015625\n inplane_mass_scale: 1.0\n steps_per_block: 2000\n dtype: float32\n nonlinear: true\n n_progress: 20\noutput:\n prefix: quick\n wav: true\n npz: true\n cascade_plot: true\n" },
10];