Heat capacity of heterogeneous systems and thermal analysis