In this research, laminar flow, heat transfer, and mass transfer of a nanofluid in a porous medium have been studied using Buongiorno's two-phase model. The porous media put in place is a cavity of a non-uniform octagonal shape. This research aims to highlight the effect of certain parameters on the evolution of the hydrodynamic, thermal, and mass profiles such as the number of Rayleigh (Ra = 103 to 106), of Darcy (Da = 10-6 to 10-2), Lewis (Le = 0.1 to 1), Brownian motion (Nb = 0.1 to 1) and thermophoresis parameter (Nt = 0.1 to 1). In addition, a geometric contribution has been introduced and varied to increase the rate of heat transfer within the porous cavity. This addition consists of corrugating the right (cold) wall according to different wave numbers (n) and different amplitudes (A). The presented study showed results of an increase in the rate of heat transfer in the cavity through the increase in the Nusselt number with the increase in the number of waves on one hand and their amplitude on the other hand. At a relatively low Rayleigh number, there is the appearance of a movement of the fluid, and the high permeability increases heat transfer as well as the fluid flow velocities. There’s the formation of dead zones at the level of the lower waves, which then leads to reduced heat transfer efficiency.