-
Notifications
You must be signed in to change notification settings - Fork 505
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
Add MG particle speed getter and delayed fission neutron emission #2898
base: develop
Are you sure you want to change the base?
Conversation
The additional step of sampling delayed emission time shifts the random number sequence used in the rest of the random walk, which would make some (if not most) of the regression tests fail. Is revising the regression test keys an option? If not, the solution would be to only perform the delayed time sampling if a time-dependent problem is run (i.e., if |
Thanks @ilhamv! I believe that we should be consuming that extra random number to sample the delayed group emission time, so I'm going to tie @paulromano into this to put it on his radar. I think typically, in the past, people have let a few proposed changes accrue before changing the RNG stream. At that point some statistical equivalence testing is done between the two versions, and all the tests get updated. If we're tracking particle times during normal simulation, the delayed emission times should not be incorrect, IMO. Correctness should not be an option that's off by default--this was the same principle that guided the decision of having resonance upscattering turned on by default, in contrast to most other CE MC codes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am only requesting a change on a typo which was already there but is in a line that you modified; other than that it all looks good to me. Going to wait on @paulromano for his thoughts on updating the tests.
By the way, I think the code here to simulate the transient pulse would be worth including in the examples section. Would you want to include it as part of this PR? |
Co-authored-by: Gavin Ridley <[email protected]>
I really like that principle. 👍🏽
Sure, I'll add the example as part of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilhamv Thanks for this PR and please accept my apologies that I haven't gotten around to properly reviewing it until now. I just made a few cosmetic updates on your branch and also took care of a merge conflict.
As @gridley pointed out, the additional random number that is sampled here for the delayed neutron time will cause the overall stream of random numbers to be different, which will fail most if not all of our regression tests. However, the guiding principle that @gridley put to words is indeed one of our tenets for OpenMC:
Correctness should not be an option that's off by default
So, if we really need to update our regression test results in the name of correctness, so be it. However, first I'll ask whether there are other changes you have in mind that would also result in more random number stream changes, in which case we might want to group them together as we've done previously.
Paul, that's great to hear, because I have had this other change on my radar to change the random number stream. We assume target nuclei are stationary above a certain energy threshold, and there's this recent paper that shows it introduces some non-negligible error for systems with finely distributed resonant material like TRISO or cracked MSR moderator. The asymptotic form of the target velocity should just be to sample directly from Maxwell-Boltzmann, i.e. x y and z velocities are normally distributed. We should fall back to that rather than stationarity. The authors said it's like a 6% slowdown by always sampling the target motion, but so using some asymptotic form might be helpful in that case. |
Ah yes, thanks for bringing that up @gridley. I did talk to the authors of that paper so I'm aware of the issue at hand. |
No problem, @paulromano. Thanks! I think that is the only change needed in the random number stream for analog time-dependent simulations. Unless there are other reactions that produce delayed particles (neutron/photon)..? Some other items that I want to bring up for consideration (not directly related to this PR, though):
|
Description
Add MG particle speed getter and delayed fission neutron emission. This extends OpenMC's capability to run autonomous problems accurately, such as neutron pulse experiments.
Input for
settings.max_secondaries
is added with the default (originally hard-coded) value of 10000. This allows users to set up buffers to run near-critical or super-critical time-dependent problems (accompanied bytime_cutoff
, of course).Fixes #2885
cc: @gridley
Checklist
Verification
MG test
Here is the result of a pulsed infinite homogeneous 361-group problem, where the MGXS is generated from the
pincell
example:The "analytical" reference solution is also shown for verification. The simulation was run in 10 batches with 100k particles per batch.
CE test
Here is the result of the
jezebel
example pulsed with 2 MeV isotropic point source at the origin:The simulation was run in 10 batches with 100k particles per batch.
Estimates of neutron inverse period, or time constant$\alpha$ , can be naively calculated from two consecutive data points:
Experimental value for the prompt neutron time constant ($\alpha_p$ = -640 +- 10 /ms) is also shown above for verification.
Note: In running this Jezebel problem, I had to increase the secondary bank size limit from the default value 10k to 100k.