Error - Divide by Zero When Setting up Train Domain from STL File

Hello, I am attempting to create a simple simulation of flow through a cylindrical pipe. I am following a methodology similar to the aneurysm tutorial. I receive a “divide by zero” error when the script tries to initialize the inlet face in the training domain.

I have attached a copy of my inlet geometry file, the modified python script, and the error message. I suspect the error might have something to do with the way the STL files are constructed, as I have gotten this code to work with different (albeit worse) meshes.
Note: there are 3 more geometry files (outlet, walls, and closed) that I am unable to attach to this post due to link limits.


inlet.stl (18.5 KB)
Code: (6.1 KB)
simnet_error_01 (1.1 KB)

Here are the remaining three geometry files:

closed.stl (185.2 KB)
outlet.stl (18.5 KB)
walls.stl (148.4 KB)

I think I had a similar issue before. I believe it might be due to the meshes being too small. When you specify the batch size per area to be 128, the mesh area is so small that no actual points are taken on the mesh, eventually causing a divide by zero error. The hotfix for me was increasing the hardcoded batch size per area. A better solution might be normalizing your geometries dimensions or basing the batch size per area off of the surface area/volume in question.


ateske92 is correct. This is the cause of the issue however we will look into providing an appropriate error message or work around. We suggest normalizing the geometry to fix this issue for now though.