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

Use number of particles for tally normalization #1442

Merged
merged 4 commits into from
Jan 10, 2020

Conversation

paulromano
Copy link
Contributor

As described in #1417, our tallies are currently normalized based on the total starting weight of particles in a batch, which can potentially cause problems with variance reduction schemes. In principle, if you halve the weight of the starting particles, you should get tally results that are half as much. This PR changes that normalization. Note that the normalization for k-effective tallies still uses the total weight to get the correct value.

Some of the CMFD test results changed ever so slightly because of this new normalization (in CMFD, we are changing the weights of source particles, so roundoff differences do ensue). I also added a tally in our one test that uses multiple generations per batch to ensure that we are not messing things up there.

A review from @shimwell and/or @makeclean would be appreciated. In particular, does this fix any issues you guys were running into?

Closes #1417.

Copy link
Contributor

@pshriwise pshriwise left a comment

Choose a reason for hiding this comment

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

Looks good to me! Will merge this evening - wanted to wait for a CI job I had to restart to finish.

@pshriwise pshriwise merged commit f4e46fd into openmc-dev:develop Jan 10, 2020
@paulromano paulromano deleted the fixed-source-wgt-norm branch January 10, 2020 04:32
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.

Normalization of tallies based on starting weight
2 participants