Flow in ducts with heating or cooling