Purpose -The purpose of this paper is to study flow over two heat generating porous blocks situated in a cavity, and examine the effects of porous blocks geometric orientations in the cavity (configurations) and the amount of heat generation in the blocks on entropy generation rate due to heat transfer and fluid flow. Design/methodology/approach -Four configurations of blocks and three heat fluxes are accommodated in the simulations. The equilibrium flow equations are used to compute the flow field. Entropy generation in the flow system due to fluid friction and heat transfer is also computed. A control volume approach is used to discretize the governing equations of flow and heat transfer. In the simulations, flow Reynolds number is kept 100 at cavity inlet and blocks' porosity is set to 0.9726. Findings -The volumetric entropy generation rate attains high values around the blocks and configuration 4 resultsinreasonablylow valuesofentropygeneration rateduetoheat transferandfluidflow.Research limitations/implications -The simulations are limited to low Reynolds numbers due to practical applications. However, at high Reynolds numbers, flow separation in the cavity results in complex flow structure, which is difficult to simulate. Practical implications -The thermodynamic irreversibility of the thermal system in the cavity becomes low for certain configuration of blocks in the cavity. The power loss, in this case, becomes less. Originality/value -The work introduces original findings for cooling applications. When porous blocks are used for electronic cooling, the blocks configurations are very important. This is clearly demonstrated in this study.