mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Remove self loops from spontaneous fission decay mode (#3907)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
e431d49bec
commit
a1df5842e0
2 changed files with 14 additions and 11 deletions
|
|
@ -2,7 +2,6 @@ from collections.abc import Iterable
|
|||
from functools import cached_property
|
||||
from io import StringIO
|
||||
from math import log
|
||||
import re
|
||||
from warnings import warn
|
||||
|
||||
import numpy as np
|
||||
|
|
@ -13,7 +12,7 @@ import openmc.checkvalue as cv
|
|||
from openmc.exceptions import DataError
|
||||
from openmc.mixin import EqualityMixin
|
||||
from openmc.stats import Discrete, Tabular, Univariate, combine_distributions
|
||||
from .data import ATOMIC_NUMBER, gnds_name
|
||||
from .data import gnds_name, zam
|
||||
from .function import INTERPOLATION_SCHEME
|
||||
from .endf import Evaluation, get_head_record, get_list_record, get_tab1_record
|
||||
|
||||
|
|
@ -241,9 +240,7 @@ class DecayMode(EqualityMixin):
|
|||
@property
|
||||
def daughter(self):
|
||||
# Determine atomic number and mass number of parent
|
||||
symbol, A = re.match(r'([A-Zn][a-z]*)(\d+)', self.parent).groups()
|
||||
A = int(A)
|
||||
Z = ATOMIC_NUMBER[symbol]
|
||||
Z, A, _ = zam(self.parent)
|
||||
|
||||
# Process changes
|
||||
for mode in self.modes:
|
||||
|
|
@ -253,6 +250,9 @@ class DecayMode(EqualityMixin):
|
|||
delta_A, delta_Z = changes
|
||||
A += delta_A
|
||||
Z += delta_Z
|
||||
break
|
||||
else:
|
||||
return None
|
||||
|
||||
return gnds_name(Z, A, self._daughter_state)
|
||||
|
||||
|
|
|
|||
|
|
@ -413,6 +413,8 @@ class Chain:
|
|||
type_ = ','.join(mode.modes)
|
||||
if mode.daughter in decay_data:
|
||||
target = mode.daughter
|
||||
elif 'sf' in type_:
|
||||
target = None
|
||||
else:
|
||||
print('missing {} {} {}'.format(
|
||||
parent, type_, mode.daughter))
|
||||
|
|
@ -641,7 +643,7 @@ class Chain:
|
|||
|
||||
# Allow for total annihilation for debug purposes
|
||||
if branch_val != 0.0:
|
||||
if target is not None:
|
||||
if target is not None and 'sf' not in decay_type:
|
||||
k = self.nuclide_dict[target]
|
||||
setval(k, i, branch_val)
|
||||
|
||||
|
|
@ -731,11 +733,12 @@ class Chain:
|
|||
|
||||
# Determine light nuclide production, e.g., (n,d) should
|
||||
# produce H2
|
||||
light_nucs = REACTIONS[r_type].secondaries
|
||||
for light_nuc in light_nucs:
|
||||
k = self.nuclide_dict.get(light_nuc)
|
||||
if k is not None:
|
||||
setval(k, i, path_rate * br)
|
||||
if path_rate != 0.0:
|
||||
light_nucs = REACTIONS[r_type].secondaries
|
||||
for light_nuc in light_nucs:
|
||||
k = self.nuclide_dict.get(light_nuc)
|
||||
if k is not None:
|
||||
setval(k, i, path_rate * br)
|
||||
|
||||
else:
|
||||
for product, y in fission_yields[nuc.name].items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue