Skip to content

rajorshichat/Viscosity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Viscosity

This repository contains Python code to calculate shear viscosity from components of stress tensor using Green Kubo relation from LAMMPS simulations. It contains the following files:

  1. input.dat - stress tensor data obtained from LAMMPS. Please run your LAMMPS simulations with the following commands:

    variable     pxy equal pxy
    variable     pxz equal pxz
    variable     pyz equal pyz
    variable     pxx equal pxx
    variable     pyy equal pyy
    variable     pzz equal pzz
    fix                printp all ave/time 2 1 2 v_pxy v_pxz v_pyz v_pxx v_pyy v_pzz file stress.txt mode scalar
    
  2. output.out - sample output file containing autocorrelation and viscosity data generated by the code.

  3. viscousity.ipynb - Python code to calculate shear viscosity from Green Kubo relation as:

    $\eta=\frac{1}{Vk_{B}T}\int_{0}^{\infty} \langle X_{ACF} \rangle dt$ , where

    $X_{ACF}(t)=\frac{1}{5}\sum_{i}\langle P_{i}(t)P_{i}(0) \rangle$ , where $P_{i}$'s are the five independent components of traceless stress tensor - $P_{xy}$, $P_{yz}$, $P_{zx}$, $P_{xx}-P_{yy}/2$, $P_{yy}-P_{zz}/2$

About

This repository contains Python code to calculate shear viscosity from components of stress tensor using Green Kubo relation

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors