mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Cosmetic fixes from PullRequest [2019-12-05]
This commit is contained in:
parent
8fcd74b14b
commit
6d0aa86cef
39 changed files with 247 additions and 222 deletions
|
|
@ -3,10 +3,10 @@
|
|||
# for the VERA Depletion Benchmark Suite", CASL-U-2015-1014-000, Rev. 0,
|
||||
# ORNL/TM-2016/53, 2016.
|
||||
#
|
||||
# Note 32 of the 255 nuclides appeare twice as they are both activation
|
||||
# Note 32 of the 255 nuclides appear twice as they are both activation
|
||||
# nuclides (category 1) and fission product nuclides (category 3).
|
||||
|
||||
# Te129 has been added due to it's link to I129 production.
|
||||
# Te129 has been added due to its link to I129 production.
|
||||
|
||||
CASL_CHAIN = {
|
||||
# Nuclide: (Stable, CAT, IFPY, Special yield treatment)
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ for filename in ace_libraries:
|
|||
thermal = openmc.data.ThermalScattering.from_hdf5(
|
||||
nuclides[name])
|
||||
print('Converting {} (ACE) to {} (HDF5)'
|
||||
.format(table.name,thermal.name))
|
||||
.format(table.name, thermal.name))
|
||||
thermal.add_temperature_from_ace(table)
|
||||
thermal.export_to_hdf5(nuclides[name] + '_1', 'w',
|
||||
libver=args.libver)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ parser.add_argument('-c', '--cross-sections',
|
|||
help='cross_sections.xml file to append libraries to')
|
||||
args = parser.parse_args()
|
||||
|
||||
base_url = 'http://www.nndc.bnl.gov/endf/b7.1/zips/'
|
||||
base_url = 'https://www.nndc.bnl.gov/endf/b7.1/zips/'
|
||||
files = ['ENDF-B-VII.1-photoat.zip', 'ENDF-B-VII.1-atomic_relax.zip']
|
||||
block_size = 16384
|
||||
|
||||
|
|
@ -63,7 +63,8 @@ for f in files:
|
|||
with open(f, 'wb') as fh:
|
||||
while True:
|
||||
chunk = req.read(block_size)
|
||||
if not chunk: break
|
||||
if not chunk:
|
||||
break
|
||||
fh.write(chunk)
|
||||
downloaded += len(chunk)
|
||||
status = '{0:10} [{1:3.2f}%]'.format(
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ if download:
|
|||
with open(filename, 'wb') as fh:
|
||||
while True:
|
||||
chunk = req.read(block_size)
|
||||
if not chunk: break
|
||||
if not chunk:
|
||||
break
|
||||
fh.write(chunk)
|
||||
downloaded += len(chunk)
|
||||
status = '{0:10} [{1:3.2f}%]'.format(
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import openmc.deplete
|
|||
|
||||
|
||||
URLS = [
|
||||
'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-neutrons.zip',
|
||||
'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-decay.zip',
|
||||
'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-nfy.zip'
|
||||
'https://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-neutrons.zip',
|
||||
'https://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-decay.zip',
|
||||
'https://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-nfy.zip'
|
||||
]
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ from openmc._utils import download
|
|||
from casl_chain import CASL_CHAIN
|
||||
|
||||
URLS = [
|
||||
'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-neutrons.zip',
|
||||
'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-decay.zip',
|
||||
'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-nfy.zip'
|
||||
'https://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-neutrons.zip',
|
||||
'https://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-decay.zip',
|
||||
'https://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-nfy.zip'
|
||||
]
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import zipfile
|
|||
import openmc.data
|
||||
from openmc._utils import download
|
||||
|
||||
base_ace = 'http://www.nndc.bnl.gov/endf/b7.1/aceFiles/'
|
||||
base_endf = 'http://www.nndc.bnl.gov/endf/b7.1/zips/'
|
||||
base_ace = 'https://www.nndc.bnl.gov/endf/b7.1/aceFiles/'
|
||||
base_endf = 'https://www.nndc.bnl.gov/endf/b7.1/zips/'
|
||||
base_wmp = 'https://github.com/mit-crpg/WMP_Library/releases/download/v1.1/'
|
||||
files = [
|
||||
(base_ace, 'ENDF-B-VII.1-neutron-293.6K.tar.gz', '9729a17eb62b75f285d8a7628ace1449'),
|
||||
|
|
|
|||
|
|
@ -26,10 +26,15 @@ class MeshPlotter(tk.Frame):
|
|||
def __init__(self, parent, filename):
|
||||
tk.Frame.__init__(self, parent)
|
||||
|
||||
self.labels = {'Cell': 'Cell:', 'Cellborn': 'Cell born:',
|
||||
'Surface': 'Surface:', 'Material': 'Material:',
|
||||
'Universe': 'Universe:', 'Energy': 'Energy in:',
|
||||
'Energyout': 'Energy out:'}
|
||||
self.labels = {
|
||||
'Cell': 'Cell:',
|
||||
'Cellborn': 'Cell born:',
|
||||
'Surface': 'Surface:',
|
||||
'Material': 'Material:',
|
||||
'Universe': 'Universe:',
|
||||
'Energy': 'Energy in:',
|
||||
'Energyout': 'Energy out:'
|
||||
}
|
||||
|
||||
self.filterBoxes = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,8 +243,7 @@ def update_materials(root):
|
|||
for material in root.findall('material'):
|
||||
for nuclide in material.findall('nuclide'):
|
||||
if 'name' in nuclide.attrib:
|
||||
nucname = nuclide.attrib['name']
|
||||
nucname = nucname.replace('-', '')
|
||||
nucname = nuclide.attrib['name'].replace('-', '')
|
||||
# If a nuclide name is in the ZAID notation (e.g., a number),
|
||||
# convert it to the proper nuclide name.
|
||||
if nucname.strip().isnumeric():
|
||||
|
|
|
|||
|
|
@ -44,11 +44,10 @@ def get_data(element, entry):
|
|||
value = element.find(entry)
|
||||
if value is not None:
|
||||
value = value.text.strip()
|
||||
elif entry in element.attrib:
|
||||
value = element.attrib[entry].strip()
|
||||
else:
|
||||
if entry in element.attrib:
|
||||
value = element.attrib[entry].strip()
|
||||
else:
|
||||
value = None
|
||||
value = None
|
||||
|
||||
return value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue