Theory of drying