Implementation of migration area score#3810
Implementation of migration area score#3810GuySten wants to merge 11 commits intoopenmc-dev:developfrom
Conversation
| k_abs_tra; //!< sum over batches of k_absorption * k_tracklength | ||
| k_abs_tra; //!< sum over batches of k_absorption * k_tracklength | ||
| extern bool | ||
| migration_present; //! Does an active tally contains a migration score |
There was a problem hiding this comment.
this global variable is justifiable because we need it during the simulation at every BC
| extern double total_weight; //!< Total source weight in a batch | ||
| extern int64_t work_per_rank; //!< number of particles per MPI rank | ||
| extern bool | ||
| nonvacuum_boundary_present; //!< Does the geometry contain non-vacuum b.c. |
There was a problem hiding this comment.
this one is not, it's a setup item it should be handled with a check over all surfaces not the setting of a global boolean
There was a problem hiding this comment.
This variable is set when reading surfaces and used when setting tallies.
So removing it will involve alot of function signature change.
I think this way is better.
There was a problem hiding this comment.
you would just need to not set it when reading surfaces, then when setting tallies you can loop over the geometry/surfaces if migration tallies are used to check their type
There was a problem hiding this comment.
In general it is not recommended to iterate over cells or surfaces twice because there are models with alot of cells and surfaces.
There was a problem hiding this comment.
@paulromano, what do you think?
This issue can affect performance.
| tally.filters = [energy_filter] | ||
| model.tallies = [tally] | ||
|
|
||
| return model |
There was a problem hiding this comment.
is this test case the one used for the figures? If so let's keep it, we somewhat know what the result looks like
But we also need coverage on all the other types of supported boundary conditions. So let's make either:
- a dummy test featuring all these
or better: - a test featuring these BCs but that gives the exact same result due to the symmetries of the geometry
There was a problem hiding this comment.
The current regression test is the same one from the example.
I've added a test that a large water sphere gives the same results as a small one with reflective boundary conditions.
I think I know how to extend this PR to white boundary conditions but I will leave that as a potential future PR.
There was a problem hiding this comment.
I think I know how to extend this PR to white boundary conditions but I will leave that as a potential future PR.
Yes for sure.
If OpenMC testing involves exception testing we'll just want a test that shows the error.
@paulromano might give guidance on whether it's needed here
Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
|
@GuySten you should be able to lump the suggestions from the files tab (cant do it from the conversation tab) to limit the test suite runs (for next time) |
Description
This PR implement 'migration-area' score to calculate diffusion coefficients and transport cross sections for multigroup.
Fixes #1734
Theory
https://www.researchgate.net/publication/324831861_Group-wise_Tally_Scheme_of_Incremental_Migration_Area_for_Cumulative_Migration_Method
Example
Reference results:
Checklist