Kobayashi Dog-Leg Void Benchmark#
Problem Description#
A mono-energetic, three-dimensional shielding benchmark featuring a dog-leg vacuum channel embedded in a purely scattering/absorbing shield. The problem evaluates the ability of a Monte Carlo code to transport neutrons through deep-penetration streaming paths.
It is based on the NEA steady-state fixed-source benchmark problem suite by Kobayashi et al. [Kobayashi2001].
Geometry and Materials#
The computational domain spans \(x \in [0,60]\), \(y \in [0,100]\), \(z \in [0,60]\) cm. Boundary conditions are reflective on the three symmetry planes (\(x=0\), \(y=0\), \(z=0\)) and vacuum elsewhere.
Three regions are defined:
Source region — \(x \in [0,10]\), \(y \in [0,10]\), \(z \in [0,10]\) cm.
Dog-leg void channel — an L-shaped duct connecting the source corner to the far side of the domain.
Shield — the remaining volume.
Region |
\(\Sigma_c\) |
\(\Sigma_s\) |
Shield |
0.05 |
0.05 |
Void channel |
\(5\times10^{-5}\) |
\(5\times10^{-5}\) |
Physical Assumptions#
Mono-energetic (one-speed) neutron transport.
Isotropic scattering.
Steady-state (time-independent) fixed-source problem.
Implicit capture variance-reduction technique.
Numerical Setup#
Spatial mesh (tally) |
\(60 \times 100 \times 60\) uniform cells (1 cm spacing) |
Tally score |
Scalar flux |
Source particles |
\(10^{3}\) (demonstration; increase for production runs) |
Batches |
2 |
Quantities of Interest#
Three-dimensional scalar flux distribution \(\phi(x,y,z)\).
Flux attenuation along the streaming channel and through the shield.
Reference Solution#
Reference solutions are tabulated in [Kobayashi2001] for several axial slices. Post-processing in MC/DC generates \((x,y)\) flux maps at selected \(z\)-planes for direct comparison.
References#
Step-by-Step Walkthrough#
This section walks through the input file block by block.
1. Import and Materials (lines 1–13)
1import numpy as np
2import mcdc
3
4simulation = mcdc.Simulation("Kobayashi dog-leg benchmark")
5
6# ======================================================================================
7# Set model
8# ======================================================================================
9# Based on Kobayashi dog-leg benchmark problem
10# (PNE 2001, https://doi.org/10.1016/S0149-1970(01)00007-5)
11
12# Set materials
13m = mcdc.Material.multigroup(capture=np.array([0.05]), scatter=np.array([[0.05]]))
Two mono-energetic multigroup materials are created:
m for the shield (\(\Sigma_c = \Sigma_s = 0.05\)) and
m_void for the dog-leg channel (\(10^{-4}\) total).
2. Surfaces (lines 15–30)
15
16# Set surfaces
17sx1 = mcdc.Surface.PlaneX(x=0.0, boundary_condition="reflective")
18sx2 = mcdc.Surface.PlaneX(x=10.0)
19sx3 = mcdc.Surface.PlaneX(x=30.0)
20sx4 = mcdc.Surface.PlaneX(x=40.0)
21sx5 = mcdc.Surface.PlaneX(x=60.0, boundary_condition="vacuum")
22sy1 = mcdc.Surface.PlaneY(y=0.0, boundary_condition="reflective")
23sy2 = mcdc.Surface.PlaneY(y=10.0)
24sy3 = mcdc.Surface.PlaneY(y=50.0)
25sy4 = mcdc.Surface.PlaneY(y=60.0)
26sy5 = mcdc.Surface.PlaneY(y=100.0, boundary_condition="vacuum")
27sz1 = mcdc.Surface.PlaneZ(z=0.0, boundary_condition="reflective")
28sz2 = mcdc.Surface.PlaneZ(z=10.0)
29sz3 = mcdc.Surface.PlaneZ(z=30.0)
30sz4 = mcdc.Surface.PlaneZ(z=40.0)
Fifteen planar surfaces define the 3-D bounding box and the internal
partitions. Reflective conditions on sx1, sy1, sz1 exploit
the quarter-symmetry; vacuum on the outer faces allows leakage.
3. Cells — CSG Region Definitions (lines 32–44)
32
33# Set cells
34# Source
35source_cell = mcdc.Cell(region=+sx1 & -sx2 & +sy1 & -sy2 & +sz1 & -sz2, fill=m)
36# Voids
37channel_1 = +sx1 & -sx2 & +sy2 & -sy3 & +sz1 & -sz2
38channel_2 = +sx1 & -sx3 & +sy3 & -sy4 & +sz1 & -sz2
39channel_3 = +sx3 & -sx4 & +sy3 & -sy4 & +sz1 & -sz3
40channel_4 = +sx3 & -sx4 & +sy3 & -sy5 & +sz3 & -sz4
41void_channel = channel_1 | channel_2 | channel_3 | channel_4
42void_cell = mcdc.Cell(region=void_channel, fill=m_void)
43# Shield
44box = +sx1 & -sx5 & +sy1 & -sy5 & +sz1 & -sz5
Three cells cover the domain:
The source cell (a small corner cube) filled with shield material.
The void channel — four rectangular segments combined with the
|(union) operator to form the L-shaped duct.The shield — the full box minus the void channel, using the
~(complement) operator.
4. Source (lines 50–57)
50# ======================================================================================
51source = mcdc.Source(
52 x=[0.0, 10.0],
53 y=[0.0, 10.0],
54 z=[0.0, 10.0],
55 isotropic=True,
56 energy=0,
57)
An isotropic, uniformly distributed source fills the \(10 \times 10 \times 10\) cm corner cube.
5. Tallies, Settings, Techniques, and Run (lines 63–74)
63
64# Tallies
65mesh = mcdc.MeshUniform(x=(0.0, 1.0, 60), y=(0.0, 1.0, 100), z=(0.0, 1.0, 60))
66tally = mcdc.Tally(mesh=mesh, scores=["flux"])
67simulation.set_tallies([tally])
68
69# Settings
70simulation.settings.N_particle = 1000
71simulation.settings.N_batch = 2
72
73# Techniques
74simulation.technique.implicit_capture()
A uniform \(60 \times 100 \times 60\) mesh tally records scalar flux.
1 000 source particles in 2 batches (increase for production).
Implicit capture prevents particles from being absorbed prematurely.
simulation.run()launches the simulation.
What to try:
Increase
N_particleto \(10^5\) or more for smoother flux maps.Change void-channel cross sections to see how attenuation changes.
Add a time grid to the tally for a transient variant (see the TD example).
Full Input#
Click here to view the input file: examples/kobayashi/input.py.
The complete input used for this example is embedded below:
1import numpy as np
2import mcdc
3
4simulation = mcdc.Simulation("Kobayashi dog-leg benchmark")
5
6# ======================================================================================
7# Set model
8# ======================================================================================
9# Based on Kobayashi dog-leg benchmark problem
10# (PNE 2001, https://doi.org/10.1016/S0149-1970(01)00007-5)
11
12# Set materials
13m = mcdc.Material.multigroup(capture=np.array([0.05]), scatter=np.array([[0.05]]))
14m_void = mcdc.Material.multigroup(capture=np.array([5e-5]), scatter=np.array([[5e-5]]))
15
16# Set surfaces
17sx1 = mcdc.Surface.PlaneX(x=0.0, boundary_condition="reflective")
18sx2 = mcdc.Surface.PlaneX(x=10.0)
19sx3 = mcdc.Surface.PlaneX(x=30.0)
20sx4 = mcdc.Surface.PlaneX(x=40.0)
21sx5 = mcdc.Surface.PlaneX(x=60.0, boundary_condition="vacuum")
22sy1 = mcdc.Surface.PlaneY(y=0.0, boundary_condition="reflective")
23sy2 = mcdc.Surface.PlaneY(y=10.0)
24sy3 = mcdc.Surface.PlaneY(y=50.0)
25sy4 = mcdc.Surface.PlaneY(y=60.0)
26sy5 = mcdc.Surface.PlaneY(y=100.0, boundary_condition="vacuum")
27sz1 = mcdc.Surface.PlaneZ(z=0.0, boundary_condition="reflective")
28sz2 = mcdc.Surface.PlaneZ(z=10.0)
29sz3 = mcdc.Surface.PlaneZ(z=30.0)
30sz4 = mcdc.Surface.PlaneZ(z=40.0)
31sz5 = mcdc.Surface.PlaneZ(z=60.0, boundary_condition="vacuum")
32
33# Set cells
34# Source
35source_cell = mcdc.Cell(region=+sx1 & -sx2 & +sy1 & -sy2 & +sz1 & -sz2, fill=m)
36# Voids
37channel_1 = +sx1 & -sx2 & +sy2 & -sy3 & +sz1 & -sz2
38channel_2 = +sx1 & -sx3 & +sy3 & -sy4 & +sz1 & -sz2
39channel_3 = +sx3 & -sx4 & +sy3 & -sy4 & +sz1 & -sz3
40channel_4 = +sx3 & -sx4 & +sy3 & -sy5 & +sz3 & -sz4
41void_channel = channel_1 | channel_2 | channel_3 | channel_4
42void_cell = mcdc.Cell(region=void_channel, fill=m_void)
43# Shield
44box = +sx1 & -sx5 & +sy1 & -sy5 & +sz1 & -sz5
45shield_cell = mcdc.Cell(region=box & ~void_channel, fill=m)
46simulation.set_model([source_cell, void_cell, shield_cell])
47
48# ======================================================================================
49# Set source
50# ======================================================================================
51source = mcdc.Source(
52 x=[0.0, 10.0],
53 y=[0.0, 10.0],
54 z=[0.0, 10.0],
55 isotropic=True,
56 energy=0,
57)
58simulation.set_sources([source])
59
60# ======================================================================================
61# Set tallies, settings, techniques, and run MC/DC
62# ======================================================================================
63
64# Tallies
65mesh = mcdc.MeshUniform(x=(0.0, 1.0, 60), y=(0.0, 1.0, 100), z=(0.0, 1.0, 60))
66tally = mcdc.Tally(mesh=mesh, scores=["flux"])
67simulation.set_tallies([tally])
68
69# Settings
70simulation.settings.N_particle = 1000
71simulation.settings.N_batch = 2
72
73# Techniques
74simulation.technique.implicit_capture()
75
76# Run
77simulation.run()
How to Run#
From inside examples/kobayashi run:
python input.py
Expected Output#
A mesh tally HDF5 file with 3-D flux data and example plotting using
the companion process-output.py in the same directory.