\documentclass[11pt]{article}

% Packages

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}

% Style

\newcommand{\Keywords}[1]{\vspace{12pt}\par\noindent
{\small{\bf Keywords\/}: #1}}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\thesection.\Alph{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\renewcommand{\thetable}{\Roman{table}}

% Helpers

\newcommand{\E}[1]{\times10^{#1}}
\newcommand{\A}[0]{\mathbb{A}}
\newcommand{\F}[0]{\mathbb{F}}
\newcommand{\M}[0]{\mathbb{M}}
\newcommand{\SRC}[0]{\mathbb{S}}
\newcommand{\braket}[2]{\left<#1\middle|#2\right>}
\newcommand{\brabiket}[3]{\left<{#1\left|#2\right|#3}\right>}
\newcommand{\iso}[2]{$^{#2}\mathrm{#1}$}
\newcommand{\tild}[0]{\sim\!\!}

\begin{document}

\title{Analysis of local void coefficients of reactivity in the reduced moderation BWR}
\author{Jeffrey E. Seifried \and Ehud Greenspan\footnote{Email: gehud@nuc.berkeley.edu}\\
\em University of California Berkeley\\
\em Department of Nuclear Engineering\\
\em 4155 Etcheverry Hall, MC 1730\\
\em Berkeley, CA 94720, USA
}
\date{}
\maketitle

\begin{abstract}
    An expression is derived for attributing the reactivity response due to perturbations to spectral, spatial, and isotopic effects.
    It is shown to be consistent at a global level with similar expressions derived in previous work, but can provide more detailed information on the physics phenomena contributing to the reactivity response of the perturbation.
    Using this expression, the reactivity effect of local coolant density perturbations -- local VCR -- are studied for two reduced-moderation BWR core designs: the RBWR-Th and RBWR-AC as well as for a standard ABWR.
    The RBWR core designs feature large axial variation in their neutron spectra.

    The axial distribution of local VCR along the RBWR-Th seed and along the ABWR core were found to have the same general shape: negative throughout but most negative near the bottom and asymptotically approaching zero towards the top.
    However, the RBWR-Th VCR is roughly 4 times more negative.
    The RBWR-AC local VCR axial distribution varies greatly -- it is very close to zero in the seed regions and has a significant positive component in the central blanket.

    Three effects were identified as contributing to the VCR due to a local water density change in the lower part of the RBWR-Th seed -- local spectrum hardening that tends to increase the local reproduction factor ($\eta_r$) of each of the fuel isotopes; a redistribution of the local neutron absorption between the fuel isotopes resulting in a shift of absorptions from higher to lower isotopic reproduction factors and, hence, to a reactivity loss; and an axial flux tilt across the core from axial zones of higher $\eta_r$ to axial zones of lower $\eta_r$ which makes another negative contribution to the reactivity worth of the perturbation.

    \Keywords{coefficients of reactivity, attribution, feedback}
\end{abstract}

\pagebreak

\section{Introduction}
\label{sec:intro}

Coefficients of reactivity are typically quantified for global perturbations such as a uniform $50K$ increase of fuel temperature or a $10\%$ decrease in coolant flow-rate within a flow channel.
Such perturbations can be thought of as the simultaneous occurrence of a set of local perturbations which, for small enough perturbations, are independent of one another.

In certain core types, such as the Reduced moderation Boiling Water Reactor (RBWR) \cite{ganda2012sst,takeda2007blt} core, local perturbations invoke either negative or positive reactivity responses depending on the axial location.
Even when the global reactivity coefficient is slightly negative, there exists the possibility for instability in such cores.
The objective of this work is to attribute the cause of a local reactivity response to their underlying physical mechanisms.
Understanding of these mechanisms provides useful insight which can guide an effective search for optimal core designs.
This work provides tools to conduct such an analysis and demonstrates their utility with three core designs.

In Section \ref{sec:derive}, an expression is derived for attributing reactivity responses -- either global or local -- to the spatial, spectral, and isotopic dependence of neutron fission and capture reactions.
Section \ref{sec:equiv} demonstrates that, on a global basis, this expression is equivalent to those derived in previous work, but on a local (e.g., spatial, spectral, or, isotopic) basis, it is more informative.
Section \ref{sec:rbwrth} uses this new derivation and other tools to study local coolant void perturbations in the thorium-fueled RBWR (RBWR-Th) \cite{ganda2012sst} unit cell, which is described in Section \ref{sec:model}.
Section \ref{sec:other} performs similar analyses for the uranium-fueled RBWR (RBWR-AC) \cite{takeda2007blt} and conventional Advanced Boiling Water Reactor (ABWR) unit cells \cite{fennern2007asr}.
Finally, the accuracy of estimating the reactivity response to global perturbations from the reactivity response to local perturbations is addressed in Section \ref{sec:accuracy}.

\section{An Expression for Attributing Reactivity to System Components}
\label{sec:derive}

For infinite systems, the multiplication factor (k) is defined as:
\begin{equation}
    k\equiv \frac{\F}{\A}
\end{equation}
where $\F$ and $\A$ -- the fission neutron birth rate and neutron absorption rate, respectively -- are defined as:
\begin{equation}
    \begin{split}
    \F \equiv \int_V d\vec{r} \int_0^\infty dE \int_{4\pi} d\vec\Omega \; \nu(\vec r, E) \Sigma_f(\vec r, E) \psi(\vec r, E, \vec\Omega) \\
    \A \equiv \int_V d\vec{r} \int_0^\infty dE \int_{4\pi} d\vec\Omega \; \Sigma_a(\vec r, E) \psi(\vec r, E, \vec\Omega)
    \end{split}
\end{equation}
where $\nu$, $\Sigma_f$, $\Sigma_a$, and $\psi$ are the number of neutrons born per fission, macroscopic fission and absorption cross sections, and neutron flux and $\vec r$, $E$, and $\vec\Omega$ are the spatial, spectral, and directional neutron phase-space coordinates.
Reactivity ($\rho$) is defined as:
\begin{equation}
    \rho \equiv \frac{k-1}{k} = 1-\frac{\A}{\F}.
\end{equation}

A coefficient of reactivity ($\alpha$) measures the linear effect of a perturbation of a parameter ($p$) upon $\rho$.
It can be estimated directly with finite difference using nominal and perturbed multiplication factors:
\begin{equation}
    \alpha \equiv \frac{\partial\rho}{\partial p}
    \approx \frac{\Delta \rho}{\Delta p}
    = \frac{1}{\Delta p} \frac{\Delta k}{k k^\prime}
    \label{eqn:kdiff}
\end{equation}
where $x^\prime$ denotes a perturbed quantity $x$ and $\Delta x = x^\prime - x$.
This will be referred to as the k-difference approach.
Alternatively, $\alpha$ can be expanded in $\F$ and $\A$ with the product rule:
\begin{equation}
    \alpha = \frac{\partial\rho}{\partial\F} \frac{\partial\F}{\partial p} + \frac{\partial\rho}{\partial\A} \frac{\partial\A}{\partial p}.
\end{equation}
In this second approach, while derivatives of $\rho$ can be evaluated analytically:
\begin{equation}
    \frac{\partial\rho}{\partial\F} = +\frac{1}{k\F} \quad \mathrm{and} \quad \frac{\partial\rho}{\partial\A} = -\frac{1}{k\A}
    \label{eqn:rhoAnal}
\end{equation}
it is formally possible to quantify the derivatives of $\F$ and $\A$ using perturbation theory \cite{greenspan1976dpt}:
\begin{equation}
    \begin{split}
    \frac{\partial\F}{\partial p} = \braket{\frac{\partial(\nu\Sigma_f)}{\partial p}}{\psi} - \brabiket{\psi^\dagger}{\frac{\partial\M}{\partial p}}{\psi} \\
    \M\psi = \SRC \quad \mathrm{and} \quad \M^\dagger \psi^\dagger = \SRC^\dagger = \frac{\partial\F}{\partial\psi}
    \end{split}
    \label{eqn:pertF}
\end{equation}
and:
\begin{equation}
    \begin{split}
    \frac{\partial\A}{\partial p} = \braket{\frac{\partial(\Sigma_a)}{\partial p}}{\psi} - \brabiket{\psi^\dagger}{\frac{\partial\M}{\partial p}}{\psi} \\
    \M\psi = \SRC \quad \mathrm{and} \quad \M^\dagger \psi^\dagger = \SRC^\dagger = \frac{\partial\A}{\partial\psi}
    \end{split}
    \label{eqn:pertA}
\end{equation}
where $\psi^\dagger$, $\M$, and $\SRC$ are the adjoint flux, neutron transport operator, and neutron source term and the bra-ket notation is used for inner products.
For critical systems, the neutron source term is the fission source term divided by k.
The adjoint transport equations in Equations \ref{eqn:pertF} and \ref{eqn:pertA} must be solved using Generalized Perturbation Theory, for which shortcut estimators for the adjoint distribution like the Iterated Fission Probability \cite[864-869]{henry1964nk} offer no assistance.
Solution of these equations requires the two adjoint sources to first be estimated using ordinary transport and then multiple fixed-source adjoint transport calculations.
The task is difficult and computationally expensive to perform accurately and convenient tools do not currently exist.
Consequently a direct perturbation approach, not based upon adjoint theory, is chosen for the present analysis.

For such a direct approach, second-order accuracy can be achieved by evaluating the derivatives of $\rho$ in Equation \ref{eqn:rhoAnal} at the nominal and perturbed states and taking the average (i.e., the trapezoidal rule) and derivatives in $\F$ and $\A$ can be estimated using finite difference:
\begin{equation}
    \alpha \approx \frac{1}{2} \left(\frac{1}{k^\prime \F^\prime} + \frac{1}{k\F}\right)\frac{\Delta \F}{\Delta p} - \frac{1}{2} \left(\frac{1}{k^\prime \A^\prime} + \frac{1}{k\A}\right)\frac{\Delta \A}{\Delta p}
\end{equation}
$\Delta\F$ and $\Delta\A$ are the total scalar differences in neutron birth and absorption rates; they are distributed over a multi-dimensional phase-space of geometric space, neutron energy, neutron direction, isotope, and reaction type.
They can be calculated from continuous integrals or summations over discrete regions ($\xi$) of that phase-space.
Because the difference of a sum of elements can be written as the sum of differences of those elements, $\Delta\F$ and $\Delta\A$ can be expressed in a more illustrative form:
\begin{equation}
    \Delta \F = \sum_\xi w_\xi \left(\F_\xi^\prime - \F_\xi \right) \quad \mathrm{and} \quad \Delta \A = \sum_\xi w_\xi \left(\A_\xi^\prime - \A_\xi\right)
\end{equation}
where $w_\xi$ is the width of a discrete region of $\xi$.
Written this way, distributions of $\alpha$ over $\xi$ can be found.
Each region in phase-space can be said to have its own contribution ($\alpha_\xi$) to the overall coefficient of reactivity:
\begin{equation}
    \alpha = \sum_\xi w_\xi \alpha_\xi
\end{equation}
where:
\begin{equation}
    \alpha_\xi \approx \frac{1}{2 \Delta p} \left[\left(\frac{1}{k^\prime \F^\prime} + \frac{1}{k\F}\right)\Delta \F_\xi - \left(\frac{1}{k^\prime \A^\prime} + \frac{1}{k\A}\right)\Delta \A_\xi \right].
    \label{eqn:alpha2}
\end{equation}
Particular insight can be gained by examining the $\Delta \F_\xi$ and $\Delta \A_\xi$ terms of Equation \ref{eqn:alpha2} in isolation, in addition to the net of the two terms.

In later sections, $\alpha_\xi$ will be summed over all but a single dimension, providing its distribution over spatial ($\alpha_r$), spectral ($\alpha_E$), nuclear reaction ($\alpha_x$), and isotopic ($\alpha_i$) bins.
For example, the spatial distribution of $\alpha$ can be calculated as:
\begin{equation}
    \alpha_r = \sum_{E,x,i} \alpha_\xi  = \sum_{E,x,i} \alpha_{r,E,x,i}
\end{equation}
This $r/E/x/i$ subscript notation will also be used for other quantities which are distributed over $\xi$.

\section{Equivalency with Absorption and Fission Normalization Derivations}
\label{sec:equiv}

In past work, expressions for attributing coefficients of reactivity have been derived using so called absorption and fission normalizations \cite{ganda2010sst}.
This section shows that these two previous derivations for coefficients of reactivity ($\alpha_\A$ and $\alpha_\F$ respectively) are equivalent to the first-order portion of Equation \ref{eqn:alpha2} ($\alpha_1$) when each expression is summed over $\xi$.
Before this comparison can be made, Equation \ref{eqn:alpha2} is rearranged into a first-order term:
\begin{equation}
    \alpha_{\xi,1} = \frac{1}{\Delta p} \left[\frac{\Delta\F_\xi}{k^\prime\F} - \frac{\Delta\A_\xi}{k\A}\right]
    \label{eqn:alpha1}
\end{equation}
and a second-order term:
\begin{equation}
    \alpha_{\xi,2} = \frac{1}{2\Delta p} \left[\left(\frac{\Delta k}{k} - \frac{\Delta\F}{\F^\prime}\right)\frac{\Delta\F_\xi}{k^\prime \F} + \left(\frac{\Delta\F}{\F^\prime}\right)\frac{\Delta\A_\xi}{k\A}\right].
\end{equation}
The $\alpha_{\xi,2}$ expression is said to be second-order because its terms contain products of differences terms.

In order to derive $\alpha_\A$, perturbed and nominal neutron birth rate distributions are first normalized by the rate of neutrons absorbed in the system and then subtracted:
\begin{equation}
    \Delta k_{\xi,\A} \equiv \frac{\F_\xi^\prime}{\A^\prime} - \frac{\F_\xi}{\A} = k^\prime \frac{\F_\xi^\prime}{\F^\prime} - k \frac{\F_\xi}{\F}.
\end{equation}
Next, equal terms ($k \frac{\F_\xi^\prime}{\F} = k^\prime \frac{\F_\xi^\prime}{\F^\prime} \frac{\A^\prime}{\A}$) are added and subtracted:
\begin{equation}
    \begin{split}
        \Delta k_{\xi,\A}=\left(k \frac{\F_\xi^\prime}{\F} - k \frac{\F_\xi}{\F}\right) + \left(k^\prime \frac{\F_\xi^\prime}{\F^\prime}\frac{\A}{\A} - k^\prime \frac{\F_\xi^\prime}{\F^\prime}\frac{\A^\prime}{\A}\right) \\
        = k \frac{\Delta\F_\xi}{\F} - k^\prime \frac{\F_\xi^\prime}{\F^\prime}\frac{\Delta\A}{\A}.
    \end{split}
\end{equation}
Finally, upon invoking Equation \ref{eqn:kdiff}, the absorption-normalized expression for attribution is found:
\begin{equation}
    \alpha_{\xi,\A} = \frac{1}{\Delta p} \left[\frac{\Delta\F_\xi}{k^\prime \F} - \frac{\F_\xi^\prime}{\F^\prime} \frac{\Delta\A}{k\A}\right].
    \label{eqn:alphaA}
\end{equation}

In order to derive $\alpha_\F$, perturbed and nominal neutron absorption rate distributions are first normalized by the rate of neutrons born in the system and then subtracted:
\begin{equation}
    \Delta \rho_{\xi,\F} \equiv -\frac{\A_\xi^\prime}{\F^\prime} + \frac{\A_\xi}{\F} = -\frac{1}{k^\prime}\frac{\A_\xi^\prime}{\A^\prime} + \frac{1}{k}\frac{\A_\xi}{\A}.
\end{equation}
Next, equal terms ($\frac{1}{k} \frac{\A_\xi^\prime}{\A} = \frac{1}{k^\prime}\frac{\A_\xi^\prime}{\A^\prime}\frac{\F^\prime}{\F}$) are added and subtracted:
\begin{equation}
    \begin{split}
        \Delta \rho_{\xi,\F} = \left(\frac{1}{k^\prime}\frac{\A_\xi^\prime}{\A^\prime}\frac{\F^\prime}{\F} - \frac{1}{k^\prime}\frac{\A_\xi^\prime}{\A^\prime}\frac{\F}{\F}\right) - \left(\frac{1}{k}\frac{\A_\xi^\prime}{\A} - \frac{1}{k}\frac{\A_\xi}{\A}\right) \\
        = \frac{1}{k^\prime}\frac{\A_\xi^\prime}{\A^\prime}\frac{\Delta\F}{\F} - \frac{1}{k}\frac{\Delta\A_\xi}{\A}.
    \end{split}
\end{equation}
Finally, upon invoking Equation \ref{eqn:kdiff}, the fission-normalized expression for attribution is found:
\begin{equation}
    \alpha_{\xi,\F} = \frac{1}{\Delta p}\left[\frac{\A_\xi^\prime}{\A^\prime}\frac{\Delta\F}{k^\prime \F} - \frac{\Delta\A_\xi}{k\A}\right].
    \label{eqn:alphaF}
\end{equation}

While there are differences between the expressions for $\alpha_{\xi,\A}$, $\alpha_{\xi,\F}$, and $\alpha_{\xi,1}$ (Equations \ref{eqn:alpha1}, \ref{eqn:alphaA}, and \ref{eqn:alphaF}, respectively), when each is summed over $\xi$, the resulting expressions for $\alpha_\A$, $\alpha_\F$, and $\alpha_1$ are identical to each other and equal to the result given by k-difference approach (Equation \ref{eqn:kdiff}).
Although the three approaches are globally equivalent, $\alpha_{\xi,\A}$ cannot resolve contributions from $\Delta\A$ across $\xi$ because it only accounts for the total absorption rate and not its distribution.
Likewise, $\alpha_{\xi,\F}$ cannot resolve contributions from $\Delta\F$ across $\xi$ because it accounts for the total fission rate and not its distribution.
$\alpha_{\xi,1}$ and $\alpha_{\xi,2}$, on the other hand, account for the local contribution of both absorption and fission changes so that correct sign and magnitude can be attributed to each component.

\section{Description of the RBWR-Th Unit Cell}
\label{sec:model}

The RBWR-Th \cite{ganda2012sst} is a thorium fueled self-sustaining RBWR -- a design variant of the depleted uranium fueled self-sustaining RBWR-AC designed by HITACHI to fit within the ABWR pressure vessel \cite{takeda2007blt}.
The RBWR-Th departs from the RBWR-AC in several ways: thorium is used as the fertile fuel instead of depleted uranium, the internal axial blanket is eliminated elongating the fissile region, and absorbers in the upper and lower reflectors are removed.

As the present study focuses on the axial variation of the void coefficient of reactivity, the RBWR-Th core is modeled with a single pin unit cell consisting of a $1.005cm$ OD fuel pin segmented into a $50cm$ long lower blanket, a $111cm$ long central seed, and a $70cm$ long upper blanket and arranged in a hexagonal lattice of pitch $1.135cm$.
The mixed oxide fuel is assumed to be at $90\%$ of its nominal density ($0.061[a/b-cm]$) and is clad with $0.06cm$ thick metallic zirconium ($0.043[a/b-cm]$).
Fuel and clad are assumed to be at $900K$.
Lower and upper reflectors are modeled as pure water of a density corresponding to, respectively, the coolant inlet to and exit from the core.
Side and top views of the unit cell are shown in Fig. \ref{fig:xport}.

Before each cycle, blankets are charged with natural thoria and the seed is charged with the processed transthoria discharge harvested from the seed and blankets of the previous cycle.
During this fuel processing, all actinides are recycled and fission products are discarded.
All analysis is performed at fuel cycle equilibrium, when the charge of each successive cycle is the same.
Table \ref{tab:iso} shows the isotopic composition of the seed fuel region which is used.
MCNP6.1 is used for all neutron transport calculations \cite{lanl2013mcnp6}.

Because accurate determination of the RBWR-Th core performance requires tight coupling between neutronics and thermal/hydraulics, a one-dimensional heat balance and drift-flux model is coupled with neutron transport calculations to ensure that the axial distributions of two-phase coolant density and fission power are self-consistent across $57$ axial regions \cite{seifried2013aec}.
Each fuel pin provides $20kW$ of thermal power to boil the light water coolant -- which enters the core at $7.25MPa$ and $278.5 ^\circ C$ -- to an exit quality of $35\%$ corresponding to a void fraction of $\tild 80\%$.
For this model, a modified version of the Liao, Parlos, Griffith void fraction correlation is used \cite{shirvan2013bev}.

Fig. \ref{fig:rho} and Fig. \ref{fig:lhr} show the axial distribution of the water density and linear heat rate.
The region below $50cm$ is the lower blanket, above $161cm$ is the upper blanket, and in between is the seed.
The large differences in water density cause the neutron spectra to vary greatly along the core.
Fig. \ref{fig:flx} shows a typical flux spectrum for the RBWR-Th and compares it with that of the RBWR-AC, the ABWR, and a typical Sodium Fast Reactor (SFR).
The RBWR cores have intermediate flux spectra which are not as soft as the ABWR and not as hard as the SFR.

\section{Local Void Coefficients of Reactivity in the RBWR-Th}
\label{sec:rbwrth}

The local void coefficient of reactivity, or local VCR, is the linear reactivity response to a localized perturbation in the coolant density.
Such perturbations are estimated with a $10\%$ reduction in coolant density for a single axial region.
The coolant and fuel are segmented into $10$, $30$, and $15$ axial regions for the lower blanket, seed, and upper blanket regions, respectively.
VCRs are reported in pcm per $1\%$ increase in coolant void (or $1\%$ decrease in coolant density).

First, local VCRs are calculated using KPERT, a new tool in MCNP6.1 which is designed for efficient estimation of the reactivity response to perturbations \cite{kiedrowski2011awt}.
Although its accuracy can be limited for drastic perturbations, KPERT is very effective for quickly indicating trends and guiding attention to important spatial locations or isotopes.
In the same runtime required for a k-difference approach to calculate the reactivity effect of one perturbation, KPERT can simulate more than $50$.
MCNP also has an older perturbation tool PERT which does not perform as well as KPERT.
Fig. \ref{fig:verify} compares the k-difference estimates of the KPERT and PERT to direct k-difference calculations.
While KPERT results lie just outside of the error bars, PERT predictions differ by $\tild 1/3$ or more.
This is likely due to the large flux redistribution which occurs during the perturbation at position $b$, which KPERT can account for, but PERT cannot.
These conclusions were also found in other calculations.

More accurate and thorough direct analysis is then performed for coolant density perturbations at selected locations found of interest using the expressions for reactivity attribution derived in Sections \ref{sec:derive} and \ref{sec:equiv}.
Additional insight is gained by examining local reproduction factors (i.e., $\eta_r \equiv \frac{\F_r}{\A_r}$) and utilization factors (i.e., $f_r \equiv \frac{\A_r}{\A}$).
With this set of analyses, the cause for negative and positive local VCRs can be attributed to underlying physics in the RBWR-Th core.

Fig. \ref{fig:kpert} displays the local VCRs for the RBWR-Th core at Beginning Of Equilibrium Cycle calculated with KPERT.
It can be seen that local VCRs vary strongly along the core; they are negative along the seed region -- particularly so in its lower, softer spectrum part, while slightly positive in the blankets -- particularly adjacent to the seed.
Two local perturbations were selected for deeper analysis aimed at understanding the underlying physics: (a) the most positive local VCR within the lower blanket adjacent to the seed and ($b$) the most negative local VCR within the seed towards the inlet.
Perturbation $b$ is discussed first.

\subsection{The Most Negative Local VCR Within the RBWR-Th}
\subsubsection{Comparison of Different Formulations for VCR for Spatial Components}

Using expressions for $\alpha_\A$ and $\alpha_\F$ (Equations \ref{eqn:alphaA} and 21), the contribution of different axial zones to perturbation $b$'s VCR -- the VCR due to coolant density change in location $b$, were quantified and displayed in, respectively, Fig. \ref{fig:alphaAR} and Fig. \ref{fig:alphaFR}.
It is found that both $\F$ and $\A$ are depressed in the vicinity of the perturbation and $\F$ and $\A$ both shift away from the perturbation towards the outlet.
The first response will be shown due to localized spectral hardening resulting in a reduced fission probability and the second due to flux tilt caused by normalization by $\A$ and $\F$ rates.

Fig. \ref{fig:alpha1R} and Fig. \ref{fig:alpha2R} display the first- and second-order predictions for axial contributions to the overall local VCR from perturbation $b$, obtained using, respectively, Equations \ref{eqn:alpha1} and \ref{eqn:alpha2}.
As in case of $\alpha_\A$ and $\alpha_\F$, there are local spectral hardening effects and global flux tilt effects.
Spectral hardening has a net negative reactivity effect due to a localized reduction in the reproduction factor.
This is illustrated in Fig. \ref{fig:deltaEtaR} which plots the change in the location-dependent $\eta_r$ due to perturbation $b$.
The flux tilt also results in a net negative effect due to a spatial shift in the local utilization factor shown in Fig. \ref{fig:deltaEffR} as shown in Fig. \ref{fig:etaR} $\eta_r$ is highest near the core inlet where the flux spectrum is softest and decreases with elevation as the spectrum hardens with reduction in the coolant density.
As a result, $\sum_r{\eta_r\Delta f_r}$ is negative.
Although the two responses cannot be isolated, it is estimated that $60\%$ of the total reactivity effect is from spectrum hardening ($\sum_r{\Delta\eta_r f_r}$) and $40\%$ is from the flux tilt ($\sum_r{\eta_r \Delta f_r}$).

The k-difference approach estimates the overall local VCR for perturbation $b$ to be $-6.8 \pm 0.5 [pcm/\%-void]$.
In Table \ref{tab:deltaAlpha} the deviations between this estimate those of $\alpha_\A$, $\alpha_\F$, $\alpha_1$, and $\alpha_2$ are tabulated.
The associated p-values (i.e., the probability of observing the deviation given that there is no true deviation) demonstrate that these deviations are completely insignificant (i.e., $p>>5\%$), so all five approaches predict the same overall local VCR.
This conclusion was expected from inspection of the algebraic expressions.

The expressions do differ, however, in predicting the components (spatial, spectral, isotopic) of the reactivity.
For example, the contribution of the flux tilt in the upper region of the seed is positive as estimated with $\alpha_\A$ (Fig. \ref{fig:alphaAR}), but negative as estimated with $\alpha_\F$ (Fig. \ref{fig:alphaFR}).
$\alpha_1$ and $\alpha_2$, however, show that the region has an increase in both absorption and fission, but contributes practically no net reactivity worth.
This comparison brings to light a shortcoming of the $\alpha_\A$ and $\alpha_\F$ expressions, for examining components of the reactivity.

Although $\alpha_2$ is believed to be more accurate in estimating components of reactivity than $\alpha_1$ by virtue of its second-order terms, there currently is no benchmark to compare against.
Nonetheless, a comparison is made between the two expressions to quantify the magnitude of the second-order terms; the result is shown in Fig. \ref{fig:deltaAlphaR}.
Relative to $\alpha_1$,  $\alpha_2$ is estimating: 1) less positive and less negative contributions from changes in fission and absorption, respectively; 2) an enhanced, more negative contribution from the seed region; and 3) a reduced, less negative contribution from the blankets.
All following $\alpha_\xi$ values and distributions will be derived from the $\alpha_2$ expression.

\subsubsection{Isotopic Contributions}

The spectral hardening effect is further explored by examining $\alpha_\xi$ in the proximity of perturbation $b$ (the five axial regions bordering it), but binned over isotope ($i$) instead of axial region.
Fig. \ref{fig:alpha2I} displays these results for the isotopes which provide the largest reactivity worth.
It can be seen that fissile isotopes -- predominately \iso{U}{233}, \iso{U}{235} and \iso{Pu}{239} -- contribute a net negative reactivity, while non-fissile isotopes -- predominately \iso{Th}{232}, \iso{U}{234}, and \iso{U}{236} -- contribute a net positive reactivity.
Both classes of isotopes exhibit reductions in $\F$ and $\A$, but the reduction in $\F$ of \iso{U}{233} is the dominant.
Coolant and clad materials do not play a significant role in the reactivity response to perturbation $b$, contributing less than $5\%$ of the total worth.

Fig. \ref{fig:deltaEtaI} shows that spectral hardening increases isotopic $\eta_i$ values near perturbation $b$.
In order to understand the change in $\eta_i$ of the mixture of fuel isotopes, the perturbation effect on isotopic $f_i$ must also be considered.
Fig. \ref{fig:etaI} plots the $\eta_i$ value for each isotope and Fig. \ref{fig:deltaEffI} shows the changes in isotopic $f_i$ values which result from perturbation $b$, plotted over the same abscissa.
Even though the perturbation increases the $\eta_i$ values for every isotope, the net reactivity effect ($\sum_i{\Delta\eta_i f_i} + \sum_i{\eta_i \Delta f_i}$) is reduced by $185 \pm 31 [pcm]$.
This is because the perturbation shifts absorptions from higher $\eta_i$ (such as \iso{U}{233}) to lower $\eta_i$ such as \iso{U}{234}).
If the effect of \iso{U}{233} is excluded, the trend reverses and the change in the overall $\eta_i$ becomes slightly positive.

The underlying mechanisms which cause negative reactivity due to spectral hardening and flux tilt are identical: $f_i$ values shift from a phase-space of higher to lower $\eta_i$ values.
For the flux tilt response, that phase-space is axial position; for the spectral hardening response, the phase-space is isotopes in proximity to the perturbation.
Further insight can be obtained by studying the spectral characteristics of this latter response.

\subsubsection{Spectral Components}

Fig. \ref{fig:deltaFlx} shows the spectral hardening due to perturbation $b$, considering only those five axial regions which border perturbation $b$.
The flux shifts to the energy range between $10 keV$ and $1 MeV$ from, epithermal energies -- due to a reduced moderating power, and from above $1 MeV$ due to a reduced local fission rate and due to enhanced inelastic scattering probability by the fuel.
Fig. \ref{fig:alphaETh} and Fig. \ref{fig:alphaEU} show the impact these spectral changes have upon $\eta_E$ values for \iso{Th}{232} and \iso{U}{233} in proximity of perturbation $b$, as a function of the neutron energy. \iso{Th}{232} contributes a large increase in reactivity due to, primarily, a reduction in resonance absorption.
The slight reduction in the \iso{Th}{232} fast fission probability has only a very small negative effect on the reactivity coefficient.
The overall decrease in the neutron absorption probability due to local voiding is responsible for the net positive contribution to the reactivity worth of the other non-fissile isotopes as well.

Fig. \ref{fig:alphaEU} shows the energy-dependent contributions of \iso{U}{233} to the reactivity coefficient via the spectral effects on the absorption and fission probabilities.
It is observed that the spectrum hardening results in a significant increase in both the neutron absorption and neutron fission probabilities in, primarily, the epithermal energy range but the latter effect is dominant so the net reactivity worth is negative.
This trend also applies to each of the other fissile isotopes.

From the perspective of $f_E$ and $\eta_E$ values -- Fig. \ref{fig:deltaFlx} shows that the perturbation shifts spectral $f_E$ from, primarily, epithermal but also thermal and MeV energies to sub-MeV energies.
From examination of the energy dependence of the absorption cross section of the two most absorbing fuel isotopes in the RBWR-Th core displayed in Fig. \ref{fig:xs} it is expected that this redistribution shifts the local absorptions from primarily \iso{U}{233} to primarily \iso{Th}{232} which has a significantly lower $\eta_E$ value, thus reducing the local reactivity effect.

In summary, perturbation $b$ causes a spatial redistribution of power, which shifts flux away from axial regions with higher $\eta_r$ values and towards those with lower $\eta_r$ values.
Additionally, the perturbation causes localized spectral hardening which shifts absorption from isotopes with higher $\eta_i$ values to those with lower $\eta_i$ values, reducing the axial $\eta_r$ value in the vicinity of the perturbation.
While this spectral hardening also tends to increase localized $\eta_r$ values somewhat, the absorption redistribution is a larger effect.
Both the flux tilt and spectral hardening responses bring a negative reactivity worth, for an overall strong negative local VCR.

\subsection{The Most Positive Local VCR Within the RBWR-Th}

Perturbation $a$ is a reduction in the coolant density in axial zone a of the lower blanket that is close to the seed.
This voiding causes both a streaming response -- which has a very small reactivity effect -- and a flux tilt response -- which has a net positive reactivity worth.
The two responses can be resolved in Fig. \ref{fig:deltaEffRb}, which shows the change in axial $f_r$ due to perturbation $a$.

The streaming response is characterized by a reduced albedo of the lower blanket to neutrons that are generated in the seed and happen to leak into the lower blanket; the voided coolant increases the number of seed-born neutrons that stream beyond perturbation $a$, causing $f_r$ to shift downwards.
As can be seen in Fig. \ref{fig:etaR} the $\eta_r$ within this region of the blanket is negligibly small compared to the rest of the system (it is a fertile blanket, after all), so the spatial shift in $f_r$ brings no significant reactivity change.

The flux tilt response is similar to that from perturbation $b$, except that the seed power shifts downwards instead of upwards (Fig. \ref{fig:deltaEffR}).
The downwards flux tilt shifts local $f_r$ values from axial regions of lower to higher $\eta_r$ values (Fig. \ref{fig:etaR}).
The result is an increase in the effective $\eta$ (i.e., $\frac{\sum_r{\eta_r f_r}}{\sum_r{f_r}}$) for the system and, hence, a reactivity gain.
The localized spectral hardening response which was seen in the RBWR-Th system can't quite be resolved within the statistical uncertainty.
However, it is estimated that its contribution is negative and one-fifth the magnitude of the power-tilt response.

\section{Local Void Coefficients of Reactivity in the ABWR and RBWR-AC}
\label{sec:other}

The RBWR-Th inherits many of its core design features from the ABWR \cite{fennern2007asr} and RBWR-AC \cite{takeda2007blt}.
Following is a comparative local VCR analysis of the three systems; it can provide useful information on the uniqueness of the RBWR-Th core design.

Fig. \ref{fig:kpertAbwr} shows the axial distribution of ABWR local VCRs, as estimated with KPERT.
Comparing with Fig. \ref{fig:kpert} it is seen that the ABWR and RBWR-Th local VCRs have the same general shape: (1) both are negative throughout the active length of the seed fuel; (2) local VCRs are most negative in the lower quadrant of the active length; and (3) local VCRs asymptotically approach zero towards the outlet.
However, the RBWR-Th VCR gets to be $\tild 4$ times more negative and this may be of practical concern as it may cause instabilities and make it difficult to achieve adequate cold shutdown margin.
A recent study found \cite{gorman2014tfr} that by replacing $1/4$ to $1/3$ of the thorium of the makeup fuel by depleted uranium it is possible to make the VCR comparable in magnitude to that of the ABWR.

Fig. \ref{fig:kpertAc} plots the local VCR traverse for the RBWR-AC \cite{takeda2007blt}, as estimated with KPERT.
This VCR distribution differs greatly from that of the RBWR-Th (Fig. \ref{fig:kpert}) except for one feature: a sharp local minimum close to the bottom of each seed region.
But in the RBWR-AC the VCR does not have significant negative components; in fact, its average is close to a value of zero.
The RBWR-AC has large positive VCR values within the internal and upper blankets adjacent to the seeds but negative values at the bottom blanket.
The large VCR values in the RBWR-AC blankets are due to the use of depleted uranium fuel; \iso{U}{238} has a larger fast fission cross section than \iso{Th}{232} and its threshold energy is lower.
The most positive local perturbation $b$ at the bottom of the inner blanket is chosen for limited attribution analysis.

Fig. \ref{fig:alphaAc} shows the contribution to local VCR from all axial fuel regions.
The axial variations are significantly more complicated than those in the RBWR-Th -- (Fig. \ref{fig:alpha2R}).
Fig. \ref{fig:spectralAc} shows the axial spectral hardening response; it has noticeable components from the RBWR-AC lower seed and internal blanket axial zones in the proximity of the perturbed zone.
Fig. \ref{fig:tiltAc} shows that the axial extent of the flux tilt response is much wider -- from the bottom blanket to the upper seed.
Reduction in the coolant absorption probability contributes around one fifth of the reactivity effect.

Due to the complicated reactivity responses, it is difficult to isolate the spectral hardening and flux tilt responses from one another.
However, by summing over values in the two figures, it is estimated that localized spectral hardening is responsible for one-fifth of the local VCR and flux tilting contributes the other fourth-fifths.

A more thorough analysis of the local VCRs in the RBWR-AC core using the analysis methodology developed in this study, along with prolonged runtimes to reduce counting uncertainty, could help identifying RBWR-AC core designs that feature negative void coefficient of reactivity.

\section{Accuracy of the Linear Combination of Local Perturbations}
\label{sec:accuracy}

A primary assertion made in this work is that there is value in studying the reactivity response from local perturbations because their combined effect is a reasonable estimate of the global reactivity effect of the perturbations.
If this assertion is correct it is possible to construct a large number of global perturbations by linearly combining the effects of different combinations of local perturbations.
This section provides a simple sanity check by comparing the direct reactivity effect from a coolant flow-rate reduction with that estimated from linearly combining local void perturbations.

The direct estimate begins by iterating between neutron transport and thermal/hydraulic solutions until a tight convergence is obtained between the axial water density and axial power shape \cite{seifried2013aec}.
This is performed at the nominal flow conditions and at a $10\%$ reduced coolant flow-rate.
Multiplication factors for the nominal and perturbed state are extracted and plugged into Equation \ref{eqn:kdiff} for the coolant flow-rate coefficient of reactivity (FRCR).
The combined FRCR is calculated by taking the inner product of a system's local VCR traverse with the change in the void fraction traverse which results from the coolant flow-rate reduction and dividing by $10\%$.
The latter will be referred to as the inner product approach.
KPERT was used for estimating local VCR traverses.
Its accuracy can be inferred from the results provided in Fig. \ref{fig:verify}.

For the RBWR-Th the FRCR was calculated to be $-67.2 \pm 0.1 [pcm/\%]$ using the k-difference approach and $2.3 \pm 0.8\%$ (2.9 standard deviations) lower using the inner product approach.
For the RBWR-AC, the k-difference FRCR is $-2.7 \pm 0.1 [pcm/\%]$ while the inner product approach gave an estimate of $-1.8 \pm 0.4 [pcm/\%]$ that is $35 \pm 20\%$ too low.
This is probably due to strong non-linear effects in the strongly axially heterogeneous RBWR-AC core.

For typical core designs that feature a single seed zone agreement between the inner product and the k-difference approaches is quite good.
Because the inner product approach can provide estimates for a number of perturbations with the same runtime required for one k calculation, it is an efficient approach for scoping studies.

\section{Conclusions}
\label{sec:conclusion}

The expressions derived for estimating the reactivity effect of perturbations provide informative estimates of the total reactivity effect and of its components.
The methodology developed to quantify the spectral and flux tilt contributions to the reactivity effects of localized perturbations provide useful insight on the physics phenomena at play.
Additional useful insight is provided by quantifying the contribution to the reactivity effect of individual fuel isotopes and of the spectral and spatial components of this contribution.
Expressions derived in past work by absorption and fission normalization yield the same total reactivities, but can provide misleading information on the contribution of different phase-space variables to the global reactivity.

The axial distribution of local VCR along the RBWR-Th seed and along the ABWR core have the same general shape: negative throughout but most negative in the lower quadrant of the active length; the local VCRs asymptotically approach zero towards the outlet.
However, the RBWR-Th VCR gets to be $\tild 4$ times more negative and this may be of practical concern as it may cause instabilities and make it difficult to achieve adequate cold shutdown margin.
The RBWR-AC local VCR axial distribution differs greatly from that of the other two core types -- it is very close to zero in the seed regions and has a significant positive component in the central blanket.

Three types of spectral effects were identified contributing to the VCR due to a local water density change in the lower part of the RBWR-Th seed -- local spectrum hardening that tends to increase the local reproduction factor ($\eta$) of each of the fuel isotopes; a redistribution of the local neutron absorption between the fuel isotopes resulting in a shift of absorptions from higher $\eta_i$ to lower $\eta_i$ isotopes and, hence, to a reactivity loss; and axial flux tilt across the core from axial zones of higher $\eta_r$ to axial zones of lower $\eta_r$ which makes another negative contribution to the reactivity worth of the perturbation.
The underlying mechanisms which cause negative reactivity due to the latter two effects are identical: $f_\xi$ values shift from a phase-space $\xi$ of higher $\eta_\xi$ to a phase-space of lower $\eta_\xi$ values.

The KPERT tool was found to be very effective at providing accurate estimates for the reactivity response from local perturbations.
A limited check showed that linear superposition of the reactivity effect of local perturbations provides a good estimation of the global perturbation reactivity effect for the RBWR-Th.
This is also expected to be the case for the ABWR core but not for the RBWR-AC core which is more sensitive to axial power tilts due to its unique heterogeneity.
A more thorough study to understand the shortcomings of the approach is warranted.

\section{Acknowledgements}

This research was performed using funding received from the U.S. Department of Energy Office of Nuclear Energy's Nuclear Energy University Programs.
This material is based upon work supported by the U.S. Department of Energy National Nuclear Security Administration under Award Number DE-NA0000979.

\appendix
\bibliographystyle{ans}
\bibliography{NSE14-104}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=0.45\textwidth, trim=0 0 0 0, clip]{./img/Th-xportSide.pdf}
  \hspace{0.1in}
  \includegraphics[width=0.45\textwidth, trim=0 0 0 0, clip]{./img/Th-xportTop.pdf}
  \caption{The RBWR-Th single-pin unit cell shown (left) from the side and (right) from above. Figures are not to scale.}
  \label{fig:xport}
\end{figure}

\clearpage
\begin{table}[ht]
    \centering
    \caption{Isotopic composition of the seed fuel region for the RBWR-Th single-pin unit cell.}
    \label{tab:iso}
    \begin{tabular}{| c | c | c |} \hline
    \textbf{Isotope} & \textbf{Number Density} \\
                     & \textbf{$[a/b/cm]$}     \\ \hline
    \iso{O}{16}      & $4.1259\E{-2}$          \\ \hline
    \iso{Th}{228}    & $7.5461\E{-7}$          \\ \hline
    \iso{Th}{229}    & $3.4110\E{-7}$          \\ \hline
    \iso{Th}{230}    & $7.9693\E{-7}$          \\ \hline
    \iso{Th}{232}    & $1.7153\E{-2}$          \\ \hline
    \iso{Pa}{231}    & $1.2033\E{-5}$          \\ \hline
    \iso{U}{232}     & $2.9986\E{-5}$          \\ \hline
    \iso{U}{233}     & $1.4777\E{-3}$          \\ \hline
    \iso{U}{234}     & $1.0605\E{-3}$          \\ \hline
    \iso{U}{235}     & $2.5392\E{-4}$          \\ \hline
    \iso{U}{236}     & $3.1760\E{-4}$          \\ \hline
    \iso{U}{238}     & $4.1905\E{-7}$          \\ \hline
    \iso{Np}{236}    & $4.7333\E{-9}$          \\ \hline
    \iso{Np}{237}    & $7.3786\E{-5}$          \\ \hline
    \iso{Pu}{238}    & $1.6406\E{-4}$          \\ \hline
    \iso{Pu}{239}    & $4.2105\E{-5}$          \\ \hline
    \iso{Pu}{240}    & $1.5521\E{-5}$          \\ \hline
    \iso{Pu}{241}    & $9.1368\E{-6}$          \\ \hline
    \iso{Pu}{242}    & $4.4926\E{-6}$          \\ \hline
    \iso{Pu}{244}    & $3.2513\E{-9}$          \\ \hline
    \iso{Am}{241}    & $4.2129\E{-6}$          \\ \hline
    \iso{Am}{242}    & $2.9638\E{-7}$          \\ \hline
    \iso{Am}{243}    & $1.8736\E{-6}$          \\ \hline
    \iso{Cm}{242}    & $3.0946\E{-9}$          \\ \hline
    \iso{Cm}{243}    & $1.5450\E{-7}$          \\ \hline
    \iso{Cm}{244}    & $2.6789\E{-6}$          \\ \hline
    \iso{Cm}{245}    & $1.8284\E{-6}$          \\ \hline
    \iso{Cm}{246}    & $1.5318\E{-6}$          \\ \hline
    \iso{Cm}{247}    & $2.5120\E{-7}$          \\ \hline
    \iso{Cm}{248}    & $2.5165\E{-7}$          \\ \hline
    \iso{Cf}{249}    & $6.0420\E{-8}$          \\ \hline
    \iso{Cf}{250}    & $9.3489\E{-9}$          \\ \hline
    \iso{Cf}{251}    & $1.0228\E{-8}$          \\ \hline
    \iso{Cf}{252}    & $8.4902\E{-10}$         \\ \hline
    \end{tabular}
\end{table}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-waterDensity.pdf}
  \caption{Axial distribution of the RBWR-Th water density.}
  \label{fig:rho}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-lhr.pdf}
  \caption{Axial distribution of the RBWR-Th linear heat rate.}
  \label{fig:lhr}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/fluxSpectra.pdf}
  \caption{Comparison of normalized flux spectra for the RBWR-AC, RBWR-Th, a typical SFR, and the ABWR.}
  \label{fig:flx}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-Verify.pdf}
  \caption{Reactivity response from a 10\% local voiding of coolant density, estimated with KPERT, PERT, and k-difference. The KPERT estimate for the perturbation at position $a$ exactly matches k-difference, so the markers overlap. Perturbations at positions $c$ and $d$ are not discussed in this work.}
  \label{fig:verify}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-KPERT.pdf}
  \caption{Axial traverse of RBWR-Th local VCRs estimated with KPERT. Perturbations $a$ and $b$ have the most positive and negative reactivity worths.}
  \label{fig:kpert}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-TraverseAlphaA.pdf}
  \caption{Absorption-normalized estimate ($\alpha_\A$) for the contribution from axial regions to the VCR due to local void perturbation $b$. Effectively shown are the changes in fission neutron births per neutron absorbed in the entire system.}
  \label{fig:alphaAR}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-TraverseAlphaF.pdf}
  \caption{Fission-normalized estimate ($\alpha_\F$) for the contribution from axial regions to the reactivity response to local void perturbation $b$. Effectively shown are the changes in neutron absorptions per fission neutron born in the entire system.}
  \label{fig:alphaFR}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-TraverseAlpha1.pdf}
  \caption{First-order estimate ($\alpha_1$) of the contribution from axial regions to the reactivity response to local void perturbation $b$. Effectively shown are changes in fission neutron births, neutron absorptions, and their net sum.}
  \label{fig:alpha1R}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-TraverseAlpha2.pdf}
  \caption{Second-order estimate ($\alpha_2$) of the contribution from axial regions to the reactivity response to local void perturbation $b$. Effectively shown are changes in fission neutron births, neutron absorptions, and their net sum.}
  \label{fig:alpha2R}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-TraverseDeltaEta.pdf}
  \caption{Change in the axial reproduction factor ($\eta_r$) due to perturbation $b$. Voiding reduces $\eta_r$ locally but otherwise does not affect $\eta_r$ values.}
  \label{fig:deltaEtaR}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-TraverseDeltaEff.pdf}
  \caption{Change in the axial utilization factor ($f_r$) due to perturbation $b$. Voiding shifts $f_r$ from the perturbation vicinity to, primarily, upper part of the seed.}
  \label{fig:deltaEffR}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-TraverseEta.pdf}
  \caption{The RBWR-Th axial reproduction factor ($\eta_r$) is highest near the coolant inlet and decreases with elevation due to coolant boiling.}
  \label{fig:etaR}
\end{figure}

\clearpage
\begin{table}[ht]
    \centering
    \caption{Deviations of estimates for the total reactivity worth of perturbation $b$, between predicted by each of the four perturbation expressions and the k-difference expression. p-values quantify the statistical significance of each deviation.}
    \label{tab:deltaAlpha}
    \begin{tabular}{| c | c | c |} \hline
    \textbf{Expression} & \textbf{Deviation from}     & \textbf{p-value} \\
                        & \textbf{delta-k $[pcm/\%]$} & \textbf{$[\%]$}  \\ \hline
    $\alpha_\A$         & $0.00 \pm 1.1$              & $50$             \\ \hline
    $\alpha_\F$         & $0.00 \pm 1.0$              & $50$             \\ \hline
    $\alpha_1$          & $0.00 \pm 1.4$              & $50$             \\ \hline
    $\alpha_2$          & $0.05 \pm 1.1$              & $52$             \\ \hline
    \end{tabular}
\end{table}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-Traverse12Cmp.pdf}
  \caption{Difference between the second-order ($\alpha_2$) and first-order ($\alpha_1$) (calculated as $\alpha_2-\alpha_1$) estimates of the contribution from axial regions to the reactivity response to local void perturbation $b$. Due to the small difference between the two estimates, Monte Carlo counting uncertainties are relatively large.}
  \label{fig:deltaAlphaR}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-IsotopeAlpha2.pdf}
  \caption{Localized isotopic contribution to perturbation $b$'s local VCR. The net reactivity worths contributed by fissile isotopes are negative while those from non-fissile isotopes are positive.}
  \label{fig:alpha2I}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0, clip]{./img/Th-b-IsotopeDeltaEta.pdf}
  \caption{Localized change in isotopic reproduction factors $\eta_i$ due to perturbation $b$. All values are positive.}
  \label{fig:deltaEtaI}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-IsotopeEta.pdf}
  \caption{Isotopic reproduction factors $\eta_i$, in proximity to perturbation $b$.}
  \label{fig:etaI}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-IsotopeDeltaEff.pdf}
  \caption{Change in isotopic utilization factors $f_i$, in proximity to perturbation $b$.}
  \label{fig:deltaEffI}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.2in, clip]{./img/Th-b-SpectraFlux.pdf}
  \caption{Localized change in flux spectrum due to perturbation $b$, normalized to an integral of unity.}
  \label{fig:deltaFlx}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-SpectraAlpha2-Th-232.pdf}
  \caption{Localized \iso{Th}{232} energy-dependent contribution to perturbation $b$'s VCR. An overall positive reactivity response results from reduced resonance-energy absorptions.}
  \label{fig:alphaETh}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-b-SpectraAlpha2-U-233.pdf}
  \caption{Localized \iso{U}{233} energy-dependent contribution to perturbation $b$'s VCR. An overall negative reactivity response is due to reduced thermal and epithermal fissions.}
  \label{fig:alphaEU}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/XsAbsorption.pdf}
  \caption{Energy dependent absorption cross section of \iso{Th}{232} and \iso{U}{233}.}
  \label{fig:xs}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/Th-a-TraverseDeltaEff.pdf}
  \caption{Change in the local utilization factor $f_r$ due to perturbation $a$. Voiding shifts $f_r$ from the top to the bottom of the core.}
  \label{fig:deltaEffRb}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/ABWR-KPERT.pdf}
  \caption{Axial traverse of ABWR local VCRs estimated with KPERT. The overall shape is similar to that of the RBWR-Th seed region, shown in Fig. \ref{fig:kpert}.}
  \label{fig:kpertAbwr}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/AC-KPERT.pdf}
  \caption{Axial traverse of RBWR-AC local VCRs estimated with KPERT. Perturbations $a$ and $b$ result in the most negative and positive reactivity worth. The seed regions -- from $28$ to $47.3cm$ and from $99.3$ to $127.3cm$, are sandwiched between the three axial blanket regions.}
  \label{fig:kpertAc}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/AC-TraverseAlpha2.pdf}
  \caption{Total contribution from axial fuel regions to the reactivity response to local void perturbation $b$.}
  \label{fig:alphaAc}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/AC-TraverseDeltaEtaEff.pdf}
  \caption{Spectral hardening contribution ($\sum_r{\Delta\eta_r f_r}$) from axial fuel regions to the reactivity response to local void perturbation $b$.}
  \label{fig:spectralAc}
\end{figure}

\clearpage
\begin{figure}[p]
  \centering
  \includegraphics[width=\textwidth, trim=0 0 0 0.275in, clip]{./img/AC-TraverseEtaDeltaEff.pdf}
  \caption{Flux tilt contribution ($\sum_r{\eta_r \Delta f_r}$) from axial fuel regions to the reactivity response to local void perturbation $b$.}
  \label{fig:tiltAc}
\end{figure}

\end{document}


\chapter*{Overview of Scheme}

This paper gives an overview of
the small language of \rsevenrs.
The purpose of this overview is to explain
enough about the basic concepts of the language to facilitate
understanding of the \rsevenrs{} report, which is
organized as a reference manual.  Consequently, this overview is
not a complete introduction to the language, nor is it precise
in all respects or normative in any way.

\vest Following Algol, Scheme is a statically scoped programming
language.  Each use of a variable is associated with a lexically
apparent binding of that variable.

\vest Scheme has latent as opposed to manifest types.  Types
are associated with objects (also called values) rather than
with variables.  (Some authors refer to languages with latent types as
untyped, weakly typed or dynamically typed languages.)  Other languages with
latent types are Python, Ruby, Smalltalk, and other dialects of Lisp.  Languages
with manifest types (sometimes referred to as strongly typed or
statically typed languages) include Algol 60, C, C\#, Java, Haskell, and ML.

\vest All objects created in the course of a Scheme computation, including
procedures and continuations, have unlimited extent.
No Scheme object is ever destroyed.  The reason that
implementations of Scheme do not (usually!) run out of storage is that
they are permitted to reclaim the storage occupied by an object if
they can prove that the object cannot possibly matter to any future
computation.  Other languages in which most objects have unlimited
extent include C\#, Java, Haskell, most Lisp dialects, ML, Python,
Ruby, and Smalltalk.

Implementations of Scheme must be properly tail-recursive.
This allows the execution of an iterative computation in constant space,
even if the iterative computation is described by a syntactically
recursive procedure.  Thus with a properly tail-recursive implementation,
iteration can be expressed using the ordinary procedure-call
mechanics, so that special iteration constructs are useful only as
syntactic sugar.

\vest Scheme was one of the first languages to support procedures as
objects in their own right.  Procedures can be created dynamically,
stored in data structures, returned as results of procedures, and so
on.  Other languages with these properties include Common Lisp,
Haskell, ML, Ruby, and Smalltalk.

\vest One distinguishing feature of Scheme is that continuations, which
in most other languages only operate behind the scenes, also have
``first-class'' status.  First-class continuations are useful for implementing a
wide variety of advanced control constructs, including non-local exits,
backtracking, and coroutines.

In Scheme, the argument expressions of a procedure call are evaluated
before the procedure gains control, whether the procedure needs the
result of the evaluation or not.  C, C\#, Common Lisp, Python,
Ruby, and Smalltalk are other languages that always evaluate argument
expressions before invoking a procedure.  This is distinct from the
lazy-evaluation semantics of Haskell, or the call-by-name semantics of
Algol 60, where an argument expression is not evaluated unless its
value is needed by the procedure.

Scheme's model of arithmetic provides a rich set of numerical types
and operations on them.  Furthermore, it distinguishes \textit{exact}
and \textit{inexact} numbers: Essentially, an exact number
object corresponds to a number exactly, and an inexact number
is the result of a computation that involved rounding or other approximations.

\chapter{Basic types}

Scheme programs manipulate \textit{objects}, which are also referred
to as \textit{values}.
Scheme objects are organized into sets of values called \textit{types}.
This chapter gives an overview of the fundamentally important types of the
Scheme language.

\begin{note}
  As Scheme is latently typed, the use of the term \textit{type} in
  the Scheme context differs from the use of the term in the context of other
  languages, particularly those with manifest typing.
\end{note}

\paragraph{Numbers}

Scheme supports a rich variety of numerical data types, including
integers of arbitrary precision, rational numbers, complex numbers, and
inexact numbers of various kinds.

\paragraph{Booleans}

A boolean is a truth value, and can be either
true or false.  In Scheme, the object for ``false'' is written
\schfalse{}.  The object for ``true'' is written \schtrue{}.  In
most places where a truth value is expected, however, any object different from
\schfalse{} counts as true.

\paragraph{Pairs and lists}

A pair is a data structure with two components.  The most common use
of pairs is to represent (singly linked) lists, where the first
component (the ``car'') represents the first element of the list, and
the second component (the ``cdr'') the rest of the list.  Scheme also
has a distinguished empty list, which is the last cdr in a chain of
pairs that form a list.

\paragraph{Symbols}

A symbol is an object representing a string,
the symbol's \textit{name}.
Unlike strings, two symbols whose names are spelled the same
way are never distinguishable.  Symbols are useful for many applications;
for instance, they can be used the way enumerated values are used in
other languages.

In \rsevenrs, unlike \rfivers, symbols and identifiers are case-sensitive.

\paragraph{Characters}

Scheme characters mostly correspond to textual characters.
More precisely, they are isomorphic to a subset of the \textit{scalar values} of
the Unicode standard, with possible implementation-dependent extensions.

\paragraph{Strings}

Strings are finite sequences of characters with fixed length and thus
represent arbitrary Unicode texts.

\paragraph{Vectors}

Vectors, like lists, are linear data structures
representing finite sequences of arbitrary objects.
Whereas the elements of a list are accessed
sequentially through the chain of pairs representing it,
the elements of a vector are addressed by integer indices.
Thus, vectors are more appropriate than
lists for random access to elements.

\paragraph{Bytevectors}

Bytevectors are similar to vectors, except that their contents
are \textit{bytes}, exact integers in the range 0 to 255 inclusive.

\paragraph{Procedures}

Procedures are values in Scheme.

\paragraph{Records}

Records are structured values, and are
aggregations of zero or more \textit{fields}, each of which holds a single location.
Records are organized into \textit{record types}.
A predicate, a constructor, and field accessors and
mutators can be defined for each record type.

\paragraph{Ports}

Ports represent input and output devices.  To Scheme, an input port is
a Scheme object that can deliver data upon command, while an output
port is a Scheme object that can accept data.

\chapter{Expressions}

The most important elements of Scheme code are
\textit{expressions}.  Expressions can be
\textit{evaluated}, producing a \textit{value} (actually, any number
of values.)  The most
fundamental expressions are literal expressions:

\begin{scheme}
\schtrue{} \ev \schtrue
23 \ev 23%
\end{scheme}

This notation means that the expression \schtrue{} evaluates to
\schtrue{}, that is, the value for ``true'',  and that the expression
{\cf 23} evaluates to a number representing the number 23.

Compound expressions are formed by placing parentheses around their
subexpressions.  The first subexpression identifies an operation; the
remaining subexpressions are operands to the operation:
%
\begin{scheme}
(+ 23 42) \ev 65
(+ 14 (* 23 42)) \ev 980%
\end{scheme}
%
In the first of these examples, {\cf +} is the name of
the built-in operation for addition, and {\cf 23} and {\cf 42} are the
operands.  The expression {\cf (+ 23 42)} reads as ``the sum of 23 and
42''.  Compound expressions can be nested---the second example reads
as ``the sum of 14 and the product of 23 and 42''.

As these examples indicate, compound expressions in Scheme are always
written using the same prefix notation.  As
a consequence, the parentheses are needed to indicate structure.
Consequently, ``superfluous'' parentheses, which are often permissible in
mathematical notation and also in many programming languages, are not
allowed in Scheme.

As in many other languages, whitespace (including line endings) is not
significant when it separates subexpressions of an expression, and
can be used to indicate structure.

\chapter{Variables and binding}

Scheme
allows identifiers to stand for locations containing values.
These identifiers are called variables.  In many cases, specifically
when the location's value is never modified after its creation, it is
useful to think of the variable as standing for the value directly.

\begin{scheme}
(let ((x 23)
      (y 42))
  (+ x y)) \ev 65%
\end{scheme}

In this case, the expression starting with {\cf let} is a binding
construct.  The parenthesized structure following the {\cf let} lists
variables alongside expressions: the variable {\cf x} alongside {\cf
  23}, and the variable {\cf y} alongside {\cf 42}.  The {\cf let}
expression binds {\cf x} to 23, and {\cf y} to 42.  These bindings are
available in the \textit{body} of the {\cf let} expression, {\cf (+ x
  y)}, and only there.

\chapter{Definitions}

The variables bound by a {\cf let} expression
are \textit{local}, because their bindings are visible only in the
{\cf let}'s body.  Scheme also allows creating top-level bindings for
identifiers as follows:

\begin{scheme}
(define x 23)
(define y 42)
(+ x y) \ev 65%
\end{scheme}

(These are actually ``top-level'' in the body of a top-level program or library.)

The first two parenthesized structures are \textit{definitions}; they
create top-level bindings, binding {\cf x} to 23 and {\cf y} to 42.
Definitions are not expressions, and cannot appear in all places
where an expression can occur.  Moreover, a definition has no value.

Bindings follow the lexical structure of the program:  When several
bindings with the same name exist, a variable refers to the binding
that is closest to it, starting with its occurrence in the program
and going from inside to outside, and referring to an outermost
binding if no
local binding can be found along the way:

\begin{scheme}
(define x 23)
(define y 42)
(let ((y 43))
  (+ x y)) \ev 66

(let ((y 43))
  (let ((y 44))
    (+ x y))) \ev 67%
\end{scheme}

\chapter{Procedures}

Definitions can also be used to define
procedures:

\begin{scheme}
(define (f x)
  (+ x 42))

(f 23) \ev 65%
\end{scheme}

A procedure is, slightly simplified, an abstraction of an
expression over objects.  In the example, the first definition defines a procedure
called {\cf f}.  (Note the parentheses around {\cf f x}, which
indicate that this is a procedure definition.)  The expression {\cf (f
  23)} is a procedure call meaning,
roughly, ``evaluate {\cf (+ x 42)} (the body of the procedure) with
{\cf x} bound to 23''.

As procedures are objects, they can be passed to other
procedures:
%
\begin{scheme}
(define (f x)
  (+ x 42))

(define (g p x)
  (p x))

(g f 23) \ev 65%
\end{scheme}

In this example, the body of {\cf g} is evaluated with {\cf p}
bound to {\cf f} and {\cf x} bound to 23, which is equivalent
to {\cf (f 23)}, which evaluates to 65.

In fact, many predefined operations of Scheme are provided not by
syntax, but by variables whose values are procedures.
The {\cf +} operation, for example, which receives
special syntactic treatment in many other languages, is just a regular
identifier in Scheme, bound to a procedure that adds numbers.  The
same holds for {\cf *} and many others:

\begin{scheme}
(define (h op x y)
  (op x y))

(h + 23 42) \ev 65
(h * 23 42) \ev 966%
\end{scheme}

Procedure definitions are not the only way to create procedures.  A
{\cf lambda} expression creates a new procedure as an object, with no
need to specify a name:

\begin{scheme}
((lambda (x) (+ x 42)) 23) \ev 65%
\end{scheme}

The entire expression in this example is a procedure call; {\cf
  (lambda (x) (+ x 42))}, evaluates to a procedure that takes a single
number and adds 42 to it.

\chapter{Procedure calls and syntactic keywords}

Whereas {\cf (+ 23 42)}, {\cf (f 23)}, and {\cf ((lambda (x) (+ x 42))
  23)} are all examples of procedure calls, {\cf lambda} and {\cf
  let} expressions are not.  This is because {\cf let}, even though
it is an identifier, is not a variable, but is instead a \textit{syntactic
  keyword}.  A list that has a
syntactic keyword as its first subexpression obeys special rules determined by
the keyword.  The {\cf define} identifier in a definition is also a
syntactic keyword.  Hence, definitions are also not procedure calls.

The rules for the {\cf lambda} keyword specify that the first
sublist is a list of parameters, and the remaining sublists are the body of
the procedure.  In {\cf let} expressions, the first sublist is a list
of binding specifications, and the remaining sublists constitute a body of
expressions.

Procedure calls can be distinguished from these
\textit{expression types} by
looking for a syntactic keyword in the first position of a list:
if the first position does not contain a syntactic keyword, the expression
is a procedure call.
The set of syntactic keywords of Scheme is
fairly small, which usually makes this task fairly simple.
It is possible, however, to create new bindings for syntactic keywords.

\chapter{Assignment}

Scheme variables bound by definitions or {\cf let} or {\cf lambda}
expressions are not actually bound directly to the objects specified in the
respective bindings, but to locations containing these objects.  The
contents of these locations can subsequently be modified destructively
via \textit{assignment}:
%
\begin{scheme}
(let ((x 23))
  (set! x 42)
  x) \ev 42%
\end{scheme}

In this case, the body of the {\cf let} expression consists of two
expressions which are evaluated sequentially, with the value of the
final expression becoming the value of the entire {\cf let}
expression.  The expression {\cf (set! x 42)} is an assignment, saying
``replace the object in the location referenced by {\cf x} with 42''.
Thus, the previous value of {\cf x}, 23, is replaced by 42.

\chapter{Derived syntax and macros}

Many of the expression types specified
as part of the \rsevenrs{} small language
can be translated into more basic expression types.
For example, a {\cf let} expression can be translated
into a procedure call and a {\cf lambda} expression.  The following two
expressions are equivalent:
%
\begin{scheme}
(let ((x 23)
      (y 42))
  (+ x y)) \ev 65

((lambda (x y) (+ x y)) 23 42) \lev 65%
\end{scheme}

Syntax expressions like {\cf let} expressions are called \textit{derived}
because their semantics can be
derived from that of other kinds of expressions by a syntactic
transformation.  Some procedure definitions are also derived expressions.  The
following two definitions are equivalent:

\begin{scheme}
(define (f x)
  (+ x 42))

(define f
  (lambda (x)
    (+ x 42)))%
\end{scheme}

In Scheme, it is possible for a program to create its own derived
expressions by binding syntactic keywords to macros:

\begin{scheme}
(define-syntax def
  (syntax-rules ()
    ((def f (p ...) body)
     (define (f p ...)
       body))))

(def f (x)
  (+ x 42))%
\end{scheme}

The {\cf define-syntax} construct specifies that a parenthesized
structure matching the pattern {\cf (def f (p ...) body)}, where {\cf
  f}, {\cf p}, and {\cf body} are pattern variables, is translated to
{\cf (define (f p ...) body)}.  Thus, the {\cf def} expression appearing in
the example gets translated to:

\begin{scheme}
(define (f x)
  (+ x 42))%
\end{scheme}

The ability to create new syntactic keywords makes Scheme extremely
flexible and expressive, allowing many of the features
built into other languages to be implemented directly in Scheme:
any Scheme programmer can add new expression types.

\chapter{Syntactic data and datum values}

\textit{Datum values} constitute a subset of Scheme objects.
These include booleans, numbers, characters, symbols,
and strings as well as lists, vectors, and bytevectors whose elements are datum values.  Each
datum value can be represented textually as a
\textit{syntactic datum}, which can be written out
and read back in without loss of information.
There is in general more than one syntactic datum corresponding to each datum value.
Moreover, each datum value
can be trivially translated to a literal expression in a program by
prepending a {\cf\singlequote} to a corresponding syntactic datum:

\begin{scheme}
'23 \ev 23
'\schtrue{} \ev \schtrue{}
'foo \ev foo
'(1 2 3) \ev (1 2 3)
'\#(1 2 3) \ev \#(1 2 3)%
\end{scheme}

The {\cf\singlequote} shown in the previous examples
is not needed for representations of literal constants other than
symbols and lists.
The syntactic datum {\cf foo} represents a
symbol with name ``foo'', and {\cf 'foo} is a literal expression with
that symbol as its value.  {\cf (1 2 3)} is a syntactic datum that
represents a list with elements 1, 2, and 3, and {\cf '(1 2 3)} is a literal
expression with this list as its value.  Likewise, {\cf \#(1 2 3)}
is a syntactic datum that represents a vector with elements 1, 2 and 3, and
{\cf '\#(1 2 3)} is the corresponding literal.

Syntactic datums are a superset of Scheme expressions.  Thus, data
can be used to represent Scheme expressions as data objects.  In
particular, symbols can be used to represent identifiers.

\begin{scheme}
'(+ 23 42) \ev (+ 23 42)
'(define (f x) (+ x 42)) \lev (define (f x) (+ x 42))%
\end{scheme}

This facilitates writing programs that operate on Scheme source code,
in particular interpreters and program transformers.

\chapter{Continuations}

Whenever a Scheme expression is evaluated there is a
\textit{continuation} wanting the result of the
expression.  The continuation represents an entire (default) future
for the computation.  For example, informally the continuation of {\cf 3}
in the expression
%
\begin{scheme}
(+ 1 3)%
\end{scheme}
%
adds 1 to it.  Normally these ubiquitous continuations are hidden
behind the scenes and programmers do not think much about them.  On
rare occasions, however, a programmer needs to deal with
continuations explicitly.  The {\cf call-with-current-continuation}
procedure allows
Scheme programmers to do that by creating a procedure that reinstates
the current continuation.  The {\cf call-with-current-continuation}
procedure accepts a procedure, calls it immediately with an argument
that is an \textit{escape procedure}.  This
escape procedure can then be called with an argument that becomes the
result of the call to {\cf call-with-current-continuation}.  That is,
the escape procedure abandons its own continuation, and reinstates the
continuation of the call to {\cf call-with-current-continuation}.

In the following example, an escape procedure representing the
continuation that adds 1 to its argument is bound to {\cf escape}, and
then called with 3 as an argument.  The continuation of the call to
{\cf escape} is abandoned, and instead the 3 is passed to the
continuation that adds 1:
%
\begin{scheme}
(+ 1 (call-with-current-continuation
       (lambda (escape)
         (+ 2 (escape 3))))) \lev 4%
\end{scheme}
%
An escape procedure has unlimited extent: It can be called after the
continuation it captured has been invoked, and it can be called
multiple times.  This makes {\cf call-with-current-continuation}
significantly more powerful than typical non-local control constructs
such as exceptions in other languages.

\chapter{Libraries}

Scheme code can be organized in components called
\textit{libraries}.  Each library contains
definitions and expressions.  It can import definitions
from other libraries and export definitions to other libraries.

The following library called {\cf (hello)} exports a definition called
{\cf hello-world},  and imports the base library
and the display library.
The {\cf hello-world} export is a procedure that displays {\cf Hello World}
on a separate line:
%
\begin{scheme}
(define-library (hello)
  (export hello-world)
  (import (scheme base)
          (scheme display))
  (begin
    (define (hello-world)
      (display "Hello World")
      (newline))))%
\end{scheme}

\chapter{Programs}

Libraries are invoked by other libraries, but ultimately by a Scheme
\textit{program}.  Like a library, a
program contains imports, definitions and expressions, and specifies
an entry point for execution.  Thus a program defines, via
the transitive closure of the libraries it imports, a Scheme program.

The following program obtains the first argument from the command line
via the {\cf command-line} procedure from the process-context
library.
It then opens the file using {\cf with-input-from-file},
which causes the file to be the current input port, and
arranges for it to be closed at the end.
Next, it calls the {\cf read-line} procedure to read a line of text
from the file, and then {\cf write-string} and {\cf newline} to
output the line, then looping until the end of file:
%
\begin{scheme}
(import (scheme base)
        (scheme file)
        (scheme process-context))
(with-input-from-file
  (cadr (command-line))
  (lambda ()
    (let loop ((line (read-line)))
      (unless (eof-object? line)
        (write-string line)
        (newline)
        (loop (read-line))))))%
\end{scheme}

\chapter{The REPL}

Implementations may provide an interactive session called a
\defining{REPL} (Read-Eval-Print Loop), where import declarations,
expressions and definitions can be
entered and evaluated one at a time.  The REPL starts out
with the base library imported, and possibly other libraries.
An implementation may provide a mode of operation in which the REPL
reads its input from a file.  Such a file is not, in general, the same
as a program, because it can contain import declarations in places other than
the beginning.

Here is a short REPL session.  The {\cf >} character represents the REPL's
prompt for input:

\begin{scheme}
> ; A few simple things
> (+ 2 2)
4
> (sin 4)
Undefined variable: sin
> (import (scheme inexact))
> (sin 4)
-0.756802495307928
> (define sine sin)
> (sine 4)
-0.756802495307928
> ; Guy Steele's three-part test
> ; True is true ...
> \#t
\#t
> ; 100!/99! = 100 ...
> (define (fact n)
    (if (= n 0) 1 (* n (fact (- n 1)))))
> (/ (fact 100) (fact 99))
100
> ; If it returns the *right* complex number,
> ; so much the better ...
> (define (atanh x)
    (/ (- (log (+ 1 x))
          (log (- 1 x)))
       2))
> (atanh -2)
-0.549306144334055+1.5707963267949i%
\end{scheme}

%%% Local Variables:
%%% mode: latex
%%% End:


%!TEX root = ../thesis.tex
%*******************************************************************************
%****************************** Second Chapter *********************************
%*******************************************************************************

\chapter{Preliminaries}

\ifpdf
    \graphicspath{{Chapter2/Figs/Raster/}{Chapter2/Figs/PDF/}{Chapter2/Figs/}}
\else
    \graphicspath{{Chapter2/Figs/Vector/}{Chapter2/Figs/}}
\fi

\section{Machine Learning}
\label{preliminaries:machine_learning}

Machine learning is a field in computer science that we try teaching the computers to do tasks without explicitly programmed \citep{samuel2000some, koza1996automated}. Machine learning is strongly associated with computational statistics, which explores data and builds algorithms that could find patterns in data and make predictions. More formal definition of the algorithms used in the machine learning is provided by Mitchell ``A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E`` \citep{mitchell1997machine}.

Typically, tasks in machine learning can be grouped into three wide categories \citep{russell1995modern}:

\begin{itemize}
\item Supervised learning: the given data contains input values and their desired output values, the aim of algorithms in supervised learning is to find a general rule that maps inputs to outputs. In this thesis we are focus on the supervised learning approach for our fraud detection problem,
\item Unsupervised learning: there are no desired outputs in the dataset, it means that we give the learning algorithms freely to explore a hidden structure of the data,
\item Reinforcement learning: this kind of learning is slightly different with the above, reinforcement learning builds a dynamic environment then let a computer interacts with it to perform a certain goal, after each action a feedback is provided to the computer as a reward or a punishment.
\end{itemize}

Supervised learning is a most common task in the world and can be seen as a function from labeled training data \citep{mohri2012foundations}. Given a set of $N$ data points of a form ${(x_1, y_1), \dots, (x_N, y_N)}$ such that $x_i$ is a attribute vector of the i-th data point and $y_i$ is its desired output, a supervised learning algorithm is a function $g: X \rightarrow Y$, where $X$ is an input space (matrix of attribute vectors) and $Y$ is a output space (matrix of desired outputs). Typically the function $g$ is in a function space $G$, or we could represent $g$ as a scoring function $f: X \times Y \rightarrow \mathbb{R}$ such that function $f$ will return the output value $y$ which has the highest score $g(x) = argmax_y f(x, y)$. For example, $g$ could be a conditional probability model $g(x) = P(y \mid x)$, e.g. logistic regression \citep{walker1967estimation, cox1958regression}, or $f$ could takes a form of a join t probability model $f(x, y) = P(x, y)$, e.g. naive Bayes \citep{russell1995modern}.

In order to measure a performance of learning function, we could define a loss function $L: Y \times Y \rightarrow \mathbb{R}$ and a risk $R(g)$ of learning function $g$ is defined as an expected loss of function $g$ which could be estimated by:

\begin{equation}
\widehat{R} (g) = \dfrac{1}{N} \sum_i L(y_i, g(x_i))
\end{equation}

\subsection*{Decision tree learning}

A decision tree learning is one common approach in data mining \citep{rokach2014data}, it aims to create a model that predicts values like making a decision from a tree-based analysis. An example is shown in the figure \ref{img:titanic_survival_decision_tree} \citep{decision_tree_learning}.

\begin{figure}
\includegraphics[scale=0.4]{Images/Titanic_Survival_Decison_Tree_SVG.png}
\centering
\caption{A tree showing survival of passengers on the Titanic}
\label{img:titanic_survival_decision_tree}
\end{figure}

A tree learner could classify the data points by splitting the input dataset into subsets based on a given criterion. The splitting process at each node is repeated in a recursive procedure until all data points are classified. There are two kinds of decision trees:

\begin{itemize}
\item Regression tree: create a tree to predict the desired output as a real number,
\item Classification tree: an analysis aims to predict a categorical output.
\end{itemize}

A term Classification and Regression Tree (CART) analysis is used to refer to both the above analysis \citep{breiman1984classification}. There are many decision tree algorithms, including:

\begin{itemize}
\item ID3 (Iterative Dichotomiser 3) \citep{quinlan1986induction},
\item C4.5: an extension of ID3 algorithm \citep{quinlan2014c4}.
\end{itemize}

Algorithms for constructing decision trees use different metrics for measuring which is the best feature to split the dataset. These measures compute the homogeneity of the output values within the subsets, some common measures in decision tree learning is Entropy, Information Gain, and Gini.

\subsection*{Ensemble learning}

In machine learning, ensemble learning is a method combines multiple learning algorithms to obtain better accuracy than from any individual algorithms \citep{opitz1999popular, rokach2010ensemble}. The term ensemble is usually reserved for methods that generate multiple hypotheses using the same base learner. There are three common types of ensemble learning, such as:

\subparagraph{Bootstrap aggregating (bagging)}

An ensemble technique is bootstrap aggregating which is usually called bagging (see figure \ref{img:bagging_ensemble}), it combines multiple learnings via their equal weight votes. In order to support the model variance, bagging trains each model from a randomly drawn subset. And a famous example of bagging is the Random Forest algorithm which uses random decision trees as base learners.

\begin{figure}
\includegraphics[scale=0.4]{Images/bagging.jpg}
\centering
\caption{Bagging ensemble \citep{raschka2015python}}
\label{img:bagging_ensemble}
\end{figure}

\subparagraph{Boosting}

Similar with the bagging ensemble, boosting is an incremental algorithm that will train each new model to underline the data points that previous models mis-classified (see figure \ref{img:boosting_ensemble}). Boosting could have a better accuracy than bagging in some cases, however it also tends to overfit to the training data. A most common boosting algorithm is Adaboost \citep{freund1999short}.

\begin{figure}
\includegraphics[scale=0.4]{Images/boosting.png}
\centering
\caption{Boosting ensemble \citep{raschka2015python}}
\label{img:boosting_ensemble}
\end{figure}

\subparagraph{Stacking}

Slightly different with these above techniques, stacking is a supervised learning algorithm that uses the predictions of several other learning algorithms as an input dataset to makes the final prediction (see figure \ref{img:stacking_ensemble}). All of the other algorithms are trained using the given dataset independently, then a combiner algorithm is trained on that which can be any algorithm. Therefore, stacking can theoretically represent any of the ensemble techniques, although in practice we often use the Logistic Regression or Linear Regression as the combiner.

\begin{figure}
\includegraphics[scale=0.4]{Images/stacking.png}
\centering
\caption{Stacking ensemble \citep{raschka2015python}}
\label{img:stacking_ensemble}
\end{figure}

\subsection*{Random Forest}

Random Forest \citep{breiman2001random} or random decision forests \citep{ho1995random, ho1998random} are an ensemble learning method for classification or regression that perform by constructing many trees, e.g. decision trees, then combine these results to makes final output values as a mode of the classes for classification tasks or a mean prediction for regression tasks. The Random Forest model based on two elements:

\begin{enumerate}
\item Base learner: each tree in the forest is the base learner, typically it is a weak learner with high variance,
\item Ensemble learning: combine the results of several weak learners to make a final prediction.
\end{enumerate}

The Decision Tree above that are grown very deep tend to overfit their training sets, i.e. have a low bias, but very high variance. We use the tree-based method as the base learner by its strength, and to handle its weakness we combine all of the predictions via ensemble learning. This method is called Random Forest, it can formulate the algorithm as the following statement: given a dataset $X = x_1, \dots, x_n$ with $n$ data points and respectively desired output values $Y = y_1, \dots, y_n$, bagging repeatedly $B$ times selects a random sample from the dataset $X$ then training trees on these samples.

\begin{algorithm}
   \caption{Tree bagging}
    \begin{algorithmic}
      \Function{bagging}{$X, Y, B$}

        \For{$b = 1$ to ${B}$}
            \State $(X_b, Y_b)$ is samples from $(X, Y)$ which have $n$ data points
            \State Train a classification or regression tree $f_b$ on $X_b, Y_b$
        \EndFor

       \EndFunction

\end{algorithmic}
\end{algorithm}

The authors of Random Forest have proposed using an average function to makes the final prediction in regression tasks or takes the majority vote in classification tasks \citep{breiman2001random}. However, there is no standard function as a combiner, thus we are free to choose the combination function. This bootstrapping procedure could decrease the variance of the model without increasing the bias. In order to estimate the uncertainty of the prediction, it could be computed as a standard deviation of the predictions from all the individual trees:

\begin{equation}
\sigma = \sqrt{ \dfrac{ \sum_{b=1}^B ( f_b(x) - \hat{f} ) }{ B - 1 } }
\end{equation}

Random Forest uses the above bagging algorithm with only one difference, it uses a modified tree that selects a random subset of the features to split a current subset data. Typically, the dataset has $p$ features then for a classification problem $\sqrt{p}$ features will be used in each split and for regression problems the inventor recommends that we should use $p/3$ as the number of features \citep{friedman2001elements}.

\section{Measurement}
\label{measurement_premilinaries}

The fraud detection problem is the classification task and in order to measure how well of the classifiers, there are many metrics could be used to evaluate the algorithms. In this section, we will review some common metrics which are typically used in classification tasks.

\subsection*{Accuracy}

Accuracy is a measure of statistical variablity which represent a percentage of correct predictions on the total number of cases examined. In the fields of science and engineering, the accuracy of a measurement system is the degree of closeness of measurements of a quantity to that quantity's true value \citep{bipm2008international}. Consider 2 sets with $n$ data points: the true labels from the given dataset $Y = {y_1, \dots, y_n}$ and our predicted values $\hat{Y} = {\hat{y_1}, \dots, \hat{y_n}}$, the accuracy is:

\begin{equation}
accuracy = \dfrac{ 1 }{ n } \sum_{i = 1}^n \mbox{1\hspace{-4.25pt}\fontsize{12}{14.4}\selectfont\textrm{1}}_{ y_i = \hat{y_i} }
\end{equation}

\subsection*{Precision and recall}

In pattern recognition, information retrieval and binary classification, precision and recall are two common metrics. Precision (also called positive predictive value) is the fraction of relevant data points among the given data points, and recall (also known as sensitivity) is the fraction of relevant data points that have been retrieved over the total amount of relevant data points (see figure \ref{img:precision_and_recall}).

\begin{figure}
\includegraphics[scale=0.35]{Images/Precisionrecall.png}
\centering
\caption{Precision and recall \citep{wiki2018precision_recall}}
\label{img:precision_and_recall}
\end{figure}

In the information retrieval contexts, precision and recall were defined by Perry, Kent \& Berry (1955) \citep{perry1955machine} as a set of retrieved elements and a set of relevant elements. Precision is the fraction of retrieved documents that are relevant to the query:

\begin{equation}
\text{precision} = \dfrac{ \mid {\text{relevant elements}} \cap {\text{retrieved elements}} \mid }{ \mid {\text{retrieved elements}} \mid }
\end{equation}

And the recall is the fraction of the relevant elements that are successfully retrieved:

\begin{equation}
\text{precision} = \dfrac{ \mid {\text{relevant elements}} \cap {\text{retrieved elements}} \mid }{ \mid {\text{relevant elements}} \mid }
\end{equation}

In the classification tasks, considers four terms true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN). Precision and recall are defined as \citep{olson2008advanced}:

\begin{equation}
\text{precision} = \dfrac{ TP }{ TP + FP }
\end{equation}

\begin{equation}
\text{recall} = \dfrac{ TP }{ TP + FN }
\end{equation}

\subsection*{Receiver operating characteristic (ROC)}

A receiver operating characteristic curve is a graphical plot which is created by plotting the true positive rate (TPR) against the false positive rate (FPR) at various threshold settings. ROC analysis provides tools to select a possible optimal threshold for models, an example ROC curve plot of three predictors of peptide cleaving in the proteasome is shown in figure \ref{img:roc_curve}.

\begin{figure}
\includegraphics[scale=2.5]{Images/Roccurves.png}
\centering
\caption{ROC curve of three predictors of peptide cleaving in the proteasome \citep{wiki2018roc}}
\label{img:roc_curve}
\end{figure}

\subsection*{Area under the ROC curve (AUC)}

We cannot compare classifiers base on the ROC because the ROC curve is just a graphical plot. In order to represent ROC performance as a single scala, a common method is to calculate the area under the ROC curve (AUC for short). Because the AUC is a size of the area of the unit square, therefore the AUC value will always be between 0 and 1. However, random guessing produces an area of 0.5, no realistic classifier should have an AUC less than 0.5 then it makes the baseline performance for all classifiers is 0.5. In summary, the AUC metric is a measure of how much the ROC curve is close to the point of perfect classification.

The AUC metric usually used in machine learning community for model comparison \citep{hanley1983method}. However, in practice researchers recently noticed that AUC was quite noisy as a classification measure \citep{hanczar2010small} and some other studies have other significant problems in model comparison \citep{lobo2008auc, hand2009measuring}.

\subsection*{F-score}

$F_1$ score (also F-score or F-measure) is a measure that considers both precision and recall by taking a harmonic average of these metrics.

\begin{equation}
F_1 = 2 \cdot \dfrac{ \text{precision} \cdot \text{recall} }{ \text{precision} + \text{recall} }
\end{equation}

A general formula of F-score for any positive real $\beta$ is:

\begin{equation}
F_\beta = (1 + \beta^2) \cdot \dfrac{ \text{precision} \cdot \text{recall} }{ (\beta^2 \cdot \text{precision}) + \text{recall} }
\end{equation}

Van Rijsbergen et al. \citep{van1979information} interpret $F_\beta$ that "measures the effectiveness of retrieval with respect to a user who attaches $\beta$ times as much importance to recall as precision". In practice, the F-score metric is often used in machine learning when the dataset is imbalanced because it isn't affected by the imbalance problem.