CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Inlet boundary condition in SIMPLE (

johnhelt October 18, 2010 07:28

Inlet boundary condition in SIMPLE
Dear all. I'm currently writing my own FVM code, to be solved by the SIMPLE method. I've run into some issues in defining my boundary conditions that I hope you can help me clarify. Pressure and velocity are collocated.

Say the discretized momentum equation for the w-velocity component in a cubic control volume is (I'm using central difference scheme to evaluate the gradients):
\mu A \left[ \frac{w_E-w_P}{\delta}- \frac{w_P-w_W}{\delta}+ \frac{w_N-w_P}{\delta}- \frac{w_P-w_S}{\delta}+ \frac{w_T-w_P}{\delta}- \frac{\partial w}{\partial z}_b \right]= -S_w-S_p w_p
The partial derivative at the "bottom" face has on purpose not been approximated yet.

I have two questions both with ideas that I hope can produce some comments.

First, how do I approximate the pressure-gradient source at the inlet S_w=-\frac{\partial p}{\partial z}_b \Delta V?
My first thought is to use linear extrapolation to determine the pressure outside the domain. Using central differences, I then arrive to:
S_w = -\frac{\partial p}{\partial z}_b \Delta V \approx -\frac{p_T-p_P}{\delta}\Delta V
Should I use higher order extrapolation, or will this suffice?

Second question, how do I approximate the velocity gradient? I would specify my velocity there as the inlet velocity w_0 is known. I therefore approximate the remaining partial derivative as:
\frac{\partial w}{\partial z}_b \approx \frac{w_P-w_0}{0.5\delta}.

This approach would correspond to setting a_B=0, s_P = -\frac{\mu A}{0.5\delta} and S_w = -\frac{p_T-p_P}{\delta}\Delta V+\frac{\mu A}{0.5\delta}w_0.

Looking forward for any input


lost.identity October 18, 2010 10:32

Hi Johnhelt,

I'm not an expert on CFD or SIMPLE-like algorithms, but for the past 9 months or so I've been modifying a code written for SIMPLER algorithm and have had to do some discretisations (for a 1-D grid though).

I'm assuming that P here refers to the boundary grid point on the bottom surface. Also the 0.5 in your velocity gradient comes from the fact that you're looking at a half-cell. So if you look at the control volume along the z-direction you'd have


where t is the face of the CV. So shouldn't the pressure gradient term be

-\frac{\partial{p}}{\partial{z}}\Delta{V} = -\frac{p_t - p_P}{\Delta{z}}\Delta{V}?

similarly for the other gradient terms because you integrate between the face of the CV. So for the grid along the x-direction


\int_w^e\,\frac{\partial{u}}{\partial{x}} = \frac{u_e - u_w}{\Delta{x}}

Now if you are looking at the boundary node P at the left-hand-side (LHS) you do not have u_w and u_w can be taken as the value of u_P, which is what you've done when you took w_0 for w_B.

johnhelt October 18, 2010 11:29

Hi Lost Identity, and thanks for your fast reply. I think I forgot to mention some nomenclature..

The distance between two nodal points is \delta, so then the pressure gradient at P, following your notation, should then be:

-\frac{\partial p}{\partial z}\Delta V = -\frac{p_t-p_P}{0.5\delta}
However, the pressure at the 't' face is not known (I'm using collocated variables). You can find it by interpolation p_t = \frac{p_P+p_T}{2}, and therefore you end up with -\frac{\partial p}{\partial z}\Delta V = -\frac{p_T-p_P}{\delta}, which is the same as I wrote. So a boost of confidence there :-)

I'm not sure I get your integration though.

At the "bottom" face:
after replacing volume integrals with surface ones by the Gauss theorem, the finite volume discretization at the b and t surface gives:

\int_S \left( \frac{\partial w}{\partial z} \vec{k}\right)\cdot \vec{n} dS

where \vec{k} is the z-directional vector and \vec{n} is the surface normal vector. Carrying out the dot product and integrating you get:

A\left(\frac{\partial w}{\partial z}_t - \frac{\partial w}{\partial z}_b\right)

so I need to evaluate both gradients at the two surfaces, which can be done by central differences. However, at the bottom surface only w_b is known w_b = w_0, while the velocity at B is unknown (outside of domain). When using linear interpolation the gradient at b \frac{\partial w}{\partial z}_b of course ends up being identical to that between b and P.


lost.identity October 18, 2010 15:53


Sorry I made a mistake in my integral, missed out the dx and also I was only thinking of 1-D in it. I think that's how I would do it too if I were you.

johnhelt October 19, 2010 11:26

Ok a follow-up for those who care...

I'm solving the Navier-Stokes equation for incompressible (laminar) flow to a hole in a plate - and inside that hole as well, where a parabolic flow profile should form. Later I will apply a permeability term to look at the effect of deposition from the flow (filtration).

I have implemented the solution using the SIMPLE method with on a structured grid. The whole thing is solved using the preconditioned conjugate gradient method.

With regards to the boundary conditions:

If I use the approach I wrote in the original post, I get oscillations in the velocity near the inlet in the converged solution. These oscillations, however, die out a few grid points away from the inlet.

Instead, I found that specifying the pressure-gradient \left(S_w = 0\right), as well as velocity gradient at the boundary \left(\frac{\partial w}{\partial z}_b = 0\right) to 0 both, while specifying the velocity at the "bottom" face in the pressure-correction equation to the inlet velocity w_0, I get the correct velocity field - without oscillations near the inlet.

I guess it corresponds to specifying the velocity far from the domain, however I could not find any good explanation to this in Versteeg's book.. perhaps someone here can explain?


All times are GMT -4. The time now is 17:45.