Bounce-back node at the corner :: not working properly

HI

I am trying to model 3D channel which has obstacle at bottom.
When checking results everything looks ok, but I have problem at the external corner between obstacle and outer bottom plate.

here is my code

[code=“cpp”]
void channelSetup( MultiBlockLattice3D<T,DESCRIPTOR>& lattice,
IncomprFlowParam const& parameters,
OnLatticeBoundaryCondition3D<T,DESCRIPTOR>& boundaryCondition )
{
const plint nx = parameters.getNx();
const plint ny = parameters.getNy();
const plint nz = parameters.getNz();

Box3D vstup(0, 0, 0, ny-1, 0, nz-1);         // input
Box3D vystup(nx-1, nx-1, 0, ny-1, 0, nz-1);  // output

Box3D hore(0, nx-1, ny-1, ny-1, 0, nz-1);    // up
Box3D vlavo(0, nx-1, 0, ny-1, 0, 0);         // left
Box3D vpravo(0, nx-1, 0, ny-1, nz-1, nz-1);  // right

// edgeds
Box3D hrana_A(105,105,0,0,0,nz-1);
Box3D hrana_B(105,105,21,21,0,nz-1);
Box3D hrana_C(280,280,21,21,0,nz-1);
Box3D hrana_D(280,280,0,0,0,nz-1);

// bottom plates
Box3D dole_A(0,    104,  0,  0, 0, nz-1);
Box3D dole_B(105,  105,  1, 20, 0, nz-1);
Box3D dole_C(106,  279, 21, 21, 0, nz-1);
Box3D dole_C1(106, 279,  0,  0, 0, nz-1); // this is maybe not neccesary
Box3D dole_D(280,  280,  1, 20, 0, nz-1);
Box3D dole_E(281, nx-1,  0,  0, 0, nz-1);

defineDynamics(lattice, lattice.getBoundingBox(), new Prekazka<T>(105,280,1,21,0,nz-1), new BounceBack<T,DESCRIPTOR>);

// definovanie Boundary
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, hore);
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, vlavo);
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, vpravo);

boundaryCondition.addExternalVelocityEdge2PN(hrana_A, lattice, boundary::dirichlet);
boundaryCondition.addInternalVelocityEdge2PN(hrana_B, lattice, boundary::dirichlet);
boundaryCondition.addInternalVelocityEdge2NN(hrana_C, lattice, boundary::dirichlet);
boundaryCondition.addExternalVelocityEdge2NN(hrana_D, lattice, boundary::dirichlet);

boundaryCondition.addVelocityBoundary1N(dole_A, lattice, boundary::dirichlet);
boundaryCondition.addVelocityBoundary0N(dole_B, lattice, boundary::dirichlet);
boundaryCondition.addVelocityBoundary1N(dole_C, lattice, boundary::dirichlet);
boundaryCondition.addVelocityBoundary1N(dole_C1, lattice, boundary::dirichlet);
boundaryCondition.addVelocityBoundary0P(dole_D, lattice, boundary::dirichlet);
boundaryCondition.addVelocityBoundary1N(dole_E, lattice, boundary::dirichlet);

boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, vstup);
boundaryCondition.addVelocityBoundary0P (vystup, lattice, boundary::outflow );


// nastavenie rychlosti -- speeds setup
setBoundaryVelocity(lattice, lattice.getBoundingBox(), Array<T,3>(0.,0.,0.) );

setBoundaryVelocity(lattice, vstup, PoiseuilleVelocity<T>(parameters) );

initializeAtEquilibrium(lattice, lattice.getBoundingBox(), PoiseuilleDensityAndVelocity<T>(parameters,0,nx-1));

lattice.initialize();

}



problem is that fluid is trying to flow out over external edge hrana_A and hrana_D.
Bounce-back nodes are define from node #1 to #21, and hrana_A and hrana_D are define at node #0

but when I am doing this

defineDynamics(lattice, lattice.getBoundingBox(), new Prekazka<T>(105,280,0,21,0,nz-1), new BounceBack<T,DESCRIPTOR>);

defining obstacle one node lower then I am getting very stragnge results ...

PLEASE, can someone help me with seting up boundary at those corners?
looks that I am not able to setup bounce-back correctly.


thanks very much