Sphere-in-Cube Fission Detector

Problem Description

A three-dimensional time-dependent problem with a homogeneous fissile sphere embedded inside a scattering cube. A cell-based tally records the fission rate inside the sphere, demonstrating MC/DC’s cell tally functionality.

Geometry and Materials

The computational domain is a cube: \(x,y,z \in [0,4]\) cm, with vacuum boundary conditions.

A sphere of radius 1.5 cm is centred at \((2,2,2)\) cm.

Cross-section data (mono-energetic, cm-1)

Region

\(\Sigma_s\)

\(\Sigma_f\)

\(\nu\)

Cube (outside sphere)

1.0

Sphere (fissile)

1.0

1.2

Physical Assumptions

  • Mono-energetic (one-speed) neutron transport.

  • Isotropic scattering (cube) and isotropic fission (sphere).

  • Time-dependent transport with a uniform isotropic source, \(t \in [0,50]\) s.

  • Implicit capture variance-reduction technique.

Numerical Setup

Tally type

Cell tally on the spherical region

Tally score

Fission rate

Source particles

\(10^{3}\) (demonstration)

Batches

2

Quantities of Interest

  • Volume-integrated fission rate inside the sphere.

  • Statistical uncertainty (standard deviation) of the cell tally.

Reference Solution

The problem can be verified analytically for simple cross-section combinations using first-flight collision probabilities.

Step-by-Step Walkthrough

1. Import and Materials (lines 1–12)

 1import numpy as np
 2import mcdc
 3
 4# ======================================================================================
 5# Set model
 6# ======================================================================================
 7# Homogeneous pure-fission sphere inside a pure-scattering cube
 8
 9# Set materials
10pure_f = mcdc.MaterialMG(fission=np.array([1.0]), nu_p=np.array([1.2]))
11pure_s = mcdc.MaterialMG(scatter=np.array([[1.0]]))
12

Two mono-energetic materials: a purely fissile material (pure_f, \(\Sigma_f = 1.0\), \(\nu = 1.2\)) for the sphere, and a purely scattering material (pure_s, \(\Sigma_s = 1.0\)) for the cube.

2. Surfaces and CSG Regions (lines 14–26)

14sx1 = mcdc.Surface.PlaneX(x=0.0, boundary_condition="vacuum")
15sx2 = mcdc.Surface.PlaneX(x=4.0, boundary_condition="vacuum")
16sy1 = mcdc.Surface.PlaneY(y=0.0, boundary_condition="vacuum")
17sy2 = mcdc.Surface.PlaneY(y=4.0, boundary_condition="vacuum")
18sz1 = mcdc.Surface.PlaneZ(z=0.0, boundary_condition="vacuum")
19sz2 = mcdc.Surface.PlaneZ(z=4.0, boundary_condition="vacuum")
20sphere = mcdc.Surface.Sphere(center=[2.0, 2.0, 2.0], radius=1.5)
21inside_sphere = -sphere
22inside_box = +sx1 & -sx2 & +sy1 & -sy2 & +sz1 & -sz2
23
24# Set cells
25mcdc.Cell(name="Box cover", region=inside_box & ~inside_sphere, fill=pure_s)
26sphere_cell = mcdc.Cell(name="The sphere", region=inside_sphere, fill=pure_f)

Six planes define the cube, and a Sphere surface defines the detector region. The ~ (complement) operator carves out the sphere from the cube.

3. Source (lines 32–39)

32mcdc.Source(
33    x=[0.0, 4.0],
34    y=[0.0, 4.0],
35    z=[0.0, 4.0],
36    isotropic=True,
37    energy_group=0,
38    time=[0.0, 50.0],
39)

A uniform isotropic source fills the cube over \(t \in [0,50]\) s.

4. Cell Tally, Settings, and Run (lines 45–55)

45# Tallies
46mcdc.Tally(name="Spherical fission detector", cell=sphere_cell, scores=["fission"])
47
48# Settings
49mcdc.settings.N_particle = 1000
50mcdc.settings.N_batch = 2
51
52# Techniques
53mcdc.simulation.implicit_capture()
54
55# Run

This example uses cell-filtered Tally — it tallies fission events inside a specific cell (the sphere) rather than on a spatial mesh. Implicit capture is enabled to keep particles alive longer.

What to try:

  • Replace the cell filter with a mesh filter to visualise the 3-D flux.

  • Change the sphere radius or \(\nu\) to see how fission rate changes.

  • Add a time grid to the cell tally for time-resolved data.

Full Input

Click here to view the input file: examples/sphere_in_cube/input.py.

The complete input used for this example is embedded below:

 1import numpy as np
 2import mcdc
 3
 4# ======================================================================================
 5# Set model
 6# ======================================================================================
 7# Homogeneous pure-fission sphere inside a pure-scattering cube
 8
 9# Set materials
10pure_f = mcdc.MaterialMG(fission=np.array([1.0]), nu_p=np.array([1.2]))
11pure_s = mcdc.MaterialMG(scatter=np.array([[1.0]]))
12
13# Set surfaces
14sx1 = mcdc.Surface.PlaneX(x=0.0, boundary_condition="vacuum")
15sx2 = mcdc.Surface.PlaneX(x=4.0, boundary_condition="vacuum")
16sy1 = mcdc.Surface.PlaneY(y=0.0, boundary_condition="vacuum")
17sy2 = mcdc.Surface.PlaneY(y=4.0, boundary_condition="vacuum")
18sz1 = mcdc.Surface.PlaneZ(z=0.0, boundary_condition="vacuum")
19sz2 = mcdc.Surface.PlaneZ(z=4.0, boundary_condition="vacuum")
20sphere = mcdc.Surface.Sphere(center=[2.0, 2.0, 2.0], radius=1.5)
21inside_sphere = -sphere
22inside_box = +sx1 & -sx2 & +sy1 & -sy2 & +sz1 & -sz2
23
24# Set cells
25mcdc.Cell(name="Box cover", region=inside_box & ~inside_sphere, fill=pure_s)
26sphere_cell = mcdc.Cell(name="The sphere", region=inside_sphere, fill=pure_f)
27
28# ======================================================================================
29# Set source
30# ======================================================================================
31
32mcdc.Source(
33    x=[0.0, 4.0],
34    y=[0.0, 4.0],
35    z=[0.0, 4.0],
36    isotropic=True,
37    energy_group=0,
38    time=[0.0, 50.0],
39)
40
41# ======================================================================================
42# Set tallies, settings, techniques, and run MC/DC
43# ======================================================================================
44
45# Tallies
46mcdc.Tally(name="Spherical fission detector", cell=sphere_cell, scores=["fission"])
47
48# Settings
49mcdc.settings.N_particle = 1000
50mcdc.settings.N_batch = 2
51
52# Techniques
53mcdc.simulation.implicit_capture()
54
55# Run
56mcdc.run()

How to Run

From the repository root run:

python examples/sphere_in_cube/input.py

Expected Output

Volume-integrated fission rate time series saved by the tally and a small printed summary from the example’s process-output.py script.