We propose a new method to calculate the diffusion coefficient within molecular dynamics simulations for either homogeneous or inhomogeneous fluids. We formulate such method by solving analytically the Smoluchowski equation for a linear potential of mean force within a thin layer with absorbing boundary conditions. The bulk, or homogeneous, fluid diffusion emerges as a particular case in this approach. We apply this method to bulk liquid water at atmospheric pressure and different temperatures using the SPC/E water force field. We show that our method gives results as accurate as the traditional Einstein-Smoluchowski method, avoiding the fitting procedure required in the traditional method. We also apply this method for molten sodium chloride showing its applicability for multicomponent systems. The water vapor-liquid interface is studied as an example of an inhomogeneous system. We calculate all the components of the diffusion tensor at the interface. We observe the same anisotropy between the perpendicular and the parallel components at the interface as it has been noted in the literature. We also calculate the perpendicular self-diffusion coefficient of methane near the calcite surface showing that this coefficient is much lower than the parallel diffusion coefficients. We believe that this new unified approach is a very promising technique for both bulk and confined media.
ASJC Scopus subject areas
- Computer Science Applications
- Physical and Theoretical Chemistry