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

..30-Sep-2021-

READMEH A D30-Sep-20213.8 KiB10876

data.cos.1000SPCEH A D30-Sep-2021456.5 KiB6,0446,027

in.cos.1000SPCEH A D30-Sep-20211.4 KiB5439

in.einstein.2dH A D30-Sep-20212 KiB8657

in.gk.2dH A D30-Sep-20211.8 KiB7752

in.mp.2dH A D30-Sep-20211.7 KiB7850

in.nemd.2dH A D30-Sep-20211.9 KiB8757

in.wall.2dH A D30-Sep-20211.9 KiB8658

log.13Oct16.einstein.2d.g++.1H A D30-Sep-202127.9 KiB437400

log.13Oct16.gk.2d.g++.1H A D30-Sep-202124.3 KiB424391

log.13Oct16.mp.2d.g++.1H A D30-Sep-202111.6 KiB261221

log.13Oct16.nemd.2d.g++.1H A D30-Sep-202114.7 KiB305263

log.13Oct16.wall.2d.g++.1H A D30-Sep-202110.2 KiB247211

log.30Apr20.cos.1000SPCE.g++.1H A D30-Sep-20216.7 KiB161142

profile.13Oct16.einstein.2d.g++.1H A D30-Sep-20217.1 KiB253252

profile.13Oct16.gk.2d.g++.1H A D30-Sep-20213.7 MiB100,655100,654

profile.13Oct16.mp.2d.g++.1H A D30-Sep-202136.3 KiB1,4741,473

profile.13Oct16.nemd.2d.g++.1H A D30-Sep-202110.4 KiB424423

profile.13Oct16.wall.2d.g++.1H A D30-Sep-20213.5 KiB151150

README

1This directory has 6 scripts that compute the viscosity (eta) of fluid
2using 6 different methods. 5 of them are for a Lennard-Jones fluid
3and the last one is for SPC/E water model. See the discussion in
4Section 6.21 of the manual for an overview of the methods and pointers
5to doc pages for the commands which implement them.  Citations for the
6various methods can also be found in the manual.
7
8These scripts are provided for illustration purposes.  No guarantee is
9made that the systems are fully equilibrated or that the runs are long
10enough to generate good statistics and highly accurate results.
11
12-------------
13
14These are the 5 methods for computing viscosity of a LJ fluid.  The first 3 are
15non-equilibrium methods; the last 2 are equilibrium methods.
16
17in.wall = move a wall to shear the fluid between two walls
18in.nemd = use fix deform and fix nvt/sllod to perform a NEMD shear simulation
19in.mp = use fix viscosity and the Muller-Plathe method
20in.gk = use the Green-Kubo method
21in.einstein = use the Einstein version of Green-Kubo method
22
23All the systems have around 800 atoms.  The NEMD methods run for short
24times; the G-K and Einstein systems need to run longer to generate good statistics.
25
26The scripts were all run on a single processor.  They all run in a
27minute or so and produce the accompanying log files and profile files
28(for velocity or momentum flux).
29
30See the Movies page of the LAMMPS web site
31(https://www.lammps.org/movies.html), for animations of the NEMD
32scripts, created using the dump image command.
33
34The state point of the LJ fluid is rho* = 0.6, T* = 1.0, and Rcut =
352.5 sigma.  This system should have a shear viscosity of about 1.0.
36
37-------------
38
39Here is how to extract viscosity from the log file output for each
40method.
41
42The NEMD methods use the formula eta = - dM / Velocity-gradient, where
43dM = momentum flux in the y-direction, and Vel gradient = dVelX / dY =
44the change in x-velocity over a distance dY in the y-direction.
45
46(1) in.wall.2d
47
48mom flux = pxy
49dVelX = Srate = 2.7
50dY = Y box length = 41.99
51
52eta = 0.946 = running average output as last log file column
53
54(2) in.nemd.2d
55
56mom flux = pxy
57dVelX = velocity of top box edge = Srate = 2.7
58dY = Y box length = 36.51
59
60eta = 1.18 = running average output as last log file column
61
62(3) in.mp.2d
63
64mom flux = dMom in Y / 2 / Area-perp-to-Y / dTime
65dMom = -1370.2 from log file, tallied by MP
66       factor of 2 since system is periodic and dMom goes 2 ways
67       Area for 2d = lx
68       dTime = elapsed time in tau for accumulating dMom
69dVelX = 4th column of log output, from fix ave/spatial
70dY = 1/2 of Y box length
71
72eta = 0.997 = running average output as last log file column
73
74(4) in.gk.2d
75
76eta is computed directly within the script, by performing a time
77integration of the formula discussed in Section 6.21 of the manual,
78analogous to the formula for thermal conductivity given on the compute
79heat/flux doc page - the resulting value prints at the end of the run
80and is in the log file
81
82eta = 1.07
83
84(5) in.einstein.2d
85
86eta is computed directly within the script, by performing a time
87integration of the formula discussed in Section 6.21 of the manual,
88analogous to the formula for thermal conductivity given on the compute
89heat/flux doc page - the resulting value prints at the end of the run
90and is in the log file
91
92eta = 1.07
93
94-------------
95
96in.cos.1000SPCE is an example script of using cosine periodic perturbation method
97to calculate the viscosity of SPC/E water model.
98
99The reciprocal of eta is computed within the script, and printed out as v_invVis
100in thermo_style command. The result will converge after hundreds of picoseconds.
101Then eta is obtained from the reciprocal of time average of v_invVis.
102
103eta = 0.75 mPa*s
104
105Note that the calculated viscosity by this method decreases with increased acceleration.
106It is therefore generally necessary to perform calculation at different accelerations
107and extrapolate the viscosity to zero shear.
108