Fundamental of thermodynamics