STL construction

Hi all,

base on the externalFlowAroundObstacle code provide in the showcase examples, I try to change the obstacle shape placed in the domain, by providing an other STL file describing a more complex obstacle. I make the change in the XML file by giving the name of the new STL file containing the new obstacle, I did not changed anything else.
At runtime, I got an error:

“Reading STL data for the obstacle geometry.
externalFlowAroundObstacle: /home/epoizot/Applications/palabos/src/offLattice/triangleToDef.hh:390: plb::plint plb::TriangleToDef::createEdgeTable() [with T = double; plb::plint = long int]: Assertion `false’ failed.”

This occured in the code when executing the following line:
DEFscaledMesh defMesh(triangleSet, 0, xDirection, margin, Dot3D(0, 0, 0));

I had a look in the documentation, but nothing really precise on how to use this function differently.
Does anyone have an idea of what could be done to turn around the runtime error ?

Thanks

E. Poizot

Dear epzt,

Depending on the method used, Palabos tries to understand the topology of the triangle mesh provided in an STL file. In such cases, the STL mesh must be “manifold”. This roughly means that the the mesh is “topologically correct” and Palabos can understand what is “inside the mesh” and what is “outside of the mesh”. The error that you have most probably indicates that the mesh contained in your STL file is non-manifold. Maybe you have more than two triangles meeting on an edge, or something like that.

Best,
Dimitris

Ok, thanks for that.
I will try to check if there are no such errors.
I also have an question about STL and Palabos: is it not a relation between the STL complexity and the LBM domain precision ?
Regards

E. Poizot

So, when you use a triangular mesh from an STL file with a “Guo” off-lattice boundary condition, then the STL geometry plays no role in the accuracy of the results. When you use a triangular mesh from an STL file with the Immersed Boundary method, then for accuracy reasons, you should make sure that the maximum edge between all triangles of your mesh is roughly the same size as your lattice dx.

Best,
Dimitris

Hi Dimitris,

so if I understand, the most simple way is to use the “Guo” off latice approach, as it gets rid of the lattice dx. Is that right ?

Regards

E. poizot

This is not entirely correct, since the immersed boundary method has also other advantages. The most profound advantage is that with the immersed boundary method you can solve for moving boundaries inside the fluid flow:

http://www.palabos.org/gallery/moving-objects/70-oscillating-surface

The Guo is a very robust boundary condition that provides also very accurate results for non-moving geometries. Depending on your problem you should decide which boundary condition fits you best.

If the STL file contains a manifold mesh, then you can easily refine it with Palabos by calling the “refine” function of the “TriangleSet” class (see the file “src/offLattice/triangleSet.h”). The new release of Palabos that will come out soon, will have also other functions to do recursive local refinement of triangular surface meshes.

Best,
Dimitris

Hi Dimitris,

thanks for that very helpful information.
A pity that such information is not more easily available on Palabos :slight_smile:
Regards

E. Poizot