mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Changes in data/products.py from PullRequest inc. review
This commit is contained in:
parent
07ee5344d5
commit
14d22b9fe3
1 changed files with 7 additions and 10 deletions
|
|
@ -31,25 +31,22 @@ class Product(EqualityMixin):
|
|||
delayed neutron precursor). A special value of 'total' is used when the
|
||||
yield represents particles from prompt and delayed sources.
|
||||
particle : str
|
||||
What particle the reaction product is.
|
||||
The particle type of the reaction product
|
||||
yield_ : openmc.data.Function1D
|
||||
Yield of secondary particle in the reaction.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, particle='neutron'):
|
||||
self.particle = particle
|
||||
self.decay_rate = 0.0
|
||||
self.emission_mode = 'prompt'
|
||||
self.distribution = []
|
||||
self.applicability = []
|
||||
self.yield_ = Polynomial((1,)) # 0-order polynomial i.e. a constant
|
||||
self.decay_rate = 0.0
|
||||
self.distribution = []
|
||||
self.emission_mode = 'prompt'
|
||||
self.particle = particle
|
||||
self.yield_ = Polynomial((1,)) # 0-order polynomial, i.e., a constant
|
||||
|
||||
def __repr__(self):
|
||||
if isinstance(self.yield_, Real):
|
||||
return "<Product: {}, emission={}, yield={}>".format(
|
||||
self.particle, self.emission_mode, self.yield_)
|
||||
elif isinstance(self.yield_, Tabulated1D):
|
||||
if isinstance(self.yield_, Tabulated1D):
|
||||
if np.all(self.yield_.y == self.yield_.y[0]):
|
||||
return "<Product: {}, emission={}, yield={}>".format(
|
||||
self.particle, self.emission_mode, self.yield_.y[0])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue