From 082f41d0f5a806e2f864fb1225fa543ce5d9d565 Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Tue, 7 Feb 2017 19:39:18 -0500 Subject: [PATCH] Simplified SMR grid spacers; removed SMR debugging plots --- smr/build-xml.py | 6 +- smr/geometry.xml | 846 ++++++++++++++++++++++++++++++++++++++++++++++ smr/grids.py | 36 -- smr/materials.xml | 203 +++++++++++ smr/pins.py | 10 +- smr/plots.py | 50 +-- smr/plots.xml | 60 ++++ smr/settings.xml | 19 ++ smr/smr.py | 59 ---- smr/surfaces.py | 98 ++---- smr/tallies.xml | 13 + 11 files changed, 1180 insertions(+), 220 deletions(-) create mode 100644 smr/geometry.xml delete mode 100644 smr/grids.py create mode 100644 smr/materials.xml create mode 100644 smr/plots.xml create mode 100644 smr/settings.xml delete mode 100644 smr/smr.py create mode 100644 smr/tallies.xml diff --git a/smr/build-xml.py b/smr/build-xml.py index 463b2e3..fcbeb9c 100644 --- a/smr/build-xml.py +++ b/smr/build-xml.py @@ -23,8 +23,8 @@ multipole = input('Use multipole cross sections? (y/n): ').lower() multipole = True if multipole == 'y' else False # Construct uniform initial source distribution over fissionable zones -lower_left = [-8.*lattice_pitch/2., -8.*lattice_pitch/2., bottom_fuel_stack] -upper_right = [+8.*lattice_pitch/2., +8.*lattice_pitch/2., top_active_core] +lower_left = [-7.*lattice_pitch/2., -7.*lattice_pitch/2., bottom_fuel_stack] +upper_right = [+7.*lattice_pitch/2., +7.*lattice_pitch/2., top_active_core] source = openmc.source.Source(space=openmc.stats.Box(lower_left, upper_right)) source.space.only_fissionable = True @@ -52,7 +52,7 @@ plots.export_to_xml() # Create a pin-wise mesh mesh = openmc.Mesh(name='pin-wise mesh') mesh.type = 'regular' -mesh.dimension = [15*17, 15*17] +mesh.dimension = [7*17, 7*17] mesh.lower_left = lower_left[:2] mesh.width = np.array(upper_right[:2]) - np.array(lower_left[:2]) mesh_filter = openmc.MeshFilter(mesh) diff --git a/smr/geometry.xml b/smr/geometry.xml new file mode 100644 index 0000000..7986082 --- /dev/null +++ b/smr/geometry.xml @@ -0,0 +1,846 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.25984 1.25984 + 17 17 + -10.70864 -10.70864 + +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 10097 10097 10097 +10097 10097 10097 10038 10097 10097 10097 10097 10097 10097 10097 10097 10097 10038 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10038 10097 10097 10038 10097 10097 10010 10097 10097 10038 10097 10097 10038 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10038 10097 10097 10097 10097 10097 10097 10097 10097 10097 10038 10097 10097 10097 +10097 10097 10097 10097 10097 10038 10097 10097 10038 10097 10097 10038 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 + + + 1.25984 1.25984 + 17 17 + -10.70864 -10.70864 + +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 10097 10097 10097 +10097 10097 10097 10009 10097 10097 10097 10097 10097 10097 10097 10097 10097 10009 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10009 10097 10097 10009 10097 10097 10016 10097 10097 10009 10097 10097 10009 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10009 10097 10097 10097 10097 10097 10097 10097 10097 10097 10009 10097 10097 10097 +10097 10097 10097 10097 10097 10009 10097 10097 10009 10097 10097 10009 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 +10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 10097 + + + 1.25984 1.25984 + 17 17 + -10.70864 -10.70864 + +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10101 10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 10101 10101 10101 +10101 10101 10101 10050 10101 10101 10101 10101 10101 10101 10101 10101 10101 10050 10101 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10050 10101 10101 10050 10101 10101 10010 10101 10101 10050 10101 10101 10050 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10101 10050 10101 10101 10101 10101 10101 10101 10101 10101 10101 10050 10101 10101 10101 +10101 10101 10101 10101 10101 10050 10101 10101 10050 10101 10101 10050 10101 10101 10101 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 +10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 10101 + + + 1.25984 1.25984 + 17 17 + -10.70864 -10.70864 + +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10089 10105 10105 10089 10105 10105 10089 10105 10105 10105 10105 10105 +10105 10105 10105 10089 10105 10105 10105 10105 10105 10105 10105 10105 10105 10089 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10089 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10089 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10089 10105 10105 10009 10105 10105 10010 10105 10105 10009 10105 10105 10089 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10089 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10089 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10089 10105 10105 10105 10105 10105 10105 10105 10105 10105 10089 10105 10105 10105 +10105 10105 10105 10105 10105 10089 10105 10105 10089 10105 10105 10089 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 + + + 1.25984 1.25984 + 17 17 + -10.70864 -10.70864 + +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10105 10105 10105 +10105 10105 10105 10009 10105 10105 10105 10105 10105 10105 10105 10105 10105 10009 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10009 10105 10105 10009 10105 10105 10016 10105 10105 10009 10105 10105 10009 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10009 10105 10105 10105 10105 10105 10105 10105 10105 10105 10009 10105 10105 10105 +10105 10105 10105 10105 10105 10009 10105 10105 10009 10105 10105 10009 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 +10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 10105 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10206 10206 +10000 10000 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10000 10000 +10209 10209 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10000 10212 +10000 10212 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10215 10000 +10215 10000 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10218 10206 +10215 10000 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10206 10221 +10000 10212 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10215 10000 +10224 10209 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10000 10212 +10209 10227 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10230 10000 +10000 10000 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10000 10233 +10000 10000 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10000 10000 +10000 10236 + + + 10.75182 10.75182 + 2 2 + -10.75182 -10.75182 + +10000 10000 +10239 10000 + + + 21.50364 21.50364 + 19 19 + -204.28458 -204.28458 + +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10238 10211 10211 10211 10241 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10238 10229 10183 10111 10183 10226 10241 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10238 10229 10183 10111 10165 10111 10183 10226 10241 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10214 10183 10111 10165 10145 10165 10111 10183 10217 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10214 10111 10165 10145 10125 10145 10165 10111 10217 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10214 10183 10111 10165 10145 10165 10111 10183 10217 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10235 10223 10183 10111 10165 10111 10183 10220 10232 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10235 10223 10183 10111 10183 10220 10232 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10235 10208 10208 10208 10232 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/smr/grids.py b/smr/grids.py deleted file mode 100644 index d43bdef..0000000 --- a/smr/grids.py +++ /dev/null @@ -1,36 +0,0 @@ -from surfaces import surfs - -# FIXME: Add docstring explanation -# FIXME: Put this in surface.py?? - -# FIXME: Use get_rectangular_prism method instead??? - -grids = {} - -grids['inner grid box (intermediate)'] = (+surfs['rod grid box ybot i'] & - -surfs['rod grid box ytop i'] & - +surfs['rod grid box xbot i'] & - -surfs['rod grid box xtop i']) - -grids['outer grid box (intermediate)'] = (-surfs['rod grid box ybot i']) | \ - (+surfs['rod grid box ytop i']) | \ - (+surfs['rod grid box xtop i'] & - -surfs['rod grid box ytop i'] & - +surfs['rod grid box ybot i']) | \ - (-surfs['rod grid box xbot i'] & - -surfs['rod grid box ytop i'] & - +surfs['rod grid box ybot i']) - -grids['inner grid box (top/bottom)'] = (+surfs['rod grid box ybot tb'] & - -surfs['rod grid box ytop tb'] & - +surfs['rod grid box xbot tb'] & - -surfs['rod grid box xtop tb']) - -grids['outer grid box (top/bottom)'] = (-surfs['rod grid box ybot tb']) | \ - (+surfs['rod grid box ytop tb']) | \ - (+surfs['rod grid box xtop tb'] & - -surfs['rod grid box ytop tb'] & - +surfs['rod grid box ybot tb']) | \ - (-surfs['rod grid box xbot tb'] & - -surfs['rod grid box ytop tb'] & - +surfs['rod grid box ybot tb']) \ No newline at end of file diff --git a/smr/materials.xml b/smr/materials.xml new file mode 100644 index 0000000..d392417 --- /dev/null +++ b/smr/materials.xml @@ -0,0 +1,203 @@ + + + + 300 + + + + + + 300 + + + + + + + + + + + + 300 + + + + + + + + + + + + + + + + + + + + + 300 + + + + + + + + + + + + + + + + + + + + + 300 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 300 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 300 + + + + + + + + 300 + + + + + + + + + + + 300 + + + + + + + + + + + + 300 + + + + + + + + + 300 + + + + + + + + + 300 + + + + + + + + diff --git a/smr/pins.py b/smr/pins.py index 25d46f7..18b7dfa 100644 --- a/smr/pins.py +++ b/smr/pins.py @@ -2,7 +2,6 @@ import openmc from materials import mats from surfaces import surfs -from grids import grids # FIXME: Add docstrings, etc. # FIXME: Assign names of cells, universes based on dict keys @@ -35,14 +34,12 @@ def make_pin(name, surfaces, materials, grid=None): # Add spacer grid cells if specified if grid: - inner_grid_name = 'inner grid box {}'.format(grid) - - # FIXME: Does this work??? - cell.region = openmc.Intersection(cell.region, grids[inner_grid_name]) + grid_name = 'rod grid box {}'.format(grid) + cell.region = openmc.Intersection(cell.region, surfs[grid_name]) cell_name = name + ' (grid)' cell = openmc.Cell(name=cell_name) - cell.region = openmc.Complement(grids[inner_grid_name]) + cell.region = openmc.Complement(surfs[grid_name]) if grid == 'top/bottom': cell.fill = mats['In'] @@ -88,7 +85,6 @@ univs = {} cell = openmc.Cell(name='water pin 1') cell.fill = mats['H2O'] -cell.region = -surfs['dummy outer'] univs['water pin'] = openmc.Universe(name='Empty water pin cell universe') univs['water pin'].add_cell(cell) diff --git a/smr/plots.py b/smr/plots.py index ccecd83..e895078 100644 --- a/smr/plots.py +++ b/smr/plots.py @@ -23,34 +23,12 @@ col_spec = {mats['H2O'].id: [198, 226, 255], # light blue # Create a collection of plots plots = openmc.Plots() -plot = openmc.Plot(name='radial core map 1') +plot = openmc.Plot(name='radial core map ') plot.basis = 'xy' plot.color = 'mat' plot.origin = [0., 0., (highest_extent-lowest_extent)/2.] -plot.width = [19*lattice_pitch/2, 19*lattice_pitch/2.] -plot.filename = 'radial_core_map1' -plot.col_spec = col_spec -plot.background = [255, 255, 255] -plot.pixels = [1000, 1000] -plots += [plot] - -plot = openmc.Plot(name='radial core map 2') -plot.basis = 'xy' -plot.color = 'mat' -plot.origin = [0., 0., 40.] -plot.width = [19*lattice_pitch/2, 19*lattice_pitch/2.] -plot.filename = 'radial_core_map2' -plot.col_spec = col_spec -plot.background = [255, 255, 255] -plot.pixels = [1000, 1000] -plots += [plot] - -plot = openmc.Plot(name='radial core map 3') -plot.basis = 'xy' -plot.color = 'mat' -plot.origin = [0., 0., 210.] -plot.width = [19*lattice_pitch/2, 19*lattice_pitch/2.] -plot.filename = 'radial_core_map3' +plot.width = [25*lattice_pitch/2, 25*lattice_pitch/2.] +plot.filename = 'radial_core_map' plot.col_spec = col_spec plot.background = [255, 255, 255] plot.pixels = [1000, 1000] @@ -67,17 +45,6 @@ plot.background = [255, 255, 255] plot.pixels = [600, 600] plots += [plot] -plot = openmc.Plot(name='mats J8 ax bot') -plot.basis = 'xz' -plot.color = 'mat' -plot.origin = [0., lattice_pitch, top_lower_nozzle] -plot.width = [lattice_pitch, 2.1*(top_lower_nozzle-bottom_support_plate)] -plot.filename = 'J8_mats_ax_bot' -plot.col_spec = col_spec -plot.background = [255, 255, 255] -plot.pixels = [400, int(400*2.1*(top_lower_nozzle-bottom_support_plate)/lattice_pitch)] -plots += [plot] - plot = openmc.Plot(name='mats J8 nozzle') plot.basis = 'xy' plot.color = 'mat' @@ -87,15 +54,4 @@ plot.filename = 'J8_mats_nozzle' plot.col_spec = col_spec plot.background = [255, 255, 255] plot.pixels = [400, 400] -plots += [plot] - -plot = openmc.Plot(name='mats H8 axial top') -plot.basis = 'xy' -plot.color = 'mat' -plot.origin = [0., 0., top_fuel_rod] -plot.width = [lattice_pitch, 5*(top_upper_nozzle-top_fuel_rod)] -plot.filename = 'H8_mats_ax_top' -plot.col_spec = col_spec -plot.background = [255, 255, 255] -plot.pixels = [400, int(400*2.1*(top_upper_nozzle-top_fuel_rod)/lattice_pitch)] plots += [plot] \ No newline at end of file diff --git a/smr/plots.xml b/smr/plots.xml new file mode 100644 index 0000000..0041114 --- /dev/null +++ b/smr/plots.xml @@ -0,0 +1,60 @@ + + + + + 0.0 0.0 127.722 + 268.7955 268.7955 + 1000 1000 + 255 255 255 + + + + + + + + + + + + + + + + 0.0 0.0 127.722 + 127.722 127.722 + 600 600 + 255 255 255 + + + + + + + + + + + + + + + + 0.0 21.50364 20.0 + 21.50364 21.50364 + 400 400 + 255 255 255 + + + + + + + + + + + + + + diff --git a/smr/settings.xml b/smr/settings.xml new file mode 100644 index 0000000..48b2727 --- /dev/null +++ b/smr/settings.xml @@ -0,0 +1,19 @@ + + + + 10000 + 10 + 5 + + + + -75.26274000000001 -75.26274000000001 36.007 75.26274000000001 75.26274000000001 218.887 + + + + false + + true + True + 1000 + diff --git a/smr/smr.py b/smr/smr.py deleted file mode 100644 index 57da225..0000000 --- a/smr/smr.py +++ /dev/null @@ -1,59 +0,0 @@ - # settings parameters - entrX = 15*17 - entrY = 15*17 - entrZ = 100 - xbot = -8*latticePitch/2 - ybot = -8*latticePitch/2 - zbot = bottomFuelStack - xtop = 8*latticePitch/2 - ytop = 8*latticePitch/2 - ztop = topActiveCore - if core_D == '2-D': - entrZ = 1 - zbot = twoDlower - ztop = twoDhigher - sett = { - 'xslib': '/home/shared/mcnpdata/binary/cross_sections.xml', -# 'xslib': '/home/nhorelik/xsdata/cross_sections.xml', - 'batches': 350, - 'inactive': 250, - 'particles': int(4e4), - 'verbosity': 7, - 'entrX': entrX, - 'entrY': entrY, - 'entrZ': entrZ, - 'xbot': xbot, 'ybot': ybot, 'zbot': zbot, - 'xtop': xtop, 'ytop': ytop, 'ztop': ztop} - - - - tallies = {} - - meshDim = 15*17 - meshLleft = -15*latticePitch/2 - tallies['testmesh'] = {'ttype': 'mesh', - 'id': 1, - 'type': 'rectangular', - 'origin': '0.0 0.0', - 'width': '{0} {0}'.format(-meshLleft*2/meshDim), - 'lleft': '{0} {0}'.format(meshLleft), - 'dimension': '{0} {0}'.format(meshDim)} - tallies['test'] = { 'ttype': 'tally', - 'id': 1, - 'mesh':tallies['testmesh']['id'], - 'scores':'nu-fission'} - - return mats,surfs,cells,latts,sett,plots,tallies - - -def main(): - - mats,surfs,cells,latts,sett,plots,tallies,cmfd = init_data() - - write_materials(mats,"materials.xml") - write_geometry(surfs,cells,latts,"geometry.xml") - write_settings(sett,"settings.xml") - write_plots(plots,"plots.xml") - -if __name__ == "__main__": - main() diff --git a/smr/surfaces.py b/smr/surfaces.py index 91370fc..64db3f7 100644 --- a/smr/surfaces.py +++ b/smr/surfaces.py @@ -89,91 +89,53 @@ neutron_shield_NEtop_SWbot = math.tan(-math.pi/6) surfs = {} -# FIXME: Is this a good idea??? -surfs['dummy outer'] = openmc.Sphere( - x0=0., y0=0., R=4000., name='Dummy Outer Surface') - - -surfs['pellet OR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.39218, name='Pellet OR') +surfs['pellet OR'] = openmc.ZCylinder(R=0.39218) surfs['plenum spring OR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.06459, name='FR Plenum Spring OR') + R=0.06459, name='FR Plenum Spring OR') surfs['clad IR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.40005, name='Clad IR') + R=0.40005, name='Clad IR') surfs['clad OR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.45720, name='Clad OR') + R=0.45720, name='Clad OR') surfs['GT IR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.56134, name='GT IR (above dashpot)') + R=0.56134, name='GT IR (above dashpot)') surfs['GT OR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.60198, name='GT OR (above dashpot)') + R=0.60198, name='GT OR (above dashpot)') surfs['GT dashpot IR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.50419, name='GT IR (at dashpot)') + R=0.50419, name='GT IR (at dashpot)') surfs['GT dashpot OR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.54610, name='GT OR (at dashpot)') + R=0.54610, name='GT OR (at dashpot)') surfs['CP OR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.43310, name='Control Poison OR') + R=0.43310, name='Control Poison OR') surfs['CR IR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.43688, name='CR Clad IR') + R=0.43688, name='CR Clad IR') surfs['CR OR'] = openmc.ZCylinder( - x0=0., y0=0., R=0.48387, name='CR Clad OR') + R=0.48387, name='CR Clad OR') surfs['BA IR 1'] = openmc.ZCylinder( - x0=0., y0=0., R=0.21400, name='BA IR 1') + R=0.21400, name='BA IR 1') surfs['BA IR 2'] = openmc.ZCylinder( - x0=0., y0=0., R=0.23051, name='BA IR 2') + R=0.23051, name='BA IR 2') surfs['BA IR 3'] = openmc.ZCylinder( - x0=0., y0=0., R=0.24130, name='BA IR 3') + R=0.24130, name='BA IR 3') surfs['BA IR 4'] = openmc.ZCylinder( - x0=0., y0=0., R=0.42672, name='BA IR 4') + R=0.42672, name='BA IR 4') surfs['BA IR 5'] = openmc.ZCylinder( - x0=0., y0=0., R=0.43688, name='BA IR 5') + R=0.43688, name='BA IR 5') surfs['BA IR 6'] = openmc.ZCylinder( - x0=0., y0=0., R=0.48387, name='BA IR 6') + R=0.48387, name='BA IR 6') surfs['BA IR 7'] = openmc.ZCylinder( - x0=0., y0=0., R=0.56134, name='BA IR 7') + R=0.56134, name='BA IR 7') surfs['BA IR 8'] = openmc.ZCylinder( - x0=0., y0=0., R=0.60198, name='BA IR 8') + R=0.60198, name='BA IR 8') surfs['IT IR'] = copy.deepcopy(surfs['BA IR 5']) surfs['IT OR'] = copy.deepcopy(surfs['BA IR 6']) -# Planes -surfs['rod grid box xtop tb'] = openmc.XPlane( - x0=rod_grid_side_tb/2., name='X max for grid outside FR in top/bottom spacers') -surfs['rod grid box xbot tb'] = openmc.XPlane( - x0=-rod_grid_side_tb/2., name='X min for grid outside FR in top/bottom spacers') -surfs['rod grid box ytop tb'] = openmc.YPlane( - y0=rod_grid_side_tb/2., name='Y max for grid outside FR in top/bottom spacers') -surfs['rod grid box ybot tb'] = openmc.YPlane( - y0=-rod_grid_side_tb/2., name='Y min for grid outside FR in top/bottom spacers') +# Rectangular prisms for grid spacers +surfs['rod grid box (top/bottom)'] = \ + openmc.get_rectangular_prism(rod_grid_side_tb, rod_grid_side_tb) +surfs['rod grid box (intermediate)'] = \ + openmc.get_rectangular_prism(rod_grid_side_i, rod_grid_side_i) -surfs['rod grid box xtop i'] = openmc.XPlane( - x0=rod_grid_side_i/2, name='X max for grid outside FR in intermediate spacers') -surfs['rod grid box xbot i'] = openmc.XPlane( - x0=-rod_grid_side_i/2, name='X min for grid outside FR in intermediate spacers') -surfs['rod grid box ytop i'] = openmc.YPlane( - y0=rod_grid_side_i/2, name='Y max for grid outside FR in intermediate spacers') -surfs['rod grid box ybot i'] = openmc.YPlane( - y0=-rod_grid_side_i/2, name='Y min for grid outside FR in intermediate spacers') - -# FIXME: Can these be removed??? Use the get_rectangular_prism method instead??? -surfs['lat grid box xtop'] = openmc.XPlane( - x0=grid_strap_side/2, name='X max for grid outside FA') -surfs['lat grid box xbot'] = openmc.XPlane( - x0=-grid_strap_side/2, name='Y min for grid outside FA') -surfs['lat grid box ytop'] = openmc.YPlane( - y0=grid_strap_side/2, name='Y max for grid outside FA') -surfs['lat grid box ybot'] = openmc.YPlane( - y0=-grid_strap_side/2, name='Y min for grid outside FA') - -surfs['lat box xtop'] = openmc.XPlane( - x0=17.*pin_pitch/2., name='lattice X max') -surfs['lat box xbot'] = openmc.XPlane( - x0=-17.*pin_pitch/2., name='lattice X min') -surfs['lat box ytop'] = openmc.YPlane( - y0=17.*pin_pitch/2., name='lattice Y max') -surfs['lat box ybot'] = openmc.YPlane( - y0=-17.*pin_pitch/2., name='lattice Y min') - -# FIXME: rectangular prism for lattice grid sleeves +# Rectangular prisms for lattice grid sleeves surfs['lat grid box inner'] = \ openmc.get_rectangular_prism(17.*pin_pitch, 17.*pin_pitch) surfs['lat grid box outer'] = \ @@ -255,11 +217,11 @@ surfs['bankD bot'] = openmc.ZPlane( # outer radial surfaces surfs['core barrel IR'] = openmc.ZCylinder( - x0=0., y0=0., R=core_barrel_IR, name='core barrel IR') + R=core_barrel_IR, name='core barrel IR') surfs['core barrel OR'] = openmc.ZCylinder( - x0=0., y0=0., R=core_barrel_OR, name='core barrel OR') + R=core_barrel_OR, name='core barrel OR') surfs['neutron shield OR'] = openmc.ZCylinder( - x0=0., y0=0., R=neutron_shield_OR, name='neutron shield OR') + R=neutron_shield_OR, name='neutron shield OR') # neutron shield planes surfs['neutron shield NWbot SEtop'] = openmc.Plane( @@ -277,9 +239,9 @@ surfs['neutron shield NEtop SWbot'] = openmc.Plane( # outer radial surfaces surfs['RPV IR'] = openmc.ZCylinder( - x0=0., y0=0., R=rpv_IR, name='RPV IR') + R=rpv_IR, name='RPV IR') surfs['RPV OR'] = openmc.ZCylinder( - x0=0., y0=0., R=rpv_OR, name='RPV OR', boundary_type='vacuum') + R=rpv_OR, name='RPV OR', boundary_type='vacuum') # outer axial surfaces surfs['upper bound'] = openmc.ZPlane( diff --git a/smr/tallies.xml b/smr/tallies.xml new file mode 100644 index 0000000..a43c2ac --- /dev/null +++ b/smr/tallies.xml @@ -0,0 +1,13 @@ + + + + + 119 119 + -75.26274000000001 -75.26274000000001 + 150.52548 150.52548 + + + + fission + +