mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Adding a test for setting cell temperatures under a specific higher level cell instance in the cpp driver test.
This commit is contained in:
parent
b9851b4c36
commit
0bed3f53b2
4 changed files with 22 additions and 7 deletions
|
|
@ -81,11 +81,15 @@ def model():
|
|||
|
||||
pincell_univ = openmc.Universe(cells=[fuel, cladding, moderator])
|
||||
|
||||
# insert an additional cell to add another level to the geometry
|
||||
extra_cell = openmc.Cell(fill=pincell_univ)
|
||||
extra_univ = openmc.Universe(cells=[extra_cell])
|
||||
|
||||
# lattice
|
||||
lattice = openmc.RectLattice()
|
||||
lattice.pitch = (4.0, 4.0)
|
||||
lattice.lower_left = (-4.0, -4.0)
|
||||
lattice.universes = [[pincell_univ, pincell_univ], [pincell_univ, pincell_univ]]
|
||||
lattice.universes = [[extra_univ, extra_univ], [extra_univ, extra_univ]]
|
||||
lattice_region = openmc.model.rectangular_prism(8.0,
|
||||
8.0,
|
||||
boundary_type='reflective')
|
||||
|
|
@ -130,7 +134,8 @@ class ExternalDriverTestHarness(PyAPITestHarness):
|
|||
for cell in cells.values():
|
||||
if isinstance(cell.fill, openmc.Material):
|
||||
assert len(cell.temperature) == 4
|
||||
assert_allclose(cell.temperature, 300.0)
|
||||
assert_allclose(cell.temperature[:3], 300.0)
|
||||
assert_allclose(cell.temperature[-1:], 400.0)
|
||||
|
||||
|
||||
def test_cpp_driver(cpp_driver, model):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue