Hi Everyone,
Please correct me if I’m wrong, but as far as I can tell, there is no way to detect duplicate surfaces in a geometry. This has caused a few problems in situations where I’ve created different regions that happen to share a similar dimension. It makes more sense in terms of the modularity of building the model to instantiate two separate (but identical) surfaces. This causes max_event errors in my simulations. I checked this by editing the geometry.xml to remove one of the redundant surfaces and everything works. Is there some other way I should be handling this situation or has anybody written any code to “clean” a geometry that they would be willing to submit as a PR. If not I’ll open an issue.
Cheers,
Ethan
Hi Ethan,
I recommend running your case in geomtery debugging mode, something like this “openmc -g”, and, if you have properly identified the different regions, you can detect overlapping cells and the involved regions.
Hope this helps.
Javier
Hi Ethan,
There is no easy way of checking for duplicate surfaces directly. I can imagine a few situations where this might happen; for example, if you were to create two rectangular prisms (using openmc.model.rectangular_prism) that neighbored one another, the “shared” surface would actually be duplicated. There are a number of possible solutions, but we’ll have to think about what the right path forward is. Anyway, feel free to submit an issue and let us know if you have potential ideas to improve things in this area.
Best,
Paul
Thanks for the responses Javier and Paul. The way this happened was by trying to build two feedback coils inside a tokamak vacuum vessel - they have the same radii (ZCylinders) but different z locations. Building them one at a time produced identical cylindrical surfaces which caused the error. Building them with the same surface fixes the error. A simple solution would be just to handle it when exporting to geometry.xml, but I’ll open an issue to discuss further.
Thanks,
Ethan