Greetings,
I was applying the R2S method to my DAGMC file from the example workshop example found here: link
Everything seems to run correctly up to the depletion part of the script, but it gives the error:
ERROR: More than 95% of external source sites sampled were rejected. Please check your external source's spatial definition.
when it is trying to create the photon source for my first time step. I saw a suggestion here: link
Yes, that’s correct. If you have regions of your problem that are void but still have particles traveling through them, they need to be defined in a cell that appears in the geometry. Void cells are created by instantiating a
Cell
object and not assigning a fill, or equivalently assigning a fill ofNone
.
So I tried changing my script from:
dagmc_univ = openmc.DAGMCUniverse(filename="~/dagmc.h5m")
py1 = openmc.Plane(a=0.09,b=0.22,c=-0.0,d=-1,surface_id=99999999,boundary_type="reflective")
py2 = openmc.YPlane(y0=0.0,surface_id=99999998,boundary_type="reflective")
px1 = openmc.XPlane(x0=0,surface_id=99999997,boundary_type="reflective")
px2 = openmc.XPlane(x0=1050.0,surface_id=99999996,boundary_type="reflective")
pz1 = openmc.ZPlane(z0=-413.0,surface_id=99999995,boundary_type="reflective")
pz2 = openmc.ZPlane(z0=413.0,surface_id=99999994,boundary_type="reflective")
region = ( +py1 & -py2 & +px1 & -px2 & +pz1 & -pz2 )
containing_cell = openmc.Cell(cell_id=9999, region=region, fill=dagmc_univ)
model = openmc.Model()
geometry = openmc.Geometry(root=[containing_cell])
geometry.export_to_xml()
To:
dagmc_univ = openmc.DAGMCUniverse(filename="~/dagmc.h5m")
py1 = openmc.Plane(a=0.09,b=0.22,c=-0.0,d=-1,surface_id=99999999,boundary_type="reflective")
py2 = openmc.YPlane(y0=0.0,surface_id=99999998,boundary_type="reflective")
px1 = openmc.XPlane(x0=0,surface_id=99999997,boundary_type="reflective")
px2 = openmc.XPlane(x0=1050.0,surface_id=99999996,boundary_type="reflective")
pz1 = openmc.ZPlane(z0=-413.0,surface_id=99999995,boundary_type="reflective")
pz2 = openmc.ZPlane(z0=413.0,surface_id=99999994,boundary_type="reflective")
region = ( +py1 & -py2 & +px1 & -px2 & +pz1 & -pz2 )
empty_cell = openmc.Cell(cell_id=9998, region=region)
containing_cell = openmc.Cell(cell_id=9999, region=region, fill=dagmc_univ)
model = openmc.Model()
geometry = openmc.Geometry(root=[containing_cell,empty_cell])
geometry.export_to_xml()
I tried creating an empty cell to represent the voids (white area) in my geometry:
but it outputted the same error again many times before getting a runtime error. It additionally outputted:
WARNING: Particle 4229 underwent maximum number of events.
WARNING: Particle 1 underwent maximum number of events.
WARNING: Particle 9689 underwent maximum number of events.
WARNING: Particle 943 underwent maximum number of events.
WARNING: Particle 7349 underwent maximum number of events.
WARNING: Particle 1885 underwent maximum number of events.
WARNING: Particle 6569 underwent maximum number of events.
WARNING: Particle 4385 underwent maximum number of events.
WARNING: Particle 9533 underwent maximum number of events.
WARNING: Particle 8753 underwent maximum number of events.
WARNING: Particle 9377 underwent maximum number of events.
WARNING: Particle 7193 underwent maximum number of events.
WARNING: Particle 6881 underwent maximum number of events.
WARNING: Particle 6257 underwent maximum number of events.
WARNING: Particle 3293 underwent maximum number of events.
WARNING: Particle 8597 underwent maximum number of events.
for about 100,000 lines in my output log. I am not sure what I can try differently to get around the error. Very appreciative of any advice!