sarkas.tools.transport.TransportCoefficients.diffusion
sarkas.tools.transport.TransportCoefficients.diffusion#
- TransportCoefficients.diffusion(observable, plot=True, display_plot=False)[source]#
Calculate the transport coefficient from the Green-Kubo formula
\[D_{\alpha} = \frac{1}{3 N_{\alpha}} \sum_{i}^{N_{\alpha}} \int_0^{\tau} dt \, \langle \mathbf v^{(\alpha)}_{i}(t) \cdot \mathbf v^{(\alpha)}_{i}(0) \rangle.\]where \(\mathbf v_{i}^{(\alpha)}(t)\) is the velocity of particle \(i\) of species \(\alpha\). Notice that the diffusion coefficient is averaged over all \(N_{\alpha}\) particles.
Data is retrievable at
diffusion_df
anddiffusion_df_slices
.- Parameters
observable (
sarkas.tools.observables.VelocityAutoCorrelationFunction
) – Observable object containing the ACF whose time integral leads to the self diffusion coefficient.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.