Hi Alex, I tried to replicate the case scenario from git and also got “stuck” when using RegularMesh and it works if it changes to RectilinearMesh as you said before. here is the notebook regmeshstuck.ipynb (111.1 KB)
But, when I plot the source defined by marquezj using regular mesh to see the xy and xz plot, I see that the source itself was a thin source in the z-axis, here is the plot
so basically I expect the flux will be low on the coordinate that was interested by marquezj which is x (-30 to 30) y(-30 to 30) z(30 to 60) as defined
mesh_surface = openmc.RegularMesh() # <-- Important
mesh_surface.lower_left = [-30, -30, 30] # <-- Min z is important
mesh_surface.upper_right = [30, 30, 60] # <-- Max z is important
mesh_surface.dimension = [1, 1, 1]
when I changed the z-min in lower left into slightly higher or lower, openmc did not get “stuck”
mesh_surface.lower_left = [-30, -30, 30.001] # <-- Min z is important
that will also work if you use [-30, -30, 29.999].
and as predicted, the current is all zero
if I move the mesh coordinate to z between 0-1 cm, because I know that there are a lot of particles on that z position,
mesh_surface.lower_left = [-30, -30, 0] # <-- Min z is important
mesh_surface.upper_right = [30, 30, 1] # <-- Max z is important
mesh_surface.dimension = [1, 1, 1]
then as expected, we will get the surface current from that position and source configuration
In another case, when I used the original mesh specified mesh_surface.lower_left = [-30, -30, 30]
but change the source definition to default isotropic at the origin by simply adding a hashtag to the source definition
# settings.source = source
settings.run_mode = 'fixed source'
settings.particles = 10000
settings.batches = 10
then, I expect that the source will be distributed isotropic, even on the z-axis like this
and we can expect that the surface current will have value on the x (-30 to 30) y(-30 to 30) z(30 to 60), and here the output surface current tally
so if this is the same case as what you encounter, you might want to try to plot your source using a regular mesh tally to see the source you defined, and you can slightly change the mesh coordinate if the problem is on the mesh definition.
sorry if it didn’t help in solving your problem