Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible problem tallying photon heating with weight windows enabled #3207

Open
pshriwise opened this issue Nov 26, 2024 · 4 comments
Open
Labels

Comments

@pshriwise
Copy link
Contributor

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.

case HEATING:
if (p.type() == Type::neutron) {
score = score_neutron_heating(
p, tally, flux, HEATING, i_nuclide, atom_density);
} else {
if (i_nuclide == -1 || i_nuclide == p.event_nuclide()) {
// The energy deposited is the difference between the pre-collision
// and post-collision energy...
score = E - p.E();
// ...less the energy of any secondary particles since they will be
// transported individually later
const auto& bank = p.secondary_bank();
for (auto it = bank.end() - p.n_bank_second(); it < bank.end();
++it) {
score -= it->E;
}
score *= p.wgt_last();
} else {
score = 0.0;
}
}
break;

Based on how the n_bank_second attribute is incremented in the Particle::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.

for (int l = 0; l < i_split - 1; l++) {
p.create_secondary(weight / n_split, p.u(), p.E(), p.type());
}

I'll update this issue when I have more information.

@pshriwise pshriwise added the Bugs label Nov 26, 2024
@pshriwise pshriwise changed the title Possible issue tallying photon heating with weight windows enabled Possible problem tallying photon heating with weight windows enabled Nov 26, 2024
@giovanni-mariano
Copy link

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

@pshriwise
Copy link
Contributor Author

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.

@SteSeg
Copy link

SteSeg commented Dec 2, 2024

I think the problem stands. A while ago I was running some fusion benchmarks with nuclear heating as tally and I remember I got weird results. Photon heating with weight windows was indeed negative in almost all positions.

Is it possible that it only happens when also photon transport is affected by ww? I think I got the negative results only when I tried to generate ww for both neutrons and photons while ww for only neutrons seem to work fine.

Here the results without weight windows (track-length estimator):
image

Here the results for the same tally but with weight windows for only neutrons (track-length estimator):
image

Here same tally with weight windows for both neutrons and photons (track-lenght estimator):
image

However, I'm not sure it is an estimator issue, these are results for the same tally with ww for heating and a collision estimator (only neutron ww, collision estimator):
image

Lastly, in the benchmark the case withouth ww and the case with ww only for neutrons behave very well when compared with experimental results:

image

@pshriwise
Copy link
Contributor Author

Super helpful!! Thank you @SteSeg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants