In the present study, the flow field and heat transfer of a water–copper nanofluid with variable properties in a trapezoidal enclosure saturated with porous media are studied. The governing equations are solved by finite volume method and the SIMPLER algorithm. The nanofluid flow is assumed to be laminar, steady and incompressible. Simulations are performed for sidewall (trapezoid legs) angles of 30, 45 and 60 with respect to horizontal axis, Reynolds numbers from 10 to 1000, Darcy numbers of 10-2, 10-3, 10-4 and volume fractions of 0 to 0.04 of nanoparticles. Numerical results show that the average Nusselt number increases with increasing volume fraction of nanoparticles for all studied Darcy numbers. The convection and motion of the nanofluid decrease by reducing the Darcy number which leads to a reduction in the velocity and local Nusselt number. The average Nusselt number increases by increasing the Darcy number for all aspect ratios. Also, the average Nusselt number increases with increasing Reynolds number for all Darcy numbers, aspect ratios and volume fractions of nanoparticles.