-
Notifications
You must be signed in to change notification settings - Fork 492
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
Implement filter for cosine of angle of surface crossing #2768
Conversation
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.
Thanks for the PR @zoeprieto! Quick design question and then once we resolve that, I can review in full.
0d31d0d
to
af53028
Compare
@paulromano sorry for the delay, I have already resolved the conflicts and pushing this PR again! |
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.
@zoeprieto Thanks for the updates here! I simplified the implementation considerably by simply inheriting from MuFilter
(on both the C++ and Python sides). As you can see, this reduces the implementation in filter_musurface.cpp to <40 lines. I also added a simple regression test to augment what you had already added for a unit test.
Description
This PL addresses and resolves issue #2640 in the OpenMC repository, which pertains to the possibility of calculating the mu angular distribution of any surface current.
I have added a MuSurface filter to be able to calculate such a distribution when used with a SurfaceFilter.
Currently, the MuFilter only calculates the mu distribution for scattering angles and cannot be combined with a surface filter. On the other hand, the PolarFilter only calculates the polar angle distribution for a plane with the z-normal.
Therefore, this allows us to calculate the mu distribution for a current on any of the OpenMC surfaces.
Fixes #2640
Checklist