git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11552 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-02-12 23:17:24 +00:00
parent 8a8636f056
commit 0bd0e95bad
2 changed files with 54 additions and 2 deletions

View File

@ -30,7 +30,8 @@ This section describes how to perform common tasks using LAMMPS.
6.18 "Elastic constants"_#howto_18
6.19 "Library interface to LAMMPS"_#howto_19
6.20 "Calculating thermal conductivity"_#howto_20
6.21 "Calculating viscosity"_#howto_21 :all(b)
6.21 "Calculating viscosity"_#howto_21
6.22 "Calculating diffusion"_#howto_22 :all(b)
The example input scripts included in the LAMMPS distribution and
highlighted in "Section_example"_Section_example.html also show how to
@ -2128,3 +2129,28 @@ Phys, 79, 926 (1983).
:link(Shinoda)
[(Shinoda)] Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004).
:line
6.22 Calculating diffusion :link(howto_22),h4
The diffusion coefficient D of a material can be measured in at least
2 ways using various options in LAMMPS. See the examples/DIFFUSE
directory for scripts that implement the 2 methods discussed here for
a simple Lennard-Jones fluid model.
The first method is to measure the mean-squared displacement (MSD) of
the system, via the "compute msd"_compute_msd.html command. The slope
of the MSD versus time is proportional to the diffusion coefficient.
The instantaneous MSD values can be accumulated in a vector via the
"fix vector"_fix_vector.html command, and a line fit to the vector to
compute its slope via the "variable slope"_variable.html function, and
thus extract D.
The second method is to measure the velocity auto-correlation function
(VACF) of the system, via the "compute vacf"_compute_vacf.html
command. The time-integral of the VACF is proportional to the
diffusion coefficient. The instantaneous VACF values can be
accumulated in a vector via the "fix vector"_fix_vector.html command,
and time integrated via the "variable trap"_variable.html function,
and thus extract D.