Diffusion, permeation and swelling are the mixing processes of materials. Diffusion is a mixing process of solute and solvent, permeation is a mixing process of liquid and porous media, and swelling of a gel is a mixing process of polymer network and solvent. Here the dynamics of such phenomena is discussed from a general principle called Onsager principle. Onsager principle is a general principle working in many non-equilibrium systems, and the governing equations for diffusion and swelling are derived from this principle.