Entropy change due to heat flow