Skip to content

Collision Track Feature Fails for Photon Transport #3945

@pshriwise

Description

@pshriwise

Bug Description

A user posted this bug in the forum with a nice MWE. The source of the problem is that when photons generate electrons, the electron collision event producing secondary Bremsstrahlung photons is NUCLIDE_NONE resulting in an invalid nuclide pointer when setting the nuclide_id for the collision event.

const auto* nuclide_ptr = data::nuclides[particle.event_nuclide()].get();
std::string nuclide = nuclide_ptr->name_;

Steps to Reproduce

Forum link with MWE: https://openmc.discourse.group/t/issues-when-using-collision-track-with-photon-transport-enabled/6331

Environment

Nuclear data ENDF/B VIII.0 (but shouldn't matter much what dataset is used)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions