I understand this usually means there is a gap or overlap in the geometry, but I can’t find it
I’ve attached my code (.ipynb) and a screenshot of the geometry for reference.
Could someone please review it and tell me what might be causing the particles to get lost around surfaces 1329 and 1330?
Thank you so much! You were right—the leaking was from the axial planes, and setting them to boundary_type='reflective' fixed it.
Could you please help me calculate the neutron flux in this model? I’m not sure whether to use a cell-averaged flux tally (e.g., fuel cell) or a regular mesh tally, and what energy bins you recommend.can you help me
Tally flux using CellFilter or MeshFilter depends on what you are concerd about. If the you want to know the info of the cell, then you use CellFilter; or if you want to know the spatial flux distribution, MeshFilter is better. I usually use 500 energy groups which is equal-lethargy between 0-20MeV for research. If you have some special requirement, you should look up the professional litrature. OpenMC also provide some energy group structure, shown in openmc.mgxs – Multi-Group Cross Section Generation — OpenMC Documentation.
Thanks a lot for your previous guidance about using CellFilter and MeshFilter for flux tallies.
As you mentioned, CellFilter is useful when I need flux information for specific cells, and MeshFilter is better for spatial flux distribution.
I’d like to ask for your help checking or improving the following example code.
I created two tallies — one for per-cell flux and another for spatial flux, both using 500 equal-lethargy energy groups (0–20 MeV).
Could you please help me confirm if this setup is correct or suggest any improvements?
import openmc
import numpy as np
— 500-group equal-lethargy energy structure (0–20 MeV) —