Heat transfer in a confined rectangular cavity packed with porous media