mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Add a nuclide with Maxwell fission spectrum to energy_laws test
This commit is contained in:
parent
36bfa08eae
commit
da18820a88
6 changed files with 59 additions and 33 deletions
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<geometry>
|
||||
<surface id="1" type="sphere" coeffs="0 0 0 100" boundary="vacuum"/>
|
||||
<cell id="1" material="1" region="-1" />
|
||||
</geometry>
|
||||
23
tests/regression_tests/energy_laws/inputs_true.dat
Normal file
23
tests/regression_tests/energy_laws/inputs_true.dat
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<geometry>
|
||||
<cell id="1" material="1" region="-1" universe="1" />
|
||||
<surface boundary="reflective" coeffs="0.0 0.0 0.0 100.0" id="1" type="sphere" />
|
||||
</geometry>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<materials>
|
||||
<material depletable="true" id="1">
|
||||
<density units="g/cm3" value="20.0" />
|
||||
<nuclide ao="1.0" name="U233" />
|
||||
<nuclide ao="1.0" name="Am244" />
|
||||
<nuclide ao="1.0" name="H2" />
|
||||
<nuclide ao="1.0" name="Na23" />
|
||||
<nuclide ao="1.0" name="Ta181" />
|
||||
</material>
|
||||
</materials>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<settings>
|
||||
<run_mode>eigenvalue</run_mode>
|
||||
<particles>1000</particles>
|
||||
<batches>10</batches>
|
||||
<inactive>5</inactive>
|
||||
</settings>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<materials>
|
||||
<material id="1">
|
||||
<density value="20" units="g/cc" />
|
||||
<nuclide name="U233" ao="1.0" />
|
||||
<nuclide name="H2" ao="1.0" />
|
||||
<nuclide name="Na23" ao="1.0" />
|
||||
<nuclide name="Ta181" ao="1.0" />
|
||||
</material>
|
||||
</materials>
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
k-combined:
|
||||
2.122164E+00 1.946222E-02
|
||||
2.466441E+00 1.500183E-02
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<settings>
|
||||
<run_mode>eigenvalue</run_mode>
|
||||
<batches>10</batches>
|
||||
<inactive>5</inactive>
|
||||
<particles>1000</particles>
|
||||
<source>
|
||||
<space type="point" parameters="0. 0. 0." />
|
||||
</source>
|
||||
</settings>
|
||||
|
|
@ -2,23 +2,51 @@
|
|||
are not covered in other tests. It has a single material with the following
|
||||
nuclides:
|
||||
|
||||
U-233: Only nuclide that has a Watt fission spectrum
|
||||
U233: Only nuclide that has a Watt fission spectrum
|
||||
|
||||
H-2: Only nuclide that has an N-body phase space distribution, in this case for
|
||||
Am244: One of a few nuclides that has a Maxwell fission spectrum
|
||||
|
||||
H2: Only nuclide that has an N-body phase space distribution, in this case for
|
||||
(n,2n)
|
||||
|
||||
Na-23: Has an evaporation spectrum and also has reactions that have multiple
|
||||
Na23: Has an evaporation spectrum and also has reactions that have multiple
|
||||
angle-energy distributions, so it provides coverage for both of those
|
||||
situations.
|
||||
|
||||
Ta-181: One of a few nuclides that has reactions with Kalbach-Mann distributions
|
||||
Ta181: One of a few nuclides that has reactions with Kalbach-Mann distributions
|
||||
that use linear-linear interpolation.
|
||||
|
||||
"""
|
||||
|
||||
from tests.testing_harness import TestHarness
|
||||
import openmc
|
||||
import pytest
|
||||
|
||||
from tests.testing_harness import PyAPITestHarness
|
||||
|
||||
|
||||
def test_energy_laws():
|
||||
harness = TestHarness('statepoint.10.h5')
|
||||
@pytest.fixture
|
||||
def model():
|
||||
model = openmc.model.Model()
|
||||
|
||||
m = openmc.Material()
|
||||
m.set_density('g/cm3', 20.0)
|
||||
m.add_nuclide('U233', 1.0)
|
||||
m.add_nuclide('Am244', 1.0)
|
||||
m.add_nuclide('H2', 1.0)
|
||||
m.add_nuclide('Na23', 1.0)
|
||||
m.add_nuclide('Ta181', 1.0)
|
||||
|
||||
s = openmc.Sphere(r=100.0, boundary_type='reflective')
|
||||
c = openmc.Cell(fill=m, region=-s)
|
||||
model.geometry = openmc.Geometry([c])
|
||||
|
||||
model.settings.batches = 10
|
||||
model.settings.inactive = 5
|
||||
model.settings.particles = 1000
|
||||
|
||||
return model
|
||||
|
||||
|
||||
def test_energy_laws(model):
|
||||
harness = PyAPITestHarness('statepoint.10.h5', model)
|
||||
harness.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue