Test with code from examples/showCases/cylinder2d
and with following modification to the cylinderSetup
function, the function just wants to simulation a uniform flow, top and bottom boundary are set to freeslip
. but unfortunately, it seems that corners are still dirichlet velocity points , not freeslip
boundary points, velocity at these four corners is always zero.
I test the code on palabos v2.3.0 and latest version, they all give me the wrong result. Maybe there is something important I ignore, if someone can give some suggestion, I will be very appreciated.
void cylinderSetup(
MultiBlockLattice2D<T, DESCRIPTOR> &lattice, IncomprFlowParam<T> const ¶meters,
OnLatticeBoundaryCondition2D<T, DESCRIPTOR> &boundaryCondition)
{
const plint nx = parameters.getNx();
const plint ny = parameters.getNy();
Box2D inlet(0, 0, 1, ny - 2);
Box2D outlet(nx - 1, nx - 1, 1, ny - 2);
Box2D bottomWall(0, nx - 1, 0, 0);
Box2D topWall(0, nx - 1, ny - 1, ny - 1);
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, inlet);
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, outlet, boundary::neumann);
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, bottomWall, boundary::freeslip);
boundaryCondition.setVelocityConditionOnBlockBoundaries(lattice, topWall, boundary::freeslip);
setBoundaryVelocity(lattice, inlet, Array<T, 2>(0.01, 0.));
initializeAtEquilibrium(
lattice, lattice.getBoundingBox(), 1.0, Array<T, 2>(0.01, 0.));
lattice.initialize();
}
Best regrads