next up previous contents
Next: Demo roess: constants inheritance Up: Running rauto Previous: Demo cusp: restart labels,   Contents

Demo duff: harmonic forcing and starting from numerical data

To create a working copy of the demo duff change to a directory where you would like to do your computations, for example, ${HOME}/rauto. Then type `rdm duff'. This will create the sub-directory duff, which contains the files duff.f, duff.dat, r.duff and demo. Change to the directory duff.

The Duffing equation

$\displaystyle \ddot{x} + \alpha x + \lambda \dot{x} + \varepsilon x^3 = A\cos \omega t $

considered in this example is not autonomous, but periodically forced with period of $ T=2\pi/\omega$. However, the forcing is harmonic with a single frequency, which allows to transform this equation into an autonomous equation by augmenting it with an asymptotically stable harmonic oscillator. This procedure leads to the four-dimensional first order system
$\displaystyle \dot{x}$ $\displaystyle =$ $\displaystyle y,$  
$\displaystyle \dot{y}$ $\displaystyle =$ $\displaystyle A v - \alpha x - \lambda y - \varepsilon x^3,$  
$\displaystyle \dot{u}$ $\displaystyle =$ $\displaystyle u + \omega v - u(u^2+v^2),$  
$\displaystyle \dot{v}$ $\displaystyle =$ $\displaystyle -\omega u + v - v(u^2+v^2),$  

which is implemented in the equations file duff.f. The file duff.dat contains a numerical solution of this system over approximately one period for the parameter values $ A=0.4$, $ \omega=1.0$, $ \lambda=0.04$, $ \alpha=-0.2$ and $ \varepsilon=8/15$.

The master constants file is r.duff, which is set up for a continuation in PAR(2) $ {}=\omega\in[0,3]$. The file demo is an executable shell script for the command interpreter bash serving as a demonstration program, which executes the rauto commands

rfcon duff

rauto duff omf dat -IRS 1
rauto duff omb dat -IRS 1 -DS - -NMX 300

rauto duff po1 omb -IRS `splabs omb BP 1 1` -ISW -1 -NTST 30 -DSMAX 0.05

rauto duff po2 po1 -IRS `splabs po1 PD 1 1` -ISW -1 \
  -NTST 60 -DS 0.01 -DSMAX 0.02 -NMX 1000
rauto duff po3 po2 -IRS `splabs po2 PD 1 1` -ISW -1 \
  -NTST 100 -DS 0.001 -DSMAX 0.005 -NMX 4000

The first command performs the only initial run using the utility program rfcon. It converts the numerical data from file duff.dat into the internal data format used by AUTO. In general, running rfcon requires the three files name.f, name.dat and r.name. The function STPNT in the equations file name.f must initialize the free parameters. The file name.dat contains columns with sufficiently dense data points in $ t$, U(1), ..., U(NDIM). The file r.name provides values for the dimension NDIM and certain discretization constants. The numerical data is always converted into a solution with label 1 of the run `dat'.

The subsequent commands in the script perform in this order

$ \bullet$
continuations forwards and backwards in $ \omega$,
$ \bullet$
branch switching at a branch point (BP),
$ \bullet$
branch switching at period-doubling points (PD),
computing the first two branches of a period-doubling sequence; see Figures 7 (a) and (b). Use the command `plotsol run [lab ...]' to plot all or selected solutions of a run as shown in Figures 7 (c) and (d).

Figure 7: Bifurcation diagram (a) of the Duffing equation and an enlargement (b) around a period-doubling sequence. The period-doubled (c) and quadrupled (d) solution around $ \omega \approx 1.02$.
\includegraphics[width=0.4\linewidth]{duff1.eps}  \includegraphics[width=0.4\linewidth]{duff2.eps}
(a) plotbd 1:3 `lsruns "om*" "po*"`  
plotbd 1:3 "[0.8:1.5]" "[0.4:1.1]" `lsruns "om*" "po*"` (b)  
    
\includegraphics[width=0.4\linewidth]{duff3.eps}  \includegraphics[width=0.4\linewidth]{duff4.eps}
(c) plotsol po2 17  plotsol po3 31 (d)


next up previous contents
Next: Demo roess: constants inheritance Up: Running rauto Previous: Demo cusp: restart labels,   Contents
Frank Schilder 2007-04-12