# Boundary condition for pressure at a parabolic inlet

I can't wrap my head around one detail in pressure-correction method for the Navier-Stokes equations. Generally, the no-slip boundary condition implies no pressure drop at the boundary, so $\vec{n} \cdot \vec{\nabla} p = 0$. However, textbooks (computational softwares, engineers, ...) claim, that even at the inlet with prescribed ideal parabolic velocity profile (let's say the 2D inlet of width $L$ is in the $+x$ direction) $$\vec{v} = v_0 \left( 1 - \left( \frac{2 y}{L} \right)^2 \right) \vec{e}_x$$ the pressure BC for this part of the boundary is still $\vec{n} \cdot \vec{\nabla} p = 0$. However, when I take N-S equations and figure out the pressure that makes the momentum equation consistent, it turns out to be $$p = - \frac{8 \nu \rho v_0}{L^2} x$$ (so there is a constant drop in pressure in the pipe if the flow is ideally parabolic)

I imagine having an infinitely long pipe filled up with liquid which travels with perfect, laminar, parabolic profile. Now if we suddenly say "this here is our inlet" and treat the next piece of the pipe as our domain of interest, I see no reason why should pressure suddenly stop dropping, just because we called it an "inlet". So, more correctly, I would say the correct BC for pressure at the inlet with parabolic profile is $$\vec{n} \cdot \vec{\nabla} p = - \frac{8 \nu \rho v_0}{L^2}$$ The question is: why don't we impose this kind of boundary condition for pressure at the inlet boundary? Why do we still demand the homogenous Neumann BC?

## 1 Answer

Your intuition is correct. It is not true that the Neumann boundary condition $\frac{\partial p}{\partial n} = 0$ must always be applied at the inlet. In numerical solution of the Navier-Stokes equations, boundary conditions should be carefully chosen to best match the physical conditions. Otherwise inconsistencies could lead to problems with convergence or unexpected results. Imagine what might happen, for example, if you impose the condition $p = p_0$ at the inlet and $p = p_1$ at the outlet with $p_0 < p_1$.

For many configurations, it can be harmless to impose the homogeneous Neumann condition everywhere. In fact, for some regimes there are numerical methods that eliminate the pressure altogether (eg. streamfunction-vorticity formulation for 2D incompressible flow).

The choice of pressure condition at the inlet for flow in a channel depends on other conditions. Suppose the inlet to the channel is immersed in a large body of fluid moving with a uniform velocity $U$ in the $x-$direction for $x < 0$. At the channel inlet ($x=0$) we might choose to impose a uniform velocity boundary condition $u|_{x=0} = U$ and the condition $\frac{\partial p}{\partial x}|_{x=0} = 0$ if this is our best interpretation of the physical situation.

Needless to say the velocity near the inlet will not exhibit a simple uni-directional parabolic profile. There will be an entry effect most likely with eddies forming near the upper and lower walls at the inlet. Furthermore with these boundary conditions a singularity will be present that may or may not lead to convergence problems depending on the grid resolution at the walls near the inlet. In fact, there is no reason to believe that a steady state solution even exists under these conditions, although the numerical procedure may try to find one if the time-derivatives have been removed from the discretized equations. Depending on the details of the procedure and the grid resolution a "proper" fully-developed solution may be achieved further downstream from the inlet.

In your thought experiment, you impose the parabolic velocity profile at the inlet corresponding to steady, uni-directional channel flow. If the numerical solution is to converge to this profile everywhere downstream of the inlet, then it would be best to not impose the homogeneous condition but rather a non-zero gradient that sets up the expected pressure-driven flow.

To see this, imagine we are solving this numerically, but have already reduced to Navier-Stokes equations for a velocity field of the form $\mathbb{u} = u(y)\mathbb{e}_x$. In the absence of body forces, the pressure field $p(x)$ depends only on $x$ and the relevant momentum equation and incompressibility condition are

$$\mu \frac{\partial^2 p}{\partial y^2} = \frac{\partial p}{\partial x},\\ \frac{\partial u}{\partial x} = 0.$$

Differentiating the first equation with respect to $x$ we obtain the expected Poisson equation for pressure reduced to

$$\frac{\partial^2 p}{\partial x^2} = 0.$$

The general solutions for the pressure and velocity are then

$$p = Ax + B, \\ u = \frac{A}{2 \mu} y^2 + Cy + D.$$

Since we eliminated many variables and dependencies, only four boundary conditions are needed to solve for the constants uniquely. Let the upper and lower walls correspond to $y = \pm L/2$ and the inlet correspond to $x = 0$. We clearly would want to impose the two no-slip conditions $u(\pm L/2) = 0$. That leaves two more needed conditions. Clearly we need to correctly specify the pressure gradient at the inlet,

$$A = \left.\frac{\partial p}{\partial x}\right|_{x=0} = - \frac{8 \nu \rho v_0}{L^2},$$

for there to be any hope of convergence to the "expected" solution.

The final boundary condition could be a specified pressure at the inlet which would prove to be innocuous (setting a reference level for pressure) and would not alter the solution for the velocity field.

If an actual numerical solution were carried out without knowing in advance that the velocity field would take this form, you would not know exactly how many pressure boundary conditions would be required. Specifying the homogeneous Neumann condition for the pressure at the walls and the exit boundary would prove to be innocuous and not pollute the solution.

An examination of pressure boundary conditions in the context of numerical solution of the incompressible Navier-Stokes equations is found in this article.

• Thank you for the elaborate answer! Since you already started on that: what would you suggest at the outlet boundary to affect the solution upstream to the minimal extent? "Do nothing" condition + homogenuous Neumann for pressure, or parabolic outlet and the same pressure condition as imposed at the inlet? If the parabolic profile is enforced at the both ends, inlet and outlet, I would expect the solution to converge to the parabolic profile throughout the whole domain. What do you expect to change if "do-nothing" condition is enforced at the outlet? (Do nothing: sigma.n = 0) – user16320 Jan 16 '18 at 6:52
• To be safe I would impose the zero normal derivative condition for both the pressure and the velocity. It should allow the fully developed profile to be maintained upstream. Applying the inlet condition at the outlet would be a problem in terms of the pressure (the outlet pressure clearly should be lower than the inlet pressure). – RRL Jan 16 '18 at 6:58
• Computational fluid dynamics is still very much an art as well as science. If you search the web you will find dialog among users of commercial CFD codes (Fluent, etc) discussing how to best apply boundary conditions, accelerate convergence, etc. Physical flows are often unstable (laminar becomes turbulent as Reynolds number increases). Solving on a course grid with a particular type of solver may find one solution among many that are possible simply because motion on the fine scales is suppressed. – RRL Jan 16 '18 at 7:02
• You're correct. But enforcing the (normal) derivative of pressure at both inlet and outlet shouldn't force any specific value of pressure...? In fact, if I impose the pressure to decreasing at both inlet and outlet, there is a chance that the pressure would be lower at the outlet, isn't there? – user16320 Jan 16 '18 at 7:03
• You are correct. I was referring to setting the pressure to a constant value at the outlet. Again setting the pressure gradient to the value at the inlet will probably find the simple laminar flow with constant pressure gradient. Only by experimenting with some code would I know how setting that gradient to zero at the exit would influence the solution upstream. – RRL Jan 16 '18 at 7:07