More Practice with Lagrangian Mechanics in Python

preview_player
Показать описание
In this video I tackle a unique problem in Lagrangian Mechanics using python. This problem was sent in the discord channel:

My other videos on Lagrangian Mechanics can be found in my physics problem playlist:

All code for this video found here:
Рекомендации по теме
Комментарии
Автор

Fantastic! I just love the combination of physics + numerics + python!

jmauriciou
Автор

Really enjoyed coding along with you. Results were amazing. Thanks :)

karanbhagat
Автор

Dude this was awesome, I love pendulum systems. I comment here so youtube algorithm will suggest this to more ppl

TheWaerx
Автор

this is beautiful. interesting system as well!

aliexpress.official
Автор

This is very amazing to learn as phys major knowing how to implement in the coding

cana
Автор

Bro really linked us up with the sauce oh my days man

realcirno
Автор

What you did is amazing. Thanks so much!

杨悦-ci
Автор

Great video!As a student major in physics, I can always learn from your video. May I ask how did you draw such beautiful diagram?

RH-mlbd
Автор

I haven't seen you use `sympy.init_printing()` in notebooks. It might be useful to show, to teach it to others. It makes a little bit of difference, for example it displays sympy variables and expressions nicely even if you have them in a tuple or list. Try (x, y) before or after initializing printing, for variables x, y.
Thanks for everything *you* have taught me! :)

nahblue
Автор

It has been a long time since I had to deal with those kind of problems. Perhaps it is time to refresh my memory. In the mean time I have the following question. WOuld you be able to find out limits of the parameter space (probably spring constant and or masses) which does not allow for example the mass m2 to not be located at the origin since then there is no room for spring. Or, but that constraint might be already in place because l1 is fixed, is it possible to set the value of k (probably very small) so that the spring m2 will be located a distance greater then 2*L1 from the origin?

MarekBromberek
Автор

This was interesting. I noticed that you have a bunch of videos with more complicated examples at the end of this video. Is there any chance you could make a more simple example that would explain the basic concepts of a Langrangian and the differential equation connected with it in a more simple way that would be more useful for a beginner?

grixlipanda
Автор

I'm trying to solve a Lagrangian that is also subject to an external field. There is an object moving according to theta(t) = sin(2*pi*t). I defined it in the 3rd block of code (like in your example), instead of just writing theta = theta(t) like for the other variables. I run into issues when I get to the smp.lambdify part due to the sines and cosines present from theta(t) in my sols[ ]. Do you know if there's a way to go around this? Contrarily to g, m, M, l... the values of theta aren't fixed and will change at each time step.

chloebenko-prieur
Автор

Love ur channel, can you help me to construct a wannier function from a photonic crystal?

antonharyadi
Автор

Thank you very much thank you thank you thank you

A.K
Автор

Great content!! Thanks for introducing me to symbolic math in Python. I just finished deriving the Lagrangian for an Inverted Pendulum Cart problem by hand :( It was so tedious and took many hours, paper & pencil to get right.

I did have a problem running your notebook in Colab online. All cells seem to run but the animation doesn't run. After several seconds it prints out 1 frame, no motion. Any ideas where I might look?

TopicsInControlSystems
Автор

Why do you still use odeint? Isn't it being phased out in favor of solve_ivp?

iridium
Автор

Please do a solution for why my putts lip out. I heard it has to do with the Corolla effect but I don’t drive Toyotas. —— tiger would

timhutcheson
Автор

Very nice video. A question, do you really need to write smp. All the times?, cause i dont

sergiolucas