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

OpenMCMaterial::zaid_to_name doesn't work with decay-only isotopes from Serpent material input #68

Open
yardasol opened this issue Feb 21, 2022 · 0 comments

Comments

@yardasol
Copy link

I'm trying to convert this material file from Serpent to OpenMC:

mat fuel -4.69
   .
   .
   .
   120230  -0.00000000000000E+00
   .
   .
   .

The dotted lines are filled in with other nuclides.

Running csg2csg -i test_mat.ini -f serpent -o openmc gives me the following error:

File "/home/ooblack/miniconda3/envs/saltproc-env/lib/python3.9/site-packages/csg2csg/OpenMCMaterial.py", line 41, in zaid_to1_name
    name = name_zaid[zz]
KeyError: 120

Using pdb to get the state before the exception gets thrown, I find that zaid_string is 120230.

Now, the serpent input file syntax for the material card specifies:

The nuclide identifier for nuclides with associated cross-sections corresponds to ZZAAA.ID and, for nuclides without associated cross-sections, e.g., decay nuclides, to ZZAAAI. The identifiers include Z, the atomic number; A, the mass number of the nuclide; I, the isomeric state (0 = ground state, 1 = metastable state); and ID, the library identifier. For nuclides without associated cross-sections, include the fix option to indicate the library and temperature of the given nuclides.

There are many more decay-only nuclides in my material file, and I believe many of them are processed incorrectly but no error is thrown because the (potentially incorrect) element numbers that get sent as a key to the name_zaid dictionary have associated values.

I think this issue could be fixed by adding some lines to SerpentInput.__get_material_card to detect nuclides in this format.

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

1 participant