Heat transfer, free convective flow and entropy generation of water, Al2O3-water, and nano encapsulated phase change material (NEPCM) diluted in water as NEPCM-water suspension in a hot enclosure is studied. The enclosure is a square porous cavity which heated from below, and the remained walls are thermally insulated. The cavity is cooled by four cooling channels with three different configurations (CONF 1–3). By considering internally heat generation, the impacts of the magnetic field (Ha = 0 and 100), Darcy number (Da=0.001 and 100) and laminar Rayleigh number (Ra=104, 105, and 106) at an equal concentration of nanoparticle and NEPCM (ϕ=2%) are evaluated by finite volume method (FVM) using ANSYS Fluent. The dimensionless form of the governing equations and entropy generation are used to tune the primitive parameters of the CFD code. The validation test and grid verification check are performed to guarantee the accuracy of the results. The results show that the average Nusselt number decreases from CONF1 to CONF3. The buoyancy effect amplified in higher Rayleigh number and porous medium while the magnetic field controls the buoyancy-driven flow. In addition, at low Rayleigh number, the cavity that contains the NEPCM-water suspension is desirable due to its heat transfer capability and low irreversibility.