File:Double pendulum predicting dynamics.gif

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

Double_pendulum_predicting_dynamics.gif(360 × 360 pixels, file size: 1.84 MB, MIME type: image/gif, looped, 334 frames, 33 s)

Captions

Captions

Sometimes small perturbations will not change much in the evolution of a chaotic double pendulum, sometimes small perturbation make even short-term predictions impossible.

Summary[edit]

Description
English: In a chaotic system, like a double pendulum, small changes in the initial conditions become large changes in the long-term evolution of the system, but on the short/medium term, how well we can predict the dynamics is not constant. Sometimes small perturbations will not change much, sometimes small perturbation make even short-term predictions impossible. At each frame the position of the second mass is perturbed slightly, and the grey lines show the predicted dynamics for all the perturbed conditions.
Date
Source https://twitter.com/j_bertolotti/status/1411987574109913092
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 12.0 code[edit]

p1[t_] := {l Sin[\[Theta][t]], -l Cos[\[Theta][t]]};
p2[t_] := p1[t] + {l Sin[\[Phi][t]], -l Cos[\[Phi][t]]};
T[t_] := FullSimplify[1/2 m Norm[D[p1[t], t]]^2 + 1/2 m Norm[D[p2[t], t]]^2, Assumptions -> {m > 0, l > 0, \[Theta][t] > 0, \[Theta]'[t] > 0, \[Phi]'[t] > 0, \[Phi][t] > 0}];
V[t_] := FullSimplify[m g p1[t][[2]] + m g p2[t][[2]], Assumptions -> {m > 0 , l > 0}];
L[t_] := T[t] - V[t];
e1[t_] := FullSimplify[D[D[L[t], \[Theta]'[t]], t] - D[L[t], \[Theta][t]]];
e2[t_] := FullSimplify[D[D[L[t], \[Phi]'[t]], t] - D[L[t], \[Phi][t]]];
(**)
tmax = 1000; m1 = 1; m2 = 1; g = 1; l = 1;
s1 = NDSolve[{e1[t] == 0, e2[t] == 0, \[Theta][0] == \[Pi], \[Phi][0] == \[Pi]/2, \[Theta]'[0] == 0, \[Phi]'[0] == 0}, {\[Theta], \[Phi]}, {t, 0, tmax}, MaxSteps -> Infinity]
frames = Table[
   prediction = Table[NDSolve[{e1[t1] == 0, e2[t1] == 0, \[Theta][0] == Evaluate[(\[Theta][t] /. s1)][[1]], \[Phi][0] == Evaluate[(\[Phi][t] /. s1)][[1]] + \[Delta], \[Theta]'[0] == Evaluate[(\[Theta]'[t] /. s1)][[1]], \[Phi]'[0] == Evaluate[(\[Phi]'[t] /. s1)][[1]]}, {\[Theta], \[Phi]}, {t1, 0, 10}, MaxSteps -> Infinity]
     , {\[Delta], -0.002, 0.002, 0.00025}];
Show[
    ParametricPlot[p2[t] /. prediction, {t, 0, 10}, PlotStyle -> Directive[Gray, Opacity[0.1]] , Axes -> False]
    ,
    Graphics[{
      Black, Thickness[0.01], Line[{{0, 0}, (p1[t] /. s1)[[1]], (p2[t] /. s1)[[1]]}], Orange, Disk[(p1[t] /. s1)[[1]], 0.15], Disk[(p2[t] /. s1)[[1]], 0.15], Black, Thick, Circle[(p1[t] /. s1)[[1]], 0.15], 
      Circle[(p2[t] /. s1)[[1]], 0.15]
      ,
      Black, Disk[{0, 0}, 0.1]
      }, PlotRange -> {{-3, 3}, {-3, 3}}], PlotRange -> {{-3, 3}, {-3, 3}}]
   , {t, 0, 100, 0.3}];
ListAnimate[frames, 10]

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
current08:55, 6 July 2021Thumbnail for version as of 08:55, 6 July 2021360 × 360 (1.84 MB)Berto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata