Updated scripts per comments by @paulromano
This commit is contained in:
parent
736c9d6d0c
commit
827efd3cf2
10 changed files with 34 additions and 64 deletions
|
|
@ -21,7 +21,7 @@ openmc_geometry.export_to_xml()
|
|||
|
||||
# Query the user on whether to use multipole cross sections
|
||||
multipole = input('Use multipole cross sections? (y/n): ').lower()
|
||||
multipole = True if multipole == 'y' else False
|
||||
multipole = (multipole == 'y')
|
||||
|
||||
# Construct uniform initial source distribution over fissionable zones
|
||||
lower_left = [-21.41728, -21.41728, +192.5]
|
||||
|
|
@ -52,9 +52,9 @@ beavrs.write_openmc_plots()
|
|||
plot = openmc.Plot()
|
||||
plot.width = [21.41728*2, 21.41728*2]
|
||||
plot.origin = [0., 0., 195.]
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.filename = '2x2-periodic'
|
||||
plot.col_spec = beavrs.plots.colspec_mat
|
||||
plot.colors = beavrs.plots.colors_mat
|
||||
plot.pixels = [1000, 1000]
|
||||
|
||||
plot_file = openmc.Plots([plot])
|
||||
|
|
@ -106,7 +106,7 @@ mesh.type = 'regular'
|
|||
mesh.dimension = [34, 34, 1]
|
||||
mesh.lower_left = lower_left
|
||||
mesh.width = (np.array(upper_right) - np.array(lower_left))
|
||||
mesh.width[:2] /= 34
|
||||
mesh.width[:2] /= mesh.dimension
|
||||
mesh_filter = openmc.MeshFilter(mesh)
|
||||
|
||||
# Instantiate energy-integrated fission rate mesh Tally
|
||||
|
|
|
|||
|
|
@ -44,20 +44,15 @@ def find_assembly(assembly_name, wrap_geometry=True):
|
|||
min_z = openmc.ZPlane(z0=192.5, boundary_type='reflective')
|
||||
|
||||
# Add boundaries to the root Cell
|
||||
root_cell.add_surface(surface=min_x, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_x, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_y, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_y, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_z, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_z, halfspace=-1)
|
||||
root_cell.region = \
|
||||
+min_x & -max_x & +min_y & -max_y & +min_z & -max_z
|
||||
|
||||
# Create a root Universe
|
||||
root_univ = openmc.Universe(universe_id=0, name='root universe')
|
||||
root_univ.add_cell(root_cell)
|
||||
|
||||
# Create a Geometry
|
||||
fuel_assembly = openmc.Geometry()
|
||||
fuel_assembly.root_universe = root_univ
|
||||
fuel_assembly = openmc.Geometry(root_univ)
|
||||
|
||||
return fuel_assembly
|
||||
|
||||
|
|
@ -122,20 +117,14 @@ def build_two_by_two(assembly1_name, assembly2_name):
|
|||
max_z = openmc.ZPlane(z0=197.5, boundary_type='reflective')
|
||||
|
||||
# Add boundaries to the root Cell
|
||||
root_cell.add_surface(surface=min_x, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_x, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_y, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_y, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_z, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_z, halfspace=-1)
|
||||
root_cell.region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z
|
||||
|
||||
# Create a root Universe for this fuel assembly
|
||||
root_univ = openmc.Universe(universe_id=0, name='root universe')
|
||||
root_univ.add_cell(root_cell)
|
||||
|
||||
# Create an OpenMC Geometry for this fuel assembly
|
||||
two_by_two = openmc.Geometry()
|
||||
two_by_two.root_universe = root_univ
|
||||
two_by_two = openmc.Geometry(root_univ)
|
||||
|
||||
return two_by_two
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ openmc_geometry.export_to_xml()
|
|||
|
||||
# Query the user on whether to use multipole cross sections
|
||||
multipole = input('Use multipole cross sections? (y/n): ').lower()
|
||||
multipole = True if multipole == 'y' else False
|
||||
multipole = (multipole == 'y')
|
||||
|
||||
# Construct uniform initial source distribution over fissionable zones
|
||||
lower_left = [-32.12592, -32.12592, 192.5]
|
||||
|
|
@ -55,9 +55,9 @@ beavrs.write_openmc_plots()
|
|||
plot = openmc.Plot()
|
||||
plot.width = [64.25184, 64.25184]
|
||||
plot.origin = [0., 0., 195.]
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.filename = '2x2-reflector'
|
||||
plot.col_spec = beavrs.plots.colspec_mat
|
||||
plot.colors = beavrs.plots.colors_mat
|
||||
plot.pixels = [1000, 1000]
|
||||
|
||||
plot_file = openmc.Plots([plot])
|
||||
|
|
@ -109,7 +109,7 @@ mesh.type = 'regular'
|
|||
mesh.dimension = [34, 34, 1]
|
||||
mesh.lower_left = [lower_left[0], lower_left[1] + lat_width[1], lower_left[2]]
|
||||
mesh.width = np.array(lat_width)
|
||||
mesh.width[:2] /= 17.
|
||||
mesh.width[:2] /= mesh.dimension
|
||||
mesh_filter = openmc.MeshFilter(mesh)
|
||||
|
||||
# Instantiate energy-integrated fission rate mesh Tally
|
||||
|
|
|
|||
|
|
@ -44,20 +44,15 @@ def find_assembly(assembly_name, wrap_geometry=True):
|
|||
min_z = openmc.ZPlane(z0=192.5, boundary_type='reflective')
|
||||
|
||||
# Add boundaries to the root Cell
|
||||
root_cell.add_surface(surface=min_x, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_x, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_y, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_y, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_z, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_z, halfspace=-1)
|
||||
root_cell.region = \
|
||||
+min_x & -max_x & +min_y & -max_y & +min_z & -max_z
|
||||
|
||||
# Create a root Universe
|
||||
root_univ = openmc.Universe(universe_id=0, name='root universe')
|
||||
root_univ.add_cell(root_cell)
|
||||
|
||||
# Create a Geometry
|
||||
fuel_assembly = openmc.Geometry()
|
||||
fuel_assembly.root_universe = root_univ
|
||||
fuel_assembly = openmc.Geometry(root_univ)
|
||||
|
||||
return fuel_assembly
|
||||
|
||||
|
|
@ -130,12 +125,7 @@ def build_reflector(assembly1_name, assembly2_name):
|
|||
max_z = openmc.ZPlane(z0=197.5, boundary_type='reflective')
|
||||
|
||||
# Add boundaries to the root Cell
|
||||
root_cell.add_surface(surface=min_x, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_x, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_y, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_y, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_z, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_z, halfspace=-1)
|
||||
root_cell.region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z
|
||||
|
||||
# Create a root Universe for this fuel assembly
|
||||
root_univ = openmc.Universe(universe_id=0, name='root universe')
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ openmc_geometry.export_to_xml()
|
|||
|
||||
# Query the user on whether to use multipole cross sections
|
||||
multipole = input('Use multipole cross sections? (y/n): ').lower()
|
||||
multipole = True if multipole == 'y' else False
|
||||
multipole = (multipole == 'y')
|
||||
|
||||
# Construct uniform initial source distribution over fissionable zones
|
||||
lower_left = [-10.70864, -10.70864, +192.5]
|
||||
|
|
@ -52,9 +52,9 @@ beavrs.write_openmc_plots()
|
|||
plot = openmc.Plot()
|
||||
plot.width = [10.70864*2, 10.70864*2]
|
||||
plot.origin = [0., 0., 195.]
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.filename = 'assembly'
|
||||
plot.col_spec = beavrs.plots.colspec_mat
|
||||
plot.colors = beavrs.plots.colors_mat
|
||||
plot.pixels = [1000, 1000]
|
||||
|
||||
plot_file = openmc.Plots([plot])
|
||||
|
|
@ -106,7 +106,7 @@ mesh.type = 'regular'
|
|||
mesh.dimension = [17, 17, 1]
|
||||
mesh.lower_left = lower_left
|
||||
mesh.width = (np.array(upper_right) - np.array(lower_left))
|
||||
mesh.width[:2] /= 17
|
||||
mesh.width[:2] /= mesh.dimension
|
||||
mesh_filter = openmc.MeshFilter(mesh)
|
||||
|
||||
# Instantiate energy-integrated fission rate mesh Tally
|
||||
|
|
|
|||
|
|
@ -44,20 +44,15 @@ def find_assembly(assembly_name, wrap_geometry=True):
|
|||
min_z = openmc.ZPlane(z0=192.5, boundary_type='reflective')
|
||||
|
||||
# Add boundaries to the root Cell
|
||||
root_cell.add_surface(surface=min_x, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_x, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_y, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_y, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_z, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_z, halfspace=-1)
|
||||
root_cell.region = \
|
||||
+min_x & -max_x & +min_y & -max_y & +min_z & -max_z
|
||||
|
||||
# Create a root Universe
|
||||
root_univ = openmc.Universe(universe_id=0, name='root universe')
|
||||
root_univ.add_cell(root_cell)
|
||||
|
||||
# Create a Geometry
|
||||
fuel_assembly = openmc.Geometry()
|
||||
fuel_assembly.root_universe = root_univ
|
||||
fuel_assembly = openmc.Geometry(root_univ)
|
||||
|
||||
return fuel_assembly
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ openmc_geometry.export_to_xml()
|
|||
|
||||
# Query the user on whether to use multipole cross sections
|
||||
multipole = input('Use multipole cross sections? (y/n): ').lower()
|
||||
multipole = True if multipole == 'y' else False
|
||||
multipole = (multipole == 'y')
|
||||
|
||||
# Construct uniform initial source distribution over fissionable zones
|
||||
lower_left = [-0.62992, -0.62992, -10.0]
|
||||
|
|
@ -52,9 +52,9 @@ beavrs.write_openmc_plots()
|
|||
plot = openmc.Plot()
|
||||
plot.width = [1.25984, 1.25984]
|
||||
plot.origin = [0., 0., np.inf]
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.filename = 'fuel-pin'
|
||||
plot.col_spec = beavrs.plots.colspec_mat
|
||||
plot.colors = beavrs.plots.colors_mat
|
||||
plot.pixels = [1000, 1000]
|
||||
|
||||
plot_file = openmc.Plots([plot])
|
||||
|
|
|
|||
|
|
@ -52,18 +52,14 @@ def find_pin(pin_name, wrap_geometry=True):
|
|||
root_cell.fill = fuel_pin
|
||||
|
||||
# Add boundaries to the root Cell
|
||||
root_cell.add_surface(surface=min_x, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_x, halfspace=-1)
|
||||
root_cell.add_surface(surface=min_y, halfspace=+1)
|
||||
root_cell.add_surface(surface=max_y, halfspace=-1)
|
||||
root_cell.region = +min_x & -max_x & +min_y & -max_y
|
||||
|
||||
# Create a root Universe
|
||||
root_univ = openmc.Universe(universe_id=0, name='root universe')
|
||||
root_univ.add_cell(root_cell)
|
||||
|
||||
# Create a Geometry
|
||||
fuel_pin = openmc.Geometry()
|
||||
fuel_pin.root_universe = root_univ
|
||||
fuel_pin = openmc.Geometry(root_univ)
|
||||
|
||||
return fuel_pin
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ mesh.type = 'regular'
|
|||
mesh.dimension = [7*17, 7*17, 100]
|
||||
mesh.lower_left = lower_left
|
||||
mesh.width = (np.array(upper_right) - np.array(lower_left))
|
||||
mesh.width[:2] /= (7*17)
|
||||
mesh.width[:2] /= mesh.dimension
|
||||
mesh_filter = openmc.MeshFilter(mesh)
|
||||
|
||||
# Instantiate energy-integrated fission rate mesh Tally
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ plots = openmc.Plots()
|
|||
|
||||
plot = openmc.Plot(name='radial slice ')
|
||||
plot.basis = 'xy'
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.origin = [0., 0., (highest_extent-lowest_extent)/2.]
|
||||
plot.width = [25*lattice_pitch/2, 25*lattice_pitch/2.]
|
||||
plot.filename = 'radial_xy_slice'
|
||||
|
|
@ -37,7 +37,7 @@ plots += [plot]
|
|||
|
||||
plot = openmc.Plot(name='axial slice')
|
||||
plot.basis = 'xz'
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.origin = [0., 0., (highest_extent-lowest_extent)/2.]
|
||||
plot.width = [rpv_OR*2., (highest_extent-lowest_extent)]
|
||||
plot.filename = 'axial_xz_slice'
|
||||
|
|
@ -48,7 +48,7 @@ plots += [plot]
|
|||
|
||||
plot = openmc.Plot(name='assembly grid spacer')
|
||||
plot.basis = 'xy'
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.origin = [0., 0., 102.021]
|
||||
plot.width = [lattice_pitch*1.5, lattice_pitch*1.5]
|
||||
plot.filename = 'assm_grid_spacer'
|
||||
|
|
@ -59,7 +59,7 @@ plots += [plot]
|
|||
|
||||
plot = openmc.Plot(name='assembly no spacer')
|
||||
plot.basis = 'xy'
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.origin = [0., 0., 90.]
|
||||
plot.width = [lattice_pitch*1.5, lattice_pitch*1.5]
|
||||
plot.filename = 'assm_no_spacer'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue