ERROR: More than 95% of external source sites sampled were rejected. Please check your external source’s spatial definition

Hi all - am playing around with Paramak in the openMC neutronics workshop docker container, trying to make a simple point source irradiate a shape and tally the heating. I got the following error:

ERROR: More than 95% of external source sites sampled were rejected. Please check your external source’s spatial definition.

And I’m not sure why - I’d appreciate any pointers, thanks

attaching my script here:
Untitled-2.py (1.8 KB)

I think this is because your source location (0,0,0) is not within the geometry.

You can check this by looking at the model.xml, it should contain 6 surfaces which are all vacuum boundaries. These surfaces are made automatically for you by the bounded_universe method. You should see that they are around 50 and 100. So the location of the source could be changed to match.

perhaps try getting the center of the geometry and setting the location to the middle

print(bound_dag_univ.bounding_box.center)

or you could create a large radius sphere with a boundary_type=‘vacuum’ and bound the dagmc geometry manually.

perhaps what we should do to make this type of simulation easier is add an offset argument to the bounding_region method so that users can easily make the region larger than the geometry it bounds.

It worked! thanks very much.

1 Like