You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR just prevents spontaneous fission decay modes from erroneously adding source terms along the diagonal of the burnup matrix. Since the official depletion chains have this behavior, this seems like the easiest immediate fix, but it does warrant a discussion on whether the semantics should be changed in the chain file themselves.
Skipping the gain term for sf in form_matrix() is a nice fix, and the path_rate != 0.0 guard to avoid explicit zeros in the sparse matrix is a nice cleanup too. It might be a while till the corrected chain files are used everywhere.
As a possible follow-up (separate PR), it might be worth also fixing this upstream in from_endf() so that sf decay modes get target=None instead of the self-referential target when generating chain files. That way the existing if target is not None guard in form_matrix() would handle it naturally without needing the sf-specific check. But that's a bigger change since it means regenerating the official chain files too, so totally fine as a future thing.
I agree, but if you wanted to add spontaneous fission yields to actually populate the correct gain terms you'd still need a specific check for 'sf' somewhere probably after the alpha and proton gain terms. I do tend to agree that None should be the correct target in the chain files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR just prevents spontaneous fission decay modes from erroneously adding source terms along the diagonal of the burnup matrix. Since the official depletion chains have this behavior, this seems like the easiest immediate fix, but it does warrant a discussion on whether the semantics should be changed in the chain file themselves.
Fixes #3906
Checklist