Updated files to be compatible with v0.14.0 of OpenMC
This commit is contained in:
parent
24e63b7f13
commit
fe2b97b7dc
22 changed files with 2161 additions and 1980 deletions
|
|
@ -49,7 +49,7 @@ class Assemblies(object):
|
||||||
|
|
||||||
# Rectangular prism around the edge of the pinlattice
|
# Rectangular prism around the edge of the pinlattice
|
||||||
self.lattice_surfs = \
|
self.lattice_surfs = \
|
||||||
openmc.rectangular_prism(17*c.pinPitch, 17*c.pinPitch)
|
openmc.model.rectangular_prism(17*c.pinPitch, 17*c.pinPitch)
|
||||||
|
|
||||||
|
|
||||||
def _add_assembly_surfs(self,c):
|
def _add_assembly_surfs(self,c):
|
||||||
|
|
@ -57,7 +57,7 @@ class Assemblies(object):
|
||||||
|
|
||||||
# Rectangular prism around the edge of the pinlattice
|
# Rectangular prism around the edge of the pinlattice
|
||||||
self.assem_surfs = \
|
self.assem_surfs = \
|
||||||
openmc.rectangular_prism(c.latticePitch, c.latticePitch)
|
openmc.model.rectangular_prism(c.latticePitch, c.latticePitch)
|
||||||
|
|
||||||
|
|
||||||
def _add_bpra_layouts(self):
|
def _add_bpra_layouts(self):
|
||||||
|
|
|
||||||
|
|
@ -153,10 +153,11 @@ class Constants(object):
|
||||||
self.rcca_banks = self.rcca_bank_steps_withdrawn.keys()
|
self.rcca_banks = self.rcca_bank_steps_withdrawn.keys()
|
||||||
|
|
||||||
## Keff=1 at approximately S 298
|
## Keff=1 at approximately S 298
|
||||||
self.set_S(S,False)
|
self.set_S(S)
|
||||||
self.set_SS(SS,False)
|
self.set_SS(SS)
|
||||||
|
|
||||||
self.update_dict()
|
self.update_dict()
|
||||||
|
|
||||||
def set_S(self, _S, print_data=True):
|
def set_S(self, _S, print_data=True):
|
||||||
if isinstance(_S,(float,int)):
|
if isinstance(_S,(float,int)):
|
||||||
if _S < 0:
|
if _S < 0:
|
||||||
|
|
@ -173,7 +174,7 @@ class Constants(object):
|
||||||
else:
|
else:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
if print_data:
|
if print_data and not self.first_thru:
|
||||||
print(" RCCA Positions")
|
print(" RCCA Positions")
|
||||||
print(f" A: {self._A:3d} B: {self._B:3d} C: {self._C:3d} D: {self._D:3d}")
|
print(f" A: {self._A:3d} B: {self._B:3d} C: {self._C:3d} D: {self._D:3d}")
|
||||||
print(f" SA: {self._SA:3d} SB: {self._SB:3d} SC: {self._SC:3d} SD: {self._SD:3d} SE: {self._SE:3d}")
|
print(f" SA: {self._SA:3d} SB: {self._SB:3d} SC: {self._SC:3d} SD: {self._SD:3d} SE: {self._SE:3d}")
|
||||||
|
|
@ -215,7 +216,7 @@ class Constants(object):
|
||||||
else:
|
else:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
if print_data:
|
if print_data and not self.first_thru:
|
||||||
print(" RCCA Positions")
|
print(" RCCA Positions")
|
||||||
print(f" A: {self._A:3d} B: {self._B:3d} C: {self._C:3d} D: {self._D:3d}")
|
print(f" A: {self._A:3d} B: {self._B:3d} C: {self._C:3d} D: {self._D:3d}")
|
||||||
print(f" SA: {self._SA:3d} SB: {self._SB:3d} SC: {self._SC:3d} SD: {self._SD:3d} SE: {self._SE:3d}")
|
print(f" SA: {self._SA:3d} SB: {self._SB:3d} SC: {self._SC:3d} SD: {self._SD:3d} SE: {self._SE:3d}")
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from beavrs.corebuilder import AxialPinCell
|
||||||
|
|
||||||
class Pincells(object):
|
class Pincells(object):
|
||||||
|
|
||||||
def __init__(self, mats,constants):
|
def __init__(self, mats, constants):
|
||||||
""" Creates BEAVRS pincell universes """
|
""" Creates BEAVRS pincell universes """
|
||||||
|
|
||||||
self.mats = mats
|
self.mats = mats
|
||||||
|
|
@ -48,13 +48,13 @@ class Pincells(object):
|
||||||
|
|
||||||
# Rectangular prisms for grid spacers
|
# Rectangular prisms for grid spacers
|
||||||
grid_surfs_tb = \
|
grid_surfs_tb = \
|
||||||
openmc.rectangular_prism(c.rodGridSide_tb, c.rodGridSide_tb)
|
openmc.model.rectangular_prism(c.rodGridSide_tb, c.rodGridSide_tb)
|
||||||
grid_surfs_i = \
|
grid_surfs_i = \
|
||||||
openmc.rectangular_prism(c.rodGridSide_i, c.rodGridSide_i)
|
openmc.model.rectangular_prism(c.rodGridSide_i, c.rodGridSide_i)
|
||||||
|
|
||||||
# Rectangular prisms for lattice grid sleeves
|
# Rectangular prisms for lattice grid sleeves
|
||||||
grid_surfs_ass = \
|
grid_surfs_ass = \
|
||||||
openmc.rectangular_prism(c.gridstrapSide, c.gridstrapSide)
|
openmc.model.rectangular_prism(c.gridstrapSide, c.gridstrapSide)
|
||||||
|
|
||||||
# Grids axial surfaces
|
# Grids axial surfaces
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# Create surface objects for our \"root\" cell\"\n",
|
"# Create surface objects for our \"root\" cell\"\n",
|
||||||
"lattice_sides = openmc.model.rectangular_prism(17*c.pinPitch, 17*c.pinPitch,\n",
|
"lattice_sides = openmc.model.RectangularPrism(17*c.pinPitch, 17*c.pinPitch,\n",
|
||||||
" boundary_type='reflective')\n",
|
" boundary_type='reflective')\n",
|
||||||
"min_z = openmc.ZPlane(z0=c.struct_LowestExtent, boundary_type='vacuum')\n",
|
"min_z = openmc.ZPlane(z0=c.struct_LowestExtent, boundary_type='vacuum')\n",
|
||||||
"max_z = openmc.ZPlane(z0=c.struct_HighestExtent, boundary_type='vacuum')\n",
|
"max_z = openmc.ZPlane(z0=c.struct_HighestExtent, boundary_type='vacuum')\n",
|
||||||
|
|
@ -383,7 +383,7 @@
|
||||||
"# Use a bounding box to define the starting source distribution\n",
|
"# Use a bounding box to define the starting source distribution\n",
|
||||||
"lower_left = [-17*c.pinPitch/2, -17*c.pinPitch/2, c.fuel_ActiveFuel_bot]\n",
|
"lower_left = [-17*c.pinPitch/2, -17*c.pinPitch/2, c.fuel_ActiveFuel_bot]\n",
|
||||||
"upper_right = [+17*c.pinPitch/2, +17*c.pinPitch/2, c.fuel_ActiveFuel_top]\n",
|
"upper_right = [+17*c.pinPitch/2, +17*c.pinPitch/2, c.fuel_ActiveFuel_top]\n",
|
||||||
"settings.source = openmc.source.Source(\n",
|
"settings.source = openmc.source.IndependentSource(\n",
|
||||||
" openmc.stats.Box(lower_left, upper_right, only_fissionable=True))\n",
|
" openmc.stats.Box(lower_left, upper_right, only_fissionable=True))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Export the settings to a \"settings.xml\" file\n",
|
"# Export the settings to a \"settings.xml\" file\n",
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"# Create surface as the boundary of clad and cell pitches\n",
|
"# Create surface as the boundary of clad and cell pitches\n",
|
||||||
"fuel_clad_OR = openmc.ZCylinder(name='Fuel clad OR', r=c.cladOR)\n",
|
"fuel_clad_OR = openmc.ZCylinder(name='Fuel clad OR', r=c.cladOR)\n",
|
||||||
"pin_sides = openmc.model.get_rectangular_prism(c.pinPitch, c.pinPitch,\n",
|
"pin_sides = openmc.model.RectangularPrism(c.pinPitch, c.pinPitch,\n",
|
||||||
" boundary_type='reflective')\n",
|
" boundary_type='reflective')\n",
|
||||||
"# Create a cell filled by the fuel pin\n",
|
"# Create a cell filled by the fuel pin\n",
|
||||||
"fuel_cell = openmc.Cell(name='Fuel cell',\n",
|
"fuel_cell = openmc.Cell(name='Fuel cell',\n",
|
||||||
|
|
@ -329,7 +329,7 @@
|
||||||
"# Use a bounding box to define the starting source distribution\n",
|
"# Use a bounding box to define the starting source distribution\n",
|
||||||
"lower_left = [c.pinPitch/2, c.pinPitch/2, c.fuel_ActiveFuel_bot]\n",
|
"lower_left = [c.pinPitch/2, c.pinPitch/2, c.fuel_ActiveFuel_bot]\n",
|
||||||
"upper_right = [c.pinPitch/2, c.pinPitch/2, c.fuel_ActiveFuel_top]\n",
|
"upper_right = [c.pinPitch/2, c.pinPitch/2, c.fuel_ActiveFuel_top]\n",
|
||||||
"settings.source = openmc.source.Source(space=openmc.stats.Point((0, 0, 0)))\n",
|
"settings.source = openmc.source.IndependentSource(space=openmc.stats.Point((0, 0, 0)))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Export the settings to a \"settings.xml\" file\n",
|
"# Export the settings to a \"settings.xml\" file\n",
|
||||||
"settings.export_to_xml()"
|
"settings.export_to_xml()"
|
||||||
|
|
|
||||||
|
|
@ -14,17 +14,8 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "EChOeJ7qVUB7"
|
"id": "EChOeJ7qVUB7"
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"%matplotlib inline\n",
|
"%matplotlib inline\n",
|
||||||
"import openmc"
|
"import openmc"
|
||||||
]
|
]
|
||||||
|
|
@ -100,7 +91,7 @@
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"pitch = 1.6256\n",
|
"pitch = 1.6256\n",
|
||||||
"pin_cell_box = openmc.rectangular_prism(width=pitch, height=pitch)"
|
"pin_cell_box = openmc.model.RectangularPrism(width=pitch, height=pitch)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -617,15 +608,15 @@
|
||||||
" [ll_corner_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, lr_corner_pin_universe]\n",
|
" [ll_corner_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, fuel_pin_universe, lr_corner_pin_universe]\n",
|
||||||
"]\n",
|
"]\n",
|
||||||
"\n",
|
"\n",
|
||||||
"assembly_region = openmc.rectangular_prism(width=quarter_pitch, height=quarter_pitch, origin=(0,0))\n",
|
"assembly_region = openmc.model.RectangularPrism(width=quarter_pitch, height=quarter_pitch, origin=(0,0))\n",
|
||||||
"assembly_cell = openmc.Cell(name='quarter assembly cell', fill=assembly, region=assembly_region)\n",
|
"assembly_cell = openmc.Cell(name='quarter assembly cell', fill=assembly, region=assembly_region)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"assembly_sleave = openmc.Cell(name='quarter assembly sleave')\n",
|
"assembly_sleave = openmc.Cell(name='quarter assembly sleave')\n",
|
||||||
"assembly_sleave.region = openmc.rectangular_prism(width=quarter_pitch+2*sleave_thickness, height=quarter_pitch+2*sleave_thickness, corner_radius=sleave_inner_radius+sleave_thickness) & ~assembly_cell.region\n",
|
"assembly_sleave.region = openmc.model.RectangularPrism(width=quarter_pitch+2*sleave_thickness, height=quarter_pitch+2*sleave_thickness, corner_radius=sleave_inner_radius+sleave_thickness) & ~assembly_cell.region\n",
|
||||||
"assembly_sleave.fill = zircaloy\n",
|
"assembly_sleave.fill = zircaloy\n",
|
||||||
"\n",
|
"\n",
|
||||||
"assembly_outer_water = openmc.Cell(name='assembly outer water')\n",
|
"assembly_outer_water = openmc.Cell(name='assembly outer water')\n",
|
||||||
"assembly_outer_water.region = ~assembly_sleave.region & ~assembly_cell.region & openmc.rectangular_prism(width=quarter_pitch+2*sleave_thickness+1, height=quarter_pitch+2*sleave_thickness+1, boundary_type='reflective')\n",
|
"assembly_outer_water.region = ~assembly_sleave.region & ~assembly_cell.region & openmc.model.RectangularPrism(width=quarter_pitch+2*sleave_thickness+1, height=quarter_pitch+2*sleave_thickness+1, boundary_type='reflective')\n",
|
||||||
"assembly_outer_water.fill = water\n",
|
"assembly_outer_water.fill = water\n",
|
||||||
"\n",
|
"\n",
|
||||||
"quarter_assembly_universe = openmc.Universe(cells=[assembly_cell, assembly_sleave, assembly_outer_water])"
|
"quarter_assembly_universe = openmc.Universe(cells=[assembly_cell, assembly_sleave, assembly_outer_water])"
|
||||||
|
|
@ -686,7 +677,7 @@
|
||||||
"# OpenMC simulation parameters\n",
|
"# OpenMC simulation parameters\n",
|
||||||
"\n",
|
"\n",
|
||||||
"point = openmc.stats.Point((0, 0, 0))\n",
|
"point = openmc.stats.Point((0, 0, 0))\n",
|
||||||
"src = openmc.Source(space=point)\n",
|
"src = openmc.IndependentSource(space=point)\n",
|
||||||
"settings = openmc.Settings()\n",
|
"settings = openmc.Settings()\n",
|
||||||
"settings.source = src\n",
|
"settings.source = src\n",
|
||||||
"settings.batches = 100\n",
|
"settings.batches = 100\n",
|
||||||
|
|
@ -739,7 +730,7 @@
|
||||||
" License | https://docs.openmc.org/en/latest/license.html\n",
|
" License | https://docs.openmc.org/en/latest/license.html\n",
|
||||||
" Version | 0.13.3\n",
|
" Version | 0.13.3\n",
|
||||||
" Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
|
" Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
|
||||||
" Date/Time | 2023-10-31 21:52:13\n",
|
" Date/Time | 2023-11-06 17:17:14\n",
|
||||||
" OpenMP Threads | 4\n",
|
" OpenMP Threads | 4\n",
|
||||||
"\n",
|
"\n",
|
||||||
" Reading settings XML file...\n",
|
" Reading settings XML file...\n",
|
||||||
|
|
|
||||||
|
|
@ -16,17 +16,8 @@
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": 1,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"%matplotlib inline\n",
|
"%matplotlib inline\n",
|
||||||
"import math\n",
|
"import math\n",
|
||||||
"import openmc"
|
"import openmc"
|
||||||
|
|
@ -63,8 +54,7 @@
|
||||||
"water.add_element(\"H\", 2)\n",
|
"water.add_element(\"H\", 2)\n",
|
||||||
"water.set_density(\"g/cc\", 1.0)\n",
|
"water.set_density(\"g/cc\", 1.0)\n",
|
||||||
"water.add_s_alpha_beta(\"c_H_in_H2O\")\n",
|
"water.add_s_alpha_beta(\"c_H_in_H2O\")\n",
|
||||||
"materials = openmc.Materials([fuel, clad, water])\n",
|
"materials = openmc.Materials([fuel, clad, water])"
|
||||||
"# materials.cross_sections = \"/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\""
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -115,7 +105,7 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"bound_box = openmc.rectangular_prism(1.24, 1.24, boundary_type=\"reflective\")\n",
|
"bound_box = openmc.model.RectangularPrism(1.24, 1.24, boundary_type=\"reflective\")\n",
|
||||||
"root_cell = openmc.Cell(fill=pin_univ, region=bound_box)\n",
|
"root_cell = openmc.Cell(fill=pin_univ, region=bound_box)\n",
|
||||||
"geometry = openmc.Geometry([root_cell])"
|
"geometry = openmc.Geometry([root_cell])"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,8 @@
|
||||||
"execution_count": 1,
|
"execution_count": 1,
|
||||||
"id": "7b28ed9f",
|
"id": "7b28ed9f",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"%matplotlib inline\n",
|
"%matplotlib inline\n",
|
||||||
"from math import pi, sin, cos, sqrt\n",
|
"from math import pi, sin, cos, sqrt\n",
|
||||||
"import numpy as np\n",
|
"import numpy as np\n",
|
||||||
|
|
@ -312,7 +303,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"bounds = [-3, -3, -2.4, 3, 3, 2.4]\n",
|
"bounds = [-3, -3, -2.4, 3, 3, 2.4]\n",
|
||||||
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=False) #only_fissionable != True due to lots of helium\n",
|
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=False) #only_fissionable != True due to lots of helium\n",
|
||||||
"settings_file.source = openmc.Source(space=uniform_dist)\n",
|
"settings_file.source = openmc.IndependentSource(space=uniform_dist)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"settings_file.export_to_xml()"
|
"settings_file.export_to_xml()"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -24,17 +24,8 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "EChOeJ7qVUB7"
|
"id": "EChOeJ7qVUB7"
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"%matplotlib inline\n",
|
"%matplotlib inline\n",
|
||||||
"import openmc"
|
"import openmc"
|
||||||
]
|
]
|
||||||
|
|
@ -497,7 +488,7 @@
|
||||||
"lower_left = [-300, -300, -50]\n",
|
"lower_left = [-300, -300, -50]\n",
|
||||||
"upper_right = [300, 300, 50]\n",
|
"upper_right = [300, 300, 50]\n",
|
||||||
"uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True)\n",
|
"uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True)\n",
|
||||||
"src = openmc.Source(space=uniform_dist)\n",
|
"src = openmc.IndependentSource(space=uniform_dist)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"settings = openmc.Settings()\n",
|
"settings = openmc.Settings()\n",
|
||||||
"settings.source = src\n",
|
"settings.source = src\n",
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,10 @@
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": []
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"%matplotlib inline\n",
|
"%matplotlib inline\n",
|
||||||
"import numpy as np\n",
|
"import numpy as np\n",
|
||||||
"import openmc"
|
"import openmc"
|
||||||
|
|
@ -796,7 +793,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"bounds = [-28.527375, -28.527375, -28.527375, 28.527375, 28.527375, 28.527375]\n",
|
"bounds = [-28.527375, -28.527375, -28.527375, 28.527375, 28.527375, 28.527375]\n",
|
||||||
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)\n",
|
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)\n",
|
||||||
"settings_file.source = openmc.Source(space=uniform_dist)\n",
|
"settings_file.source = openmc.IndependentSource(space=uniform_dist)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"settings_file.export_to_xml()"
|
"settings_file.export_to_xml()"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,8 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "ztdDaVCavN_I"
|
"id": "ztdDaVCavN_I"
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"%matplotlib inline\n",
|
"%matplotlib inline\n",
|
||||||
"import openmc"
|
"import openmc"
|
||||||
]
|
]
|
||||||
|
|
@ -843,7 +834,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"bounds = [-5, -5, -0.63, 5, 5, 0.63]\n",
|
"bounds = [-5, -5, -0.63, 5, 5, 0.63]\n",
|
||||||
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)\n",
|
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)\n",
|
||||||
"settings_file.source = openmc.Source(space=uniform_dist)\n",
|
"settings_file.source = openmc.IndependentSource(space=uniform_dist)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"settings_file.export_to_xml()"
|
"settings_file.export_to_xml()"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,8 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "BpmPdBBHTz2E"
|
"id": "BpmPdBBHTz2E"
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"%matplotlib inline\n",
|
"%matplotlib inline\n",
|
||||||
"import openmc"
|
"import openmc"
|
||||||
]
|
]
|
||||||
|
|
@ -519,7 +510,7 @@
|
||||||
"settings.particles = particles\n",
|
"settings.particles = particles\n",
|
||||||
"\n",
|
"\n",
|
||||||
"uniform_dist = openmc.stats.Box([-24,-24,-75],[24,24,75],only_fissionable=True)\n",
|
"uniform_dist = openmc.stats.Box([-24,-24,-75],[24,24,75],only_fissionable=True)\n",
|
||||||
"settings.source = openmc.source.Source(space=uniform_dist)\n",
|
"settings.source = openmc.source.IndependentSource(space=uniform_dist)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"settings.export_to_xml()"
|
"settings.export_to_xml()"
|
||||||
]
|
]
|
||||||
|
|
@ -570,7 +561,7 @@
|
||||||
" License | https://docs.openmc.org/en/latest/license.html\n",
|
" License | https://docs.openmc.org/en/latest/license.html\n",
|
||||||
" Version | 0.13.3\n",
|
" Version | 0.13.3\n",
|
||||||
" Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
|
" Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
|
||||||
" Date/Time | 2023-10-19 23:09:50\n",
|
" Date/Time | 2023-10-26 23:55:50\n",
|
||||||
" OpenMP Threads | 8\n",
|
" OpenMP Threads | 8\n",
|
||||||
"\n",
|
"\n",
|
||||||
" Reading settings XML file...\n",
|
" Reading settings XML file...\n",
|
||||||
|
|
@ -694,7 +685,7 @@
|
||||||
" 79/1 0.36796 0.36399 +/- 0.00137\n",
|
" 79/1 0.36796 0.36399 +/- 0.00137\n",
|
||||||
" 80/1 0.36640 0.36402 +/- 0.00135\n",
|
" 80/1 0.36640 0.36402 +/- 0.00135\n",
|
||||||
" 81/1 0.35683 0.36392 +/- 0.00133\n",
|
" 81/1 0.35683 0.36392 +/- 0.00133\n",
|
||||||
" 82/1 0.38390 0.36420 +/- 0.00135\n",
|
" 82/1 0.38391 0.36420 +/- 0.00135\n",
|
||||||
" 83/1 0.37263 0.36432 +/- 0.00133\n",
|
" 83/1 0.37263 0.36432 +/- 0.00133\n",
|
||||||
" 84/1 0.36042 0.36426 +/- 0.00131\n",
|
" 84/1 0.36042 0.36426 +/- 0.00131\n",
|
||||||
" 85/1 0.36007 0.36421 +/- 0.00130\n",
|
" 85/1 0.36007 0.36421 +/- 0.00130\n",
|
||||||
|
|
@ -717,21 +708,21 @@
|
||||||
"\n",
|
"\n",
|
||||||
" =======================> TIMING STATISTICS <=======================\n",
|
" =======================> TIMING STATISTICS <=======================\n",
|
||||||
"\n",
|
"\n",
|
||||||
" Total time for initialization = 3.5703e+00 seconds\n",
|
" Total time for initialization = 4.5971e+00 seconds\n",
|
||||||
" Reading cross sections = 3.5247e+00 seconds\n",
|
" Reading cross sections = 4.5592e+00 seconds\n",
|
||||||
" Total time in simulation = 2.2554e+01 seconds\n",
|
" Total time in simulation = 1.3315e+01 seconds\n",
|
||||||
" Time in transport only = 2.2468e+01 seconds\n",
|
" Time in transport only = 1.3242e+01 seconds\n",
|
||||||
" Time in inactive batches = 2.2849e+00 seconds\n",
|
" Time in inactive batches = 1.2438e+00 seconds\n",
|
||||||
" Time in active batches = 2.0269e+01 seconds\n",
|
" Time in active batches = 1.2071e+01 seconds\n",
|
||||||
" Time synchronizing fission bank = 4.2737e-02 seconds\n",
|
" Time synchronizing fission bank = 4.0056e-02 seconds\n",
|
||||||
" Sampling source sites = 3.7079e-02 seconds\n",
|
" Sampling source sites = 3.5185e-02 seconds\n",
|
||||||
" SEND/RECV source sites = 5.6022e-03 seconds\n",
|
" SEND/RECV source sites = 4.6822e-03 seconds\n",
|
||||||
" Time accumulating tallies = 6.3748e-05 seconds\n",
|
" Time accumulating tallies = 9.8531e-05 seconds\n",
|
||||||
" Time writing statepoints = 5.4034e-03 seconds\n",
|
" Time writing statepoints = 4.2827e-03 seconds\n",
|
||||||
" Total time for finalization = 7.5800e-07 seconds\n",
|
" Total time for finalization = 1.0640e-06 seconds\n",
|
||||||
" Total time elapsed = 2.6181e+01 seconds\n",
|
" Total time elapsed = 1.7949e+01 seconds\n",
|
||||||
" Calculation Rate (inactive) = 21882.8 particles/second\n",
|
" Calculation Rate (inactive) = 40200.5 particles/second\n",
|
||||||
" Calculation Rate (active) = 22201.6 particles/second\n",
|
" Calculation Rate (active) = 37278 particles/second\n",
|
||||||
"\n",
|
"\n",
|
||||||
" ============================> RESULTS <============================\n",
|
" ============================> RESULTS <============================\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@
|
||||||
"# Create an initial uniform spatial source distribution over fissionable zones\n",
|
"# Create an initial uniform spatial source distribution over fissionable zones\n",
|
||||||
"bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63]\n",
|
"bounds = [-0.63, -0.63, -0.63, 0.63, 0.63, 0.63]\n",
|
||||||
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)\n",
|
"uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)\n",
|
||||||
"settings.source = openmc.Source(space=uniform_dist)\n",
|
"settings.source = openmc.IndependentSource(space=uniform_dist)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Export to \"settings.xml\"\n",
|
"# Export to \"settings.xml\"\n",
|
||||||
"settings.export_to_xml()"
|
"settings.export_to_xml()"
|
||||||
|
|
@ -348,8 +348,8 @@
|
||||||
" License | https://docs.openmc.org/en/latest/license.html\n",
|
" License | https://docs.openmc.org/en/latest/license.html\n",
|
||||||
" Version | 0.13.3\n",
|
" Version | 0.13.3\n",
|
||||||
" Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
|
" Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
|
||||||
" Date/Time | 2023-10-31 23:19:21\n",
|
" Date/Time | 2023-10-27 00:37:10\n",
|
||||||
" OpenMP Threads | 4\n",
|
" OpenMP Threads | 8\n",
|
||||||
"\n",
|
"\n",
|
||||||
" Reading settings XML file...\n",
|
" Reading settings XML file...\n",
|
||||||
" Reading cross sections XML file...\n",
|
" Reading cross sections XML file...\n",
|
||||||
|
|
@ -357,13 +357,7 @@
|
||||||
" Reading geometry XML file...\n",
|
" Reading geometry XML file...\n",
|
||||||
" Reading U235 from /opt/xdata/endfb-vii.1-hdf5/neutron/U235.h5\n",
|
" Reading U235 from /opt/xdata/endfb-vii.1-hdf5/neutron/U235.h5\n",
|
||||||
" Reading U238 from /opt/xdata/endfb-vii.1-hdf5/neutron/U238.h5\n",
|
" Reading U238 from /opt/xdata/endfb-vii.1-hdf5/neutron/U238.h5\n",
|
||||||
" Reading O16 from /opt/xdata/endfb-vii.1-hdf5/neutron/O16.h5\n"
|
" Reading O16 from /opt/xdata/endfb-vii.1-hdf5/neutron/O16.h5\n",
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
" Reading H1 from /opt/xdata/endfb-vii.1-hdf5/neutron/H1.h5\n",
|
" Reading H1 from /opt/xdata/endfb-vii.1-hdf5/neutron/H1.h5\n",
|
||||||
" Reading B10 from /opt/xdata/endfb-vii.1-hdf5/neutron/B10.h5\n",
|
" Reading B10 from /opt/xdata/endfb-vii.1-hdf5/neutron/B10.h5\n",
|
||||||
" Reading Zr90 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr90.h5\n",
|
" Reading Zr90 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr90.h5\n",
|
||||||
|
|
|
||||||
|
|
@ -10,20 +10,9 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": 1,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
"outputs": [],
|
||||||
},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"%env OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
|
|
||||||
"import openmc\n",
|
"import openmc\n",
|
||||||
"from IPython.display import Image"
|
"from IPython.display import Image"
|
||||||
]
|
]
|
||||||
|
|
@ -38,9 +27,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": 2,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -70,9 +57,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": 3,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"uo2 = openmc.Material(name='uo2')\n",
|
"uo2 = openmc.Material(name='uo2')\n",
|
||||||
|
|
@ -101,9 +86,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": 4,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"mf = openmc.Materials((uo2, zirconium, water, pyrex))\n",
|
"mf = openmc.Materials((uo2, zirconium, water, pyrex))\n",
|
||||||
|
|
@ -120,9 +103,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": 5,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"colors = {}\n",
|
"colors = {}\n",
|
||||||
|
|
@ -144,9 +125,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": 6,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"pitch = 1.26\n",
|
"pitch = 1.26\n",
|
||||||
|
|
@ -185,9 +164,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": 7,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": true
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# We need a cell to contain the fuel_pin universe.\n",
|
"# We need a cell to contain the fuel_pin universe.\n",
|
||||||
|
|
@ -205,9 +182,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 8,
|
"execution_count": 8,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -240,9 +215,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 9,
|
"execution_count": 9,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": true
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"clad_ir = openmc.ZCylinder(r=0.56)\n",
|
"clad_ir = openmc.ZCylinder(r=0.56)\n",
|
||||||
|
|
@ -267,9 +240,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 10,
|
"execution_count": 10,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": true
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"main = openmc.Cell()\n",
|
"main = openmc.Cell()\n",
|
||||||
|
|
@ -286,9 +257,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": 11,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -321,9 +290,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 12,
|
"execution_count": 12,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -344,9 +311,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 13,
|
"execution_count": 13,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# Define the cylinders which bound each radial zone.\n",
|
"# Define the cylinders which bound each radial zone.\n",
|
||||||
|
|
@ -384,9 +349,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 14,
|
"execution_count": 14,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": true
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"main = openmc.Cell()\n",
|
"main = openmc.Cell()\n",
|
||||||
|
|
@ -403,9 +366,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 15,
|
"execution_count": 15,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -442,9 +403,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 16,
|
"execution_count": 16,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": true
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"moderator = openmc.Cell()\n",
|
"moderator = openmc.Cell()\n",
|
||||||
|
|
@ -457,9 +416,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 17,
|
"execution_count": 17,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"lattice = openmc.RectLattice()\n",
|
"lattice = openmc.RectLattice()\n",
|
||||||
|
|
@ -492,9 +449,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 18,
|
"execution_count": 18,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": true
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"main = openmc.Cell()\n",
|
"main = openmc.Cell()\n",
|
||||||
|
|
@ -511,9 +466,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 19,
|
"execution_count": 19,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -549,9 +502,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 20,
|
"execution_count": 20,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -583,9 +534,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 21,
|
"execution_count": 21,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -606,9 +555,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 22,
|
"execution_count": 22,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"lattice = openmc.RectLattice()\n",
|
"lattice = openmc.RectLattice()\n",
|
||||||
|
|
@ -651,9 +598,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 23,
|
"execution_count": 23,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"height = 100 # Finite height is not strictly necessary but may avoid floating-point errors\n",
|
"height = 100 # Finite height is not strictly necessary but may avoid floating-point errors\n",
|
||||||
|
|
@ -673,9 +618,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 24,
|
"execution_count": 24,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": true
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"root = openmc.Universe()\n",
|
"root = openmc.Universe()\n",
|
||||||
|
|
@ -689,9 +632,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 25,
|
"execution_count": 25,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -718,13 +659,11 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 26,
|
"execution_count": 26,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"settings = openmc.Settings()\n",
|
"settings = openmc.Settings()\n",
|
||||||
"settings.source = openmc.Source(space=openmc.stats.Box((0.1, 0.1, 0), (0.49*assembly_pitch, 0.49*assembly_pitch, 0)))\n",
|
"settings.source = openmc.IndependentSource(space=openmc.stats.Box((0.1, 0.1, 0), (0.49*assembly_pitch, 0.49*assembly_pitch, 0)))\n",
|
||||||
"settings.batches = 50\n",
|
"settings.batches = 50\n",
|
||||||
"settings.inactive = 10\n",
|
"settings.inactive = 10\n",
|
||||||
"settings.particles = 1000\n",
|
"settings.particles = 1000\n",
|
||||||
|
|
@ -735,7 +674,6 @@
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 27,
|
"execution_count": 27,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false,
|
|
||||||
"scrolled": false
|
"scrolled": false
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
|
@ -908,9 +846,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 28,
|
"execution_count": 28,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"tallies = openmc.Tallies()\n",
|
"tallies = openmc.Tallies()\n",
|
||||||
|
|
@ -940,9 +876,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 29,
|
"execution_count": 29,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"dist_filt = openmc.DistribcellFilter(fuel.id)\n",
|
"dist_filt = openmc.DistribcellFilter(fuel.id)\n",
|
||||||
|
|
@ -959,7 +893,6 @@
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 30,
|
"execution_count": 30,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false,
|
|
||||||
"scrolled": true
|
"scrolled": true
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
|
@ -1124,7 +1057,6 @@
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 31,
|
"execution_count": 31,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"collapsed": false,
|
|
||||||
"scrolled": true
|
"scrolled": true
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
|
@ -1182,9 +1114,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 32,
|
"execution_count": 32,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -1216,9 +1146,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 33,
|
"execution_count": 33,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"many_uo2_mats = []\n",
|
"many_uo2_mats = []\n",
|
||||||
|
|
@ -1236,9 +1164,7 @@
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 34,
|
"execution_count": 34,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"collapsed": false
|
|
||||||
},
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -1279,5 +1205,5 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
"nbformat_minor": 0
|
"nbformat_minor": 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -484,14 +484,14 @@ materials += [fuel, clad, cold_water, hot_water, rpv_steel,
|
||||||
materials.export_to_xml()
|
materials.export_to_xml()
|
||||||
|
|
||||||
# Define surfaces.
|
# Define surfaces.
|
||||||
s1 = openmc.ZCylinder(R=0.41, surface_id=1)
|
s1 = openmc.ZCylinder(r=0.41, surface_id=1)
|
||||||
s2 = openmc.ZCylinder(R=0.475, surface_id=2)
|
s2 = openmc.ZCylinder(r=0.475, surface_id=2)
|
||||||
s3 = openmc.ZCylinder(R=0.56, surface_id=3)
|
s3 = openmc.ZCylinder(r=0.56, surface_id=3)
|
||||||
s4 = openmc.ZCylinder(R=0.62, surface_id=4)
|
s4 = openmc.ZCylinder(r=0.62, surface_id=4)
|
||||||
s5 = openmc.ZCylinder(R=187.6, surface_id=5)
|
s5 = openmc.ZCylinder(r=187.6, surface_id=5)
|
||||||
s6 = openmc.ZCylinder(R=209.0, surface_id=6)
|
s6 = openmc.ZCylinder(r=209.0, surface_id=6)
|
||||||
s7 = openmc.ZCylinder(R=229.0, surface_id=7)
|
s7 = openmc.ZCylinder(r=229.0, surface_id=7)
|
||||||
s8 = openmc.ZCylinder(R=249.0, surface_id=8)
|
s8 = openmc.ZCylinder(r=249.0, surface_id=8)
|
||||||
s8.boundary_type = 'vacuum'
|
s8.boundary_type = 'vacuum'
|
||||||
|
|
||||||
s31 = openmc.ZPlane(z0=-229.0, surface_id=31)
|
s31 = openmc.ZPlane(z0=-229.0, surface_id=31)
|
||||||
|
|
@ -642,8 +642,8 @@ settings = openmc.Settings()
|
||||||
settings.batches = 10
|
settings.batches = 10
|
||||||
settings.inactive = 5
|
settings.inactive = 5
|
||||||
settings.particles = 1000
|
settings.particles = 1000
|
||||||
settings.source = openmc.Source(space=openmc.stats.Box(
|
settings.source = openmc.IndependentSource(space=
|
||||||
[-160, -160, -183], [160, 160, 183]))
|
openmc.stats.Box([-160, -160, -183], [160, 160, 183]))
|
||||||
settings.export_to_xml()
|
settings.export_to_xml()
|
||||||
|
|
||||||
plot = openmc.Plot()
|
plot = openmc.Plot()
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ assemblies = ([(1,i) for i in range(6,13)] +
|
||||||
tallies = openmc.Tallies()
|
tallies = openmc.Tallies()
|
||||||
for i, assem in enumerate(assemblies):
|
for i, assem in enumerate(assemblies):
|
||||||
x, y = assem
|
x, y = assem
|
||||||
mesh = openmc.Mesh()
|
mesh = openmc.RegularMesh()
|
||||||
mesh.lower_left = (-182.07 + 21.42*(x-1), -182.07 + 21.42*(y-1))
|
mesh.lower_left = (-182.07 + 21.42*(x-1), -182.07 + 21.42*(y-1))
|
||||||
mesh.width = (1.26, 1.26)
|
mesh.width = (1.26, 1.26)
|
||||||
mesh.dimension = (17, 17)
|
mesh.dimension = (17, 17)
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ class Case(object):
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
settings_file.source = openmc.source.Source(space=uniform_dist)
|
settings_file.source = openmc.source.IndependentSource(space=uniform_dist)
|
||||||
|
|
||||||
settings_file.output = {'summary': False}
|
settings_file.output = {'summary': False}
|
||||||
|
|
||||||
|
|
@ -311,6 +311,6 @@ class Case(object):
|
||||||
if success:
|
if success:
|
||||||
spfile = 'statepoint.' + str(self.batches) + '.h5'
|
spfile = 'statepoint.' + str(self.batches) + '.h5'
|
||||||
sp = openmc.StatePoint(spfile, autolink=False)
|
sp = openmc.StatePoint(spfile, autolink=False)
|
||||||
self.keff = sp.k_combined
|
self.keff = sp.keff
|
||||||
|
|
||||||
return success
|
return success
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue