Dear community,

I am trying to compute the viscosity of a liquid using “compute viscosity” together with “fix accelerate/cos”, and I don’t fully understand the units. I am using “units real”. The relevant equations are found on

https://docs.lammps.org/fix_accelerate_cos.html

I refer to the source code example from the “compute viscosity” page:

```
compute cos all viscosity/cos
variable V equal c_cos[7]
variable A equal 0.02E-5
variable density equal density
variable lz equal lz
variable reciprocalViscosity equal v_V/${A}/v_density*39.4784/v_lz/v_lz*100
```

If I see it correctly, the acceleration A is in units of kCal Angstrom^-1 g^-1, the velocity V in units of Angstrom fs^-1, the density in g cm^-3, and Lz in Angstrom. The 39.4784 is the 4pi^2, that’s clear. But how does the factor 100 appear? When I try to obtain units of (Pa*s)^-1 for the reciprocal viscosity, I obtain an additional factor of 238.85 … The “kCal” from the acceleration does not shorten out as far as I see, so the “4.18” should appear somewhere.

Could somebody help me to understand what the resulting output unit of the above code example from the LAMMPS manual is?

Best regards,

Martin