Duffing Applet

Your browser is ignoring the <APPLET> tag!

Oscilloscope-like display of the resonances of a Duffing-oscillator

The time-dependent position y(t) of a Duffing-Oscillator is a solution of the following differential equation:

d2y/dt2 + δ·dy/dt + α·y + β·y3 = γ·cos(ω·t)

Search the internet for details.
α is the square of the angular resonance-frequency for β = 0. In a mechanical system, α is the spring-constant divided by the mass of the oscillator.
β is the nonlinear spring-constant divided by the mass. β>0 is a hardening spring.
γ is the amplitude of the harmonic forcing (force per mass).
δ is a coefficient of friction (per mass, friction proportional to velocity).
ω is the angular frequency of the forcing.

The angular frequency of forcing ω is continually increased from the lower to the upper bound of the horizontal axis. For each value of ω the motion y(t) is numerically integrated and plotted in the vertical direction.
initials is the number of oscillations with different initial conditions (randomly chosen) that are added for the picture.
steps is the number of steps per cycle of forcing in the numerical integration. A 4th order Runge-Kutta integrator is used.
cycles is the number of periods of the forcing that are added for each picture.
brightness controls the brightness of the display.

If the mouse pointer is in the display and the mouse button clicked, the coordinates of the pointer are displayed and the calculation is restartet at the position of the pointer.

And here is the source-code: Duffing.java

Created with BlueJ 3.0.5 (Java version 1.6.0_26) running on Mac OS X 10.6.8

October 10th, 2011, Martin Lieberherr