Skip to content

Commit 69ec752

Browse files
committed
add a test with a small cylinder
1 parent 9fc69e9 commit 69ec752

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

tests/unit_tests/test_geometry.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,3 +430,32 @@ def test_sphere_overlap(run_in_tmpdir):
430430
model.settings.run_mode = "fixed source"
431431
model.settings.source = source
432432
model.run(geometry_debug=True)
433+
434+
435+
def test_small_cylinder_overlap(run_in_tmpdir):
436+
openmc.reset_auto_ids()
437+
model = openmc.model.Model()
438+
cyl = openmc.ZCylinder(x0=500.0, y0=0.0, r=0.25)
439+
xmin = openmc.XPlane(499.5, boundary_type="reflective")
440+
xmax = openmc.XPlane(500.5, boundary_type="reflective")
441+
ymin = openmc.YPlane(-0.5, boundary_type="reflective")
442+
ymax = openmc.YPlane(0.5, boundary_type="reflective")
443+
zmin = openmc.ZPlane(-10.0, boundary_type="reflective")
444+
zmax = openmc.ZPlane(10.0, boundary_type="reflective")
445+
446+
mat = openmc.Material()
447+
mat.add_nuclide('H1', 0.1)
448+
449+
cell1 = openmc.Cell(region=-cyl & +zmin & -zmax, fill=mat)
450+
cell2 = openmc.Cell(region=+xmin & -xmax & +ymin & -ymax & +zmin & -zmax & +cyl, fill=mat)
451+
452+
model.geometry = openmc.Geometry([cell1, cell2])
453+
source = openmc.Source()
454+
source.angle = openmc.stats.Isotropic()
455+
source.space = openmc.stats.Point((500.0, 0.0, 0.0))
456+
model.settings = openmc.Settings()
457+
model.settings.batches = 100
458+
model.settings.particles = 80000
459+
model.settings.run_mode = "fixed source"
460+
model.settings.source = source
461+
model.run(geometry_debug=True)

0 commit comments

Comments
 (0)