MAVRIC: Monaco with Automated Variance Reduction using Importance Calculations¶
D. E. Peplow and C. Celik
Introduction¶
Monte Carlo particle transport calculations for deep penetration problems can require very long run times in order to achieve an acceptable level of statistical uncertainty in the final answers. Discreteordinates codes can be faster but have limitations relative to the discretization of space, energy, and direction. Monte Carlo calculations can be modified (biased) to produce results with the same variance in less time if an approximate answer or some other additional information is already known about the problem. If an importance can be assigned to different particles based on how much they will contribute to the final answer, more time can be spent on important particles with less time devoted to unimportant particles. One of the best ways to bias a Monte Carlo code for a particular tally is to form an importance map from the adjoint flux based on that tally. Unfortunately, determining the exact adjoint flux could be just as difficult as computing the original problem itself. However, an approximate adjoint can still be very useful in biasing the Monte Carlo solution [Wag97]. Discrete ordinates can be used to quickly compute that approximate adjoint. Together, Monte Carlo and discrete ordinates can be used to find solutions to thick shielding problems in reasonable times.
The MAVRIC (Monaco with Automated Variance Reduction using Importance Calculations) sequence is based on the CADIS (Consistent Adjoint Driven Importance Sampling) and FWCADIS (ForwardWeighted CADIS) methodologies [WH98] [Wag02] [HW03] [WBP07] MAVRIC automatically performs a threedimensional, discreteordinates calculation using Denovo to compute the adjoint flux as a function of position and energy. This adjoint flux information is then used to construct an importance map (i.e., target weights for weight windows) and a biased source distribution that work together—particles are born with a weight matching the target weight of the cell into which they are born. The fixedsource Monte Carlo radiation transport Monaco then uses the importance map for biasing during particle transport and the biased source distribution as its source. During transport, the particle weight is compared with the importance map after each particle interaction and whenever a particle crosses into a new importance cell in the map.
For problems that do not require variance reduction to complete in a reasonable time, execution of MAVRIC without the importance map calculation provides an easy way to run Monaco. For problems that do require variance reduction to complete in a reasonable time, MAVRIC removes the burden of setting weight windows from the user and performs it automatically with a minimal amount of additional input. Note that the MAVRIC sequence can be used with the final Monaco calculation as either a multigroup (MG) or a continuousenergy (CE) calculation.
Monaco has a wide variety of tally options: it can calculate fluxes (by group) at a point in space, over any geometrical region, or for a userdefined, threedimensional, rectangular grid. These tallies can also integrate the fluxes with either standard response functions from the cross section library or userdefined response functions. All of these tallies are available in the MAVRIC sequence.
While originally designed for CADIS, the MAVRIC sequence is also capable of creating importance maps using both forward and adjoint deterministic estimates. The FWCADIS method can be used for optimizing several tallies at once, a mesh tally over a large region, or a mesh tally over the entire problem. Several other methods for producing importance maps are also available in MAVRIC and are explored in Appendix C.
CADIS Methodology¶
MAVRIC is an implementation of CADIS (Consistent Adjoint Driven Importance Sampling) using the Denovo SN and Monaco Monte Carlo functional modules. Source biasing and a meshbased importance map, overlaying the physical geometry, are the basic methods of variance reduction. In order to make the best use of an importance map, the map must be made consistent with the source biasing. If the source biasing is inconsistent with the weight windows that will be used during the transport process, source particles will undergo Russian roulette or splitting immediately, wasting computational time and negating the intent of the biasing.
Overview of CADIS¶
CADIS has been well described in the literature, so only a brief overview is given here. Consider a class sourcedetector problem described by a unit source with emission probability distribution function \(q\left(\overrightarrow{r},E \right)\) and a detector response function \(\sigma_{d}\left(\overrightarrow{r},E \right)\). To determine the total detector response, R, the forward scalar flux \(\phi\left(\overrightarrow{r},E \right)\) must be known. The response is found by integrating the product of the detector response function and the flux over the detector volume \(V_{d}\).
Alternatively, if the adjoint scalar flux, \(\phi^{+}\left(\overrightarrow{r},E \right)\), is known from the corresponding adjoint problem with adjoint source \(q^{+}\left(\overrightarrow{r},E \right) = \sigma_{d}\left(\overrightarrow{r},E \right)\), then the total detector response could be found by integrating the product of the forward source and the adjoint flux over the source volume, \(V_{s}\).
Unfortunately, the exact adjoint flux may be just as difficult to determine as the forward flux, but an approximation of the adjoint flux can still be used to form an importance map and a biased source distribution for use in the forward Monte Carlo calculation.
Wagner^{1} showed that if an estimate of the adjoint scalar flux for the corresponding adjoint problem could be found, then an estimate of the response R could be made using Eq. . The adjoint source for the adjoint problem is typically separable and corresponds to the detector response and spatial area of tally to be optimized: \(q^{+}\left(\overrightarrow{r},E \right) = \sigma_{d}\left(E \right)g\left( \overrightarrow{r} \right)\), where \(\sigma_{d}\left( E \right)\) is a fluxtodose conversion factor and \(g\left( \overrightarrow{r} \right)\) is 1 in the tally volume and 0 otherwise. Then, from the adjoint flux \(\phi^{+}\left( \overrightarrow{r},E \right)\) and response estimate R, a biased source distribution, \(\widehat{q}\left( \overrightarrow{r},E \right)\), for source sampling of the form
and weight window target values, \(\overline{w}\left( \overrightarrow{r},E \right)\), for particle transport of the form
could be constructed, which minimize the variance in the forward Monte Carlo calculation of R.
When a particle is sampled from the biased source distribution \(\widehat{q}\left( \overrightarrow{r},E \right)\), to preserve a fair game, its initial weight is set to
which exactly matches the target weight for that particle’s position and energy. This is the “consistent” part of CADIS—source particles are born with a weight matching the weight window of the region/energy they are born into. The source biasing and the weight windows work together.
CADIS has been applied to many problems—including reactor excore detectors, welllogging instruments, cask shielding studies, and independent spent fuel storage facility models—and has demonstrated very significant speedups in calculation time compared to analog simulations.
Multiple sources with CADIS¶
For a typical Monte Carlo calculation with multiple sources (each with a probability distribution function \(q_{i}\left( \overrightarrow{r},E \right)\) and a strength \(S_{i}\), giving a total source strength of \(S = \sum_{}^{}S_{i}\)), the source is sampled in two steps. First, the specific source i is sampled with probability \(p\left( i \right) = \ S_{i}/S\), and then the particle is sampled from the specific source distribution \(q_{i}\left( \overrightarrow{r},E \right)\).
The source sampling can be biased at both levels: which source to sample from and how to sample each source. For example, the specific source can be sampled using some arbitrary distribution, \(\widehat{p}\left( i \right)\), and then the individual sources can be sampled using distributions \({\widehat{q}}_{i}\left( \overrightarrow{r},E \right)\). Particles would then have a birth weight of
For CADIS, a biased multiple source needs to be developed so that the birth weights of sampled particles still match the target weights of the importance map. For a problem with multiple sources (each with a distribution \(q_{i}\left( \overrightarrow{r},E \right)\) and a strength \(S_{i}\)), the goal of the Monte Carlo calculation is to compute some response \(R\) for a response function \(\sigma_{d}\left( \overrightarrow{r},E \right)\) at a given detector.
Note that the flux \(\phi\left( \overrightarrow{r},E \right)\) has contributions from each source. The response, \(R_{i}\), from each specific source (\(S_{i}\) with \(q_{i}\left( \overrightarrow{r},E \right)\)) can be expressed using just the flux from that source, \(\phi_{i}\left( \overrightarrow{r},E \right)\), as
The total response is then found as \(R = \sum_{i}^{}R_{i}\).
For the adjoint problem, using the adjoint source of \(q^{+}\left( \overrightarrow{r},E \right) = \sigma_{d}\left( \overrightarrow{r},E \right)\), the response \(R\) can also be calculated as
with response contribution from each specific source being
The target weights \(\overline{w}\left( \overrightarrow{r},E \right)\) of the importance map are found using
Each biased source \({\widehat{q}}_{i}\left( \overrightarrow{r},E \right)\) pdf is found using
and the biased distribution used to select an individual source is \(\widehat{p}\left( i \right) = \ R_{i}/\sum_{}^{}{R_{i} = R_{i}/R}\).
When using the biased distribution used to select an individual source, \(\widehat{p}\left( i \right)\), and the biased source distribution, \({\widehat{q}}_{i}\left( \overrightarrow{r},E \right)\), the birth weight of the sampled particle will be
which matches the target weight, \(\overline{w}\left( \overrightarrow{r},E \right)\).
Multiple tallies with CADIS¶
The CADIS methodology works quite well for classic source/detector problems. The statistical uncertainty of the tally that serves as the adjoint source is greatly reduced since the Monte Carlo transport is optimized to spend more simulation time on those particles that contribute to the tally, at the expense of tracking particles in other parts of phase space. However, more recently, Monte Carlo has been applied to problems where multiple tallies need to all be found with low statistical uncertainties. The extension of this idea is the mesh tally—where each voxel is a tally where the user desires low statistical uncertainties. For these problems, the user must accept a total simulation time that is controlled by the tally with the slowest convergence and simulation results where the tallies have a wide range of relative uncertainties.
The obvious way around this problem is to create a separate problem for each tally and use CADIS to optimize each. Each simulation can then be run until the tally reaches the level of acceptable uncertainty. For more than a few tallies, this approach becomes complicated and timeconsuming for the user. For large mesh tallies, this approach is not reasonable.
Another approach to treat several tallies, if they are in close proximity to each other, or a mesh tally covering a small portion of the physical problem is to use the CADIS methodology with the adjoint source near the middle of the tallies to be optimized. Since particles in the forward Monte Carlo simulation are optimized to reach the location of the adjoint source, all the tallies surrounding that adjoint source should converge quickly. The drawback to this approach is the difficult question of “how close.” If the tallies are too far apart, certain energies or regions that are needed for one tally may be of low importance for getting particles to the central adjoint source. This may underpredict the flux or dose at the tally sites far from the adjoint source.
MAVRIC has the capability to have multiple adjoint sources with this problem in mind. For several tallies that are far from each other, multiple adjoint sources could be used. In the forward Monte Carlo, particles would be drawn to one of those adjoint sources. The difficulty with this approach is that typically the tally that is closest to the true physical source converges faster than the other tallies—showing the closest adjoint source seems to attract more particles than the others. Assigning more strength to the adjoint source further from the true physical source helps, but finding the correct strengths so that all of the tallies converge to the same relative uncertainty in one simulation is an iterative process for the user.
Forwardweighted CADIS¶
In order to converge several tallies to the same relative uncertainty in one simulation, the adjoint source corresponding to each of those tallies needs to be weighted inversely by the expected tally value. In order to calculate the dose rate at two points—say one near a reactor and one far from a reactor—in one simulation, then the total adjoint source used to develop the weight windows and biased source needs to have two parts. The adjoint source far from the reactor needs to have more strength than the adjoint source near the reactor by a factor equal to the ratio of the expected near dose rate to the expected far dose rate.
This concept can be extended to mesh tallies as well. Instead of using a uniform adjoint source strength over the entire mesh tally volume, each voxel of the adjoint source should be weighted inversely by the expected forward tally value for that voxel. Areas of low flux or low dose rate would have more adjoint source strength than areas of high flux or high dose rate.
An estimate of the expected tally results can be found by using a quick discreteordinates calculation. This leads to an extension of the CADIS method: forwardweighted CADIS (FWCADIS).**Error! Bookmark not defined.** First, a forward S_{N} calculation is performed to estimate the expected tally results. A total adjoint source is constructed where the adjoint source corresponding to each tally is weighted inversely by those forward tally estimates. Then the standard CADIS approach is used—an importance map (target weight windows) and a biased source are made using the adjoint flux computed from the adjoint S_{N} calculation.
For example, if the goal is to calculate a detector response function \(\sigma_{d}\left( E \right)\) (such as dose rate using fluxtodoserate conversion factors) over a volume (defined by \(g\left( \overrightarrow{r} \right)\)) corresponding to mesh tally, then instead of simply using \(q^{+}\left( \overrightarrow{r},E \right) = \sigma_{d}\left( E \right)\ g(\overrightarrow{r})\), the adjoint source would be
where \(\phi\left( \overrightarrow{r},E \right)\) is an estimate of the forward flux and the energy integral is over the voxel at \(\overrightarrow{r}\). The adjoint source is nonzero only where the mesh tally is defined (\(g\left( \overrightarrow{r} \right)\)), and its strength is inversely proportional to the forward estimate of dose rate.
The relative uncertainty of a tally is controlled by two components: first, the number of tracks contributing to the tally and, second, the shape of the distribution of scores contributing to that tally. In the Monte Carlo game, the number of simulated particles, \(m\left( \overrightarrow{r},E \right)\), can be related to the true physical particle density, \(n\left( \overrightarrow{r},E \right),\) by the average Monte Carlo weight of scoring particles, \(\overline{w}\left( \overrightarrow{r},E \right)\), by
In a typical Monte Carlo calculation, tallies are made by adding some score, multiplied by the current particle weight, to an accumulator. To calculate a similar quantity related to the Monte Carlo particle density would be very close to calculating any other quantity but without including the particle weight. The goal of FWCADIS is to make the Monte Carlo particle density, \(m\left( \overrightarrow{r},E \right)\), uniform over the tally areas, so an importance map needs to be developed that represents the importance to achieving uniform Monte Carlo particle density. By attempting to keep the Monte Carlo particle density more uniform, more uniform relative errors for the tallies should be realized.
Two options for forward weighting are possible. For tallies over some area where the entire groupwise flux is needed with low relative uncertainties, the adjoint source should be weighted inversely by the forward flux, \(\phi\left( \overrightarrow{r},E \right)\). The other option, for a tally where only an energyintegrated quantity is desired, is to weight the adjoint inversely by that energyintegrated quantity,\(\int_{}^{}{\sigma_{d}\left( E \right)\text{ϕ}\left( \overrightarrow{r},E \right)}\text{\ dE}\). For a tally where the total flux is desired, then the response in the adjoint source is simply \(\sigma_{d}\left( E \right) = 1\).
To optimize the forward Monte Carlo simulation for the calculation of some quantity at multiple tally locations or across a mesh tally, the adjoint source needs to be weighted by the estimate of that quantity. For a tally defined by its spatial location \(g\left( \overrightarrow{r} \right)\) and its optional response \(\sigma_{d}\left( E \right)\), the standard adjoint source would be \(q^{+}\left( \overrightarrow{r},E \right) = \sigma_{d}\left( E \right)\text{g}\left( \overrightarrow{r} \right)\). The forwardweighted adjoint source, \(q^{+}\left( \overrightarrow{r},E \right)\), depending on what quantity is to be optimized, is listed below.
For the calculation of 
Adjoint source 

Energy and spatially dependent flux. \(\phi\left(\overrightarrow{r},E \right)\) 
\[\frac{g\left( \overrightarrow{r}\right)}{\phi\left(\overrightarrow{r},E \right)}\]

Spatially dependent total flux. \(\int_{}^{}{\phi\left( \overrightarrow{r},E \right)}\textit{dE}\) 
\[\frac{g\left( \overrightarrow{r}\right)}{\int_{}^{}{\phi\left( \overrightarrow{r},E \right)}\textit{dE}}\]

Spatially dependent total response. \(\int_{}^{}{\sigma_{d}\left( E \right)\text{ϕ}\left(\overrightarrow{r},E\right)}\textit{dE}\) 
\[\frac{\sigma_{d}\left( E \right)\text{g}\left( \overrightarrow{r} \right)}{\int_{}^{}{\sigma_{d}\left( E \right)\text{ϕ}\left( \overrightarrow{r},E \right)}\textit{dE}}\]

The bottom line of FWCADIS is that in order to calculate a quantity at multiple tally locations (or across a mesh tally) with more uniform relative uncertainties, an adjoint source needs to be developed for an objective function that keeps some nonphysical quantity—related to the Monte Carlo particle density and similar in form to the desired quantity—constant. FWCADIS uses the solution of a forward discreteordinates calculation to properly weight the adjoint source. After that, the standard CADIS approach is used.
MAVRIC Implementation of CADIS¶
With MAVRIC, as with other shielding codes, the user defines the problem as a set of physical models—the material compositions, the geometry, the source, and the detectors (locations and response functions)—as well as some mathematical parameters on how to solve the problem (number of histories, etc.). For the variance reduction portion of MAVRIC, the only additional inputs required are (1) the mesh planes to use in the discreteordinates calculation(s) and (2) the adjoint source description—basically the location and the response of each tally to optimize in the forward Monte Carlo calculation. MAVRIC takes this information and constructs a Denovo adjoint problem. (The adjoint source is weighted by a Denovo forward flux or response estimate for FWCADIS applications.) MAVRIC then uses the CADIS methodology: it combines the adjoint flux from the Denovo calculation with the source description and creates the importance map (weight window targets) and the meshbased biased source. Monaco is then run using the CADIS biased source distribution and the weight window targets.
Denovo¶
Denovo is a parallel threedimensional SN code that is used to generate adjoint (and, for FWCADIS, forward) scalar fluxes for the CADIS methods in MAVRIC. For use in MAVRIC/CADIS, it is highly desirable that the SN code be fast, positive, and robust. The phasespace shape of the forward and adjoint fluxes, as opposed to a highly accurate solution, is the most important quality for Monte Carlo weightwindow generation. Accordingly, Denovo provides a stepcharacteristics spatial differencing option that produces positive scalar fluxes as long as the source (volume plus inscatter) is positive. Denovo uses an orthogonal, nonuniform mesh that is ideal for CADIS applications because of the speed and robustness of calculations on this mesh type.
Denovo uses the highly robust GMRES (Generalized Minimum Residual) Krylov method to solve the SN equations in each group. GMRES has been shown to be more robust and efficient than traditional source (fixedpoint) iteration. The ingroup discrete SN equations are defined as
where L is the differential transport operator, M is the momenttodiscrete operator, S is the matrix of scattering crosssection moments, q is the external and inscatter source, \(\phi\) is the vector of angular flux moments, and \(\psi\) is the vector of angular fluxes at discrete angles. Applying the operator D, where \(\phi = \mathbf{D}\psi\), and rearranging terms casts the ingroup equations in the form of a traditional linear system, \(\mathbf{A}x = b\),
(17)¶\[\left( \mathbf{I}  \mathbf{D}\mathbf{L}^{ 1}\mathbf{\text{MS}} \right) = \mathbf{D}\mathbf{L}^{ 1}q .\]
The operation \(\mathbf{L}^{ 1}\nu\), where \(\nu\) is an iteration vector, is performed using a traditional wavefront solve (transport sweep). The parallel implementation of the Denovo wavefront solver uses the wellknown KochBakerAlcouffe (KBA) algorithm, which is a twodimensional block‑spatial decomposition of a threedimensional orthogonal mesh [BK98]. The Trilinos package is used for the GMRES implementation [WH03] Denovo stores the meshbased scalar fluxes in a double precision binary file (*.dff) called a Denovo flux file. Past versions of SCALE/Denovo used the TORT [RS97] *.varscl file format (DOORS package [RC98]), but this was limited to single precision. Since the rest of the MAVRIC sequence has not yet been parallelized, Denovo is currently used only in serial mode within MAVRIC.
Monaco¶
The forward Monte Carlo transport is performed using Monaco, a fixedsource, shielding code that uses the SCALE General Geometry Package (SGGP, the same as used by the criticality code KENOVI) and the standard SCALE material information processor. Monaco can use either MG or CE cross section libraries. Monaco was originally based on the MORSE Monte Carlo code but has been extensively modified to modernize the coding, incorporate more flexibility in terms of sources/tallies, and read a userfriendly block/keyword style input.
Much of the input to MAVRIC is the same as Monaco. More details can be found in the Monaco chapter of the SCALE manual.
Running MAVRIC¶
The objective of a SCALE sequence is to execute several codes, passing the output from one to the input of the next, in order to perform some analysis—things that users typically had to do in the past. MAVRIC does this for difficult shielding problems by running approximate discreteordinates calculations, constructing an importance map and biased source for one or more tallies that the user wants to optimize in the Monte Carlo calculation, and then using those in a forward Monaco Monte Carlo calculation. MAVRIC also prepares the forward and adjoint cross sections when needed. The steps of a MAVRIC sequence are listed in Table 1. The user can instruct MAVRIC to run this whole sequence of steps or just some subset of the steps—in order to verify the intermediate steps or to reuse previously calculated quantities in a new analyses.
The MAVRIC sequence can be stopped after key points by using the “parm= parameter ” operator on the “=mavric” command line, which is the first line of the input file. The various parameters are listed in Table Table 2. These parameters allow the user to perform checks and make changes to the importance map calculation before the actual Monte Carlo calculation in Monaco.
MAVRIC also allows the sequence to start at several different points. If an importance map and biased source have already been computed, they can be used directly. If the adjoint scalar fluxes are known, they can quickly be used to create the importance map and biased source and then begin the forward Monte Carlo. All of the different combinations of starting MAVRIC with some previously calculated quantities are listed in the following section detailing the input options.
When using MG crosssection libraries that do not have fluxtodoserate conversion factors, use “parm=nodose” to prevent the cross section processing codes from trying to move these values into the working library.
MAVRIC creates many files that use the base problem name from the output file. For an output file called “c:path1path2\outputName.out” or “/home/path1/path2/ outputName.inp”, spaces in the output name will cause trouble and should not be used.
Cross section calculation 
XSProc is used to calculate the forward cross sections for Monaco 
Forward Denovo (optional) 

Cross section calculation 
XSProc is used to calculate the forward cross sections for Denovo 
Forward flux calculation 
Denovo calculates the estimate of the forward flux 
Adjoint Denovo (optional) 

Cross section calculation 
XSProc is used to calculate the adjoint cross sections for Denovo 
Adjoint flux calculation 
Denovo calculates the estimate of the adjoint flux 
CADIS (optional) 
The scalar flux file from Denovo is then used to create the biased source distribution and transport weight windows 
Monte Carlo calculation 
Monaco uses the biased source distribution and transport weight windows to calculate the various tallies 
Parameter 
MAVRIC will stop after 

check 
input checking 
forinp 
Forward Denovo input construction (makes 
forward 
The forward Denovo calculation 
adjinp 
Adjoint Denovo input construction (makes 
adjoint 
The adjoint Denovo calculation 
impmap 
Calculation of importance map and biased source 
MAVRIC input¶
The input file for MAVRIC consists of three lines of text (“=mavric” command line with optional parameters, the problem title, and SCALE cross section library name) and then several blocks, with each block starting with “read xxxx” and ending with “end xxxx”. There are three required blocks and nine optional blocks. Material and geometry blocks must be listed first and in the specified order. Other blocks may be listed in any order.
Blocks (must be in this order):
Composition – (required) SCALE standard composition, list of materials used in the problem
Celldata – SCALE resonance selfshielding
Geometry – (required) SCALE general geometry description
Array – optional addition to the above geometry description
Volume – optional calculation or listing of region volumes
Plot – create 2D slices of the SGGP geometry
Other Blocks (any order, following the blocks listed above):
Definitions – defines locations, response functions, and grid geometries used by other blocks
Sources – (required) description of the particle source spatial, energy, and directional distributions
Tallies – description of what to calculate: point detector tallies, region tallies, or mesh tallies
Parameters – how to perform the simulation (random number seed, how many histories, etc.)
Biasing – data for reducing the variance of the simulation
ImportanceMap – instructions for creating an importance map based on a discreteordinates calculation
The material blocks (Composition and Celldata) and the physical model blocks (Geometry, Array, Volume, and Plot) follow the standard SCALE format. See the other SCALE references as noted in the following sections for details. The Biasing block and ImportanceMap block cannot both be used.
For the other six blocks, scalar variables are set by “keyword=value”, fixedlength arrays are set with “keyword value_{1} … value_{N}”, variablelength arrays are set with “keyword value_{1} … value_{N} end”, and some text and filenames are read in as quoted strings. Single keywords to set options are also used in some instances. The indention, comment lines, and upper/lowercase shown in this document are not required— they are used in the examples only for clarity. Except for strings in quotes (like filenames), SCALE is case insensitive.
After all input blocks are listed, a single line with “end data” should be listed. A final “end” should also be listed, to signify the end of all MAVRIC input. Nine of the blocks are the same input blocks used by the functional module Monaco, with a few extra keywords only for use with MAVRIC. These extra keywords are highlighted here, without relisting all of the standard Monaco keywords for those blocks. See Table 3 for an overview of MAVRIC input file structure.
Composition block¶
Material information input follows the standard SCALE format for material input. Basic materials known to the SCALE library may be used as well as completely userdefined materials (using isotopes with known cross sections). Input instructions are located in the XSProc chapter in the SCALE manual. The Standard Composition Library chapter lists the different cross section libraries and the names of standard materials. An example is as follows:
read composition
uo2 1 0.2 293.0 92234 0.0055 92235 3.5 92238 96.4945 end
orconcrete 2 1.0 293.0 end
ss304 3 1.0 293.0 end
end composition
Details on the cell data block are also included in the XSProc chapter. When using different libraries for the importance map production (listed at the top of the input) and the final Monte Carlo calculation (listed in the parameters block, if different), make sure that the materials are present in both libraries.
input file 
Comment 

=mavric
Some title for this problem
v727n19g
read composition
...
end composition
read celldata
...
end celldata
read geometry
...
end geometry
read array
...
end array
read volume
...
end volume
read plot
...
end plot
read definitions
...
end definitions
read sources
...
end sources
read tallies
...
end tallies
read parameters
...
end parameters
read biasing
...
end biasing
read importanceMap
...
end importanceMap
end data
end

name of sequence
title
cross section library name
SCALE material compositions
[required block]
SCALE resonance selfshielding
[optional block]
SCALE SGGP geometry
[required block]
SCALE SGGP arrays
[optional block]
SCALE SGGP volume calc
[optional block]
SGGP Plots
[optional block]
Definitions
[possibly required]
Sources definition
[required block]
Tally specifications
[optional block]
Monte Carlo parameters
[optional block]
Biasing information
[optional block]
Importance map
[optional block]
end of all blocks
end of MAVRIC input

SGGP geometry blocks¶
MAVRIC uses the functional module Monaco for the forward Monte Carlo calculation. Monaco tracks particles through the physical geometry described by the SGGP input blocks as well as through the mesh importance map and any mesh tallies, which are defined in the global coordinates and overlay the physical geometry. Because Monaco must track through all of these geometries at the same time, users should not use the reflective boundary capability in the SGGP geometry.
For more details on each SGGP Geometry block, see the following sections of the KENOVI chapter of the SCALE Manual.
Geometry – Geometry Data
Array – Array Data
Volume – Volume Data
Plot – Plot Data
Importance map block¶
The importance map block is the “heart and soul” of MAVRIC. This block lists the parameters for creating an importance map and biased source from one (adjoint) or two (forward, followed by adjoint) Denovo discreteordinates calculations. Without an importance map block, MAVRIC can be used to run Monaco and use its conventional types of variance reduction. If both the importance map and biasing blocks are specified, only the importance map block will be used. There are a variety of ways to use the importance map block, as explained in the subsections below. Keywords for this block are summarized at the end of this section, in :numref:``
Constructing a mesh for the S_{N} calculation¶
All of the uses of the importance map block that run the discreteordinates code require the use of a grid geometry that overlays the physical geometry. Grid geometries are defined in the definitions block of the MAVRIC input. The extent and level of detail needed in a grid geometry are discussed in the following paragraphs.
When using S_{N} methods alone for solving radiation transport in shielding problems, a good rule of thumb is to use mesh cell sizes on the order of a meanfree path of the particle. For complex shielding problems, this could lead to an extremely large number of mesh cells, especially when considering the size of the meanfree path of the lowest energy neutrons and photons in common shielding materials.
In MAVRIC, the goal is to use the S_{N} calculation for a quick approximate solution. Accuracy is not paramount—just getting an idea of the overall shape of the true importance map will help accelerate the convergence of the forward Monte Carlo calculation. The more accurate the importance map, the better the forward Monte Carlo acceleration will be. At some point there is a time tradeoff when the computational time for calculating the importance map followed by the Monte Carlo calculation exceeds that of a standard analog Monte Carlo calculation. Large numbers of mesh cells, coming from using very small mesh sizes, for S_{N} calculations also use a great deal of computer memory.
Because the deterministic solution(s) for CADIS and FWCADIS can have moderate fidelity and still provide variance reduction parameters that substantially accelerate the Monte Carlo solution, mesh cell sizes in MAVRIC applications can be larger than what most S_{N} practioners would typically use. The use of relatively coarse mesh reduces memory requirements and the run time of the deterministic solution(s). Some general guidelines to keep in mind when creating a mesh for the importance map/biased source are:
The true source regions should be included in the mesh with mesh planes at their boundaries.
For point or very small sources, place them in the center of a mesh cell, not on the mesh planes.
Any region of the geometry where particles could eventually contribute to the tallies (the “important” areas) should be included in the mesh.
Point adjoint sources (corresponding to point detector locations) in standard CADIS calculations do not have to be included inside the mesh. For FWCADIS, they must be in the mesh and should be located at a mesh cell center, not on any of the mesh planes.
Volumetric adjoint sources should be included in the mesh with mesh planes at their boundaries.
Mesh planes should be placed at significant material boundaries.
Neighboring cell sizes should not be drastically different.
Smaller cell sizes should be used where the adjoint flux is changing rapidly, for example, toward the surfaces of adjoint sources and shields (rather than their interiors).
Another aspect to keep in mind is that the source in the forward Monaco Monte Carlo calculation will be a biased, meshbased source. Source particles will be selected by first sampling which mesh cell to use and then sampling a position uniformly within that mesh cell that meets the user criteria of “unit=”, “region=”, or “mixture=” if specified. The mesh should have enough resolution that the mesh source will be an accurate representation of the true source.
The geometry for the Denovo calculation is specified using the keyword “gridGeometryID=” and the identification number of a grid geometry that was defined in the definitions block. The material assigned to each voxel of the mesh is determined by testing the center point in the SGGP geometry (unless the macromaterial option is used – see below).
Macromaterials for S_{N} geometries¶
Part of the advantage of the CADIS method is that the adjoint discreteordinates calculation only needs to be approximate in order to form a reasonable importance map and biased source. This usually means that the mesh used is much coarser than the mesh that would be used if the problem were to be solved only with a discreteordinates code. This coarse mesh may miss significant details (especially curves) in the geometry and produce a lessthanoptimal importance map.
In order to get more accurate solutions from a coarsemesh discreteordinates calculation, Denovo can represent the material in each voxel of the mesh as a volumeweighted mixture of the real materials, called macromaterials, in the problem. When constructing the Denovo input, the Denovo EigenValue Calculation (DEVC, see section SECTIONREFERENCE) sequence can estimate the volume fraction occupied by each real material in each voxel by a sampling method. The user can specify parameters for how to sample the geometry. Note that finer sampling makes more accurate estimates of the material fraction but requires more setup time to create the Denovo input. Users should understand how the macromaterials are sampled and consider that when constructing a mesh grid. This is especially important for geometries that contain arrays. Careful consideration should be given when overlaying a mesh on a geometry that contains arrays of arrays.
Because the list of macromaterials could become large, the user can also
specify a tolerance for how close two different macromaterials can be to
be considered the same, thereby reducing the total number of
macromaterials. The macromaterial tolerance, “mmTolerance=
”, is used for
creating a different macromaterial from the ones already created by
looking at the infinity norm between two macromaterials.
The number of macromaterials does not appreciably impact Denovo run time
or memory requirements.
Two different sampling methods are available—point testing [IPE+09] with
the keyword mmPointTest
and ray tracing [Joh13] with the keyword
mmRayTest
.
Ray Tracing¶
This method estimates the volume of different materials in the Denovo mesh grid elements by tracing rays through the SGGP geometry and computing the average track lengths through the each material. Rays are traced in all three dimensions to better estimate the volume fractions of materials within each voxel. The mmSubCell parameter controls how many rays to trace in each voxel in each dimension. For example, if mmSubCell= n, then when tracing rays in the z dimension, each column of voxels uses a set of n×n rays starting uniformly spaced in the x and y dimensions. With rays being cast from all three orthogonal directions, a total of 3n2 rays are used to sample each voxel. One can think of subcells as an equally spaced submesh with a single ray positioned at each center. The number of subcells in each direction, and hence the number of rays, can be explicitly given with mmSubCells ny nz nx nz nx ny end keyword for rays parallel to the x axis, y axis, and z axis. Fig. 1 shows different subcell configurations (in two dimensions) for a given voxel.
Ray tracing is a more robust method compared to the simple point testing method used in previous versions of SCALE/MAVRIC; however, it requires more memory than point testing. Ray tracing gives more accurate estimates of volume fractions because track lengths across a voxel give more information than a series of test points. Ray tracing is also much faster than point testing because the particle tracking routines are optimized for quickly determining lists of materials and distance along a given ray.
Ray tracing operates on the grid geometry supplied by the user and shoots rays in all three directions starting from the lower bounds of the mesh grid. An example of an arbitrary assembly geometry is shown in Fig. 2. A ray consists of a number of steps that each correspond to crossing a material boundary along the path of the ray. Ratios of each step’s length to the voxel length in the ray’s direction determine the material volume fraction of that step in that voxel, and summation of the same material volume fractions gives the material volume fraction of that material in that voxel. Ray tracing through a single voxel that contains a fuel pin is illustrated in Figure 4.1.3.
 BK98
Randal S. Baker and Kenneth R. Koch. An Sn algorithm for the massively parallel CM200 computer. Nuclear Science and Engineering, 128(3):312–320, 1998. Publisher: Taylor & Francis.
 HW03
Alireza Haghighat and John C. Wagner. Monte Carlo variance reduction with deterministic importance functions. Progress in Nuclear Energy, 42(1):25–53, 2003. Publisher: Elsevier.
 IPE+09
Ahmad M. Ibrahim, Douglas E. Peplow, Thomas M. Evans, John C. Wagner, and Paul PH Wilson. Improving the Mesh Generation Capabilities in the SCALE Hybrid Shielding Analysis Sequence. Trans. Am. Nucl. Soc, 100:302, 2009.
 Joh13
Seth R. Johnson. Fast mix table construction for material discretization. In Proceedings of the 2013 International Conference on Mathematics and Computational Methods Applied to Nuclear Science and EngineeringM and C 2013. 2013.
 RC98
W. A. Rhoades and R. L. Childs. DOORS 3.2, one, two, threedimensional discrete ordinates neutron/photon transport code system. RSICC, Oak Ridge National Laboratory, 300:650, 1998.
 RS97
Wayne A. Rhoades and D. B. Simpson. The TORT threedimensional discrete ordinates neutron/photon transport code (TORT version 3). Technical Report, Oak Ridge National Lab., TN (United States), 1997.
 Wag97
John C. Wagner. Acceleration of Monte Carlo shielding calculations with an automated variance reduction technique and parallel processing. PhD thesis, Pennsylvania State University, 1997.
 Wag02
John C. Wagner. An automated deterministic variance reduction generator for Monte Carlo shielding applications. In Proceedings of the American Nuclear Society 12th Biennial RPSD Topical Meeting, 14–18. Citeseer, 2002.
 WBP07
John C. Wagner, Edward D. Blakeman, and Douglas E. Peplow. Forwardweighted CADIS method for global variance reduction. TransactionsAmerican Nuclear Society, 97:630, 2007. Publisher: American Nuclear Society.
 WH98
John C. Wagner and Alireza Haghighat. Automated variance reduction of Monte Carlo shielding calculations using the discrete ordinates adjoint function. Nuclear Science and Engineering, 128(2):186–208, 1998. Publisher: Taylor & Francis.
 WH03
James M. Willenbring and Michael Allen Heroux. Trilinos users guide. Technical Report SAND20032952, Sandia National Laboratories, 2003.