.. _origen-theory: =================== Method of solution =================== ORIGEN solves the system of ordinary differential equations (ODEs) that describe nuclide generation, depletion, and decay, .. math:: \frac{dN_{i}}{\text{dt}} = \sum_{j \neq i}{(l_{\text{ij}} \lambda_{j} + f_{\text{ij}}\sigma_{j}\Phi})N_{j}\left( t \right) - \left( \lambda_{i} + \sigma_{i}\Phi \right) N_{i}(t) + S_{i}(t) :label: eq-origen-odes where - :math:`N_{i}` = amount of nuclide *i* (atoms)\ *,* - :math:`\lambda_{i}` = decay constant of nuclide *i* (1/s)\ *,* - :math:`l_{\text{ij}}` = fractional yield of nuclide *i* from decay of nuclide *j,* - :math:`\sigma_{i}` = spectrum-averaged removal cross section for nuclide *i* (barn)\ *,* - :math:`f_{\text{ij}}` = fractional yield of nuclide *i* from neutron-induced removal of nuclide *j*, - :math:`\Phi` = angle- and energy-integrated time-dependent neutron flux (neutrons/cm\ :sup:`2`-s), and - :math:`S_{i}` = time-dependent source/feed term (atoms/s). Note that :eq:`eq-origen-odes` has no spatial dependence and can be interpreted as either a solution at a point in space or the spatial average over some volume. The latter interpretation is preferred here, such that :math:`\Phi` is the spatially averaged neutron flux magnitude, and all energy-dependence is embedded in the one-group flux-weighted average cross sections :math:`\sigma_{i}` and reaction yields :math:`f_{\text{ij}}`. :eq:`eq-origen-odes` is conveniently written in matrix form as .. math:: \frac{d\overrightarrow{N}}{dt} = \mathbf{A} \overrightarrow{N}\left( t \right) + \overrightarrow{S}(t) :label: eq-origen-tr-matrix with a :math:`\mathbf{A}` commonly referred to as the "transition matrix." The representation of the transition matrix as :math:`\mathbf{A = A}_{\sigma}\Phi\mathbf{+}\mathbf{A}_{\lambda}`, where :math:`\mathbf{A}_{\sigma}` is the part of the transition matrix containing reaction terms and :math:`\mathbf{A}_{\lambda}` is the part containing decay terms, is convenient, as the numerical solution of this system of ODEs holds the reaction, flux, and feed terms constant over step :math:`n`, .. math:: \frac{d\overrightarrow{N}}{\text{dt}} = \left( \mathbf {A}_{\sigma,n}\Phi_{n}\mathbf{+}\mathbf{A}_{\lambda} \right) \overrightarrow{N}\left( t \right) + {\overrightarrow{S}}_{n} :label: eq-origen-tr-matrix-soln over time step :math:`t_{n - 1} \leq t \leq t_{n}.` Adding a continuous removal process described with rate constant :math:`\lambda_{i,rem}` simply modifies the decay constant, :math:`\lambda_{i} \rightarrow \lambda_{i} + \lambda_{i,rem}`, whereas a continuous feed process defines a nonzero component of the :math:`{\overrightarrow{S}}` vector. ORIGEN can also compute the alpha, beta, neutron, and gamma emission spectra during decay. For the "stand-alone" ORIGEN calculations described here, the transition matrix is loaded from an ORIGEN binary library file (f33), which uses sparse-matrix storage to store one or more transition matrices. The f33s may be created using COUPLE, saved from TRITON depletion calculations, or interpolated using ARP from a set of precompiled f33s distributed with SCALE. Results from ORIGEN calculations may be stored on a binary concentration file (f71), which facilitates transfer of isotopics to other codes in SCALE. The f71 file can also store calculated emission spectra. Within ORIGEN, the f71 can be used to restart calculations from an existing set of compositions. .. _origen-method: Methodology =========== This section describes the methodology used in performing the following main functions: - generation of problem-dependent transition matrices, - solution of the system of depletion/decay equations, - conversion from power to flux (important for reactor applications), - calculation of emission spectra, and - interpolation of pregenerated sets of transition matrices. .. _origen-trans-matrix: Generation of Problem-dependent Transition Matrix ------------------------------------------------- In the transition matrix :math:`\mathbf{A}` from :eq:`eq-origen-tr-matrix`, each matrix element :math:`a_{\text{ij}}` is the first-order rate constant for the formation of nuclide *i* from nuclide *j* given below. .. math:: a_{ij} = \begin{cases} l_{ij}\lambda_{j} + f_{ij}\sigma_{j}\Phi & i \neq j \\ \lambda_{i} - \sigma_{i} \phi & \text{otherwise} \end{cases} :label: eq-origen-trm-terms The transition matrix coefficients for decay and reaction transitions are stored separately and reaction transitions are always stored with :math:`\Phi = 1` and later during solution of the system, depending on the step-average flux level the actual transition matrix :math:`{\mathbf{A}_{n}\mathbf{= A}}_{\sigma,n}\Phi_{n}\mathbf{+}\mathbf{A}_{\lambda}` is reconstructed using step-average flux, :math:`\Phi_{n}`. The decay coefficients :math:`l_{\text{ij}}\lambda_{j}` and :math:`\lambda_{i}` are generated directly from ORIGEN decay resource data. The reaction coefficients :math:`f_{\text{ij}}\sigma_{j}` and :math:`\sigma_{i}` are generated using the following two-stage procedure. 1. Calculate all removal cross sections :math:`\sigma_{i}` and yields :math:`f_{\text{ij}}`, including isomeric branching ratios and fission yields, by folding provided flux spectrum :math:`\phi^{g}` with multigroup cross sections from the ORIGEN reaction resource and energy-dependent fission yield data from the ORIGEN yield resource. 2. Overwrite specific removal cross sections and yields based on a provided multigroup cross section library (see the :ref:`SCALE Nuclear Data Libraries ` chapter) and/or user-provided one-group cross sections and yields. The second stage is optional, but it is important for cases which there is significant self-shielding because ORIGEN's reaction resource assumes infinite dilution for its multigroup data. The decay, reaction, and yeld resources mentioned here are described in the :ref:`ORIGEN Data Resources ` chapter. The collapse to a one-group cross section in either stage is given by .. math:: \sigma_{\text{ri}} = \frac{\sum_{g}{\sigma_{\text{ri}}^{g}\phi^{g}}}{\sum_{g}\phi^{g}} :label: eq-origen-collapse for reaction type :math:`r`, nuclide :math:`i`, and provided multigroup flux :math:`\phi^{g}`. Different reaction types are recognized by their ENDF MT numbers [SCALE Cross Section Libraries chapter] on the appropriate data resource For example, MT=16 is :math:`\left( n,2n \right),` and MT=107 is :math:`\left( n,\alpha \right)`. The removal cross section :math:`\sigma_{i}` is simply calculated as the sum over all relevant reactions for a particular nuclide, :math:`\sigma_{i} = \ \sum_{r}\sigma_{\text{ri}}`. This type of reaction-dependent multigroup data may be contained in either the data sources available in stage 1 or 2 above. However, only two types of data are expected to be available in stage 1 reaction resource data: (1) isomeric branching and (2) fission yields. The energy-dependent isomeric branching that describes the yield of each excited level (metastable state) of a daughter nucleus is calculated in a similar way, .. math:: f_{\text{rim}} = \frac{\sum_{g}{f_{\text{rim}}^{g} {\sigma_{\text{ri}}^{g}\phi}^{g}}} {\sum_{g}{\sigma_{\text{ri}}^{g}\phi^{g}}} :label: eq-origen-meta-branching where :math:`m` indicates the possible metastable states and the fractions always satisfy :math:`\sum_{m}f_{\text{rim}}^{\ } = 1`. Fission product yields are typically tabulated at discrete neutron energies such as thermal (0.0253 eV), fission (500 keV), and high energy (14 MeV). The yield for each fissionable nuclide is calculated in stage 1 by linearly interpolating the tabulated data using the computed average energy of fission, .. math:: {\overline{E}}_{\text{fi}} = \frac{\sum_{g}{{\overline{E}}^{g}{ \sigma_{\text{fi}}^{g}\phi}^{g}}}{\sum_{g}{\sigma_{\text{fi}}^{g}\phi^{g}}} :label: eq-origen-fpy where :math:`\sigma_{\text{fi}}^{g}` is the multigroup fission cross section, and :math:`{\overline{E}}^{g}` is the average energy in the group (simple midpoint energy used). In addition to generating transition data for daughter/residual nuclides, the coefficients for byproducts such as He-4/:math:`\alpha` byproducts from :math:`\left( n,\alpha \right)` reactions are also retained in the transition matrix and associated to an appropriate nuclide in the system: hydrogen, deuterium, tritium, :sup:`3`\ He, or :sup:`4`\ He. .. _origen-depletion-solution: Solution of the Depletion/Decay Equations ----------------------------------------- ORIGEN includes two solver kernels that can solve the depletion/decay equations of :eq:`eq-origen-tr-matrix-soln`: 1. a hybrid matrix exponential/linear chains method (MATREX) and 2. a Chebyshev Rational Approximation Method (CRAM). They are described in the following sections. .. _origen-matrex: MATREX ^^^^^^ Referring to the system of ODEs shown in :eq:`eq-origen-tr-matrix` and setting the external feed/source :math:`S\left( t \right) = 0`, there is a formal solution by matrix exponential (an analog to the solution of a single ODE of this type by exponential), .. math:: \overrightarrow{N}\left(t \right) = \exp\left(\mathbf{A}t \right) \overrightarrow{N}\left( 0 \right) :label: eq-origen-homo-soln where :math:`\overrightarrow{N}\left( 0 \right)` is a vector of initial nuclide concentrations, by defining the series expansion of :math:`exp(\mathbf{A}t\mathbf{)}` to be .. math:: \exp\left( \mathbf{A}t \right) = \mathbf{I + A}t + \frac{\left( \mathbf{A}t \right)^{2}}{2} + \ldots = \sum_{k = 0}^{\infty}\frac{\left( \mathbf{A}t \right)^{k}}{k!} :label: eq-origen-series-exp with :math:`\mathbf{I}` the identity matrix. :eq:`eq-origen-homo-soln` and :eq:`eq-origen-series-exp` describe the matrix exponential method, which yields a complete solution to the problem. However, in certain instances related to limitation in computer precision, difficulties occur in generating accurate values of the matrix exponential function. Under these circumstances, alternative procedures using either the generalized Bateman equations :cite:`ORIGEN-bateman1910` or Gauss-Seidel iterative techniques are applied. These alternative procedures will be discussed in further sections. A straightforward solution of :eq:`eq-origen-homo-soln` and :eq:`eq-origen-series-exp` would require storage of the complete transition matrix. To avoid excessive memory requirements, a recursion relation has been developed. Substituting :eq:`eq-origen-series-exp` into :eq:`eq-origen-homo-soln`, .. math:: \overrightarrow{N}\left( t \right)\mathbf{=}\left \lbrack \mathbf{I + A}t + \frac{\left( \mathbf{A}t \right)^{2}}{2} + \ldots \right\rbrack\overrightarrow{N}\left( 0 \right) :label: eq-origen-recursion one may recognize a recursion relation for a particular nuclide, :math:`N_{i}(t)`. .. math:: N_{i}\left( t \right) = N_{i}\left( 0 \right) + t\sum_{j}{a_{ij}N_{j} \left( 0 \right)} + \frac{t}{2}\sum_{k}\left\lbrack a_{ik} t\sum_{j}{a_{kj} N_{j}\left( 0 \right)} \right\rbrack \\ + \frac{t}{3}\sum_{m}\left\{ a_{im} \frac{t}{2}\sum_{k}\left\lbrack a_{mk}t \sum_{j}{a_{kj} N_{j}\left( 0 \right)} \right\rbrack \right\} + \ldots :label: eq-origen-nuclide-recursion where the range of indices, *j*, *k*, *m*, is 1 to *M* for matrix :math:`\mathbf{A}` of size :math:`M \times M`. The result is a series of terms that arise from the successive post-multiplication of the transition matrix by the vector of nuclide concentration increments produced from the computation of the previous terms. Within the accuracy of the series expansion approximation, physical values of the nuclide concentrations are obtained by summing a converged series of these vector terms. By defining the terms :math:`C_{i}^{n}\left( t \right)` as .. math:: C_{i}^{0} = N_{i}\left( 0 \right) \\ C_{i}^{n + 1} = \frac{t}{n + 1}\sum_{j}{a_{\text{ij}}C_{j}^{n}} :label: eq-origen-conc-soln-1 the solution for :math:`N_{i}\left( t \right)` is given as .. math:: N_{i}\left( t \right) = \sum_{n = 0}^{\infty}C_{i}^{n} :label: eq-origen-conc-soln-2 The use of :eq:`eq-origen-conc-soln-1` and :eq:`eq-origen-conc-soln-2` requires storage of only two vectors--:math:`{\overrightarrow{C}}^{n}` and :math:`{\overrightarrow{C}}^{n + 1}` ----in addition to the current value of the solution. However, the series summation solution in :eq:`eq-origen-conc-soln-2` is not valid until a finite limit is identified which can achieve a reasonable accuracy, i.e., .. math:: N_{i}\left( t \right) = \sum_{n = 0}^{n_{\text{term}}}C_{i}^{n} + \epsilon_{\text{trunc}} :label: eq-origen-series-trunc where :math:`n_{\text{term}}` is the number of terms and :math:`\epsilon_{\text{trunc}}` is the truncation error. The key is to split the nuclides into two sets: those that are long-lived and permit a rapid, accurate solution via :eq:`eq-origen-series-trunc`, and those that are short-lived and require an alternate solution. .. _origen-lln-solution: Solution for Long-Lived Nuclides """""""""""""""""""""""""""""""" This section describes the various tests used to ensure that the summations indicated in :eq:`eq-origen-series-trunc` do not lose accuracy due to large changes in magnitudes or small differences between positive and negative rate constants. Nuclides with large rate constants (short-lived) are removed from the transition matrix and treated separately. For example, in the decay chain :math:`\mathrm{A\rightarrow B \rightarrow C}`, if the decay constant for B is large, a new rate constant is inserted in the matrix for :math:`\mathrm{A \rightarrow C}`. This technique was originally employed by Ball and Adams :cite:`ORIGEN-baad1967`. The key to determining which transitions should be removed involves calculation of the matrix norm. The norm of matrix :math:`\mathbf{A}` is defined by Lapidus and Luus :cite:`ORIGEN-lalu1967` as being the smaller of the maximum-row absolute sum and the maximum-column absolute sum, .. math:: \lbrack\mathbf{A}\rbrack = \min\left\{ {\max_{j}{\sum_{i}\left| a_{\text{ij}} \right|}}{,\max_{i}{\sum_{j}\left| a_{\text{ij}} \right|}\ } \right\} :label: eq-origen-tr-removal To maintain precision in performing the summations of :eq:`eq-origen-series-trunc`, the matrix norm is used to balance the user-specified time step, *t*, with the precision associated with the word len>h employed in the machine calculation. The constraint on the matrix norm has been chosen as .. math:: \left\lbrack \mathbf{A} \right\rbrack t \leq \ - 2\ \ln(0.001) = 13.8155 :label: eq-origen-norm-constraint The remainder of this section shows that this constraint serves two purposes. - It allows reasonable accuracy for a reasonable number (20--60) of matrix exponential terms. - It defines what "short-lived" means over a particular time step, dictating which concentrations must be solved by alternate means. A relationship between *m* digits of machine precision and *p* significant digits required in all results can be stated by the following inequality: .. math:: \text{(Largest term in series)} \times 10^{-m} \leq \text{(Series result)} \times 10^{-p} :label: eq-origen-precision-1 In this particular series, the relationship may be represented as .. math:: \max_{n}\frac{\left| \left\lbrack \mathbf{A} \right\rbrack t \right|^{n}}{n!}10^{- m} \leq \ e^{- \left\lbrack \mathbf{A} \right\rbrack t}10^{- p}`, :label: eq-origen-precision-2 or alternatively, .. math:: \max_{n}\frac{\left| \left\lbrack \mathbf{A} \right\rbrack t \right|^{n}}{n!} e^{\left\lbrack \mathbf{A} \right\rbrack t} \leq \ 10^{m - p}. :label: eq-origen-precision-3 Lapidus and Luus have shown that the maximum term in the summation for any element in the matrix exponential function cannot exceed :math:`\frac{\left( \left\lbrack \mathbf{A} \right\rbrack t \right)^{n}}{n!},\ `\ where :math:`n` is the largest integer not larger than :math:`\left\lbrack \mathbf{A} \right\rbrack t`. For the constraint in :eq:`eq-origen-norm-constraint`, this yields *n*\ =13 and yields limit :math:`\frac{\left( \left\lbrack \mathbf{A} \right\rbrack t \right)^{n}}{n!} \approx 10^{5}`. With :math:`e^{\left\lbrack \mathbf{A} \right\rbrack t} \approx 10^{6}` and standard double precision with *m=16*, :eq:`eq-origen-precision-3` evaluates to :math:`10^{11} \leq 10^{16 - j}`, which indicates that five significant figures will be maintained in values as small as 10\ :sup:`--6`. The number of terms required to converge the matrix exponential series can be investigated by a plot of the :math:`\frac{\left| \left\lbrack \mathbf{A} \right\rbrack t \right|^{n}}{n!}e^{\left\lbrack \mathbf{A} \right\rbrack t}` as a function of term index *n* in :eq:`eq-origen-precision-3`, as shown in :numref:`fig-series-conv` .. _fig-series-conv: .. figure:: ../figs/ORIGEN/series_conv.png Values of terms in series for various values of the matrix norm. The intersection between the black line in :numref:`fig-series-conv` and the various curves indicates the number of terms needed to achieve :math:`\epsilon_{\text{trunc}} \leq 0.1\%`. For example, with :math:`\left\lbrack \mathbf{A} \right\rbrack t = 13.8155`, :math:`n_{\text{term}} = 54` is required, and with :math:`\left\lbrack \mathbf{A} \right\rbrack t = 13.8155/2`, approximately :math:`n_{\text{term}} = 29` is required. This behavior has been used to develop the heuristic .. math:: n_{\text{term}} = 7\ \lbrack\mathbf{A}\rbrack t/2 + 6. :label: eq-origen-solver-nterms Thus it has been shown that the limit imposed in :eq:`eq-origen-norm-constraint` leads to a maximum of :math:`n_{\text{term}} = 54` terms with :math:`\epsilon_{\text{trunc}} \leq 0.1\%`. It remains to be shown that any arbitrary system can be modified so that it does not violate :eq:`eq-origen-norm-constraint`. Because the time step :math:`t` is provided and fixed, :math:`\left\lbrack \mathbf{A} \right\rbrack t \leq \ - 2\ \ln(0.001)` cannot be satisfied unless the system is modified. The physical nature of the system leads to :math:`\max_{j}{\sum_{i}\left| a_{\text{ij}} \right|} \leq \max_{j}{2|a_{\text{jj}}|}` based on production rates equal to loss rates when both parent and daughter nuclide are included in the system. The maximum column sum in :eq:`eq-origen-tr-removal` can then be bounded by twice the maximum diagonal term, :math:`\max_{j}{2|a_{\text{jj}}|}`. Using this upper limit as the matrix norm and substituting into :eq:`eq-origen-norm-constraint` yields .. math:: \left\lbrack \mathbf{A} \right\rbrack t \leq 2\max_{j} \left| a_{\text{jj}} \right| \leq - 2\ln\left( 0.001 \right) :label: eq-origen-sln-ineq-1 Rearranging :eq:`eq-origen-sln-ineq-1` leads to the condition .. math:: e^{-\|a_{jj}\|t} < 0.001 :label: eq-origen-sln-ineq-2 which is used to mark nuclide *j* as a short-lived nuclide for this time step, to be solved with linear chains instead of the series-based matrix exponential. An alternative interpretation of the short-lived condition can be made by rewriting :eq:`eq-origen-sln-ineq-2` in terms of an effective half-life, :math:`t_{1/2} = \frac{\ln\left( 2 \right)}{|a_{\text{jj}}|}`, which results in :math:`t_{1/2} < \frac{{- ln}\left( 2 \right)}{\ln\left( 0.001 \right)}t \approx 0.1t`. In other words, when a nuclide's effective half-life (including destruction by both decay and reaction mechanisms) is less than 10% of the time step, it can be considered short-lived. Finally, as a note for applications where the nuclides of interest are in long transmutation chains, it has been found that the above algorithm may not yield accurate concentrations for those nuclides near the end of the chain that are significantly affected by those near the beginning of the chain. In these applications, specifying the minimum :math:`n_{\text{term}}` as .. math:: n_{\text{term}} \geq \left| \Delta Z \right| + \left| \Delta A \right| + 5 :label: eq-origen-sln-truncation where :math:`\Delta Z` is the atomic number difference and :math:`\Delta A` is the mass number difference, has been found to ameliorate the issue. .. _origen-sln-solution: Solution for Short-Lived Nuclides """"""""""""""""""""""""""""""""" The condition in :eq:`eq-origen-sln-ineq-2` forms the basis for declaring a nuclide short-lived, and its solution is found via solution of the nuclide chain equations. In conjunction with maintaining the transition matrix norm below the prescribed level, a queue is formed of the short-lived precursors of each long-lived isotope. These queues extend back up the several chains to the last preceding long-lived precursor. According to :eq:`eq-origen-sln-ineq-2`, the queues will include all nuclides whose effective half-lives are less than 10% of the time interval. A generalized form of the Bateman equations developed by Vondy :cite:`ORIGEN-vondy1962` is used to solve for the concentrations of the short-lived nuclides at the end of the time step. For an arbitrary forward-branching chain, Vondy's form of the Bateman solution is given by, .. math:: N_{i}\left( t \right) = N_{i}\left( 0 \right)e^{- d_{i}t} + \sum_{k = 1}^{i - 1} {N_{k}(0)\left\lbrack \sum_{j = k}^{i - 1}\frac{e^{- d_{j}t} - e^{- d_{i}t}}{d_{i} - d_{j}}a_{j + 1,j}\prod_{\begin{matrix} n = k \\ n \neq j \\ \end{matrix}}^{i - 1}\frac{a_{n + 1,n}}{d_{n} - d_{j}} \right\rbrack} :label: eq-origen-vondy-soln where :math:`N_{1}\left( 0 \right)` is the initial concentration of the first precursor, :math:`N_{2}\left( 0 \right)` is that of the second precursor, etc. As in :eq:`eq-origen-trm-terms`, :math:`a_{\text{ij}}` is the first-order rate constant, and :math:`d_{i} = {- a}_{\text{ii}}` which is the magnitude of the diagonal element. Bell recast Vondy's form of the solution through multiplication and division by :math:`\prod_{n = k}^{i - 1}d_{n}` and rearranged to obtain .. math:: N_{i}\left( t \right) = N_{i}\left( 0 \right)e^{- d_{i}t} + \sum_{k = 1}^{i - 1}{N_{k}(0)\prod_{n = k}^{i - 1}\frac{a_{n + 1,n}}{d_{n}} \left\lbrack \sum_{j = k}^{i - 1}{d_{j}\frac{e^{- d_{j}t} - e^{- d_{i}t}}{d_{i} - d_{j}}}\prod_{ \begin{matrix} n = k \\ n \neq j \\ \end{matrix}}^{i - 1}\frac{d_{n}}{d_{n} - d_{j}} \right\rbrack} :label: eq-origen-bell-soln The first product over isotopes *n* is the fraction of atoms that remains after the *k\ th* particular sequence of decays and captures. If this product becomes less than 10\ :sup:`-6`, the contribution of this sequence to the concentration of nuclide *i* is neglected. Indeterminate forms that arise when *d\ i\ =d\ j* or *d\ n\ =d\ j* are evaluated using L'Hôpital's rule. These forms occur when two isotopes in a chain have the same diagonal element. :eq:`eq-origen-bell-soln` is applied to calculate all contributions to the "queue end-of-interval concentrations" of each short-lived nuclide from the initial concentrations of all others in the queue described above. It is also applied to calculate contributions from the initial concentrations of all short-lived nuclides in the queue to the long-lived nuclide that follows the queue, in addition to the total contribution to its daughter products. These values are appropriately applied either before or after the matrix expansion calculation is performed to correctly compute concentrations of long-lived nuclides and the long-lived or short-lived daughters. :eq:`eq-origen-bell-soln` is also used to adjust to certain elements of the final transition matrix, which now excludes the short-lived nuclides. The value of the element must be determined for the new transition between the long-lived precursor and the long-lived daughter of a short-lived queue. The element is adjusted so that the end-of-interval concentration of the long-lived daughter calculated from the single link between the two long-lived nuclides (using the new element) is the same as what would be determined from the chain including all short-lived nuclides. The method assumes zero concentrations for precursors to the long-lived precursor. The computed values asymptotically approach the correct value with successive steps through time. For this reason, at least five to ten time intervals during the decay of discharged fuel is reasonable, because long-lived nuclides have built up by that time. If a short-lived nuclide has a long-lived precursor, an additional solution is required. First, the amount of short-lived nuclide *i* due to the decay of the initial concentration of long-lived precursor *j* is calculated as .. math:: N_{j \rightarrow i}\left( t \right) = N_{j} \left( 0 \right)a_{ij} \frac{e^{- d_{j}t}}{d_{i} - d_{j}} :label: eq-origen-lln-sln from :eq:`eq-origen-vondy-soln`, assuming :math:`e^{- d_{i}t} \ll \ e^{- d_{j}t}`. However, the total amount of nuclide *i* produced depends on the contribution from the precursors of precursor *j*, in addition to that given by :eq:`eq-origen-lln-sln`. The quantity of nuclide *j* not accounted for in :eq:`eq-origen-lln-sln` is denoted by :math:`N_{j}'\left( t \right)`, the end-of-interval concentration, minus the amount that would have remained had there been no precursors to nuclide *j*: .. math:: N_{j}^{'\left( t \right)} = N_{j}\left( t \right) - N_{j}(0)e^{- d_{j}t} :label: eq-origen-lln-nef Then the short-lived daughter and subsequent short-lived progeny are assumed to be in secular equilibrium with their parents, which implies that the time derivative is zero, .. math:: \frac{ dN_{i}}{\text{dt}} = \sum_{j}{a_{\text{ij}}N_{j}(t)} = 0. :label: eq-origen-sln-se The queue end-of-interval concentrations of all the short-lived nuclides following the long-lived precursor are augmented by amounts calculated with :eq:`eq-origen-bell-soln`. The concentration of the long-lived precursor used in :eq:`eq-origen-lln-nef` is that given by :eq:`eq-origen-lln-sln`. The set of linear algebraic equations given by :eq:`eq-origen-sln-se` is solved by the Gauss-Seidel iterative technique. This algorithm involves an inversion of the diagonal terms and an iterated improvement of an estimate for :math:`N_{i}(t)` through the expression .. math:: :label: eq-origen-sln-soln N_{i}^{k + 1} = - \frac{1}{a_{\text{ii}}}\sum_{j}{a_{\text{ij}}N_{j}^{k}} Since short-lived isotopes are usually not their own precursors, this iteration often reduces to a direct solution. .. _origen-nhe-solution: Solution of the Nonhomogeneous Equation """"""""""""""""""""""""""""""""""""""" The previous sections have presented the solution of the homogeneous equation in :eq:`eq-origen-homo-soln`, applicable to fuel burnup, activation, and decay calculations. However, the solution of a nonhomogeneous equation is required to simulate reprocessing or other systems that require an external feed term, :math:`S\left( t \right) \neq 0`. The nonhomogeneous equation is given in matrix form (assumed constant over a step *n*) as .. math:: \frac{d\overrightarrow{N}}{\text{dt}} = \mathbf{A} \overrightarrow{N}\left( t \right) + {\overrightarrow{S}} :label: eq-origen-nhe-matrix for a fixed feed or removal rate, :math:`{\overrightarrow{S}}`. A particular solution of :eq:`eq-origen-nhe-matrix` will be determined and added to the solution of the homogeneous equation given by :eq:`eq-origen-recursion`. As before, the matrix exponential method is used for the long-lived nuclides, and solution by linear chains is used for the short-lived nuclides. Assume :math:`\overrightarrow{C}` an arbitrary vector with which to test a particular solution of the form .. math:: \overrightarrow{N}\left( t \right) = \sum_{k = 0}^{\infty} \frac{\left( \mathbf{A}t \right)^{k}}{\left( k + 1 \right)!}\overrightarrow{C}t :label: eq-origen-nhe-matrix-soln-1 Substituting :eq:`eq-origen-nhe-matrix-soln-1` into :eq:`eq-origen-nhe-matrix` yields .. math:: \sum_{k = 0}^{\infty}\frac{A^{k}t^{k}}{k!}\overrightarrow{C} = \sum_{k = 0}^{\infty} \frac{A^{k + 1}t^{k + 1}}{(k + 1)!}\overrightarrow{C} + \overrightarrow{S} :label: eq-origen-nhe-matrix-soln-2 in which the *k=0* term may be extracted from the LHS, .. math:: \overrightarrow{C} + \sum_{k = 1}^{\infty} \frac{A^{k}t^{k}}{k!}\overrightarrow{C} = \sum_{k = 0}^{\infty} \frac{A^{k + 1}t^{k + 1}}{\left( k+ 1 \right)!}\overrightarrow{C} + \overrightarrow{S} :label: eq-origen-nhe-matrix-soln-3 which allows the summations on the left and right to be easily shown equal. This proves the particular solution is indeed valid if the arbitrary vector is in fact the feed term :math:`\overrightarrow{C} = \overrightarrow{S}`. The solution to the nonhomogeneous problem is therefore (as a series), .. math:: \overrightarrow{N}\left( t \right) = \sum_{k= 0}^{\infty} \frac{\left( \mathbf{A}t \right)^{k}}{k!}\overrightarrow{N} \left( 0 \right) + \sum_{k = 0}^{\infty}\frac{\left( \mathbf{A}t \right)^{k}}{ \left( k +1 \right)!}\overrightarrow{S}t :label: eq-origen-nhe-matrix-soln-4 For the second term in :eq:`eq-origen-nhe-matrix-soln-4`, a new recursion relation is developed for the particular solution in the same manner as was done for the homogeneous solution, .. math:: N_{i}^{P}\left( t \right) = \sum_{n = 1}^{\infty}D_{i}^{n} :label: eq-origen-nhe-particular-soln-1 where .. math:: D_{i}^{1} = S_{i}t;\ D_{i}^{n+ 1} = \frac{1}{n + 1}\sum_{j}^{\ }{a_{ij}D}_{j}^{n} :label: eq-origen-nhe-particular-soln-2 For the short-lived nuclides, the secular equilibrium equations are modified to become .. math:: \frac{dN_{i}}{\text{dt}} = \sum_{j}{a_{\text{ij}}N_{j}\left( t \right) + S_{i}} = 0. :label: eq-origen-sln-se-eqns` The Gauss-Seidel iterative method is applied to determine the solution. The complete solution to the nonhomogeneous equation in :eq:`eq-origen-nhe-matrix-soln-1` is given by the sum of the homogeneous solutions described in previous sections and the particular solutions described here. .. _origen-cram: CRAM ^^^^ The solver kernel based on the Chebyshev Rational Approximation Method (CRAM) is described in detail in references :cite:`ORIGEN-pule2010,ORIGEN-pusa2011,ORIGEN-isaa2011,ORIGEN-pusa2013`. Compared to the MATREX solver, CRAM generally has similar runtimes but is more accurate and robust on a larger range of problems. CRAM relies on the lower upper (LU) decomposition, so the SuperLU library has been used. The accuracy of CRAM is related to the order, with an order 16 solution having a truncation error less than 0.01% for all nuclides in most problems. Unlike many methods for solving this type of system of ODEs, the len>h of a step does not significantly affect the accuracy of CRAM. However, any significant errors from CRAM will shrink rapidly over multiple steps as long as there are no large changes in reaction rates. The CRAM solver has an efficient internal substepping algorithm that can perform multiple same-sized substeps (with the same transition matrix) very efficiently by reusing the LU decomposition. When using internal substepping, 2--4 substeps are typical, with a large gain in accuracy for marginal increase in runtime. .. _origen-power-calc: Power Calculation ----------------- The following is formula is used to calculate power during irradiation (:math:`\Phi > 0`), .. math:: P\left( t \right) = \sum_{i} {\left( \kappa_{fi} \sigma_{fi} + \kappa_{ci} \sigma_{ci} \right) \phi N_{i}\left( t \right)} :label: eq-origen-power where :math:`\kappa_{\text{fi}}` and :math:`\kappa_{\text{ci}}` are nuclide-dependent energy released per fission and "capture," with *capture* defined as removal minus fission: :math:`\sigma_{\text{ci}} = \sigma_{i} - \sigma_{\text{fi}}`. The :math:`\sigma_{\text{fi}}` and :math:`\sigma_{\text{ci}}` terms are extracted from the transition matrix itself, whereas the :math:`\kappa_{\text{fi}}` and :math:`\kappa_{\text{ci}}` are available from a separate ORIGEN energy resource (see ORIGEN Data Resources chapter). If the flux :math:`\phi` is specified, then the power can be calculated at any time according to :eq:`eq-origen-power`. However in reactor fuel systems, it is convenient to be able to specify the power produced by the system and internally to the depletion code, to convert the power to an equivalent flux. Solving :eq:`eq-origen-power` for the flux, however, .. math:: \Phi(t) = \frac{P}{\sum_{i}{{\left( \kappa_{\text{fi}}\sigma_{\text{fi}} + \kappa_{\text{ci}}\sigma_{\text{ci}} \right)N}_{i}\left( t \right)}} :label: eq-origen-flux it is apparent that a fixed power over a time step :math:`n` does not lead to a fixed flux, due to changing isotopics that produce different amounts of power per fission and capture. ORIGEN performs a flux-correction calculation to obtain an estimate of the average flux over the step. The beginning-of-step flux is first calculated for the initial compositions: :eq:`eq-origen-flux` is evaluated as :math:`\Phi(t_{n - 1})`, and then :eq:`eq-origen-power` is solved with that flux. The flux is then recalculated at the end of step :math:`\Phi(t_{n})` using the estimated end-of-step isotopics, and the step-average flux :math:`\Phi_{n}` is estimated as the simple average of the beginning and end-of-step fluxes, i.e. :eq:`eq-origen-pc-flux`, .. math:: \Phi_{n} = 0.5\lbrack\Phi\left( t_{n} \right) + \Phi^{\text{pred}}\left( t_{n + 1} \right)\rbrack :label: eq-origen-pc-flux noting that the "predicted" flux at end-of-step :math:`\Phi^{\text{pred}}\left( t_{n + 1} \right)` is based on "predicted" end-of-step isotopics, based on a beginning-of-step flux level. .. _origen-decay-calc: Decay Emission Sources Calculation ---------------------------------- ORIGEN can calculate the emission sources (and spectra) during decay for alpha, beta, neutron, and photon particles according to .. math:: R_{x}^{g}\left( t \right) = \sum_{i}{{\lambda_{i}N}_{i}\left( t \right)\int_{E^{g}}^{E^{g - 1}}{w_{i,x}\left( E \right)\text{dE}}} :label: eq-origen-decay where :math:`w_{i,x}\left( E \right)` is the number of particles of type :math:`x` emitted per disintegration of nuclide :math:`\text{i\ }`\ at energy :math:`E`, using provided energy bins defined by energy bounds :math:`E^{g}` to :math:`E^{g - 1},` where :math:`g` is an energy index. The fundamental data resources for performing emission source calculations are described in the ORIGEN Data Resources chapter. .. _origen-neutron-calc: Neutron Sources ^^^^^^^^^^^^^^^ Computed neutron sources include neutrons spontaneous fission, :math:`\left(\alpha,n \right)` reactions, and delayed :math:`\left( \beta^-,n \right)` neutron emission, .. math:: w_{i,n}\left( E \right) = w_{i,SFn}\left( E \right) + w_{i,\left( \alpha,n \right)}(E) + w_{i,Dn}\left( E \right) :label: eq-origen-neutron with components that will be described below. The method of computing the spontaneous fission and delayed neutron source is independent of the medium containing the fuel. However, :math:`\left(\alpha,n \right)` production varies significantly with the composition of the medium. The homogeneous medium :math:`\left(\alpha,n \right)` calculation methodology has been adopted from the Los Alamos code SOURCES 4B :cite:`ORIGEN-sh2000,ORIGEN-wp1983,ORIGEN-la13639`. The total yield of spontaneous fission neutrons from decay of nuclide *i* is .. math:: Y_{i,SFn} = \frac{\lambda_{i,SFn}}{\lambda_{i}}` :label: eq-origen-sfn-yield where :math:`\frac{\lambda_{i,SFn}}{\lambda_{i}}` is the fraction of decays which undergo spontaneous fission. The distribution of spontaneous fission neutrons, :math:`w_{i,SFn}\left( E \right)` is given by a Watt fission spectrum, .. math:: w_{i,SFn}\left( E \right) = Y_{i,SFn}\ C_{i}\ e^{- E/A_{i}}\sinh\sqrt{B_{i}E} :label: eq-origen-sfn-watt where *A\ i*, *B\ i,* and *C\ i* are model parameters. The :math:`\left(\alpha,n \right)` neutron source is strongly dependent on the low-Z content of the medium containing the alpha-emitting nuclides and requires modeling the slowing down of the alpha particles and the probability of neutron production as the :math:`\alpha` particle slows down. The calculation assumes (1) a homogeneous mixture in which the alpha-emitting nuclides are uniformly intermixed with the target nuclides and (2) that the dimensions of the target are much larger than the range of the alpha particles. Thus, all alpha particles are stopped within the mixture. The yield of a particular :math:`\alpha` is given by .. math:: Y^\ell_{i,\alpha} = f^\ell_{i,\ \alpha}\frac{\lambda_{i,\alpha}}{\lambda_{i}} :label: eq-origen-an where :math:`\frac{\lambda_{i,\alpha}}{\lambda_{i}}` is the relative probability of :math:`\alpha`--decay, and :math:`f^\ell_{i,\ \alpha}` is the fraction of those :math:`\alpha`--decays producing an :math:`\alpha` particle with initial energy :math:`E^\ell_{i,\alpha}`, and is considered fundamental data. The *total* neutron yield from an alpha particle :math:`\ell` emitted by nuclide *i* and interacting with target *k* is given by the following, .. math:: Y^\ell_{i,k,\left( \alpha,n \right)} = Y^\ell_{i,\alpha} \frac{N_{k}}{N}\int_{0}^{E^\ell_{i,\alpha}}{\frac{\sigma_{k, \left(\alpha,n \right)}(E_{\alpha})}{S(E_{\alpha})}dE_{\alpha}\ } :label: eq-origen-an-alpha-per-target where :math:`S\left( E_{\alpha} \right)` is the total stopping power of the medium, :math:`\sigma_{k,\left( \alpha,n \right)}(E_{\alpha})` is the :math:`\left(\alpha,n \right)` reaction cross section for target nuclide *k*, and :math:`\frac{N_{k}}{N}` is the fraction of atoms in the medium composed of nuclide *k*. This expression is used to calculate the neutron yield for each target nuclide and from each discrete-energy alpha particle emitted by all alpha-emitting nuclides in the material. The stopping power for compounds, rather than pure elements, is approximated using the Bragg-Kleeman additivity rule. The energy-dependent elemental stopping cross sections are determined as parametric fits to evaluated data. :eq:`eq-origen-an-alpha-per-target` is solved for the total neutron yields from the alpha particle, as it slows down in the medium by subdividing the maximum energy :math:`E^\ell_{i,\alpha}` into a number of discrete energy bins and evaluating stopping power and :math:`\left(\alpha,n \right)` reaction cross section at the midpoint energy of the bin. The distribution of :math:`\left(\alpha,n \right)` neutrons as required by :eq:`eq-origen-decay` is .. math:: w_{i,(\alpha,n)}\left( E \right) = \sum_{k}{\sum_{\ell \in i} Y^{\ell}_{i,k}\left( \alpha,n\right) X^{\ell}_{i,k} \left( \alpha,n \right)}\left( E \right) :label: eq:origen-an-dist with the distribution of :math:`\left(\alpha,n \right)` neutrons in energy, :math:`X^\ell_{i,k,\left( \alpha,n \right)}\left( E \right)`, calculated using nuclear reaction kinematics, assuming that the :math:`\left(\alpha,n \right)` reaction emits neutrons with an isotropic angular distribution in the center-of-mass system. The maximum and minimum permissible energies of the emitted neutron are determined by applying mass, momentum, and energy balance for each product's nuclide energy level. The product nuclide levels, the product level branching data, the :math:`\left(\alpha,n \right)` reaction Q values, the excitation energy of each product nuclide level, and the branching fraction of :math:`\left(\alpha,n \right)` reactions result in the production of product levels. A more detailed discussion of the theory and derivation of the kinematic equations can be found in :cite:`ORIGEN-la13639`. Delayed neutrons are emitted by decay of short-lived fission products. The observed delay is due to the decay of the precursor nuclide. The total yield of delayed neutrons from decay of nuclide *i* is .. math:: Y_{i,Dn} = \frac{\lambda_{i,Dn}}{\lambda_{i}} :label: eq-origen-dn-yield where :math:`\frac{\lambda_{i,Dn}}{\lambda_{i}}` is the fraction of decays which emit delayed neutrons. The delayed neutrons emitted per decay of nuclide *i* at energy *E* is given by .. math:: w_{i,Dn}\left( E \right) = Y_{i,Dn} X_{i,Dn} \left( E \right) :label: eq-origen-dn-rate where the spectrum :math:`X_{i,Dn}\left( E \right)` is fundamental library data. Delayed neutrons are not important in typical spent fuel applications due to the very short half-lives of the parent nuclides, dropping off significantly after ~10 seconds, but they may be of value in specialized applications where calculating time-dependent delayed neutron source spectra is important. .. _origen-alpha-calc: Alpha Sources ^^^^^^^^^^^^^ An :math:`\alpha` slowing down calculation is performed as part of the :math:`\left(\alpha,n \right)` neutron calculation. However, the alpha source (i.e. without considering slowing down in the media) is also available, simply as the sum of delta functions at the discrete initial alpha particle energies :math:`w_{i,\alpha}\left( E \right) = \sum_{\ell \in i} {Y^{\ell}_{i,\alpha} \delta \left(E - E^{\ell}_{i,\alpha} \right)}` with yields :math:`Y^{\ell}_{i,\alpha}`, as required by :eq:`eq-origen-decay`. .. _origen-beta-calc: Beta Sources ^^^^^^^^^^^^ The beta source (i.e. without considering slowing down in the media) is available as the sum of the continuous emission spectra for each :math:`\beta^{-}` decay in nuclide *i*. The total yield of beta particles from decay of nuclide *i* is .. math:: Y_{i,\beta} = \frac{\lambda_{i,\beta}}{\lambda_{i}} :label: eq-origen-beta-yield where :math:`\frac{\lambda_{i,\beta}}{\lambda_{i}}` is the fraction of decays which emit betas. The betas emitted by nuclide *i* at energy *E* is given by .. math:: w_{i,\beta}\left( E \right) = Y_{i,\beta} X_{i,\beta}\left( E \right) :label: eq-origen-beta-rate where the spectrum :math:`X_{i,\beta}(E)` is fundamental data, independent of the media. The spectrum includes betas from allowed transitions and first, second, and third forbidden transitions. .. _origen-gamma-calc: Photon Sources ^^^^^^^^^^^^^^ The total yield of photons from decay of nuclide *i* is .. math:: Y_{i,\gamma} = \frac{\lambda_{i,\gamma}}{\lambda_{i}} :label: eq-origen-gamma-yield where :math:`\frac{\lambda_{i,\gamma}}{\lambda_{i}}` is the fraction of decays which emit photons. The photons emitted by nuclide *i* at energy *E* is given by .. math:: w_{i,\gamma}\left( E \right) = Y_{i,\gamma} X_{i,\gamma}\left( E \right) :label: eq-origen-gamma-rate where the spectrum :math:`X_{i,\gamma}(E)` is fundamental data and includes both line data from x-rays, gamma-rays and continuum data from Bremsstrahlung, spontaneous fission gamma rays, and gamma rays accompanying :math:`\left(\alpha,n \right)` reactions. The Bremsstrahlung component of the photon source has been tabulated for various media and no on-the-fly slowing down calculation is performed. .. _origen-lib-interp: Library Interpolation --------------------- Accurate solution of fuel depletion with :eq:`eq-origen-odes` requires coupling to self-shielding and neutron transport to accurately capture the time-dependent change in space and energy flux distribution and 1-group cross sections with isotopic change. This is in generally a fairly computationally intensive problem compared to stand-alone depletion. In typical assembly design and analysis, the same basic assembly problem must be solved repeatedly with variations in power history, different periods of decay/burnup, different moderator density, etc. A question naturally arises: could the isotopics from numerous well-constructed cases be saved and interpolated to the actual system? Interpolating the isotopics themselves is fraught with difficulty. For example, consider two cases with the same burnup but different periods of decay between cycles. A better approach---the ORIGEN Automated Rapid Processing (ARP)---was developed with the key realization that one can reconstruct very accurate isotopics from stand-alone depletion calculations by interpolating *transition matrices* rather than *isotopics*. The accuracy of the interpolation methodology compared to the coupled transport/depletion solution (e.g., with TRITON) depends on the suitability of the interpolation parameters and the deviation of the desired system from the systems used to create the library. For example, for thermal systems with uranium-based fuels, it was found that enrichment, water density, and burnup were the dominant independent variables and thus were best suited for interpolation. An example of the variation of removal cross sections for key actinides is shown in :numref:`fig-PWR-cx` for a Westinghouse 17 :math:`\times` 17 pressurized water reactor (PWR) assembly type with 5% initial enrichment in :sup:`235`\ U. Each cross section has been divided by its initial value at zero burnup to show the variation more clearly. :sup:`240`\ Pu has been observed to have the most variation with spectral changes, with ~60% reduction in cross section from beginning to end of life. The variations in :sup:`240`\ Pu with respect to enrichment and moderator density are shown in :numref:`fig-BWR-CX-BU`, :numref:`fig-BWR-CX-mod`, :numref:`fig-BWR-CX-enr`, and :numref:`fig-BWR-CX-BU-enr`. .. _fig-PWR-CX: .. figure:: ../figs/ORIGEN/w17_e50.* Relative removal cross section as a function of burnup for key actinides (Westinghouse 17 :math:`\times` 17 assembly with 5\\% enrichment). .. _fig-BWR-CX-BU: .. figure:: ../figs/ORIGEN/g10_enr_20094240_by_burnup.* :sup:`240`\ Pu-240 removal cross section as a function of burnup for various enrichments (GE 10 :math:`\times` 10 assembly). .. _fig-BWR-CX-mod: .. figure:: ../figs/ORIGEN/g10_mod_dens_20094240_by_burnup.* :sup:`240`\ Pu removal cross section as a function of burnup for various moderator densities (GE 10 :math:`\times` 10 assembly). .. _fig-BWR-CX-enr: .. figure:: ../figs/ORIGEN/g10_enr_20094240_by_var.* :sup:`240`\ Pu removal cross section as a function of initial enrichment for various burnups (GE 10 :math:`\times` 10 assembly). .. _fig-BWR-CX-BU-enr: .. figure:: ../figs/ORIGEN/g10_mod_dens_20094240_by_var.* :sup:`240`\ Pu removal cross section as a function of moderator density for various burnups (GE 10 :math:`\times` 10 assembly). Currently there are two interpolation methods: a Lagrangian based on low-order polynomials and a cubic spline with an optional monotonicity fix-up. Lagrangian Interpolation ^^^^^^^^^^^^^^^^^^^^^^^^ Lagrangian interpolation :cite:`ORIGEN-funderlic1968` seeks the unique *n-1* order polynomial that will pass through *n*-points of the function and then interpolating to the desired point by evaluating the polynomial, .. math:: y\left( x \right) = \prod_{i = 1}^{n}{\left( x - x_{i} \right)\sum_{k = 1} ^{n}\frac{y_{k}}{\left( x - x_{k} \right)\prod_{\begin{matrix} i = 1 \\ i \neq k \\ \end{matrix}}^{n}{(x_{k} - x_{i})}}} :label: eq-origen-lag-interp where :math:`x_{i}` and :math:`y_{i}` are the known x- and y-values in the neighborhood of the desired x-value *x*, with *n* the number of data points/order of Lagrangian interpolation. Note that Lagrangian interpolation is by definition *local*, involving only points in the neighborhood of the desired value. Global alternatives such as Hermite cubic splines use the entire data set to construct the interpolants. Common interpolation methods based on polynomials can have difficulty with data that vary quickly and have uneven *x-*\ spacing, as is expected with transition data. Polynomials tend to produce unphysical oscillations in these cases. In cases with very small *y-*\ values (~10\ :sup:`-10`), oscillations of the interpolant can produce negative interpolated values. Cubic Spline Interpolation ^^^^^^^^^^^^^^^^^^^^^^^^^^ Cubic spline interpolation has been observed to produce fewer, lower frequency oscillations. Oscillations can be effectively eliminated by enforcing monotonicity on the interpolation: that is, additional max maxima or minima are not introduced by the interpolant between known values of the function. Monotonic cubic splines :cite:`ORIGEN-woal2002` have shown particularly stable behavior and have been implemented as an interpolation option.