Adding RK4 to the simulation
And guess what?
The Energy error dropped from roughly 10^(-1)% to
10^(-6)% orders of magnitude π
(Literally FIVE orders of magnitude lower π«)
.
When I first tried running the program after writing the code for RK4, the best I expected was like 10^(-2) ngl π₯
.
Tho the problem is, Iβm running both the versions for an arbitrary amount of time, and then trying to compare the error,
which lwk reminds me of atomic bomb vs coughing baby ππ
.
So my next goal shall be to script a comparer or some sort, which may output things like :
- maximum energy error
- final energy error
- average energy error
- number of steps
- simulated time
- etc
Should be fun lol,,
.
.
Also also, I tried one more thing, that is, I changed dt to 1 sec π
and guess what was the error % of RK4? 60% π
(literally 10^(-6) to 60% π)
which is basically the numerical equivalent of telling the laws of physics, βI have a better ideaβ πΏβπ»
.
But nevertheless, learned a lotttt today..!!
Holy productivity~~~ π¦π₯Ή
.
But anyways, thatβs it for today,
Good Morning~!!
P.S. I think this project is lwk going in the right direction, the experimentation, the research, the learnings, new future features, all these things mean way more to me than making a random copy-paste project saying βI made a double pendulum go brrrβ π
lol
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.