Learn basic HTML in 30 minutes

Simulation of an oscillating system

[ problem specification] [ parameter values] [ results] [ general HTML info ]

Problem specification:

We concider an oscillating system, such as a pendulum, a moored ship, or a jumping washing machine. The system is described by the following second-order linear differential equation with two initial conditions:

my,tt + by,t + cf(y) = Acos(wt)

y(0) = y0

y,t(0) = 0


The physical interpretation of the terms are as follows: A sketch of the system is given below.

Sketch of the system.
Sketch of the system

Parameter values:

The table lists the input parameter values for this simulation. Default values are used for the parameters that are not set as command-line options.

Parameter input values
Command line input option Parameter value
-m 1
-b 0.7
-c 5
-func y3
-A 5
-w 6.28319
-y0 0.2
-tstop 30
-dt 0.05

Results:

The figure below shows a plot of a (numerical) solution of the differential equation. The time interval for the simulation is [0:30]. The plot compares a restoring force f(y)=y with f(y)=y*y*y.
A plot of the solution
Plot of the displacement of a nonlinear oscillator and its linear counterpart