mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Fixed a bug in plotting cross sections with S(a,b) data (#3558)
This commit is contained in:
parent
00edc77691
commit
eaed400987
1 changed files with 8 additions and 8 deletions
|
|
@ -413,7 +413,8 @@ def _calculate_cexs_nuclide(this, types, temperature=294., sab_name=None,
|
|||
|
||||
# Prep S(a,b) data if needed
|
||||
if sab_name:
|
||||
sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
|
||||
sab = openmc.data.ThermalScattering.from_hdf5(
|
||||
library.get_by_material(sab_name, data_type='thermal')['path'])
|
||||
# Obtain the nearest temperature
|
||||
if strT in sab.temperatures:
|
||||
sabT = strT
|
||||
|
|
@ -640,14 +641,13 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
|
|||
sab = openmc.data.ThermalScattering.from_hdf5(
|
||||
library.get_by_material(sab_name, data_type='thermal')['path'])
|
||||
for nuc in sab.nuclides:
|
||||
sabs[nuc] = library.get_by_material(sab_name,
|
||||
data_type='thermal')['path']
|
||||
sabs[nuc] = sab_name
|
||||
else:
|
||||
if sab_name:
|
||||
sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
|
||||
sab = openmc.data.ThermalScattering.from_hdf5(
|
||||
library.get_by_material(sab_name, data_type='thermal')['path'])
|
||||
for nuc in sab.nuclides:
|
||||
sabs[nuc] = library.get_by_material(sab_name,
|
||||
data_type='thermal')['path']
|
||||
sabs[nuc] = sab_name
|
||||
|
||||
# Now we can create the data sets to be plotted
|
||||
xs = {}
|
||||
|
|
@ -655,8 +655,8 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
|
|||
for nuclide in nuclides.items():
|
||||
name = nuclide[0]
|
||||
nuc = nuclide[1]
|
||||
sab_tab = sabs[name]
|
||||
temp_E, temp_xs = calculate_cexs(nuc, types, T, sab_tab, cross_sections,
|
||||
sab_name = sabs[name]
|
||||
temp_E, temp_xs = calculate_cexs(nuc, types, T, sab_name, cross_sections,
|
||||
ncrystal_cfg=ncrystal_cfg
|
||||
)
|
||||
E.append(temp_E)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue