SMS dit: Non-equilibrium thermodynamics of heterogeneous systems