From 263addffc1ea2c63f5666934bd9c9d7b26f98c0e Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Mon, 28 Jun 2021 15:31:22 -0500 Subject: [PATCH] Updating test and test results for the DAGMC geometry in a lattice. --- .../dagmc/universes/inputs_true.dat | 14 ++++++++--- .../dagmc/universes/results_true.dat | 2 +- .../regression_tests/dagmc/universes/test.py | 25 +++++++++++++------ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/tests/regression_tests/dagmc/universes/inputs_true.dat b/tests/regression_tests/dagmc/universes/inputs_true.dat index fdc8b07bc..e235c06a8 100644 --- a/tests/regression_tests/dagmc/universes/inputs_true.dat +++ b/tests/regression_tests/dagmc/universes/inputs_true.dat @@ -1,13 +1,21 @@ - + + + 24.0 24.0 + 2 2 + -24.0 -24.0 + +9 9 +9 9 + - - + + diff --git a/tests/regression_tests/dagmc/universes/results_true.dat b/tests/regression_tests/dagmc/universes/results_true.dat index c9e1bc8fa..0dc1789d4 100644 --- a/tests/regression_tests/dagmc/universes/results_true.dat +++ b/tests/regression_tests/dagmc/universes/results_true.dat @@ -1,2 +1,2 @@ k-combined: -7.687742E-01 3.415061E-02 +9.436168E-01 2.905559E-02 diff --git a/tests/regression_tests/dagmc/universes/test.py b/tests/regression_tests/dagmc/universes/test.py index 1458462c4..01963986c 100644 --- a/tests/regression_tests/dagmc/universes/test.py +++ b/tests/regression_tests/dagmc/universes/test.py @@ -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])