Flow Over 3-D cylinder

Hi all,

I am new to Palabos. I am trying to simulate 3-D flow over a cylinder. I dunno where i am commiting mistake. I have attached my boundary conditions below here. I am getting NAN as results.
I am running on Re=20 , N=50, lx=1, ly=1, lz=6. Pls help me on this.

Thanks in Advance


const plint nx = parameters.getNx();
const plint ny = parameters.getNy();
const plint nz = parameters.getNz();
Box3D top = Box3D(0, nx-1, ny-1, ny-1, 0, nz-1);
Box3D bottom = Box3D(0, nx-1, 0, 0, 0, nz-1);

Box3D inlet    = Box3D(0,    nx-1, 0,    ny-1, 0,    0);
Box3D outlet = Box3D(0,    nx-1, 0,    ny-1, nz-1, nz-1);

Box3D left   = Box3D(0,    0,    1,    ny-2, 0, nz-1);
Box3D right  = Box3D(nx-1, nx-1, 1,    ny-2, 0, nz-1);

boundaryCondition.setVelocityConditionOnBlockBoundaries ( lattice, inlet );
boundaryCondition.setVelocityConditionOnBlockBoundaries ( lattice, outlet, boundary::outflow );

boundaryCondition.setVelocityConditionOnBlockBoundaries ( lattice, top );
boundaryCondition.setVelocityConditionOnBlockBoundaries ( lattice, bottom );

boundaryCondition.setVelocityConditionOnBlockBoundaries ( lattice, left );
boundaryCondition.setVelocityConditionOnBlockBoundaries ( lattice, right );

setBoundaryVelocity(lattice, lattice.getBoundingBox(), SquarePoiseuilleVelocity<T>(parameters, NMAX));
setBoundaryDensity (lattice,outlet,ConstantDensity<T>(1.));

initializeAtEquilibrium(lattice, lattice.getBoundingBox(), SquarePoiseuilleDensityAndVelocity<T>(parameters, NMAX));


try to change with this following in your code:

Box3D top    = Box3D(1,    nx-1, ny-1, ny-1, 0, nz-1);
Box3D bottom = Box3D(1,    nx-1, 1,    1,    1, nz-1);

Box3D inlet    = Box3D(1,    nx-1, 1,    ny-1, 1,    1);
Box3D outlet = Box3D(1,    nx-1, 1,    ny-1, nz-1, nz-1);

Box3D left   = Box3D(1,    1,    1,    ny-2, 1, nz-1);
Box3D right  = Box3D(nx-1, nx-1, 1,    ny-2, 1, nz-1);



Thanks for the response.
I have changed the code as given above and run the program. Still i get NAN as results. When i changed my code as given below [code=“cpp”]
boundaryCondition.setVelocityConditionOnBlockBoundaries ( lattice, outlet );

and i removed the cylinder. The program is running fine.
Im still confused where i am committing mistake. I will post my whole code if you want.