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

Lattice Unverse Problems #25

Open
yrrepy opened this issue Jan 31, 2025 · 1 comment
Open

Lattice Unverse Problems #25

yrrepy opened this issue Jan 31, 2025 · 1 comment

Comments

@yrrepy
Copy link

yrrepy commented Jan 31, 2025

The following works in MCNP but is not accepted by the converter.

Versions:
openmc_mcnp_adapter 0.1.0 (latest)
Python3.11

7 0 201 -204 205 -210 211 -216 trcl=(2 3 0) lat=1 u=3 imp:n=1
       fill=-3:4 -2:3 0:0
       2 2 2 2 2 2 2 2
       2 1 1 1 1 1 1 2
       2 1 1 1 1 1 1 2
       2 1 1 1 1 1 1 2
       2 1 1 1 1 1 1 2
       2 2 2 2 2 2 2 2
701 0 #7 u=3 imp:n=1

Two problems occur:

Traceback (most recent call last):
File "/theory/pyoung/.local/bin/mcnp_to_openmc", line 8, in
sys.exit(mcnp_to_openmc())
^^^^^^^^^^^^^^^^
File "/theory/pyoung/.local/lib/python3.11/site-packages/openmc_mcnp_adapter/openmc_conversion.py", line 719, in mcnp_to_openmc
model = mcnp_to_model(args.mcnp_filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/theory/pyoung/.local/lib/python3.11/site-packages/openmc_mcnp_adapter/openmc_conversion.py", line 689, in mcnp_to_model
openmc_universes = get_openmc_universes(cells, openmc_surfaces,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/theory/pyoung/.local/lib/python3.11/site-packages/openmc_mcnp_adapter/openmc_conversion.py", line 431, in get_openmc_universes
universes[uid].add_cell(cell)
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RectLattice' object has no attribute 'add_cell'

Traceback (most recent call last):
File "/theory/pyoung/.local/bin/mcnp_to_openmc", line 8, in
sys.exit(mcnp_to_openmc())
^^^^^^^^^^^^^^^^
File "/theory/pyoung/.local/lib/python3.11/site-packages/openmc_mcnp_adapter/openmc_conversion.py", line 719, in mcnp_to_openmc
model = mcnp_to_model(args.mcnp_filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/theory/pyoung/.local/lib/python3.11/site-packages/openmc_mcnp_adapter/openmc_conversion.py", line 689, in mcnp_to_model
openmc_universes = get_openmc_universes(cells, openmc_surfaces,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/theory/pyoung/.local/lib/python3.11/site-packages/openmc_mcnp_adapter/openmc_conversion.py", line 553, in get_openmc_universes
univ_ids = np.asarray(univ_ids, dtype=int)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '(2'

  1. The first can be solved by commenting out cell 701. But the converter should be able to accept it as it.
  2. The second, trcl=(2 3 0) has to be removed, and then the converter works. But the translation is lost.
@MicahGale
Copy link

  1. Could you please update your example to be a full minimum working example, i.e., it could be opened as a valid input by MCNP. You can set your surfaces to be nonsensical to remove any sensitive information.

  2. It's unclear to me if this officially supports matrix fills like you have used here or not.

  3. I suspect that trcl is not supported at all.

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

No branches or pull requests

2 participants