diff --git a/doc/releasenotes/v0.5.0.rst b/doc/releasenotes/v0.5.0.rst index bd66bb0f7..9da1c46fa 100644 --- a/doc/releasenotes/v0.5.0.rst +++ b/doc/releasenotes/v0.5.0.rst @@ -54,6 +54,7 @@ New Features Describe any new features to the code. - ``openmc`` support via `DepcodeOpenMC` +- OpenMC compatible MSBR model. @@ -81,7 +82,9 @@ Script Changes - Add ``SERPENT_DATA`` and ``SERPENT_ACELIB`` variables to ``.bashrc`` - A new script, ``scripts/ci/openmc-xs.bash``, that downloads the OpenMC HDF5 cross section library. - +- A new script, ``download_endfb71.bash``, that downloads the ENDF/B 7.1 cross section library -- including thermal scattering, decay, and fission yield data -- in ACE format. +- A new script, ``process_endfb71_to_openmc.bash``, that converts the library created by ``download_endfb71.bash`` into an OpenMC-usable HDF5 format. Requires OpenMC to be installed from source to use. +- A new script ``openmc_msbr_model.py``, that creates an OpenMC-usable MSBR model based on the Serpent MSBR model. Python API Changes diff --git a/examples/msbr/README.md b/examples/msbr/README.md new file mode 100644 index 000000000..e63ebf0f0 --- /dev/null +++ b/examples/msbr/README.md @@ -0,0 +1,27 @@ +## MSBR Model + +This model is based on the following technical report: + +Robertson, R. C. (1971). Conceptual Design Study of a Single-Fluid Molten-Salt Breeder Reactor. (ORNL--4541). ORNL. + +For a complete discussion of the model, please see Chapter 4 in: + +Yardas, O. (2023). Implementation and validation of OpenMC in SaltProc [MS Thesis, University of Illinois at Urbana-Champaign]. + + +## Key features +- Zone IB +- Zone IIA +- Simplified Zone IIB (graphite slabs are constructed from cylindrical sectors, and so do not have a consistent width; the last gap in the ccw direction in each octant is smaller than the other gaps, which all have the same dimension) +- Control rod elements (A Guess, as no spec was provided) +- Radial reflectors. +- Simplified axial reflectors (flat as opposed to dished in the reference specification) + +## Missing from model +- Zone IA +- Support structure above the main core +- Radial reflector axial ribs +- Radial reflector retaining rings +- Zone IIB Graphite Dowel pins and Hastelloy N eliptical pins +- Salt inlets and outlest +- Zone I eliptical graphite sealing pins diff --git a/examples/msbr/control_rods.py b/examples/msbr/control_rods.py new file mode 100644 index 000000000..ee118341a --- /dev/null +++ b/examples/msbr/control_rods.py @@ -0,0 +1,103 @@ +import openmc +import numpy as np + +def control_rod(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + fuel_hole, + fuel, + moder): + """Create universe for control rod element with control rod fully inserted. + Based on specification in Roberton, 1971. + + Parameters + ---------- + gr_sq_neg : openmc.Intersection + The region bounding the outer surface of the 6 in. x 6 in. graphite + element. + gr_extra_regions : list of (openmc.Region, str) + 'Add-on' regions and their names for the graphite element. + Includes ribs, rib tips, and gap-filling regions. + inter_elem_channel : openmc.Region, list of (openmc.Region, str) + Inter-element channel region(s). + fuel_hole : openmc.ZCylinder + Central fuel hole in graphite element. + fuel : openmc.Material + Fuel salt material + moder : openmc.Material + Graphite material + + Returns + ------- + cr : openmc.Universe + Univerese for control rod element with control rod fully insterted. + """ + + s1 = openmc.ZCylinder(r=4.7625, name='control_rod') + + c1 = openmc.Cell(fill=moder, region=-s1, name='control_rod') + c2 = openmc.Cell(fill=fuel, region=(+s1 & -fuel_hole), name='cr_fuel_inner') + c3 = openmc.Cell(fill=moder, region=(+fuel_hole & + gr_sq_neg & + inter_elem_channel), + name='cr_moderator') + c4 = openmc.Cell(fill=fuel, region= (~gr_sq_neg & inter_elem_channel), + name='cr_fuel_outer') + #universe_id=3 + cr = openmc.Universe(name='control_rod', cells=[c1, c2, c3, c4]) + + for (reg, name) in gr_extra_regions: + cr.add_cell(openmc.Cell(fill=moder, region=reg, + name=f'cr_moderator_{name}')) + + return cr + +def control_rod_channel(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + fuel_hole, + fuel, + moder): + """Create universe for control rod element with control rod fully withdrawn. + Based on specification in Roberton, 1971. + + Parameters + ---------- + gr_sq_neg : openmc.Intersection + The region bounding the outer surface of the 6 in. x 6 in. graphite + element. + gr_extra_regions : list of (openmc.Region, str) + 'Add-on' regions and their names for the graphite element. + Includes ribs, rib tips, and gap-filling regions. + inter_elem_channel : openmc.Region, list of (openmc.Region, str) + Inter-element channel region(s). + fuel_hole : openmc.ZCylinder + Central fuel hole in graphite element. + fuel : openmc.Material + Fuel salt material + moder : openmc.Material + Graphite material + + Returns + ------- + crc : openmc.Universe + Universe for control rod element with control rod fully withdrawn. + """ + + c1 = openmc.Cell(fill=fuel, region=(-fuel_hole), name='crc_fuel_inner') + + c2 = openmc.Cell(fill=moder, region=(+fuel_hole & + gr_sq_neg & + inter_elem_channel), + name='crc_moderator') + c3 = openmc.Cell(fill=fuel, region=(~gr_sq_neg & inter_elem_channel), + name='crc_fuel_outer') + + # universe_id=4 + crc = openmc.Universe(name='control_rod_channel', cells=[c1, c2, c3]) + + for (reg, name) in gr_extra_regions: + crc.add_cell(openmc.Cell(fill=moder, region=reg, + name=f'crc_moderator_{name}')) + + return crc diff --git a/examples/msbr/core_elements.py b/examples/msbr/core_elements.py new file mode 100644 index 000000000..464e026a6 --- /dev/null +++ b/examples/msbr/core_elements.py @@ -0,0 +1,275 @@ +import openmc +import numpy as np + +def _bound_zone_cells(cells_tuples, levels): + """Helper function that moves Zone IB and Zone IIA cells to the + appropriate height.""" + cell_list = [] + n_levels = len(cells_tuples) + for i, cells in enumerate(cells_tuples): + if i == 0: + lower_bound = None + upper_bound = levels[i] + elif i == n_levels - 1: + lower_bound = levels[i-1] + upper_bound = None + else: + lower_bound = levels[i-1] + upper_bound = levels[i] + for j, cell in enumerate(cells): + if lower_bound is None: + cell.region = cell.region & -upper_bound + elif upper_bound is None: + cell.region = cell.region & +lower_bound + else: + cell.region = cell.region & +lower_bound & -upper_bound + cell_list.append(cell) + return cell_list + +def zoneIB(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + gr_round_4, + moder, + fuel, + hast): + """Create universe for Zone IB element. Based on specification in + Robertson, 1971 Fig 3.4 (p. 17) + + Parameters + ---------- + gr_sq_neg : openmc.Intersection + The region bounding the outer surface of the 4 in. x 4 in. graphite + element. + gr_extra_regions : list of (openmc.Region, str) + 'Add-on' regions and their names for the graphite element. + Includes ribs, rib tips, and gap-filling regions. + inter_elem_channel : openmc.Region, list of (openmc.Region, str) + Inter-element channel region(s). + gr_round_4 : openmc.ZCylinder + Outer bounding surface for cylindrical graphite in uppermost part of + element. + fuel : openmc.Material + Fuel salt material + moder : openmc.Material + Graphite material + hast : openmc.Material + Hastelloy-N material. + + Returns + ------- + ib : openmc.Universe + Universe for Zone IB element. + """ + elem_levels = [22.86, 419.10, 438.15, 445.135] + level_bounds = [] + for level in elem_levels: + level_bounds.append(openmc.ZPlane(z0=level)) + s1 = openmc.ZCylinder(r=4.953, name='ib_gr_round_1') + s2 = openmc.ZCylinder(r=1.71069, name='ib_fuel_hole') + + h = 12.66 + theta = np.arctan(4.953 / h) + r2 = (1 / np.cos(theta))**2 - 1 + s3 = openmc.ZCone(z0=h + elem_levels[2], r2=r2, name='cone_i') + + c1 = openmc.Cell(fill=fuel, region=(-s2), name='ib_fuel_inner_1') + c2 = openmc.Cell(fill=moder, region=(+s2 & -s1), name='ib_moderator_1') + c3 = openmc.Cell(fill=fuel, region=(+s1), name='ib_fuel_outer_1') + ib1 = (c1, c2, c3) + + # I-A main (lower 2) + c4 = c1.clone(clone_materials=False) + c4.name = 'ib_fuel_inner_main' + + c5 = openmc.Cell(fill=moder, region=(+s2 & + gr_sq_neg & + inter_elem_channel), + name='ib_moderator_main') + c6 = openmc.Cell(fill=fuel, region=(~gr_sq_neg & inter_elem_channel), + name='ib_fuel_outer_main') + ibm = [c4, c5, c6] + + for (reg, name) in gr_extra_regions: + ibm.append(openmc.Cell(fill=moder, region=reg, + name=f'ib_moderator_main_{name}')) + + + # I-A 2 (upper 1) + c7 = c1.clone(clone_materials=False) + c8 = c2.clone(clone_materials=False) + c9 = c3.clone(clone_materials=False) + c7.name = 'ib_fuel_inner_2' + c8.name = 'ib_moderator_2' + c9.name = 'ib_fuel_outer_2' + + ib2 = (c7, c8, c9) + + # I-A 3 (upper 2) + c10 = c1.clone(clone_materials=False) + c10.name = 'ib_fuel_inner_3' + c11 = openmc.Cell(fill=moder, region=(+s2 & -s3), name='ib_moderator_3') + c12 = openmc.Cell(fill=fuel, region=(+s3), name='ib_fuel_outer_3') + ib3 = (c10, c11, c12) + + # I-A 4 (upper 3) + c13 = openmc.Cell(fill=hast, region=(-s2), + name='ib_hast') + c14 = openmc.Cell(fill=moder, region=(+s2 & -gr_round_4), + name='ib_moderator_4') + c15 = openmc.Cell(fill=fuel, region=(+gr_round_4), + name='ib_fuel_outer_4') + ib4 = (c13, c14, c15) + + elem_cells = [ib1, ibm, ib2, ib3, ib4] + # universe_id=1 + ib = openmc.Universe(name='zone_ib') + ib.add_cells(_bound_zone_cells(elem_cells, level_bounds)) + return ib + +def zoneIIA(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + gr_round_4, + moder, + fuel): + """Create universe for Zone IIA element. Based on specification in + Robertson, 1971 Fig 3.5 (p. 18) + + Parameters + ---------- + gr_sq_neg : openmc.Intersection + The region bounding the outer surface of the 4 in. x 4 in. graphite + element. + gr_extra_regions : list of (openmc.Region, str) + 'Add-on' regions and their names for the graphite element. + Includes ribs, rib tips, and gap-filling regions. + inter_elem_channel : openmc.Region, list of (openmc.Region, str) + Inter-element channel region(s). + gr_round_4 : openmc.ZCylinder + Outer bounding surface for cylindrical graphite in uppermost part of + element. + fuel : openmc.Material + Fuel salt material + moder : openmc.Material + Graphite material + hast : openmc.Material + Hastelloy-N material. + + Returns + ------- + iia : openmc.Universe + Universe for Zone IIA element. + """ + + elem_levels = [434.34, 436.88, 439.42, 441.96] + level_bounds = [] + for level in elem_levels: + level_bounds.append(openmc.ZPlane(z0=level)) + s1 = openmc.ZCylinder(r=3.302, name='iia_fuel_hole_main') # Hole with fuel salt - Fig 3.5, Roberton 1971 (3.27787 - p.47) + s2 = openmc.ZCylinder(r=0.635, name='iia_fuel_hole_2') + s3 = openmc.ZCylinder(r=3.65125, name='iia_gr_round_3') + h = 6.5 + theta = np.arctan(3.65125 / h) + r2 = (1 / np.cos(theta))**2 - 1 + s4 = openmc.ZCone(z0=h + elem_levels[2], r2=r2, name='cone_ii') + + + # II-A main (lower 1) + c1 = openmc.Cell(fill=fuel, region=(-s1), name='iia_fuel_inner_main') + c2 = openmc.Cell(fill=moder, region=(+s1 & + gr_sq_neg & + inter_elem_channel), + name='iia_moderator_main') + c3 = openmc.Cell(fill=fuel, region=(~gr_sq_neg & inter_elem_channel), + name='iia_fuel_outer_main') + iiam = [c1, c2, c3] + + + # II-A 2 (upper 1) + c4 = openmc.Cell(fill=fuel, region=(-s2), name='iia_fuel_inner_2') + c5 = openmc.Cell(fill=moder, region=(+s2 & + gr_sq_neg & + inter_elem_channel), + name='iia_moderator_2') + c6 = c3.clone(clone_materials=False) + c6.name = 'iia_fuel_outer_2' + iia2 = [c4, c5, c6] + + for (reg, name) in gr_extra_regions: + iiam.append(openmc.Cell(fill=moder, region=reg, + name=f'iia_moderator_main_{name}')) + iia2.append(openmc.Cell(fill=moder, region=reg, + name=f'iia_moderator_2_{name}')) + + # II-A 3 (upper 2) + c7 = c4.clone(clone_materials=False) + c7.name = 'iia_fuel_inner_3' + c8 = openmc.Cell(fill=moder, region=(+s2 & -s3), name='iia_moderator_3') + c9 = openmc.Cell(fill=fuel, region=(+s3), name='iia_fuel_outer_3') + iia3 = (c7, c8, c9) + + # II-A 4 (upper 3) + c10 = openmc.Cell(fill=moder, region=(-s4), name='iia_moderator_4') + c11 = openmc.Cell(fill=fuel, region=(+s4), name='iia_fuel_outer_4') + iia4 = (c10, c11) + + # II-A 5 (upper 4) + c12 = openmc.Cell(fill=moder, region=(-gr_round_4), name='iia_moderator_5') + c13 = openmc.Cell(fill=fuel, region=(+gr_round_4), name='iia_fuel_outer_5') + iia5 = (c12, c13) + + elem_cells = [iiam, iia2, iia3, iia4, iia5] + # universe_id=2 + iia = openmc.Universe(name='zone_iia') + iia.add_cells(_bound_zone_cells(elem_cells, level_bounds)) + return iia + +def void_cell(): + """Creates a void cell universe for filling unused parts of core lattice. + + Returns + ------- + v : openmc.Universe + Void universe + """ + c1 = openmc.Cell(name='lattice_void') + #universe_id=5 + v = openmc.Universe(name='lattice_void') + v.add_cell(c1) + return v + +def graphite_triangles(fuel, moder): + """Creates triangular prism elements that fill in 90-degree corners + on the outermost layer of Zone IIA, + + Parameters + ---------- + fuel : openmc.Material + Fuel salt material + moder : openmc.Material + Graphite material + + Returns + ------- + tri_univs : list of openmc.Universe + Universes for graphite trangular prism elements. + + """ + s1 = openmc.Plane(1.0, 1.0, 0.0, 0.0) + s2 = openmc.Plane(-1.0, 1.0, 0.0, 0.0) + s3 = openmc.Plane(1.0, -1.0, 0.0, 0.0) + s4 = openmc.Plane(-1.0, -1.0, 0.0, 0.0) + surfs = [(s4, 'bottom_left'), + (s1, 'top_right'), + (s2, 'top_left'), + (s3, 'bottom_right')] + tri_univs = [] + for i, (s, name) in enumerate(surfs): + c1 = openmc.Cell(fill=moder, region=(-s)) + c2 = openmc.Cell(fill=fuel, region=(+s)) + # universe_id = 6+i + gr_tri = openmc.Universe(name=f'{name}_triangle') + gr_tri.add_cells([c1, c2]) + tri_univs.append(gr_tri) + return tri_univs diff --git a/examples/msbr/geometry/msbr_full.ini b/examples/msbr/geometry/msbr_full.ini index 20a304f22..6f7693ef5 100644 --- a/examples/msbr/geometry/msbr_full.ini +++ b/examples/msbr/geometry/msbr_full.ini @@ -1,7 +1,6 @@ -% --- Surfaces (core pitch = 10.16 cm): Zone I-A +% --- Surfaces (core pitch = 10.16 cm): Zone I-B surf 1 cyl 0.0 0.0 1.71069 % Hole with fuel salt surf 2 sqc 0.0 0.0 4.953 0.46 % Graphite square outer wall 1.07 -surf 3 sqc 0.0 0.0 5.08 % Outer boundary surf 4 cyl -4.28498 4.53898 0.66802 % Left-upper graphite element 1.15 surf 5 cyl 4.28498 -4.53898 0.66802 % Right-bottom graphite element surf 6 cyl -4.53898 -4.28498 0.66802 % Left-bottom graphite element @@ -10,10 +9,10 @@ surf 8 cyl -4.28498 -5.62102 0.66802 % replay part of left-upper graphite el surf 9 cyl 4.28498 5.62102 0.66802 % replay part of right-bottom graphite element surf 10 cyl -5.62102 4.28498 0.66802 % replay part of right-upper graphite element 0.51 octa surf 11 cyl 5.62102 -4.28498 0.66802 % replay part of left-bottom graphite element -% --- Cells: Universe 11: Zone I-A +% --- Cells: Universe 11: Zone I-B cell 1 11 fuel -1 % Fuel hole cell 2 11 moder 1 -2 4 5 6 7 8 9 10 11 % Graphite block -cell 3 11 fuel 2 -3 4 5 6 7 8 9 10 11 % Fuel salt outside graphite block +cell 3 11 fuel 2 4 5 6 7 8 9 10 11 % Fuel salt outside graphite block cell 4 11 moder -4 % Left-upper graphite element cell 5 11 moder -5 % Right-bottom graphite element cell 6 11 moder -6 % Left-bottom graphite element @@ -22,33 +21,28 @@ cell 8 11 moder -8 % replay part of left-upper graphite cell 9 11 moder -9 % replay part of right-bottom graphite element cell 10 11 moder -10 % replay part of right-upper graphite element cell 11 11 moder -11 % replay part of left-bottom graphite element -cell 12 11 outside 3 % Outside world -% ============ Bottom part: Zone I-A (Universe 12) ======================== +% ============ Bottom part: Zone I-B (Universe 12) ======================== surf 12 cyl 0.0 0.0 4.953 % Graphite round outer wall cell 601 12 fuel -1 % Fuel hole cell 602 12 moder 1 -12 % Graphite block -cell 603 12 fuel 12 -3 % Fuel salt outside graphite block -cell 612 12 outside 3 % Outside world -% ============ Upper part 1: Zone I-A (Universe 13) ======================== +cell 603 12 fuel 12 % Fuel salt outside graphite block +% ============ Upper part 1: Zone I-B (Universe 13) ======================== surf 13 cyl 0.0 0.0 4.953 % Graphite round outer wall above main 13-feet part cell 604 13 fuel -1 % Fuel hole cell 605 13 moder 1 -13 % Graphite block -cell 606 13 fuel 13 -3 % Fuel salt outside graphite block -cell 613 13 outside 3 % Outside world -% ============ Upper part 2: Zone I-A (Universe 14) ======================== +cell 606 13 fuel 13 % Fuel salt outside graphite block +% ============ Upper part 2: Zone I-B (Universe 14) ======================== surf 14 cone 0.0 0.0 0.0 4.953 12.66 % Graphite cone outer wall part cell 607 14 fuel -1 % Fuel hole cell 608 14 moder 1 -14 % Graphite block -cell 609 14 fuel 14 -3 % Fuel salt outside graphite block -cell 614 14 outside 3 % Outside world -% ============ Upper part 3: Zone I-A (Universe 15) ======================== +cell 609 14 fuel 14 % Fuel salt outside graphite block +% ============ Upper part 3: Zone I-B (Universe 15) ======================== surf 15 cyl 0.0 0.0 2.2225 % Graphite outer wall part surf 16 cyl 0.0 0.0 0.762 % Fuel hole 0.6 in cell 616 15 hast -1 % Hastelloy N cell 617 15 moder 1 -15 % Graphite block -cell 618 15 fuel 15 -3 % Fuel salt outside graphite block -cell 615 15 outside 3 % Outside world -% ======== Vertical stack Zone I-A cell (marked as 1 in main lattice) =========================================== +cell 618 15 fuel 15 % Fuel salt outside graphite block +% ======== Vertical stack Zone I-B cell (marked as 1 in main lattice) =========================================== lat 1 9 0.0 0.0 5 0.0 12 22.86 11 @@ -59,7 +53,6 @@ lat 1 9 0.0 0.0 5 % --- Surfaces (core pitch = 10.16 cm) - Zone II-A Universe 2: surf 21 cyl 0.0 0.0 3.302 % Hole with fuel salt (Fig.3.5 Robertson) 3.27787 - p. 47 surf 22 sqc 0.0 0.0 4.953 0.46 % Graphite square outer wall 1.07 -surf 23 sqc 0.0 0.0 5.08 % Outer boundary surf 24 cyl -4.28498 4.53898 0.66802 % Left-upper graphite element 1.15 surf 25 cyl 4.28498 -4.53898 0.66802 % Right-bottom graphite element surf 26 cyl -4.53898 -4.28498 0.66802 % Left-bottom graphite element @@ -71,7 +64,7 @@ surf 31 cyl 5.62102 -4.28498 0.66802 % replay part of left-bottom graphite % --- Cells: Universe 21: Bottom(main) part: Zone I-A ======================================= cell 21 21 fuel -21 % Fuel hole cell 22 21 moder 21 -22 24 25 26 27 28 29 30 31 % Graphite block -cell 23 21 fuel 22 -23 24 25 26 27 28 29 30 31 % Fuel salt outside graphite block +cell 23 21 fuel 22 24 25 26 27 28 29 30 31 % Fuel salt outside graphite block cell 24 21 moder -24 % Left-upper graphite element cell 25 21 moder -25 % Right-bottom graphite element cell 26 21 moder -26 % Left-bottom graphite element @@ -80,12 +73,11 @@ cell 28 21 moder -28 % replay part of left-uppe cell 29 21 moder -29 % replay part of right-bottom graphite element cell 30 21 moder -30 % replay part of right-upper graphite element cell 31 21 moder -31 % replay part of left-bottom graphite element -cell 32 21 outside 23 % Outside world % =====Cells: Universe 22: Upper part 1 (from H=434.34cm to 436.88cm): Zone II-A ============ surf 32 cyl 0.0 0.0 0.635 % Hole with fuel salt (Fig.3.5 Robertson p. 47) d=0.5in cell 721 22 fuel -32 % Fuel hole cell 722 22 moder 32 -22 24 25 26 27 28 29 30 31 % Graphite block -cell 723 22 fuel 22 -23 24 25 26 27 28 29 30 31 % Fuel salt outside graphite block +cell 723 22 fuel 22 24 25 26 27 28 29 30 31 % Fuel salt outside graphite block cell 724 22 moder -24 % Left-upper graphite element cell 725 22 moder -25 % Right-bottom graphite element cell 726 22 moder -26 % Left-bottom graphite element @@ -94,23 +86,19 @@ cell 728 22 moder -28 % replay part of left-upp cell 729 22 moder -29 % replay part of right-bottom graphite element cell 730 22 moder -30 % replay part of right-upper graphite element cell 731 22 moder -31 % replay part of left-bottom graphite element -cell 732 22 outside 23 % Outside world %===========Cells: Universe 23: Upper part 2 (from H=436.88cm to 439.42cm): Zone II-A =========================== surf 33 cyl 0.0 0.0 3.65125 % Outer cylindrical surface (Fig.3.5 Robertson p. 47) d=2 7/8 in cell 733 23 fuel -32 % Fuel hole cell 734 23 moder 32 -33 % Graphite block -cell 735 23 fuel 33 -23 % Fuel salt outside graphite block -cell 736 23 outside 23 % Outside world +cell 735 23 fuel 33 % Fuel salt outside graphite block %===========Cells: Universe 24: Upper part 3 (from H=439.42cm to 441.96cm): Zone II-A =========================== surf 34 cone 0.0 0.0 0.0 3.65125 6.5 % Outer cone surface (Fig.3.5 Robertson p. 47) cell 737 24 moder -34 % Graphite block -cell 738 24 fuel 34 -23 % Fuel salt outside graphite block -cell 739 24 outside 23 % Outside world +cell 738 24 fuel 34 % Fuel salt outside graphite block %===========Cells: Universe 25: Upper part 4 (from H=441.96cm to 449.58cm): Zone II-A =========================== surf 35 cyl 0.0 0.0 2.2225 % Outer cylindrical surface (Fig.3.5 Robertson p. 47) cell 740 25 moder -35 % Graphite block -cell 741 25 fuel 35 -23 % Fuel salt outside graphite block -cell 742 25 outside 23 % Outside world +cell 741 25 fuel 35 % Fuel salt outside graphite block % ======== Vertical stack Zone II-A cell (marked as 2 in main lattice) =========================================== lat 2 9 0.0 0.0 5 @@ -123,7 +111,6 @@ lat 2 9 0.0 0.0 5 % --- Surfaces (core pitch = 15.24 cm) - Control rods Universe 3: surf 41 cyl 0.0 0.0 5.08 % Hole with fuel salt surf 42 sqc 0.0 0.0 7.23646 0.99 % Graphite square outer wall 1.07 -surf 43 sqc 0.0 0.0 7.62 % Outer boundary surf 44 hexyc -5.8801 6.505 1.16 0.18 % Left-upper graphite element 1.15 surf 45 hexyc 5.8801 -6.505 1.16 0.18 % Right-bottom graphite element surf 46 hexxc -6.505 -5.8801 1.16 0.18 % Left-bottom graphite element @@ -139,7 +126,7 @@ surf 39 cyl 0.0 0.0 4.7625 % control rod diameter 3.75in (Rob cell 53 3 moder -39 % Control rods cell 41 3 fuel -41 39 % Fuel hole cell 42 3 moder 41 -42 44 45 46 47 48 49 50 51 % Graphite block -cell 43 3 fuel 42 -43 44 45 46 47 48 49 50 51 % Fuel salt outside graphite block +cell 43 3 fuel 42 44 45 46 47 48 49 50 51 % Fuel salt outside graphite block cell 44 3 moder -44 % Left-upper graphite element cell 45 3 moder -45 % Right-bottom graphite element cell 46 3 moder -46 % Left-bottom graphite element @@ -148,12 +135,11 @@ cell 48 3 moder -48 % replay part of lef cell 49 3 moder -49 % replay part of right-bottom graphite element cell 50 3 moder -50 % replay part of right-upper graphite element cell 51 3 moder -51 % replay part of left-bottom graphite element -cell 52 3 outside 43 % Outside world % --- Cells: Universe 4: Control rods channels (no control rods in) cell 841 4 fuel -41 % Fuel hole cell 842 4 moder 41 -42 44 45 46 47 48 49 50 51 % Graphite block -cell 843 4 fuel 42 -43 44 45 46 47 48 49 50 51 % Fuel salt outside graphite block +cell 843 4 fuel 42 44 45 46 47 48 49 50 51 % Fuel salt outside graphite block cell 844 4 moder -44 % Left-upper graphite element cell 845 4 moder -45 % Right-bottom graphite element cell 846 4 moder -46 % Left-bottom graphite element @@ -162,10 +148,9 @@ cell 848 4 moder -48 % replay part of le cell 849 4 moder -49 % replay part of right-bottom graphite element cell 850 4 moder -50 % replay part of right-upper graphite element cell 851 4 moder -51 % replay part of left-bottom graphite element -cell 852 4 outside 43 % Outside world % ------ Vacuum cell -cell 57 5 void -3 +cell 57 5 void %--------- Reflector cell %cell 58 6 refl -3 @@ -176,14 +161,14 @@ surf 53 plane -1.0 1.0 0.0 0.0 % Upper-left surf 54 plane 1.0 -1.0 0.0 0.0 % Bottom-right surf 55 plane -1.0 -1.0 0.0 0.0 % Bottom-left -cell 500 7 moder -3 -52 % Top-right -cell 501 7 fuel -3 52 % Top-right -cell 502 8 moder -3 -53 % Top-left -cell 503 8 fuel -3 53 % Top-left -cell 504 9 moder -3 -54 % Bottom-right -cell 505 9 fuel -3 54 % Bottom-right -cell 506 6 moder -3 -55 % Bottom-left -cell 507 6 fuel -3 55 % Bottom-left +cell 500 7 moder -52 % Top-right +cell 501 7 fuel 52 % Top-right +cell 502 8 moder -53 % Top-left +cell 503 8 fuel 53 % Top-left +cell 504 9 moder -54 % Bottom-right +cell 505 9 fuel 54 % Bottom-right +cell 506 6 moder -55 % Bottom-left +cell 507 6 fuel 55 % Bottom-left % --------- Reflector zone II-B surf 60 pad 0.0 0.0 229.6 256.032 1.769 -1.769 % Left horizontal big element @@ -707,15 +692,15 @@ surf 3103 octa 0.0 0.0 218.44 215.53 % smaller octader, which cover 8 tria surf 3104 octa 0.0 0.0 228.60 193.97 % smallest octader, which cover 8 triangle elements % --- Cells: %cell 300 0 fill 300 -3000 3003 3011 -3012 -cell 303 0 fill 400 -3003 3011 -3012 -cell 305 0 fuel -3004 3002 3011 -3012 -cell 306 0 moder -3005 3004 3015 -3013 -cell 313 0 moder -3004 3012 -3013 -cell 314 0 moder -3004 3015 -3017 -cell 315 0 fuel -3004 3017 -3011 -cell 307 0 hast -3006 3005 3015 -3013 -cell 308 0 hast -3006 3013 -3014 -cell 309 0 hast -3006 -3015 3016 +cell 303 0 fill 400 -3003 3011 -3012 % Control rod lattice cell +cell 305 0 fuel -3004 3002 3011 -3012 % Annulus +cell 306 0 moder -3005 3004 3015 -3013 % Radial Reflector +cell 313 0 moder -3004 3012 -3013 % Top axial reflector +cell 314 0 moder -3004 3015 -3017 % Bottom axial reflector +cell 315 0 fuel -3004 3017 -3011 % Lower plenum +cell 307 0 hast -3006 3005 3015 -3013 % Radial vessel +cell 308 0 hast -3006 3013 -3014 % Top vessel +cell 309 0 hast -3006 -3015 3016 % Bottom vessel cell 310 0 outside 3006 3016 -3014 cell 311 0 outside -3016 cell 312 0 outside 3014 @@ -725,4 +710,4 @@ cell 331 0 fill 300 -3104 3003 3011 -3012 % inside smallest cell 300 0 fill 300 -3100 3103 3104 3003 3011 -3012 % inside base octader, deducted smaller and smallest -cell 350 0 fill 10 -3002 3103 3104 3100 3011 -3012 % radial reflector lattice +cell 350 0 fill 10 -3002 3103 3104 3100 3011 -3012 % radial reflector lattice (Zone IIB) diff --git a/examples/msbr/mats/msbr_saltproc_prepr_comp_endfb71-diluted.ini b/examples/msbr/mats/msbr_saltproc_prepr_comp_endfb71-diluted.ini new file mode 100644 index 000000000..7e7abec21 --- /dev/null +++ b/examples/msbr/mats/msbr_saltproc_prepr_comp_endfb71-diluted.ini @@ -0,0 +1,424 @@ +% Material compositions (after 0.000000 days) + +mat fuel -3.350000000E+00 rgb 255 255 0 burn 1 fix 82c 900 vol 4.87100E+07 + 1001.82c -4.995620414657497e-22 + 1002.82c -9.983566232286466e-22 + 1003.82c -1.495005272019709e-21 + 2003.82c -1.4949953785081194e-21 + 2004.82c -1.9840236041432936e-21 + 3006.82c -2.9815959846007347e-21 + 3007.82c -0.07874746738790851 + 4009.82c -0.02255668791383211 + 5010.82c -4.963245622834658e-21 + 5011.82c -5.457128755397568e-21 + 7014.82c -6.941089983561896e-21 + 7015.82c -7.435303533896105e-21 + 8016.82c -7.928412119986839e-21 + 8017.82c -8.426185788040688e-21 + 9019.82c -0.45400301217928424 + 11022.82c -1.0902275400925155e-20 + 11023.82c -1.1395644787479889e-20 + 12024.82c -1.188898470616782e-20 + 12025.82c -1.2385062210375638e-20 + 12026.82c -1.2879137520842412e-20 + 13027.82c -1.3374298095204667e-20 + 14028.82c -1.3867695370389118e-20 + 14029.82c -1.4363164603403635e-20 + 14030.82c -1.4857497403378133e-20 + 15031.82c -1.5353176673453676e-20 + 16032.82c -1.5848021863762338e-20 + 16033.82c -1.6343401678066608e-20 + 16034.82c -1.6837304537907988e-20 + 16036.82c -1.782828138295043e-20 + 17035.82c -1.7333476427652064e-20 + 17037.82c -1.8323380714649152e-20 + 18036.82c -1.7828511581250735e-20 + 18038.82c -1.881749246428263e-20 + 18040.82c -1.9808686087882246e-20 + 19039.82c -1.931365875310774e-20 + 19040.82c -1.9809486637345362e-20 + 19041.82c -2.0304092866743586e-20 + 20040.82c -1.9808789061736476e-20 + 20042.82c -2.0798186300898823e-20 + 20043.82c -2.129394326406309e-20 + 20044.82c -2.1787998304056852e-20 + 20046.82c -2.277847587605717e-20 + 20048.82c -2.376926497063901e-20 + 21045.82c -2.2283892748950852e-20 + 22046.82c -2.277794989064182e-20 + 22047.82c -2.3273202393933882e-20 + 22048.82c -2.376699376362089e-20 + 22049.82c -2.4262639244140392e-20 + 22050.82c -2.4756796443967346e-20 + 23050.82c -2.4757971216371063e-20 + 23051.82c -2.5252068840021753e-20 + 24050.82c -2.4757418825906122e-20 + 24052.82c -2.5746041106852005e-20 + 24053.82c -2.624179478214892e-20 + 24054.82c -2.6736601247298627e-20 + 25055.82c -2.7231870734683406e-20 + 26054.82c -2.6736963241841166e-20 + 26056.82c -2.772601367518877e-20 + 26057.82c -2.8221923266677474e-20 + 26058.82c -2.8716556516783773e-20 + 27058.82c -2.871778466684404e-20 + 27458.82c -2.871778466684404e-20 + 27059.82c -2.9212200125107435e-20 + 28058.82c -2.871758161067439e-20 + 28059.82c -2.921277111014014e-20 + 28060.82c -2.970668962507295e-20 + 28061.82c -3.020250660904141e-20 + 28062.82c -3.0696846574241974e-20 + 28064.82c -3.168802555050902e-20 + 29063.82c -3.1193150654296517e-20 + 29065.82c -3.218362119056802e-20 + 30064.82c -3.1688608192030295e-20 + 30065.82c -3.2184340449347343e-20 + 30066.82c -3.267843418188411e-20 + 30067.82c -3.317465965301057e-20 + 30068.82c -3.3669211216986845e-20 + 30070.82c -3.4660813219298886e-20 + 31069.82c -3.4165255992713175e-20 + 31071.82c -3.515619086230209e-20 + 32070.82c -3.466028260271442e-20 + 32072.82c -3.565057214964559e-20 + 32073.82c -3.6146941047727335e-20 + 32074.82c -3.6641493601583164e-20 + 32076.82c -3.7632971719749844e-20 + 33074.82c -3.66428571450594e-20 + 33075.82c -3.71373835060181e-20 + 34074.82c -3.6642137084264486e-20 + 34076.82c -3.763188665809316e-20 + 34077.82c -3.8127917161114435e-20 + 34078.82c -3.862230925584101e-20 + 34079.82c -3.9118582426571775e-20 + 34080.82c -3.9613285533326065e-20 + 34082.82c -4.060474024929262e-20 + 35079.82c -3.911850229936575e-20 + 35081.82c -4.010885305574967e-20 + 36078.82c -3.862382460827718e-20 + 36080.82c -3.961321428529504e-20 + 36082.82c -4.0603144951169635e-20 + 36083.82c -4.109914815036837e-20 + 36084.82c -4.1593528407002866e-20 + 36085.82c -4.20897220331389e-20 + 36086.82c -4.258445529244238e-20 + 37085.82c -4.20893564546078e-20 + 37086.82c -4.258473129719862e-20 + 37087.82c -4.307942972172841e-20 + 38084.82c -4.159448080862473e-20 + 38086.82c -4.258378616957062e-20 + 38087.82c -4.307927951241285e-20 + 38088.82c -4.3573344290828806e-20 + 38089.82c -4.406993893418537e-20 + 38090.82c -4.456576106731199e-20 + 39089.82c -4.406914108085279e-20 + 39090.82c -4.4565470554762975e-20 + 39091.82c -4.5061229829794174e-20 + 40090.82c -4.456425809258359e-20 + 40091.82c -4.506040806469903e-20 + 40092.82c -4.5555791529006965e-20 + 40093.82c -4.605218629878305e-20 + 40094.82c -4.6547791223981704e-20 + 40095.82c -4.704433094097375e-20 + 40096.82c -4.7540131897022584e-20 + 41093.82c -4.60521379770962e-20 + 41094.82c -4.654827028603279e-20 + 41095.82c -4.70437315845158e-20 + 42092.82c -4.555666979704189e-20 + 42094.82c -4.654718206290799e-20 + 42095.82c -4.7043239037400424e-20 + 42096.82c -4.7538346025919135e-20 + 42097.82c -4.803469460048974e-20 + 42098.82c -4.853007390403203e-20 + 42099.82c -4.9026899108335756e-20 + 42100.82c -4.952246378405015e-20 + 43099.82c -4.902617659043871e-20 + 44096.82c -4.753979051646159e-20 + 44098.82c -4.8530015961132245e-20 + 44099.82c -4.9026018269191536e-20 + 44100.82c -4.952084908379216e-20 + 44101.82c -5.0017207816896396e-20 + 44102.82c -5.051228005454575e-20 + 44103.82c -5.1008942101220304e-20 + 44104.82c -5.1504184507939146e-20 + 44105.82c -5.200101787862531e-20 + 44106.82c -5.249649432271166e-20 + 45103.82c -5.100853526171359e-20 + 45105.82c -5.1999997901673445e-20 + 46102.82c -5.051292035741869e-20 + 46104.82c -5.15034930500536e-20 + 46105.82c -5.1999696368101857e-20 + 46106.82c -5.249458697797077e-20 + 46107.82c -5.299108705417767e-20 + 46108.82c -5.348615756486639e-20 + 46110.82c -5.447815917367435e-20 + 47107.82c -5.2991068945379536e-20 + 47109.82c -5.3982269123012857e-20 + 47510.82c -5.447862405075637e-20 + 47111.82c -5.497390391626245e-20 + 48106.82c -5.2496063868356674e-20 + 48108.82c -5.3486302196332096e-20 + 48110.82c -5.44770858170832e-20 + 48111.82c -5.497335219596136e-20 + 48112.82c -5.546833168729912e-20 + 48113.82c -5.596483000036051e-20 + 48114.82c -5.645999625327068e-20 + 48515.82c -5.695670682436658e-20 + 48116.82c -5.745205594476113e-20 + 49113.82c -5.596465767655569e-20 + 49115.82c -5.695593423055947e-20 + 50112.82c -5.546935328761381e-20 + 50113.82c -5.59652105602255e-20 + 50114.82c -5.645970634892508e-20 + 50115.82c -5.695566949800338e-20 + 50116.82c -5.745055877993673e-20 + 50117.82c -5.79468424517183e-20 + 50118.82c -5.844185786770349e-20 + 50119.82c -5.893838611656663e-20 + 50120.82c -5.943351953739752e-20 + 50122.82c -6.042550184677606e-20 + 50123.82c -6.09223160246047e-20 + 50124.82c -6.141777688837346e-20 + 50125.82c -6.191470423317873e-20 + 50126.82c -6.241032428464907e-20 + 51121.82c -5.993000000883408e-20 + 51123.82c -6.09215668339891e-20 + 51124.82c -6.141810359175182e-20 + 51125.82c -6.191344844183472e-20 + 51126.82c -6.241012313636446e-20 + 52120.82c -5.943444033902537e-20 + 52122.82c -6.042530329240218e-20 + 52123.82c -6.092159445891528e-20 + 52124.82c -6.14165576918407e-20 + 52125.82c -6.191304045135138e-20 + 52126.82c -6.240816906851537e-20 + 52527.82c -6.290480153033196e-20 + 52128.82c -6.34001059321616e-20 + 52529.82c -6.389684760936752e-20 + 52130.82c -6.439234565384517e-20 + 52132.82c -6.53848642137446e-20 + 53127.82c -6.290442784658575e-20 + 53129.82c -6.389604816885699e-20 + 53130.82c -6.439256745427896e-20 + 53131.82c -6.488798119194897e-20 + 53135.82c -6.687266392792673e-20 + 54123.82c -6.092368227847724e-20 + 54124.82c -6.141808168205412e-20 + 54126.82c -6.240865777656356e-20 + 54128.82c -6.339964479054897e-20 + 54129.82c -6.389594763036422e-20 + 54130.82c -6.439100066776045e-20 + 54131.82c -6.488746456701713e-20 + 54132.82c -6.538268735655868e-20 + 54133.82c -6.587924091304344e-20 + 54134.82c -6.637466759300451e-20 + 54135.82c -6.687126227383968e-20 + 54136.82c -6.736693705915611e-20 + 55133.82c -6.587901349899627e-20 + 55134.82c -6.637532460635299e-20 + 55135.82c -6.687064047532018e-20 + 55136.82c -6.736698519694447e-20 + 55137.82c -6.786255839642895e-20 + 56130.82c -6.439239429376071e-20 + 56132.82c -6.538313645109916e-20 + 56133.82c -6.58792887836585e-20 + 56134.82c -6.637422909470089e-20 + 56135.82c -6.687049740723962e-20 + 56136.82c -6.736562919033286e-20 + 56137.82c -6.786193279998394e-20 + 56138.82c -6.835732853493205e-20 + 56140.82c -6.93513517256378e-20 + 57138.82c -6.835825576259825e-20 + 57139.82c -6.885356282773428e-20 + 57140.82c -6.935079483436847e-20 + 58136.82c -6.736689490723934e-20 + 58138.82c -6.835769609104126e-20 + 58139.82c -6.885371094831475e-20 + 58140.82c -6.934879387983568e-20 + 58141.82c -6.984588371607179e-20 + 58142.82c -7.034204579872168e-20 + 58143.82c -7.083928641339215e-20 + 58144.82c -7.133559487280866e-20 + 59141.82c -6.984557362452796e-20 + 59142.82c -7.034244262096451e-20 + 59143.82c -7.083850865357364e-20 + 60142.82c -7.034129186986939e-20 + 60143.82c -7.083801164332579e-20 + 60144.82c -7.133383025759666e-20 + 60145.82c -7.183074599548168e-20 + 60146.82c -7.232669860583728e-20 + 60147.82c -7.282386078407743e-20 + 60148.82c -7.331993720571292e-20 + 60150.82c -7.431328775169723e-20 + 61147.82c -7.282338424802845e-20 + 61148.82c -7.332022577369633e-20 + 61548.82c -7.332022577369633e-20 + 61149.82c -7.38163355647318e-20 + 61151.82c -7.480912734031137e-20 + 62144.82c -7.133477875156362e-20 + 62147.82c -7.282326499951337e-20 + 62148.82c -7.331891110112405e-20 + 62149.82c -7.381576538865424e-20 + 62150.82c -7.431149371024589e-20 + 62151.82c -7.480849398047446e-20 + 62152.82c -7.530407813455996e-20 + 62153.82c -7.580093369401351e-20 + 62154.82c -7.629667261083575e-20 + 63151.82c -7.48084532323328e-20 + 63152.82c -7.53050755460251e-20 + 63153.82c -7.580050397326981e-20 + 63154.82c -7.629705418338174e-20 + 63155.82c -7.679269493111705e-20 + 63156.82c -7.728930178345577e-20 + 63157.82c -7.778531695003562e-20 + 64152.82c -7.530410776749921e-20 + 64153.82c -7.580076188522364e-20 + 64154.82c -7.629600702414886e-20 + 64155.82c -7.679256094494598e-20 + 64156.82c -7.728799678662156e-20 + 64157.82c -7.778459081315478e-20 + 64158.82c -7.828034538415143e-20 + 64160.82c -7.927317420313564e-20 + 65159.82c -7.877664446870964e-20 + 65160.82c -7.927323033480862e-20 + 66156.82c -7.728906422871954e-20 + 66158.82c -7.828049555190396e-20 + 66160.82c -7.927225307832226e-20 + 66161.82c -7.976879681084478e-20 + 66162.82c -8.026441323688741e-20 + 66163.82c -8.076105455309487e-20 + 66164.82c -8.125695773837258e-20 + 67165.82c -8.17532098757737e-20 + 67566.82c -8.224986575565229e-20 + 68162.82c -8.026539607377641e-20 + 68164.82c -8.125697108216709e-20 + 68166.82c -8.224887879269548e-20 + 68167.82c -8.274543206811294e-20 + 68168.82c -8.324127501795557e-20 + 68170.82c -8.423417550778866e-20 + 69168.82c -8.324216807866736e-20 + 69169.82c -8.373787144855281e-20 + 69170.82c -8.423434197509525e-20 + 71175.82c -8.671522243632657e-20 + 71176.82c -8.721185472614103e-20 + 72174.82c -8.621917786482176e-20 + 72176.82c -8.721121930773138e-20 + 72177.82c -8.770780496068653e-20 + 72178.82c -8.820372526835259e-20 + 72179.82c -8.870045812289138e-20 + 72180.82c -8.919650517429978e-20 + 73180.82c -8.919695561311848e-20 + 73181.82c -8.969290209435004e-20 + 73182.82c -9.018965413183268e-20 + 74180.82c -8.919658139353864e-20 + 74182.82c -9.018868770206104e-20 + 74183.82c -9.068537168073907e-20 + 74184.82c -9.118140630487133e-20 + 74186.82c -9.217447407493162e-20 + 75185.82c -9.16780934053628e-20 + 75187.82c -9.267084492749264e-20 + 77191.82c -9.465597687200316e-20 + 77193.82c -9.564849955995315e-20 + 79197.82c -9.763304017956228e-20 + 80196.82c -9.713699172090901e-20 + 80198.82c -9.812882215639312e-20 + 80199.82c -9.862525483900235e-20 + 80200.82c -9.912096091680573e-20 + 80201.82c -9.961762374219877e-20 + 80202.82c -1.0011347584929474e-19 + 80204.82c -1.0110625537802692e-19 + 81203.82c -1.006100020311585e-19 + 81205.82c -1.0160240125331985e-19 + 82204.82c -1.0110603201470369e-19 + 82206.82c -1.0209810333690715e-19 + 82207.82c -1.0259449626621115e-19 + 82208.82c -1.0309055390144942e-19 + 83209.82c -1.0358809433264449e-19 + 88223.82c -1.1054654720789197e-19 + 88224.82c -1.110430779981234e-19 + 88225.82c -1.1154044668496747e-19 + 88226.82c -1.1203702116819505e-19 + 89225.82c -1.1154025737013036e-19 + 89226.82c -1.120373625026575e-19 + 89227.82c -1.1253386546671532e-19 + 90227.82c -1.1253384165012396e-19 + 90228.82c -1.130300390849071e-19 + 90229.82c -1.135272201432286e-19 + 90230.82c -1.1402358299248699e-19 + 90231.82c -1.1452083785755672e-19 + 90232.82c -0.43557913048233615 + 90233.82c -1.1551482036158553e-19 + 90234.82c -1.1601150477299508e-19 + 91229.82c -1.1352738581099802e-19 + 91230.82c -1.140242806325347e-19 + 91231.82c -1.145206295327692e-19 + 91232.82c -1.1501765501047656e-19 + 91233.82c -1.1551415931684476e-19 + 92230.82c -1.1402398337770137e-19 + 92231.82c -1.1452083260281802e-19 + 92232.82c -1.1501694348683516e-19 + 92233.82c -0.00911370203663893 + 92234.82c -1.1601019146503893e-19 + 92235.82c -1.1650735082432813e-19 + 92236.82c -1.1700384606266598e-19 + 92237.82c -1.1750109680563338e-19 + 92238.82c -1.1799780053084715e-19 + 92239.82c -1.184952212302359e-19 + 92240.82c -1.1899204479234085e-19 + 92241.82c -1.194895807494984e-19 + 93234.82c -1.1601115455291372e-19 + 93235.82c -1.1650741694897652e-19 + 93236.82c -1.1700434283201173e-19 + 93237.82c -1.1750082087360873e-19 + 93238.82c -1.1799787868771203e-19 + 93239.82c -1.1849454985248098e-19 + 94236.82c -1.17004089222589e-19 + 94237.82c -1.1750093797730216e-19 + 94238.82c -1.1799719146197055e-19 + 94239.82c -1.1849416523693517e-19 + 94240.82c -1.1899066648890287e-19 + 94241.82c -1.194878556338018e-19 + 94242.82c -1.1998447643466866e-19 + 94243.82c -1.2048177619823637e-19 + 94244.82c -1.2097855114322723e-19 + 94246.82c -1.2197289174820622e-19 + 95240.82c -1.1899140338756393e-19 + 95241.82c -1.1948784457560299e-19 + 95242.82c -1.199848761452581e-19 + 95642.82c -1.199848761452581e-19 + 95243.82c -1.204814677944942e-19 + 95244.82c -1.2097859007865504e-19 + 95644.82c -1.2097859007865504e-19 + 96240.82c -1.1899151733772019e-19 + 96241.82c -1.1948825295668476e-19 + 96242.82c -1.1998452264127486e-19 + 96243.82c -1.204814714937787e-19 + 96244.82c -1.2097783055799936e-19 + 96245.82c -1.2147487224157663e-19 + 96246.82c -1.2197141355764302e-19 + 96247.82c -1.2246864866923743e-19 + 96248.82c -1.2296532154262668e-19 + 96249.82c -1.2346279173748035e-19 + 96250.82c -1.2395966644071876e-19 + 97245.82c -1.2147530287735169e-19 + 97246.82c -1.2197213194401973e-19 + 97247.82c -1.2246862547819837e-19 + 97248.82c -1.2296568730684077e-19 + 97249.82c -1.2346231051623278e-19 + 97250.82c -1.2395964535980357e-19 + 98246.82c -1.219721975700107e-19 + 98248.82c -1.2296523919822922e-19 + 98249.82c -1.2346224474351956e-19 + 98250.82c -1.2395869837370522e-19 + 98251.82c -1.2445595926777096e-19 + 98252.82c -1.2495265342034882e-19 + 98253.82c -1.2545007519190052e-19 + 98254.82c -1.2594684396860835e-19 + 99251.82c -1.2445616002198736e-19 + 99252.82c -1.2495332391430038e-19 + 99253.82c -1.2544992032407894e-19 + 99254.82c -1.2594718942864292e-19 + 99654.82c -1.2594718942864292e-19 + 99255.82c -1.2644398951964776e-19 + 100255.82c -1.2644383540179498e-19 diff --git a/examples/msbr/msbr_endfb71.serpent b/examples/msbr/msbr_endfb71.serpent new file mode 100644 index 000000000..ee9c9bf7a --- /dev/null +++ b/examples/msbr/msbr_endfb71.serpent @@ -0,0 +1,104 @@ +% Include file with burnable material composition on the line below +include "mats/msbr_saltproc_prepr_comp_endfb71-diluted.ini" +% Include file with non-burnable material composition on the line below +%include "mats/non_burnable_mats.ini" +% Geometry import will be added by SaltProc on the next line + +% Burnup settings will be added on next line + + + + + +%%include "geometry/msbr_full.ini" +% --- Moderator graphite: +mat moder -1.84 tmp 900 rgb 128 0 128 moder gr 6000 6000.82c -1.0 %tmp 908 +% --- Hastelloy N +mat hast -8.671 +rgb 0 0 255 +% Natural Ni +%28000.82c -0.677 +28058.82c -0.45492846488214814 +28060.82c -0.18127326881482336 +28061.82c -0.008011341006475749 +28062.82c -0.025961746987204326 +28064.82c -0.006825178309348437 + +% Natural W +%74000.82c -0.250 +74180.82c -0.00029364388293333545 +74182.82c -0.0655676236926255 +74183.82c -0.03560150632186718 +74184.82c -0.07664548021821405 +74186.82c -0.07189174588435995 + +% Natural Cr +%24000.82c -0.070 +24050.82c -0.002921580575502679 +24052.82c -0.05858955364682328 +24053.82c -0.006771510820966751 +24054.82c -0.001717354956707304 + +% Al +13027.82c -0.003 + +% --- Thermal scattering data for graphite: +% endfb71 +%therm gr 900 grph.25t grph.26t % 900K C-nat +% endfb70 +therm gr 900 grph.15t grph.16t % 900K C-nat + + +set title "MSBR Saltproc long-term, 91% removal, BOL, fresh fuel, ENDF" + +set acelib "endfb71.xsdata" +set declib "endfb71.decay" +set nfylib "endfb71.nfy" +set sfylib "endfb71.sfy" + +% --- Neutron population and criticality cycles: + +set pop 10000 125 25 1.0 1 %500 400 60 1.0 1 %30000 400 100 1.0 1 +set gcu -1 +%set usym 0 3 2 0.0 0.0 0 90 + +% --- Reproducibility off (set value to 1 and define seed to set on): + +%set repro 0 % try speedup +%set shbuf 1 % try speedup + +%set samarium 0 +% --- Reduce unionized energy grid size in order to save some memory +% Use grid thinning with 5e-5 reconstruction tolerance between +% 1e-8 and 15 MeV. + +set egrid 5e-5 1e-10 15.0 + +% --- Cut-offs: + +set fpcut 1E-6 +set stabcut 1E-12 + +% --- Geometry and mesh plots: +%plot 30 10000 10000 150.5 +%trans 10 0 0 0 0 0 45 + +%plot 10 1550 3400 0.0 -155 0 +%plot 10 1000 1000 0 -20 20 135 175 +%plot 10 2000 2000 16.5 + +% --- Depletion parameters +% --- Options for burnup calculation: +set bumode 2 -48 % IPF CRAM-48 method +set pcc 0 % Predictor +%set pcc 1 % CELI +%set xscalc 2 % Cross sections from spectrum +%set bunorm 2 +%set opti 3 + +%%set power 2.25E+9 dep daystep 3 3 3 3 3 3 3 3 3 3 3 3 + +%set rfw 1 restart +set inventory fuel all + +%set printm 1 0.0 diff --git a/examples/msbr/msbr_endfb71_main.json b/examples/msbr/msbr_endfb71_main.json new file mode 100644 index 000000000..485692235 --- /dev/null +++ b/examples/msbr/msbr_endfb71_main.json @@ -0,0 +1,27 @@ +{ + "proc_input_file": "msbr_objects.json", + "dot_input_file": "msbr.dot", + "output_path": "./data", + "num_depsteps": 12, + "depcode": { + "codename": "serpent", + "exec_path": "sss2", + "template_input_file_path": "./msbr_endfb71.serpent", + "npop": 50, + "active_cycles": 20, + "inactive_cycles": 20, + "geo_file_paths": ["./geometry/msbr_full.ini"] + }, + "simulation": { + "sim_name": "msbr_example_simulation", + "db_name": "msbr_kl_100_saltproc.h5", + "restart_flag": false, + "adjust_geo": false + }, + "reactor": { + "volume": 1.0, + "mass_flowrate": 9920000, + "power_levels": [ 2250000000 ], + "dep_step_length_cumulative": [ 3 ] + } +} diff --git a/examples/msbr/openmc_msbr_model.py b/examples/msbr/openmc_msbr_model.py new file mode 100644 index 000000000..dfd052bcc --- /dev/null +++ b/examples/msbr/openmc_msbr_model.py @@ -0,0 +1,606 @@ +import argparse +import json +import subprocess +from pathlib import Path + +import numpy as np +import openmc +from openmc.deplete import CoupledOperator, PredictorIntegrator, CELIIntegrator + +import core_elements as ce +import control_rods as cr +import root_geometry as rg + +# Materials + +fuel = openmc.Material(name='fuel') +fuel.set_density('g/cm3', density=3.35) +fuel.add_components({'Li7': 0.0787474673879085, + 'Be9': 0.0225566879138321, + 'F19': 0.454003012179284, + 'Th232': 0.435579130482336, + 'U233': 0.00911370203663893}, + percent_type='wo') +fuel.depletable = True +fuel.volume = 48710000.0 + +moder = openmc.Material(name='graphite') +moder.set_density('g/cm3', density=1.84) +moder.add_nuclide('C0', 1.000, percent_type='wo') +moder.add_s_alpha_beta('c_Graphite') + +hast = openmc.Material(name='hastelloyN') +hast.set_density('g/cm3', density=8.671) +hast.add_components({'Al27': 0.003, + 'Ni': 0.677, + 'W': 0.250, + 'Cr': 0.070}, + percent_type='wo') + +mat = openmc.Materials(materials=[fuel, moder, hast]) +mat.export_to_xml() + +colormap = {moder: 'purple', + hast: 'blue', + fuel: 'yellow'} + +def parse_arguments(): + """Parses arguments from command line. + + Returns + ------- + deplete : bool + Flag indicated whether or not to run a depletion simulation. + """ + parser = argparse.ArgumentParser() + parser.add_argument('--deplete', + type=bool, + default=False, + help='flag for running depletion') + + args = parser.parse_args() + return bool(args.deplete) + +def shared_elem_geometry(elem_type='core', + gr_sq_d=4.953, + gr_sq_r=0.46, + r_rib=0.66802, + l1=4.28498, + l2=4.53898, + l3=5.62102, + r_es=2.2225, + es_name='gr_round_4'): + """Creates surfaces and regions for lattice elements. + + Parameters + ---------- + elem_type : 'core', 'cr' + Indicates the type of element. 'core' inidcates for Zones IB and IIA. + 'cr' indicates control rod. + gr_sq_d : float + Half-width of graphite square element in cm. + gr_sq_r : float + Radius of graphite square rounded corners in cm. + r_rib : float + Radius of graphite element rib section. + l1 : float + Coordinate used to position graphite element ribs and rib tips. + l2 : float + Coordinate used to position graphite element ribs. + l3 : float + Coordinate used to position graphite element rib tips. + r_es : float + Radius of extra cylindrical surface used for element + es_name : str + Name of extra cylindrical surface. + + Returns + ------- + gr_sq_neg : openmc.Intersection + The region bounding the outer surface of the graphite + element. + gr_extra_regions : list of (openmc.Region, str) + 'Add-on' regions and their names for the graphite element. + Includes ribs, rib tips, and gap-filling regions. + inter_elem_channel : openmc.Region, list of (openmc.Region, str) + Inter-element channel region(s) + extra_surf : openmc.ZCylinder + Extra cylindrical surface used in the element. + """ + # Square graphite element + gr_sq_neg = openmc.rectangular_prism(gr_sq_d*2, + gr_sq_d*2, + corner_radius=gr_sq_r) + + # Rib tip surfaces + ul_t = openmc.ZCylinder(-l1, -l3, r_rib, name='rib_ul_tip') + br_t = openmc.ZCylinder(l1, l3, r_rib, name='rib_br_tip') + ru_t = openmc.ZCylinder(-l3, l1, r_rib, name='rib_ru_tip') + lb_t = openmc.ZCylinder(l3, -l1, r_rib, name='rib_lb_tip') + + # Graphite element rib tip regions + rib_ul_t = -ul_t + rib_br_t = -br_t + rib_ru_t = -ru_t + rib_lb_t = -lb_t + + if elem_type == 'core': + # Graphite element ribs for zones I-B and II-A + ul = openmc.ZCylinder(-l1, l2, r_rib, name='rib_ul') + br = openmc.ZCylinder(l1, -l2, r_rib, name='rib_br') + lb = openmc.ZCylinder(-l2, -l1, r_rib, name='rib_lb') + ru = openmc.ZCylinder(l2, l1, r_rib, name='rib_ru') + + # Graphite element rib regions. + rib_ul = -ul + rib_br = -br + rib_lb = -lb + rib_ru = -ru + + # inter-element fuel channel region + inter_elem_channel = +ul & +br & +lb & +ru + + elif elem_type == 'cr': + # Parameters for control rod element + r_d = 1.16 + e_d = 2 * r_d / np.sqrt(3) + r_c = 0.18 + + # Base rib region + ul = openmc.model.hexagonal_prism(origin=(-l1, l2), edge_length=e_d, + orientation='x', corner_radius=r_c) + br = openmc.model.hexagonal_prism(origin=(l1, -l2), edge_length=e_d, + orientation='x',corner_radius=r_c) + lb = openmc.model.hexagonal_prism(origin=(-l2, -l1), edge_length=e_d, + orientation='y',corner_radius=r_c) + ru = openmc.model.hexagonal_prism(origin=(l2, l1), edge_length=e_d, + orientation='y',corner_radius=r_c) + + rib_ul = ul + rib_lb = br + rib_br = lb + rib_ru = ru + + inter_elem_channel = ~ul & ~br & ~lb & ~ru + + ribs = [[rib_ul, 'rib_ul'], + [rib_br, 'rib_br'], + [rib_ru, 'rib_ru'], + [rib_lb, 'rib_lb'], + [rib_ul_t, 'rib_ul_t'], + [rib_br_t, 'rib_br_t'], + [rib_ru_t, 'rib_ru_t'], + [rib_lb_t, 'rib_lb_t']] + + gr_extra_regions = ribs + inter_elem_channel = inter_elem_channel & +ul_t & +br_t & +ru_t & +lb_t + + extra_surf = openmc.ZCylinder(r=r_es, name=es_name) + + return gr_sq_neg, gr_extra_regions, inter_elem_channel, extra_surf + +def cr_lattice(cr_boundary, core_base, core_top): + """Creates the control rod lattice. + + Parameters + ---------- + cr_boundary : openmc.Intersection + Outer bound of the lattice in the xy-plane. + core_base : openmc.ZPlane + Core bottom bounding surface. + core_top : openmc.ZPlane + Core top bounding surface. + + Returns + ------- + c1 : openmc.Cell + Cell containing the control rod lattice. + + """ + (gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + fuel_hole) = shared_elem_geometry(elem_type='cr', + gr_sq_d=7.23646, + gr_sq_r=0.99, + r_rib=0.8, + l1=5.8801, + l2=6.505, + l3=8.03646, + r_es=5.08, + es_name='cr_fuel_hole') + f = cr.control_rod(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + fuel_hole, + fuel, + moder) + e = cr.control_rod_channel(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + fuel_hole, + fuel, + moder) + + cl = openmc.RectLattice() + cl.pitch = np.array([15.24, 15.24]) + N = 2 / 2 + cl.lower_left = -1 * cl.pitch * N + cl.universes = [[f, e], + [e, f]] + c1 = openmc.Cell(fill=cl, region=(+core_base & -core_top & cr_boundary), + name='cr_lattice') + + return c1 + +def main_lattice(zone_i_boundary, cr_boundary, core_base, core_top): + """Creates the core lattice. + + Parameters + ---------- + zone_i_boundary : 3-tuple of openmc.model.IsogonalOctagon + Zone I bounding surfaces in the xy-plane + cr_boundary : openmc.Intersection + Outer bound of the lattice in the xy-plane. + core_base : openmc.ZPlane + Core bottom bounding surface. + core_top : openmc.ZPlane + Core top bounding surface. + + Returns + ------- + main_cells : list of openmc.Cell + Cells containing the main lattice. + + """ + (gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + gr_round_4) = shared_elem_geometry() + + l = ce.zoneIB(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + gr_round_4, + moder, + fuel, + hast) + + (gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + gr_round_4) = shared_elem_geometry() + + z = ce.zoneIIA(gr_sq_neg, + gr_extra_regions, + inter_elem_channel, + gr_round_4, + moder, + fuel) + v = ce.void_cell() + # tres, uno, dos, quatro + t, u, d, q = ce.graphite_triangles(fuel, moder) + + s1, s2, s3 = zone_i_boundary + + main = openmc.RectLattice() + main.pitch = np.array([10.16, 10.16]) + N = 45 / 2 + main.lower_left = -1 * main.pitch * N + main.universes = [[v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, d, z, z, z, z, z, z, z, z, z, u, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, v, v, v, v, d, z, z, z, z, l, l, l, l, l, l, l, l, l, z, z, z, z, u, v, v, v, v, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, v, v, d, z, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, z, u, v, v, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v, v, v, v, v], + [v, v, v, v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v, v, v, v], + [v, v, v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v, v, v], + [v, v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v, v], + [v, v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v, v], + [v, v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v, v], + [v, v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v, v], + [v, d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u, v], + [v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v], + [v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v], + [v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v], + [d, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, u], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, v, v, v, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, v, v, v, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, v, v, v, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z], + [t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q], + [v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v], + [v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v], + [v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v], + [v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v], + [v, v, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, v, v], + [v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v], + [v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v], + [v, v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v, v], + [v, v, v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v, v, v], + [v, v, v, v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v, v, v, v], + [v, v, v, v, v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, v, t, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, q, v, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, v, v, t, z, z, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, l, z, z, q, v, v, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, v, v, v, v, t, z, z, z, z, l, l, l, l, l, l, l, l, l, z, z, z, z, q, v, v, v, v, v, v, v, v, v, v, v, v, v], + [v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, t, z, z, z, z, z, z, z, z, z, q, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v]] + + c1 = openmc.Cell(fill=main, region=(+core_base & + -core_top & + +zone_i_boundary[2] & + -zone_i_boundary[1] & + ~cr_boundary), name='main_lattice_smaller_octader') + c2 = openmc.Cell(fill=main, region=(+core_base & + -core_top & + -zone_i_boundary[2] & + ~cr_boundary), + name='main_lattice_insite_smallest_octader') + c3 = openmc.Cell(fill=main, region=(+core_base & + -core_top & + -zone_i_boundary[0] & + +zone_i_boundary[1] & + +zone_i_boundary[2] & + ~cr_boundary), + name=('main_lattice_inside_base_octader' + '_deducted_smaller_smallest')) + main_cells = [c1, c2, c3] + return main_cells + +def plot_geometry(name, + origin=(0.,0.,0.), + pixels=(10000,10000), + width=(686.816, 686.816), + color_by='material', + colormap=colormap, + basis='xy'): + plot = openmc.Plot(name=name) + plot.origin = origin + plot.pixels = pixels + plot.width = width + plot.color_by = color_by + plot.colors = colormap + plot.basis = basis + + return plot + + +deplete = parse_arguments() + +(zone_bounds, + core_bounds, + reflector_bounds, + vessel_bounds) = rg.shared_root_geometry() + +(cr_boundary, + zone_i_boundary, + zone_ii_boundary) = zone_bounds + +(annulus_boundary, + lower_plenum_boundary, + core_base, + core_top) = core_bounds + +(radial_reflector_boundary, + bottom_reflector_boundary, + top_reflector_boundary) = reflector_bounds + +(radial_vessel_boundary, + bottom_vessel_boundary, + top_vessel_boundary) = vessel_bounds + +main = main_lattice(zone_i_boundary, + cr_boundary, + core_base, + core_top) + +cr = cr_lattice(cr_boundary, + core_base, + core_top) + +iib = rg.zoneIIB(zone_i_boundary, + zone_ii_boundary, + core_base, + core_top, + fuel, + moder) + +a = rg.annulus(zone_ii_boundary, + annulus_boundary, + core_base, + core_top, + fuel) + +lp = rg.lower_plenum(core_base, + lower_plenum_boundary, + annulus_boundary, + fuel) + +rr, rb, rt = rg.reflectors(annulus_boundary, + radial_reflector_boundary, + lower_plenum_boundary, + bottom_reflector_boundary, + core_top, + top_reflector_boundary, + moder) + +vr, vb, vt = rg.vessel(radial_reflector_boundary, + radial_vessel_boundary, + bottom_vessel_boundary, + top_vessel_boundary, + top_reflector_boundary, + bottom_reflector_boundary, + hast) + +geo = openmc.Geometry() +univ = openmc.Universe(cells=[cr, lp, a, rr, rb, rt, vr, vb, vt]) +univ.add_cells(main) +univ.add_cells(iib) + +geo.root_universe = univ +geo.remove_redundant_surfaces() +geo.export_to_xml() + +# Settings +settings = openmc.Settings() +settings.particles = 10000 +settings.batches = 150 +settings.inactive = 25 +settings.temperature = {'default': 900, + 'method': 'interpolation', + 'range': (800, 1000)} + +ll, ur = geo.root_universe.bounding_box +msbr_volume_calc = openmc.VolumeCalculation([fuel, moder], 1000000000, ll, ur) +#msbr_volume_calc.set_trigger(1e-03, 'rel_err') +settings.volume_calculations = [msbr_volume_calc] +settings.run_mode = 'volume' +settings.export_to_xml() + +## Slice plots + +plots = openmc.Plots() + +plots.append(plot_geometry('serpent-plot1', + origin=(0., 0., 150.5))) +plots.append(plot_geometry('serpent-plot2', + origin=(0., -77.5, 306.07), + pixels=(1550, 3400), + width=(155, 612.14), + basis='yz')) +plots.append(plot_geometry('serpent-plot3', + origin=(0., 0., 155.), + pixels=(1000, 1000), + width=(40, 40), + basis='yz')) +plots.append(plot_geometry('serpent-plot4', + origin=(16.5, 0., 306.07), + pixels=(2000, 2000), + width=(686.816, 612.14), + basis='yz')) +plots.append(plot_geometry('detail-zoneIB-IIA-lower1', + origin=(215, 0., 10.0), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIB-main', + origin=(215, 0., 23.0), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIB-upper1', + origin=(215, 0., 420), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIIA-upper', + origin=(215, 0., 435), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIIA-upper2', + origin=(215, 0., 437), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIB-upper2', + origin=(215, 0., 439), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIIA-upper3', + origin=(215, 0., 440), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIIA-upper4', + origin=(215, 0., 442), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('detail-zoneIB-upper3', + origin=(215, 0., 448), + pixels=(1000, 1000), + width=(40, 40))) +plots.append(plot_geometry('full-zoneIB-IIA-lower1', + origin=(0., 0., 10.0), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIB-main', + origin=(0., 0., 23.0), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIB-upper1', + origin=(0., 0., 420), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIIA-upper', + origin=(0., 0., 435), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIIA-upper2', + origin=(0., 0., 437), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIB-upper2', + origin=(0., 0., 439), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIIA-upper3', + origin=(0., 0., 440), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIIA-upper4', + origin=(0., 0., 442), + width=(522.232, 522.232))) +plots.append(plot_geometry('full-zoneIB-upper3', + origin=(0., 0., 448), + width=(522.232, 522.232))) +plots.append(plot_geometry('detail-core-xz-upper', + origin=(215, 0., 440), + pixels=(1000, 1000), + width=(100, 100), + basis='xz')) +plots.append(plot_geometry('full-core-xz', + origin=(0., 0., 306.07), + pixels=(10000,10000), + width=(618.816, 612.14), + basis='xz')) +plots.export_to_xml() + +if deplete: + # Get Serpent fission q values + def get_web_file(url, fname=None): + if fname is None: + fname = url.split('/')[-1] + if not(Path(fname).exists()): + args = ('wget', + '-q', + '-O', + f'{fname}', + f'{url}') + try: + subprocess.check_output( + args, + cwd=str(Path(__file__).parents[0]), + stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as error: + print(error.output.decode("utf-8")) + raise RuntimeError(f'Failed to get file {fname} from URL {url}.' + '\n see error message above') + + # Serpent fission-Q values + url = ('https://raw.githubusercontent.com/' + 'openmc-dev/data/master/depletion/serpent_fissq.json') + get_web_file(url) + + # ENDF/B VII.1 Chain + url = ('https://anl.box.com/shared/static/' + 'os1u896bwsbopurpgas72bi6aij2zzdc.xml') + get_web_file(url, fname='chain_endfb71_pwr.xml') + + with open('serpent_fissq.json') as f: + fiss_q = json.load(f) + + model = openmc.Model.from_xml() + op = CoupledOperator(model, + chain_file='chain_endfb71_pwr.xml', + fission_q=fiss_q) + timesteps = [3] * 12 + integrator = PredictorIntegrator(op, + timesteps, + timestep_units='d', + power=2.25e9) + integrator.integrate() diff --git a/examples/msbr/root_geometry.py b/examples/msbr/root_geometry.py new file mode 100644 index 000000000..199707587 --- /dev/null +++ b/examples/msbr/root_geometry.py @@ -0,0 +1,340 @@ +import openmc +import numpy as np + +def shared_root_geometry(): + """Creates surfaces and regions for root geometry. + + Returns + ------- + zone_bounds : tuple + Tuple containing zone bounding surfaces + core_bounds : list of openmc.Surface + List of reactor core bounding surfaces + reflector_bounds : list of openmc.Surface + List of reflector boundng surfaces + vessel_bounds : list of openmc.Surface + List of reactor vessel bounding surfaces + + """ + cr_boundary = openmc.model.rectangular_prism(15.24*2, 15.24*2) + core_base = openmc.ZPlane(z0=0.0, name='core_base') + core_top = openmc.ZPlane(z0=449.58, name='core_top') + + s1 = openmc.model.IsogonalOctagon(center=(0.0,0.0), r1=208.28, r2=222.71, + name='base_octader') + s2 = openmc.model.IsogonalOctagon(center=(0.0,0.0), r1=218.44, r2=215.53, + name='smaller_octader') + s3 = openmc.model.IsogonalOctagon(center=(0.0,0.0), r1=228.60, r2=193.97, + name='smallest_octader') + + zone_i_boundary = (s1, s2, s3) + + zone_ii_boundary = openmc.ZCylinder(r=256.032, name='iib_boundary') + annulus_boundary = openmc.ZCylinder(r=261.112, name='annulus_boundary') + lower_plenum_boundary = openmc.ZPlane(z0=-7.62, + name='lower_plenum_boundary') + + zone_bounds = (cr_boundary, + zone_i_boundary, + zone_ii_boundary) + core_bounds = (annulus_boundary, + lower_plenum_boundary, + core_base, + core_top) + radial_reflector_boundary = \ + openmc.ZCylinder(r=338.328, name='radial_reflector_boundary') + bottom_reflector_boundary = \ + openmc.ZPlane(z0=-76.2, name='bottom_axial_reflector_boundary') + top_reflector_boundary = \ + openmc.ZPlane(z0=525.78, name='top_axial_reflector_boundary') + reflector_bounds = (radial_reflector_boundary, + bottom_reflector_boundary, + top_reflector_boundary) + + radial_vessel_boundary = openmc.ZCylinder(r=343.408, + name='radial_vessel_wall', + boundary_type='vacuum') + bottom_vessel_boundary = openmc.ZPlane(z0=-81.28, + name='bottom_vessel_wall', + boundary_type='vacuum') + top_vessel_boundary = openmc.ZPlane(z0=530.86, + name='top_vessel_wall', + boundary_type='vacuum') + + vessel_bounds = (radial_vessel_boundary, + bottom_vessel_boundary, + top_vessel_boundary) + + return zone_bounds, core_bounds, reflector_bounds, vessel_bounds + +def zoneIIB(zone_i_boundary, + zone_ii_boundary, + core_base, + core_top, + fuel, + moder): + """ Creates Zone IIB graphite slab elements. + + Parameters + ---------- + zone_i_boundary : 3-tuple of openmc.model.IsogonalOctagon + Zone I bounding surfaces in the xy-plane + zone_ii_boundary : openmc.ZCylinder + Zone II bounding surface in the xy-plance + core_base : openmc.ZPlane + Core bottom bounding surface. + core_top : openmc.ZPlane + Core top bounding surface. + fuel : openmc.Material + Fuel salt material + moder : openmc.Material + Graphite material + + Returns + ------- + iib_cells : list of openmc.Cell + Cells containing graphite slabs in Zone IIB. + """ + + + # Large elements + large_angular_width = 3.538 + large_half_w = large_angular_width / 2 + large_positions = np.linspace(0, 315, 8) + r_outer = 256.032 + r_big1 = 229.6 + r_big2 = 223.6 + rb_1 = (r_big1, r_outer) + rb_2 = (r_big2, r_outer) + big_radii = [rb_1, rb_2] * 4 + small_radii = (207.28, r_outer) + + r_hole = 3.0875 + hole_args = ({'x0': 242.679, 'y0': 0.0, 'r': r_hole}, + {'x0': 171.60, 'y0': 171.60, 'r': r_hole}, + {'x0': 0.0, 'y0': 242.679, 'r': r_hole}, + {'x0': -171.60, 'y0': 171.60, 'r': r_hole}, + {'x0': -242.679, 'y0': 0.0, 'r': r_hole}, + {'x0': -171.60, 'y0': -171.60, 'r': r_hole}, + {'x0': 0.0, 'y0': -242.697, 'r': r_hole}, + {'x0': 171.60, 'y0': -171.60, 'r': r_hole}) + + # Small elements + small_angular_width = 0.96 + adjacent_angular_offset = 0.675 #27/40 + small_elems_per_octant = 25 + + elem_cells = [] + zone_iib_reg = None + for i, pos in enumerate(large_positions): + pos = np.round(pos, 3) + r1_big, r2_big = big_radii[i] + t1_big = np.round(pos - large_half_w, 3) + t2_big = np.round(pos + large_half_w, 3) + s1 = openmc.model.CylinderSector(r1_big, + r2_big, + t1_big, + t2_big, + name=f'iib_large_element_{pos}') + s2 = openmc.ZCylinder(**hole_args[i]) + + elem_cells.append(openmc.Cell(fill=moder, region=(-s1 & +s2), + name=f'iib_large_element_{pos}')) + elem_cells.append(openmc.Cell(fill=fuel, region=(-s2), + name=('iib_large_element' + f'_fuel_hole_{pos}'))) + + t1_small = np.round(t2_big + adjacent_angular_offset, 3) + r1_small, r2_small = small_radii + + if isinstance(zone_iib_reg, openmc.Region): + zone_iib_reg = zone_iib_reg & +s1 + else: + zone_iib_reg = +s1 + + for i in range(0, small_elems_per_octant): + t2_small = np.round(t1_small + small_angular_width, 3) + + # reflector element + pos = t2_small - (small_angular_width / 2) + pos = np.round(pos, 3) + s5 = openmc.model.CylinderSector(r1_small, + r2_small, + t1_small, + t2_small, + name=f'iib_small_element_{pos}') + elem_cells.append(openmc.Cell(fill=moder, region=-s5, + name=f'iib_small_element_{pos}')) + + t1_small = np.round(t2_small + adjacent_angular_offset, 3) + + zone_iib_reg = zone_iib_reg & +s5 + + #universe_id=10 + iib = openmc.Universe(name='zone_iib', cells=elem_cells) + s1, s2, s3 = zone_i_boundary + + iib.add_cell(openmc.Cell(fill=fuel, region=zone_iib_reg, + name='zone_iib_fuel')) + iib_cells = [openmc.Cell(fill=iib, region=(+s1 & +s2 & +s3 & + -zone_ii_boundary & + +core_base & + -core_top), + name='zone_iib')] + return iib_cells + +def annulus(zone_ii_boundary, annulus_boundary, core_base, core_top, fuel): + """ Creates annulus cell. + + Parameters + ---------- + zone_ii_boundary : openmc.ZCylinder + Zone II bounding surfaces in the xy-plane + annulus_boundary : openmc.ZCylinder + Annulus bounding surface in the xy-plance + core_base : openmc.ZPlane + Core bottom bounding surface. + core_top : openmc.ZPlane + Core top bounding surface. + fuel : openmc.Material + Fuel salt material + + Returns + ------- + c1 : openmc.Cell + Annulus cell. + """ + annulus_reg = +zone_ii_boundary & -annulus_boundary & +core_base & -core_top + c1 = openmc.Cell(fill=fuel, region=annulus_reg, name='annulus') + return c1 + +def lower_plenum(core_base, lower_plenum_boundary, annulus_boundary, fuel): + """ Creates lower plenum cell. + + Parameters + ---------- + core_base : openmc.ZPlane + Core bottom bounding surface. + lower_plenum_boundary : openmc.ZPlane + Lower plenum bottom bounding surface. + annulus_boundary : openmc.ZCylinder + Annulus bounding surface in the xy-plance + fuel : openmc.Material + Fuel salt material + + Returns + ------- + c1 : openmc.Cell + Lower plenum cell + """ + lower_plenum_reg = -core_base & +lower_plenum_boundary & -annulus_boundary + c1 = openmc.Cell(fill=fuel, region=lower_plenum_reg, name='lower_plenum') + return c1 + +def reflectors(annulus_boundary, + radial_reflector_boundary, + lower_plenum_boundary, + bottom_reflector_boundary, + core_top, + top_reflector_boundary, + moder): + """ Creates graphite reflector cells. + + Parameters + ---------- + annulus_boundary : openmc.ZCylinder + Annulus bounding surface in the xy-plance + radial_reflector_boundary : openmc.ZCylinder + Reflector bounding surface in the xy-plance + lower_plenum_boundary : openmc.ZPlane + Lower plenum bottom bounding surface. + bottom_reflector_boundary : openmc.ZPlane + Reflector bottom bounding surface. + core_top : openmc.ZPlane + Core top bounding surface. + top_reflector_boundary : openmc.ZPlane + Reflector top bounding surface. + moder : openmc.Material + Graphite material + + Returns + ------- + c1 : openmc.Cell + Radial reflector. + c2 : openmc.Cell + Bottom axial reflector. + c3 : openmc.Cell + Top axial reflector. + """ + radial_reflector_reg = (+annulus_boundary & + -radial_reflector_boundary & + +bottom_reflector_boundary & + -top_reflector_boundary) + bottom_reflector_reg = (-annulus_boundary & + -lower_plenum_boundary & + +bottom_reflector_boundary) + top_reflector_reg = (-annulus_boundary & + +core_top & + -top_reflector_boundary) + + c1 = openmc.Cell(fill=moder, region=radial_reflector_reg, + name='radial_reflector') + c2 = openmc.Cell(fill=moder, region=bottom_reflector_reg, + name='bottom_axial_reflector') + c3 = openmc.Cell(fill=moder, region=top_reflector_reg, + name='top_axial_reflector') + return c1, c2, c3 + +def vessel(radial_reflector_boundary, + radial_vessel_boundary, + bottom_vessel_boundary, + top_vessel_boundary, + top_reflector_boundary, + bottom_reflector_boundary, + hast): + """ Creates reactor vessel cells. + + Parameters + ---------- + radial_reflector_boundary : openmc.ZCylinder + Reflector bounding surface in the xy-plance + radial_vessel_boundary : openmc.ZCylinder + Vessel bounding surface in the xy-plane + bottom_vessel_boundary : openmc.ZPlane + Vessel bottom bounding surface. + top_vessel_boundary : openmc.ZPlane + Vessel top bounding surface. + top_reflector_boundary : openmc.ZPlane + Reflector top bounding surface. + bottom_reflector_boundary : openmc.ZPlane + Reflector bottom bounding surface. + hast : openmc.Material + Hastelloy-N material + + Returns + ------- + c1 : openmc.Cell + Radial vessel wall. + c2 : openmc.Cell + Bottom vessel wall. + c3 : openmc.Cell + Top vessel wall. + """ + radial_vessel_reg = (+radial_reflector_boundary & + -radial_vessel_boundary & + -top_vessel_boundary & + +bottom_vessel_boundary) + bottom_vessel_reg = (-radial_reflector_boundary & + -bottom_reflector_boundary & + +bottom_vessel_boundary) + top_vessel_reg = (-radial_reflector_boundary & + -top_vessel_boundary & + +top_reflector_boundary) + + c1 = openmc.Cell(fill=hast, region=radial_vessel_reg, + name='radial_vessel_wall') + c2 = openmc.Cell(fill=hast, region=bottom_vessel_reg, + name='bottom_vessel_wall') + c3 = openmc.Cell(fill=hast, region=top_vessel_reg, + name='top_vessel_wall') + return c1, c2, c3 diff --git a/scripts/README.md b/scripts/README.md index 5f65875f7..7ccb47a6f 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -3,8 +3,12 @@ This directory contains various scripts to help you set-up and analyze results of your SaltProc simulations. ### `xsdata` -The script in this directory downloads and processes the JEFF -3.1.2 cross section library -- as well as spontaneous and delayed fission neutron and +The scripts in this directory download and processe cross section data for +use in Serpent and OpenMC + +#### `process_jeff312.bash` +Downloads and processes the JEFF 3.1.2 cross section library -- as well as +spontaneous and delayed fission neutron and decay data -- for running the integration tests on a UNIX-like machine. @@ -23,3 +27,34 @@ XSDIR=[PATH TO XSDIR] bash process_j312.bash Where `XSDIR` is a path to the directory where you want to store the cross section libraries. Running the script without setting `XSDIR` will install the cross section library in the current working directory. + +#### `download_endfb71.bash` +Downloads and processes the endfb7x incident neutron data, and ENDFB71 or +ENDFB70 thermal scattering data in ACE format (depending on if the user's Serpent +version supports interpolation of continuous energy thermal scattering cross +sections) -- as well as spontaneous and delayed fission neutron and decay data -- +for running Serpent models on a UNIX-like machine. + +To run the script, execute +``` +XSDIR=[PATH TO XSDIR] bash download_endfb71.bash +``` + +Where `XSDIR` is a path to the directory where you want to store the cross +section libraries. Running the script without setting `XSDIR` will install the cross section library in the current working directory. + +#### `process_endfb71_to_openmc.bash` +Processes the endfb71 library created by the previous script into +OpenMC's HDF5 format for cross section data on a UNIX-like machine. + +*You must have installed OpenMC on your machine and have openmc repo on your +machine in order for this script to work* +Information about how to do this can be found [here](https://docs.openmc.org/en/latest/usersguide/install.html). + +To run the script, execute +``` +XSDIR=[PATH TO XSDIR] OPENMC_ENV=[NAME OF OPENMC CONDA ENVIRONMENT] OPENMCDIR=[PATH TO OPENMC REPO] bash process_endfb71_to_openmc.bash +``` + +Where `XSDIR` is a path to the directory where you want to store the cross +section libraries. Running the script without setting `XSDIR` will install the cross section library in the current working directory. diff --git a/scripts/xsdata/download_endfb71.bash b/scripts/xsdata/download_endfb71.bash new file mode 100644 index 000000000..12032ea8b --- /dev/null +++ b/scripts/xsdata/download_endfb71.bash @@ -0,0 +1,125 @@ +#! ~/bin/bash +################ +### DOWNLOAD ### +################ +# Serpent version 2.32 added support for interpolating continuous energy thermal +# scattering cross sections. If a user has this serpent version, then the script +# will download the ENDF/B-VII.1 thermal scattering data which is continuous in +# energy. Otherwise, the script will download the ENDF/B-VII.0 thermal scattering +# data which is tabulated in energy, but is the same evaluation as the ENDF/B-VII.1 data +SUPPORTS_INTERPOLATE_CONTINUOUS_ENERGY=false +# DATADIR is the directory where the xs library is extracted to +# @yardasol reccomends naming the parent directory where the files +# will be extractd to as "endfb71_ace" +if [[ -d "$XSDIR" ]] +then + DATADIR=$XSDIR/endfb71_ace +else + DATADIR=$PWD/endfb71_ace +fi +mkdir -p $DATADIR/acedata + +# ndy, decay, sfy data +LN="https://www.nndc.bnl.gov/endf-b7.1/zips/" +SLUG="ENDF-B-VII.1-" +DATA=("nfy" "decay" "sfy") +EXT=".zip" +for D in ${DATA[@]} +do + if [[ ! -f $DATADIR/$SLUG$D$EXT ]] + then + wget -P $DATADIR $LN$SLUG$D$EXT + fi + if [[ ! -d $DATADIR/$D ]] + then + mkdir -p $DATADIR/$D + unzip -j $DATADIR/$SLUG$D$EXT -d $DATADIR/$D + fi + if [[ ! -f $DATADIR/endfb71.$D ]] + then + touch $DATADIR/endfb71.$D + files=$(ls $DATADIR/$D/*.[Ee][Nn][Dd][Ff]) + for file in $files + do + cat $file >> $DATADIR/endfb71.$D + done + fi +done + +# OpenMC depletion chain +#conda activate openmc-env +#python openmc_make_chain.py -D $DATADIR + +######################### +### SETUP .xsdir FILE ### +######################### +XSDIR_FILE=endfb71.xsdir +ACESLUG=https://www.nndc.bnl.gov/endf-b7.1/aceFiles/ +ACEGZ=ENDF-B-VII.1-tsl.tar.gz +if [[ ! -f $DATADIR/$ACEGZ ]] +then + wget -P $DATADIR $ACESLUG$ACEGZ +fi +tar -xOzf $DATADIR/$ACEGZ xsdir | cat > $DATADIR/$XSDIR_FILE + +# Make regex for DATADIR +DATADIR_REGEX=${DATADIR//\//\\\/} + +# Fix datapath +sed -i "s/datapath/datapath=$DATADIR_REGEX/" $DATADIR/$XSDIR_FILE + +# Get cutoff line number +LN="$(grep -n "directory" $DATADIR/$XSDIR_FILE)" +IFS=':' read -ra arr <<< "$LN" +LN=${arr[0]} + +# Remove unused directory paths +head -n$LN $DATADIR/$XSDIR_FILE | cat > $DATADIR/temp +cat $DATADIR/temp > $DATADIR/$XSDIR_FILE +rm $DATADIR/temp + +# Neutron and thermal scattering data +LN="https://nucleardata.lanl.gov/lib/" +if ! $SUPPORTS_INTERPOLATE_CONTINUOUS_ENERGY +then + THERM="endf70sab" +else + THERM="ENDF71SaB" +fi +DATA=("$THERM" "endf71x") +EXT=".tgz" +for D in ${DATA[@]} +do + if [[ ! -f $DATADIR/$D$EXT ]] + then + wget -P $DATADIR $LN$D$EXT + fi + if [[ ! -d $DATADIR/acedata/$D ]] + then + tar -xzf $DATADIR/"$D$EXT" -C $DATADIR --verbose + mv $DATADIR/$D/$D $DATADIR/acedata/. + fi + + cat $DATADIR/$D/xsdir >> $DATADIR/$XSDIR_FILE + echo "" >> $DATADIR/$XSDIR_FILE + sed -i "s/$D\//acedata\/$D\//" $DATADIR/$XSDIR_FILE +done + + +# download cross section dir convert script +if [[ ! -f $XSDIR/xsdirconvert.pl ]] +then + wget -O $XSDIR/xsdirconvert.pl http://montecarlo.vtt.fi/download/xsdirconvert.pl +fi + +# Run the xsdirconvert script +perl $XSDIR/xsdirconvert.pl $DATADIR/$XSDIR_FILE > $DATADIR/endfb71.xsdata + +# Fix bad names for Am242 +sed -i "s/Am-242/Am-242m/" $DATADIR/endfb71.xsdata +sed -i "s/ Am-242/Am-242/" $DATADIR/endfb71.xsdata +sed -i "s/Am-242mm/ Am-242/" $DATADIR/endfb71.xsdata +sed -i "s/c 1 95242 0/c 1 95242 2/" $DATADIR/endfb71.xsdata +sed -i "s/c 1 95242 1/c 1 95242 0/" $DATADIR/endfb71.xsdata +sed -i "s/c 1 95242 2/c 1 95242 1/" $DATADIR/endfb71.xsdata +sed -i "s/c 1 95042 0/c 1 95242 0/" $DATADIR/endfb71.xsdata diff --git a/scripts/xsdata/process_endfb71_to_openmc.bash b/scripts/xsdata/process_endfb71_to_openmc.bash new file mode 100644 index 000000000..6426bebdf --- /dev/null +++ b/scripts/xsdata/process_endfb71_to_openmc.bash @@ -0,0 +1,14 @@ +# Get conda working in non interactive shell +CONDA_PATH=$(conda info | grep -i 'base environment' | awk '{print $4}') +source $CONDA_PATH/etc/profile.d/conda.sh + +if [[ -d "$XSDIR" ]] +then + DATADIR=$XSDIR/endfb71_h5 +else + DATADIR=$PWD/endfb71_h5 +fi +mkdir -p $DATADIR + +conda activate $OPENMC_ENV +python $OPENMCDIR/scripts/openmc-ace-to-hdf5 -d $DATADIR --xsdir $XSDIR/endfb71_ace/endfb71.xsdir -m mcnp diff --git a/scripts/xsdata/process_j312.bash b/scripts/xsdata/process_j312.bash index 838b61d27..61828b21a 100644 --- a/scripts/xsdata/process_j312.bash +++ b/scripts/xsdata/process_j312.bash @@ -15,6 +15,7 @@ SLUG="ACEs_" EXT="K.zip" SLUG1="STL_ACEs.zip" TEMPS=(900) +BRC=$HOME/.bashrc #Uncomment for a good range of temperatures (will take a long time) #TEMPS=(500 600 800 900 1000 1200 1500) @@ -151,7 +152,7 @@ do fi # Run the xsdirconvert script - perl $XSDIR/xsdirconvert.pl $DATDIR/sss_jeff312.xsdir > $DATADIR/sss_jeff312.xsdata + perl $XSDIR/xsdirconvert.pl $DATADIR/sss_jeff312.xsdir > $DATADIR/sss_jeff312.xsdata # Add seprpent variables to PATH (to be created) echo "export SERPENT_DATA="$DATADIR"" >> $BRC