Skip to content

Possible problem tallying photon heating with weight windows enabledΒ #3207

Closed
@pshriwise

Description

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.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions