The principles of diffusion, their analogies and applications