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

Kinetics parameters using Iterated Fission Probability #3133

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

JoffreyDorville
Copy link
Contributor

Description

Calculation of adjoint-weighted kinetics parameters (effective generation time and effective delayed neutron fraction) using the Iterated Fission Probability (IFP) method.

This implementation uses the same approach as the IFP implementation in Serpent 2 documented in [1].

To generate results for both effective generation time and effective delayed neutron fraction, IFP settings need to be set:

settings.iterated_fission_probability = {
    "parameter": "both",
    "n_generation": 5
}

and a specific tally has to be set:

tally = openmc.Tally(name="ifp-scores")
tally.scores = [
    "ifp-time-numerator",
    "ifp-beta-numerator",
    "ifp-denominator"
]

Testing is still in progress. I will update the draft to PR once I have finished the remaining tests.

References

[1] J. Leppänen, M. Aufiero, E. Fridman, R. Rachamin, and S. van der Marck, “Calculation of effective point kinetics parameters in the Serpent 2 Monte Carlo code,” Annals of Nuclear Energy, vol. 65, pp. 272–279, Mar. 2014, doi:10.1016/j.anucene.2013.10.032

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@zhangzeqin1997
Copy link

I have tested this feature, and everything works well at the moment. I would like to inquire if there are any plans to add output for the individual delayed neutron group fractions and decay constants, similar to how it is done in MCNP.

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @JoffreyDorville and apologies it's taken me some time to get you some feedback on this. Here is a set of initial comments. In addition to the line comments/questions below, I'll add two other comments:

  • It would be nice if some of the logic/functionality here could be isolated into its own source file (ifp.h/ifp.cpp).
  • I see quite a few blocks of code that seem repeated (for example, in bank.cpp and eigenvalue.cpp). If there's any way to encapsulate them in a function so that they don't need to be repeated, that would help reduce the total number of lines.

Comment on lines +123 to +124
extern IFPParameter
ifp_parameter; //!< Parameter to calculate for Iterated Fission Probability
Copy link
Contributor

Choose a reason for hiding this comment

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

I see right now this is determined based on user input in the Settings object. I think it would be better if this was determined automatically based on what scores show up in tallies (i.e., if the user specified "ifp-time-numerator" as a score, then activate the logic to collect the information needed accordingly), which leaves less for the user to think about.

Comment on lines +215 to +216
vector<int> updated_ifp_delayed_groups;
vector<double> updated_ifp_lifetimes;
Copy link
Contributor

Choose a reason for hiding this comment

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

This will result in memory allocation in the middle of a particle's transport, which is never desirable 1) because it can degrade threading efficiency and 2) it doesn't fit GPU programming models well. Is there any way we can avoid the memory allocation?

src/particle.cpp Outdated
@@ -233,13 +234,15 @@ void Particle::event_advance()
coord(j).r += distance * coord(j).u;
}
this->time() += distance / this->speed();
this->lifetime() += distance / this->speed();
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that lifetime looks identical to time here, can you explain what the difference between the two is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants