Faili:Quadruple pendulum normal modes.gif
Quadruple_pendulum_normal_modes.gif (piseli 800 × 398, saizi ya faili: 4.69 MB, aina ya MIME: image/gif, looped, 501 frames, 50 s)
Note: Due to technical limitations, thumbnails of high resolution GIF images such as this one will not be animated.
Faili hili linatoka Wikimedia Commons na huenda likawa limetumika na miradi mingine. Maelezo yaliyopo katika ukurasa wa maelezo ya faili linaonyeshwa hapa.
Muhtasari
MaelezoQuadruple pendulum normal modes.gif |
English: A quadruple pendulum has 4 degrees of freedom and thus 4 "orthogonal" modes. If the system was linear, those modes would be truly orthogonal and wouldn't interact. But since this is a non-linear system, the modes are coupled and can exchange energy. |
Tarehe | |
Chanzo | https://twitter.com/j_bertolotti/status/1493969051659517956 |
Mwandishi | Jacopo Bertolotti |
Ruhusa (Kutumia faili tena) |
https://twitter.com/j_bertolotti/status/1030470604418428929 |
Mathematica 13.0 code
npendula = 4; (*In principle the code can run with any number of pendula, but some minor adjustments might be needed here and there to be sure to select the right frequencies etc.*)
\[Theta] = ToExpression[ StringJoin["\[Theta]", #] & /@ Evaluate[ToString /@ Range[npendula]]];
l = ToExpression[StringJoin["l", #] & /@ Evaluate[ToString /@ Range[npendula]]];
m = ToExpression[StringJoin["m", #] & /@ Evaluate[ToString /@ Range[npendula]]];
g =.;
p = {0, 0};
pos = Reap[For[j = 1, j <= npendula, j++,
p = p + l[[j]] {Sin[\[Theta][[j]][t]], -Cos[\[Theta][[j]][t]]};
Sow[p];
]][[2, 1]];
vel = D[#, t] & /@ pos;
T = FullSimplify[Sum[m[[j]]/2 (vel[[j, 1]]^2 + vel[[j, 2]]^2), {j, 1, npendula}] ];
V = g Sum[m[[j]] *pos[[j, 2]], {j, 1, npendula}];
L = T - V; (*Lagrangian of the system*)
eq = Flatten[Table[
FullSimplify[
(D[D[L, Evaluate[D[\[Theta][[j]][t], t]] ], t] -
D[L, \[Theta][[j]][t] ]) == 0
]
, {j, 1, npendula}] ] /. {Join[{ g -> 1},
Table[l[[j]] -> 1, {j, 1, npendula}],
Table[m[[j]] -> 1, {j, 1, npendula}]]}; (*Equations of motion*)
L1 = (Normal@Series[(L /. Flatten@Join[
Table[{\[Theta][[j]][t] -> \[Epsilon] \[Theta][[j]][t]}, {j,
1, npendula}]
,
Table[{\[Theta][[j]]'[
t] -> \[Epsilon] \[Theta][[j]]'[t]}, {j, 1, npendula}]
]), {\[Epsilon], 0, 2}]) /. {\[Epsilon] -> 1}; (*Linearized Lagrangian*)
eq1 = Table[
FullSimplify[
(D[D[L1, \[Theta][[j]]'[t] ], t] - D[L1, \[Theta][[j]][t] ]) == 0
]
, {j, 1, npendula}] // Flatten; (*Linearized equations of motion*)
f\[Theta] =
ToExpression[
StringJoin["f\[Theta]", #] & /@
Evaluate[ToString /@ Range[npendula]]]; (*Dummy variables*)
M = Normal@CoefficientArrays[Table[
eq1[[j]] /.
Join[Table[\[Theta][[j]][t] -> f\[Theta][[j]], {j, 1,
npendula}],
Table[\[Theta][[j]]'[t] -> I \[Omega] f\[Theta][[j]], {j, 1,
npendula}],
Table[\[Theta][[j]]''[t] -> - \[Omega]^2 f\[Theta][[j]], {j,
1, npendula}] ]
, {j, 1, npendula}], f\[Theta]][[2]];
naturalfreq1 =
N@Solve[Det[(M /.
Join[{g -> 1}, Table[l[[j]] -> 1, {j, 1 npendula}],
Table[m[[j]] -> 1, {j, 1 npendula}]])] == 0, \[Omega]]; (*Natural frequencies. Selecting the correct ones is probably the biggest thing to check if you use a odd number of pendula.*)
e = ToExpression[ StringJoin["e", #] & /@ Evaluate[ToString /@ Range[npendula]]]; (*Dummy variables*)
modes = Table[
FullSimplify@ Solve[(M /. Join[{\[Omega] -> naturalfreq1[[2*j, 1, 2]], g -> 1}, Table[l[[j]] -> 1, {j, 1 npendula}], Table[m[[j]] -> 1, {j, 1 npendula}]]) . e == Table[0, {j, 1, npendula}], e]
, {j, 1, npendula}];
orthogonalmodes = Simplify@Table[e/e1 /. modes[[j, 1]], {j, 1, npendula}]
metric = Normal@CoefficientArrays[eq1, Table[\[Theta][[j]]''[t], {j, 1, npendula}]][[2]]; (*If you are changing the number of pendula, make sure you are selecting the correct matrix.*)
metric1 = (metric /. {Join[{ g -> 1}, Table[l[[j]] -> 1, {j, 1, npendula}], Table[m[[j]] -> 1, {j, 1, npendula}]]})[[1]];
eq = Flatten[Table[
FullSimplify[
(D[D[L, Evaluate[D[\[Theta][[j]][t], t]] ], t] -
D[L, \[Theta][[j]][t] ]) == 0
]
, {j, 1, npendula}] ] /. {Join[{ g -> 1},
Table[l[[j]] -> 1, {j, 1, npendula}],
Table[m[[j]] -> 1, {j, 1, npendula}]]};
eqbound = (Join[eq,
Table[\[Theta][[j]][0] == 1.*orthogonalmodes[[1, j]], {j, 1,
npendula}],
Table[\[Theta][[j]]'[0] == 0, {j, 1, npendula}]]) /. {Join[{
g -> 1}, Table[l[[j]] -> 1, {j, 1, npendula}],
Table[m[[j]] -> 1, {j, 1, npendula}]]};
vars = Table[\[Theta][[j]][t], {j, 1, npendula}];
tmax = 150;
sol = NDSolve[eqbound, vars, {t, 0, tmax}, Method -> {"EquationSimplification" -> "Residual"}] (*Solve the equations of motion.*)
solpos = (pos /. Table[l[[j]] -> 1, {j, 1, npendula}]) /. sol;
frames = Table[
modepos =
Table[(pos /. Table[l[[j]] -> 1, {j, 1, npendula}]) /.
Table[\[Theta][[j]][t] -> orthogonalmodes[[k, j]]*
Simplify[
orthogonalmodes[[k]] . metric1 .
Evaluate[((Table[\[Theta][[j]][t], {j, 1, npendula}] /.
sol) /. {t -> \[Tau]})[[1]] ] ]/(orthogonalmodes[[
k]] . metric1 . orthogonalmodes[[k]])
, {j, 1, npendula}], {k, 1, npendula}];
GraphicsGrid[{{
Graphics[{
Line[Join[{{0, 0}}, Table[solpos[[1, j]], {j, 1, npendula}]] ],
Disk[{0, 0}, 0.075],
Table[Disk[solpos[[1, j]], 0.1], {j, 1, npendula}],
Text[
Style["Quadruple pendulum", Bold, FontSize -> 14], {0, 3.5}]
},
PlotRange ->
1.1 {{-npendula, npendula}, {-npendula, npendula}}
]
, SpanFromLeft,
Graphics[{
Line[
Join[{{0, 0}}, Table[modepos[[1, j]], {j, 1, npendula}]] ],
Disk[{0, 0}, 0.075],
Table[Disk[modepos[[1, j]], 0.1], {j, 1, npendula}],
Text[
Style["\!\(\*SuperscriptBox[\(1\), \(st\)]\) mode", Bold,
FontSize -> 14], {0, 3.5}]
},
PlotRange ->
1.1 {{-npendula, npendula}, {-npendula, npendula}}
]
,
Graphics[{
Line[
Join[{{0, 0}}, Table[modepos[[2, j]], {j, 1, npendula}]] ],
Disk[{0, 0}, 0.075],
Table[Disk[modepos[[2, j]], 0.1], {j, 1, npendula}],
Text[
Style["\!\(\*SuperscriptBox[\(2\), \(nd\)]\) mode", Bold,
FontSize -> 14], {0, 3.5}]
},
PlotRange ->
1.1 {{-npendula, npendula}, {-npendula, npendula}}
]
}, {SpanFromAbove, SpanFromBoth,
Graphics[{
Line[
Join[{{0, 0}}, Table[modepos[[3, j]], {j, 1, npendula}]] ],
Disk[{0, 0}, 0.075],
Table[Disk[modepos[[3, j]], 0.1], {j, 1, npendula}],
Text[
Style["\!\(\*SuperscriptBox[\(3\), \(rd\)]\) mode", Bold,
FontSize -> 14], {0, 3.5}]
},
PlotRange ->
1.1 {{-npendula, npendula}, {-npendula, npendula}}
]
,
Graphics[{
Line[
Join[{{0, 0}}, Table[modepos[[4, j]], {j, 1, npendula}]] ],
Disk[{0, 0}, 0.075],
Table[Disk[modepos[[4, j]], 0.1], {j, 1, npendula}],
Text[
Style["\!\(\*SuperscriptBox[\(4\), \(th\)]\) mode", Bold,
FontSize -> 14], {0, 3.5}]
},
PlotRange ->
1.1 {{-npendula, npendula}, {-npendula, npendula}}
]
}}, Frame -> All, ImageSize -> 600]
, {t, 0, tmax/1, 0.3}];
ListAnimate[frames] (*Plot everything.*)
Hatimiliki
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.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Items portrayed in this file
depicts Kiingereza
pendulum Kiingereza
normal mode Kiingereza
some value
copyright status Kiingereza
16 Februari 2022
MIME type Kiingereza
image/gif
Historia ya faili
Bonyeza tarehe/saa kuona faili kama ilivyoonekana wakati huo.
Tarehe/Saa | Picha ndogo | Vipimo | Mtumiaji | Maelezo | |
---|---|---|---|---|---|
sasa hivi | 09:11, 17 Februari 2022 | 800 × 398 (4.69 MB) | Berto | Uploaded own work with UploadWizard |
Matumizi ya faili
Ukurasa huu umeunganishwa na faili hili:
Matumizi ya faili ulimwenguni
Wiki nyingine hutumia faili hizi:
- Matumizi kwa it.wikipedia.org
Data juu
Faili hili lina maarifa mengine, yamkini kutoka kemra au skana iliyotumiwa kulitengeneza au kuliandaa kwa tarakilishi.
Kama faili limebadilishwa kutoka hali yake ya awali, inawezekana kwamba vipengele kadhaa vitakuwa tofauti kuliko hali ya picha ilivyo sasa.
Maoni juu ya faili ya GIF | Created with the Wolfram Language : www.wolfram.com |
---|