Error when modifying stl file in External flow around an obstacle

Hey guys,

I’m pretty new to Palabos and I tried to adapt the stl file in the example so that it simulates the flow around two cubes. Unfortunately it gave the following error,

Caught exception in process 0. Palabos generic exception:
List of error messages (not chronological):
1) Error treating the geometry in the Guo off-lattice model.
2) Guo off-lattice model could not find an intersection with a triangle.

Does anyone know how to solve this error?

Thanks for reading.

1 Like

Hello,

this kind of error usually happens when the are malformed stl files. You can check your stl file with the utility provided by palabos that can be found in the directory:

$PALABOS_ROOT/utility/stl

There you compile the file stlCheck.cpp and run it like this for example:

./stlCheck DBL name_of_your_stl.stl

If it encouters any problems you can try to repare your stl with a tool like meshlab.

Hope it helps.

Best regards,
Orestis

Hi,

I used the stl check file as you asked and there doesn’t seem to be any problem.


./stlCheck DBL twin.stl
STL file to TriangleSet SUCCESSFUL!
The TriangleSet does not have any zero-area triangles.
The TriangleSet does not have a dependence on the floating point precision used.
TriangleSet:
    Number of triangles: 24
TriangleSet to ConnectedTriangleSet SUCCESSFUL!
ConnectedTriangleSet:
  Number of vertices : 16
  Number of triangles: 24
Computation of triangle areas and unit normals SUCCESSFUL!
Computation of vertex areas and unit normals SUCCESSFUL!
TriangleSet to DEFscaledMesh SUCCESSFUL!
DEFscaledMesh:
  Number of vertices : 16
  Number of triangles: 24
  Number of holes    : 0
DEFscaledMesh to TriangleBoundary3D SUCCESSFUL!
TriangleBoundary3D:
  Number of vertices : 16
  Number of triangles: 24

All checks SUCCESSFUL! 

I’m still receiving the same error when I run the simulation though. Maybe I have to edit the code so that it accepts two different obstacles?

Hi!

Did you find any solution to this? Because I am facing the same problem even with one box as the obstacle.

Thanks

Yes I did.

I changed the SmagorinskyBGKdynamics to SmagorinskyRegularizedDynamics which seems to let me simulate flows past more than one obstacle. Also I double checked the dimensions of the stl again and compared it to the obstacle stl to check if the dimensions are consistent.

Vinh

Hi Vinh

Thanks for the reply. I changed the dynamics to SmagorinskyRegularizedDynamics and because the box size was a bit on the larger side, I increased the size of full simulation domain to 10 times. I even checked them using ParaView and it looks fine. Even after this I am getting the following error:


Reading STL data for the obstacle geometry.
tau = 0.505267
dx = 0.113924
dt = 0.0227848
Number of iterations in an integral time scale: 43

Voxelizing the domain.
Size of the multi-block:     260-by-79-by-79
Number of atomic-blocks:     1
Smallest atomic-block:       260-by-79-by-79
Largest atomic-block:        260-by-79-by-79
Number of allocated cells:   1.62266 million
Fraction of allocated domain: 100 percent

Generating the lattice, the rhoBar and j fields.
Using Smagorinsky BGK dynamics.
Generating boundary conditions.
Periodic lateral boundaries.
Generating an outlet viscosity sponge zone.

Starting simulation.
At iteration 0, t = 0
Average kinetic energy over fluid density: E = 0

Writing VTK at time t = 0
Writing PPM image at time t = 0

Errors
------
Caught exception in process 0. Palabos generic exception:
  List of error messages (not chronological):
    1) Guo off-lattice model could not find an intersection with a triangle.


I think it might have to do with the location of the obstacle, try moving it back or modifying your stl. I had a similar problem and I fixed it by moving my obstacle in front of the origin rather than having the origin in the middle of obstacle.

Hi!

So basically, I have to play with the values of center in the following section of the xml file?

[code=“xml”]


Box_1.stl

10.45 4.55 4.55

False

False

29.5 9.0 9.0

Yes, try my other suggestions if that doesn’t work.

Hi!

I’m trying to implement the code (version 2) using a stl geometry from an OPENFOAM example called MotorBike, the geometry has a lot of triangles, and I can’t load the geometry to Palabos… when I try to check the geometry ($PALABOS_ROOT/utility/stl) found this:

Someone knows how I can fix the geometry?


Computation of the unit vertex normal failed for the vertex:
(1.35033, -0.125955, 0.3278)

WARNING: Number of veritces for which the computation of unit normals failed: 5594
The associated triangles are saved in the file badVertices.stl

stlCheck: /home/johan/Desktop/palabos-v2.0r0/src/offLattice/triangleToDef.hh:363: plb::plint plb::TriangleToDef::createEdgeTable() [with T = double; plb::plint = long int]: Assertion `false’ failed.
[johan-OptiPlex-740-Enhanced:23029] *** Process received signal ***
[johan-OptiPlex-740-Enhanced:23029] Signal: Aborted (6)
[johan-OptiPlex-740-Enhanced:23029] Signal code: (-6)
[johan-OptiPlex-740-Enhanced:23029] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f41de35f890]
[johan-OptiPlex-740-Enhanced:23029] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f41ddf9ae97]
[johan-OptiPlex-740-Enhanced:23029] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f41ddf9c801]
[johan-OptiPlex-740-Enhanced:23029] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f41ddf8c39a]
[johan-OptiPlex-740-Enhanced:23029] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f41ddf8c412]
[johan-OptiPlex-740-Enhanced:23029] [ 5] ./stlCheck(+0x1e5dc)[0x55aa3c6305dc]
[johan-OptiPlex-740-Enhanced:23029] [ 6] ./stlCheck(+0x21f6c)[0x55aa3c633f6c]
[johan-OptiPlex-740-Enhanced:23029] [ 7] ./stlCheck(+0x22197)[0x55aa3c634197]
[johan-OptiPlex-740-Enhanced:23029] [ 8] ./stlCheck(+0x2240b)[0x55aa3c63440b]
[johan-OptiPlex-740-Enhanced:23029] [ 9] ./stlCheck(+0x1020c)[0x55aa3c62220c]
[johan-OptiPlex-740-Enhanced:23029] [10] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f41ddf7db97]
[johan-OptiPlex-740-Enhanced:23029] [11] ./stlCheck(+0x1145a)[0x55aa3c62345a]
[johan-OptiPlex-740-Enhanced:23029] *** End of error message ***
Aborted (core dumped)

After try a filter to reorient coherently the surfaces this is the result:


STL file to TriangleSet SUCCESSFUL!
The TriangleSet does not have any zero-area triangles.
The TriangleSet does not have a dependence on the floating point precision used.
TriangleSet:
Number of triangles: 263367
TriangleSet to ConnectedTriangleSet SUCCESSFUL!
ConnectedTriangleSet:
Number of vertices : 132864
Number of triangles: 263367
Computation of triangle areas and unit normals SUCCESSFUL!
Computation of vertex areas and unit normals SUCCESSFUL!
There is a problem with the boundary of the triangular surface mesh.
The problematic vertex is: [0.0837448, 0.224525, 0.911611]

Did you try to correct the stl with a software like meshlab?

Hi Orestis!

Yes I use Meshlab to reorient the normal of the surface faces coherently … Seems that work but now I have this problematic vertex.

What kind of operations do you recommend to prepare the geometry in meshlab? All recommendations are welcome…

Why I have this kind of errors with the Palabos stl.checker tool? Seems that I can’t obtain the log file…

stlCheck: /home/johan/Desktop/palabos-v2.0r0/src/offLattice/triangleToDef.hh:363: plb::plint plb::TriangleToDef::createEdgeTable() [with T = double; plb::plint = long int]: Assertion `false’ failed.
[johan-OptiPlex-740-Enhanced:23029] *** Process received signal ***
[johan-OptiPlex-740-Enhanced:23029] Signal: Aborted (6)
[johan-OptiPlex-740-Enhanced:23029] Signal code: (-6)
[johan-OptiPlex-740-Enhanced:23029] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f41de35f890]
[johan-OptiPlex-740-Enhanced:23029] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f41ddf9ae97]
[johan-OptiPlex-740-Enhanced:23029] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f41ddf9c801]
[johan-OptiPlex-740-Enhanced:23029] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f41ddf8c39a]
[johan-OptiPlex-740-Enhanced:23029] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f41ddf8c412]
[johan-OptiPlex-740-Enhanced:23029] [ 5] ./stlCheck(+0x1e5dc)[0x55aa3c6305dc]
[johan-OptiPlex-740-Enhanced:23029] [ 6] ./stlCheck(+0x21f6c)[0x55aa3c633f6c]
[johan-OptiPlex-740-Enhanced:23029] [ 7] ./stlCheck(+0x22197)[0x55aa3c634197]
[johan-OptiPlex-740-Enhanced:23029] [ 8] ./stlCheck(+0x2240b)[0x55aa3c63440b]
[johan-OptiPlex-740-Enhanced:23029] [ 9] ./stlCheck(+0x1020c)[0x55aa3c62220c]
[johan-OptiPlex-740-Enhanced:23029] [10] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f41ddf7db97]
[johan-OptiPlex-740-Enhanced:23029] [11] ./stlCheck(+0x1145a)[0x55aa3c62345a]
[johan-OptiPlex-740-Enhanced:23029] *** End of error message ***
Aborted (core dumped)

Well I don’t really know… Try more or less everything :smiley: