Determination of heat capacity of pure metals, compounds and alloys by analytical and numerical methods