1.. _methods_eigenvalue:
2
3=======================
4Eigenvalue Calculations
5=======================
6
7An eigenvalue calculation, also referred to as a criticality calculation, is a
8transport simulation wherein the source of neutrons includes a fissionable
9material. Some common eigenvalue calculations include the simulation of nuclear
10reactors, spent fuel pools, nuclear weapons, and other fissile systems. The
11reason they are called *eigenvalue* calculations is that the transport equation
12becomes an eigenvalue equation if a fissionable source is present since then the
13source of neutrons will depend on the flux of neutrons itself. Eigenvalue
14simulations using Monte Carlo methods are becoming increasingly common with the
15advent of high-performance computing.
16
17This section will explore the theory behind and implementation of eigenvalue
18calculations in a Monte Carlo code.
19
20.. _method-successive-generations:
21
22--------------------------------
23Method of Successive Generations
24--------------------------------
25
26The method used to converge on the fission source distribution in an eigenvalue
27calculation, known as the method of successive generations, was first introduced
28by [Lieberoth]_. In this method, a finite number of neutron histories,
29:math:`N`, are tracked through their lifetime iteratively. If fission occurs,
30rather than tracking the resulting fission neutrons, the spatial coordinates of
31the fission site, the sampled outgoing energy and direction of the fission
32neutron, and the weight of the neutron are stored for use in the subsequent
33generation. In OpenMC, the array used for storing the fission site information
34is called the *fission bank*. At the end of each fission generation, :math:`N`
35source sites for the next generation must be randomly sampled from the :math:`M`
36fission sites that were stored to ensure that the neutron population does not
37grow exponentially. The sampled source sites are stored in an array called the
38*source bank* and can be retrieved during the subsequent generation.
39
40It's important to recognize that in the method of successive generations, we
41must start with some assumption on how the fission source sites are distributed
42since the distribution is not known *a priori*. Typically, a user will make a
43guess as to what the distribution is -- this guess could be a uniform
44distribution over some region of the geometry or simply a point
45source. Fortunately, regardless of the choice of initial source distribution,
46the method is guaranteed to converge to the true source distribution. Until the
47source distribution converges, tallies should not be scored to since they will
48otherwise include contributions from an unconverged source distribution.
49
50The method by which the fission source iterations are parallelized can have a
51large impact on the achievable parallel scaling. This topic is discussed at length
52in :ref:`fission-bank-algorithms`.
53
54-------------------------
55Source Convergence Issues
56-------------------------
57
58Diagnosing Convergence with Shannon Entropy
59-------------------------------------------
60
61As discussed earlier, it is necessary to converge both :math:`k_{eff}` and the
62source distribution before any tallies can begin. Moreover, the convergence rate
63of the source distribution is in general slower than that of
64:math:`k_{eff}`. One should thus examine not only the convergence of
65:math:`k_{eff}` but also the convergence of the source distribution in order to
66make decisions on when to start active batches.
67
68However, the representation of the source distribution makes it a bit more
69difficult to analyze its convergence. Since :math:`k_{eff}` is a scalar
70quantity, it is easy to simply look at a line plot of :math:`k_{eff}` versus the
71number of batches and this should give the user some idea about whether it has
72converged. On the other hand, the source distribution at any given batch is a
73finite set of coordinates in Euclidean space. In order to analyze the
74convergence, we would either need to use a method for assessing convergence of
75an N-dimensional quantity or transform our set of coordinates into a scalar
76metric. The latter approach has been developed considerably over the last decade
77and a method now commonly used in Monte Carlo eigenvalue calculations is to use
78a metric called the `Shannon entropy`_, a concept borrowed from information
79theory.
80
81To compute the Shannon entropy of the source distribution, we first need to
82discretize the source distribution rather than having a set of coordinates in
83Euclidean space. This can be done by superimposing a structured mesh over the
84geometry (containing at least all fissionable materials). Then, the fraction of
85source sites that are present in each mesh element is counted:
86
87.. math::
88    :label: fraction-source
89
90    S_i = \frac{\text{Source sites in $i$-th mesh element}}{\text{Total number of
91    source sites}}
92
93The Shannon entropy is then computed as
94
95.. math::
96    :label: shannon-entropy
97
98    H = - \sum_{i=1}^N S_i \log_2 S_i
99
100where :math:`N` is the number of mesh elements. With equation
101:eq:`shannon-entropy`, we now have a scalar metric that we can use to assess the
102convergence of the source distribution by observing line plots of the Shannon
103entropy versus the number of batches.
104
105In recent years, researchers have started looking at ways of automatically
106assessing source convergence to relieve the burden on the user of having to look
107at plots of :math:`k_{eff}` and the Shannon entropy. A number of methods have
108been proposed (see e.g. [Romano]_, [Ueki]_), but each of these is not without
109problems.
110
111---------------------------
112Uniform Fission Site Method
113---------------------------
114
115Generally speaking, the variance of a Monte Carlo tally will be inversely
116proportional to the number of events that score to the tally. In a reactor
117problem, this implies that regions with low relative power density will have
118higher variance that regions with high relative power density. One method to
119circumvent the uneven distribution of relative errors is the uniform fission
120site (UFS) method introduced by [Sutton]_. In this method, the portion of the
121problem containing fissionable material is subdivided into a number of cells
122(typically using a structured mesh). Rather than producing
123
124.. math::
125
126    m = \frac{w}{k} \frac{\nu\Sigma_f}{\Sigma_t}
127
128fission sites at each collision where :math:`w` is the weight of the neutron,
129:math:`k` is the previous-generation estimate of the neutron multiplication
130factor, :math:`\nu\Sigma_f` is the neutron production cross section, and
131:math:`\Sigma_t` is the total cross section, in the UFS method we produce
132
133.. math::
134
135    m_{UFS} = \frac{w}{k} \frac{\nu\Sigma_f}{\Sigma_t} \frac{v_i}{s_i}
136
137fission sites at each collision where :math:`v_i` is the fraction of the total
138volume occupied by cell :math:`i` and :math:`s_i` is the fraction of the fission
139source contained in cell :math:`i`. To ensure that no bias is introduced, the
140weight of each fission site stored in the fission bank is :math:`s_i/v_i` rather
141than unity. By ensuring that the expected number of fission sites in each mesh
142cell is constant, the collision density across all cells, and hence the variance
143of tallies, is more uniform than it would be otherwise.
144
145.. _Shannon entropy: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-06-3737.pdf
146
147.. [Lieberoth] J. Lieberoth, "A Monte Carlo Technique to Solve the Static
148   Eigenvalue Problem of the Boltzmann Transport Equation," *Nukleonik*, **11**,
149   213-219 (1968).
150
151.. [Romano] Paul K. Romano, "Application of the Stochastic Oscillator to Assess
152   Source Convergence in Monte Carlo Criticality Calculations,"
153   *Proc. International Conference on Mathematics, Computational Methods, and
154   Reactor Physics*, Saratoga Springs, New York (2009).
155
156.. [Sutton] Daniel J. Kelly, Thomas M. Sutton, and Stephen C. Wilson, "MC21
157   Analysis of the Nuclear Energy Agency Monte Carlo Performance Benchmark
158   Problem," *Proc. PHYSOR 2012*, Knoxville, Tennessee, Apr. 15--20 (2012).
159
160.. [Ueki] Taro Ueki, "On-the-Fly Judgments of Monte Carlo Fission Source
161   Convergence," *Trans. Am. Nucl. Soc.*, **98**, 512 (2008).
162