Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit Fission Product Modeling #1022

Merged
merged 14 commits into from
Dec 28, 2022
Merged

Explicit Fission Product Modeling #1022

merged 14 commits into from
Dec 28, 2022

Conversation

jakehader
Copy link
Member

@jakehader jakehader commented Dec 13, 2022

Description

Updates to the fission product model and nuclides to allow for users to model fission products explicitly based on which cross section libraries/software will be used to generate multi-group cross sections.

This implements a method that looks at the existing nuclides defined in the blueprints nuclideFlags and amends this to include all nuclides within regions that are determined to be Depletable based on which nuclides the user sets as being burn=True. This will not check that the user defines the correct depletable nuclides for this determination, but will only add all the nuclides that are missing to the depletable regions. This is reasonable since the behavior is similar to how it is when the user selects another fission product model option.

This change also introduces a mechanism to remove gaseous fission products from the core that can be called upon by a fuel performance or other plugin code. The previous implementation of this modified the fission yields as a surrogate for this removal, but upon further review it is better to update the number densities within the blocks directly compared to modifying the fission yields. This is currently left not implemented.

Finally, the fuel performance parameters were updated to add setters on the gasReleaseFraction and the bondRemoved. The description suggested that these values should only range from [0, 1] and any value outside of this range is not valid. The setters now check for this and raise a ValueError if these conditions are not met.


Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes (location doc/release/0.X.rst) are up-to-date with any bug fixes or new features.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

to model fission products explicitly based on which cross section
libraries/software will be used to generate multi-group cross sections.

This implements a method that looks at the existing nuclides defined
in the blueprints `nuclideFlags` and amends this to include all nuclides
within regions that are determined to be `Depletable` based on which nuclides
the user sets as being `burn=True`. This will not check that the user
defines the correct depletable nuclides for this determination, but will
only add all the nuclides that are missing to the depletable regions. This
is reasonable since the behavior is similar to how it is when the user
selects another fission product model option.

This change also introduces a mechanism to remove gaseous fission products
from the core that can be called upon by a fuel performance or other
plugin code. The previous implementation of this modified the fission
yields as a surrogate for this removal, but upon further review it is
better to update the number densities within the blocks directly compared
to modifying the fission yields. By modifying the number densities directly
we are explicitly handling both the microscope and macroscopic cross section
effects in lattice physics calculations and in system eigenvalue/flux
solutions.

Finally, the fuel performance parameters were updated to add setters on
the `gasReleaseFraction` and the `bondRemoved`. The description suggested
that these values should only range from [0, 1] and any value outside of
this range is not valid. The setters now check for this and raise a
ValueError if these conditions are not met.
@jakehader jakehader added bug Something is wrong: Highest Priority enhancement New feature or request labels Dec 13, 2022
@jakehader jakehader requested a review from onufer December 13, 2022 02:14
@jakehader
Copy link
Member Author

This PR depends on #998 and is basically just pulling out commits from there to isolate changes with added unit tests. This is functional for our internal needs

@keckler
Copy link
Member

keckler commented Dec 19, 2022

@jakehader

Can I make the request that we split this into two separate PRs: (1) for the explicit FP modeling and (2) for the FPs to be removed from the fuel.

It appears to me that these two capabilities are separable, and it would make it much easier during our internal integration testing in the process of pulling this into our app.

If you think this is possible, let me know if I can be any help.

@jakehader
Copy link
Member Author

jakehader commented Dec 20, 2022

@jakehader

Can I make the request that we split this into two separate PRs: (1) for the explicit FP modeling and (2) for the FPs to be removed from the fuel.

It appears to me that these two capabilities are separable, and it would make it much easier during our internal integration testing in the process of pulling this into our app.

If you think this is possible, let me know if I can be any help.

I will consider it since these are two separate features.

Edit: I decided that it doesn't make sense to decouple these additions since the code changes for just adding the explicitFissionProducts setting without further updates throughout would be a trivial change and the next PR would be just as large.

# Conflicts:
#	armi/physics/neutronics/fissionProductModel/lumpedFissionProduct.py
#	armi/physics/neutronics/fissionProductModel/tests/test_lumpedFissionProduct.py
#	armi/resources/referenceFissionProducts.dat
#	doc/release/0.2.rst
…el treatment with fission gas removal implemented
@jakehader jakehader requested review from keckler, albeanth, opotowsky and john-science and removed request for onufer December 21, 2022 02:18
…the nucDirectory to get the displacement energies from the element symbol rather than the element object
Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't finish the code review yet but I figured I'd leave feedback tonight that you can work on first thing in the AM while I/we finish up our reviews.

There is a significant coverage drop despite all of the testing work you did. There's two methods/functions that are newly uncovered, and a new one that needs to get tested. Since I can't comment on code that's not changed....well, you'll see what I did...

Copy link
Member

@keckler keckler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, here's some comments for you at this point.

I still have to review 2 files worth of tests and referenceFissionProducts.dat. So probably any further comments will be minor.

I have a few concerns, particularly related to the removal of fission gases. Those are captured in comments throughout.

I also am worried that the changed handling of the gaseous fission products might surprise non-TP users of ARMI if all of the sudden their block number densities are different when they update their framework.

I do not disagree that this change should be made, but I think it is likely to
cause some confusion down the line. That is really a product of having a bad
fission gas model in the first place, but still. Probably nothing can be done about that if we are intent on fixing the model.

gas removal code because it wasn't working correctly.
@john-science
Copy link
Member

It's a big PR.

I see changes to blueprints and settings. Are these backwards compatible? I just want to make sure we aren't breaking all of the current, really important, settings/blueprints YAML files we have lying around.

@jakehader
Copy link
Member Author

It's a big PR.

I see changes to blueprints and settings. Are these backwards compatible? I just want to make sure we aren't breaking all of the current, really important, settings/blueprints YAML files we have lying around.

@john-science - existing blueprints and settings are not impacted by this change. This change only impacts modeling with fpModel is set to explicitFissionProducts, but the default is still to use lumped fission products.

…ission product number densities rather than assuming that the first LFP in the collection contains the entire set of nuclides required.
@jakehader jakehader removed the request for review from albeanth December 27, 2022 20:47
Copy link
Member

@keckler keckler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakehader Thank you for all of your work on this. I think this puts us in a good place to be able to model the explicit fission products!

Comment on lines +94 to +95
from armi.physics.neutronics.fissionProductModel import lumpedFissionProduct
from armi.nucDirectory import elements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty certain these added imports are not used.

@keckler
Copy link
Member

keckler commented Dec 27, 2022

I wanted to update this thread with the current state of what all was changed and/or added with this PR, since the target changed a couple times.

This PR enables the modeling of explicit fission products, as compared to previously being limited to using lumped fission products at best.

This PR does NOT implement the correct removal of fission gases from blocks. However, it does remove the previous implementation, which was modifying the yields of fission products to artificially exclude some fraction of gaseous fission products. Now, fission products are left in place, and a warning is issued if a user tries to remove them via the removeFissionGasesFromBlocks() method. If one wants to remove fission gases, they should overwrite that method from within their own plugin.

That is my understanding, but please feel free to chime in with more details if I am wrong.

@opotowsky
Copy link
Member

Thanks so much for this enormous lift @jakehader !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong: Highest Priority enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants