Skip to content

Lattice Unverse Problems #25

@yrrepy

Description

@yrrepy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions