I want to compute the shear viscosity of a system using Green-Kubo relation. I have the full stress-tensor evolution $P_{ij}(t)$ and the system is isotropic so I can write

$$ \eta = \frac{V}{k_B T} \int_0^\infty < P_{xy}(0) \cdot P_{xy}(t') > \cdot dt' $$

I thought that $< P_{ij}(0) \cdot P_{ij}(t) >$ was the time autocorrelation function for the non-diagonal components of the stress tensor, but it cannot be because acf is normalized and for something with units it not make any sense to me... I thought in autocovariance, but I don't know because I check the value with another method and both values not match... or maybe I'm doing something wrong with autocovariance...

However, I would like to know an explicit expression for $< P_{ij}(0) \cdot P_{ij}(t) >$ and the stadistical name of this magnitude, not the physics name "time autocorrelation function" because it is a little confuse and I cannot fully understand this formula


2 Answers 2


The autocorrelation function doesn't need to be normalized, see the definition here. It also must have units of $[P^2]$, or $N^2\cdot m^{-4}$ since $\eta$ has to have units of $N\cdot s\cdot m^{-2} $.

To actually calculate this, I'd try using scipy's correlate function (linked) and check out this answer for how to calculate the autocorrelation with it.

From the second answer in the link above,

Auto-correlation comes in two versions: statistical and convolution. They both do the same, except for a little detail: The statistical version is normalized to be on the interval [-1,1].

So it appears the statistical acf differs from the physical one by normalization.

  • $\begingroup$ So, when I compute the acf I have to use stress-tensor in Pa? Maybe I'm not doing this right, but to compute this acf I'm trying to use python an the function from statsmodels.tsa.stattools import acf (statsmodels.org/dev/generated/…), this acf is always in between 0 and 1, independence of the units, that's why I talk about normalization ... $\endgroup$
    – user239504
    Jun 22, 2021 at 8:06
  • $\begingroup$ I adjusted my answer to address this comment $\endgroup$ Jun 23, 2021 at 13:49
  • $\begingroup$ @user239504, does my response answer your question? If so consider voting it up and marking it as the answer. $\endgroup$ Jun 25, 2021 at 0:45

You can have a look at this link, it provides a numerical example.

enter image description here

  • $\begingroup$ While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review $\endgroup$
    – Toffomat
    Nov 10, 2023 at 12:12
  • $\begingroup$ Thank you, it's done $\endgroup$ Nov 10, 2023 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.