Dear all,
I am trying to use Zou/He boundary condition for simulating plane poiseuille flow and using the below conditions.
D2Q9 and numbering for distribution functions is as follows:
514
280
637
for ( int j = 1; j < ny-1; j++ ) {
u[0][j]=u0;v[0][j]=0.0;rho[0][j]=1.0;
t1 = u[0][j] * u[0][j] + v[0][j] * v[0][j];
for ( int k = 0; k < 9; k++ ) {
t2 = u[0][j] * cx[k] + v[0][j] * cy[k];
fq[k]= w[k] * rho[0][j]*(1. + 3. * t2 + 4.5 * t2 * t2 – 1.5 * t1);
}
f[0][j][0]=f[0][j][2]-fq[2]+fq[0];
f[0][j][4]=0.5*(rho[0][j]*u[0][j]+rho[0][j]*v[0][j]-f[0][j][0]-f[0][j][1]+f[0][j][2]+f[0][j][3]+2.0*f[0][j][6]);
f[0][j][7]=0.5*(rho[0][j]*u[0][j]-rho[0][j]*v[0][j]-f[0][j][0]+f[0][j][1]+f[0][j][2]-f[0][j][3]+2.0*f[0][j][5]);
}
when I use this condition after first iteration density value changes from 1. to 1.05 and then keeps on changing. Please suggest me where I am wrong and what can I do improve so that density value is a constant?
Thank you.
Regards
Duldul