Simulation of conjugate heat transfer and entropy generation in a cavity is studied.
Nanofluid-saturated porous medium fills the cavity which is heated by solid wall.
The CuO nanoparticles enhance the heat transfer and increase the entropy generation.
A new criterion is proposed to predict the best performance of the porous cavity.
Largest thickness and lower wall conductivity give best thermal performance.