File:Non chaotic double pendulum.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Non_chaotic_double_pendulum.gif(800 × 264 pixels, file size: 7.05 MB, MIME type: image/gif, looped, 1,000 frames, 1 min 40 s)

Note: Due to technical limitations, thumbnails of high resolution GIF images such as this one will not be animated. The limit on Wikimedia Commons is width × height × number of frames ≤ 100 million.

Captions

Captions

A group of double pendula non exhibiting chaotic behaviour, and one that does, all starting with exactly the same energy.

Summary[edit]

Description
English: Does a chaotic system always behave chaotically?

Not really, as many chaotic systems have a subset of possible initial conditions that lead to a quasi-periodic motion. As an example, below are two sets (black and orange) of 20 double pendula each, all with the same initial energy, and each group starting with very similar initial conditions. The first group (black) spread out a little bit with time, but nearby initial conditions keeps evolving into nearby dynamics, which is typical of integrable systems.

On the other hand the pendula in the second group (orange) also starts with similar initial condition, but after a short transient evolve each very differently from each other, which is a mark of a chaotic system.
Date
Source https://twitter.com/j_bertolotti/status/1693998359030452310
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 13.1 code[edit]

H = -2 Cos[a] - Cos[a + b] + (la^2 - 2 (1 + Cos[b]) la lb + (3 + 2 Cos[b]) lb^2)/(3 - Cos[2 b]);
qs = {a, b}; ps = {la, lb};
stateVars = Join[qs, ps];  varsToFuncs = # -> #[t] & /@ stateVars;
Brack[f_, g_] := Sum[D[f, qs[[i]]] D[g, ps[[i]]] - D[f, ps[[i]]] D[g, qs[[i]]], {i, Length@qs}]
EOMs = (#'[t] == (Brack[#, H] /. varsToFuncs)) & /@ stateVars;
laSol = FullSimplify[Solve[En == H /. {a -> 0}, la] // First, Assumptions -> {b \[Element] Reals, lb \[Element] Reals, En \[Element] Reals}];
Discrim[En_, b_, lb_] := (4 + 2 En - lb^2 + 2 Cos[b]) (-3 + Cos[2 b])
InitConds[EE_, B_, Lb_] /; Discrim[EE, B, Lb] <= 0 := {a[0] == 0, la[0] == (Re[la] /. laSol /. {En -> EE, b -> B, lb -> Lb}), b[0] == B, lb[0] == Lb};
InitConds[EE_, B_, Lb_] /; Discrim[EE, B, Lb] > 0 := {a[0] == 0, la[0] == 0, b[0] == B, lb[0] == Lb};
energy = -1.5;
initconditiontest = {{energy, 0., -0.5}, {energy, 0., 0.8}};
npendula = 20;
initial1 = Table[{0, 0, RandomReal[{-0.001, 0.001}]}, {npendula}] + Threaded@initconditiontest[[1]];
sol1 = Table[
   NDSolve[{EOMs, InitConds[energy, initial1[[j, 2]], initial1[[j, 3]] ] }, {a[t], b[t], la[t], lb[t]}, {t, 0, 500}], {j, 1, npendula}];
initial2 = Table[{0, 0, RandomReal[{-0.01, 0.01}]}, {npendula}] + Threaded@initconditiontest[[2]];
sol2 = Table[
   NDSolve[{EOMs, InitConds[energy, initial2[[j, 2]], initial2[[j, 3]] ] }, {a[t], b[t], la[t], lb[t]}, {t, 0, 500}], {j, 1, npendula}];
pos1[t_] := {Sin[a[t]], -Cos[a[t]]};
pos2[t_] := pos1[t] + {Sin[a[t] + b[t]], -Cos[a[t] + b[t]]}
pendulumplot[j_, color_, \[Tau]_, sol_] := (Graphics[{
       Disk[{0, 0}, 0.05], Disk[pos1[t], 0.1], Disk[pos2[t], 0.1], Thick, Line[{{0, 0}, pos1[t], pos2[t]}], color, Disk[pos1[t], 0.075], Disk[pos2[t], 0.075] }, PlotRange -> 2.2 {{-1, 1}, {0.3, -1}}] /. sol[[j]] /. {t -> \[Tau]})[[1]]
frames = Table[
   GraphicsRow[{Show[
      Table[pendulumplot[j, Black, \[Tau], sol1], {j, 1, npendula}]
      ],
     Show[
      Table[pendulumplot[j, Orange, \[Tau], sol2], {j, 1, npendula}]
      ]
     }]
   , {\[Tau], 0.01, 200, 0.2}];
ListAnimate[frames]

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:25, 24 August 2023Thumbnail for version as of 10:25, 24 August 2023800 × 264 (7.05 MB)Berto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.