sarkas.tools.transport.TransportCoefficients.viscosity#

TransportCoefficients.viscosity(observable, plot=True, display_plot=False)[source]#

Calculate the transport coefficient from the Green-Kubo formula.

The shear viscosity is obtained from

\[\eta = \frac{\beta V}{6} \sum_{\alpha} \sum_{\gamma \neq \alpha} \int_0^{\tau} dt \, \left \langle \mathcal P_{\alpha\gamma}(t) \mathcal P_{\alpha\gamma}(0) \right \rangle\]

where \(\beta = 1/k_B T\), \(\alpha,\gamma = {x, y, z}\) and \(\mathcal P_{\alpha\gamma}(t)\) is the element of the Pressure Tensor calculated with sarkas.tools.observables.PressureTensor.

The bulk viscosity is obtained from

\[\eta_V = \beta V \int_0^{\tau}dt \, \left \langle \delta \mathcal P(t) \delta \mathcal P(0) \right \rangle,\]

where

\[\delta \mathcal P(t) = \mathcal P(t) - \left \langle \mathcal P \right \rangle\]

is the deviation of the scalar pressure.

Parameters
  • observable (sarkas.tools.observables.PressureTensor) – Observable object containing the ACF whose time integral leads to the viscsosity coefficients.

  • plot (bool, optional) – Flag for making the dual plot of the ACF and transport coefficient. Default = True.

  • display_plot (bool, optional) – Flag for displaying the plot if using the IPython. Default = False