I am interested in 2D channel flow of an incompressible Stokes fluid (Re << 1), with periodic boundary conditions in the x-direction and no-slip at the walls in the y-direction. I have existing code that solves this using a stream function formulation which is tested and works correctly. The details of the numerical implementation shouldn't matter, but for reference I use finite differences in the y-direction, and a Fourier method in the x-direction.
In the stream-function formulation the pressure is eliminated via the incompressibility condition, however occasionally it is useful to examine it in order to gain some insight. To be clear, this pressure is an auxiliary field, and the accuracy of the simulation isn't dependent on it.
My question is how can this pressure be recovered from the stream function object? I also have the raw velocities in case they are easier to work with. This general problem appears to be called the Pressure Poisson Equation (PPE) but I'm having some difficulties understanding it.
My attempt
Begin with the Stokes equation (subject to some force $\bf f$):
$$0 = \eta \nabla^2{\bf v} - \nabla p + {\bf f} $$
Taking the divergence of this, and applying incompressibility, ${\bf 0} = {\bf \nabla}\cdot{\bf v}$, we find:
$$\nabla^2 {p} = \nabla \cdot {\bf f}, \qquad {\rm (1)}$$
i.e., a Poisson equation for the pressure.
Doubly Periodic
In a doubly periodic system (i.e., periodic in x and y) we can easily calculate the pressure (defined up to a constant), using the boundary conditions that gradients in the pressure are subject to periodic BCs: $\nabla p(x, y) = \nabla p(x+L,y)$ etc. This can easily be solved in Fourier space.
Channel flow
This is where I am unsure - in the periodic direction I know the boundary condition, but in the wall normal direction it's not clear what the boundary condition should be. Eq 16 in Ref (excluding advection, and assuming time-independent BCs) suggest that both forces and velocity must appear in the BC:
${\bf n}\cdot\nabla p = {\bf n}\cdot\left(f + \eta \nabla^2 {\bf v} \right)$
This seems consistent with Ref 2 Eq 1.9 (which sets $\bf f = 0$) where the BC reads:
$\partial p/\partial{\bf n} = {\bf n} \cdot \eta \nabla^2 {\bf v}$
Is this an appropriate way to find the pressure in channel geometries, along with Eq. (1) above? If not are there any alternative approaches, perhaps involving the streamfunction directly? Ease of implementation is preferred over efficiency as this is generally a one-off calculation.