Modeling a Double Pendulum with Python

Поделиться
HTML-код
  • Опубликовано: 28 окт 2024

Комментарии • 17

  • @viggosimonsen
    @viggosimonsen 10 месяцев назад +1

    Very nice work, from derivation to coding. I don't recall I did the double pendulum at university - but I knew that you only need two degrees of freedom for the mechanics to very quickly get chaotic. Same goes for celestial mechanics.

  • @fluffymassacre2918
    @fluffymassacre2918 2 года назад +2

    This man really fist pumped the air when he found out his code was right, can't say I haven't done the same

    • @DotPhysics
      @DotPhysics  2 года назад

      It's just what you are supposed to do. At least, that's the way I was taught.

  • @GoblinKiLLer777
    @GoblinKiLLer777 2 года назад +1

    Thanks for your sharing ! I learned so many things from your video!

  • @spencergee6948
    @spencergee6948 2 года назад +7

    Hello, I can follow (even perform) the maths to get me to the equations of motion. What I can't follow is the modelling by Python. Is there not some other (easier) method to do this. I am 81 and rather stuck in my ways. Happy New year, by the way.

    • @DotPhysics
      @DotPhysics  2 года назад +3

      Really, the only analytical solution for the double pendulum is for special cases - like small angles.
      If you want to learn the python stuff, I have a series of videos on that - ruclips.net/p/PLWFlMBumSLSaqgYlK2wD7XSPRQ2p-_Tl4

    • @mariomuysensual
      @mariomuysensual 2 года назад

      There is a simpler way, you can model it using Mathematica NDSolve function, which uses explicit Runge-Kutta methods.

  • @AJ-et3vf
    @AJ-et3vf Год назад +1

    Great video. Thank you

  • @abraham4124
    @abraham4124 2 года назад +3

    I guess everybody claps along the moment he/she finds out that the mechanical energy is constant so the whole calculations are right!

  • @nsumanth18
    @nsumanth18 2 года назад

    It’s Hamiltonian is constant of motion

  • @fizixx
    @fizixx 2 года назад

    👍

  • @swarnabhadebnath2389
    @swarnabhadebnath2389 Год назад

    Please upload a video of coding swinging atwood machine in python

    • @DotPhysics
      @DotPhysics  Год назад

      oh, that sounds like a fun problem. I'll put it on my list.

  • @_Redu
    @_Redu 2 года назад +1

    I think dt being 0.0001 yields your code to calculate a lot of data of which only 1/167 gets displayed. Wouldn't it be sufficient to set dt to 1/60 (0.0167) since the screen (your graph) refreshes only at that rate?

    • @vilmospalik1480
      @vilmospalik1480 Год назад

      the higher your dt is the more accurate the numerical approximation is, dt is actually supposed to be inifinitely small but our computers aren't infinitely powerful so we have to settle for the smallest number we can compute in a reasonable time.
      if we had a monitor with a refresh rate of 2hz, we wouldn't set dt = 0.5 since the pendulum would imediately start going everywhere and be completely off the actual position it's supposed to be within the frames

    • @_Redu
      @_Redu Год назад

      ​@@vilmospalik1480 A reasonable answer and you might be right. Still i would like to see how much the movement would diverge from this if dt was 0.0167. In other words would the errors accumulate or cancel. Interesting.