Investigation of natural convection of magnetic nanofluid in an enclosure with a porous medium considering Brownian motion