Update the BEAVRS builder to the OpenMC 0.15.0 Python API.

This commit is contained in:
nuclearkevin 2024-12-31 13:17:23 -06:00
parent 6bf761178f
commit 70a8e1aff0
3 changed files with 12 additions and 12 deletions

View file

@ -50,7 +50,7 @@ class Assemblies(object):
# Rectangular prism around the edge of the pinlattice
self.lattice_surfs = \
openmc.rectangular_prism(17*c.pinPitch, 17*c.pinPitch)
openmc.model.RectangularPrism(17*c.pinPitch, 17*c.pinPitch)
def _add_assembly_surfs(self):
@ -58,7 +58,7 @@ class Assemblies(object):
# Rectangular prism around the edge of the pinlattice
self.assem_surfs = \
openmc.rectangular_prism(c.latticePitch, c.latticePitch)
openmc.model.RectangularPrism(c.latticePitch, c.latticePitch)
def _add_bpra_layouts(self):
@ -265,14 +265,14 @@ class Assemblies(object):
# Wrap the lattice with the grid sleeve universe
u_lattice = InfinitePinCell(name='{0} universe'.format(name))
u_lattice.add_ring(lattice, self.lattice_surfs, box=True)
u_lattice.add_ring(lattice, -self.lattice_surfs, box=True)
u_lattice.add_last_ring(self.pins.u_gridsleeve)
self.u_fuel[enr][gt_label][center_label] = u_lattice
u_lattice.finalize()
# Store the lattice without the gridsleeve
u_latticePins = InfinitePinCell(name='{0} pins'.format(name))
u_latticePins.add_ring(lattice, self.lattice_surfs, box=True)
u_latticePins.add_ring(lattice, -self.lattice_surfs, box=True)
u_latticePins.add_last_ring(self.mats['Borated Water'])
self.u_fuel_no_sleeve[enr][gt_label][center_label] = u_latticePins
u_latticePins.finalize()

View file

@ -134,7 +134,7 @@ class BEAVRS(object):
settings_file.dd_nodemap = self.dd_nodemap
settings_file.dd_allow_leakage = self.dd_truncate
settings_file.dd_count_interactions = self.dd_interactions
settings_file.source = openmc.Source(space=openmc.stats.Box(
settings_file.source = openmc.IndependentSource(space=openmc.stats.Box(
self.settings_sourcebox[:3], self.settings_sourcebox[3:]))
output = {'tallies': self.settings_output_tallies,
'summary': self.settings_summary}

View file

@ -49,13 +49,13 @@ class Pincells(object):
# Rectangular prisms for grid spacers
grid_surfs_tb = \
openmc.rectangular_prism(c.rodGridSide_tb, c.rodGridSide_tb)
openmc.model.RectangularPrism(c.rodGridSide_tb, c.rodGridSide_tb)
grid_surfs_i = \
openmc.rectangular_prism(c.rodGridSide_i, c.rodGridSide_i)
openmc.model.RectangularPrism(c.rodGridSide_i, c.rodGridSide_i)
# Rectangular prisms for lattice grid sleeves
grid_surfs_ass = \
openmc.rectangular_prism(c.gridstrapSide, c.gridstrapSide)
openmc.model.RectangularPrism(c.gridstrapSide, c.gridstrapSide)
# Grids axial surfaces
@ -79,22 +79,22 @@ class Pincells(object):
# Grids pincell universes
self.u_grid_i = InfinitePinCell(name='Intermediate grid pincell')
self.u_grid_i.add_ring(self.mats['Borated Water'], grid_surfs_i, box=True)
self.u_grid_i.add_ring(self.mats['Borated Water'], -grid_surfs_i, box=True)
self.u_grid_i.add_last_ring(self.mats['Zircaloy 4'])
self.u_grid_i.finalize()
self.u_grid_tb = InfinitePinCell(name='Top/Bottom grid pincell')
self.u_grid_tb.add_ring(self.mats['Borated Water'], grid_surfs_tb, box=True)
self.u_grid_tb.add_ring(self.mats['Borated Water'], -grid_surfs_tb, box=True)
self.u_grid_tb.add_last_ring(self.mats['Inconel 718'])
self.u_grid_tb.finalize()
self.u_grid_sleeve_i = InfinitePinCell(name='Intermediate grid sleeve pincell')
self.u_grid_sleeve_i.add_ring(self.mats['Zircaloy 4'], grid_surfs_ass, box=True)
self.u_grid_sleeve_i.add_ring(self.mats['Zircaloy 4'], -grid_surfs_ass, box=True)
self.u_grid_sleeve_i.add_last_ring(self.mats['Borated Water'])
self.u_grid_sleeve_i.finalize()
self.u_grid_sleeve_tb = InfinitePinCell(name='Top/Bottom grid sleeve pincell')
self.u_grid_sleeve_tb.add_ring( self.mats['Inconel 718'], grid_surfs_ass, box=True)
self.u_grid_sleeve_tb.add_ring( self.mats['Inconel 718'], -grid_surfs_ass, box=True)
self.u_grid_sleeve_tb.add_last_ring(self.mats['Borated Water'])
self.u_grid_sleeve_tb.finalize()