Unable to track down where cell overlap is

Hi All!

We are working on a high-fidelity model of the Jozef Stefan Institute TRIGA reactor (Slovenia). The model runs correctly, but we are trying to get rid of all the geometry errors, running in geometry_debug=True mode. The main reason is that we want to be able to easily identify geometry issues in the future, when more experimental components are added.

Each element that can be hosted in a core position (e.g., fuel element, irradiation channel) is a separate universe. The core has a circular lattice (6 rings, 91 total locations), and is being filled out by defining cells bounded by cylindrical surfaces and another common region which makes sure to exclude these elements from common reactor components, e.g., support grids.

Now I get an overlap that I do not understand during the geometry debug run and that seems impossible to me.

This is the OpenMC error:
ERROR: Overlapping cells detected: 101, 203 on universe 10

To debug, I ran the following:

u10 = geometry.get_all_universes()[10]
u10_cells = u10.get_all_cells()
c101 = u10_cells[101].region
c203 = u10_cells[203].region
print(c101)
print(c203)

The output of the print statements above is this (-1345 (<COMMON_REGION>)) for c101 and (-1348 (<COMMON_REGION>)). I have diff-checked the <COMMON_REGION> surfaces and they are identical.

Surfaces 1345 and 1348 are as follows:

Surface
	ID                 =	1345
	Name               =	
	Type               =	z-cylinder
	Boundary           =	transmission
	Coefficients       
x0                  =	0.0
y0                  =	-0.0
r                   =	1.91

Surface
	ID                 =	1348
	Name               =	
	Type               =	z-cylinder
	Boundary           =	transmission
	Coefficients       
x0                  =	-2.0269
y0                  =	-3.510694
r                   =	1.91

Now it’s very apparent that these two z-cylinders do not overlap. No matter what <COMMON_REGION> is, since it is intersected to this two non-overlapping cyilinders, the two cells should not overlap. I plotted the two circular regions to ensure that they do not overlap.

All of the .xml input files can be found here: cell_overlap_model.tar.gz

Hi vmascolino,

I would plot it using openmc plotter and go to that section within your geometry and see if it looks like the two cylinders you showed down below. I would also take a look into where you are using your universe 10 and see if there is an issue there.

import subprocess
subprocess.run(\[“openmc-plotter”\])

Even if you don’t think they overlap, depending on how you have them packaged inside of the universes or lattices, they might.

Hi vmascolino, from my side, the first report came from the cell 629 that overlaps with the 101, both in u10.
I think the problem is not coming from the zcylinder, but from the other region definition you add after that zcyl.

cell 101
-1345 (-1103 | 1101 | -1103 | -1104 | -1105 | -1105 | -1106 | -1107 | -1108 | -1108 | -1109 | -1110 | -1110 | -1111 | -1112 | -1112 | -1113 | -1114 | -1114 | -1115 | -1116 | -1116 | -1117 | -1118 | -1118 | -1119 | -1120 | -1120 | -1121 | -1122 | -1122 | -1123 | -1124 | -1125 | -1125 | -1126 | -1127 | -1127 | -1128 | -1129 | -1129 | -1130 | -1131 | -1131 | -1132 | -1133 | -1133 | -1134 | -1135 | -1136 | -1136 | -1137 | -1138 | -1138 | -1139 | -1140 | -1141 | -1141 | -1142 | -1143 | -1143 | -1144 | -1145 | -1145 | -1146 | -1147 | -1147 | -1148 | -1149 | -1149 | -1150 | -1151 | -1151 | -1152 | -1153 | -1153 | -1154 | -1155 | -1155 | -1156 | -1157 | -1158 | -1158 | -1159 | -1160 | -1160 | -1161 | -1162 | -1162 | -1163 | -1164 | -1164 | -1165 | -1166 | -1166 | -1167 | -1168 | -1168 | -1169 | -1170 | -1170 | -1171 | -1172 | -1172 | -1173 | -1174 | -1174 | -1175 | -1176 | -1176 | -1177 | -1178 | -1178 | -1179 | -1180 | -1180 | -1181 | -1182 | -1182 | -1183 | -1184 | -1184 | -1185 | -1186 | -1186 | -1187 | -1188 | -1188 | -1189 | -1190 | -1190 | -1191 | -1192 | -1192 | -1193 | -1194 | -1194 | -1195 | -1196 | -1196 | -1197 | -1198 | -1198 | -1199 | -1200 | -1200 | -1201 | -1202 | -1202 | -1203 | -1204 | -1204 | -1205 | -1206 | -1206 | -1207 | -1208 | -1208 | -1209 | -1210 | -1210 | -1211 | -1212 | -1212 | -1213 | -1214 | -1214 | -1215 | -1216 | -1216 | -1217 | -1218 | -1218 | -1219 | -1220 | -1220 | -1221 | -1222 | -1222 | -1223 | -1224 | -1224 | -1225 | -1226 | -1226 | -1227 | -1228 | -1228 | -1229 | -1230 | -1230 | -1231 | -1232 | -1232 | -1233 | -1234 | -1234 | -1235 | -1236 | -1236 | -1237 | -1238 | -1238 | -1239 | -1240 | -1240 | -1241 | -1242 | -1242 | -1243 | -1244 | -1244 | -1245 | -1246 | -1246 | -1247 | -1248 | -1248 | -1249 | -1250 | -1250 | -1251 | -1252 | -1252 | -1253 | -1254 | -1254 | -1255 | -1256 | -1256 | -1257 | -1258 | -1258 | -1259 | -1260 | -1260 | -1261 | -1262 | -1262 | -1263 | -1264 | -1264 | -1265 | -1266 | -1266 | -1267 | -1268 | -1268 | -1269 | -1270 | -1270 | -1271 | -1272 | -1272 | -1273 | -1274 | -1274 | -1275 | -1276 | -1276 | -1277 | -1278 | -1278 | -1279 | -1280 | -1280 | -1281 | -1282 | -1283 | -1284 | -1285 | -1286 | -1287 | -1288 | -1289 | -1290 | -1291 | -1292 | -1293 | -1294 | -1295 | -1296 | -1297 | -1298 | -1299 | -1300 | -1301 | -1302 | -1303 | -1304 | -1305 | -1306 | -1307 | -1308 | -1309 | -1310 | -1311 | -1312 | -1313 | -1314 | -1315 | -1316 | -1317 | -1318 | -1319 | -1320 | -1321 | -1322 | -1323 | -1324 | -1325 | -1326 | -1327 | -1328 | -1329 | -1330 | -1331 | -1332 | -1333 | -1334 | -1335 | -1336 | -1337 | -1338 | -1339 | -1340 | -1341 | -1342) (-1102 | 1103 | -1105 | -1106 | -1108 | -1110 | -1112 | -1114 | -1116 | -1118 | -1120 | -1122 | -1123 | -1125 | -1127 | -1129 | -1131 | -1133 | -1134 | -1136 | -1138 | -1139 | -1141 | -1143 | -1145 | -1147 | -1149 | -1151 | -1153 | -1155 | -1156 | -1158 | -1160 | -1162 | -1164 | -1166 | -1168 | -1170 | -1172 | -1174 | -1176 | -1178 | -1180 | -1182 | -1184 | -1186 | -1188 | -1190 | -1192 | -1194 | -1196 | -1198 | -1200 | -1202 | -1204 | -1206 | -1208 | -1210 | -1212 | -1214 | -1216 | -1218 | -1220 | -1222 | -1224 | -1226 | -1228 | -1230 | -1232 | -1234 | -1236 | -1238 | -1240 | -1242 | -1244 | -1246 | -1248 | -1250 | -1252 | -1254 | -1256 | -1258 | -1260 | -1262 | -1264 | -1266 | -1268 | -1270 | -1272 | -1274 | -1276 | -1278 | -1280 | -1281 | -1282 | -1283 | -1284 | -1285 | -1286 | -1287 | -1288 | -1289 | -1290 | -1291 | -1292 | -1293 | -1294 | -1295 | -1296 | -1297 | -1298 | -1299 | -1300 | -1301 | -1302 | -1303 | -1304 | -1305 | -1306 | -1307 | -1308 | -1309 | -1310 | -1311 | -1312 | -1313 | -1314 | -1315 | -1316 | -1317 | -1318 | -1319 | -1320 | -1321 | -1322 | -1323 | -1324 | -1325 | -1326 | -1327 | -1328 | -1329 | -1330 | -1331 | -1332 | -1333 | -1334 | -1335 | -1336 | -1337 | -1338 | -1339 | -1340 | -1341 | -1342) (-1343 | 1344 | -1345 | -1346 | -1347 | -1348 | -1349 | -1350 | -1351 | -1352 | -1353 | -1354 | -1355 | -1356 | -1357 | -1358 | -1359 | -1360 | -1361 | -1362 | -1363 | -1364 | -1365 | -1366 | -1367 | -1368 | -1369 | -1370 | -1371 | -1372 | -1373 | -1374 | -1375 | -1376 | -1377 | -1378 | -1379 | -1380 | -1381 | -1382 | -1383 | -1384 | -1385 | -1386 | -1387 | -1388 | -1389 | -1390 | -1391 | -1392 | -1393 | -1394 | -1395 | -1396 | -1397 | -1398 | -1399 | -1400 | -1401 | -1402 | -1403 | -1404 | -1405 | -1406 | -1407 | -1408 | -1409 | -1410 | -1411 | -1412 | -1413 | -1414 | -1415 | -1416 | -1417 | -1418 | -1419 | -1420 | -1421 | -1422 | -1423 | -1424 | -1425 | -1426 | -1427 | -1428 | -1429 | -1430 | -1431 | -1432 | -1433 | -1434 | -1435 | -1317 | -1318 | -1319 | -1320 | -1321 | -1322 | -1323 | -1324 | -1325 | -1326 | -1327 | -1328 | -1329 | -1330 | -1331 | -1332 | -1333 | -1334 | -1335 | -1336 | -1337 | -1338 | -1339 | -1340 | -1341 | -1342)

cell 629
-1434 (-1103 | 1101 | -1103 | -1104 | -1105 | -1105 | -1106 | -1107 | -1108 | -1108 | -1109 | -1110 | -1110 | -1111 | -1112 | -1112 | -1113 | -1114 | -1114 | -1115 | -1116 | -1116 | -1117 | -1118 | -1118 | -1119 | -1120 | -1120 | -1121 | -1122 | -1122 | -1123 | -1124 | -1125 | -1125 | -1126 | -1127 | -1127 | -1128 | -1129 | -1129 | -1130 | -1131 | -1131 | -1132 | -1133 | -1133 | -1134 | -1135 | -1136 | -1136 | -1137 | -1138 | -1138 | -1139 | -1140 | -1141 | -1141 | -1142 | -1143 | -1143 | -1144 | -1145 | -1145 | -1146 | -1147 | -1147 | -1148 | -1149 | -1149 | -1150 | -1151 | -1151 | -1152 | -1153 | -1153 | -1154 | -1155 | -1155 | -1156 | -1157 | -1158 | -1158 | -1159 | -1160 | -1160 | -1161 | -1162 | -1162 | -1163 | -1164 | -1164 | -1165 | -1166 | -1166 | -1167 | -1168 | -1168 | -1169 | -1170 | -1170 | -1171 | -1172 | -1172 | -1173 | -1174 | -1174 | -1175 | -1176 | -1176 | -1177 | -1178 | -1178 | -1179 | -1180 | -1180 | -1181 | -1182 | -1182 | -1183 | -1184 | -1184 | -1185 | -1186 | -1186 | -1187 | -1188 | -1188 | -1189 | -1190 | -1190 | -1191 | -1192 | -1192 | -1193 | -1194 | -1194 | -1195 | -1196 | -1196 | -1197 | -1198 | -1198 | -1199 | -1200 | -1200 | -1201 | -1202 | -1202 | -1203 | -1204 | -1204 | -1205 | -1206 | -1206 | -1207 | -1208 | -1208 | -1209 | -1210 | -1210 | -1211 | -1212 | -1212 | -1213 | -1214 | -1214 | -1215 | -1216 | -1216 | -1217 | -1218 | -1218 | -1219 | -1220 | -1220 | -1221 | -1222 | -1222 | -1223 | -1224 | -1224 | -1225 | -1226 | -1226 | -1227 | -1228 | -1228 | -1229 | -1230 | -1230 | -1231 | -1232 | -1232 | -1233 | -1234 | -1234 | -1235 | -1236 | -1236 | -1237 | -1238 | -1238 | -1239 | -1240 | -1240 | -1241 | -1242 | -1242 | -1243 | -1244 | -1244 | -1245 | -1246 | -1246 | -1247 | -1248 | -1248 | -1249 | -1250 | -1250 | -1251 | -1252 | -1252 | -1253 | -1254 | -1254 | -1255 | -1256 | -1256 | -1257 | -1258 | -1258 | -1259 | -1260 | -1260 | -1261 | -1262 | -1262 | -1263 | -1264 | -1264 | -1265 | -1266 | -1266 | -1267 | -1268 | -1268 | -1269 | -1270 | -1270 | -1271 | -1272 | -1272 | -1273 | -1274 | -1274 | -1275 | -1276 | -1276 | -1277 | -1278 | -1278 | -1279 | -1280 | -1280 | -1281 | -1282 | -1283 | -1284 | -1285 | -1286 | -1287 | -1288 | -1289 | -1290 | -1291 | -1292 | -1293 | -1294 | -1295 | -1296 | -1297 | -1298 | -1299 | -1300 | -1301 | -1302 | -1303 | -1304 | -1305 | -1306 | -1307 | -1308 | -1309 | -1310 | -1311 | -1312 | -1313 | -1314 | -1315 | -1316 | -1317 | -1318 | -1319 | -1320 | -1321 | -1322 | -1323 | -1324 | -1325 | -1326 | -1327 | -1328 | -1329 | -1330 | -1331 | -1332 | -1333 | -1334 | -1335 | -1336 | -1337 | -1338 | -1339 | -1340 | -1341 | -1342) (-1102 | 1103 | -1105 | -1106 | -1108 | -1110 | -1112 | -1114 | -1116 | -1118 | -1120 | -1122 | -1123 | -1125 | -1127 | -1129 | -1131 | -1133 | -1134 | -1136 | -1138 | -1139 | -1141 | -1143 | -1145 | -1147 | -1149 | -1151 | -1153 | -1155 | -1156 | -1158 | -1160 | -1162 | -1164 | -1166 | -1168 | -1170 | -1172 | -1174 | -1176 | -1178 | -1180 | -1182 | -1184 | -1186 | -1188 | -1190 | -1192 | -1194 | -1196 | -1198 | -1200 | -1202 | -1204 | -1206 | -1208 | -1210 | -1212 | -1214 | -1216 | -1218 | -1220 | -1222 | -1224 | -1226 | -1228 | -1230 | -1232 | -1234 | -1236 | -1238 | -1240 | -1242 | -1244 | -1246 | -1248 | -1250 | -1252 | -1254 | -1256 | -1258 | -1260 | -1262 | -1264 | -1266 | -1268 | -1270 | -1272 | -1274 | -1276 | -1278 | -1280 | -1281 | -1282 | -1283 | -1284 | -1285 | -1286 | -1287 | -1288 | -1289 | -1290 | -1291 | -1292 | -1293 | -1294 | -1295 | -1296 | -1297 | -1298 | -1299 | -1300 | -1301 | -1302 | -1303 | -1304 | -1305 | -1306 | -1307 | -1308 | -1309 | -1310 | -1311 | -1312 | -1313 | -1314 | -1315 | -1316 | -1317 | -1318 | -1319 | -1320 | -1321 | -1322 | -1323 | -1324 | -1325 | -1326 | -1327 | -1328 | -1329 | -1330 | -1331 | -1332 | -1333 | -1334 | -1335 | -1336 | -1337 | -1338 | -1339 | -1340 | -1341 | -1342) (-1343 | 1344 | -1345 | -1346 | -1347 | -1348 | -1349 | -1350 | -1351 | -1352 | -1353 | -1354 | -1355 | -1356 | -1357 | -1358 | -1359 | -1360 | -1361 | -1362 | -1363 | -1364 | -1365 | -1366 | -1367 | -1368 | -1369 | -1370 | -1371 | -1372 | -1373 | -1374 | -1375 | -1376 | -1377 | -1378 | -1379 | -1380 | -1381 | -1382 | -1383 | -1384 | -1385 | -1386 | -1387 | -1388 | -1389 | -1390 | -1391 | -1392 | -1393 | -1394 | -1395 | -1396 | -1397 | -1398 | -1399 | -1400 | -1401 | -1402 | -1403 | -1404 | -1405 | -1406 | -1407 | -1408 | -1409 | -1410 | -1411 | -1412 | -1413 | -1414 | -1415 | -1416 | -1417 | -1418 | -1419 | -1420 | -1421 | -1422 | -1423 | -1424 | -1425 | -1426 | -1427 | -1428 | -1429 | -1430 | -1431 | -1432 | -1433 | -1434 | -1435 | -1317 | -1318 | -1319 | -1320 | -1321 | -1322 | -1323 | -1324 | -1325 | -1326 | -1327 | -1328 | -1329 | -1330 | -1331 | -1332 | -1333 | -1334 | -1335 | -1336 | -1337 | -1338 | -1339 | -1340 | -1341 | -1342)

As you can see, both cells consist of many surface regions and both cells use almost identical excluded region, the (-1103 | 1101 | -1103 | -1104 ..., besides the zcyl 1345 for cell 101 and 1434 for cell 629.
I think you need to simplify the cell region definition so that the region could be easier to track when the overlaps check kicks in. as you can see, the surface 1103 was called more that once in single region definition, which is unusual. if this region is a cylinder, then you could choose the outer surface of that cylinder. if that region is a union of various regions, you could focus on each region before merging the regions into a single big and complicated region.

Hi Jarret, I have plotted the model but am unable to see any overlap.