Fix (n,gamma) reaction rate in URR to use sampled xs

This commit is contained in:
Paul Romano 2021-02-26 14:44:35 -06:00
parent e54785f1a7
commit 3987d4273a
2 changed files with 13 additions and 3 deletions

View file

@ -896,18 +896,21 @@ void Nuclide::calculate_urr_xs(int i_temp, Particle& p) const
if (fission < 0.) {fission = 0.;}
if (capture < 0.) {capture = 0.;}
// Set elastic, absorption, fission, and total x/s. Note that the total x/s
// is calculated as a sum of partials instead of the table-provided value
// Set elastic, absorption, fission, total, and capture x/s. Note that the
// total x/s is calculated as a sum of partials instead of the table-provided
// value
micro.elastic = elastic;
micro.absorption = capture + fission;
micro.fission = fission;
micro.total = elastic + inelastic + capture + fission;
if (simulation::need_depletion_rx) {
micro.reaction[0] = capture;
}
// Determine nu-fission cross-section
if (fissionable_) {
micro.nu_fission = nu(p.E_, EmissionMode::total) * micro.fission;
}
}
std::pair<gsl::index, double> Nuclide::find_temperature(double T) const

View file

@ -479,6 +479,13 @@ double get_nuclide_xs(const Particle& p, int i_nuclide, int score_bin) {
const auto& rxn {*nuc.reactions_[m]};
const auto& micro {p.neutron_xs_[i_nuclide]};
// In the URR, the (n,gamma) cross section is sampled randomly from
// probability tables. Make sure we use the sampled value (which is equal to
// absorption - fission) rather than the dilute average value
if (micro.use_ptable && score_bin == N_GAMMA) {
return micro.absorption - micro.fission;
}
auto i_temp = micro.index_temp;
if (i_temp >= 0) { // Can be false due to multipole
// Get index on energy grid and interpolation factor