Open pshriwise opened 3 days ago
Hello Patrick! I faced this issue as well during my tests but I haven't had much time to spend on it. My conclusion (I think I wrote something on slack) was that it affect all the tallies which are not using the track-length estimator: basically all the tallies using the pre-collision weight (p.wgt_last()) in the score calculation instead of the current weight (p.wgt()). But I'm not sure on 100%. Best, Giovanni
Yeah I need to dig into this more soon. I'll try to come up with a minimal working example to start -- hopefully a problem where this effect is particularly pronounced.
Bug Description
I was staring at the section on photon heating today and noticed that we may be subtracting too much energy from photon heating tallies when weight windows are applied.
https://github.com/openmc-dev/openmc/blob/2d988a69a10dec9e2964782d20a08927574d763a/src/tallies/tally_scoring.cpp#L958-L981
Based on how the
n_bank_second
attribute is incremented in theParticle::create_secondary
method and that this method is applied when splitting particles in weight window application, it seems particles split in application of weight windows will be incorporated into the correction, which I don't believe is correct.https://github.com/openmc-dev/openmc/blob/2d988a69a10dec9e2964782d20a08927574d763a/src/weight_windows.cpp#L116-L118
I'll update this issue when I have more information.