Thermodynamics in materials science