diff --git a/tests/regression_tests/photon_production_fission/__init__.py b/tests/regression_tests/photon_production_fission/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/regression_tests/photon_production_fission/inputs_true.dat b/tests/regression_tests/photon_production_fission/inputs_true.dat new file mode 100644 index 0000000000..1c496b2f27 --- /dev/null +++ b/tests/regression_tests/photon_production_fission/inputs_true.dat @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + eigenvalue + 1000 + 5 + 2 + + + 0 0 0 + + + true + + + + + neutron photon + + + 1 + U235 total + fission heating heating-local + tracklength + + + 1 + U235 total + fission heating heating-local + collision + + + 1 + U235 total + fission heating heating-local + analog + + diff --git a/tests/regression_tests/photon_production_fission/results_true.dat b/tests/regression_tests/photon_production_fission/results_true.dat new file mode 100644 index 0000000000..60e12bc3a0 --- /dev/null +++ b/tests/regression_tests/photon_production_fission/results_true.dat @@ -0,0 +1,77 @@ +k-combined: +2.223956E+00 2.598313E-03 +tally 1: +2.600054E+00 +2.253433E+00 +4.390171E+08 +6.424554E+16 +0.000000E+00 +0.000000E+00 +2.600054E+00 +2.253433E+00 +4.390171E+08 +6.424554E+16 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.491697E+07 +2.070245E+14 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.491697E+07 +2.070245E+14 +0.000000E+00 +0.000000E+00 +tally 2: +2.602512E+00 +2.258176E+00 +4.394176E+08 +6.437709E+16 +0.000000E+00 +0.000000E+00 +2.602512E+00 +2.258176E+00 +4.394176E+08 +6.437709E+16 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.508579E+07 +2.098299E+14 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.508579E+07 +2.098299E+14 +0.000000E+00 +0.000000E+00 +tally 3: +2.663535E+00 +2.364845E+00 +4.394176E+08 +6.437709E+16 +0.000000E+00 +0.000000E+00 +2.663535E+00 +2.364845E+00 +4.394176E+08 +6.437709E+16 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.495967E+07 +2.077339E+14 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.504536E+07 +2.091625E+14 +0.000000E+00 +0.000000E+00 diff --git a/tests/regression_tests/photon_production_fission/test.py b/tests/regression_tests/photon_production_fission/test.py new file mode 100644 index 0000000000..f013c9f804 --- /dev/null +++ b/tests/regression_tests/photon_production_fission/test.py @@ -0,0 +1,48 @@ +import openmc +import pytest + +from tests.testing_harness import PyAPITestHarness + + +@pytest.fixture +def model(): + model = openmc.model.Model() + mat = openmc.Material() + mat.set_density('g/cm3', 10.0) + mat.add_nuclide('U235', 1.0) + model.materials.append(mat) + + sph = openmc.Sphere(r=100.0, boundary_type='reflective') + cell = openmc.Cell(fill=mat, region=-sph) + model.geometry = openmc.Geometry([cell]) + + model.settings.particles = 1000 + model.settings.batches = 5 + model.settings.inactive = 2 + model.settings.photon_transport = True + model.settings.source = openmc.Source(space=openmc.stats.Point((0, 0, 0))) + + particle_filter = openmc.ParticleFilter(['neutron', 'photon']) + tally_tracklength = openmc.Tally() + tally_tracklength.filters = [particle_filter] + tally_tracklength.scores = ['fission', 'heating', 'heating-local'] + tally_tracklength.nuclides = ['U235', 'total'] + tally_tracklength.estimator = 'tracklength' + tally_collision = openmc.Tally() + tally_collision.filters = [particle_filter] + tally_collision.scores = ['fission', 'heating', 'heating-local'] + tally_collision.nuclides = ['U235', 'total'] + tally_collision.estimator = 'collision' + tally_analog = openmc.Tally() + tally_analog.filters = [particle_filter] + tally_analog.scores = ['fission', 'heating', 'heating-local'] + tally_analog.nuclides = ['U235', 'total'] + tally_analog.estimator = 'analog' + model.tallies.extend([tally_tracklength, tally_collision, tally_analog]) + + return model + + +def test_photon_production(model): + harness = PyAPITestHarness('statepoint.5.h5', model) + harness.main()