The aim of the current study is natural convection analysis conjugated with entropy generation analysis in an incinerator shaped permeable enclosure loaded with Al2O3–H2O nanofluid subjected to the magnetic field with a rectangular wavy heater block positioned on the bottom of the cavity wall. The bottom and top horizontal walls are adiabatic; the inclined and vertical walls are thought to be cooled. Firstly, the governing expressions and standard k–e turbulence model are rewritten from dimensional form to non-dimensional form using dimensionless parameters such as vorticity and stream function. In the next step, the equation of entropy generation is written in dimensionless form. Then, the system of non-dimensional governing equations is solved by the finite volume method (FVM) conjugated with a non-dimensionalization scheme using ANSYS Fluent. Fine grids (wall y+ < 2) with inflated layers have been used for the higher Rayleigh number. The effects of the Rayleigh number in the laminar region (Ra = 103, 104, and 105) and turbulent region (Ra = 108, 0.5 × 109, and 109), Darcy number (Da = 0.01 and 100), Hartmann number (Ha = 0 and 40), and the nanoparticles ( $$ \phi = 2{{\% }} $$ ) on the entropy generation number and natural convection are investigated. The validation results were in good agreement with those of the literature. The results demonstrate that for the laminar region, the Nusselt number and entropy generation number increase as the Rayleigh number and the Darcy number grow, whereas both of them abate as Hartmann number increases. In the turbulent region, the average Nusselt number decreases by ascending the Darcy number. Also, for turbulent region (Ra = 109), convection flow strength decreases 6.28% when Hartmann number increases from 0 to 40, whereas the entropy generation number increases 31.5% at Da = 0.01.