Border conditions on Molecular Dynamics Simulation

In summary, the conversation discusses building a code for Molecular dynamics in C and using Lennard Jones Potential, periodic border conditions, and Verlet Integration. The speaker is concerned about the energy not being conserved when the border conditions are present and is seeking suggestions for improvement.
  • #1
mielgosez
2
0
I'm building a code for Molecular dynamics (in C).
I'm employing Lennard Jones Potential, periodic border conditions and I integrate Newton's equations by making use of Verlet Integration.
When I plot Time vs Energy graph, what I get isn't a constant! but when border condition are remove, then energy is conserved! What is happening?
I appreciate any suggestion, thanks​
The code is in the following link (border condition are in red):http://es.scribd.com/doc/62027867/Molecular-Dynamics
 
Technology news on Phys.org
  • #2
-CodeThe periodic boundary conditions you are using may be introducing some numerical errors in the integration process. This can cause the energy to be slightly off from what it should be. To minimize this effect, you should make sure that the timestep you are using is small enough to accurately capture the motion of the particles. Additionally, you may want to consider using a more sophisticated integration method that is better suited for dealing with periodic boundary conditions.
 

Similar threads

Replies
4
Views
1K
Replies
2
Views
8K
Replies
2
Views
1K
Replies
1
Views
6K
Replies
1
Views
1K
Replies
2
Views
4K
Back
Top