Add forward vs adjoint flux comparison to FW-CADIS task#473
Merged
Conversation
The FW-CADIS notebook previously only plotted the adjoint-derived weight windows and left a placeholder markdown cell for plotting the flux. This attaches the mesh flux tally to the random ray model so that both the forward and adjoint solves record it, then adds a side by side plot of the forward flux and the adjoint (importance) flux, read from the forward and adjoint statepoints written by the single FW-CADIS run. The surrounding text is expanded to explain what each flux represents, why the random ray solver runs a forward pass before the adjoint pass, and how the weight windows relate to the adjoint flux.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
4 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds a forward vs adjoint flux comparison to
tasks/task_14_variance_reduction/5_shielded_room_fw_cadis.ipynb.The notebook previously plotted only the FW-CADIS weight windows and left a placeholder markdown cell for plotting the flux. This change:
Why
Seeing the forward and adjoint flux together is the clearest way to build intuition for FW-CADIS: the forward flux collapses by orders of magnitude into the shield (which is why an analog run starves those regions), while the adjoint flux is highest in exactly those hard to reach regions, and the weight windows follow the adjoint importance.
Note
The forward solve statepoint is read from
statepoint.forward.<batch>.h5. This relies on OpenMC writing the forward solve output during an adjoint (FW-CADIS) random ray run, so the notebook needs a recent OpenMC.