svalinn / parastell

Parametric 3-D CAD modeling toolset for stellarator fusion devices
MIT License
26 stars 12 forks source link

Triple Counting of Some Neutrons in NWL utils #155

Closed Edgar-21 closed 2 months ago

Edgar-21 commented 2 months ago

Increasing the maximum number of surface crossings to be larger than the number of particles transported reveals an issue with the way the bounding surfaces are set up in nwl_transport() currently. For example, if I set the number of particles to transport to be 100,000, then set the maximum particles in the surface source, I wind up with 123,890 particles banked on the surface source. I believe there are two factors leading to triple counting. If the boundaries were correct, I would expect to only bank the number of source particles.

I reckon the largest contributor to the extra sites is particles exiting the inboard side, encountering the periodic boundary, and returning to re-enter the chamber. These particles will be counted once as they exit, then again as they re-enter, and a third time as they exit. A similar case can be imagined where the chamber has a convex profile, as a particle may exit and reenter without encountering a boundary.

The best fix would probably be to assign a vacuum boundary condition to the FW surface in cubit prior to exporting the DAGMC model.

Edgar-21 commented 2 months ago

Can confirm that adding a vacuum condition with UWUW steps results in only the number of source particles being banked on the surface source.

gonuke commented 2 months ago

What boundary condition have we been setting up to now and how?

Edgar-21 commented 2 months ago

It's set in https://github.com/svalinn/parastell/blob/32b221a55e4e45cdb954440b20f04a14529c018e/parastell/nwl_utils.py#L54 using OpenMC CSG. The boundaries are the xz and yz planes (periodic), and a sphere of radius 10000 (vacuum)

gonuke commented 2 months ago

Yikes - I should have caught that... definitely need the FW surface to be vacuum!