Hi, I'm trying to study Runge-Kutta method and apply on a simple pendulum.
Using a timestep dt=0.1 (h=0.1) the pendulum increses energy of 1% every period...
while in this site:
https://www.myphysicslab.com/pendulum/pendulum/pendulum-en.html
decreses energy about 0.01%
What am I doing wrong...
tried and this corrupt even other simulations with other algorithm. in next version I'll implement all methods of calculation to make it comparable
Thanks a lot, I'll provide all source code after all, and perhaps I'll make a javascript version so we can play with parameters online
In the first post I had a problem that the moon had an orbit like the earth, on post #5 i wrote that I had solved the problem, then DrStupid point my attention on a potentially wrong calculation that should lead a falling planet over the sun.
Now I'm searching how to enphatize this error seeing...
@BvU
I have left the program running all night, also changed timestep with 10, 1, 0.5... seems that speed corresponds (scaled by my program
//1 sdu = 10^10 m // scaled distance unit
//1 smu = 10^29 kg //scaled mass unit
//1 stu = 10^5 s
)
In next version I'll use coords, vels, ecc... without...
I have searched something and found this:
https://kof.zcu.cz/st/dis/schwarzmeier/gravitational_simulation.html
see (4.11), seem what I have implemented... is it correct?
I don't know if I can make something like I've written. I wanted to use this example in a high school and they don't know what is an integration, derivate or Euler method... so I thought something like this:
1) resultant a at istant k is:
ak = ∑ai
given by attraction of every planet
2) now...
Hi, I'm developing a very simple solar system simulator for educational purpose.
I had taken from wikipedia mass, velocity of planet and applied universal gravitation formula and applied to all celestial corps. It works well, but when I add the moon... the moon is like a planet, rotating around...