  The present paper is devoted to implementation of the immersed boundary
technique into the Fourier pseudo-spectral solution of the vorticity-velocity
formulation of the two-dimensional incompressible Navier--Stokes equations. The
immersed boundary conditions are implemented via direct modification of the
convection and diffusion terms, and therefore, in contrast to many other
similar methods, there is not an explicit external forcing function in the
present formulation. The desired immersed boundary conditions are approximated
on some regular grid points, using different orders (up to second-order)
polynomial extrapolations. At the beginning of each timestep, the solenoidal
velocities (also satisfying the desired immersed boundary conditions), are
obtained and fed into a conventional pseudo-spectral solver, together with a
modified vorticity. The zero-mean pseudo-spectral solution is employed, and
therefore, the method is applicable to the confined flows with zero mean
velocity and vorticity, and without mean vorticity dynamics. In comparison to
the classical Fourier pseudo-spectral solution, the method needs ${\cal
O}(4(1+\log N)N)$ more operations for boundary condition settings. Therefore,
the computational cost of the method, as a whole, is scaled by ${(N \log N)}$.
The classical explicit fourth-order Runge--Kutta method is used for time
integration, and the boundary conditions are set at the beginning of each
sub-step, in order to increasing the time accuracy. The method is applied to
some fixed and moving boundary problems, with different orders of boundary
conditions; and in this way, the accuracy and performance of the method are
investigated and compared with the classical Fourier pseudo-spectral solutions.
