You are browsing as a guest. Sign up (or log in) to start making projects!

1h 58m 45s logged

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

0
85

Comments 0

No comments yet. Be the first!