Entropy generation is equivalent to destruction of available work (exergy). The useful energy is destroyed due to the intrinsic irreversibility associated within thermodynamic systems. Exergy analysis can be used as an effective basis for the development and improvement of systems design not only in the overall perspective but also in the individual component level. Second law analysis provides a useful tool to identify the irreversibility in any thermal system. This study presents the investigation of local and total entropy generation in compressible flow through a diffuser. Air is used as the fluid. Uniform heat flux boundary condition is applied at the wall. Two dimensional solution of velocity and temperature fields are obtained using the CFD code FLUENT. Distribution of entropy generation rate is investigated throughout the volume of the fluid as it flows through the diffuser. Regions of high entropy generation in the diffuser have been predicted. The angle of expansion of diffuser is varied and its desire value corresponding to minimum entropy generation is determined at fixed flow conditions. (C) 2010 Elsevier Ltd. All rights reserved.