Effect of heat transfer on shear flow around an obstacle