Modeling of permeation and diffusion