Updated files to be compatible with v0.14.0 of OpenMC

This commit is contained in:
Adam Parler 2023-12-16 19:33:39 -08:00
parent 24e63b7f13
commit fe2b97b7dc
22 changed files with 2161 additions and 1980 deletions

View file

@ -49,7 +49,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.rectangular_prism(17*c.pinPitch, 17*c.pinPitch)
def _add_assembly_surfs(self,c):
@ -57,7 +57,7 @@ class Assemblies(object):
# Rectangular prism around the edge of the pinlattice
self.assem_surfs = \
openmc.rectangular_prism(c.latticePitch, c.latticePitch)
openmc.model.rectangular_prism(c.latticePitch, c.latticePitch)
def _add_bpra_layouts(self):

View file

@ -153,10 +153,11 @@ class Constants(object):
self.rcca_banks = self.rcca_bank_steps_withdrawn.keys()
## Keff=1 at approximately S 298
self.set_S(S,False)
self.set_SS(SS,False)
self.set_S(S)
self.set_SS(SS)
self.update_dict()
def set_S(self, _S, print_data=True):
if isinstance(_S,(float,int)):
if _S < 0:
@ -173,7 +174,7 @@ class Constants(object):
else:
raise ValueError
if print_data:
if print_data and not self.first_thru:
print(" RCCA Positions")
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}")
@ -215,7 +216,7 @@ class Constants(object):
else:
raise ValueError
if print_data:
if print_data and not self.first_thru:
print(" RCCA Positions")
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}")

View file

@ -48,13 +48,13 @@ class Pincells(object):
# Rectangular prisms for grid spacers
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 = \
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
grid_surfs_ass = \
openmc.rectangular_prism(c.gridstrapSide, c.gridstrapSide)
openmc.model.rectangular_prism(c.gridstrapSide, c.gridstrapSide)
# Grids axial surfaces

View file

@ -249,7 +249,7 @@
"outputs": [],
"source": [
"# 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",
"min_z = openmc.ZPlane(z0=c.struct_LowestExtent, 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",
"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",
"settings.source = openmc.source.Source(\n",
"settings.source = openmc.source.IndependentSource(\n",
" openmc.stats.Box(lower_left, upper_right, only_fissionable=True))\n",
"\n",
"# Export the settings to a \"settings.xml\" file\n",

View file

@ -194,7 +194,7 @@
"source": [
"# Create surface as the boundary of clad and cell pitches\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",
"# Create a cell filled by the fuel pin\n",
"fuel_cell = openmc.Cell(name='Fuel cell',\n",
@ -329,7 +329,7 @@
"# Use a bounding box to define the starting source distribution\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",
"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",
"# Export the settings to a \"settings.xml\" file\n",
"settings.export_to_xml()"

View file

@ -14,17 +14,8 @@
"metadata": {
"id": "EChOeJ7qVUB7"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
}
],
"outputs": [],
"source": [
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"%matplotlib inline\n",
"import openmc"
]
@ -100,7 +91,7 @@
"outputs": [],
"source": [
"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",
"]\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",
"\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",
"\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",
"\n",
"quarter_assembly_universe = openmc.Universe(cells=[assembly_cell, assembly_sleave, assembly_outer_water])"
@ -686,7 +677,7 @@
"# OpenMC simulation parameters\n",
"\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.source = src\n",
"settings.batches = 100\n",
@ -739,7 +730,7 @@
" License | https://docs.openmc.org/en/latest/license.html\n",
" Version | 0.13.3\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",
"\n",
" Reading settings XML file...\n",

View file

@ -16,17 +16,8 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
}
],
"outputs": [],
"source": [
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"%matplotlib inline\n",
"import math\n",
"import openmc"
@ -63,8 +54,7 @@
"water.add_element(\"H\", 2)\n",
"water.set_density(\"g/cc\", 1.0)\n",
"water.add_s_alpha_beta(\"c_H_in_H2O\")\n",
"materials = openmc.Materials([fuel, clad, water])\n",
"# materials.cross_sections = \"/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\""
"materials = openmc.Materials([fuel, clad, water])"
]
},
{
@ -115,7 +105,7 @@
"metadata": {},
"outputs": [],
"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",
"geometry = openmc.Geometry([root_cell])"
]

View file

@ -20,17 +20,8 @@
"execution_count": 1,
"id": "7b28ed9f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
}
],
"outputs": [],
"source": [
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"%matplotlib inline\n",
"from math import pi, sin, cos, sqrt\n",
"import numpy as np\n",
@ -312,7 +303,7 @@
"\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",
"settings_file.source = openmc.Source(space=uniform_dist)\n",
"settings_file.source = openmc.IndependentSource(space=uniform_dist)\n",
"\n",
"settings_file.export_to_xml()"
]

View file

@ -24,17 +24,8 @@
"metadata": {
"id": "EChOeJ7qVUB7"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
}
],
"outputs": [],
"source": [
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"%matplotlib inline\n",
"import openmc"
]
@ -497,7 +488,7 @@
"lower_left = [-300, -300, -50]\n",
"upper_right = [300, 300, 50]\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",
"settings = openmc.Settings()\n",
"settings.source = src\n",

View file

@ -24,13 +24,10 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
"text": []
}
],
"source": [
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"%matplotlib inline\n",
"import numpy as np\n",
"import openmc"
@ -796,7 +793,7 @@
"\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",
"settings_file.source = openmc.Source(space=uniform_dist)\n",
"settings_file.source = openmc.IndependentSource(space=uniform_dist)\n",
"\n",
"settings_file.export_to_xml()"
]

View file

@ -20,17 +20,8 @@
"metadata": {
"id": "ztdDaVCavN_I"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
}
],
"outputs": [],
"source": [
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"%matplotlib inline\n",
"import openmc"
]
@ -843,7 +834,7 @@
"\n",
"bounds = [-5, -5, -0.63, 5, 5, 0.63]\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",
"settings_file.export_to_xml()"
]

View file

@ -20,17 +20,8 @@
"metadata": {
"id": "BpmPdBBHTz2E"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
}
],
"outputs": [],
"source": [
"%env OPENMC_CROSS_SECTIONS /opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"%matplotlib inline\n",
"import openmc"
]
@ -519,7 +510,7 @@
"settings.particles = particles\n",
"\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",
"settings.export_to_xml()"
]
@ -570,7 +561,7 @@
" License | https://docs.openmc.org/en/latest/license.html\n",
" Version | 0.13.3\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",
"\n",
" Reading settings XML file...\n",
@ -694,7 +685,7 @@
" 79/1 0.36796 0.36399 +/- 0.00137\n",
" 80/1 0.36640 0.36402 +/- 0.00135\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",
" 84/1 0.36042 0.36426 +/- 0.00131\n",
" 85/1 0.36007 0.36421 +/- 0.00130\n",
@ -717,21 +708,21 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 3.5703e+00 seconds\n",
" Reading cross sections = 3.5247e+00 seconds\n",
" Total time in simulation = 2.2554e+01 seconds\n",
" Time in transport only = 2.2468e+01 seconds\n",
" Time in inactive batches = 2.2849e+00 seconds\n",
" Time in active batches = 2.0269e+01 seconds\n",
" Time synchronizing fission bank = 4.2737e-02 seconds\n",
" Sampling source sites = 3.7079e-02 seconds\n",
" SEND/RECV source sites = 5.6022e-03 seconds\n",
" Time accumulating tallies = 6.3748e-05 seconds\n",
" Time writing statepoints = 5.4034e-03 seconds\n",
" Total time for finalization = 7.5800e-07 seconds\n",
" Total time elapsed = 2.6181e+01 seconds\n",
" Calculation Rate (inactive) = 21882.8 particles/second\n",
" Calculation Rate (active) = 22201.6 particles/second\n",
" Total time for initialization = 4.5971e+00 seconds\n",
" Reading cross sections = 4.5592e+00 seconds\n",
" Total time in simulation = 1.3315e+01 seconds\n",
" Time in transport only = 1.3242e+01 seconds\n",
" Time in inactive batches = 1.2438e+00 seconds\n",
" Time in active batches = 1.2071e+01 seconds\n",
" Time synchronizing fission bank = 4.0056e-02 seconds\n",
" Sampling source sites = 3.5185e-02 seconds\n",
" SEND/RECV source sites = 4.6822e-03 seconds\n",
" Time accumulating tallies = 9.8531e-05 seconds\n",
" Time writing statepoints = 4.2827e-03 seconds\n",
" Total time for finalization = 1.0640e-06 seconds\n",
" Total time elapsed = 1.7949e+01 seconds\n",
" Calculation Rate (inactive) = 40200.5 particles/second\n",
" Calculation Rate (active) = 37278 particles/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",

View file

@ -216,7 +216,7 @@
"# 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",
"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",
"# Export to \"settings.xml\"\n",
"settings.export_to_xml()"
@ -348,8 +348,8 @@
" License | https://docs.openmc.org/en/latest/license.html\n",
" Version | 0.13.3\n",
" Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
" Date/Time | 2023-10-31 23:19:21\n",
" OpenMP Threads | 4\n",
" Date/Time | 2023-10-27 00:37:10\n",
" OpenMP Threads | 8\n",
"\n",
" Reading settings XML file...\n",
" Reading cross sections XML file...\n",
@ -357,13 +357,7 @@
" Reading geometry XML file...\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 O16 from /opt/xdata/endfb-vii.1-hdf5/neutron/O16.h5\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" Reading O16 from /opt/xdata/endfb-vii.1-hdf5/neutron/O16.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 Zr90 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr90.h5\n",

View file

@ -10,20 +10,9 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n"
]
}
],
"metadata": {},
"outputs": [],
"source": [
"%env OPENMC_CROSS_SECTIONS=/opt/xdata/endfb-vii.1-hdf5/cross_sections.xml\n",
"import openmc\n",
"from IPython.display import Image"
]
@ -38,9 +27,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -70,9 +57,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"uo2 = openmc.Material(name='uo2')\n",
@ -101,9 +86,7 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"mf = openmc.Materials((uo2, zirconium, water, pyrex))\n",
@ -120,9 +103,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"colors = {}\n",
@ -144,9 +125,7 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"pitch = 1.26\n",
@ -185,9 +164,7 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# We need a cell to contain the fuel_pin universe.\n",
@ -205,9 +182,7 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -240,9 +215,7 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"clad_ir = openmc.ZCylinder(r=0.56)\n",
@ -267,9 +240,7 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"main = openmc.Cell()\n",
@ -286,9 +257,7 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -321,9 +290,7 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -344,9 +311,7 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# Define the cylinders which bound each radial zone.\n",
@ -384,9 +349,7 @@
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"main = openmc.Cell()\n",
@ -403,9 +366,7 @@
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -442,9 +403,7 @@
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"moderator = openmc.Cell()\n",
@ -457,9 +416,7 @@
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"lattice = openmc.RectLattice()\n",
@ -492,9 +449,7 @@
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"main = openmc.Cell()\n",
@ -511,9 +466,7 @@
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -549,9 +502,7 @@
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -583,9 +534,7 @@
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -606,9 +555,7 @@
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"lattice = openmc.RectLattice()\n",
@ -651,9 +598,7 @@
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"height = 100 # Finite height is not strictly necessary but may avoid floating-point errors\n",
@ -673,9 +618,7 @@
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"root = openmc.Universe()\n",
@ -689,9 +632,7 @@
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -718,13 +659,11 @@
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"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.inactive = 10\n",
"settings.particles = 1000\n",
@ -735,7 +674,6 @@
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
@ -908,9 +846,7 @@
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"tallies = openmc.Tallies()\n",
@ -940,9 +876,7 @@
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"dist_filt = openmc.DistribcellFilter(fuel.id)\n",
@ -959,7 +893,6 @@
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
@ -1124,7 +1057,6 @@
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
@ -1182,9 +1114,7 @@
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -1216,9 +1146,7 @@
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"many_uo2_mats = []\n",
@ -1236,9 +1164,7 @@
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -1279,5 +1205,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}

View file

@ -484,14 +484,14 @@ materials += [fuel, clad, cold_water, hot_water, rpv_steel,
materials.export_to_xml()
# Define surfaces.
s1 = openmc.ZCylinder(R=0.41, surface_id=1)
s2 = openmc.ZCylinder(R=0.475, surface_id=2)
s3 = openmc.ZCylinder(R=0.56, surface_id=3)
s4 = openmc.ZCylinder(R=0.62, surface_id=4)
s5 = openmc.ZCylinder(R=187.6, surface_id=5)
s6 = openmc.ZCylinder(R=209.0, surface_id=6)
s7 = openmc.ZCylinder(R=229.0, surface_id=7)
s8 = openmc.ZCylinder(R=249.0, surface_id=8)
s1 = openmc.ZCylinder(r=0.41, surface_id=1)
s2 = openmc.ZCylinder(r=0.475, surface_id=2)
s3 = openmc.ZCylinder(r=0.56, surface_id=3)
s4 = openmc.ZCylinder(r=0.62, surface_id=4)
s5 = openmc.ZCylinder(r=187.6, surface_id=5)
s6 = openmc.ZCylinder(r=209.0, surface_id=6)
s7 = openmc.ZCylinder(r=229.0, surface_id=7)
s8 = openmc.ZCylinder(r=249.0, surface_id=8)
s8.boundary_type = 'vacuum'
s31 = openmc.ZPlane(z0=-229.0, surface_id=31)
@ -642,8 +642,8 @@ settings = openmc.Settings()
settings.batches = 10
settings.inactive = 5
settings.particles = 1000
settings.source = openmc.Source(space=openmc.stats.Box(
[-160, -160, -183], [160, 160, 183]))
settings.source = openmc.IndependentSource(space=
openmc.stats.Box([-160, -160, -183], [160, 160, 183]))
settings.export_to_xml()
plot = openmc.Plot()

View file

@ -25,7 +25,7 @@ assemblies = ([(1,i) for i in range(6,13)] +
tallies = openmc.Tallies()
for i, assem in enumerate(assemblies):
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.width = (1.26, 1.26)
mesh.dimension = (17, 17)

View file

@ -98,7 +98,7 @@ class Case(object):
else:
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}
@ -311,6 +311,6 @@ class Case(object):
if success:
spfile = 'statepoint.' + str(self.batches) + '.h5'
sp = openmc.StatePoint(spfile, autolink=False)
self.keff = sp.k_combined
self.keff = sp.keff
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