Entropy generation for a laminar viscous flow in a duct subjected to constant heat flux has been investigated. The temperature dependence of the viscosity is taken into consideration. The ratio of pumping power to total heat flux decreases considerably and entropy generation increases along the duct length for viscous fluids. Therefore, it may be shown that an optimum duct length may be obtained which minimizes total energy losses due to both entropy generation and pumping power. For low heat-flux conditions, entropy generation due to viscous friction becomes dominant and the dependence of viscosity on temperature must be considered in order to determine entropy generation accurately.