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

Adding weight window example #14

Merged
merged 7 commits into from
Nov 21, 2024
Merged

Conversation

shimwell
Copy link
Member

This PR attempts to add an example of the new openmc CPP weight windows using openmc lib.

I've made a shielding bunker room and run the simulation for the same compute time (30 seconds on this laptop) with and without weight windows enabled to show the improved flux maps that can be achieved with weight windows.

Many thanks to @pshriwise for adding this feature.

I actually made this example for my own neutronics-workshop but thought it might be worth sharing a little wider as the parametric geometry is quite nice and we are in need of a VR WW example over here

ps it might be worth squashing this PR like we do on the openmc repo now

@paulromano paulromano requested a review from pshriwise June 20, 2023 01:01
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.

One small comment here to start. Thank you for this contribution @shimwell!

shielded_room_weight_window.ipynb Outdated Show resolved Hide resolved
@pshriwise
Copy link
Contributor

Another small comment: Can we add colorbars to the plots with consistent bounds for the mean and std. dev. respectively?

@shimwell
Copy link
Member Author

shimwell commented Aug 7, 2023

Thanks Patrick,

by the way I think it might be worth squashing this repo like we do for the main openmc repo. The ipython notebooks contain images and these change on each commit making the full commit history relatively large

@pshriwise
Copy link
Contributor

pshriwise commented Aug 7, 2023

Thanks Patrick,

by the way I think it might be worth squashing this repo like we do for the main openmc repo. The ipython notebooks contain images and these change on each commit making the full commit history relatively large

Agreed! I'll use that merge style here.

@shimwell
Copy link
Member Author

shimwell commented Aug 7, 2023

Another small comment: Can we add colorbars to the plots with consistent bounds for the mean and std. dev. respectively?

I'm keen to make the plots better by adding color bars and axis labels. I can do this with matplotlib commands here on the example

If this PR goes in then I can make these plots with a single function call and reduce the amount of code in this notebook considerably while also getting colorbars, axis titles etc.

So can I come back to addressing this request after the fate of this PR has been decided

@pshriwise
Copy link
Contributor

Taking another look at these today: I think something that might improve the clarity on the effect of variance reduction in this problem is to move the source upward so there's a less direct path for particles to enter the hallway adjacent to the room. We used this notebook as a starting point in our course at UW this spring and I thought was a nice demonstration! Thanks @shimwell

https://github.com/pshriwise/ne506-sp-24/blob/main/openmc/shielded_room_weight_window.ipynb

@pshriwise pshriwise changed the base branch from main to develop July 11, 2024 03:29
@pshriwise
Copy link
Contributor

Going to go ahead and merge this for the nice contribution that it is. I have some additions that simplify the geometry creation from our latest NEA workshop and highlight use of the Polygon surface composite. I'll submit those in a subsequent PR.

Thanks @shimwell!

@pshriwise pshriwise merged commit 0284041 into openmc-dev:develop Nov 21, 2024
1 check passed
@shimwell
Copy link
Member Author

Thanks @pshriwise , tag me in the follow up PR and i can review

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.

2 participants