# Open Boundary Condition

Dear all,
Here is little confusion I am having, and this is regarding open boundary condition in lbm.
I am referring the literature from A A Mohammad Book, Mei 1999, and Yu 2003, where the formulation for
open boundary condition is something like,
at outlet, the unknown distribution functions are f3, f6, f7 (for d2q9)
f[li][nx][j] = 2f[][nx-1][j] -f[*][nx-2][j]; where * = 3, 6 or 7
[/li]
but when you check the code in A A Mohammad, the formulation is different
that is instead of f3, f6, f7, the author has written f1, f5, f8.
Theoretically which must be wrong. but indeed it worked fine and if I try to go with
theory version that is f3, f6, f7, then I am getting “-nan” values.
the piece of code I am using is given below (Theoretically wrong, but working fine)
can any body please tell me if this is correct or not
thanks

[code=“cpp”]
for(int j = 1; j < (ny-1); j++) // Open Boundary at outlet
{
f[nx][j] = 2f[nx-1][j] -f[nx-2][j];
f[nx][j] = 2
f[nx-1][j] -f[nx-2][j];
f[nx][j] = 2*f[nx-1][j] -f[nx-2][j];
}

Dear Atul,
I have come across the same condition. Were you able to find the reasoning for this?

Hi AtulBhangat and tbopardikar,

Are you sure about the flow direction of this case? If it flows from right to left the outlet is on the left in which case the unkown parameters are f1, f5 and f8.

Cheers

Hi, Atul,
I find the same problem. When I use the one-order accuracy method,
f[li][nx][j] = f[*][nx-1][j]; where * = 3, 6 or 7, it works. But i also find the fully developed velocity profile having a 1.5 maximum velocity. But after developed, the maximum velocity begin to decrease. Somebody, this is due to conservation. Now, it is always a problem.
[/li]Is someone can explain this and solve it?

Thanks