Hi,

My simulation box contains two water box connecting with a carbon nano tube (CNT). So, I need to calculate viscosity in CNT. Hereby, instruction provided in Lammps documentation (section 8.3.6) cannot be helpful.

Is there any suggestion to calculate viscosity in a defined region?

Thanks in advance

The problem is less that of finding a suitable method but that of what property it is you can compute at all.

The section in the manual discusses computation of shear viscosity, but that is a bulk system property and you are looking at a microscale subset. For that you can try to compute the mobility of particles (e.g. the diffusivity), but even that is known to be problematic since it changes with the distance to the CNT wall.

So before looking at what commands to use, you should look at what others have been able to compute for similar systems and how this was done. Most likely you will need to write some custom post-processing software for your purposes.

To make my point more explicit.

Shear viscosity is a property of the material and thus does not change based on the volume or shape of objects you are looking at.

So you can only compute “microscopic” properties that are location dependent.