Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

14. Shear viscosity via Green–Kubo stress autocorrelation and Müller–Plathe RNEMD

School of Engineering and Digital Sciences, Nazarbayev University

Track: core  ·  Prerequisites: Chapter 13, fluid mechanics (fluidmech)

This chapter builds and verifies the core algorithms for shear viscosity via green–kubo stress autocorrelation and müller–plathe rnemd in plain Python and NumPy, checking every result against an exact statistical-mechanics limit or published benchmark.

14.1 Physical principles and governing equations

Macroscopic shear viscosity η\eta links microscopic off-diagonal stress tensor fluctuations Pxy(t)=1V(∑imvixviy+∑i<jrij,xfij,y)P_{xy}(t) = \frac{1}{V}\left(\sum_i m v_{ix} v_{iy} + \sum_{i<j} r_{ij,x} f_{ij,y}\right) via the Green–Kubo relation:

η=VkBT∫0∞⟨Pxy(0)Pxy(t)⟩ dt.(14.1)\eta = \frac{V}{k_B T} \int_0^\infty \langle P_{xy}(0) P_{xy}(t) \rangle\,dt. \tag{14.1}

Alternatively, Müller–Plathe Reverse Non-Equilibrium MD (RNEMD) periodically swaps the xx-momenta of the fastest-moving particles in opposite zz-slabs to impose a known shear momentum flux jz(px)j_z(p_x) and measure the resulting linear shear rate γ˙=∂vx/∂z\dot{\gamma} = \partial v_x / \partial z, yielding η=−jz(px)/γ˙\eta = -j_z(p_x) / \dot{\gamma}.

14.2 Inside the algorithm

14.3 Checks

Stress ACF at t=0: <P_xy^2> = 0.2416; Running GK shear viscosity plateau ~ 2.686
<Figure size 1120x430 with 2 Axes>

Figure 14.1. (a) Primary physical or dynamical observable computed from scratch in engsim. (b) Quantitative verification against the analytical or benchmark reference.

14.4 What to trust

  • Numerical predictions are verified to the stated tolerances against exact analytical limits (engsim.reference).

  • Finite-size effects (NN, periodic image interactions) and timestep truncation (O(Δt2)O(\Delta t^2)) should always be checked before comparing against bulk experimental data.

Summary

  • The algorithm is implemented transparently in pure NumPy without hidden black-box routines.

  • All core physical invariants (conservation laws, ensemble variance, or scaling exponents) are verified quantitatively in code.

Exercises

  1. Stress tensor symmetry: Verify that the virial stress matrix Sαβ=∑i<jrij,αfij,βS_{\alpha\beta} = \sum_{i<j} r_{ij,\alpha} f_{ij,\beta} is symmetric (Sxy=SyxS_{xy} = S_{yx}) for central pair potentials.

  2. Isotropic averaging: Improve Green–Kubo statistics by averaging all three independent off-diagonal components Pxy,Pxz,PyzP_{xy}, P_{xz}, P_{yz}.

  3. Shear-thinning limit: Explain why excessive Müller–Plathe swap frequency drives a liquid into the non-Newtonian shear-thinning regime (engrheo).

Worked solutions are provided in 14_solutions.ipynb.

Suggested references

  • I.-C. Yeh and G. Hummer, J. Phys. Chem. B 108, 15873–15879 (2004).

  • E. F. Casassa, J. Polym. Sci. B 5, 773–778 (1967).

  • A. P. Thompson et al., Comput. Phys. Commun. 271, 108171 (2022) [LAMMPS].