Code for investigating the behaviour of particles in the vicinity of
Techniques used include the Verlet Integration, the Euler Cromer method, using Newton's Law of Gravitation. Future plans include adding relativistic physics to the simulation.
The scripts are written in VPython. It is recommended to run them on https://glowscript.org. Check out an implementation of a binary star system collapsing here.
Verlet integration is a method used to solve the Newtonβs equations of motion. It is an algorithm to perform the integration for solving the Newtonβs equations. Velocity verlet method is an algorithm which has similarities to the leapfrog method. The only difference is that the velocity and position are calculated at the same value fo the time variable. The algorithm consists of clear steps to find the solution. This method uses the approach where it explicitly incorporates the velocity, solving the problem of the first time step in the basic Verlet algorithm.
Compute π₯(π‘+Ξπ‘)=π£(π‘)+12π(π‘)Ξπ‘2
Compute π(π‘+Ξπ‘) using the updated position
Compute π£(π‘+Ξπ‘)=π£(π‘)+12(π(π‘)+π(π‘+Ξπ‘))Ξπ‘
At every time step
β First we calculate the distance ri from the reference celestial object.
β Calculate the values of vx,i+1, vy,i+1 and vz,i+1 as vx,i+1 = v,xi+ax,i βt, vy,i+1 = vy,
i +ay,i βt and vz,i+1 = vz,i +az,i βt.
β Now compute xi+1,yi+1 and zi+1 using vx,i+1, vy,i+1 and vz,i+1 as xi+1 = xi + vx,i+1 βt,
yi+1 = yi + vy,i+1 βt and zi+1 = zi + vz,i+1 βt.
β Now compute ax,i+1, ay,i+1 and az,i+1 using the new position values xi+1, yi+1 and zi+1.
β Memorize these positions xi+1, yi+1 and zi+1 and also accelerations ax,i+1, ay,i+1 and
az,i+1 for the next iteration.
This has been a group effort by Rahul Chembakasseril, Progyan Das, Varad Sardeshpande, Saniya Patwardhan, and Rahul Lalani.