mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Address @paulromano comments in #1023
This commit is contained in:
parent
7dcd6239eb
commit
4ebeb737ab
11 changed files with 95 additions and 70 deletions
|
|
@ -24,8 +24,9 @@ from openmc.stats.univariate import Uniform, Tabular, Legendre
|
|||
|
||||
_LIBRARY = {0: 'ENDF/B', 1: 'ENDF/A', 2: 'JEFF', 3: 'EFF',
|
||||
4: 'ENDF/B High Energy', 5: 'CENDL', 6: 'JENDL',
|
||||
31: 'INDL/V', 32: 'INDL/A', 33: 'FENDL', 34: 'IRDF',
|
||||
35: 'BROND', 36: 'INGDB-90', 37: 'FENDL/A', 41: 'BROND'}
|
||||
17: 'TENDL', 18: 'ROSFOND', 21: 'SG-21', 31: 'INDL/V',
|
||||
32: 'INDL/A', 33: 'FENDL', 34: 'IRDF', 35: 'BROND',
|
||||
36: 'INGDB-90', 37: 'FENDL/A', 41: 'BROND'}
|
||||
|
||||
_SUBLIBRARY = {
|
||||
0: 'Photo-nuclear data',
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ _STOPPING_POWERS = {}
|
|||
# for each element are in a 2D array with shape (n, k) stored on the key 'Z'.
|
||||
_BREMSSTRAHLUNG = {}
|
||||
|
||||
|
||||
class AtomicRelaxation(EqualityMixin):
|
||||
"""Atomic relaxation data.
|
||||
|
||||
|
|
@ -328,7 +329,7 @@ class AtomicRelaxation(EqualityMixin):
|
|||
|
||||
|
||||
class IncidentPhoton(EqualityMixin):
|
||||
"""Photon interaction data.
|
||||
r"""Photon interaction data.
|
||||
|
||||
This class stores photo-atomic, photo-nuclear, atomic relaxation,
|
||||
Compton profile, stopping power, and bremsstrahlung data assembled from
|
||||
|
|
@ -350,9 +351,9 @@ class IncidentPhoton(EqualityMixin):
|
|||
Atomic relaxation data
|
||||
bremsstrahlung : dict
|
||||
Dictionary of bremsstrahlung DCS data with keys 'electron_energy'
|
||||
(incident electron kinetic energy values in eV), 'photon_energy'
|
||||
(incident electron kinetic energy values in [eV]), 'photon_energy'
|
||||
(ratio of the energy of the emitted photon to the incident electron
|
||||
kinetic energy), and 'dcs' (cross sectin values in mb). The cross
|
||||
kinetic energy), and 'dcs' (cross sectin values in [b]). The cross
|
||||
sections are in scaled form: :math:`(\beta^2/Z^2) E_k (d\sigma/dE_k)`,
|
||||
where :math:`E_k` is the energy of the emitted photon.
|
||||
compton_profiles : dict
|
||||
|
|
@ -366,10 +367,10 @@ class IncidentPhoton(EqualityMixin):
|
|||
Contains the cross sections for each photon reaction. The keys are MT
|
||||
values and the values are instances of :class:`PhotonReaction`.
|
||||
stopping_powers : dict
|
||||
Dictionary of stopping power data with keys 'energy' (in eV), 'I' (mean
|
||||
Dictionary of stopping power data with keys 'energy' (in [eV]), 'I' (mean
|
||||
excitation energy), 's_collision' (collision stopping power in
|
||||
eV cm:sup:`2`/g), and 's_radiative' (radiative stopping power in
|
||||
eV cm:sup:`2`/g)
|
||||
[eV cm\ :sup:`2`/g]), and 's_radiative' (radiative stopping power in
|
||||
[eV cm\ :sup:`2`/g])
|
||||
summed_reactions : collections.OrderedDict
|
||||
Contains summed cross sections. The keys are MT values and the values
|
||||
are instances of :class:`PhotonReaction`.
|
||||
|
|
@ -587,13 +588,13 @@ class IncidentPhoton(EqualityMixin):
|
|||
_STOPPING_POWERS['energy'] = f['energy'].value*EV_PER_MEV
|
||||
for i in range(1, 99):
|
||||
group = f['{:03}'.format(i)]
|
||||
_STOPPING_POWERS[i] = {'I': group.attrs['I'],
|
||||
's_collision': group['s_collision'].value,
|
||||
's_radiative': group['s_radiative'].value}
|
||||
|
||||
# Units are in MeV cm^2/g; convert to eV cm^2/g
|
||||
_STOPPING_POWERS[i]['s_collision'] *= EV_PER_MEV
|
||||
_STOPPING_POWERS[i]['s_radiative'] *= EV_PER_MEV
|
||||
_STOPPING_POWERS[i] = {
|
||||
'I': group.attrs['I'],
|
||||
's_collision': group['s_collision'].value*EV_PER_MEV,
|
||||
's_radiative': group['s_radiative'].value*EV_PER_MEV
|
||||
}
|
||||
|
||||
# Add stopping power data
|
||||
if Z < 99:
|
||||
|
|
@ -616,8 +617,9 @@ class IncidentPhoton(EqualityMixin):
|
|||
# Index in data
|
||||
p = 39
|
||||
|
||||
# Get log of incident electron kinetic energy values, used for cubic
|
||||
# spline interpolation in log energy. Units are in MeV, so convert to eV.
|
||||
# Get log of incident electron kinetic energy values, used for
|
||||
# cubic spline interpolation in log energy. Units are in MeV, so
|
||||
# convert to eV.
|
||||
logx = np.log(np.fromiter(brem[p:p+n], float, n)*EV_PER_MEV)
|
||||
p += n
|
||||
|
||||
|
|
@ -628,9 +630,10 @@ class IncidentPhoton(EqualityMixin):
|
|||
for i in range(1, 101):
|
||||
dcs = np.empty([len(log_energy), k])
|
||||
|
||||
# Get the scaled cross section values for each electron energy and
|
||||
# reduced photon energy for this Z
|
||||
y = np.reshape(np.fromiter(brem[p:p+n*k], float, n*k), (n, k))
|
||||
# Get the scaled cross section values for each electron energy
|
||||
# and reduced photon energy for this Z. Units are in mb, so
|
||||
# convert to b.
|
||||
y = np.reshape(np.fromiter(brem[p:p+n*k], float, n*k), (n, k))*1.0e-3
|
||||
p += k*n
|
||||
|
||||
for j in range(k):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue