From 5c502ddb3e3a4e2112b93d6afdfc7f0afbc85194 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 26 Jan 2026 11:09:58 -0600 Subject: [PATCH] Do not add radioactive Ta180 when calling add_element('Ta') (#3750) --- openmc/element.py | 2 -- tests/unit_tests/test_element.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/openmc/element.py b/openmc/element.py index f1d8f5f24..5deede971 100644 --- a/openmc/element.py +++ b/openmc/element.py @@ -184,8 +184,6 @@ class Element(str): for nuclide in absent_nuclides: if nuclide in ['O17', 'O18'] and 'O16' in mutual_nuclides: abundances['O16'] += NATURAL_ABUNDANCE[nuclide] - elif nuclide == 'Ta180_m1' and 'Ta180' in library_nuclides: - abundances['Ta180'] = NATURAL_ABUNDANCE[nuclide] elif nuclide == 'Ta180_m1' and 'Ta181' in mutual_nuclides: abundances['Ta181'] += NATURAL_ABUNDANCE[nuclide] elif nuclide == 'W180' and 'W182' in mutual_nuclides: diff --git a/tests/unit_tests/test_element.py b/tests/unit_tests/test_element.py index d91cfaf6e..82e526ec3 100644 --- a/tests/unit_tests/test_element.py +++ b/tests/unit_tests/test_element.py @@ -45,11 +45,11 @@ def test_expand_no_isotopes(): def test_expand_ta(): - ref = {'Ta180': 0.01201, 'Ta181': 99.98799} + ref = {'Ta181': 100.0} element = openmc.Element('Ta') for isotope in element.expand(100.0, 'ao'): assert isotope[1] == approx(ref[isotope[0]]) - + def test_expand_exceptions(): """ Test that correct exceptions are raised for invalid input """