Introduction
I've developed a code to solve for generalised, incompressible 2D Stokes flow
$\eta \nabla^2 \mathbf{v} - \nabla p + \mathbf{S} = 0$
$\nabla . \mathbf{v} = 0$
where $\mathbf{S}$ can include forces or gradients of an additional stress tensor $\Pi$,
$\mathbf{S} = \mathbf{f} + \nabla . \mathbf{\Pi} + \cdots$.
In this code, I solve the above in Fourier space using the following hydrodynamic propagator,
$\tilde{\mathbf{v}} = \frac{1}{\eta k^2}\left(\mathbf{\delta} - \hat{\mathbf{k}}\hat{\mathbf{k}}\right) . \tilde{\mathbf{S}}$
I numerically do this using FFTW, with periodic boundary conditions in the x and y directions. This code has been verified, for example, on the benchmark problem of flow past a periodic array of cylinders, with forces generated by an immersed boundary code.
Question
If I want to extend this code to include walls at $y = 0, L_y$, with no slip and no permeation, can I still solve this with a modified version of the above?
One idea might be possibly to only use $sin$ modes in the y-direction for the Fourier transform? Would this amount to zero gradient BC on $\Pi$?
Thank you - any help is greatly appreciated!