High memory usage when using TriMesh on geometry comprised of hundreds of thousands of surfaces

Hello all,

I’ve recently run up against an issue with high memory usage and failure to mesh for models with large numbers of surfaces.

My model is built by creating many small triangular surfaces, then creating volumes from those surfaces, resulting in volumes with 10,000-100,000 surfaces or so each, for up to around 500,000 surfaces in the model.

I then do the various steps of the dagmc workflow to assign materials and such, then try to use Trimesh with coarse mesh settings enabled. As the number of surfaces increases, however, I start to have issues with memory. I’m curious if anyone knows of tricks to improve meshing performance in this sort of scenario. Happy to answer questions and give more information as needed.

For context, here is a pic of a model that I would like to mesh

Hi @Edgar21,
building small triangle surfaces doesn’t sound efficient for BREP. The faceted based geometry was designed for this.

Are you building the whole geometry in cubit?

Just the volumes within the faceted surface visible in the screengrab. The small volumes on the periphery are built elsewhere and imported.

Is it possible to have BREP and faceted geometry in the same session?

The workflow currently involves generating the inner components in cubit, and saving to a file. Then importing both in the inner and outer components. A brief read of the documentations makes me think I should save the inner components as exodus or STL files?

Yes it is possible to use both engines.

for example: the left part is an imported stl file. Cubit handles those with the facet geometry engine while the brick was created in cubit using the acis engine.

Why don’t you save the inner geometry as .cub5? You could open the .cub5 and then import the missing outer components.