// Presets for the driven Duffing slide, each showing a different phenomenon, // grouped for the dropdown. Values are in the sliders' physical units: x0 // (fraction of rest length), freq = f0 in Hz (negative for k < 0), alpha in // s^-2, delta in s^-1, F in s^-2, drive = Omega / 2 pi in Hz. // // They were chosen from parameter sweeps with the app's integrator, keeping // only behavior that does not depend on details: each gives the same kind of // motion for several step sizes, including the audio's (one sample), so the // animation and the sound agree. The chaotic ones are chaotic (positive // Lyapunov exponent) from every starting point x0 in 0..0.5. Where a preset's // behavior depends on x0 (two steady states, the subharmonic), its own x0 was // checked at each step size. The ranges of x quoted are after the transient. // Finally each was run through the app's own code paths (the audio worklet // and the animation's stepping), which agree. A double-well pair (in one // well / across both) was left out: its two motions coexist only next to // chaotic regions, and the sound and animation landed on different ones. export const DRIVEN_PRESETS = [ { name: 'Default', params: { x0: 0, freq: 220, alpha: 3e7, delta: 0, F: 5e4, drive: 220 }, }, { // driven 10 Hz above f0 from rest, undamped: the free and driven motions // (220 and 230 Hz, equally strong) beat at 10 Hz, x within +/-0.11 group: 'Linear spring', name: 'Beats', params: { x0: 0, freq: 220, alpha: 0, delta: 0, F: 1e4, drive: 230 }, }, { // driven at f0: the swing builds up to F / (delta Omega) = 0.36 group: 'Linear spring', name: 'Resonance', params: { x0: 0, freq: 220, alpha: 0, delta: 20, F: 1e4, drive: 220 }, }, { // the hardening spring bends the resonance to the right, so at 450 Hz two // steady swings coexist: +/-0.03 from x0 up to 0.3, +/-0.55 from x0 of 0.4 // or more. delta = 20 settles them in about 0.1 s (10 s animated). group: 'Hardening spring', name: 'Two steady states: small', params: { x0: 0, freq: 220, alpha: 3e7, delta: 20, F: 20e4, drive: 450 }, }, { group: 'Hardening spring', name: 'Two steady states: large', params: { x0: 0.4, freq: 220, alpha: 3e7, delta: 20, F: 20e4, drive: 450 }, }, { // from x0 = 0.3 (or 0.35) the block swings at a third of the drive: // 333 Hz, +/-0.33, with the 1000 Hz drive 46 dB weaker; from x0 below // 0.25 it only quivers at the drive frequency group: 'Hardening spring', name: 'Subharmonic (⅓ of the drive)', params: { x0: 0.3, freq: 220, alpha: 3e7, delta: 5, F: 30e4, drive: 1000 }, }, { // driven below f0, where the softening resonance bends to: the swing grows // over the barrier (at 0.31) from every x0 in 0..0.5, in about 0.02 s // (from some negative x0, which this slide cannot set, it stays bounded) group: 'Softening spring', name: 'Escape from the well', params: { x0: 0, freq: 220, alpha: -2e7, delta: 10, F: 4e4, drive: 190 }, }, { // k < 0 with wells at +/-0.31 (alpha = 2e7). Driven near the resonance // within a well (about 280 Hz), the block swings in the right-hand well, // x from 0.16 to 0.41 (0.25 peak to peak), never crossing group: 'Double well (k < 0)', name: 'Swinging in one well', params: { x0: 0.2, freq: -220, alpha: 2e7, delta: 10, F: 3e4, drive: 280 }, }, { // hopping irregularly between the wells (x < 0 about half the time, a // broadband spectrum); chaotic from every x0 in 0..0.5, Lyapunov exponent // about 0.6 per drive period group: 'Double well (k < 0)', name: 'Chaos: hopping between wells', params: { x0: 0.3, freq: -220, alpha: 2e7, delta: 10, F: 12.5e4, drive: 295 }, }, { // no linear stiffness (Ueda's oscillator, x'' + k x' + x^3 = B cos t, here // driven at 60 Hz). Raising F: period 1 (F = 11e4; a lopsided swing, // -0.32 to 0.50), period 2 (13.5e4; a 150 Hz line, an odd multiple of // 30 Hz), chaos (20e4; x within +/-0.64, Lyapunov exponent about 0.7), // each from every x0 in 0..0.5 group: 'No linear stiffness (f₀ = 0)', name: 'Period 1', params: { x0: 0, freq: 0, alpha: 0.4e7, delta: 19, F: 11e4, drive: 60 }, }, { group: 'No linear stiffness (f₀ = 0)', name: 'Period doubling', params: { x0: 0, freq: 0, alpha: 0.4e7, delta: 19, F: 13.5e4, drive: 60 }, }, { group: 'No linear stiffness (f₀ = 0)', name: 'Chaos in a single well', params: { x0: 0, freq: 0, alpha: 0.4e7, delta: 19, F: 20e4, drive: 60 }, }, ];