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 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.
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
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.
@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
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 :)
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...
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?
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.
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
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!
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 🙃
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()
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. 🤔
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!
This channel is awesome.
You sir, are awesome. Please keep up the great work.
ANOTHER ABSOLUTE MASTER-PIECE
Im not a matematicia nor a programmer, but your videos are absolutely fantastic, you are very talented.
I also love your baroque rap
Awesome! I watch your Python videos and become more motivated and inspired each day 😎
Loving your videos man! Super intelligent content!
Thank you for these videos! Keep up the awesome work! Maybe something with Navier-Stokes could be interesting...
Never stop, you are the best
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 !
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!!
@@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.
This was fun, good job! Dont forget to try n springs, we want to see for loops!
Channel so great thanks for making these
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
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.
@@MrPSolver yes please that would be very helpful
@@MrPSolver looking forward to it
Your videos are so damn addictive.
@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
Awesome content
Great videos 👍
I feel like it would be fun to add linear damping to the masses
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 :)
glorious!
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...
nice work man,
I wonder what would happen if the the origin was in SHM
Any ideas on modeling a rotary inverted pendulum?
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?
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.
Keep it up!!!!
I suppose you prefer Lagrange, but the Hamiltonian would give you the two sets for first order differential equation. Just wondering. Great video!
Super cool
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
it would be pretty helpful if you can talk about a sort of roadmap of how to learn modelling stuff on a computer
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!
Can you please give me a short explanation how to make the sim longer
do 3 springs, if you dare
I was considering doing "n" springs. Might be a bit of a headache
Oh and i like the rap!
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 🙃
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()
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. 🤔
Whereas I heavily dislike his oral presentation stile, the topic itself is amazing.