I need to implement the molecular dynamics method to simulate a simple fluid that interacts through the Lennard-Jones potential in a 2D simulation. The idea is to explore how the total energy of the system (kinetic + potential) and the particle trajectories depend on the size of the chosen time step.
I took a piece of code that does part of the job(I will upload it here) but I would like a algorithm to helpe-me to finish. I will try to summarize what I understood until now:
- Initially it sets the physical parameters and parameters of simulation
- temperature
- density
- number of particles
- size of the box
- Lennard-Jones cut-radius
- Verlet-list radius
- It initializes the vectors and lattice
- position and velocity vectors x,y and vx,vy
- distributes the particles in a square centered lattice
- Chooses velocities uniformly on a unit circle
- Normalizes the velocities according to the energy equipartition theore
- make the total momentum of the particles equal to zero
- Creates a verlet list to define neighbors
My doubts are:
How and when to use Lennard Jones potential and Verlet Velocities in the code ? Does someone have an example algorithm or can put it in a manner that I can follow the steps?
The code until now: MolecularDynamics_2DfluidSimulation