mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Add simple test with periodic hexagonal prism (currently fails)
This commit is contained in:
parent
8a5f423dc4
commit
f5a0caa51a
3 changed files with 52 additions and 0 deletions
0
tests/regression_tests/periodic_hex/__init__.py
Normal file
0
tests/regression_tests/periodic_hex/__init__.py
Normal file
24
tests/regression_tests/periodic_hex/inputs_true.dat
Normal file
24
tests/regression_tests/periodic_hex/inputs_true.dat
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<geometry>
|
||||
<cell id="1" material="1" region="-1 2 -3 -4 5 6" universe="1" />
|
||||
<surface boundary="periodic" coeffs="8.660254037844386" id="1" periodic_surface_id="2" type="x-plane" />
|
||||
<surface boundary="periodic" coeffs="-8.660254037844386" id="2" periodic_surface_id="1" type="x-plane" />
|
||||
<surface boundary="periodic" coeffs="0.5773502691896257 1.0 0.0 10.0" id="3" periodic_surface_id="6" type="plane" />
|
||||
<surface boundary="periodic" coeffs="-0.5773502691896257 1.0 0.0 10.0" id="4" periodic_surface_id="5" type="plane" />
|
||||
<surface boundary="periodic" coeffs="-0.5773502691896257 1.0 0.0 -10.0" id="5" periodic_surface_id="4" type="plane" />
|
||||
<surface boundary="periodic" coeffs="0.5773502691896257 1.0 0.0 -10.0" id="6" periodic_surface_id="3" type="plane" />
|
||||
</geometry>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<materials>
|
||||
<material depletable="true" id="1">
|
||||
<density units="g/cc" value="4.5" />
|
||||
<nuclide ao="1.0" name="U235" />
|
||||
</material>
|
||||
</materials>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<settings>
|
||||
<run_mode>eigenvalue</run_mode>
|
||||
<particles>1000</particles>
|
||||
<batches>5</batches>
|
||||
<inactive>0</inactive>
|
||||
</settings>
|
||||
28
tests/regression_tests/periodic_hex/test.py
Normal file
28
tests/regression_tests/periodic_hex/test.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import openmc
|
||||
import pytest
|
||||
|
||||
from tests.testing_harness import PyAPITestHarness
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def hex_model():
|
||||
model = openmc.model.Model()
|
||||
|
||||
fuel = openmc.Material()
|
||||
fuel.add_nuclide('U235', 1.0)
|
||||
fuel.set_density('g/cc', 4.5)
|
||||
|
||||
hex_region = openmc.model.hexagonal_prism(10.0, boundary_type='periodic')
|
||||
cell = openmc.Cell(fill=fuel, region=hex_region)
|
||||
model.geometry = openmc.Geometry([cell])
|
||||
|
||||
# Define settings
|
||||
model.settings.particles = 1000
|
||||
model.settings.batches = 5
|
||||
model.settings.inactive = 0
|
||||
return model
|
||||
|
||||
|
||||
def test_periodic_hex(hex_model):
|
||||
harness = PyAPITestHarness('statepoint.5.h5', hex_model)
|
||||
harness.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue