File:Angular momentum conservation.gif

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

Angular_momentum_conservation.gif(480 × 480 pixels, file size: 562 KB, MIME type: image/gif, looped, 60 frames, 6.0 s)

Captions

Captions

Angular momentum conservation for two bodies orbiting each other.

Summary[edit]

Description
English: Conservation of angular momentum: 2 bodies orbiting each other will change both their velocity and their distance from the centre of mass with time, but the total angular momentum is going to stay constant. (Couldn't find a way to fit the units in the formula and keep it legible. Sorry)
Date
Source https://twitter.com/j_bertolotti/status/1247155641887547395
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 12.0 code[edit]

Clear[evog, pos, posold, posoldold, acc];
m = {1, 1};
pos = {{-1, 0}, {1, 0}};
v0 = {{0, 0.3}, {0, -0.3}};
acc = Table[
   Sum[If[j == k, 0, -m[[j]] (pos[[j]] - pos[[k]])/((pos[[j, 1]] - pos[[k, 1]])^2 + (pos[[j, 2]] - pos[[k, 2]])^2)^(3/2)], {k, 1, 2}], {j, 1, 2}];
dt = 0.01;
posold = pos;
pos = posold + v0 dt + acc/2 dt^2;
clip = 10^5;
evog = Reap[Do[
      acc = Table[Sum[ If[j == k, 0, -m[[j]] (pos[[j]] - pos[[k]])/((pos[[j, 1]] - pos[[k, 1]])^2 + (pos[[j, 2]] - pos[[k, 2]])^2)^(3/2)], {k, 1, 2}], {j, 1, 2}];
      acc = Clip[acc, {-clip, clip}];
      posoldold = posold;
      posold = pos;
      pos = 2 posold - posoldold + acc dt^2;
      Sow[pos];
      , 1000];][[2, 1]];

range = 1.5;
p0 = Table[
   Show[
    ListPlot[{evog[[All, 1]][[1 ;; -1]], evog[[All, 2]][[1 ;; -1]]}, PlotStyle -> {Directive[Thin, Purple], Directive[Thin, Orange]}, PlotRange -> {{-range, range}, {-range, range}}, Joined -> True, Axes -> False, AspectRatio -> 1]
    ,
    Graphics[{Thick, Purple, Dashed, Line[{{0, 0}, evog[[t, 1]]}], Disk[evog[[t, 1]], 0.1], Dashing[None], Arrow[{evog[[t, 1]], evog[[t, 1]] + (evog[[t, 1]] - evog[[t - 1, 1]])/dt}],
      Orange, Dashed, Line[{{0, 0}, evog[[t, 2]]}], Disk[evog[[t, 2]], 0.1], Dashing[None], Arrow[{evog[[t, 2]], evog[[t, 2]] + (evog[[t, 2]] - evog[[t - 1, 2]])/dt}],
      Black, Text[ Row[{Style["\!\(\*SubscriptBox[\(L\), \(TOT\)]\) = ", Black, Bold], Style["\!\(\*SubscriptBox[\(m\), \(1\)]\) \!\(\*SubscriptBox[OverscriptBox[\(r\), \(\[Rule]\)], \(1\)]\)", 
          Purple, Bold], Style["\[Cross]", Black, Bold], Style["\!\(\*SubscriptBox[OverscriptBox[\(v\), \(\[Rule]\)], \(1\)]\)", Purple, Bold], Style["+", Black, Bold], Style["\!\(\*SubscriptBox[\(m\), (2\)]\) \!\(\*SubscriptBox[OverscriptBox[\(r\), \(\[Rule]\)], \(2\)]\)", Orange, Bold], Style["\[Cross]", Black, Bold], Style["\!\(\*SubscriptBox[OverscriptBox[\(v\), \(\[Rule]\)], \(2\)]\)", Orange, Bold], Style[" =\n= ", Black, Bold], Style["1", Purple, Bold], Style["\[CenterDot]", Black, Bold], Style[StringForm["``", NumberForm[Norm[evog[[t, 1]]], {3, 2}]], Purple, Bold], Style["\[CenterDot]", Black, Bold], Style[StringForm["``", NumberForm[Norm[(evog[[t, 1]] - evog[[t - 1, 1]])/dt], {3, 2}]], Purple, Bold], Style["\[CenterDot] sin ", Black, Bold], Style[StringForm["``", NumberForm[ ArcCos[((evog[[t, 1]] - evog[[t - 1, 1]])/dt).evog[[t, 1]]], {3, 2}]], Purple, Bold], Style[" + ", Black, Bold], Style["1", Orange, Bold], Style["\[CenterDot]", Black, Bold], Style[StringForm["``", NumberForm[Norm[evog[[t, 2]]], {3, 2}]], Orange, Bold], Style["\[CenterDot]", Black, Bold], Style[StringForm["``", NumberForm[ Norm[(evog[[t, 2]] - evog[[t - 1, 2]])/dt], {3, 2}]], Orange, Bold], Style["\[CenterDot] sin ", Black, Bold], Style[StringForm["``", NumberForm[ ArcCos[((evog[[t, 2]] - evog[[t - 1, 2]])/dt).evog[[t, 2]]], {3, 2}]], Orange, Bold], Style[StringForm["= ``", NumberForm[ Norm[Cross[ Join[(evog[[t, 1]] - evog[[t - 1, 1]])/dt, {0}], Join[evog[[t, 1]], {0}] ] + Cross[Join[(evog[[t, 2]] - evog[[t - 1, 2]])/dt, {0}], Join[evog[[t, 2]], {0}] ]], {3, 2}]], Black, Bold] }], {0, 1.35}]
      }, PlotRange -> {{-range, range}, {-range, range}}]
    ]
   , {t, 2, Position[evog[[All, 1, 1]], Evaluate@Nearest[evog[[All, 1, 1]], -1][[1]] ][[1, 1]], 10}];
ListAnimate[p0]

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
current11:54, 7 April 2020Thumbnail for version as of 11:54, 7 April 2020480 × 480 (562 KB)Berto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata