The Double-SPRINGED Pendulum in PYTHON

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

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

  • @markmekosh3496
    @markmekosh3496 3 года назад +19

    I'm gonna have to apologize to my advisor for not getting more work done because I've been too busy watching your videos... Keep it up!

  • @huseyinnuriz
    @huseyinnuriz 3 года назад +17

    This channel is awesome.

  • @sumitdey6254
    @sumitdey6254 3 года назад +12

    You sir, are awesome. Please keep up the great work.

  • @aliexpress.official
    @aliexpress.official 3 года назад +7

    ANOTHER ABSOLUTE MASTER-PIECE

  • @Pedozzi
    @Pedozzi 3 года назад +5

    Im not a matematicia nor a programmer, but your videos are absolutely fantastic, you are very talented.
    I also love your baroque rap

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

    Awesome! I watch your Python videos and become more motivated and inspired each day 😎

  • @andrewz2432
    @andrewz2432 3 года назад +1

    Loving your videos man! Super intelligent content!

  • @matejivanek2013
    @matejivanek2013 3 года назад +5

    Thank you for these videos! Keep up the awesome work! Maybe something with Navier-Stokes could be interesting...

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

    Never stop, you are the best

  • @1998flash
    @1998flash 3 года назад +1

    Follow your video and got awesome results, I later modified it to have to different masses and it did wonders, also added a tracer to the animation (due to my laptop, it took around 30 min to run). Thinking about modifying it to have different lengths and spring constants. Right now I'm writing a triple pendulum simulation based on your code, it if works I'll test a triple-springed pendulum just for fun. Awesome video !

    • @MrPSolver
      @MrPSolver  3 года назад +1

      Wow this is awesome! Send me a link to the code when you're finished, id be very excited to see what you've done!!

    • @1998flash
      @1998flash 3 года назад +2

      @@MrPSolver Just uploaded it, triple pendulum did work, so it would be interesting to include springs in it. github.com/dazednarcissist/physics
      Also, adding dampers to the springs would be interesting, going from chaos to equilibrium.

  • @borko6066
    @borko6066 3 года назад +1

    This was fun, good job! Dont forget to try n springs, we want to see for loops!

  • @typeer
    @typeer 3 года назад

    Channel so great thanks for making these

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

    could you do a video talking about your background and your research (if possible)? maybe even n-coupled oscillators? some videos for the less programming inclined may be nice also (showing relevant programming tools for physics). again, i absolutely love the videos

    • @MrPSolver
      @MrPSolver  3 года назад +5

      I could certainly do that! I'm working on a python tutorial series where I'm going to start basic and try to teach the skills required to do the sorts of problems in these videos. As for my background, I will certainly do that as well at some point.

    • @Slizzerblob
      @Slizzerblob 3 года назад +1

      @@MrPSolver yes please that would be very helpful

    • @3r3bu5x9
      @3r3bu5x9 3 года назад +1

      @@MrPSolver looking forward to it

  • @danv8718
    @danv8718 3 года назад +1

    Your videos are so damn addictive.

  • @igorshvab2171
    @igorshvab2171 3 года назад +1

    @Mr. P Solver, you were kinda laughing at that long formula
    But that's exactly what theoreticians have been doing not long ago
    Even much bigger expressions with pen and paper

  • @akashbhurke4559
    @akashbhurke4559 3 года назад +1

    Awesome content

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

    Great videos 👍

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

    I feel like it would be fun to add linear damping to the masses

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

    I have to choose a project for my Computational Physics class in the next few weeks. Do you know of any systems which can be described in a second-order or higher PDE that can reasonably be analysed in a short timeframe? I'm currently looking at analysing rocket equation or binary star systems.
    Any suggestions will be greatly appreciated :)

  • @3r3bu5x9
    @3r3bu5x9 3 года назад +1

    glorious!

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

    If you don't use Lagrangian formalism but simple newtonian equations of motion the problem is absolutely doable on paper too.
    Symbolic software often gives unnecessarily complicated equations without simplifying the expressions properly
    I have done it in Java applet without computer algebra about 15 years ago and you could even move the bobs with the mouse while moving. Used 4th order Runge-Kutta and made chains of 3 or more springs too...

  • @len5755
    @len5755 3 года назад +1

    nice work man,
    I wonder what would happen if the the origin was in SHM

  • @ibrahimsakr7461
    @ibrahimsakr7461 3 года назад +1

    Any ideas on modeling a rotary inverted pendulum?

  • @davidsanjenis2778
    @davidsanjenis2778 3 года назад +1

    I'm not getting why L the fixed length of the spring is equal to 1 still? Are we kind of saying that every unit of length will just equal 1--so that we abstract away any exact lengths allowing us to generalize the problem?

    • @MrPSolver
      @MrPSolver  3 года назад +1

      It's the same as setting hbar or c equal to 1 in many problems. You set them equal to 1 so that you deal with less variables in the problem. Then, at the very end, when you compute physical quantities and want them in SI (metric) you need to multiple by L to get the units to work.
      For example, suppose you set L equal to 1 and at the very end of solving some problem you get E=4m/T^2 where m is some mass and T is some time. We know that E must have units of kg m^2 /s^2 and were missing the m^2 part, so we must multiply by L^2, giving E = 4mL^2/T^2.
      There's a good response here for setting quantities, such as c, equal to 1:
      physics.stackexchange.com/questions/51791/what-exactly-are-we-doing-when-we-set-c-1
      Ultimately it's just about making the problem easier to solve since we have to deal with less variables.

  • @dPhi_dTau
    @dPhi_dTau 3 года назад +1

    Keep it up!!!!

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

    I suppose you prefer Lagrange, but the Hamiltonian would give you the two sets for first order differential equation. Just wondering. Great video!

  • @kindoblue
    @kindoblue 3 года назад +1

    Super cool

  • @HimanshuSingh-jn1tf
    @HimanshuSingh-jn1tf 3 года назад +2

    Really appreciate your stuff, also where should i start if i want to do modelling of physical systems, given that i have some experience in general programming and am pursuing physics

    • @HimanshuSingh-jn1tf
      @HimanshuSingh-jn1tf 3 года назад +2

      it would be pretty helpful if you can talk about a sort of roadmap of how to learn modelling stuff on a computer

    • @MrPSolver
      @MrPSolver  3 года назад +3

      You're in luck my friend, in a day or two I'm going to be releasing some tutorial videos as part of a series. Follow along with them and you should be good!

  • @brainstormjokob637
    @brainstormjokob637 3 года назад

    Can you please give me a short explanation how to make the sim longer

  • @relaxnation1773
    @relaxnation1773 3 года назад +8

    do 3 springs, if you dare

    • @MrPSolver
      @MrPSolver  3 года назад +11

      I was considering doing "n" springs. Might be a bit of a headache

  • @borko6066
    @borko6066 3 года назад

    Oh and i like the rap!

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

    Given prior issues with indexing by means of a symbol rather than an integer,
    using an ordered iterable of symbols (e.g., solve(f, [x, y, z])) appeared to be more logical than implementing a
    nested list of symbols (e.g., solve(f, (x, y, z)))
    Thus:
    sols = solve([LE1, LE2, LE3, LE4], [the1_dd, the2_dd, r1_dd, r2_dd],
    simplify=False, rational=False)
    sols[the1_dd] was found to return 9 neat looking set of fractions, each separated by the appropriate `+` or ` -`
    What's been happening with your solver?
    Try:
    # The ODE-solver
    # Specifically imported like this to prevent `solver hanging` as was observed with the Spinning Top Lagrangians!
    from sympy.solvers import solve 🙃

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

    The difference between good and not good when trying to solve a system of ODEs as in:
    sols = sp.solve([LE1, LE2, LE3, LE4], (the1_dd, the2_dd, r1_dd, r2_dd), simplify=False, rational=False)
    Good:
    LE1 = sp.diff(L, the1) - sp.diff(sp.diff(L, the1_d), t)
    LE1 = LE1.simplify()
    Not good (that's when the solver hangs):
    LE1 = sp.diff(L, the1) - sp.diff(sp.diff(L, the1_d), t).simplify()

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

    sols[the1_dd] does not Index an Array, but a Dictionary.
    On further inspection it was found that that the `solve` only seems to solve for the first two varialbes offered,
    ignoring the remaining two, even when downgrading from sympy version 1.11.1 to 1.7.1
    Guess one has not installed the professional version perhaps,
    but only the High School version?
    Maybe its time to purchase the latest smart phone and start wasting time playing games. 🤔

  • @Fernando31611
    @Fernando31611 3 года назад

    Whereas I heavily dislike his oral presentation stile, the topic itself is amazing.