Updating test and test results for the DAGMC geometry in a lattice.

This commit is contained in:
Patrick Shriwise 2021-06-28 15:31:22 -05:00
parent 648054fbc7
commit 263addffc1
3 changed files with 29 additions and 12 deletions

View file

@ -1,13 +1,21 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell fill="9" id="13" region="9 -10 11 -12 13 -14" universe="10" />
<cell fill="10" id="13" region="9 -10 11 -12 13 -14" universe="11" />
<dagmc_universe auto_geom_ids="true" filename="dagmc.h5m" id="9" name="" />
<lattice id="10">
<pitch>24.0 24.0</pitch>
<dimension>2 2</dimension>
<lower_left>-24.0 -24.0</lower_left>
<universes>
9 9
9 9 </universes>
</lattice>
<surface boundary="reflective" coeffs="-24.0" id="9" name="left" type="x-plane" />
<surface boundary="reflective" coeffs="24.0" id="10" name="right" type="x-plane" />
<surface boundary="reflective" coeffs="-24.0" id="11" name="front" type="y-plane" />
<surface boundary="reflective" coeffs="24.0" id="12" name="back" type="y-plane" />
<surface boundary="vacuum" coeffs="-20.0" id="13" name="bottom" type="z-plane" />
<surface boundary="vacuum" coeffs="20.0" id="14" name="top" type="z-plane" />
<surface boundary="reflective" coeffs="-10.0" id="13" name="bottom" type="z-plane" />
<surface boundary="reflective" coeffs="10.0" id="14" name="top" type="z-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>

View file

@ -1,2 +1,2 @@
k-combined:
7.687742E-01 3.415061E-02
9.436168E-01 2.905559E-02

View file

@ -1,3 +1,5 @@
import numpy as np
import openmc
import openmc.lib
@ -44,16 +46,23 @@ class DAGMCUniverseTest(PyAPITestHarness):
# create the DAGMC universe
pincell_univ = openmc.DAGMCUniverse(filename='dagmc.h5m', auto_geom_ids=True)
left = openmc.XPlane(x0=-24.0, name='left', boundary_type='reflective')
right = openmc.XPlane(x0=24.0, name='right', boundary_type='reflective')
front = openmc.YPlane(y0=-24.0, name='front', boundary_type='reflective')
back = openmc.YPlane(y0=24.0, name='back', boundary_type='reflective')
bottom = openmc.ZPlane(z0=-20.0, name='bottom', boundary_type='vacuum')
top = openmc.ZPlane(z0=20.0, name='top', boundary_type='vacuum')
# create a 2 x 2 lattice using the DAGMC pincell
pitch = np.asarray((24.0, 24.0))
lattice = openmc.RectLattice()
lattice.pitch = pitch
lattice.universes = [[pincell_univ] * 2] * 2
lattice.lower_left = -pitch
box = +left & -right & +front & -back & +bottom & -top
left = openmc.XPlane(x0=-pitch[0], name='left', boundary_type='reflective')
right = openmc.XPlane(x0=pitch[0], name='right', boundary_type='reflective')
front = openmc.YPlane(y0=-pitch[1], name='front', boundary_type='reflective')
back = openmc.YPlane(y0=pitch[1], name='back', boundary_type='reflective')
# clip the DAGMC geometry at +/- 10 cm w/ CSG planes
bottom = openmc.ZPlane(z0=-10.0, name='bottom', boundary_type='reflective')
top = openmc.ZPlane(z0=10.0, name='top', boundary_type='reflective')
bounding_cell = openmc.Cell(fill=pincell_univ, region=box)
bounding_region = +left & -right & +front & -back & +bottom & -top
bounding_cell = openmc.Cell(fill=lattice, region=bounding_region)
model.geometry = openmc.Geometry([bounding_cell])