Thermodynamics in The Expanding Universe