# Implicit projection method with inflow boundary conditions

I am trying to use a projection method that deals with the viscous effects implicitly to model flow around a cylinder. I'm having trouble figuring out what the boundary conditions should be, particularly on the inflow and outflow.

I think we can consider the Stokes equations without loss of generality: $$\mathbf{u}_t = \Delta \mathbf{u} - \nabla p$$ $$\nabla \cdot\mathbf{u} = 0$$

If we discretize explicitly in time (ignoring the pressure term) we get: $$\frac{\mathbf{u}^{*} - \mathbf{u}^n}{\delta} = \Delta\mathbf{u}^{n}$$ This leads to: $$\mathbf{u}^{n+1}=\mathbf{u}^* - \delta\nabla p^{n+1}$$ Taking the divergence of this equation yields the pressure Poisson equation. The boundary conditions can be found by dotting with the normal: $$\nabla p^{n+1} \cdot\mathbf{n} = \frac{(\mathbf{u}^* - \mathbf{u}^{n+1})}{\delta}\cdot\mathbf{n}$$ where $\mathbf{u}^*\cdot\mathbf{n}$ can be computed and $\mathbf{u}^{n+1}\cdot\mathbf{n}$ is given as a boundary condition.

Now if we discretize implicitly in time we get: $$\frac{\mathbf{u}^* - \mathbf{u}^n}{\delta} = \Delta \mathbf{u}^{*}$$ This is the diffusion equation for $\mathbf{u}^*$, and requires boundary conditions on $\mathbf{u}^*$. The most obvious choice is setting $\mathbf{u}^* = \mathbf{u}^{n+1}$ on the boundary. However if we do that, for the pressure Poisson equation we end up with $\nabla p\cdot\mathbf{n} = 0$ everywhere (even at the inflow and outflow). This seems incorrect to me.

What should the correct boundary conditions on the pressure Poisson equation be in this case?

• Are you storing the variables in a co-located or a staggered fashion? Jun 29, 2016 at 13:44
• But you know the velocity at the inflow BC thus, to second order accuracy in time, you can set $u_* = u^{n+1}$. This reduces the accuracy of the pressure to first order in time (which, personally, I see no point in improving given the first order in time accuracy offered by inexact fractional steps) which you can improve locally just by imposing the laplacian of pressure to be equal to zero, $\partial^2 P / \partial n^2 = 0$. This can be demonstrated enforcing the cauchy condition over the poisson operator. Jun 29, 2016 at 13:55

tldr: Reformulate the projection and avoid the need for boundary conditions on the pressure.

I think you are misinterpreting the projection scheme. In all formulations that I know, the pressure is never really computed.

It rather goes like:

1. Compute a tentative velocity $u^*$ approximating $u^{n+1}$
2. Project $u^*$ onto the space of divergence-free functions to obtain $u^{n+1}$ by solving $$\begin{bmatrix} I & \nabla \\ \nabla \cdot & 0 \end{bmatrix} \begin{bmatrix} u^{n+1} \\ \phi \end{bmatrix} = \begin{bmatrix} u^{*} \\ 0 \end{bmatrix}$$

Some remarks here:

• You may compute the $u^*$ as you suggest (setting $\nabla p^{n+1}=0$). Typically, one rather uses a guess for the pressure gradient.
• In step 2. one computes the actual velocity, so that the given boundary conditions apply. However,
• The function $\phi$ is not the pressure, so that it might be difficult to interprete boundary conditions that include the pressure (like Navier-conditions). There are ways to relate $\phi$ to the pressure; cf., e.g. .
• Furthermore, the system in 2. can be brought into the Pressure Poisson Equation that you have. But at the expense of another spatial differentiation (taking the divergence) and the additional need of boundary conditions.

If you want to really compute the pressure, you can use the relation to $\phi$ (this is often sufficient for the next pressure gradient guess) or solve the actual Pressure Poisson Equation derived from your actual equation and when you have the velocity computed. There is some issues about the right boundary conditions, but also some good answers to that in .

 P. M. Gresho. On the theory of semi-implicit projection methods for viscous incompressible flow and its implementation via a finite element method that also introduces a nearly consistent mass matrix. I: Theory. Int. J. Numer. Methods Fluids, 11(5):587–620, 1990.

 P. M. Gresho and R. L. Sani. Incompressible flow and the finite element method. Vol. 2: Isothermal laminar flow. Wiley, Chichester, UK, 2000.

•  is an excellent reference (though not available online from my school). To specifically answer my question, we solve for a Poisson equation for scalar $\phi$ with homogeneous Neumann BC. It turns out $p = \delta\phi$ is a good approximation. There are numerous other methods discussed in the paper as well. Jul 1, 2016 at 13:29
• I guess I can send you a copy of . Just drop me a mail.
– Jan
Jul 1, 2016 at 19:43
• Thanks, I did manage to find a hard copy in the library. Jul 2, 2016 at 20:40

The most obvious choice is setting $\mathbf{u}^* = \mathbf{u}^{n+1}$ on the boundary.

This is true if your velocity is described by Dirichlet BCs, however, if your velocity BCs are described by Neumann BCs (fully developed flow, e.g.), you should use $\frac{\partial \mathbf{u}^*}{\partial n} = 0$. This, it sounds to me, is what you're looking for.

• Sure, that applies on the outflow. In fact that's what I've been doing. On the inflow however, we don't have Neumann BC. Jun 27, 2016 at 15:37
• @HH But you know the velocity at the inflow BC thus, to second order accuracy, you can set $u_* = u^{n+1}$ Jun 29, 2016 at 13:47