mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Merge pull request #2205 from yardasol/add_components_metastable_fix
Fix errorneous behavior when adding metastable nuclides via `add_components`
This commit is contained in:
commit
b779141b57
2 changed files with 2 additions and 1 deletions
|
|
@ -438,7 +438,7 @@ class Material(IDManagerMixin):
|
|||
params['percent_type'] = percent_type
|
||||
|
||||
## check if nuclide
|
||||
if str.isdigit(component[-1]):
|
||||
if not component.isalpha():
|
||||
self.add_nuclide(component, **params)
|
||||
else: # is element
|
||||
kwargs = params
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ def test_add_components():
|
|||
'O16': 1.0,
|
||||
'Zr': 1.0,
|
||||
'O': 1.0,
|
||||
'Ag110_m1': 1.0,
|
||||
'U': {'percent': 1.0,
|
||||
'enrichment': 4.5},
|
||||
'Li': {'percent': 1.0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue