Error meshing CAD geometry

Hi all. Ran into an issue simulating CAD geometry from Space Claim. I’m using the CAD_to_h5m package made by @Shimwell to perform the meshing, but I ran into the following error:


I assume this might indicate a geometry problem but I ran the check geometry function on Space Claim and checked for gaps and nothing showed up. I’m attaching the model and script:
SCLL_blanket_CAD.py (2.3 KB)
image

The model is simply a SiC structure and a LiPb volume.

Interestingly enough, everything ran perfectly smoothly without the volume (just the SiC structure):
SiC_channel_working.py (3.2 KB)

I’d appreciate any pointers. Thanks

thanks for letting me know, would it be possible to try this package instead

fusion-energy/cad_to_dagmc: Convert CAD geometry (STP or Brep files), Cadquery assemblies and vertices to DAGMC h5m files (github.com)

it is the successor to cad-to-h5m

Apolagies, that was the package I was using. I’m running in the neutronics workshop docker container, and used :

pip install cad_to_dagmc
from cad_to_dagmc import CadToDagmc

my_model = CadToDagmc()
# the d and c from the word dagmc would be tagged with one material and the agm are tagged with another material
my_model.add_stp_file(
    "blanket_done2.stp", material_tags=['SiC', 'breed']
)
my_model.export_dagmc_h5m_file()

Ah that is my fault. I finally got cad_to_dagmc working just last week. Now i need to update the neutronics_workshop and paramak and a few other things.

ah right ok. It was working fine earlier this week when I was simulating just the shell without the volume. Do you know what the issue could be? And how I can fix it? I know there’s a variety of options I could try such as Stellarmesh but my project finishes on Tuesday so not a huge amount of time to get new things installed and working :sweat_smile:

Update: the volume on its own also runs fine. Seems to be an issue only when I run the two together

Unfortunately working just as the shell or just as the volume is not quite the same thing as it all working together as there are shared surfaces. Cad_to_dagmc version 0.5.0 or above should merge these surfaces before meshing them but this is another step that you would not have in the individual cases.

It could be the case that the cad overlaps.

But this does appear to be an issue that gmsh is finding it difficult to mesh the provided cad

  • You could try cleaning / healing the cad.
  • check the version of cad-to-dagmc is 0.5.0 or newer
  • You could try manually meshing with gmesh
  • You could reaching out to the gmsh community to get some meshing help

Thanks very much for your suggestions. I checked and it was using CAD_to_dagmc 0.4.0 - I updated to 0.5.0 bit it still throws the same error. I’ll have a look at alternate meshing options :sleepy:

Hi @Stefan, you’re also welcome to try GitHub - Thea-Energy/stellarmesh: DAGMC Geometry Creator, the other working DAGMC mesh creator that I’ve developed.

It would look something like this:

import stellarmesh as sm
geom = sm.Geometry.import_step(filename, material_names)
# geom = geom.imprint() only if you have partial shared faces
mesh = sm.Mesh.mesh_geometry(geom, max_mesh_size=...)
# mesh.write(mesh_filename) for mesh debugging
h5m = sm.MOABModel.make_from_mesh(mesh)
h5m.write(filename)

If you give it a try and run into issues I’d be happy to help debug given an example .step file.

Cheers!

1 Like

Hi, thanks for your reply. I gave Stellarmesh a go yesterday (very cool package), but ran into an issue importing the stp file. It read the file fine but didn’t correctly assign solid status to the geometry, such that when I called

mesh = sm.Mesh.mesh_geometry(geom, max_mesh_size=...)

I got the error ‘geometry has no attribute solid’. I raised this on the github page here. I’d appreciate any advice on how to fix this! I had a look at the source code, and tried changing some lines, even directly calling build123d to assign solid status manually, and then specifying material names, but I couldn’t get it to work. I managed to assign solid status but it didn’t match up with material names; I think I did it wrong (I’m not the best coder despite seemingly always ending up with coding projects). I can’t send step files over here but if you’re willing I’d happily send it another way!

Update on the CAD_to_dagmc: it appears the issue might be due to the gmsh not being updated - see here and here. Not sure if there’s a way for me to specify which version of gmsh to use from within the neutronics workshop docker container I’m coding in?

Additionally, I tried using CAD_to_OpenMC by pip installing into the jupyter notebook within the docker workshop. The meshing seemed to work fine (despite, I believe, having the same meshing backend of gmsh?), but the kernel dies before giving me the h5m file which I believe means the kernel runs out of memory :melting_face:

Sure you can install different versions of gmsh in the docker container.

Use the ! In jupyter notebook to run a terminal command like !conda install gmsh to install specifc versions try conda install 'gmsh>=4.11.1'

You might also check which version is currently installed.

import gmsh
print(gmsh.__version__)

I’m not sure if the cad_to_openmc backend uses gmsh as it used cadquery to facetet the geometry at one point. It might depend how you use it

1 Like

Hi Stefan, you’re welcome to send me your .stp files privately at akoen23@thea.energy—I’d be super keen to try stellarmesh out with another user’s workflow. There could well be bugs that I need to iron out.

1 Like

Amazing, thanks! I’ve sent an email with the stp file - let me know if it doesn’t arrive.

Thanks. I checked and the version is 4.11.1 so likely not a matter of updating after all, unfortunately.

@Stefan I believe the error you were encountering with stellarmesh was a syntax error.

This code assigns geometry to the type Geometry, not an instance of the geometry class (import_step is a classmethod i.e. constructor that returns a Geometry object).

import build123d as bd
import stellarmesh as sm
geometry = sm.Geometry # geometry is set to the type Geometry
geometry.import_step(filename='blanket_both.stp', material_names=['SiC', 'breed']) # this line returns what you want
mesh = sm.Mesh.mesh_geometry(geometry, min_mesh_size=10, max_mesh_size=50) # uses geometry from line 3!

This small fix works on my machine. Please let me know if this works for you as it would be great to know if @Shimwell and I need to specify a minimum version of Gmsh in our dependencies. And don’t worry if it was a mistake! I’ll send over some screenshots and let me know if you need help with anything else.

import build123d as bd
import stellarmesh as sm
geometry = sm.Geometry.import_step(filename='blanket_both.stp', material_names=['SiC', 'breed'])
mesh = sm.Mesh.mesh_geometry(geometry, min_mesh_size=10, max_mesh_size=50)
mesh.write("test.msh")
h5m = sm.MOABModel.make_from_mesh(mesh)
h5m.write("dagmc.h5m")
1 Like

That being said, when running overlap_check on the resulting dagmc.h5m file I get a number of warnings:

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 132508:
Global id = -1
Coordinates: (-4270.85, 0, -6575.06)
  Adjacencies:
   Edge 366218, Edge 366219, Edge 366223, Edge 366224
   Tri 233935, Tri 233937, Tri 233938
  Explicit adjacencies: Edge 366218, Edge 366219, Edge 366223, Edge 366224, Tri 233935, Tri 233937, Tri 233938
Dense tags:
  GLOBAL_ID = -1 

I haven’t encountered these before. Your geometry is quite complex and I would be very interested in figuring out what’s going on. @Shimwell would be a great resource if you’d be able to share your model with him and it could be made to work with cad-to-dagmc.

Cheers!

1 Like

Thanks! Looks like it’s working; my geometry is now meshing. It’s taking a very long time (~3hr so far, 60% finished) even on a course mesh (min_mesh_size=50, max_mesh_size=50). Is this usual? And any ideas whether I can speed this up?

Edit: installed Stellarmesh on my mac and ran through terminal (as opposed to Jupyter notebook in a docker container on my windows). Ran very quickly, no errors during meshing!
I ran overlap check and had the same result as you - here’s the full result (quite long)

(openmc-env) sr@Ss-MacBook-Air ~ % overlap_check /Users/sr/dagmc.h5m
NOTICE: 
	Performing overlap check using triangle vertex locations only.
	Use the '-p' option to check more points on the triangle edges.
	Run '$ overlap_check --help' for more information.

Running overlap check:
error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 107:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6756)
  Adjacencies:
   Edge 297, Edge 299, Edge 337
   Tri 142, Tri 186
  Explicit adjacencies: Edge 297, Edge 299, Edge 337, Tri 142, Tri 186
Dense tags:
  GLOBAL_ID = -1 

Vertex 108:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6776)
  Adjacencies:
   Edge 295, Edge 296, Edge 337
   Tri 141, Tri 186
  Explicit adjacencies: Edge 295, Edge 296, Edge 337, Tri 141, Tri 186
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 167963:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6776)
  Adjacencies:
   Edge 467515, Edge 467517, Edge 467641
   Tri 299814, Tri 299865
  Explicit adjacencies: Edge 467515, Edge 467517, Edge 467641, Tri 299814, Tri 299865
Dense tags:
  GLOBAL_ID = -1 

Vertex 167962:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6756)
  Adjacencies:
   Edge 467588, Edge 467589, Edge 467641
   Tri 299838, Tri 299865
  Explicit adjacencies: Edge 467588, Edge 467589, Edge 467641, Tri 299838, Tri 299865
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 183:
Global id = -1
Coordinates: (-4774.93, 5.84761e-13, -6956)
  Adjacencies:
   Edge 443, Edge 445, Edge 471
   Tri 222, Tri 261
  Explicit adjacencies: Edge 443, Edge 445, Edge 471, Tri 222, Tri 261
Dense tags:
  GLOBAL_ID = -1 

Vertex 182:
Global id = -1
Coordinates: (-4774.93, 5.84761e-13, -6976)
  Adjacencies:
   Edge 441, Edge 442, Edge 471
   Tri 221, Tri 261
  Explicit adjacencies: Edge 441, Edge 442, Edge 471, Tri 221, Tri 261
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 961:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 1909, Edge 1911, Edge 1935
   Tri 1016, Tri 1030
  Explicit adjacencies: Edge 1909, Edge 1911, Edge 1935, Tri 1016, Tri 1030
Dense tags:
  GLOBAL_ID = -1 

Vertex 960:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 1909, Edge 1910, Edge 1934
   Tri 1016, Tri 1029
  Explicit adjacencies: Edge 1909, Edge 1910, Edge 1934, Tri 1016, Tri 1029
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 199484:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 557421, Edge 557422, Edge 557445
   Tri 358279, Tri 358292
  Explicit adjacencies: Edge 557421, Edge 557422, Edge 557445, Tri 358279, Tri 358292
Dense tags:
  GLOBAL_ID = -1 

Vertex 199485:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 557420, Edge 557422, Edge 557446
   Tri 358279, Tri 358293
  Explicit adjacencies: Edge 557420, Edge 557422, Edge 557446, Tri 358279, Tri 358293
Dense tags:
  GLOBAL_ID = -1 

  3% |=>                                                              |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11462:
Global id = -1
Coordinates: (-4367.1, 0, 6424.04)
  Adjacencies:
   Edge 25706, Edge 25707, Edge 25708, Edge 25712
   Tri 14628, Tri 14629, Tri 14631
  Explicit adjacencies: Edge 25706, Edge 25707, Edge 25708, Edge 25712, Tri 14628, Tri 14629, Tri 14631
Dense tags:
  GLOBAL_ID = -1 

Vertex 11449:
Global id = -1
Coordinates: (-4341.18, 0, 6464.79)
  Adjacencies:
   Edge 25710, Edge 25711, Edge 25712, Edge 25713
   Tri 14630, Tri 14631, Tri 14632
  Explicit adjacencies: Edge 25710, Edge 25711, Edge 25712, Edge 25713, Tri 14630, Tri 14631, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

 12% |=======>                                                        |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 961:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 1909, Edge 1911, Edge 1935
   Tri 1016, Tri 1030
  Explicit adjacencies: Edge 1909, Edge 1911, Edge 1935, Tri 1016, Tri 1030
Dense tags:
  GLOBAL_ID = -1 

Vertex 960:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 1909, Edge 1910, Edge 1934
   Tri 1016, Tri 1029
  Explicit adjacencies: Edge 1909, Edge 1910, Edge 1934, Tri 1016, Tri 1029
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 199484:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 557421, Edge 557422, Edge 557445
   Tri 358279, Tri 358292
  Explicit adjacencies: Edge 557421, Edge 557422, Edge 557445, Tri 358279, Tri 358292
Dense tags:
  GLOBAL_ID = -1 

Vertex 199485:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 557420, Edge 557422, Edge 557446
   Tri 358279, Tri 358293
  Explicit adjacencies: Edge 557420, Edge 557422, Edge 557446, Tri 358279, Tri 358293
Dense tags:
  GLOBAL_ID = -1 

 29% |==================>                                             |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11462:
Global id = -1
Coordinates: (-4367.1, 0, 6424.04)
  Adjacencies:
   Edge 25706, Edge 25707, Edge 25708, Edge 25712
   Tri 14628, Tri 14629, Tri 14631
  Explicit adjacencies: Edge 25706, Edge 25707, Edge 25708, Edge 25712, Tri 14628, Tri 14629, Tri 14631
Dense tags:
  GLOBAL_ID = -1 

Vertex 11449:
Global id = -1
Coordinates: (-4341.18, 0, 6464.79)
  Adjacencies:
   Edge 25710, Edge 25711, Edge 25712, Edge 25713
   Tri 14630, Tri 14631, Tri 14632
  Explicit adjacencies: Edge 25710, Edge 25711, Edge 25712, Edge 25713, Tri 14630, Tri 14631, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

 36% |======================>                                         |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 183:
Global id = -1
Coordinates: (-4774.93, 5.84761e-13, -6956)
  Adjacencies:
   Edge 443, Edge 445, Edge 471
   Tri 222, Tri 261
  Explicit adjacencies: Edge 443, Edge 445, Edge 471, Tri 222, Tri 261
Dense tags:
  GLOBAL_ID = -1 

Vertex 182:
Global id = -1
Coordinates: (-4774.93, 5.84761e-13, -6976)
  Adjacencies:
   Edge 441, Edge 442, Edge 471
   Tri 221, Tri 261
  Explicit adjacencies: Edge 441, Edge 442, Edge 471, Tri 221, Tri 261
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 183:
Global id = -1
Coordinates: (-4774.93, 5.84761e-13, -6956)
  Adjacencies:
   Edge 443, Edge 445, Edge 471
   Tri 222, Tri 261
  Explicit adjacencies: Edge 443, Edge 445, Edge 471, Tri 222, Tri 261
Dense tags:
  GLOBAL_ID = -1 

Vertex 182:
Global id = -1
Coordinates: (-4774.93, 5.84761e-13, -6976)
  Adjacencies:
   Edge 441, Edge 442, Edge 471
   Tri 221, Tri 261
  Explicit adjacencies: Edge 441, Edge 442, Edge 471, Tri 221, Tri 261
Dense tags:
  GLOBAL_ID = -1 

 41% |=========================>                                      |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

 45% |============================>                                   |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 167963:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6776)
  Adjacencies:
   Edge 467515, Edge 467517, Edge 467641
   Tri 299814, Tri 299865
  Explicit adjacencies: Edge 467515, Edge 467517, Edge 467641, Tri 299814, Tri 299865
Dense tags:
  GLOBAL_ID = -1 

Vertex 167962:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6756)
  Adjacencies:
   Edge 467588, Edge 467589, Edge 467641
   Tri 299838, Tri 299865
  Explicit adjacencies: Edge 467588, Edge 467589, Edge 467641, Tri 299838, Tri 299865
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 107:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6756)
  Adjacencies:
   Edge 297, Edge 299, Edge 337
   Tri 142, Tri 186
  Explicit adjacencies: Edge 297, Edge 299, Edge 337, Tri 142, Tri 186
Dense tags:
  GLOBAL_ID = -1 

Vertex 108:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6776)
  Adjacencies:
   Edge 295, Edge 296, Edge 337
   Tri 141, Tri 186
  Explicit adjacencies: Edge 295, Edge 296, Edge 337, Tri 141, Tri 186
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 167963:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6776)
  Adjacencies:
   Edge 467515, Edge 467517, Edge 467641
   Tri 299814, Tri 299865
  Explicit adjacencies: Edge 467515, Edge 467517, Edge 467641, Tri 299814, Tri 299865
Dense tags:
  GLOBAL_ID = -1 

Vertex 167962:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6756)
  Adjacencies:
   Edge 467588, Edge 467589, Edge 467641
   Tri 299838, Tri 299865
  Explicit adjacencies: Edge 467588, Edge 467589, Edge 467641, Tri 299838, Tri 299865
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 107:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6756)
  Adjacencies:
   Edge 297, Edge 299, Edge 337
   Tri 142, Tri 186
  Explicit adjacencies: Edge 297, Edge 299, Edge 337, Tri 142, Tri 186
Dense tags:
  GLOBAL_ID = -1 

Vertex 108:
Global id = -1
Coordinates: (-4777.4, 5.85075e-13, -6776)
  Adjacencies:
   Edge 295, Edge 296, Edge 337
   Tri 141, Tri 186
  Explicit adjacencies: Edge 295, Edge 296, Edge 337, Tri 141, Tri 186
Dense tags:
  GLOBAL_ID = -1 

 46% |============================>                                   |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 182617:
Global id = -1
Coordinates: (-7097.81, 0, -33.7928)
  Adjacencies:
   Edge 505736, Edge 505737, Edge 523014, Edge 524367
   Tri 323345, Tri 335336, Tri 336838
  Explicit adjacencies: Edge 505736, Edge 505737, Edge 523014, Edge 524367, Tri 323345, Tri 335336, Tri 336838
Dense tags:
  GLOBAL_ID = -1 

Vertex 178444:
Global id = -1
Coordinates: (-7097.88, 0, 16.0699)
  Adjacencies:
   Edge 505735, Edge 505737, Edge 521929, Edge 523516
   Tri 323345, Tri 334362, Tri 335789
  Explicit adjacencies: Edge 505735, Edge 505737, Edge 521929, Edge 523516, Tri 323345, Tri 334362, Tri 335789
Dense tags:
  GLOBAL_ID = -1 

 49% |==============================>                                 |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 182617:
Global id = -1
Coordinates: (-7097.81, 0, -33.7928)
  Adjacencies:
   Edge 505736, Edge 505737, Edge 523014, Edge 524367
   Tri 323345, Tri 335336, Tri 336838
  Explicit adjacencies: Edge 505736, Edge 505737, Edge 523014, Edge 524367, Tri 323345, Tri 335336, Tri 336838
Dense tags:
  GLOBAL_ID = -1 

Vertex 178444:
Global id = -1
Coordinates: (-7097.88, 0, 16.0699)
  Adjacencies:
   Edge 505735, Edge 505737, Edge 521929, Edge 523516
   Tri 323345, Tri 334362, Tri 335789
  Explicit adjacencies: Edge 505735, Edge 505737, Edge 521929, Edge 523516, Tri 323345, Tri 334362, Tri 335789
Dense tags:
  GLOBAL_ID = -1 

 53% |=================================>                              |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 961:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 1909, Edge 1911, Edge 1935
   Tri 1016, Tri 1030
  Explicit adjacencies: Edge 1909, Edge 1911, Edge 1935, Tri 1016, Tri 1030
Dense tags:
  GLOBAL_ID = -1 

Vertex 960:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 1909, Edge 1910, Edge 1934
   Tri 1016, Tri 1029
  Explicit adjacencies: Edge 1909, Edge 1910, Edge 1934, Tri 1016, Tri 1029
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 199484:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 557421, Edge 557422, Edge 557445
   Tri 358279, Tri 358292
  Explicit adjacencies: Edge 557421, Edge 557422, Edge 557445, Tri 358279, Tri 358292
Dense tags:
  GLOBAL_ID = -1 

Vertex 199485:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 557420, Edge 557422, Edge 557446
   Tri 358279, Tri 358293
  Explicit adjacencies: Edge 557420, Edge 557422, Edge 557446, Tri 358279, Tri 358293
Dense tags:
  GLOBAL_ID = -1 

 57% |===================================>                            |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 214640:
Global id = -1
Coordinates: (-7077.82, -20, 24.9888)
  Adjacencies:
   Edge 598093, Edge 598094, Edge 607056, Edge 608364
   Tri 381604, Tri 388941, Tri 390121
  Explicit adjacencies: Edge 598093, Edge 598094, Edge 607056, Edge 608364, Tri 381604, Tri 388941, Tri 390121
Dense tags:
  GLOBAL_ID = -1 

Vertex 214639:
Global id = -1
Coordinates: (-7077.82, -20, -24.9888)
  Adjacencies:
   Edge 598092, Edge 598094, Edge 601880, Edge 602053
   Tri 381604, Tri 384341, Tri 384483
  Explicit adjacencies: Edge 598092, Edge 598094, Edge 601880, Edge 602053, Tri 381604, Tri 384341, Tri 384483
Dense tags:
  GLOBAL_ID = -1 

 59% |=====================================>                          |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 214640:
Global id = -1
Coordinates: (-7077.82, -20, 24.9888)
  Adjacencies:
   Edge 598093, Edge 598094, Edge 607056, Edge 608364
   Tri 381604, Tri 388941, Tri 390121
  Explicit adjacencies: Edge 598093, Edge 598094, Edge 607056, Edge 608364, Tri 381604, Tri 388941, Tri 390121
Dense tags:
  GLOBAL_ID = -1 

Vertex 214639:
Global id = -1
Coordinates: (-7077.82, -20, -24.9888)
  Adjacencies:
   Edge 598092, Edge 598094, Edge 601880, Edge 602053
   Tri 381604, Tri 384341, Tri 384483
  Explicit adjacencies: Edge 598092, Edge 598094, Edge 601880, Edge 602053, Tri 381604, Tri 384341, Tri 384483
Dense tags:
  GLOBAL_ID = -1 

 62% |=======================================>                        |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 11466:
Global id = -1
Coordinates: (-4315.23, 0, 6505.53)
  Adjacencies:
   Edge 25647, Edge 25648, Edge 25713
   Tri 14599, Tri 14632
  Explicit adjacencies: Edge 25647, Edge 25648, Edge 25713, Tri 14599, Tri 14632
Dense tags:
  GLOBAL_ID = -1 

Vertex 11433:
Global id = -1
Coordinates: (-4289.25, 0, 6546.24)
  Adjacencies:
   Edge 25646, Edge 25648
   Tri 14599
  Explicit adjacencies: Edge 25646, Edge 25648, Tri 14599
Dense tags:
  GLOBAL_ID = -1 

 90% |========================================================>       |+error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 961:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 1909, Edge 1911, Edge 1935
   Tri 1016, Tri 1030
  Explicit adjacencies: Edge 1909, Edge 1911, Edge 1935, Tri 1016, Tri 1030
Dense tags:
  GLOBAL_ID = -1 

Vertex 960:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 1909, Edge 1910, Edge 1934
   Tri 1016, Tri 1029
  Explicit adjacencies: Edge 1909, Edge 1910, Edge 1934, Tri 1016, Tri 1029
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 199484:
Global id = -1
Coordinates: (-5635.59, -152.103, 2962.09)
  Adjacencies:
   Edge 557421, Edge 557422, Edge 557445
   Tri 358279, Tri 358292
  Explicit adjacencies: Edge 557421, Edge 557422, Edge 557445, Tri 358279, Tri 358292
Dense tags:
  GLOBAL_ID = -1 

Vertex 199485:
Global id = -1
Coordinates: (-5621.59, -164.132, 2994.13)
  Adjacencies:
   Edge 557420, Edge 557422, Edge 557446
   Tri 358279, Tri 358293
  Explicit adjacencies: Edge 557420, Edge 557422, Edge 557446, Tri 358279, Tri 358293
Dense tags:
  GLOBAL_ID = -1 

100% |===============================================================>|+
Overlap locations found: 1
Overlap Location: -5727.62 1051.26 -4341.33
Overlapping volumes: 0 1 

Although it also says it’s watertight when I ran check_watertight. I’ll run a simulation and see if it works.

Great to hear! Yes, it should run quite quickly (on my Mac it takes ~40s). Docker on non-linux hosts can be painfully slow. Again, I’ll keep looking in to those warnings as they’re new to me and maybe @Shimwell can provide some of his expertise. I also expect to be publishing a new version of Stellarmesh quite soon with a Pypi release.

1 Like

I guess with all these warnings being printed we might see some particles lost during the transport simulation.

@akoen I ran a simulation on the h5m file stellarmesh produced, and the simulation failed. The same errors I saw in the meshing process showed up in OpenMC so I assume it didn’t like the geometry:

Simulating batch 1
error: edge of a manifold must be topologically adjacent to exactly 2 triserror: edge of a manifold must be topologically adjacent to exactly 2 triserror: edge of a manifold must be topologically adjacent to exactly 2 tris
error: edge of a manifold must be topologically adjacent to exactly 2 triserror: edge of a manifold must be topologically adjacent to exactly 2 triserror: edge of a manifold must be topologically adjacent to exactly 2 triserror: edge of a manifold must be topologically adjacent to exactly 2 triserror: edge of a manifold must be topologically adjacent to exactly 2 tris
error: edge of a manifold must be topologically adjacent to exactly 2 tris

error: edge of a manifold must be topologically adjacent to exactly 2 triserror: edge of a manifold must be topologically adjacent to exactly 2 tris


error: edge of a manifold must be topologically adjacent to exactly 2 tris


error: edge of a manifold must be topologically adjacent to exactly 2 tris

Vertex Vertex Vertex Vertex Vertex VertexVertex148638148638:148638148638
:VertexVertexVertex:
Vertex    :148638148638:148638:

Global id = -1
 148638:
Global id = Coordinates: (-1
Global id = -1

:

Global id = Global id = -1

Coordinates: (Coordinates: (148638:Vertex
 148638:-5997.83
-5997.83, , 0Vertex, 0148638, -5997.83-11065.89)
1065.89Global id = Global id = -1-1
)
Coordinates: (
 148638:Coordinates: (  Adjacencies:Global id = 
-1-5997.83,   Adjacencies:0Global id = 

Coordinates: (-5997.83, 0, , -5997.83, , 0, Coordinates: (1065.89)
-5997.83, Global id = -1
-1
1065.890)
  Adjacencies:1065.89 148638:
, Global id = Global id = -1
Coordinates: (Coordinates: (-5997.83, )0, 1065.89
)
  Adjacencies:
Coordinates: (-5997.83, 0, :1065.89)
-1  Adjacencies:
1065.89
)
Coordinates: (
-5997.83, -5997.83, 00Global id = , 

1065.89)
  Adjacencies:
-10, , 1065.89)
  Adjacencies:
  Adjacencies:Coordinates: (
-5997.83, 0, 1065.89)
  Adjacencies:
1065.89)
  Adjacencies:

Coordinates: (-5997.83, 0, 1065.89)
  Adjacencies:
  Adjacencies:

  Adjacencies:
error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 148638:
Global id = -1
Coordinates: (-5997.83, 0, 1065.89)
  Adjacencies:
(none)
(none)
(none)
Dense tags:
Dense tags:
  GLOBAL_ID = -1 

Vertex 150922:
Global id = -1
Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 148638:
  GLOBAL_ID = -1 

Vertex 150922:
Global id = -1
Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Global id = -1
Coordinates: (-5997.83, 0, 1065.89)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Vertex 150922:
Global id = -1
Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 148638:
Dense tags:
Global id = -1
  GLOBAL_ID = -1 

Vertex 150922:
Global id = -1
Coordinates: (Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
-5997.83, 0, 1065.89)
  Adjacencies:
Dense tags:
(none)
  GLOBAL_ID = -1 

Dense tags:
  GLOBAL_ID = -1 

Vertex 150922:
Global id = -1
Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 143434:
Global id = -1
Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Vertex 141248:
Global id = -1
Coordinates: (-5997.83, 0, 1065.89)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 143434:
Global id = -1
Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Vertex 141248:
Global id = -1
Coordinates: (-5997.83, 0, 1065.89)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Dense tags:
error: edge of a manifold must be topologically adjacent to exactly 2 tris  GLOBAL_ID = -1 


Vertex 143434:
Global id = -1
Coordinates: (-6006.62, 0, 1016.81)
  Adjacencies:
(none)
error: edge of a manifold must be topologically adjacent to exactly 2 trisDense tags:
  GLOBAL_ID = -1 

Vertex 141248:
Global id = -1
Coordinates: (-5997.83, 0, 1065.89)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 


Vertex 276792:
error: edge of a manifold must be topologically adjacent to exactly 2 trisGlobal id = -1
Coordinates: (-5981.07, 
0, 3616.27)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Vertex 276756:
Global id = -1
Coordinates: (-6001.19, 0, Vertex 143434:
Global id = -1
Coordinates: (-6006.62, 3572.920, )
1016.81)  Adjacencies:
(none)

  Adjacencies:
(none)
Dense tags:
Dense tags:
  GLOBAL_ID = -1 

  GLOBAL_ID = -1 

Vertex 141248:
Global id = -1
Coordinates: (-5997.83, 0, 1065.89)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 276792:
Global id = -1
Coordinates: (-5981.07, 0, 3616.27)
free(): invalid pointer
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Vertex 276756:
Global id = -1
Coordinates: (-6001.19, 0, 3572.92)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

free(): invalid size
error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 276792:
Global id = -1
Coordinates: (-5981.07, 0, 3616.27)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Vertex 276756:
Global id = -1
Coordinates: (-6001.19, 0, 3572.92)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

error: edge of a manifold must be topologically adjacent to exactly 2 tris
Vertex 266393:
Global id = -1
Coordinates: (-6019.02, 0, 3486)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

Vertex 266485:
Global id = -1
Coordinates: (-5999.16, 0, 3529.49)
  Adjacencies:
(none)
Dense tags:
  GLOBAL_ID = -1 

free(): invalid size
free(): invalid size
free(): invalid size
free(): invalid size
free(): invalid size

I tried using a finer mesh but no difference. I’ve since made some changes to the SpacClaim geometry (removing duplicate lines etc) to try and simplify/clean the model and will give it another go - will keep you posted