Using CellFilter, MeshFilter and EnergyFilter altogether for flux tally in an Angular Cylinder.

Hello, I know in tally input CellFilter is used for calculating tally data in a certain cell volume. Now, for a certain cell, the score “flux” gives the total flux of the cell volume.

Now, if I want to use a mesh (dividing the cell into small portions) and want to calculate the flux for each mesh. This is not a problem if the cell is rectangular with (two or three dimensions). I can use a normal mesh with my dimension, lower-left, and upper-right.

Now, if the cell is a cylinder, currently I also can use a rectangular mesh with (x,y,z) dimensions that cover the cylinder, I can use the CellFIlter, MeshFilter together and can get the tally data for each mesh for a cell. Below is an example where 0.39218 is the radius of the cylinder. Is this the correct way I am using it?

mesh2 = openmc.Mesh(mesh_id=2)
mesh2.type = ‘regular’
mesh2.dimension = [10, 1, 1]
mesh2.lower_left = [-0.39218, -0.39218, -3]
mesh2.upper_right = [0.39218, 0.39218, 3]

mesh_filter2 = openmc.MeshFilter(mesh2)

cell_filter1 = openmc.CellFilter(fuel)

energy_filter = openmc.EnergyFilter([0., 4., 20.e6])

tally2 = openmc.Tally(tally_id=2, name=‘tally 2’)
tally2.filters = [energy_filter, cell_filter1, mesh_filter2]
tally2.scores = [‘flux’, ‘fission’, ‘nu-fission’]

My problem is. What is the cylinder is an angular cylinder (say 45-degree angular from x-axis)? How to define the mesh (angular mesh) in that case that will cover the cylinder cell and divide into small portion according to the mesh dimensions.

Now, I can only use the cell filter for this kind and get the total flux tally for that cell. I want to use a mesh and device the cell into small portion and get the flux value in each portion. Any help regarding this is highly appreciated. Thank you.

Regards,
Sharif Abu Darda

Hi Sharif,

At the moment, MeshFilter only provides the capability to do axis-aligned regular mesh bins, so unfortunately there is not a good solution for what you want to do. The only alternative that I can think of right now is to manually divide the angled cylinder into many smaller cells that would be equivalent to the mesh. Depending on your problem, that may or may not be an acceptable solution.

If you think other mesh types would be useful for your work, please feel free to make a feature request by submitting an issue on our GitHub issues page (this will require a github account).

Best regards,
Paul

Hello, Dr. Thanks for the reply. I was able to define a small volume of a sphere and tried to get the flux tally inside the volume as a cell filter. So, in each of my angular cylinder, I have two cells. I can get the flux tally in the two cells. But the issue I have now is I always see the flux tally of the small sphere is cell is showing 0. Despite this small sphere is inside one of the cells of the angular cylinder. So, my question is does openmc ignores (count as 0) the tally value if it is less than e-07? If so, How do I increase the margin to get a tally e-08 or e-09 or e-10?

The below image shows the behavior. So I get a flux tally value for the first cell (blue cell) which is close to the core. And also for the green cell, but lower value. But I can’t get the flux tally for the red sphere cell inside the green cell. Actually, I designed it as the sphere radius is a little lower than the radius of the green cylinder itself.

Please let me know why I am not getting any tally in the red sphere cell? What is my mistake Dr? Thank you for all your support.

Screen Shot 2019-09-03 at 7.26.34 PM.png