Restoring old test (but using PyAPITestHarnes). Moving the new test into its own directory.

This commit is contained in:
Patrick Shriwise 2021-03-31 22:56:03 -05:00
parent e455c3d58e
commit e0aed3d2b3
3 changed files with 13 additions and 34 deletions

View file

@ -1,17 +1,10 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" region="-1" universe="1" />
<cell id="2" material="2" region="1" universe="1" />
<cell fill="1" id="3" region="2 -3 4 -5 6 -8" rotation="10 20 30" universe="2" />
<cell fill="1" id="4" region="2 -3 4 -5 8 -7" translation="0 0 15" universe="2" />
<surface coeffs="1.0 0.0 0.0 5.0" id="1" type="sphere" />
<surface boundary="vacuum" coeffs="-7.5" id="2" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="7.5" id="3" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-7.5" id="4" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="7.5" id="5" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="-7.5" id="6" type="z-plane" />
<surface boundary="vacuum" coeffs="22.5" id="7" type="z-plane" />
<surface coeffs="7.5" id="8" type="z-plane" />
<cell id="1" material="1" region="-2" universe="1" />
<cell id="2" material="2" region="2" universe="1" />
<cell fill="1" id="3" region="-1" rotation="10 20 30" universe="2" />
<surface boundary="vacuum" coeffs="0.0 0.0 0.0 10.0" id="1" type="sphere" />
<surface coeffs="1.0 0.0 0.0 5.0" id="2" type="sphere" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
@ -27,7 +20,7 @@
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>10000</particles>
<particles>1000</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">

View file

@ -1,6 +1,2 @@
k-combined:
<<<<<<< HEAD
4.132181E-01 1.130226E-02
=======
4.453328E-01 5.918369E-03
>>>>>>> Updating test results for new problem.

View file

@ -1,8 +1,7 @@
import pytest
import openmc
import pytest
from tests.testing_harness import PyAPITestHarness
from tests.testing_harness import TestHarness, PyAPITestHarness
@pytest.fixture
def model():
@ -16,27 +15,18 @@ def model():
h1.set_density('g/cc', 0.1)
h1.add_nuclide('H1', 0.1)
outer_sphere = openmc.Sphere(r=10.0, boundary_type='vacuum')
inner_sphere = openmc.Sphere(x0=1.0, r=5.0)
fuel_cell = openmc.Cell(fill=fuel, region=-inner_sphere)
hydrogen_cell = openmc.Cell(fill=h1, region=+inner_sphere)
univ = openmc.Universe(cells=[fuel_cell, hydrogen_cell])
outer_cell = openmc.Cell(fill=univ, region=-outer_sphere)
outer_cell.rotation = (10, 20, 30)
# Create one cell on top of the other. Only one
# has a rotation
box = openmc.rectangular_prism(15., 15., 'z', boundary_type='vacuum')
lower_z = openmc.ZPlane(-7.5, boundary_type='vacuum')
upper_z = openmc.ZPlane(22.5, boundary_type='vacuum')
middle_z = openmc.ZPlane(7.5)
model.geometry = openmc.Geometry(root=[outer_cell])
lower_cell = openmc.Cell(fill=univ, region=box & +lower_z & -middle_z)
lower_cell.rotation = (10, 20, 30)
upper_cell = openmc.Cell(fill=univ, region=box & +middle_z & -upper_z)
upper_cell.translation = (0, 0, 15)
model.geometry = openmc.Geometry(root=[lower_cell, upper_cell])
model.settings.particles = 10000
model.settings.particles = 1000
model.settings.inactive = 5
model.settings.batches = 10
source_box = openmc.stats.Box((-4., -4., -4.), (4., 4., 4.))