Add ability to provide an initial weight windows to MAGIC method
Description
There is currently no way to provide weight windows as an "initial guess" to the MAGIC method. This is useful when applying a density progression method to help push particles to the furthest extents of the model quicker for the purposes of weight window generation (e.g., documented here https://www.sciencedirect.com/science/article/abs/pii/S0149197016300695 and while I cant find it now, in a paper by Booth).
An optional parameter to the openmc.WeightWindowGenerator constructor could be provided which specifies the weight window initial conditions via an openmc.WeightWindows object.
Alternatives
None
Compatibility
If an optional parameter is used, then the API will maintain compatibility.
In case it's a vaiable short-term solution for you, there's a sort of roundabout approach but I think you could accomplish this this using openmc.lib.
With an openmc.lib.statepoint_load call before you start transport you can bring in the flux from the previous simulation, create a weight window object from the tally of interest using openmc.lib.WeightWindows.from_tally and then call WeightWindows.update_magic before running any particles to use the previous guess.
All the same, it would be nice to have a way of doing this using the pure Python API via the XML files.
Yeah, I've been doing it with the API, but it's a bit daunting for a new user.
On Fri, Apr 18, 2025, 10:28 AM Patrick Shriwise @.***> wrote:
In case it's a vaiable short-term solution for you, there's a sort of roundabout approach but I think you could accomplish this this using openmc.lib.
With an openmc.lib.statepoint_load call before you start transport you can bring in the flux from the previous simulation, create a weight window object from the tally of interest using openmc.lib.WeightWindows.from_tally and then call WeightWindows.update_magic before running any particles to use the previous guess.
All the same, it would be nice to have a way of doing this using the pure Python API via the XML files.
— Reply to this email directly, view it on GitHub https://github.com/openmc-dev/openmc/issues/3378#issuecomment-2815644545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH5GM635POWKFR7NBZ5YGD22EKYNAVCNFSM6AAAAAB3M6GPFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJVGY2DINJUGU . You are receiving this because you authored the thread.Message ID: @.***> pshriwise left a comment (openmc-dev/openmc#3378) https://github.com/openmc-dev/openmc/issues/3378#issuecomment-2815644545
In case it's a vaiable short-term solution for you, there's a sort of roundabout approach but I think you could accomplish this this using openmc.lib.
With an openmc.lib.statepoint_load call before you start transport you can bring in the flux from the previous simulation, create a weight window object from the tally of interest using openmc.lib.WeightWindows.from_tally and then call WeightWindows.update_magic before running any particles to use the previous guess.
All the same, it would be nice to have a way of doing this using the pure Python API via the XML files.
— Reply to this email directly, view it on GitHub https://github.com/openmc-dev/openmc/issues/3378#issuecomment-2815644545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH5GM635POWKFR7NBZ5YGD22EKYNAVCNFSM6AAAAAB3M6GPFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJVGY2DINJUGU . You are receiving this because you authored the thread.Message ID: @.***>