.
One of the important problems in the field of heat transfer is the investigation of natural convection heat transfer in cavities. The next step is the study of entropy generation. The object of the present work is the investigation of the entropy generation in a semi-annulus porous cavity filled with Cu-water nanofluid in the presence of a magnetic field. The outer and inner semi-circular walls are kept at constant temperatures whereas the two other walls are insulated. Firstly, the governing equations (i.e. continuity, momentum and energy equations) are numerically solved by the Control Volume based Finite Element Method (CVFEM) and then the entropy generation number is calculated. The effects of the Rayleigh number, Darcy number, Hartmann number, angle of magnetic field, the nanoparticle volume fraction, the particle shape and the angle of turn for the enclosure, number and amplitude of undulation in the wavy wall on the entropy generation number are investigated. Also, a new criterion for the evaluation of cavity thermal performance is defined that is called ECOP. The results were compared with those of the literature and good agreement was observed. The results show that the Nusselt number and entropy generation number increase as the Rayleigh number and the nanoparticle volume fraction increase. Also, the entropy generation number decreases with increasing the Hartmann number whereas it increases as the Darcy number increases.