Temperature distribution in laminar flow of an incompressible fluid in a rectangular channel allowing for energy dissipation