Skip to content

Reply To: About the distance between the boundary node and stl in “setBouzidiBoundary”

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics About the distance between the boundary node and stl in “setBouzidiBoundary” Reply To: About the distance between the boundary node and stl in “setBouzidiBoundary”

#7986
Adrian
Keymaster

Ok, so the main changes are A) the characteristic length and B) the STL file?

This difference between expected distance and some lattice positions could be caused by the different approaches being used to evaluate the STL for geometry construction: The material geometry only considers whether the cell position is “inside” the STL (evaluated via the underlying Octree in STLreader::operator()) while the distance between a given position and the STL-defined surface along a given direction (which is what the Bouzidi setter uses) is done via a different approach in STLreader::distance (ray tracing and additional handling of boundary cases).

In general matching STL meshes and LBM lattices is a non-trivial problem. For a quick workaround you can e.g. tweak the discretization width and the shift between mesh and STL origin. We can take a look at your exact setup and figure out a more general solution together.