We consider a time-dependent Navier–Stokes problem in dimension two and three provided with mixed boundary conditions. We propose an iterative algorithm and its implementation for resolving this considered problem. The discretization is based on a backward Euler scheme with respect to the time variable and the spectral method with respect to the space variables. We present some numerical experiments which confirm the interest of the discretization.