Reply To: Could not addVelocityBoundary
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Could not addVelocityBoundary › Reply To: Could not addVelocityBoundary
Referring to case “cylinder2d”, the adjustment is as follows:
previous code:
// create inflow
origin = { 0, 0 };
extend = { conversionLength, ly0-conversionLength };
olb::IndicatorCuboid2D<SimType> inflow( extend, origin );
superGeometry.rename( materialFluid, materialInflow, inflow );
// create outflow
origin = { lx0-conversionLength, 0 };
extend = { conversionLength, ly0-conversionLength };
olb::IndicatorCuboid2D<SimType> outflow( extend, origin);
superGeometry.rename( materialFluid, materialOutflow, outflow);
the adjusted code — version 1.0
// create inflow
origin = { -conversionLength, 0 };
extend = { conversionLength, ly0-conversionLength };
olb::IndicatorCuboid2D<SimType> inflow( extend, origin );
superGeometry.rename( materialFluid, materialInflow, inflow );
// create outflow
origin = { lx0-conversionLength, 0 };
extend = { 2*conversionLength, ly0-conversionLength };
olb::IndicatorCuboid2D<SimType> outflow( extend, origin);
superGeometry.rename( materialFluid, materialOutflow, outflow);
Error messages disappears.
the adjusted code — version 2.0
// create inflow
origin = { -conversionLength, 0 };
extend = { 2*conversionLength, ly0-conversionLength };
olb::IndicatorCuboid2D<SimType> inflow( extend, origin );
superGeometry.rename( materialFluid, materialInflow, inflow );
// create outflow
origin = { lx0-conversionLength, 0 };
extend = { 2*conversionLength, ly0-conversionLength };
olb::IndicatorCuboid2D<SimType> outflow( extend, origin);
superGeometry.rename( materialFluid, materialOutflow, outflow);
Error message appears.
But I compared the cloud images of the three programs, it looks like these three have the same result. And this result feels like a velocity boundary condition has been applied in the left inlet.
So my problems are:
1.This error “Could not addVelocityBoundary (2,3) …… (2,69)” is generally related to which situation, why can the first version solve this problem.
2.When we define geometry, why do we have a little extra region on the left and right?
I’d appreciate it if anyone could answer. If I don’t give a clear description, I can send the program to your email. Thank you very much!