• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..30-Sep-2021-

READMEH A D30-Sep-20212.4 KiB6246

in.msd.2dH A D30-Sep-20211.3 KiB6341

in.vacf.2dH A D30-Sep-20211.2 KiB6441

log.3Aug18.msd.2d.g++.8H A D30-Sep-202110.9 KiB252222

log.3Aug18.vacf.2d.g++.8H A D30-Sep-20219.6 KiB253222

README

1This directory has 2 scripts that compute the diffusion coefficient of
2a 2d Lennard-Jones fluid using 2 different methods.  See the
3discussion in Section 6.22 of the manual for an overview of the
4methods and pointers to doc pages for the commands which implement
5them.
6
7These scripts are provided for illustration purposes.  No guarantee is
8made that the systems are fully equilibrated or that the runs are long
9enough to generate good statistics and highly accurate results.
10
11-------------
12
13These are the 2 methods for computing the diffusion coefficient.  The
14first computes the slope of the mean-squared displacement (MSD) of the
15atoms.  The second time-integrates the velocity-auto-correlation
16function (VACF) for the system.  In both cases a single time origin is
17used.  This allows the diffusion coefficient to be estimated
18on-the-fly using variables in the LAMMPS input scripts.  For better
19statistics you typically want to use multiple time origins,
20post-processing the data from dump files.
21
22in.msd.2d = mean-squared displacement (MSD)
23in.vacf.2d = velocity auto-correlation function (VACF)
24
25Both systems have 3200 atoms and run for 100000 timesteps, after
26equilibration.
27
28The scripts were both run on 8 processors.  They both run in about 10
29seconds and produce the accompanying log files.
30
31The state point of the LJ fluid is rho* = 0.6, T* = 1.0, and Rcut =
322.5 sigma.
33
34-------------
35
36Here is how to extract the diffusion coefficient from the log file
37output for each method.
38
39(1) in.msd.2d
40
41The 3rd column of output is the instantaneous mean-squared
42displacment, which grows over time.  The 4th column estimates the
43slope of the MSD from its two end-points, and uses it to compute the
44diffusion coefficient.  The 5th column fits a straight line to the
45entire (growing) set of MSD data and uses the slope of the line to
46compute the diffusion coefficient.  You can see that both measures
47give roughly the same answer and rapidly become roughly constant for
48the 100K step simulation.
49
50Dcoeff = 0.33
51
52(2) in.vacf.2d
53
54The 3rd column of output is the instantaneous velocity
55auto-correlation function (VACF).  The 4th column is the
56time-integration of the VACF (for every timestep), integrated up to
57that point in time, converted into the diffusion coefficient.  You can
58see the VACF approach gives a more noise, fluctuating value for the
59diffusion coefficient, compared to the MSD approach.
60
61Dcoeff = ~0.25
62