Skip to content

get_microxs_and_flux Incorrect Meshbase #3549

Open

Description

@yrrepy

Bug Description

get_microxs_and_flux uses the meshbase of an existing weight window rather than prescribed domains meshbase

Steps to Reproduce

  • take an OpenMC model
  • apply weight windows
  • use openmc.deplete.get_microxs_and_flux(domains=openmc.MeshBase)
  • no new meshbase is created (corresponding to the domains), rather the existing weight window mesh is erroneously used by the get_microxs_and_flux calculation

Environment

Linux
OpenMC 0.15.3.dev99

Workarounds

  • can adjust the ww.h5 manually to change the ww and mesh ids to something other than 1
  • can adjust the model.xml manually to ids other than

thing is the natural workflows will tend to auto-assign it in Python to id=1

Activity

  1. paulromano commented on Aug 27, 2025

    @paulromano
    Contributor

    I'm a little confused. The domains argument to get_microxs_and_flux should be a specific instance of MeshBase, not the MeshBase class itself.

  2. yrrepy commented on Aug 27, 2025

    @yrrepy
    ContributorAuthor

    perhaps the wrong words.
    I am creating a regular mesh openmc.RegularMesh(), using it as the domains.
    get_microxs_and_flux is ignoring it and using the existing mesh of the weight window

  3. pshriwise commented on Oct 2, 2025

    @pshriwise
    Contributor

    To make sure I'm understanding, @yrrepy, it sounds like this occurs when the Mesh IDs are the same? Is that correct?

    If so, follow up: in this scenario are you applying weight windows as XML objects or using a weight windows HDF5 file?

  4. yrrepy commented on Oct 2, 2025

    @yrrepy
    ContributorAuthor

    I'll look to draw up an example when I can, it's hard as there are many moving parts with prop data
    This was using wws=from_xml (so as XML)

    At large, I'm having all number of knock-on situations:

    • the wws from_wwinp often fails when wwinps are >1.5 GB (it fails at the XML writing stage)
    • which motivates ww.h5, but then the API doesn't currently support ww.h5 (model imports).
    • Then you don't auto-get your mesh and have to hard program it in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions