280 likes | 515 Views
Computational Physics Project. Predictor-Corrector method Verlet Integration. Molecular dynamics. Guy Halioua 302748546. Technion – Israel Institute of Technology. Preface – Molecular Dynamics. Simulation method for exploring Dynamic systems Based on Newton’s laws of motion
E N D
Computational Physics Project • Predictor-Corrector method • Verlet Integration Moleculardynamics Guy Halioua 302748546 Technion – Israel Institute of Technology
Preface – Molecular Dynamics • Simulation method for exploring Dynamic systems • Based on Newton’s laws of motion • Solve problems with multiple bodies
Integration Methods Solve a second order ODE: • Predictor Corrector - Multiple values method • Verlet Integration – Numerical approximations to the derivatives
Predictor - Corrector Predict a primitive guess for the values of and by the formulas: While:
Predictor - Corrector Calculate the accelerations for time t+∆t based on the prediction made earlier.
Predictor - Corrector Correct the primitive guess for the values of and made earlier by the formulas: While:
Predictor - Corrector Predictor Corrector coefficients for second-order equations Taken from D.C Rapaport’s Book: “The Art of Molecular Dynamics Simulation”
Verlet Integration Taylor Expand of and
Verlet Integration While can be found from Newton’s equations of motion: And the velocity is found by the mean value theorem:
Verlet Integration Accuracy analysis: Velocity Coordinate Looking for a better approximation Overall accuracy
Velocity Verlet Integration Simply a Taylor Expand of and while is taken from the motion equation using
MD Simulation1D Row of Linear Oscillators Defining the problem: row of masses, divided by linear oscillators (k,l) Determine the Dynamics of the system
MD Simulation1D Row of Linear Oscillators Defining the potential function: • Elastic potential • Force
MD Simulation1D Row of Linear Oscillators Choosing parameters: Mass Lattice’s const’ Oscillator’s const’ Oscillator’s free length No. of particles Size of time step No. of time steps
MD Simulation1D Row of Linear Oscillators Choosing initial conditions: • Coordinates: Lattice organization around the origin • Velocities: randomly picked, range [-0.3,0.3]using Matlab’s random number generator
MD Simulation1D Row of Linear Oscillators Programming • Two programs in C for computing the positions, velocities and energies at all the time steps. • Input is a file with the initial velocities
MD Simulation1D Row of Linear Oscillators Expected results: • Solution of 1 oscillator – sine (cosine) wave • Expected solution for multiple oscillators, multiple sine (cosine) waves.
MD Simulation1D Row of Linear Oscillators Results - Predictor Corrector
MD Simulation1D Row of Linear Oscillators Results – Verlet Integration
MD Simulation1D Row of Linear Oscillators Results – animation: Verlet Integration Predictor – Corrector
MD Simulation1D Row of Linear Oscillators Results – Differences:
MD Simulation1D Row of Linear Oscillators Results – Differences: • Max Difference ≈ 1.2e-4 [m] • Typical system size- a=0.5 m • % max difference: 0.024% IdenticalResults
MD Simulation1D Row of Linear Oscillators Energy analysis – Predictor Corrector
MD Simulation1D Row of Linear Oscillators Energy analysis – Verlet Integration
MD Simulation1D Row of Linear Oscillators Conclusions • Energy and momentum conservation • Identical results in 2 different methods • Compatible with theory LogicalResults