Scale the weight window cutoff with the window normalization#3991
Scale the weight window cutoff with the window normalization#3991jon-proximafusion wants to merge 1 commit into
Conversation
|
I'm not convinced that you should scale the weight cutoff; this represents the floor below which particles are no longer tracked and should not be modified when the window is scaled, its not a relative quantity is absolute. |
Thanks @makeclean this sort of question is just the sort of reason I wanted to split this 3 line change out from the larger PR so they can be considered independently. @jtramm any chance you can comment on this. |
WeightWindow::scale multiplies the lower, upper, and survival weights by a factor but left weight_cutoff fixed, so after a renormalization the cutoff no longer sat at the same relative depth below the window. Scale weight_cutoff by the same factor so it keeps its relative position in any normalization frame. Split out of openmc-dev#3968 for focused review. Co-authored-by: shimwell <mail@jshimwell.com> Co-authored-by: jon-proxima <jon@proximafusion.com>
471f8fe to
abcc264
Compare
|
The constant is currently set to: constexpr double DEFAULT_WEIGHT_CUTOFF {1.0e-38}; // default low weight cutoffwhich does seem like it would be so small that there wouldn't be a physical problem in fission/fusion/shielding where we would care about particles with such a low weight. It seems like more probably a particle would only hit that default weight due to noise in the weight windows. For instance, perhaps only a single low-weight particle in MAGIC just barely clips the corner of a mesh cell and scores an extremely low flux, leading to a WW with an infinitesimal lower bound. In this case we might get runaway splitting that is only terminated by the cutoff. It's a nice backstop to have rather than having the code hang forever. That said, the worry is that with importance sampling we might theoretically sample a really low weight particle and still be interested in its behavior at even lower weights. If there's any potential where we'd hit the cutoff under normal operation, then that opens the door to a silent bias. We are killing particles without roulette, so weight is lost. If that weight is actually locally relevant in that area it may be problematic. 1e-38 again seems negligible and would be pretty impossible to achieve with normal and well functioning weight windows, but when adding in importance sampling then perhaps this might be feasible and result in silent bias in some cases. Scaling the cutoff allows for those use cases without the risk of silent bias, as we're then just saying that a starting particle won't decay in weight by more than 38 orders of magnitude. That all said, I do also see significant utility in having it be an absolute limit. Users may actually just not be interested in fluxes below a certain threshold and this setting allows them to dial that in. For instance, perhaps they want to use global WW's but only care about areas that are above a background dose rate -- this setting would provide a useful cutoff that might greatly accelerate the simulation without resulting in any meaningful error. This seems like a more common use case so I'd be in favor of keeping the existing absolute cutoff. |
WeightWindow::scalemultiplies the lower, upper, and survival weights by a factor, but leftweight_cutoffunchanged. After a renormalization the cutoff therefore no longer sat at the samerelative depth below the window. This scales
weight_cutoffby the same factor so it keeps its relativeposition in any normalization frame.
One line change. Split out of #3968 for focused review. A dedicated regression test is awkward to isolate
(it only bites when
scale()is called with a factor, i.e. viaww_factor); happy to add one if areviewer wants it.