mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Merge pull request #472 from smharper/pyapi_summary_sab_bug
Fix PyAPI summary S(alpha,beta) bug
This commit is contained in:
commit
fe43819e90
1 changed files with 5 additions and 4 deletions
|
|
@ -72,6 +72,9 @@ class Summary(object):
|
|||
nuc_densities = self._f['materials'][key]['nuclide_densities'][...]
|
||||
nuclides = self._f['materials'][key]['nuclides'].value
|
||||
|
||||
# Create the Material
|
||||
material = openmc.Material(material_id=material_id, name=name)
|
||||
|
||||
# Read the names of the S(a,b) tables for this Material and add them
|
||||
if 'sab_names' in self._f['materials'][key]:
|
||||
sab_tables = self._f['materials'][key]['sab_names'].value
|
||||
|
|
@ -79,10 +82,8 @@ class Summary(object):
|
|||
name, xs = sab_table.decode().split('.')
|
||||
material.add_s_alpha_beta(name, xs)
|
||||
|
||||
# Create the Material
|
||||
material = openmc.Material(material_id=material_id, name=name)
|
||||
|
||||
# Set the Material's density to g/cm3 - this is what is used in OpenMC
|
||||
# Set the Material's density to g/cm3 - this is what is used in
|
||||
# OpenMC
|
||||
material.set_density(density=density, units='g/cm3')
|
||||
|
||||
# Add all nuclides to the Material
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue