GK method for viscosity calculation


In the LAMMPS manual, 6.21 describes how to calcualte viscosity by GK method, in which three stress tensors pxy, pxz, and pyz are used. Well, in some papers, the stress autocorrelation function is averaged overfive independent components, xy, xz, yz, xx-yy, 2zz-xx-yy.

And I want to know how to include the last two stress tensor, and how to do the addition and subtraction of vectors?

Best wishes.

Jia Wang

Read the doc page on equal-style variables.
You can define a variable that is the +/- of two
quantities, use it as an arg for fix ave/correlate, etc.