betaFeedback

WorksPhysics and Astronomy

Brightify: A tool for calculating directionally-resolved brightness in neutron sources

Abstract

Brightness is a critical metric for optimizing the design of neutron sources and beamlines, yet there is no direct way to calculate brightness within most Monte Carlo packages used for neutron source simulation. In this paper, we present Brightify, an open-source Python-based tool designed to calculate brightness from Monte Carlo Particle List (MCPL) files, which can be extracted from several Monte Carlo simulation packages. Brightify provides an efficient computational approach to calculate brightness for any particle type and energy spectrum recorded in the MCPL file. It enables localized, directionally-resolved brightness evaluations by scanning across both spatial and angular domains, facilitating the identification of positions and directions corresponding to maximum brightness. This functionality is particularly valuable for identifying brightness hotspots and helping fine-tune the design of neutron sources for optimal performance. We validate Brightify against standard methods, such as surface current tally and point estimator tally, and demonstrate its accuracy and adaptability, particularly in high-resolution analyses. By overcoming the limitations of traditional methods, Brightify streamlines neutron source re-optimization, reduces computational burden, and accelerates source development workflows. The full code is available on the Brightify GitHub repository.

Introduction

In most neutron scattering experiments, a central design goal is to maximize the neutron flux on the sample. Achieving this involves both the efficient generation of neutrons at the target and their subsequent transport through neutron guides to the sample.

Monte Carlo simulation codes such as PHITS [2], MCNP [3], OpenMC [4], Geant4 [5], and Fluka [6] provide powerful capabilities to model neutron production and transport. These tools enable the evaluation of various configurations taking into account different materials, geometries, and physical models. However, such simulations can be computationally demanding, especially when including detailed engineering models of complex source and instrument systems, which often makes full system simulations prohibitively time-consuming, even on high performance computing platforms [7].

Simulating the complete neutron path, from the proton beam to the neutron reaching the sample, in a single step remains impractical due to the extreme inefficiency of the process: only about one neutron out of every half a million generated actually reaches the sample [8]. This inefficiency becomes especially problematic during iterative design processes, where numerous simulations are required. As a result, it is often more effective to decouple and optimize individual components of the system, such as the neutron source, transport to the guides, and transport to the sample.

According to Liouville’s Theorem, the phase space density of a system remains constant along trajectories in a conservative force field [9]. In neutron transport, this principle implies that the brightness - which is directly related to the phase space density — cannot increase as neutrons propagate through conservative systems. Between the neutron moderator and the sample, neutrons typically travel through free space without interactions or through neutron guides, where interactions are elastic and conserve energy. Consequently, the brightness at the sample cannot surpass that at the moderator surface and is normally lower due to the beam losses. This constraint means that the neutron flux deliverable to a confined phase space volume at the sample is fundamentally limited, as dictated by Liouville’s Theorem.

In the last 30 years, substantial advances have been made in both the fabrication and design of neutron guides. These developments have been driven in part by the use of Monte Carlo ray-tracing tools such as McStas [10, 11], which have facilitated more precise and efficient guide system modeling. Together, these improvements have made it possible to transport neutron phase space density with minimal loss, approaching the theoretical efficiency limit defined by Liouville’s theorem. As a result, attention has been turned towards optimizing the phase space density at the moderator exit. This shift effectively decouples the source optimization challenge into two separate domains: enhancing the source brightness, and improving the guide system that transmits neutrons from the source to the sample.

Current applicable methods for calculating brightness in Monte Carlo simulations — such as surface current tallies and point estimator tallies [2, 12] — depend on the user to explicitely define both the location, and the direction in case of calculating angular neutron flux. This direction is typically fixed showing the direction toward the point estimator tally location or the normal direction to the surface, in case of surface current tally. This means that these techniques require a prior prediction of the scoring location and direction — essentially a guess about where in phase space the brightness is likely to peak.

Whether or not this guess is valid depends critically on two factors: the underlying neutron distribution and the definition of the phase space volume over which brightness is evaluated. For sources with uniform or symmetrical neutron distributions, this guess is often trivial, and these methods perform adequately. However, when the source is non-uniform, predicting the region and direction of maximum brightness becomes much more challenging. Furthermore, in such non-uniform distributions, the size of the phase space volume significantly influences the calculated brightness.

In particular, point tallies can only calculate brightness accurately when placed far from the source, such that the entire moderator surface lies within the corresponding phase space volume and by using artificial collimators to define the required angular divergence [13, 14]. This is typically applicable in spallation sources and high-power research reactors, where neutron guides must be positioned several meters away from the moderator due to intense radiation levels.

In contrast, in compact low-energy neutron sources, the guides can be placed much closer to the moderator due to lower radiation levels [15]. As a result, the required phase space volume may cover only a portion of the moderator surface. In these situations, surface current tallies can be more practical for brightness calculations [16, 17]. However, because they calculate the neutron flux only in a single fixed direction [2, 12], they cannot capture brightness in other angular directions. This is crucial in cases where the neutron emission is non-uniform and the peak brightness occurs in a direction different from the one assumed by the tally.

Therefore, neither surface current tallies nor point tallies are sufficient when a comprehensive scan of brightness across position and direction is required. The need for a more flexible and reliable tool was the motivation to create a tool for brightness calculation and it is the subject of this paper.

Brightify is a computational tool designed to scan a user-defined surface and identify the position and evaluate brightness at each position using the mean direction as a representative metric. It is particularly useful in cases where the phase space region of interest is smaller than the full extent of the moderator area. Developed in Python, Brightify operates independently of any specific Monte Carlo transport code and uses the Monte Carlo Particle List (MCPL) format [18] as its input. MCPL is a standardized binary format that captures detailed particle data, including type, position, direction, energy, polarization, and statistical weight.1 MCPL files are compatible with a variety of Monte Carlo simulation codes, and are designed to enable data sharing across platforms.

Because it is based on MCPL, Brightify can calculate brightness maps for any particle type and energy range contained in the input data. In the context of this paper, we focus specifically on neutrons. The tool outputs a directionally-resolved brightness map, highlighting how brightness varies with both position and direction. In another words, where to locate and how to align a neutron guide along representative directions to achieve higher brightness.

The structure of the paper is as follows: Section 2 provides the theoretical background, including the definition of brightness, an overview of Liouville’s theorem, and the relationship between the two. Section 3 reviews existing methods for brightness calculation and their limitations. In Section 4, the methodology and implementation of the Brightify tool are described. Section 5 presents a series of verification and validation examples demonstrating the application of Brightify and analyzing its performance. Finally, Section 6 offers concluding remarks and potential future upgrades.

Theory: Brightness and Liouville’s Theorem

The state of a neutrons can be described by an 7-dimensional distribution function n(r⃗,Ω^,E,t)n(\vec{r}, \hat{\Omega}, E, t), where r⃗\vec{r} is the position vector, Ω^\hat{\Omega} is the direction of motion, EE is the energy, and tt is time.

The number of neutrons per unit volume dVdV, per unit solid angle dΩd\Omega, and per unit energy dEdE, is commonly referred to as the neutron angular density. The brightness is then defined as the product of the particle speed vv and the angular density. This quantity is also known as the angular flux, which is more commonly used in neutron transport theory to describe the directional distribution of neutrons. In mathematical terms:

B(r⃗,Ω^,E,t)=vn(r⃗,Ω^,E,t)dV dΩ dE=n(r⃗,Ω^,E,t)dE dt dΩ dA(1)B(\vec{r}, \hat{\Omega}, E, t) = v \frac{n(\vec{r}, \hat{\Omega}, E, t)}{dV\,d\Omega\,dE} = \frac{n(\vec{r}, \hat{\Omega}, E, t)}{dE\,dt\,d\Omega\,dA} \tag*{(1)}

where the infinitesimal volume is expressed as dV=dA dz=dA v dtdV = dA\,dz = dA\,v\,dt, assuming motion primarily along the z-direction. Eq. (1) defines brightness as an instantaneous quantity.

Additionally, the phase space density ρ(r⃗,p⃗,t)\rho(\vec{r}, \vec{p}, t) is defined as the number of particles per unit phase space volume dr⃗ dp⃗d\vec{r}\,d\vec{p}. For a non-relativistic particle2^{2}, one can relate it to the angular density as:

ρ(r⃗,p⃗,t)=n(r⃗,Ω^,E,t)dr⃗ dp⃗=vp2n(r⃗,Ω^,E,t)dV dΩ dE(2)\rho(\vec{r}, \vec{p}, t) = \frac{n(\vec{r}, \hat{\Omega}, E, t)}{d\vec{r}\,d\vec{p}} = \frac{v}{p^{2}} \frac{n(\vec{r}, \hat{\Omega}, E, t)}{dV\,d\Omega\,dE} \tag*{(2)}

The factor p2p^{2} in Eq. (2) arises from the Jacobian of the transformation from Cartesian to spherical coordinates in momentum space, and the energy differential dEdE follows from the kinetic energy relation E=p2/2mE = p^{2}/2m.

According to Liouville’s theorem, in the absence of dissipative forces, the phase space density remains constant along particle trajectories. Therefore, under ideal conservative transport conditions, the brightness is conserved along trajectories, provided the momentum remains unchanged.

In a steady-state distribution, brightness becomes time-independent and is typically expressed per unit energy, area and solid angle. One may also define an energy-integrated brightness over a four-dimensional phase space consisting of the transverse spatial and angular coordinates. This four-dimensional space is a projection of the full phase space onto the transverse plane. In this context, the Eq. (1) can be rewritten as the following:

BE2−E1(r⃗,Ω^)=1ΔΩ ΔA∫0∞dt∫E1E2dE∫ΔΩ∫ΔAn(r⃗,Ω^,E,t)(3)B_{E_2-E_1}(\vec{r},\hat{\Omega}) = \frac{1}{\Delta\Omega\,\Delta A} \int_{0}^{\infty} dt \int_{E_1}^{E_2} dE \int_{\Delta\Omega} \int_{\Delta A} n(\vec{r},\hat{\Omega},E,t) \tag*{(3)}

If the neutron source distribution is uniform in both space and direction, the brightness remains constant regardless of the sampling region. However, if n(r⃗,Ω^,E,t)n(\vec{r},\hat{\Omega},E,t) varies spatially or directionally, then the computed brightness depends sensitively on the specific portion of phase space being sampled. In non-uniform fields, changing ΔA\Delta A or ΔΩ\Delta\Omega can significantly alter the measured average of nn.

In practice, modeling neutron sources via Monte Carlo simulations yields a discrete approximation of the neutron distribution. The accuracy of this representation depends on the number of sampled particles. Increasing this number reduces statistical error but significantly raises computational cost.

Regardless of source uniformity, brightness in Monte Carlo simulations must be computed over a finite volume ΔA⋅ΔΩ\Delta A \cdot\Delta\Omega. The choice of this volume often depends on the instrument’s design and the beam transport system’s angular acceptance.

It is possible to analytically estimate the required viewable area on the moderator based on the instrument requirements, type of neutron transport system, the distance between moderator and the guide, etc [19]. One of the critical factors influencing ΔA\Delta A is the distance between the neutron source and the entrance of the guide system [20]. In high-power spallation sources and research reactors, this distance is typically large to reduce radiation damage, necessitating a larger ΔA\Delta A. In contrast, compact accelerator-driven neutron sources (CANS) allow guide systems to be placed much closer to the moderator, enabling smaller sampling areas and improved spatial resolution.

For non-uniform sources, both ΔA\Delta A and angular sampling direction ΔΩ\Delta\Omega are crucial. A large ΔA\Delta A may include regions with minimal emission, reducing the effective brightness. Similarly, if ΔΩ\Delta\Omega is not aligned with the peak emission direction, the resulting brightness may significantly underestimate the source’s peak brightness. Normally, ΔΩ\Delta\Omega is constrained by the angular acceptance of the neutron transport system and is typically much narrower than the full angular distribution of the source. Therefore, to capture the peak brightness, it is essential that the calculation direction aligns with the peak emission direction.

Accurate brightness evaluation, particularly for non-uniform sources, requires thoughtful selection of the sampling volume and careful alignment with the dominant emission direction.

Methods for brightness calculation

In this work, we focus on the calculation of neutron brightness using Monte Carlo particle transport simulations. Among the available Monte Carlo codes, MCNP [3] and PHITS [2] are two of the most widely used tools in the field. Accordingly, our review on the methods centers on the two built-in brightness estimation methods currently supported by these packages, as follows:

  1. Surface current tally: The surface current quantifies the number of particles, by their Monte Carlo weight, passing through surfaces that define cell boundaries, distributed across specified bins. The particle count at time tt, within a volume element of drd r, with directions within dΩd\Omega, and energies within dEdE, is represented as n(r⃗,Ω^,E,t) dr dΩ dEn(\vec{r}, \hat{\Omega}, E, t)\,d r\,d\Omega\,dE. Consider a volume element drd r containing a surface element dAdA (with surface normal n^\hat{n}) and extending along Ω^\hat{\Omega} for a distance νdt\nu dt, as illustrated in Figure 1. The differential volume element is then determined as in Eq. (4):

Diagram for description of the surface current tally from MCNP 6.3.0 manual

Figure 1. Diagram for description of the surface current tally from MCNP 6.3.0 manual [12].

dr=ν dt ∣Ω^⋅n^∣ νn(r⃗,Ω^,E,t) dΩ dE dt dA(4)d r = \nu\,dt\,\left|\hat{\Omega}\cdot\hat{n}\right|\,\nu n(\vec{r},\hat{\Omega},E,t)\,d\Omega\,dE\,dt\,dA \tag*{(4)}

Consequently, Eq. (5) indicates the count of particles crossing surface AA within energy bin ii, time bin jj, and angle bin kk [12]:

∫EidE∫tjdt∫ΩkdΩ∫dA ∣Ω^⋅n^∣ νn(r⃗,Ω^,E,t)(5)\int_{E_i} dE \int_{t_j} dt \int_{\Omega_k} d\Omega\int dA\,\left|\hat{\Omega}\cdot\hat{n}\right|\,\nu n(\vec{r},\hat{\Omega},E,t) \tag*{(5)}

In MCNP and PHITS, this is typically computed using F1 and T-cross tallies. To derive brightness from such tallies, one must normalize the result by the surface area dAdA, and the solid angle dΩd\Omega.

A key limitation of this method is that the solid angle is always referenced with respect to the surface normal. As a result, when the direction of maximum brightness deviates from the normal, this approach can miss the true peak and underestimate brightness.

This method is typically applied when the moderator is fully enclosed by a reflector, with no beam extraction channels—a setup known as “unperturbed brightness” [16]. While it can also be used in perturbed configurations, where openings exist for neutron extraction [17], achieving accurate results in such cases typically demands significantly more computational effort. In these geometries, point estimator tallies are often preferred.

  1. Point estimator tally: This method provides a deterministic estimate of particle flux at a specific location in space, based on contributions from current event point. Eq. (6) shows what tally scores:

W⋅p(Ωp)exp⁡(−λ)L2(6)\frac{W \cdot p(\Omega_p)\exp(-\lambda)}{L^2} \tag*{(6)}

where WW signifies the particle weight, p(Ωp)p(\Omega_p) is the probability density for scattering in the direction Ωp\Omega_p towards the point detector (assuming azimuthal symmetry). λ\lambda represents the total mean free paths from the particle location to the detector, and LL is the distance from the source or collision event to the detector. Figure 2 illustrates the contribution to the point estimator tally.

Diagram for description of the point estimator tally from MCNP 6.3.0 manual

Figure 2. Diagram for description of the point estimator tally from MCNP 6.3.0 manual. The point ”r” can be from any place of the source [12].

This corresponds to F5 tally in MCNP and T-point in PHITS. This tally can be used only when openings are present in the source for neutron extraction, i.e. the perturbed brightness.

Based on its definition, point estimator tally records the contributions in 4π4\pi, therefore for brightness calculation, definition of artificial collimators are required to isolate the line of sight according to the required angular divergence [13, 15]. Therefore, point detectors are placed sufficiently far from the moderator to have enough space for collimator definition. The measured flux—once normalized by ΔA/L2\Delta A/L^2, with ΔA\Delta A being the viewed area (typically the moderator surface)—is interpreted as the brightness in a specific direction and location.

It is important to note that this method only records neutrons and photons, and because it is an estimator, its accuracy depends on the nuclear data libraries. Consequently, it becomes unreliable above the energy limits of these libraries (typically above 20 MeV or 150 MeV, depending on the dataset).

An advantage of the point estimator method is its computational efficiency, since it does not require tracking particles all the way to the tally location, in contrast to the surface current tally. However, it shares a key limitation with surface current tallies: if the point detector is not aligned with the location and direction of maximum brightness, it will fail to capture the peak.

In summary, the surface current and point estimator tallies are valuable tools for brightness estimation when the location and direction of peak emission are predictable. This typically applies to uniform and geometrically symmetric sources.

However, in the case of non-uniform and non-symmetric sources, especially where instrument requirements demand high spatial resolution—meaning short source-to-guide distance where ΔA\Delta A can be smaller than the moderator surface area—these conventional methods fall short. They lack the flexibility to scan the entire moderator surface across both spatial and angular dimensions to identify local brightness maxima.

This is where classical approaches reach their limit, and we need a more flexible tool to resolve local peaks and optimize instrument alignment—especially in complex source geometries where intuition alone is insufficient.

Methodology of Brightify

Brightify is an independent Python-based computational tool designed to flexibly search the space to find practical locations and representative directions for assessing brightness.

It operates on Monte Carlo Particle List (MCPL) files [18], a standardized binary format that records detailed particle state information (position, direction, energy, weight, etc.) and facilitates exchange between different Monte Carlo simulation packages. MCPL files can be generated via conversion from simulation outputs such as SSW files (MCNP) [12] or dump files (PHITS) [2].

In an ideal case, generating a complete brightness map would involve evaluating brightness for every individual neutron direction. However, this is computationally impractical, as MCPL files typically contain millions of neutron trajectories. As a result, a reference direction must be chosen for brightness calculations. In conventional tallies, this reference is typically the normal vector of the tally surface. Yet, relying on a single reference direction to represent such a large and diverse dataset often results in imprecise brightness estimates.

Brightify addresses this limitation by evaluating brightness across multiple representative directions rather than for each neutron individually or along just one axis. In essence, Brightify can be seen as a generalized version of the surface current tally that computes brightness for different directions.

The core idea is to divide the recording surface (flat or curved) into discrete position windows (ΔA\Delta A) and, within each, calculate brightness over a representative direction. Brightify proceeds as follows:

  • Filter neutrons within each position window (ΔA\Delta A) on the recording surface.

  • Determine the mean direction vector of the filtered neutrons, which is calculated by Eq. (7):

V‾=∑i=1nV→i⋅wi∑i=1nwi(7)\overline{V} = \frac{\sum_{i=1}^{n} \overrightarrow{V}_{i} \cdot w_{i}}{\sum_{i=1}^{n} w_{i}} \tag*{(7)}

in which wiw_i is the weight and V→i\overrightarrow{V}_i is the direction vector (VxV_x, VyV_y, VzV_z) of the ii-th neutron in the position window.

  • Filter neutrons within each position window that also fall within the specified angular divergence (ΔΩ\Delta\Omega) from the mean direction.

  • Compute brightness, in accordance with Eq. (3), by summing the weights of selected neutrons and normalizing by the phase space volume, as indicated by Eq. (8):

B=∑i=1nwiNp×ΔΩ×ΔA(8)B = \frac{\sum_{i=1}^{n} w_i}{N_p \times\Delta\Omega\times\Delta A} \tag*{(8)}

where NpN_p is the number of total source particles, ΔΩ\Delta\Omega is the solid angle, calculated by Eq. (9):

ΔΩ=∫02π∫0θsin⁡θ dθdφ(9)\Delta\Omega= \int_{0}^{2\pi}\int_{0}^{\theta}\sin\theta\,\mathrm{d}\theta\mathrm{d}\varphi \tag*{(9)}

where φ\varphi is the azimuthal angle and θ\theta is the direction window given by the user.

  • Estimate the relative error for each brightness value by Eq. (10):

r.err=σN(10)r.err = \frac{\sigma}{\sqrt{N}} \tag*{(10)}

in which NN is the total weight of the specified window and σ\sigma is the standard deviation and calculated as Eq. (11):

σ=∑i=1N(wiw‾)2−Nw‾2N−1(11)\sigma= \sqrt{\frac{\sum_{i=1}^{N}\left(\frac{w_i}{\overline{w}}\right)^2-N\overline{w}^2}{N-1}} \tag*{(11)}

where w‾\overline{w} is the mean weight of all the neutrons.

The output of Brightify will be a brightness map, showing the brightness for each position window and its corrresponding mean direction, represented by arrows. In this representation, the arrow length is proportional to sin⁡θ\sin\theta, while its orientation reflects the azimuthal angle φ\varphi. Arrows with near-zero length indicate that the mean direction is nearly parallel to the beam direction (i.e., the zz-axis).

Input Parameters

In addition to the MCPL file, the user must specify six other input parameters:

  1. Type of the recording surface (flat/curved): the user should determine the type of the surface which the MCPL file is created on. This tool offers the capability to calculate brightness on both flat and curved (spherical) surfaces.

  1. Type of the particle: applicable to any particle recorded in the MCPL file (e.g., neutrons, protons).

  1. Energy range: selects particles in specified energy intervals.

  1. Number of scan points (only for the curved surfaces): defines coverage density and spatial resolution. A spiral or grid scan is used depending on the surface geometry [21, 22]. This parameter is not required for the flat surfaces, as the number of scan points is automatically calculated based on the position window size.

  1. Position window: the area of the mesh in the phase space called position window and it is in the units of cm2\mathrm{cm}^{2}.

  1. Direction window: the desirable divergence of the neutrons inside the phase space mesh is called direction window and is in the units of degrees.

Figure 3 shows the flowchart for the Brightify algorithm.

The flowchart for the Brightify algorithm

Figure 3. The flowchart for the Brightify algorithm.

Brightify is designed for efficient processing of large MCPL files using vectorized NumPy operations. While typical use cases (up to 10710^{7} particles) do not require parallelization, memory usage during MCPL file loading can become a limiting factor for very large datasets. In such cases, performance can be improved by applying data chunking strategies to reduce memory load.

The effectiveness of the brightness calculation in Brightify, like the other methods, is governed by two main factors:

  • Neutron distribution function: This is determined by the MCPL input file, i.e. the discrete presentation of the neutron distribution function. This input can affect the calculation in two aspects: first, if an appropriate surface is chosen for the MCPL file. Second, if sufficient statistics is used for the MCPL file, as inadequate statistics can result in imprecise brightness values.

  • phase space volume (ΔA⋅ΔΩ\Delta A \cdot\Delta\Omega), which is determined by the size of position window and direction window in Brightify context. The size of these two windows will limit the number of neutrons inside the phase space volume which directly affects the relative error. Too small phase space volume leads to a high statistical error and consequently unreliable results, as illustrated in Figure 4. On the other hand, if it is too large, the local brightness might average out. Therefore, special care must be taken when interpreting local peaks in brightness maps at high resolution. Balancing resolution and statistics, and validating

Maximum brightness as a function of phase space volume and the corresponding relative error

Figure 4. Maximum brightness as a function of phase space volume and the corresponding relative error, calculated by Brightify.

local maxima against relative error thresholds (typically below 5% [12]), helps prevent over-interpretation of noise.

To have a full coverage and avoid gaps in the brightness map, it is advisable to overlap neighboring position windows by setting scan point spacing smaller than the position window size. This ensures that all neutrons contribute to the analysis and that local maxima are not missed due to undersampling.

Verification and Validation

To validate the performance of Brightify against the conventional methods—surface current tally and point estimator tally—we consider three test cases, each representing a different type of neutron distribution function:

  • (a) A uniform neutron distribution in both position r⃗\vec{r} and direction Ω^\hat{\Omega}, using a flat isotropic source.

  • (b) A symmetric distribution, modeled using a flat centric Gaussian source.

  • (c) An asymmetric distribution, created by an off-center flat Gaussian source.

In all cases, the source emits 25 meV mono-energetic neutrons, and the simulations are performed in steady-state mode (i.e., integrated over time). Consequently, the calculated brightness in each case is influenced by the phase space volume, ΔA⋅ΔΩ\Delta A \cdot\Delta\Omega.

For each configuration, we classify the phase space volume based on whether the area ΔA\Delta A is smaller than or comparable to the moderator surface area. The performance of Brightify is then compared with that of the surface current and point estimator methods accordingly.

In each scenario, a flat surface is used for neutron recording. Figure 5 presents schematics of the three configurations, with the recording surfaces for Brightify and surface current tallies indicated by dashed pink color and the source with green. For all cases, the point detector tally is positioned 23 cm from the center of the recording surface, inside an artificial collimator corresponding to the defined angular acceptance.

Three test cases for validation of Brightify performance against conventional methods

Figure 5. Three test cases for validation of Brightify performance against conventional methods.

All Monte Carlo simulations were performed using PHITS. In case (a), a built-in surface source with dimensions of 2×2 cm22 \times2\ \mathrm{cm}^2, oriented normal to the zz axis, was used. For cases (b) and (c), a built-in Gaussian source with a full width at half maximum (FWHM) of 0.5 cm in xx and yy dimensions was used. The tally surface in all three cases had the same dimensions of 2×2 cm22 \times2\ \mathrm{cm}^2.

Table 1 summarizes the results for a phase space volume defined by a position window of ΔA=4 cm2\Delta A = 4\ \mathrm{cm}^2 (equal to the tally surface area) and a direction window of ΔΩ=0.006 sr\Delta\Omega= 0.006\ \mathrm{sr}, which corresponds to a cone with a 5∘5^\circ opening angle.

Test CaseBrightifySurface Current TallyPoint Estimator Tally
(a)1.9838e−2±0.00671.9838\mathrm{e}-2 \pm0.00671.9840e−2±0.00671.9840\mathrm{e}-2 \pm0.00671.9922e−21.9922\mathrm{e}-2
(b)2.0090e−2±0.00662.0090\mathrm{e}-2 \pm0.00662.0123e−2±0.00662.0123\mathrm{e}-2 \pm0.00661.9987e−21.9987\mathrm{e}-2
(c)1.1475e−2±0.00881.1475\mathrm{e}-2 \pm0.00881.0098e−2±0.00941.0098\mathrm{e}-2 \pm0.00949.9593e−39.9593\mathrm{e}-3

Table 1. Comparison of brightness values (in n/source/cm2/srn/\mathrm{source}/\mathrm{cm}^{2}/\mathrm{sr}) calculated using Brightify, surface current tally, and point estimator tally for the three test cases (ΔA=4 cm2\Delta A = 4\,\mathrm{cm}^{2} and ΔΩ=0.006 sr\Delta\Omega= 0.006\,\mathrm{sr}).

As observed, for a large ΔA\Delta A—corresponding to a low-resolution brightness map—all three methods yield consistent results within the error margins for both the uniform source (case a), where the neutron distribution is independent of position and direction, and the symmetric source (case b), where the surface normal aligns with the mean direction in Brightify due to symmetry.

However, the methods diverge in the asymmetric configuration (c), where the Gaussian source centroid is shifted downward and therefore tilting the peak direction by a few degrees relative to the tally surface normal. Both the surface-current and point-estimator tallies use a fixed 5∘5^{\circ} cone about that normal and thus systematically miss the tilted trajectories. Brightify, in contrast, computes the true mean direction of the neutron beam and recenters its 5∘5^{\circ} cone on that axis, recovering the otherwise-lost flux. This 14 % increase thus reflects only the geometric realignment of the acceptance cone, which vanishes whenever the beam and surface normal coincide.

In contrast, when instrument requirements demand a finer spatial resolution (i.e., smaller ΔA\Delta A compare to the moderator area), the point estimator tally becomes impractical or overly complex to implement, due to definition of artificial collimators. The surface current tally can still be applied by defining an X–Y mesh on the recording surface, however with the limitation of brightness calculation only with respect to the normal direction.

Figure 6 presents the brightness maps obtained using the surface current tally and Brightify, along with a cross-sectional comparison to highlight differences between the two approaches across all three test cases.

Comparison of brightness maps for three test cases

Figure 6. Comparison of brightness maps obtained using the surface current tally and Brightify for the three test cases: (top) case (a) — uniform source; (middle) case (b) — symmetric source; (bottom) case (c) — asymmetric source. In each panel, the brightness map from the surface current tally is shown on the left, the map from Brightify is in the center, and a horizontal cross-section along the axis of maximum brightness is presented on the right. For all cases, ΔA=1 cm2\Delta A = 1\ \mathrm{cm}^{2} corresponds to the size of position window, and ΔΩ=0.006 sr\Delta\Omega= 0.006\ \mathrm{sr} corresponds to the size of direction window.

The blue arrows in brightness map by Brightify show the direction for which the brightness is calculated within each position window. For the uniform source (case a) and the symmetric source (case b), Brightify and the surface current tally show good agreement within the error margins when capturing the maximum brightness. However, in the asymmetric source (case c), a clear increase in brightness of 10–15% is observed when the brightness is calculated relative to the local mean directions. A similar gain is also noticeable in case (b) at off-center positions.

The absolute brightness values reveal that, in case (a), the brightness remains unchanged between the large phase space volume (i.e., the larger area in Table 1) and the smaller area shown in the top panel of Figure 6, which is expected for a uniform source. In contrast, cases (b) and (c) exhibit a fourfold increase in brightness when evaluated within the smaller phase space area.

These gains are demonstrated using a simplified two-dimensional source with relatively uniform directional distribution and the gain factors can be different for realistic three-dimensional sources, depending on the relevant phase space volume and the characteristics of the neutron source distribution. In scenarios where the neutron directions vary significantly within a position window, the mean direction may not fully represent the direction of peak brightness, and additional angular analysis could be necessary. It is important to note that in most practical cases, such as spallation sources or compact neutron sources, the neutron distribution is asymmetric. As such, these setups more closely resemble case (c), where proper orientation is essential to achieve maximum brightness gain.

Conclusions

Monte Carlo simulations are an essential technique for the design and optimization of neutron sources, yet they are often slow and computationally expensive. This makes iterative design processes particularly challenging. According to Liouville’s theorem, brightness is conserved in conservative force fields along the particle trajectories, and serves as a key performance metric linking the source to the optics and a quantity to evaluate the performance of the source. However, calculating brightness directly within Monte Carlo codes over different positions and directions remains complex and limited.

In this paper, we introduced Brightify, an open-source Python tool designed to compute neutron brightness from MCPL files, which can be generated from various Monte Carlo packages. Brightify offers a flexible, directionally-aware approach to brightness evaluation by scanning over spatial and angular domains, allowing users to evaluate brightness along mean directions at each position window, providing a practical representative metric while leaving room for future refinement in cases with complex directional distributions.

Through validation against standard methods, surface current tally and point estimator tally, we demonstrated that Brightify produces consistent results for large phase space volumes while offering improved resolution and adaptability for finer analyses. In particular, Brightify overcomes the limitations of traditional methods, such as the directional constraints of surface current tallies and the impracticality of point tallies in close source-to-guide distance. Brightify is especially practical in compact accelerator-based neutron sources, where guides can be placed closer to the source.

By enabling localized and directionally-resolved brightness calculations, Brightify streamlines the evaluation and re-optimization of neutron sources. It offers researchers an accessible and extensible tool for post-processing Monte Carlo outputs.

Future versions of Brightify may include a dedicated module to improve robustness with low-statistics MCPL files, as well as support for parallel processing to better accommodate high-statistics simulations. An adaptive workflow may also be introduced to assist users in selecting an appropriate brightness map resolution. The full code is available on the Brightify GitHub repository [1].

Acknowledgments

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 754354 and No. 101034266.

References

  1. [1]M. Akhyani, L. Zanini, H. M. Rønnow, Brightify, a tool for calculating brightness in neutron sources. URL https://github.com/BrightnessTools/Brightify
  2. [2]K. Niita, T. Sato, H. Iwase, H. Nose, H. Nakashima, L. Silver, PHITS—a particle and heavy ion transport code system, Radiation Measurements 41 (9) (2006) 1080–1090. doi:10.1016/j.radmeas.2006.07.013. URL https://www.sciencedirect.com/science/article/pii/S13504487060001351DOI
  3. [3]R. A. Forster, T. N. K. Godfrey, MCNP - a general Monte Carlo code for neutron and photon transport, in: R. Alcouffe, R. Dautray, A. Forster, G. Ledanois, B. Mercier (Eds.), Monte-Carlo Methods and Applications in Neutronics, Photonics and Statistical Physics, Lecture Notes in Physics, Springer, Berlin, Heidelberg, 1985, pp. 33–55. doi:10.1007/BFb0049033.
  4. [4]P. K. Romano, B. Forget, The OpenMC Monte Carlo particle transport code, Annals of Nuclear Energy 51 (2013) 274–281. doi:10.1016/j.anucene.2012.06.040. URL https://www.sciencedirect.com/science/article/pii/S0306454912003283DOI
  5. [5]S. Agostinelli, others, GEANT4–a simulation toolkit, Nucl. Instrum. Meth. A 506 (2003) 250–303. doi:10.1016/S0168-9002(03)01368–8.DOI
  6. [6]G. Battistoni, T. Boehlen, F. Cerutti, P. W. Chin, L. S. Esposito, A. Fassò, A. Ferrari, A. Lechner, A. Empl, A. Mairani, A. Mereghetti, P. G. Ortega, J. Ranft, S. Roessler, P. R. Sala, V. Vlachoudis, G. Smirnov, Overview of the FLUKA code, Annals of Nuclear Energy 82 (2015) 10–18. doi:10.1016/j.anucene.2014.11.007. URL https://www.sciencedirect.com/science/article/pii/S0306454914005878DOI
  7. [7]I. Lux, Monte Carlo Particle Transport Methods, CRC Press, 2018, google-Books-ID: y0pADwAAQBAJ.
  8. [8]F. X. Gallmeier, Source Terms for Neutron Beamline Shielding and Activation Calculations, Tech. Rep. SNS-107030700-DA0002-R00, ORNL (Feb. 2005).
  9. [9]L. D. Landau, Course of Theoretical Physics, Vol. 5, Pergamon Press, 1958.
  10. [10]P. Willendrup, E. Farhi, E. Knudsen, U. Filges, K. Lefmann, McStas: Past, present and future, Journal of Neutron Research 17 (1) (2014) 35–43, publisher: IOS Press. doi:10.3233/JNR-130004. URL https://content.iospress.com/articles/journal-of-neutron-research/jnr004DOI
  11. [11]K. Lefmann, K. Nielsen, McStas, a general software package for neutron ray-tracing simulations, Neutron News 10 (3) (1999) 20–23, publisher: Taylor & Francis _eprint: https://doi.org/10.1080/10448639908233684. doi:10.1080/10448639908233684. URL https://doi.org/10.1080/10448639908233684
  12. [12]J. A. Kulesza, T. R. Adams, J. C. Armstrong, S. R. Bolding, F. B. Brown, J. S. Bull, T. P. Burke, A. R. Clark, R. A. A. Forster III, J. F. Giron, T. S. Grieve, C. J. Josey, R. L. Martz, G. W. McKinney, E. J. Pearson, M. E. Rising, C. J. C. Solomon Jr., S. Swaminarayan, T. J. Trahan, S. C. Wilson, A. J. Zukaitis, MCNP® Code Version 6.3.0 Theory & User Manual, Tech. Rep. LA-UR-22-30006, Los Alamos National Lab. (LANL), Los Alamos, NM (United States) (Sep. 2022). doi:10.2172/1889957. URL https://www.osti.gov/biblio/1889957DOI
  13. [13]L. Zanini, K. H. Andersen, K. Batkov, E. B. Klinkby, F. Mezei, T. Schönfeldt, A. Takibayev, Design of the cold and thermal neutron moderators for the European Spallation Source, Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 925 (2019) 33–52. doi:10.1016/j.nima.2019.01.003. URL https://www.sciencedirect.com/science/article/pii/S01689002193000087DOI
  14. [14]T. C. McClanahan, F. X. Gallmeier, E. B. Iverson, Moderator demonstration facility design and optimization, Tech. rep., Oak Ridge National Lab. (ORNL), Oak Ridge, TN (United States). Spallation Neutron Source (SNS) (02 2017). doi:10.2172/1345791. URL https://www.osti.gov/biblio/1345791DOI
  15. [15]T. Brückel, T. Gutberlet, Conceptual Design Report Jülich High Brilliance Neutron Source (HBS).
  16. [16]K. Batkov, A. Takibayev, L. Zanini, F. Mezei, Unperturbed moderator brightness in pulsed neutron sources, Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 729 (2013) 500–505. doi:10.1016/j.nima.2013.07.031. URL https://www.sciencedirect.com/science/article/pii/S0168900213010073DOI
  17. [17]N. Rizzi, B. Folsom, M. Akhyani, M. Bertelsen, P. Böni, Y. Bæbler, T. Bryś, A. Chambon, V. Czamler, B. Lauritzen, J. I. M. Damián, V. Nesvizhevszy, B. Rataj, S. Samothrakitis, V. Santoro, H. Shuai, M. Strobl, M. Strothmann, A. Takibayev, R. Wagner, L. Zanini, O. Zimmer, An intense source of very cold neutrons using solid deuterium and nanodiamonds for the European Spallation Source, Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 1062 (2024) 169215. doi:10.1016/j.nima.2024.169215. URL https://linkinghub.elsevier.com/retrieve/pii/S0168900224001414
  18. [18]T. Kittelmann, E. Klinkby, E. B. Knudsen, P. Willendrup, X. X. Cai, K. Kanaki, Monte Carlo Particle Lists: MCPL, Computer Physics Communications 218 (2017) 17–42. doi:10.1016/j.cpc.2017.04.012. URL https://www.sciencedirect.com/science/article/pii/S0010465517301261DOI
  19. [19]P. Konik, A. Ioffe, A new method to find out the optimal neutron moderator size based on neutron scattering instrument parameters, Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 1056 (2023) 168643. doi:10.1016/j.nima.2023.168643. URL https://www.sciencedirect.com/science/article/pii/S0168900223006332DOI
  20. [20]Akhyani, Mina, Ronnοw, Henrik M., Zanini, Luca, A high brilliance low-frequency spallation source optimized for one single instrument, EPJ Web Conf. 298 (2024) 05001. doi:10.1051/epjconf/202429805001. URL https://doi.org/10.1051/epjconf/202429805001
  21. [21]R. Bauer, Distribution of Points on a Sphere with Application to Star Catalogs, Journal of Guidance, Control, and Dynamics 23 (1) (2000) 130–137. doi:10.2514/2.4497. URL https://arc.aiaa.org/doi/10.2514/2.4497DOI
  22. [22]M. Arthur, [PDF] Point Picking and Distributing on the Disc and Sphere | Semantic Scholar. URL https://www.semanticscholar.org/paper/Point-Picking-and-Distributing-on-the-Disc-and-Arthur/10a2b95eaebf87f458db31f00aaf8c699c99caff

Paper details

vlnc:W_7bmqgddm
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents