6. Iterative Solution Algorithms
The Adams-Larsen review paper is a good reference for fast iterative schemes for discrete-ordinates particle transport calculations Adams and Larsen [AL02].
6.1. Multigroup Solution Process: Background
The transport equation needs to be solved for each group \(g\) (\(1 \le g \le G\)). In operator notation, this is written as
\[L_g \Psi_g = M \Sigma_{g\to g}\Phi_{g} + Q_g \,,\]where the source term \(Q_g\)
\[Q_g = \sum_{g'<g} M \Sigma_{g'\to g}\Phi_{g'} + Q_{\text{ext},g}\]is already known from downscattering from higher groups and from the external source definition.
\[L_g \Psi^{\text{(th+1)}}_g = M \Sigma_{g\to g}\Phi^{\text{(th+1)}}_{g} + Q^{\text{(th)}}_g\]where the source term \(Q^{\text{(th)}}_g\) contains fully known contributions from the external source and downscattered particles, while the upscattering contributions have been lagged at the previous thermal iteration:
\[Q_g = \sum_{g'<g} M \Sigma_{g'\to g}\Phi_{g'} + \sum_{g'>g} M \Sigma_{g'\to g}\Phi^{\text{(th)}}_{g'} + Q_{\text{ext},g} \,.\]
6.2. Source Iteration and Krylov Solvers
For each group, scattering within-group must also be resolved. Omitting the group indexing for brevity, the within-group problem can be stated as follows
where \(Q\) contains the external, downscattering, and upscattering contributions).
6.2.1. Source Iteration:
In the Source Iteration (SI) method Adams and Larsen [AL02], the flux moments are lagged at iteration \(i\) to yield the following iterative strategy
SI therefore requires the action of \(L^{-1}\), known as a transport sweep. SI is known to converge slowly (i.e., requires many iterations) in configurations that have a large amount of scattering (i.e., when the scattering ratio is close to 1) and that are not leakage-dominated (i.e., when the domain is several mean-free-path thick).
Convergence checks are performed using differences in successive iterates \(\Phi^{(i+1)}\) and \(\Phi^{(i)}\), using L-2 norm or pointwise relative error. To avoid false convergence, a factor of 1-spectral radius is typically added
with tol the user-supplied tolerance and where the spectral radius
is estimated as
OpenSn’s classic Richardson solver and pointwise AGS convergence check use ratios of successive maximum pointwise relative changes for this estimate. The change of each flux moment is relative to the larger of its own magnitude and the scalar flux at the same node and group. A higher moment that is negligible next to the scalar flux, such as an anisotropic moment of an isotropic solution, holds only round-off; relative to its own magnitude, its change would not settle until the iterate is stationary to machine precision. These changes are not squared, so no square root is taken. The estimate is zero on the first iteration and is otherwise the larger of the last two ratios, so that one unusually small ratio of an irregularly converging (for example, DSA-accelerated) iteration does not end it early. For the same reason the change tested is the larger of the latest change and the change expected from the previous one, \(\varrho\) times the previous change. No fixed floor is applied to the tolerance; only changes below the round-off level of a relative change (\(100\,\epsilon_{\text{machine}}\)) pass regardless of \(\varrho\).
The default AGS check is the pointwise one above. The optional l2 AGS check
estimates \(\varrho\) from ratios of the L2 norm of the change of all flux
moments and stops when that norm is below \((1-\varrho)\,\) tol. The
norm is not divided by \(\|\Phi^{(i+1)}\|\), so the test depends on the
scale of the flux, and its round-off level is
\(100\,\epsilon_{\text{machine}}\,\|\Phi^{(i+1)}\|\).
Classic Richardson also requires the lagged angular fluxes to settle: the
incoming angular fluxes of opposing reflecting boundaries and of broken sweep
cycles, and in CSDA problems their energy slopes. Their maximum pointwise change
must be below the larger of tol and the round-off level; it is not scaled by
\(1-\varrho\). The change of each lagged value is relative to the larger of
its own magnitude and the scalar flux of its group at the face node of the cell
that reads it, which is the isotropic angular flux there because the quadrature
weights sum to one. A lagged flux of a direction that carries little of the local
flux, such as a backward direction of strongly forward-peaked scattering, is
perturbed by round-off relative to the local flux in every sweep; relative to its
own magnitude, its change can stay above the tolerance however long the
iteration runs.
Power iteration applies the same idea to the eigenvalue: the relative change
of \(k\) must be below \((1-\varrho)\,\) k_tol in two consecutive
iterations, with \(\varrho\) estimated from the change of the flux
normalized by its fission production, so that k_tol bounds the error of
\(k\) rather than only its change.
6.2.2. Krylov Subspace Method:
The original problem can be recast as
or
This linear system is of the typical “\(Ax=b\)” form where \(b=L^{-1} Q\) and requires one transport sweep on the source term and the global matrix \(A=I - D L^{-1} M\Sigma\) is not formed but only its action is required. Each action of \(A\) requires one transport sweep to evaluate the action of \(L^{-1}\). Krylov subspace methods, such as GMRes, can be employed in a matrix-free fashion to solve such a system Saad and Schultz [SS86], Saad [Saa03], Patton and Holloway [PH96], Guthrie et al. [GHP99], Oliveira and Deng [OD98], Warsa et al. [WWM04], Fichtl et al. [FWP09].
6.3. Within-group Acceleration
In optically thick regions with a significant amount of scattering, the Source Iteration process can be slow. From spectral error analyses, the slowest-decaying error modes are diffusive modes. Hence, the idea to accelerate the SI procedure with a low-order synthetic accelerator Adams and Larsen [AL02], Morel [Mor82], Larsen [Lar84].
We proceed by presenting an iteration of SI, solved using a transport sweep:
The equation satisfied by the angular error \(\varepsilon\) and the moment error \(e\), defined as the difference between the exact solution and the current iteration \(\varepsilon^{(i+1/2)}=\psi-\Psi^{(i+1/2)}\) and \(e^{(i+1/2)}=\Phi- \Phi^{(i+1/2)}\), is
The idea of synthetic acceleration is to replace the transport equation for the error by a low-order (often diffusion) approximation:
where \(A\) is a low-order operator and \(\delta \Phi\) is the corrective term (no longer the true error) to be added to the latest values of the flux moments:
before proceeding to the next Source Iteration. A synthetic accelerator must present some level of consistency in terms of spatial discretization with the original transport problem. In OpenSn, the operator \(A\) is a diffusion operator. The resulting Diffusion Synthetic Acceleration (DSA) equations are discretized with DGFEM as well, using the Modified Interior Penalty (MIP) formalism Wang and Ragusa [WR10], Turcksin and Ragusa [TR14].
OpenSn’s within-group DSA (WGDSA, groupset option apply_wgdsa) is applied
to one groupset at a time, after each iteration of that groupset. It corrects
only the scalar flux, and it corrects each group separately: the groups of the
groupset are solved in one diffusion system, which is block diagonal in energy.
For group \(g\) the correction solves
with \(D_g = 1/(3\sigma_{tr,g})\), \(\sigma_{tr,g} = \sigma_{t,g} -
\sigma_{s1,g}\), \(\sigma_{s1,g}\) the P1 scattering out of group \(g\),
and \(\sigma_{r,g} = \max(0,\, \sigma_{t,g} - \sigma_{s0,g \leftarrow g})\).
The source is the change of the isotropic within-group scattering source. The
change of the scattering between the groups of the groupset is not part of it.
TGDSA (see below) corrects the error mode that this scattering couples across
the groups. \(\delta\phi_g\) is added to the scalar flux of group
\(g\). Higher flux moments are not corrected. Where the sweep lags incoming
angular fluxes (opposing reflecting boundaries and broken sweep cycles),
\(\delta\phi_g\) is also added to them as the isotropic correction
\(\delta\psi_g = \delta\phi_g\), since the quadrature weights sum to one.
The groupset option wgdsa_energy_coupling couples the correction in energy
(see Energy-Coupled Within-group Acceleration). Groupsets with charged-particle
groups use the operator of Within-group diffusion synthetic acceleration instead.
Reflecting boundaries are zero-current boundaries of the correction, with one exception. Of a pair of opposing reflecting boundaries, the sweep lags the incoming angular flux of the one with the smaller boundary id. In 1D spherical geometry it lags that of the reflecting outer surface. The error that enters through such a boundary is the change of the lagged incoming flux, which the sweep has not yet reflected. On it the correction satisfies
with \(n\) the outward normal and \(\psi^{\text{new}}\) and \(\psi^{\text{old}}\) the lagged incoming fluxes after and before the sweep. \(J_g\) is the inward partial current of that change.
The sweep also lags the upwind angular flux on the faces where it breaks a cyclic dependency, within a partition or between partitions. The cell \(K\) that reads the lagged flux through such a face \(f\) is swept with the lagged value \(\psi^{\text{old}}\) in place of \(\psi^{\text{new}}\), the upwind flux of the current sweep. The error of the swept iterate therefore has the change of the lagged flux as an incoming surface source of \(K\) on \(f\). The correction receives the zeroth angular moment of that source: the equation of each basis function \(b_i\) of \(K\) gains the face term
with \(n\) the outward normal of \(K\) on \(f\), \(\mathcal{D}_f\) the directions whose flux is lagged on \(f\), and \(J_g\) interpolated by the face basis. This is the term that the condition above adds on a lagged reflecting boundary. Without it the correction misses the particles that the lagged faces have not yet passed on, which limits the convergence of optically thin problems with strong scattering.
With a PETSc inner method (petsc_richardson, petsc_gmres,
petsc_fgmres or petsc_bicgstab), the same correction is the
preconditioner. Applied to a vector \(v\) of the groupset unknowns, it
returns \(v + \delta\phi(v)\), where \(\delta\phi(v)\) solves the
diffusion problem above with \(v\) in place of the change of the scalar
flux, and with the lagged incoming fluxes of \(v\) in place of their change
in \(J_g\). petsc_fgmres applies it on the right, the other methods on
the left.
The diffusion systems are solved directly with LU, or with conjugate gradients
preconditioned by BoomerAMG to a tolerance relative to the norm of their
right-hand side (groupset options wgdsa_solver_policy and
wgdsa_l_abs_tol). An iterative diffusion solve makes the preconditioner
change slightly between applications. Flexible GMRES admits that, while GMRES
and BiCGStab assume a fixed preconditioner.
The MIP form adds, on every interior face \(f\), a penalty \(\kappa_f \int_f [\![\delta\Phi]\!]\,[\![v]\!]\) with
where \(c\) is the penalty_factor (4 for PWLD), \(h_\perp\) a
length of the cell normal to the face, \(s = 2\) on polyhedra and
\(s = 1\) on slabs (with \(h_\perp\) half the cell width), and
\(\kappa_{\min} = 1/4\), or \(\beta_f\) (defined below) with the
"closure_r" boundary closure. On a boundary face with the "dirichlet"
closure the penalty is \(\max(s\,c\,D/h_\perp,\, 1/4)\). The penalty must
dominate the consistency terms \(\int_f \{D\,\partial_n
\delta\Phi\}[\![v]\!]\) for the operator to be symmetric positive definite.
By default (groupset option wgdsa_h_perp_convention = "face_side")
\(h_\perp\) is the face-dependent orthogonal projection of
Turcksin and Ragusa [TR14] (\(3V/A_f\) on tetrahedra,
\(V/A_f\) on hexahedra and quadrilaterals, \(2V/A_f\) on triangles),
capped by four times the smallest height of the face’s PWLD side simplices (the
triangles or tetrahedra between the face and the cell centroid), with
\(s = 2\) on polygons too. PWLD is linear on each side simplex, where the
trace inequality is exact, so the cap keeps the operator positive definite on
distorted cells, where the uncapped length lets it become indefinite and DSA
diverge. The cap is inactive on squares, cubes and regular tetrahedra.
The original OpenSn lengths ("cell") are \(3V/S\) on tetrahedra and
\(V/S\) on hexahedra, \(S\) the cell surface, and on polygons the
face-dependent lengths without the cap and with \(s = 1\). On a cube the
"cell" penalty is six times the default one, which slows DSA on cells a few
mean free paths thick. On polygons it is half the default one; the default
applies the factor 2 there for uniformity with polyhedra and a larger stability
margin.
On boundaries with a prescribed incoming flux the error has no incoming
component, so the correction is a vacuum problem. The default
(wgdsa_boundary_closure = "marshak") imposes it through the natural Marshak
condition \(\tfrac14\delta\Phi + \tfrac12 D\,\partial_n\delta\Phi = 0\). The
original OpenSn treatment ("dirichlet") imposes \(\delta\Phi = 0\) with
the interior-penalty boundary term; under mesh refinement this limits the
SI+DSA spectral radius of a bounded domain to about 0.5, which the Marshak
condition removes. On boundary cells many mean free paths thick the transport
error vanishes across most of the cell and the zero-correction condition is the
better one: the Marshak condition leaves a boundary mode with a spectral radius
near 0.47 there.
"closure_r" blends the two face by face. Its boundary term is
with \(\beta_f = \tfrac12 \sum_d w_d |\Omega_d \cdot n_f| / \sum_d w_d\) the half-range moment of the groupset’s angular quadrature for the face normal \(n_f\) (1/4 for exact angular integration). \(\theta_f = 1\) is the Marshak condition written with the partial current of the quadrature (face coefficient \(2\beta_f\), which matches the leakage of the discrete sweep); \(\theta_f = 0\) is the half-range transport form, which behaves like the zero-correction condition on thick cells. With \(h_f\) the face-dependent orthogonal length above (without the cap) and \(\tau_f = h_f/(3D_g)\) the optical thickness of the cell normal to the face in group \(g\) (infinite when \(D_g \le 0\)),
The floor \(\theta_c\) keeps the operator positive definite. Let
\(C_{\mathrm{grad}} = h_f \max_v \|\partial_n v\|_f^2 /
\|\nabla v\|_K^2\) be the trace constant of the cell’s basis on the face (over
\(v\) orthogonal to the constants), \(n_c\) the number of
"closure_r" faces of the cell, and
\(r = 6\beta_f\tau_f/(C_{\mathrm{grad}}\,n_c)\). If \(r < 1\),
\(\theta_c = \tfrac12\big(2 + r - \sqrt{r^2 + 8r}\big)\), the root in
\([0, 1]\) of \((1-\theta)^2/(1+\theta) = r\); otherwise
\(\theta_c = 0\). The exact coercivity condition has 12 in place of 6; the
rule uses it with a safety factor 2.
6.4. Energy-Coupled Within-group Acceleration
The WGDSA source above contains only the within-group scattering of each group, and the groups are corrected independently. Within a groupset, the scattering from one group into the groups below it is then left to the next sweep. When a group scatters most of its neutrons back into itself and the rest into the group below, the error that WGDSA leaves in one group becomes, at the next iteration, a source of error in the next group. An error can then pass down a chain of strongly scattering groups one group per iteration without decaying. In an infinite medium without upscatter, the WGDSA iteration matrix of the flat error mode is strictly lower triangular in energy. Its spectral radius is zero, but its powers vanish only after one iteration per group of the chain, and its off-diagonal entries are close to \(\sigma_{s0,g \leftarrow g-1}/(\sigma_{t,g}-\sigma_{s0,g \leftarrow g})\), which can be of order one.
With the groupset option wgdsa_energy_coupling, the correction includes the
scattering between the groups of the groupset. For the groups of the groupset,
from the highest energy down, \(\delta\phi_g\) solves
where both sums run over the groups of the groupset and \(D_g\) and \(\sigma_{r,g}\) are those of WGDSA. The first sum is the change of the scattering into group \(g\) from every groupset group, and the second is the downscatter of the corrections already computed. Apart from in-groupset upscatter, which enters only through the first sum, the operator is lower triangular in energy. Solving the groups in order therefore solves the coupled system with one single-group MIP diffusion solve per group, and in an infinite medium without upscatter it removes the flat error mode exactly. With upscatter the single pass in energy leaves an error mode coupled through the upscatter, which TGDSA (below) addresses. The correction is applied, and on lagged reflecting boundaries supplemented by the inward partial current of the change of the lagged flux, exactly as for WGDSA. It vanishes at convergence, so it does not change the converged solution. This is the operator of Within-group diffusion synthetic acceleration without the CSDA slowing-down terms, and groupsets with charged-particle groups always use that form.
6.5. Thermal Upscattering Acceleration
In low-leakage configurations containing materials with low neutron absorption (e.g., graphite or heavy water), the thermal iterations can converge very slowly, and acceleration is required. This acceleration process will be applied over all thermal groups at once and is based on the two-grid (TG) methods by Adams and Morel Adams and Morel [AM93], Hanus and Ragusa [HR20]. Akin to the spatial multigrid techniques, the TG method consists of two energy grids: a fine grid (corresponding to the thermal group structure) and a coarse grid (a single macro-group over the entire thermal range). Adams and Morel realized that the most slowly converging modes of the thermal iterative scheme have weak spatial, angular, and energy variation, and hence, a single spatial diffusion solve on the coarse energy grid combined with an infinite medium energy spectrum should provide a good estimate for accelerating a previous transport iterate. The TG method consists of the following steps:
A loop over all thermal groups to obtain a new multigroup flux iterate: \(\phi^{\text{(th+1/2)}}_g\). The within-group transport problem may be fully or partially converged and within-group acceleration may be applied. This is the standard process of one thermal iteration
The TG acceleration is applied
by performing a macro-group diffusion solve (with appropriately thermally-averaged properties) for the spatial shape of the corrective term \(\delta \phi\)
by adding the corrective term with spectral weight to obtain an accelerated multigroup flux iterate
\[\phi^{\text{(th+1)}}_g = \phi^{\text{(th+1/2)}}_g + \xi_g \delta \phi \,,\]where the spectral amplitude \(\xi_g\) is obtained from an infinite medium calculation for each distinct material type.
In OpenSn, the thermal groups of a groupset are iterated together with Jacobi iteration in energy, and the two-grid correction follows the Jacobi form of Hanus and Ragusa [HR20]. Split the isotropic transfer matrix into its diagonal (within-group) part \(S_D\) and off-diagonal part \(S_O\), and let \(\Sigma_t = \operatorname{diag}(\sigma_{t,g})\). The spectrum \(\xi\) is the eigenvector of the largest eigenvalue \(\rho\) of the infinite-medium iteration matrix,
where \(A = \Sigma_t - S_D\) and \(B = S_O\) (Jacobi iteration with converged within-group scattering). The same spectrum is used with or without within-group DSA.
\(A^{-1}B\) is non-negative, so \(\rho\) is its spectral radius and \(\xi \ge 0\). Because a Jacobi iteration matrix can also have the eigenvalue \(-\rho\) (for example, two groups coupled by downscatter and upscatter), \(\xi\) is computed by power iteration on \(A^{-1}B + sI\) with a shift \(s \ge \rho\). For \(\rho > 0\), every shifted eigenvalue \(\lambda + s\) with \(\lambda \ne \rho\) is smaller in magnitude than \(\rho + s\). The eigenvector need not be unique: if the groups of the groupset form several mutually uncoupled sets with the same spectral radius, \(\rho\) is a multiple eigenvalue, and the iteration, started from a flat vector, returns a non-negative vector in its eigenspace. If the scattering between the groups of the groupset has no cycle and there is no lagged within-group scattering (for example, downscatter only or upscatter only), \(A^{-1}B\) is nilpotent, \(\rho = 0\), and there is no error mode to remove; a flat spectrum is used. The correction amplitude \(\theta\) solves
with \(\langle D \rangle = \sum_g D_g \xi_g\) and
\(\langle \sigma_a \rangle = \sum_g \bigl(\sigma_{t,g} \xi_g - \sum_{g'}
\sigma_{s0,g \leftarrow g'} \xi_{g'}\bigr)\), where \(D_g\) is that of WGDSA
and all sums run over the groups of the groupset. \(\xi\),
\(\langle D \rangle\) and \(\langle \sigma_a \rangle\) are computed per
material when the groupset is initialized. \(\phi^{(\text{th}+1/2)}\)
includes the within-group DSA correction when it is used, and the TGDSA
correction is added after it. With a PETSc inner method, TGDSA is part of the
preconditioner and acts on the vector that WGDSA returns. Like WGDSA, it
corrects only the scalar flux and adds the isotropic correction
\(\xi_g \theta\) to the lagged angular fluxes. A problem in adjoint mode
uses the transposed transfer matrix in \(A\), \(B\) and the residual.
The diffusion problem for \(\theta\) has the vacuum-boundary closure and the
MIP penalty of WGDSA, selected by tgdsa_boundary_closure and
tgdsa_h_perp_convention. All reflecting boundaries, including those that lag
their incoming flux, are zero-current boundaries for it. In time-dependent
problems, \(1/(v_g \theta \Delta t)\) is added to \(\sigma_{t,g}\) and to
the transport cross section in \(D_g\). The correction targets the mode
with spectrum \(\xi\). Error modes of the Jacobi iteration with other
energy shapes, such as the \(-\rho\) mode above, contribute to the
right-hand side and can change through the correction, but they are not
specifically removed.
With a stationary inner iteration (classic_richardson or
petsc_richardson), such a mode decays only at the rate set by its own
eigenvalue \(\lambda\), about \(|\lambda|\) per iteration. When
\(A^{-1}B\) has an eigenvalue near \(-\rho\) and \(\rho\) is close
to one, the groupset iteration with TGDSA therefore converges slowly or stalls
even though the mode \(\xi\) is removed. This happens exactly for a groupset
of two groups coupled by down- and upscatter, and approximately whenever
neighboring groups dominate the coupling between the groups of the groupset.
The C5G7 moderator, for example, has \(\rho = 0.872\) and the eigenvalue
\(-0.871\). Krylov inner methods (petsc_gmres, petsc_fgmres) are not
limited by the sign of an eigenvalue and should be used with TGDSA for such
groupsets.
6.6. Power Iterations
For eigenvalue problems, the problem has the following form:
To solve this system of equation, the Power Iteration (PI) method consists of iterations on the fission production term,
where \(o\) denotes the outer Power Iteration index (also known as the outer iteration index). At each PI, a fixed source problem has to be solved. This fixed-source problem also requires inner iterations (within-group Source Iterations, possibly thermal iterations, as well as accelerations for each of these iterative schemes):
6.7. Acceleration of Power Iterations
\[\Psi^{\text{(o+1/2)}} = L^{-1} \left ( M\Sigma\Phi^{\text{(o)}} + \frac{1}{k^{\text{(o)}}_\text{eff}} M S_f^{\text{(o)}} \right) \,.\]Similar to other synthetic acceleration methods, a transport equation for the angular error \(\Psi-\Psi^{\text{(o+1/2)}}\) is derived, with the variable without any superscript denoting the exact answer. However, a low-order approximation to the transport equation is employed to solve for the approximation of the scalar error \(\delta \Phi = \Phi - \Phi^{\text{(o+1/2)}}\). At this stage, this description gives rise to the Adams-Barbu method Barbu and Adams [BA23] if the diffusion is chosen as the low-order operator. Note that an eigenvalue problem that contains an inhomogeneous source term needs to be solved. Then, the flux update would be given by \(\Phi^{\text{(o+1)}} = \Phi^{\text{(o+1/2)}} + \delta\Phi\).
\[(A - \Sigma_0) \vartheta = \frac{1}{\lambda}F\vartheta + R(\Psi^{\text{(o+1/2)}}) \,,\]with \(A\) a diffusion operator, \(\Sigma_0\) a scattering operator, \(F\) the fission operator, and \(R\) the residual due to the unconverged transport-sweep step. This inhomogeneous eigenvalue problem is currently solved using a standard Power Iteration (index \(m\)).
\[(A-\Sigma_0) \vartheta^{(m+1)} = \frac{1}{\lambda^{(m)}}F\vartheta^{(m)} + R(\Psi^{\text{(o+1/2)}}) \,.\]Upon convergence of the eigenproblem for the second-moment method, one sets
\[\begin{split}\begin{aligned} k^{\text{(o+1)}} & \leftarrow \lambda \\ \Phi^{\text{(o+1)}} & \leftarrow \vartheta \end{aligned}\end{split}\]and one proceeds with a new outer iteration in transport, until convergence of the transport problem.
6.8. Coarse-Mesh Finite Difference Acceleration
OpenSn provides Coarse-Mesh Finite Difference (CMFD) acceleration for discrete-ordinates power iteration. The implementation is a nonlinear low-order acceleration scheme. During each outer power iteration OpenSn performs a transport update, restricts the scalar flux and angular outflow currents to a coarse mesh, assembles a coarse diffusion-like k-eigenvalue problem that is consistent with the latest transport currents, solves that low-order problem, and prolongs the resulting coarse scalar-flux change back to the transport mesh as a multiplicative correction.
The basic idea is that the transport sweep is accurate but expensive, whereas the low-order CMFD problem is much cheaper and captures the slowly converging error mode in the scalar flux. CMFD does not replace the transport solve. Instead, it builds a coarse balance equation based on the current transport iterate and uses that equation to predict how the scalar flux should be corrected before the next transport iteration. This makes CMFD nonlinear: the low-order operator, the condensed cross sections, and the current closure all depend on the latest high-order transport solution.
For a k-eigenvalue problem, the high-order transport iteration can be written as
where \(\psi\) is angular flux, \(\phi\) is scalar flux, \(\mathcal{L}\) is the streaming-plus-collision operator, \(\mathcal{S}\) is scattering, \(\mathcal{F}\) is fission production, and \(\mathcal{M}\) denotes angular integration. Power iteration repeatedly lags the fission source, performs transport sweeps, and updates \(k\) from the change in fission production. CMFD inserts an additional low-order step after the transport update. The low-order step uses only scalar unknowns, so it cannot reproduce the angular transport solution, but it can enforce a coarse neutron balance and remove much of the slowly converging scalar-flux error.
The implementation is intentionally tied to the discrete-ordinates
transport data structures. The coarse mesh is built directly from the
transport mesh. A CMFD coarse cell \(I\) is either a single
transport cell (the identity coarse-mesh option) or an aggregate of
fine transport cells. Aggregates preserve material block ids unless mixed-material
aggregation is explicitly enabled. By default
(local_aggregation), aggregates are built independently on each MPI
rank and do not cross rank boundaries; the global_aggregation option
instead builds connected aggregates, same-block unless mixed-material aggregation
is enabled, that may span MPI ranks,
merging undersized rank-local aggregates across ranks as needed. A
coarse face \(f\) is formed by merging all fine faces
between the same pair of coarse cells, or between a coarse cell and the
same boundary id. The coarse-face area, centroid, normal, neighbor id,
and neighbor material data are computed from the underlying fine faces.
The default aggregated coarse grid inherits the transport-mesh topology.
Logical-volume, Cartesian and reactor-lattice overlays instead assign each
fine cell to a user-defined region by its centroid. A region is split into its
face-connected parts, may contain several materials and may span MPI ranks.
Its interfaces are still built from the underlying fine faces, so the coarse
net currents are sums of transport face currents even where the region
boundary does not follow a mesh plane.
This section describes the method at the level used by OpenSn rather than as pseudocode for the implementation. The important implementation choices are the mathematical ones: how the fine transport solution is restricted, how cross sections are collapsed, how coarse face currents are made consistent with the latest transport sweep, how the coarse k-eigenvalue problem is solved, and how the coarse solution is prolonged back to the fine transport unknowns.
6.8.1. Restriction and energy collapse
Let \(\phi_{i,n,g_f}\) denote the transport scalar flux in fine cell \(i\), node \(n\), and transport group \(g_f\), and let \(V_{i,n}\) denote the nodal volume contribution from the transport spatial discretization. For a CMFD coarse cell \(I\), the restricted coarse scalar flux for a coarse energy group \(g_c\) is
The coarse energy groups are contiguous blocks of transport groups. If the block size is one, every transport group is retained in the CMFD system. With larger block sizes, several adjacent transport groups are collapsed into one CMFD group. The number of CMFD energy groups is the ceiling of the number of transport groups divided by this block size.
OpenSn homogenizes the material data in space and condenses it in energy using the most recent fine-mesh scalar flux. This is the usual reaction-rate-preserving weighting used in CMFD OpenMOC Documentation [OpenMOCDocumentation19]. Let
Unlike the volume-averaged coarse-group flux \(\Phi_{I,g_c}\) above, \(\Phi_{i,g_f}\) is a volume integral that retains the fine-cell index and transport group so that a coarse cell may contain several materials. For coarse group \(g_c\), the removal cross section in coarse cell \(I\) is
The fine cells of a coarse cell that share a material block \(m\) form one material region, whose flux integral is
The removal, scattering, and production coefficients are linear in the flux, so they are the same whether they sum over fine cells or over material regions. OpenSn computes them from the region integrals.
The diffusion coefficient only sets the interface coupling that the nonlinear current correction completes, so it does not affect the fixed point. OpenSn weights it with the region magnitudes \(|\Phi_{I,m,g_f}|\). A magnitude equals the region integral wherever that integral is positive and keeps the coefficient positive. The magnitude is taken after the signed fine-cell integrals of the region are summed. OpenSn first homogenizes the transport cross section of each fine energy group, with \(\Sigma^{tr}_{m,g_f}\) the transport cross section of material \(m\),
and then condenses the spatially homogenized diffusion coefficients,
The order matters: averaging material diffusion coefficients first would average \(1/\Sigma^{tr}\) rather than preserving the transport reaction rate. If the homogenized transport cross section is below \(10^{-12}\), OpenSn applies the same near-void bound as the material cross-section object, \(D=1/(3\times10^{-12})\).
For source coarse group \(g_c^{\prime}\) and destination coarse group \(g_c\), the P0 scattering transfer and fission production terms are
The production matrix includes delayed production when precursor use is enabled. In adjoint mode the scattering, prompt-production, and delayed- production operators are transposed before homogenization. The removal coefficient uses the same formula with the transposed scattering matrix and the adjoint flux weights. With energy collapse it therefore subtracts the adjoint transfers between fine groups of the same coarse group, which differ from the forward transfers. Without energy collapse it subtracts only within-group scattering, which transposition leaves unchanged. The diffusion coefficient uses the adjoint transport cross section, which subtracts the P1 in-scatter instead of the P1 out-scatter.
The signed weights preserve the fine-mesh rates of the transport iterate exactly, including where the scalar flux is negative, so no sign condition is imposed on the condensed coefficients. The weights of coarse group \(g_c\) are replaced only when \(W_{I,g_c}\) is zero, non-finite, or satisfies \(|W_{I,g_c}|\le 64\epsilon\sum_{m\in I}\sum_{g_f\in g_c}|\Phi_{I,m,g_f}|\), where \(\epsilon\) is the double-precision machine epsilon; below this bound the sum is indistinguishable from roundoff. The test is relative, so it is invariant under rescaling of an eigenvector. The implementation then substitutes the physical fine-cell volumes \(\sum_n V_{i,n}\) for the flux weights of that coarse group, whose coarse rates then no longer match the transport rates. The same physical-volume rule constructs the first operator before a transport iterate exists. The CMFD operator uses only the zeroth scattering moment. Higher scattering moments may be present in the high-order transport solve, but the CMFD correction accelerates only the scalar balance. The first scattering moment still enters \(\Sigma^{tr}\) through the transport correction.
The cell-local terms in the CMFD matrix use the latest homogenized data owned by the coarse cell. Homogenized diffusion coefficients are exchanged between neighboring coarse-cell owners before interface couplings are assembled, so both rows that share an interface use the same two diffusion coefficients and the same coupling. The nonlinear current correction described below is then responsible for making the assembled face current match the latest transport current at the current iterate.
6.8.2. Coarse diffusion balance
For each coarse cell \(I\) and coarse group \(g_c\), OpenSn assembles a balance equation of the form
For an interior coarse face shared by owner cell \(I\) and neighbor cell \(J\), the diffusion part of the face coupling can be derived by introducing a face value \(\Phi_{f,g_c}\) and requiring the same normal current on each side of the face. Here \(J_{I,f,g_c}\) is taken as positive outward from cell \(I\) toward cell \(J\):
Eliminating the face value gives a two-point coupling
where
with \(A_f\) the coarse-face area and \(d_{I,f}\) and \(d_{J,f}\) the centroid-to-face distances. This is the same harmonic interface form obtained by eliminating the face flux in a two-cell finite-difference stencil, generalized to OpenSn’s arbitrary mesh faces.
OpenSn uses the full distance from the coarse-cell centroid to the coarse-face centroid,
where \(\mathbf{x}_I\) is the owner coarse-cell centroid and \(\mathbf{x}_f\) is the coarse-face centroid. For an aggregated or overlay coarse face, OpenSn obtains the coarse-face area and centroid from the contributing fine faces. On an orthogonal face, where \(\mathbf{x}_f-\mathbf{x}_I\) is parallel to the face normal \(\mathbf{n}_{I,f}\), this equals the usual projected normal distance \(|(\mathbf{x}_f-\mathbf{x}_I)\cdot\mathbf{n}_{I,f}|\). On a skewed or ragged face it is larger. The projected distance tends to zero where \(\mathbf{x}_f-\mathbf{x}_I\) is nearly parallel to the face, as on elongated or irregular aggregates, and would then make the coupling grow without bound. The full distance keeps it bounded. This is the orthogonal-correction decomposition of the face-normal gradient used by finite-volume methods on non-orthogonal meshes, without the explicit non-orthogonal correction those methods add. CMFD needs no such correction: the current correction below makes the coarse currents reproduce the transport currents for any coupling, so the coupling affects only the stability of the iteration, not its fixed point.
The centroid of a nonconvex coarse cell can lie on one of its coarse faces, so that \(d_{I,f} = 0\). That half of the interface then has no resistance, and \(D^f_{I,J,g_c} = D_{J,g_c}A_f/d_{J,f}\), the limit of the expression above. OpenSn stops with an error only if both centroids lie on the face.
The face area \(A_f\) is the physical face area. For equal diffusion coefficients the coupling reduces to the intuitive form
The resulting spatial stencil is still a two-point flux approximation (TPFA). A TPFA diffusion face flux uses only the two cell-centered unknowns adjacent to the face. This is compact and inexpensive, and it is the natural form for traditional CMFD. However, it is not a full multi-point flux approximation (MPFA). An MPFA scheme would use a larger local stencil to reconstruct face-normal gradients more accurately on highly non-orthogonal meshes. OpenSn’s CMFD face coupling is geometry-aware, but it remains a two-cell diffusion-like closure plus a nonlinear current correction from transport.
This uncorrected diffusion current is cheap and compact, but, by itself, is not guaranteed to equal the net current produced by the high-order transport sweep. Traditional CMFD fixes this by adding a nonlinear current correction OpenMOC Documentation [OpenMOCDocumentation19]. In the net-current form of standard CMFD, the corrected current is
The coefficient \(\widetilde{D}_{I,J,g_c}\) is chosen so that this expression exactly reproduces the latest restricted transport net current \(\widetilde{J}_{I,J,g_c}\) when evaluated with the latest restricted transport scalar fluxes. Solving the preceding equation for \(\widetilde{D}_{I,J,g_c}\) gives
This is the fixed-point-preserving part of CMFD. If the high-order transport iterate already satisfies the coarse balance, the low-order operator evaluates to the same coarse currents and does not introduce an artificial correction. In matrix form, the outward current contribution from cell \(I\) is
The transport net current \(\widetilde{J}_{I,J,g_c}\) is obtained from the discrete ordinates sweep outflow. For each fine face in a coarse face, OpenSn adds the owner’s outward angular outflow and subtracts the neighbor’s opposing outflow. If the neighbor cell is on another MPI rank, the needed neighbor outflow is exchanged before the CMFD operator is assembled.
OpenSn uses the partial-current CMFD (pCMFD) closure of Cho et al. [CLP03] instead. Let \(P_{I\rightarrow J,g_c}\) be the restricted outgoing partial current from coarse cell \(I\) through the face shared with \(J\), and let \(P_{J\rightarrow I,g_c}\) be the opposing outgoing partial current from \(J\). Each partial current is modeled with half of the diffusion coupling and its own nonlinear correction:
The corrections are chosen so that \(J^{+}\) and \(J^{-}\) reproduce \(P_{I\rightarrow J,g_c}\) and \(P_{J\rightarrow I,g_c}\) when evaluated with the latest restricted transport scalar fluxes:
The outward net current is \(J^{\text{pc}}_{I,J,g_c} = J^{+}_{I,J,g_c} - J^{-}_{I,J,g_c}\), so the diagonal face coefficient for cell \(I\) is \(D^f_{I,J,g_c}+\widehat{D}^{+}_{I,J,g_c}\) and the off-diagonal coefficient multiplying \(\Phi_{J,g_c}\) is \(-D^f_{I,J,g_c}-\widehat{D}^{-}_{I,J,g_c}\). Like the net-current closure, this form reproduces the latest transport net current, so the CMFD fixed point is unchanged. It differs in how the coarse operator responds to a change of the coarse flux: the diffusion coupling is retained in both one-sided currents. If the resulting coefficients are not finite, the face uses the diffusion coupling without the current correction. OpenSn counts these faces and warns once. Small fluxes are treated by holding the coarse value, as described next, not by this fallback.
The closure divides by the restricted coarse fluxes. Where a discontinuous transport solution dips below zero, typically deep in a reflector, a restricted flux \(\Phi_{I,g_c}\) can be negative, and the corrections would then give the coarse operator entries of the wrong sign. A coarse value whose restricted flux is at most \(10^{-14}\) times the largest magnitude of the restricted fluxes of its coarse group, which includes every value that is not positive, is held in the coarse solve: its row is replaced by \(\Phi_{I,g_c} = s\,\Phi^{\text{HO}}_{I,g_c}\), where \(s = P(\Phi)/P(\Phi^{\text{HO}})\) is the production of the coarse iterate relative to the transport iterate, so the coarse problem stays homogeneous in its iterate. A free neighbor \(J\) models its outgoing partial current into \(I\) by the ratio \((P_{J\rightarrow I,g_c}/\Phi^{\text{HO}}_{J,g_c})\,\Phi_{J,g_c}\) and receives \(s\,P_{I\rightarrow J,g_c}\) as a source. At the transport solution, \(s = 1\) and both reproduce the transport partial currents, so the fixed point is unchanged. Each coarse solve decides which values are held from the current transport iterate, and both sides of a face apply the same test, so a value whose flux has become positive again is free on both sides. The Wielandt shift skips held rows.
The net-current closure, as in standard CMFD, can make the coarse correction oscillate or diverge when the coarse cells are optically thick. The partial-current closure remains stable with a full (unrelaxed) correction over a much wider range of coarse-cell optical thickness, and it was never slower in OpenSn’s tests, so it is the only closure OpenSn implements. Dropping the diffusion coupling from the partial currents, which reduces the closure to partial-current coarse-mesh rebalance, is not equivalent: rebalance can diverge on optically thin coarse cells unless the correction is strongly relaxed. The closure affects only the CMFD operator; it does not alter the high-order transport equation.
This current matching is what distinguishes CMFD from simply solving an ordinary coarse diffusion problem. The diffusion coefficient supplies a reasonable low-order stencil, but the nonlinear correction supplies consistency with the transport solution that generated the current iterate. Consequently, at convergence of the high-order transport iteration, the CMFD correction tends to the identity correction instead of pushing the solution toward the solution of an unrelated diffusion problem.
For a non-reflecting boundary face, OpenSn uses a one-sided boundary leakage coefficient. Before transport currents are available this coefficient is \(A_f/2\); after a transport update it is replaced by the measured outward current divided by the owner coarse scalar flux. Reflecting boundaries do not contribute net leakage to the CMFD balance.
The first CMFD operator assembled during initialization has no transport current data yet, so it uses the diffusion face coefficients and the initial boundary leakage approximation. After each transport update, the neighboring coarse scalar fluxes and face outflows needed on processor boundaries are exchanged, the transport net currents are reconstructed, and the nonlinear CMFD operator is reassembled before solving the coarse problem.
Two residuals characterize the coarse balance. The assembled-operator residual is
where \(A\) is the assembled operator, with the current closure and the identity rows of held values, and \(h\) holds the held values and the partial currents that held values send to their free neighbors. The transport-current residual is
where \(L_T\) has the same removal and scattering terms as \(A\) in every row, held or
not, and replaces the face terms by the directly restricted transport net currents. OpenSn
reports \(\|r_A\|_2/\|b_A\|_2\) and \(\|r_T\|_2/\|b_T\|_2\) with verbose=True.
Without held values the two right-hand sides are equal and the residuals differ only by the face
terms. With held values the residuals and their normalizations differ, so the two numbers are
not directly comparable. They are diagnostics: the power iteration decides convergence with its
eigenvalue and fission-source tests, which do not depend on the coarse mesh. CMFD only withholds
convergence after an update whose correction was skipped, because such an update is
unaccelerated.
6.8.3. Matrix form and coarse solve
The assembled system may be written as
where the operator and cross sections are built from the latest high-order transport iterate \(\Phi^{\text{HO}}\). The unknown ordering is cell-major, with all CMFD energy groups for a coarse cell stored contiguously. The spatial off-diagonal entries couple neighboring coarse cells in the same coarse group; the cell-local block couples coarse groups through scattering and fission production.
OpenSn solves the coarse k-eigenvalue problem with a power iteration that is unshifted at first and Wielandt-shifted after. The coarse operator is fixed during these iterations; it is assembled from the latest high-order transport iterate. With a shift \(k_s\), each iteration solves
and updates the eigenvalue estimate with the production \(P^{(m)}\) of each iterate by
which for \(k_s = \infty\) is the usual update \(k^{(m+1)} = k^{(m)} P^{(m+1)}/P^{(m)}\). The iteration converges by \((1/k_0 - 1/k_s)/(1/k_1 - 1/k_s)\) per iteration instead of by the dominance ratio \(k_1/k_0\), which is close to one in large problems. It converges to the mode whose \(1/k\) is nearest \(1/k_s\), provided the start has a component along that mode. A shift above the fundamental eigenvalue \(k_0\) therefore selects the fundamental mode, and a shift below it can select another mode. The estimate from a poor transport iterate, as in early updates, can be far below \(k_0\). So the iteration starts unshifted (\(k_s = \infty\)), which converges to the fundamental mode from any start with a component along it. After at least three iterations, once the extrapolated error of the estimate, its relative change divided by \(1-\rho\), is below half the margin, OpenSn sets \(k_s = 1.05\,k\). This test estimates that \(k_s\) lies above \(k_0\) but does not prove it. It can be wrong only for an iterate with almost no fundamental component. The free coarse values start from the restricted transport flux, which is positive wherever a value is free, and where the coarse operator is an M-matrix the fundamental mode and its adjoint are positive, so such a start has a fundamental component that is not small. OpenSn raises \(k_s\) whenever the estimate comes within half the margin, so the shifted operator stays nonsingular. The iteration stops when the change of the production-normalized coarse flux, divided by \(1-\rho\) with \(\rho\) its estimated convergence rate, and the relative change of \(k\) are both below \(\min(10^{-6},\,10^{-2}\,\delta)\) and \(\min(10^{-8},\,10^{-2}\,\delta)\), where \(\delta\) is the relative change that the transport update made to the normalized coarse flux. A fixed tolerance would add an error of its size to every correction and stall the outer iteration once its own error reached that level. At most 1000 iterations are done. A coarse solve that reaches that limit, or whose production or eigenvalue is not a positive finite number, gives no correction: that update is skipped, with a one-time warning.
In adjoint mode this matters early in the iteration. The forward coarse operator is diagonally dominant by columns in space and in energy, because removal covers out-scattering. It is an M-matrix when its off-diagonal entries are not positive, which holds when the condensed scattering coefficients are not negative and the transport partial currents across coarse faces are positive. Signed flux weights in the homogenization or negative partial currents in early iterates can break that sign pattern in forward mode too, and the held values and the local sign guard handle those cases. In adjoint mode the scattering is transposed, and a group’s adjoint out-scattering is its forward in-scattering, which can exceed its removal. The closure of a poor early transport iterate can then give a coarse operator without a positive fundamental mode, and its power iteration does not converge.
The shifted iteration changes the amplitude of the coarse solution, so OpenSn rescales it to the amplitude the unshifted iteration would reach.
The coarse linear solves use a PETSc direct LU factorization (SuperLU_DIST, MUMPS, or PETSc’s own LU on one rank) when the estimated memory of the factorization, from the nested-dissection fill of the coarse graph, is at most 1 GiB per MPI rank, and FGMRES with an additive Schwarz preconditioner and ILU(0) subdomain solves otherwise. Algebraic multigrid is not used, because signed transport iterates can make the coarse operator lose the M-matrix property and AMG then reports convergence for a wrong solution. A coarse solve is accepted only if its true residual is small. If any coarse linear solve fails, the correction from that outer iteration is not applied.
The updated coarse eigenvalue is computed from the ratio of coarse fission production rates. Define
Then
The production sum is reduced globally over all MPI ranks.
6.8.4. Prolongation and admissibility
After the coarse solve, OpenSn applies a multiplicative scalar-flux correction to the high-order transport iterate. If \(\Phi^{\text{HO}}_{I,g_c}\) is the restricted scalar flux after the transport update and \(\Phi^{\text{CMFD}}_{I,g_c}\) is the coarse solution, the correction is unrelaxed, \(\Phi^{\text{corr}}_{I,g_c} = \Phi^{\text{CMFD}}_{I,g_c}\).
For every fine cell and node inside coarse cell \(I\), and for every fine transport group \(g_f\) belonging to coarse group \(g_c\), the accepted candidate is prolonged as a ratio:
If \(\Phi^{\text{HO}}_{I,g_c}\) is too small, the ratio is taken to be one. A non-finite or negative ratio would change the sign of the scalar flux in coarse cell \(I\) and coarse group \(g_c\), and where \(\Phi^{\text{HO}}_{I,g_c}\) is itself negative a positive ratio of two negative values can be large and would amplify the negative fine flux. Such a coarse value instead keeps the transport flux, \(\Phi^{\text{corr}}_{I,g_c} = (k^{\text{CMFD}}/k^{\text{HO}})\,\Phi^{\text{HO}}_{I,g_c}\), scaled to the amplitude of the coarse solution, so its ratio is \(k^{\text{CMFD}}/k^{\text{HO}}\). All ratios tend to one at convergence, so the fixed point is unchanged. The whole correction is skipped, keeping the unaccelerated transport update for that outer iteration, if it produces non-finite scalar fluxes or a non-finite or non-positive k-eigenvalue. The correction is not damped: damping never reduced the number of iterations in OpenSn’s tests, and it moves every value toward the transport iterate, where the local fallback moves only the values that need it.
The eigenvalue returned to the outer power iteration is consistent with the accepted fine-mesh scalar flux. OpenSn computes the old fine-mesh fission production before the transport update. For a candidate corrected flux, it recomputes the fine-mesh fission production and updates \(k\) by the production ratio. If the CMFD correction is skipped, the unaccelerated transport update is retained. After repeated skipped corrections, the returned eigenvalue is the raw production-ratio transport eigenvalue so that the outer iteration continues to advance with the high-order transport state rather than stagnating on a stale accelerated value.
6.8.5. CMFD Iteration Outline
CMFD is a power-iteration accelerator in OpenSn. For each outer power iteration:
The previous fine-mesh scalar flux is restricted to the CMFD mesh. This gives the coarse reference state for the new outer iteration.
The transport solver advances the high-order problem through the normal across-groupset process with
sweeps_per_updatewithin-group iterations (one by default) rather than a converged inner solve.The new all-groups scalar flux is restricted to the CMFD mesh. The fine-group restricted flux is used for cross-section condensation, and the coarse-group restricted flux defines the current CMFD iterate.
Coarse-face net currents are reconstructed from the latest transport sweep. These currents define the nonlinear correction that makes the low-order current agree with the high-order current at the current iterate.
The nonlinear CMFD operator is assembled from the condensed material data, TPFA diffusion coupling, boundary leakage treatment, and the partial-current closure.
A coarse power iteration, unshifted until its eigenvalue estimate is reliable and Wielandt-shifted after, solves the low-order k-eigenvalue problem to a tolerance relative to the transport change. A coarse solve that does not converge to a positive, finite production and eigenvalue within 1000 iterations gives no correction.
The coarse solution is prolonged as a multiplicative ratio to the fine-mesh scalar flux, unless the correction is inadmissible, in which case it is skipped.
The corrected fine-mesh scalar flux and corresponding fission-production ratio define the next power-iteration state. The power iteration’s eigenvalue and fission-source tests decide convergence; an update with a skipped correction cannot end the iteration.
Thus, the current implementation is not one accelerator per groupset. It operates after the AGS transport update for the current outer iteration and accelerates the all-groups scalar-flux balance.
6.9. Uncollided-flux Treatment
In streaming regions (low-density material), in regions with low amount of scattering, and with localized small sources, the \(S_n\) method will exhibit ray effects (angular discretization error). These ray effects can be mitigated by splitting the angular flux into uncollided and collided components Hanus et al. [HHR+19]:
Then, the original transport problem \(L\Psi = M\Sigma \Phi + MF\Phi + Q_{\text{ext}}\) can be split into
The uncollided problem:
\[L\Psi^u = Q_{\text{ext}}\]For this uncollided transport solve, one can compute the uncollided flux moments \(D\Psi^u\) and the first-collision source moments
\[Q_{\text{fc}} = M\Sigma \Phi^u + MF\Phi^u\]from scattering and, in a fissile material, fission production. \(F\) is the fission production operator. It acts on the scalar moment only and includes delayed production whenever the fission source of the transport solve does.
The collided problem:
\[\begin{split}\begin{cases} L\Psi^c & = M\Sigma \Phi^c + MF\Phi^c + Q_{\text{fc}} \\ \Phi^c & = D \Psi^c \end{cases}\end{split}\]
Notes:
The inversion of the \(L\) operator in the uncollided problem can be done using ray tracing, thus mitigating ray effects.
Near a localized source the uncollided flux varies too steeply for the far-field treatment, and the cells that contain the source need a treatment of their own. The flux of a point source is singular at the source, and a small volumetric source has no singularity but a similarly steep near field. OpenSn’s uncollided generator accepts point sources only. A volumetric source can be supplied as weighted point sources at its volume-quadrature points (see the note on finite-volume sources below). Within the near-source region, OpenSn ray-traces both a volumetric least-squares projection of the scalar flux onto the local PWLD basis (from which cell removal is computed) and the outgoing face currents, using the point source’s exact analytic attenuation, following the near-source treatment of Woodsford et al. [WRM26]. For the true field, away from the source itself, \(\vec{\nabla}\cdot(\phi\vec{\Omega}_s) + \sigma_t\phi = 0\), so by the divergence theorem the incoming current plus the cell source equals the outgoing current plus absorption exactly; a mismatch between the two independently ray-traced quadratures is therefore purely a numerical artifact of finite quadrature resolution near the source’s own near-singular field, not missing physics. OpenSn reconciles the two quadratures with the single shared scale factor from Eqs. (24)–(25) of Woodsford et al. [WRM26]. It scales the raw least-squares projection (and thus removal) and outgoing currents by that factor, so that the cell’s source, removal, and leakage balance exactly. Because no nonlinear positivity correction is applied, individual PWLD coefficients may be negative near the point-source singularity. The magnitude of that scale factor is reported as a diagnostic, with a warning if it becomes large. A large factor indicates that the local spatial flux shape is poorly resolved. The correction restores cell balance, but the mesh or source placement may still need refinement.
The flux of a point source is singular at the source, so these quadratures cannot resolve it in the cell that contains the source. That cell is instead represented by its exact cell-average flux. With \(S\) the emission rate of the point source in a group and \(R(\vec{\Omega})\) the distance from the source to the cell boundary in direction \(\vec{\Omega}\), the volume integral of the flux and the leakage through face \(f\) are
\[\int_{V} \phi \, dV = \frac{S}{4\pi}\int_{4\pi} \frac{1 - e^{-\sigma_t R(\vec{\Omega})}}{\sigma_t} \, d\Omega , \qquad J_f = \frac{S}{4\pi}\int_{\Omega_f} e^{-\sigma_t R(\vec{\Omega})} \, d\Omega ,\]where \(\Omega_f\) is the solid angle subtended by face \(f\). OpenSn evaluates these over the cone from the source through each PWL side triangle of each face with a composite Gauss–Legendre rule in variables that keep the integrands smooth even when the source is close to a face, edge, or vertex of the cell. This makes the result much less sensitive to where the source lies than a rule in the original variables. The quadrature error still depends on the source position through the integration limits and the number of panels. The method applies to cells of any shape, provided every face is directly visible from the source, which is always the case in a convex cell. OpenSn accepts non-convex cells, for example in polyhedral meshes. In a non-convex 3D cell a ray from the source may leave the cell and re-enter it. If that happens, OpenSn falls back to the quadrature projection with a warning.
In the source cell, every node of the scalar flux is set to the exact cell average. Because the flux is singular at the source, it varies strongly across the cell, and the cell-average treatment causes this variation to be lost. This loss in fidelity can only be reduced by refining the mesh around the source. The angular moments with \(\ell \geq 1\) of the uncollided flux at a point \(\vec{r}\) are the scalar flux times \(Y_{\ell m}(\vec{\Omega}_s)\), with \(\vec{\Omega}_s\) the direction from the source to \(\vec{r}\). In the source cell they are formed from the constant cell average and projected onto the PWLD basis, so they still vary in space through \(Y_{\ell m}\). Accuracy near the source must still be checked through mesh refinement.
The point source enters the balance of the source cell as \(S\,\Omega_c/(4\pi)\), where \(\Omega_c\) is the solid angle the cell subtends at the source, computed exactly from the cell’s faces. It equals \(S\) for a source inside the cell. A source must belong to exactly one cell, so a source on a vacuum boundary lies inside a boundary face of its cell, or on a boundary edge or vertex that no other cell shares. The remaining fraction then leaves the domain directly and is counted as outflow. Sources on a reflecting boundary are rejected, because such a source coincides with its own image.
When the source is close to an edge or vertex of its cell, it is also close to the cells that share that edge or vertex. Their quadrature leakages are then inaccurate, and because each near-source cell’s correction factor is computed from the leakages it receives, the error propagates to every downstream cell. With the optional
exact_near_source_leakagetreatment, each convex near-source cell that shares a vertex with the source cell is integrated exactly over direction. The leakage through an outgoing face \(f\) is\[J_f = \frac{S}{4\pi}\int_{\Omega_f} e^{-\tau(\vec{\Omega})} \, d\Omega ,\]where \(\tau\) is the optical depth from the source to the face along \(\vec{\Omega}\), found by ray tracing, so heterogeneous media are handled. With \(\Delta(\vec{\Omega})\) the chord length through the cell and \(\tau_{in} = \tau - \sigma_t \Delta\) the optical depth to where the ray enters it, the volume integral is
\[\int_{V} \phi \, dV = \frac{S}{4\pi}\sum_{f\,\mathrm{outgoing}}\int_{\Omega_f} e^{-\tau_{in}(\vec{\Omega})}\, \frac{1 - e^{-\sigma_t \Delta(\vec{\Omega})}}{\sigma_t} \, d\Omega ,\]which reduces to \(\Delta\) as \(\sigma_t \to 0\). OpenSn evaluates the factor as \(-\mathrm{expm1}(-\sigma_t\Delta)/\sigma_t\), which has no cancellation error for small \(\sigma_t \Delta\), so optically thin cells need no Taylor expansion; only \(\sigma_t\Delta = 0\) uses the limit \(\Delta\). These are the same integrals as for the cell containing the source, which is the case \(\tau_{in} = 0\) with \(\Delta\) the distance to the face, and OpenSn evaluates both with the same routine. The directions are integrated over each face side triangle by fanning it out from the point of the triangle closest to the source, with the radius graded by a \(\sinh\) substitution, so the integrands remain smooth however close the source is to the cell. The two treatments differ only in how the flux inside the cell is represented: the projected flux shape of a neighbor cell is rescaled to the exact volume integral, while the source cell, whose projection cannot resolve the singularity, uses the constant cell average.
Finite-volume sources can be approximated externally by weighted point sources, for example at volume-quadrature points. Those quadrature points and the spatial mesh should be selected together so the point sources do not lie close to cell boundaries. Convergence must be checked with respect to both discretizations. The uncollided problem uses explicit point sources and must run with exactly one MPI rank. On that rank, physical sources are processed sequentially.
OPENSN_NUM_THREADSparallelizes the bulk sweep over energy groups, and the ray tracing of the near-source region and reflected-image projection over cells. The conservation correction of the near-source cells, which depends on the corrected leakages of their upstream cells, and moment accumulation remain single-threaded. The resulting HDF5 file can be used by a subsequent collided calculation on the same mesh with one or more MPI ranks.Planar, mutually orthogonal reflecting symmetry boundaries are represented by image sources. To compute attenuation from an image source, OpenSn reflects any portion of the ray outside the physical domain back into the domain, then performs the standard attenuation calculation along the resulting physical path. Each image copies the group-dependent strength of its physical source point. Thus an image of a point used in a weighted approximation of a finite-volume source retains that point’s source weight. Image-source flux is projected with the standard finite-element volume quadrature and receives no near-source conservation correction. This image-source construction is an OpenSn extension to the published algorithm. For image sources, absorption is computed using the volume quadrature, while outflow is computed using a separate face quadrature. Because these integrations have no conservation correction, their finite-quadrature errors are not forced to satisfy particle balance, and the resulting discrepancy appears in the reported balance residual.
The published method considered isotropic scattering and therefore needed only the scalar uncollided flux. OpenSn extends it to anisotropic scattering by constructing higher angular moments without an \(S_n\) angular quadrature. For a point source at \(\vec{r}_s\), the uncollided angular flux at \(\vec{r}\) is concentrated in the ray direction
\[\vec{\Omega}_s(\vec{r}) = \frac{\vec{r}-\vec{r}_s}{\lVert\vec{r}-\vec{r}_s\rVert},\]so its moments are
\[\phi^u_{\ell,m,g}(\vec{r}) = Y_{\ell,m}\!\left(\vec{\Omega}_s(\vec{r})\right) \phi^u_g(\vec{r}).\]OpenSn evaluates this product at each finite-element volume quadrature point and projects it onto the local PWLD basis. In cell \(K\), the nodal coefficients satisfy
\[\sum_j M^K_{ij}\Phi^{u,K}_{\ell,m,g,j} \simeq \sum_q b_i(\vec{r}_q) Y_{\ell,m}\!\left(\vec{\Omega}_s(\vec{r}_q)\right) \phi^u_g(\vec{r}_q) J_q w_q,\]where \(M^K_{ij}=\int_K b_i b_j\,dV\). This projection is performed separately for every physical and reflected source and the resulting coefficients are summed. The real spherical-harmonic convention is the one defined in Background on the Linear Boltzmann Equation; in particular, \(Y_{0,0}=1\), so the zeroth moment is the scalar flux.
scattering_orderselects the maximum \(\ell\) written to the HDF5 file and must be at least the scattering order of the collided calculation.The collided problem is quite similar to a standard \(S_n\) so the solution techniques described early apply straightforwardly. The first-collision source plays the role of the external source in this problem.
The same split applies to the adjoint problem with a point detector as the adjoint source. OpenSn solves the adjoint along the quadrature directions with the transposed transfer and production matrices (see Adjoint Flux Formalism). In that orientation the adjoint uncollided flux of a point detector is the uncollided flux above, because it depends only on \(\sigma_t\), and the first-collision source is \(Q^\dagger_{\text{fc}} = M\Sigma^T \Phi^{u\dagger} + MF^T \Phi^{u\dagger}\), with the delayed production in \(F^T\) transposed as well. The uncollided moments are added to the collided solution before the adjoint solution is reoriented, which multiplies the moments of degree \(\ell\) by \((-1)^\ell\). The physical adjoint uncollided angular flux at \(\vec{r}\) is therefore concentrated in the direction \(-\vec{\Omega}_s(\vec{r})\), toward the detector.
6.10. References
ML Adams and EW Larsen. Fast iterative methods for discrete-ordinates particle transport calculations. Progress in Nuclear Energy, 40(1):3–159, 2002.
Youcef Saad and Martin H Schultz. Gmres: a generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM Journal on scientific and statistical computing, 7(3):856–869, 1986.
Yousef Saad. Iterative methods for sparse linear systems. Siam, 2003.
BW Patton and JP Holloway. Application of krylov subspace methods to the slab geometry transport equation. In ANS Topical Meeting on Radiation Protection and Shielding, volume 1, 384. 1996.
Brian Guthrie, James P Holloway, and Bruce W Patton. Gmres as a multi-step transport sweep accelerator. Transport Theory and Statistical Physics, 28(1):83–102, 1999.
Suely Oliveira and Yuanhua Deng. Preconditioned krylov subspace methods for transport equations. Progress in Nuclear Energy, 33(1):155–174, 1998.
James S Warsa, Todd A Wareing, and Jim E Morel. Krylov iterative methods and the degraded effectiveness of diffusion synthetic acceleration for multidimensional $s_n$ calculations in problems with material discontinuities. Nuclear Science and Engineering, 147(3):218–248, 2004.
Erin D Fichtl, James S Warsa, and Anil K Prinja. Krylov iterative methods and synthetic acceleration for transport in binary statistical media. Journal of Computational Physics, 228(22):8413–8426, 2009.
JE Morel. A synthetic acceleration method for discrete ordinates calculations with highly anisotropic scattering. Nuclear Science and Engineering, 82:34–46, 1982.
Edward W. Larsen. Diffusion-synthetic acceleration methods for discrete-ordinates problems. Transport Theory and Statistical Physics, 13(1-2):107–126, 1984. URL: https://doi.org/10.1080/00411458408211656, doi:10.1080/00411458408211656.
Yaqi Wang and Jean C. Ragusa. Diffusion synthetic acceleration for high-order discontinuous finite element $s_n$ transport schemes and application to locally refined unstructured meshes. Nuclear Science and Engineering, 166:145–166, 2010.
Bruno Turcksin and Jean C. Ragusa. Discontinuous diffusion synthetic acceleration for sn transport on 2d arbitrary polygonal meshes. Journal of Computational Physics, 274:356–369, 2014. URL: https://www.sciencedirect.com/science/article/pii/S0021999114004100, doi:https://doi.org/10.1016/j.jcp.2014.05.044.
BT Adams and JE Morel. A two-grid acceleration scheme for the multigroup $s_n$ equations with neutron upscattering. Nuclear Science and Engineering, 115(3):253–264, 1993.
Milan Hanus and Jean C. Ragusa. Thermal upscattering acceleration schemes for parallel transport sweeps. Nuclear Science and Engineering, 194(10):873–893, 2020. URL: https://doi.org/10.1080/00295639.2020.1767436, doi:10.1080/00295639.2020.1767436.
Wm H Reed. The effectiveness of acceleration techniques for iterative methods in transport theory. Nuclear Science and Engineering, 45(3):245, 1971.
Anthony P. Barbu and Marvin L. Adams. Convergence properties of a linear diffusion-acceleration method for k-eigenvalue transport problems. Nuclear Science and Engineering, 197(4):517–533, 2023. URL: https://doi.org/10.1080/00295639.2022.2123205, doi:10.1080/00295639.2022.2123205.
James Tutt Connor Woodsford and Jim E. Morel. A variant of the second-moment method for k-eigenvalue calculations. Nuclear Science and Engineering, 0(0):1–9, 2024. URL: https://doi.org/10.1080/00295639.2024.2303107, doi:10.1080/00295639.2024.2303107.
OpenMOC Documentation. Coarse mesh finite difference acceleration. 2019. Accessed: 2026-05-18. URL: https://mit-crpg.github.io/OpenMOC/methods/cmfd.html.
Nam Zin Cho, Gil Soo Lee, and Chang Je Park. Partial current-based CMFD acceleration of the 2D/1D fusion method for 3D whole-core transport calculations. Transactions of the American Nuclear Society, 88:594, 2003.
Milan Hanus, Logan H Harbour, Jean C Ragusa, Michael P Adams, and Marvin L Adams. Uncollided flux techniques for arbitrary finite element meshes. Journal of Computational Physics, 398:108848, 2019.
Connor Woodsford, Jean C. Ragusa, and Jim E. Morel. Sweep-based uncollided-flux treatment on unstructured grids. Progress in Nuclear Energy, 200:106524, 2026. URL: https://doi.org/10.1016/j.pnucene.2026.106524, doi:10.1016/j.pnucene.2026.106524.