mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
fix errorneous behavior when adding metastable nuclides via add_components
This commit is contained in:
parent
b0b37119f2
commit
0214b22036
2 changed files with 3 additions and 1 deletions
|
|
@ -438,7 +438,8 @@ class Material(IDManagerMixin):
|
|||
params['percent_type'] = percent_type
|
||||
|
||||
## check if nuclide
|
||||
if str.isdigit(component[-1]):
|
||||
if str.isdigit(component[-1]) or (component[-1] == 'm'
|
||||
and str.isdigit(component[-2])):
|
||||
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,
|
||||
'Ag110m': 1.0,
|
||||
'U': {'percent': 1.0,
|
||||
'enrichment': 4.5},
|
||||
'Li': {'percent': 1.0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue