Download presentation
Presentation is loading. Please wait.
1
Computational Physics (Lecture 19)
2
One example The Halley’s comet.
The potential between the comet and the sun is given by: V(r) = -G M m / r where r is the distance between the comet and the Sun, M and m are the respective masses of the Sun and the comet, and G is the gravitational constant.
3
If we use the center-of-mass coordinate system for the two-body collision, the dynamics of the comet is governed by with the reduced mass
4
Two quantities can be assumed as the known quantities,
We can take the farthest point (aphelion) as the starting point, and then we can easily obtain the comet’s whole orbit with one of the versions of the Verlet algorithm. Two quantities can be assumed as the known quantities, the total energy and the angular momentum, which are the constants of motion. We can describe the motion of the comet in the xy plane and choose x0 = rmax, vx0 = 0, y0 = 0, and vy0 = vmin. From well-known results we have that rmax = 5.28 × 1012 m and vmin = 9.13 × 102 m/s.
5
Let us apply the velocity version of the Verlet algorithm to this problem.
Then we have the time-step index is given in parentheses as superscripts in order to distinguish it from the x-component or y-component index. The acceleration components are given by with r =sqrt(x2 + y2) and κ = GM.
6
We can use more specific units in the numerical calculations, for example, 76 years as the time unit and the semimajor axis of the orbital a = 2.68 × 1012 m as the length unit. Then we have rmax = 1.97, vmin = 0.816, and κ = 39.5. The following program is the implementation of the algorithm outlined above for Halley’s comet.
7
vx[0] = 0; vy[0] = ; gx[0] = -k/(r[0]*r[0]); gy[0] = 0; // Verlet algorithm for the position and velocity for (int i=0; i<n-1; ++i) { t[i+1] = h*(i+1); x[i+1] = x[i]+h*vx[i]+h2*gx[i]; y[i+1] = y[i]+h*vy[i]+h2*gy[i]; double r2 = x[i+1]*x[i+1]+y[i+1]*y[i+1]; r[i+1] = Math.sqrt(r2); double r3 = r2*r[i+1]; gx[i+1] = -k*x[i+1]/r3; gy[i+1] = -k*y[i+1]/r3; vx[i+1]= vx[i]+h*(gx[i+1]+gx[i])/2; vy[i+1]= vy[i]+h*(gy[i+1]+gy[i])/2; } for (int i=0; i<n-m; i+=m) { System.out.println(t[i]); System.out.println(r[i]); System.out.println(); // An example to study the time-dependent position and // velocity of Halley's comet via the Verlet algorithm. import java.lang.*; public class Comet { static final int n = 20000, m = 200; public static void main(String argv[]) { double t[] = new double [n]; double x[] = new double [n]; double y[] = new double [n]; double r[] = new double [n]; double vx[] = new double [n]; double vy[] = new double [n]; double gx[] = new double [n]; double gy[] = new double [n]; double h = 2.0/(n-1), h2 = h*h/2, k = ; // Initialization of the problem t[0] = 0; x[0] = ; y[0] = 0; r[0] = x[0];
9
The accuracy of the velocity version of the Verlet algorithm is reasonable in practice;
it is usually accurate enough because the corresponding physical quantities are rescaled according to, for example, the temperature of the system in most molecular dynamics simulations. The accumulated errors are thus removed when the rescaling is applied.
10
Structure of atomic clusters
One of the simplest applications of the Verlet algorithm is in the study of an isolated collection of particles. For an isolated system, there is a significant difference between a small system and a large system. For a small system, the ergodic assumption of statistical mechanics fails and the system may never reach the so-called equilibrium state.
11
For a very large system, standard statistical mechanics applies, even if it is isolated from the environment; the interactions among the particles cause the exchange of energies and drive the system to equilibrium. Very small clusters with just a few particles usually behave like molecules (Sugano and Koizumi, 1998). What is unclear is the behavior of a cluster of an intermediate size, say, about 100 atoms.
12
In this section, we demonstrate the application of the velocity version of the Verlet algorithm in determining the structure and dynamics of clusters of an intermediate size. We will assume that the system consists of N atoms that interact with each other through the Lennard–Jones potential.
13
r is the distance between the two particles, and ε and σ are the system dependent
parameters. The force exerted on the ith particle is given by To simplify the notation, ε is usually used as the unit of energy, ε/kB as the unit of temperature, and σ as the unit of length. The unit of time is given by sqrt (mσ2/48ε). Newton’s equation for each particle then becomes dimensionless,
14
After discretization with the Verlet algorithm, we have
The update of the velocity is usually done in two steps in practice. When g(k)i is evaluated, the velocity is partially updated with updated again when g (k+1)i becomes available after the coordinate is updated, with
15
This is equivalent to the one-step update but more economical, because it does not require storage of the acceleration of the previous time step. We can then simulate the structure and dynamics of the cluster starting from a given initial position and velocity for each particle.
16
However, several aspects still need special care.
The initial positions of the particles are usually taken as the lattice points on a closely packed structure, for example, the face-centered cubic structure. What we want to avoid is the breaking up of the system in the first few time steps, which happens if some particles are too close to each other. Another way to set up a relatively stable initial cluster is to cut out a piece from a bulk simulation. The corresponding bulk simulation is achieved with the application of the periodic boundary condition.
17
The initial velocities of the particles should also be assigned reasonably.
A common practice is to assign velocities from the Maxwell distribution which can be achieved numerically quite easily with the availability of Gaussian random numbers. The variance in the Maxwell distribution is √kBT/m for each velocity component. For example, the following method returns the Maxwell distribution of the velocity for a given temperature.
18
// Method to draw initial velocities from the Maxwell
// distribution for a given mass m, temperature T, and // paritcle number N. public static double[] maxwell(doubule m, double T, int N) { int nv = 3*N; int ng = nv-6; double v[] = new double[nv]; double r[] = new double[2]; // Assign a Gaussian number to each velocity component for (int i=0; i<nv-1; i+=2){ r = rang(); g[i] = r[0]; g[i+1] = r[1]; } // Scale the velocity to satisfy the partition theorem double ek = 0; for (int i=0; i<nv; ++i) ek += v[i]*v[i]; double vs = Math.sqrt(m*ek*nv/(ng*T)); for (int i=0; i<nv; ++i) v[i] /= vs; return v;
19
However, we always have difficulty in defining a temperature if the system is very small, that is,
where the thermodynamic limit is not applicable. In practice, we can still call a quantity associated with the kinetic energy of the system the temperature, which is basically a measure of the kinetic energy at each time step: Ek= G kB T / 2 where G is the total number of independent degrees of freedom in the system.
20
Note that now T is not necessarily a constant and that G is equal to 3N − 6, with N being the number of particles in the system, because we have to remove the center-of-mass motion and rotation around the center of mass when we study the structure and dynamics of the isolated cluster.
21
One remarkable effect observed in the simulations of finite clusters
There is a temperature region where the system fluctuates from a liquid state to a solid state over time. A phase is identified as solid if the particles in the system vibrate only around their equilibrium positions; otherwise they are in a liquid phase.
22
Simulations of clusters have revealed some very interesting phenomena that are unique to clusters of intermediate size (with N 100). We have discussed how to analyze the structural and dynamical information of a collection of particles in early lectures. One question: how can you tell the difference between crystal, amorphous solid, and liquid?
23
One can evaluate the mean square of the displacement of each particle.
For the solid state, Δ2(t) is relatively small and does not grow with time, and the particles are nondiffusive but oscillatory. For the liquid state, Δ 2(t) grows with time close to the linear relation Δ2(t) = 6Dt + Δ 2(0), where D is the self-diffusion coefficient and Δ 2(0) is a constant.
24
In a small system, this relation in time may not be exactly linear.
One can also measure the specific structure of the cluster from the pair-distribution function g(r ) and the orientational correlation function of the bonds. The temperature (or total kinetic energy) can be gradually changed to cool or heat the system.
25
The results from simulations on clusters of about 100 particles
show that the clusters can fluctuate from a group of solid states with lower energy levels to a group of liquid states that lie at higher energy levels in a specific temperature region, with kBT in the same order as the energy that separates the two groups.
26
This is not expected because the higher-energy-level liquid states are not supposed to have an observable lifetime. However, the statistical mechanics may not be accurate here, because the number of particles is relatively small. More detailed simulations also reveal that the melting of the cluster usually starts from the surface.
27
The Gear predictor--corrector method
We discussed multistep predictor–corrector methods in early chapter when solving initial-value problems. Another type of predictor–corrector method the truncated Taylor expansion of the function and its derivatives as a prediction then evaluates the function and its derivatives at the same time step with a correction given from the restriction of the differential equation.
28
We will take a first-order differential equation
This multivalue predictor–corrector scheme was developed by Nordsieck and Gear. Details of the derivations can be found in Gear (1971). We will take a first-order differential equation dr/dt=f(r,t) as an example and then generalize the method to other types of initial-value problems, such as Newton’s equation.
29
For simplicity, we will introduce the rescaled quantities
with l = 0, 1, 2, Note that r(0) = r. Now if we define a vector we can obtain the predicted value of x in the next time step xk+1, with tk+1 = (k + 1)τ , from that of the current time step xk , with tk = kτ , from the Taylor expansion for each component of xk+1: that is,
30
where B is the coefficient matrix from the Taylor expansion.
One can easily show that B is an upper triangular matrix with unit diagonal and first row elements, with the other elements given by
31
Note that the dimension of B is (n + 1) × (n + 1), that is, x is a vector of dimension n + 1, if the Taylor expansion is carried out up to the term of d n r/dtn. The correction in the Gear method is performed with the application of the differential equation under study. The difference between the predicted value of the first-order derivative δr(1) k+1 and the velocity field τ f (k+1) is
32
The above equation would be zero if the exact solution were obtained with τ → 0.
Note that r(1) k+1 in the above equation is from the prediction of the Taylor expansion. So if we combine the prediction and the correction in one expression, we have: Xk+1 = Bxk + Cδxk+1, where δxk+1 has only one nonzero component, δr(1) k+1, and C is the correction coefficient matrix, which is diagonal with zero off-diagonal elements and nonzero diagonal elements Cii = ci for i = 0, 1, , n.
33
Here ci are obtained by solving a matrix eigenvalue problem involving B and the gradient of δxk+1 with respect to xk+1. It is straightforward to solve for ci if the truncation in the Taylor expansion is not very high The most commonly used Gear scheme for the first-order differential equation is the fifth-order Gear algorithm (with the Taylor expansion carried out up to n = 5), with c0 = 95/288, c1 = 1, c2 = 25/24, c3 = 35/72, c4 = 5/48, and c5 = 1/120.
34
The only change one needs to make is the correction,
We should point out that the above procedure is not unique to first-order differential equations. The predictor part is identical for any higher-order differential equation. The only change one needs to make is the correction, which is the result of the difference between the prediction and the solution restricted by the equation.
35
In molecular dynamics, we are interested in the solution of Newton’s equation, which is a second-order differential equation with where f is the force on a specific particle of mass m. We can still formally express the algorithm as where δxk+1 also has only one nonzero element which provides the corrections to all the components of x.
36
Similarly, r(2) k+1 in the above equation is from the Taylor expansion.
The corrector coefficient matrix is still diagonal with zero off-diagonal elements and nonzero diagonal elements Cii = ci for i = 0, 1, , n.
37
Here ci for the second-order differential equation have also been worked out by Gear (1971, p. 154).
The most commonly used Gear scheme for the second-order differential equation is still the fifth-order Gear algorithm (with the Taylor expansion carried out up to n = 5), with c0 = 3/20, c1 = 251/360, c2 = 1, c3 = 11/18, c4 = 1/6, and c5 = 1/60. The values of these coefficients are obtained with the assumption that the force does not have an explicit dependence on the velocity, that is, the first-order derivative of r. If it does, c0 = 3/20 needs to be changed to c0 = 3/16 (Allen and Tildesley, 1987, pp. 340–2).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.