Fig. 1 General representation of an inhomogeneous system that consists of a number of subsystems. The interaction of the system with the surroundings is through exchange of heat and other forms of energy, flow of matter, and changes of shape. The internal interactions between the various subsystems are of a similar nature and lead to entropy production.