Thermodynamics of materials