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[1][nx][j] = 2f[1][nx-1][j] -f[1][nx-2][j];
f[5][nx][j] = 2f[5][nx-1][j] -f[5][nx-2][j];
f[8][nx][j] = 2*f[8][nx-1][j] -f[8][nx-2][j];
}