Reply To: BounceBack boundary
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › BounceBack boundary › Reply To: BounceBack boundary
Thank you for your reply!
I agree with your idea.
Below is my code :
std::vector<int> unknownIndexes;
// east-top
// I change the oritation in self-defined sethalfbbboundary.hh
if(orientation == 8){
unknownIndexes = {3};
}
//east bottom
else if(orientation == -8){
unknownIndexes = {1};
}
// west top
else if(orientation == 9){
unknownIndexes = {5};
}
// west bottom
else if(orientation == -9){
unknownIndexes = {7};
}
else{
unknownIndexes = util::subIndexOutgoing<DESCRIPTOR, direction,
orientation>();
}
auto cell = blockLattice.get(x, y);
for (unsigned i = 0; i < unknownIndexes.size(); ++i) {
cell[unknownIndexes[i]] = cell.neighbor(descriptors::c<DESCRIPTOR>(unknownIndexes[i]))[util::opposite<DESCRIPTOR>(unknownIndexes[i])];
}
as in main function, I define solid boundaries nodynamics.