More Practice with Lagrangian Mechanics in Python

  Рет қаралды 14,678

Mr. P Solver

Mr. P Solver

Күн бұрын

Пікірлер: 31
@karanbhagat9314
@karanbhagat9314 2 жыл бұрын
Really enjoyed coding along with you. Results were amazing. Thanks :)
@nahblue
@nahblue 2 жыл бұрын
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! :)
@aliexpress.official
@aliexpress.official 3 жыл бұрын
this is beautiful. interesting system as well!
@RH-ml7bd
@RH-ml7bd Жыл бұрын
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?
@cana5312
@cana5312 2 жыл бұрын
This is very amazing to learn as phys major knowing how to implement in the coding
@杨悦-c1i
@杨悦-c1i Жыл бұрын
What you did is amazing. Thanks so much!
@AJ-et3vf
@AJ-et3vf Жыл бұрын
Great video! Thank you!
@jmauriciou
@jmauriciou Жыл бұрын
Fantastic! I just love the combination of physics + numerics + python!
@grixlipanda287
@grixlipanda287 Жыл бұрын
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?
@8adrisg
@8adrisg Жыл бұрын
There is a video in the channel doing the same practice but with a simple pendulum. It's way more intuitive
@grixlipanda287
@grixlipanda287 Жыл бұрын
@@8adrisg Thank you! Clearly, I should've scrolled down further.
@hsh7677
@hsh7677 3 жыл бұрын
Amazing 🤩
@A.K04
@A.K04 2 жыл бұрын
Thank you very much thank you thank you thank you
@TopicsInControlSystems
@TopicsInControlSystems Жыл бұрын
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
@TopicsInControlSystems Жыл бұрын
I did find I could add : from IPython.display import HTML HTML(ani.to_html5_video()) and it displays a nice mp4 video. The results look great now.
@antonharyadi1076
@antonharyadi1076 3 жыл бұрын
Love ur channel, can you help me to construct a wannier function from a photonic crystal?
@iridium1118
@iridium1118 3 жыл бұрын
Why do you still use odeint? Isn't it being phased out in favor of solve_ivp?
@MrPSolver
@MrPSolver 3 жыл бұрын
Good point here...it was just a random selection really. But ya solve_ivp in general is much nicer.
@chloebenko-prieur1772
@chloebenko-prieur1772 2 жыл бұрын
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.
@riteshghimire4005
@riteshghimire4005 2 жыл бұрын
Awesome 😍😍
@timhutcheson8714
@timhutcheson8714 2 жыл бұрын
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
@عَدِيُّ-م3ح
@عَدِيُّ-م3ح 3 жыл бұрын
this is beautiful, but where did the beard go? :(((
@عَدِيُّ-م3ح
@عَدِيُّ-م3ح 3 жыл бұрын
it looked manly, but I guess no more, fam. good video though. :D
@realcirno1750
@realcirno1750 9 ай бұрын
Bro really linked us up with the sauce oh my days man
@TheWaerx
@TheWaerx 3 жыл бұрын
Dude this was awesome, I love pendulum systems. I comment here so youtube algorithm will suggest this to more ppl
@mberoakoko24
@mberoakoko24 2 жыл бұрын
Subscribed, this is so cool .
@MarekBromberek
@MarekBromberek 2 жыл бұрын
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?
@mikekertser5384
@mikekertser5384 2 жыл бұрын
Great video! Thank you!
@sergiolucas38
@sergiolucas38 2 жыл бұрын
Very nice video. A question, do you really need to write smp. All the times?, cause i dont
@MrPSolver
@MrPSolver 2 жыл бұрын
It's annoying but when using sympy and numpy at the same time I don't want to confuse the numerical np.cos with the symbolic smp.cos
@sergiolucas38
@sergiolucas38 2 жыл бұрын
@@MrPSolver i see, i thought you didnt know :)
Solving The Equations for a Spinning Top in Python
29:18
Mr. P Solver
Рет қаралды 10 М.
Solving For Electric Potential of Polarized Materials
22:29
Mr. P Solver
Рет қаралды 4,8 М.
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 11 МЛН
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 87 МЛН
Biot Savart Law in Python: Any wire you want, no paper required
24:46
Projectile Motion Using Lagrangians lolwut
13:41
Andrew Dotson
Рет қаралды 75 М.
Pendulum Motion in PYTHON
23:49
Mr. P Solver
Рет қаралды 17 М.
You Should Be Using This For Work/Research in Python | OOP Tutorial
34:23
Lagrangian and Hamiltonian Mechanics in Under 20 Minutes: Physics Mini Lesson
18:33
How to: Monte Carlo Simulation in Python (Introduction)
27:23
Mr. P Solver
Рет қаралды 62 М.
I run untested, viewer-submitted code on my 500-LED christmas tree.
45:17
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Two Minute Papers
Рет қаралды 192 М.
SymPy Tutorial (2022): For Physicists, Engineers, and Mathematicians
1:07:59
17 - How to write an Eulerian fluid simulator with 200 lines of code.
12:05
Ten Minute Physics
Рет қаралды 298 М.