Skip to content

Commit db48aa6

Browse files
committed
tested tutorial 4
1 parent d5f9f6b commit db48aa6

File tree

7 files changed

+84
-89
lines changed

7 files changed

+84
-89
lines changed

figures/NANOSHEAR-minimization.png

4.35 KB
Loading

figures/NANOSHEAR-profiles.png

-55.5 KB
Loading

files/tutorial4/solution/minimize.ipynb

Lines changed: 6 additions & 20 deletions
Large diffs are not rendered by default.

files/tutorial4/solution/minimize.lmp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ units real
88
atom_style full
99
bond_style harmonic
1010
angle_style harmonic
11-
pair_style lj/cut/tip4p/long O H OH H−O−H 0.1546 12.0
12-
kspace_style pppm/tip4p 1.0e5
11+
pair_style lj/cut/tip4p/long O H O-H H-O-H 0.1546 12.0
12+
kspace_style pppm/tip4p 1.0e-5
1313
kspace_modify slab 3.0
1414

1515
read_data create.data
@@ -19,7 +19,7 @@ include groups.inc
1919

2020
fix mynve fluid nve/limit 0.1
2121
fix myber fluid temp/berendsen 1 1 100
22-
fix myshk H2O shake 1.0e5 200 0 b OH a H−O−H
22+
fix myshk H2O shake 1.0e-5 200 0 b O-H a H-O-H
2323
timestep 0.5
2424

2525
dump mydmp all image 200 myimage-*.ppm type type &
@@ -28,7 +28,7 @@ dump_modify mydmp backcolor white &
2828
acolor O red adiam O 2 &
2929
acolor H white adiam H 1 &
3030
acolor Na+ blue adiam Na+ 2.5 &
31-
acolor Cl cyan adiam Cl 3 &
31+
acolor Cl- cyan adiam Cl- 3 &
3232
acolor WALL gray adiam WALL 3
3333

3434
compute Tfluid fluid temp

files/tutorial4/solution/shearing.ipynb

Lines changed: 44 additions & 45 deletions
Large diffs are not rendered by default.

files/tutorial4/solution/shearing.lmp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ units real
88
atom_style full
99
bond_style harmonic
1010
angle_style harmonic
11-
pair_style lj/cut/tip4p/long O H OH H−O−H 0.1546 12.0
12-
kspace_style pppm/tip4p 1.0e5
11+
pair_style lj/cut/tip4p/long O H O-H H-O-H 0.1546 12.0
12+
kspace_style pppm/tip4p 1.0e-5
1313
kspace_modify slab 3.0
1414

1515
read_data equilibrate.data
@@ -25,22 +25,22 @@ compute Twall wall temp/partial 0 1 1
2525
fix mynvt2 wall nvt temp 300 300 100
2626
fix_modify mynvt2 temp Twall
2727

28-
fix myshk H2O shake 1.0e5 200 0 b OH a H−O−H
28+
fix myshk H2O shake 1.0e-5 200 0 b O-H a H-O-H
2929
fix myrct all recenter NULL NULL 0
3030
timestep 1.0
3131

3232
fix mysf1 walltop setforce 0 NULL NULL
3333
fix mysf2 wallbot setforce 0 NULL NULL
34-
velocity wallbot set −2e−4 NULL NULL
35-
velocity walltop set 2e4 NULL NULL
34+
velocity wallbot set -2e-4 NULL NULL
35+
velocity walltop set 2e-4 NULL NULL
3636

3737
dump mydmp all image 250 myimage-*.ppm type type &
3838
shiny 0.1 box no 0.01 view 90 0 zoom 1.8
3939
dump_modify mydmp backcolor white &
4040
acolor O red adiam O 2 &
4141
acolor H white adiam H 1 &
4242
acolor Na+ blue adiam Na+ 2.5 &
43-
acolor Cl cyan adiam Cl 3 &
43+
acolor Cl- cyan adiam Cl- 3 &
4444
acolor WALL gray adiam WALL 3
4545

4646
thermo 250
@@ -58,4 +58,4 @@ fix myac2 wall ave/chunk 10 15000 200000 &
5858
fix myac3 ions ave/chunk 10 15000 200000 &
5959
cc3 density/mass vx file shearing-ions.dat
6060

61-
!run 200000
61+
run 200000

lammps-tutorials.tex

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,7 +2347,7 @@ \subsubsection{System preparation}
23472347
Therefore, to make the walls less hydrophilic, the value of $\epsilon_\text{O-WALL}$
23482348
was reduced.
23492349

2350-
The \flecmd{parameters.inc} file also contains the following two lines:
2350+
Finally, the \flecmd{parameters.inc} file contains the following two lines:
23512351
\begin{lstlisting}
23522352
bond_coeff O-H 0 0.9572
23532353
angle_coeff H-O-H 0 104.52
@@ -2732,38 +2732,48 @@ \subsubsection{Imposed shearing}
27322732
the water, the walls, and the ions, respectively. With values of \lmpcmd{10 15000 200000},
27332733
the velocity \lmpcmd{vx} will be evaluated every 10 steps during the final 150,000
27342734
steps of the simulations. The result will be averaged and printed only once at the 200,000\,th step.
2735-
Run the simulation using LAMMPS. The averaged velocity and density
2736-
profiles of the fluid are plotted in Fig.~\ref{fig:NANOSHEAR-profiles}.
2737-
As expected for such Couette flow geometry, the fluid velocity increases linearly along $z$.
2735+
Run the simulation using LAMMPS. The averaged velocity
2736+
profile for the fluid is plotted in Fig.~\ref{fig:NANOSHEAR-profiles}.
2737+
As expected for such Couette flow geometry, the fluid velocity increases
2738+
linearly along $z$, and is equal to the walls velocities at the fluid-solid
2739+
interfaces (no-slip boundary conditions).
27382740

27392741
\begin{figure}
27402742
\centering
27412743
\includegraphics[width=\linewidth]{NANOSHEAR-profiles}
2742-
\caption{a) Water density $\rho$ along the $z$-axis as
2743-
simulated in \hyperref[sheared-confined-label]{Tutorial 4}.
2744-
b) Velocity profiles for water (blue) and walls
2745-
(orange) along the $z$-axis.}
2744+
\caption{Velocity profiles for water (blue) and walls (orange) along the $z$-axis as
2745+
simulated in \hyperref[sheared-confined-label]{Tutorial 4}.}
27462746
% The line is a linear fit assuming
27472747
% that the pore size is $h = 1.8\,\text{nm}$.}
27482748
\label{fig:NANOSHEAR-profiles}
27492749
\end{figure}
27502750

27512751
From the force applied by the fluid on the solid, one can extract the stress
27522752
within the fluid, which enables the measurement of its viscosity $\eta$
2753-
according to $\eta = \tau / \dot{\gamma}$ where $\tau$ is the stress applied by
2753+
according to
2754+
\begin{equation}
2755+
\eta = \tau / \dot{\gamma}
2756+
\label{eq:eta}
2757+
\end{equation}
2758+
where $\tau$ is the stress applied by
27542759
the fluid on the shearing wall, and $\dot{\gamma}$ the shear rate
27552760
\cite{gravelle2021violations}. Here, the shear rate is
2756-
approximately $\dot{\gamma} = 16 \cdot 10^9\,\text{s}^{-1}$, and using a
2757-
surface area of $A = 6 \cdot 10^{-18}\,\text{m}^2$, one obtains an estimate for
2758-
the shear viscosity for the confined fluid of $\eta = 6.6\,\text{mPa.s}$. The
2759-
viscosity calculated at such a high shear rate may differ from the expected
2761+
approximately $\dot{\gamma} = 20 \cdot 10^9\,\text{s}^{-1}$ (Fig.~\ref{fig:NANOSHEAR-profiles}),
2762+
the average force on each wall is given by \lmpcmd{f\_mysf1[1]} and \lmpcmd{f\_mysf2[1]}
2763+
and is approximately $2.7\,\mathrm{kcal/mol/\AA}$ in magnitude. Using a surface area
2764+
for the walls of $A = 6 \cdot 10^{-18}\,\text{m}^2$, one obtains an estimate for
2765+
the shear viscosity for the confined fluid of $\eta = 3.1\,\text{mPa.s}$ using Eq.~\eqref{eq:eta}.
2766+
2767+
\begin{note}
2768+
The viscosity calculated at such a high shear rate may differ from the expected
27602769
\emph{bulk} value. In general, it is recommended to use a lower value for the
27612770
shear rate. Note that for lower shear rates, the ratio of noise-to-signal is
27622771
larger, and longer simulations are needed. Another important point to consider
27632772
is that the viscosity of a fluid next to a solid surface is typically larger
27642773
than in bulk due to interaction with the walls~\cite{wolde-kidanInterplayInterfacialViscosity2021}.
27652774
Therefore, one expects the present simulation to yield a viscosity that is slightly
27662775
higher than what would be measured in the absence of walls.
2776+
\end{note}
27672777

27682778
\subsection{Tutorial 5: Reactive silicon dioxide}
27692779
\label{reactive-silicon-dioxide-label}

0 commit comments

Comments
 (0)