Newbie: Periodic boundary conditions

Hi:

I would like to simulate a system that has walls on the top and the bottom (which I can do with the Bounceback nodes)

lattice.defineDynamics(0,nx-1, 0,ny-1, 0,0, &bounceBackRho);
lattice.defineDynamics(0,nx-1, 0,ny-1, nz-1,nz-1, &bounceBackRho);

and a velocity inlet and outlet boundary conditions.

bc.addVelocityBoundary0N( 0, 0, 1,ny-2, 1,nz-2, omega);
bc.addVelocityBoundary0P(nx-1,nx-1, 1,ny-2, 1,nz-2, omega);

In the plane I wanted to have it periodic, but when I try and implement the collideAndstream(true) it makes it periodic in the z direction as well (the ones bounded by walls). Is there anything I am missing?

P.

Hello,
everything you did is fine for me. There should be no problems with the fact that the system is also periodic in the z direction. The distributions that are streamed periodically are anyway replaced by the bounce back.

Is what I say clear enough? If not just say it and i’ll try to make this post clearer.

Hi,
When I plot the velocityNorm it shows a non-zero component near the top and the bottom wall. In the case of bounceback should it not be the same as a non-slip boundary in the z direction, i.e, the velocity at z=0 and z=nz-1 should be identically zero?

One more question, at the inlet, when I specify the initial velocity, should I take into account the periodicity of the lattice in the x and y directions, i.e. not specify a velocity at the nodes 0 and ny-1, but just at 0?

thanks
P.