-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A little question #1
Comments
Hello! TL;DR As i mention in the README, I wrote this code years ago, before attending classes about computational physics, approximations of ODEs and PDEs. I had a quick look at the code and I would do things a bit differently today. I would use the runge-kutta method, I would be more explicit when dropping constants, I would clean up the code, it looks awful. I would also not use https://root.cern to plot the result, I would use pyplot and interactive figures in a jupyter notebook. Some more info. From the code, I could dig out what my choices at the time were. The main loop over time calls a single function that updates the status of the pendulum, here Line 99 in 0e73456
I made multiple such functions, describing different models.
As you see, I used Euler method or finite difference method pretty much interchangeably without even mentioning it in a comment. today I would be a bit more explicit, and I would use a runge-kutta method. In the stabilized inverted pendulum, there are a couple little assumptions that are not obvious from the code, nor described in any comment:
I hope this helps a bit! [1] https://en.wikipedia.org/wiki/Drag_(physics)#Very_low_Reynolds_numbers:_Stokes'_drag |
Hello there, I have a little question :
could you share with us the theoretical part, I mean how you derived the equations and considered the Euler method.
I am interesting of studying its theory to try and implement it myself.
Thanks again
The text was updated successfully, but these errors were encountered: