Introduction
Welcome to the next lesson in our exploration of the Discrete Ordinates (S) method. In our previous session, we successfully transformed the integro-differential transport equation into a system of coupled ordinary differential equations (ODEs), one for each discrete direction . This left us with equations that are discrete in angle but still continuous in the spatial variable, :
To solve this system computationally, we must also discretize the spatial domain. This lesson will guide you through that crucial next step. Your learning objective is to derive the step and diamond difference spatial discretization schemes for the S equations. These two methods represent foundational approaches to approximating the spatial behavior of the angular flux, each with its own trade-offs between accuracy and stability. We will see that this process boils down to making a physically-motivated assumption about how the flux behaves within a small spatial cell.
The Particle Balance Equation
The first step in any spatial discretization scheme is to establish a particle balance over a finite spatial cell. Imagine we've divided our one-dimensional slab into a series of cells. Let's focus on a single cell, indexed as cell , which spans from spatial location to . The width of this cell is .
To get a balance equation, we integrate our semi-discretized S equation over the volume of this cell (which in 1D slab geometry is just integrating from to ):
The first term, representing particle leakage, can be integrated exactly:
For the other two terms, which represent collisions and sources within the cell, we make a common and powerful approximation: we assume that the material properties () and the total source () are constant within the cell. We'll denote these cell-averaged values as and . This is known as a piecewise-constant or "flat flux" approximation for the sources and cross sections.
With this, our integrated equation becomes:
Finally, let's define the cell-average angular flux, , as the average value of across the cell:
Substituting this definition back into our integrated equation gives us the fundamental particle balance equation:
This equation is a cornerstone of S methods. It states that for a given direction , the net leakage of particles out of the cell () plus the particles lost to collisions within the cell must equal the particles created by sources within the cell.
The XSDRNPM manual provides a clear, parallel derivation of this balance equation.
9.1. XSDRNPM: A One-Dimensional Discrete-Ordinates Code for ...
This section of the XSDRNPM manual formally derives the spatially discretized balance equation for slab geometry by considering the particle flows and collisions within a single cell.
Please read the section "9.1.2.4.1. Discrete-ordinates equation for a slab". Follow the logic from the definition of net flow (Eq. 9.1.24) and collision loss (Eq. 9.1.25) to arrive at the final balance equation (Eq. 9.1.27). Note that this resource uses \sigma for macroscopic cross section and omits the quadrature weights w_m for simplicity, but the resulting balance relationship is identical to what we derived.
The Closure Problem and Finite Differences
Look closely at our balance equation. For each cell and direction , it contains three unknown flux values: the flux at the left edge (), the flux at the right edge (), and the average flux within the cell (). We have one equation but three unknowns. To solve this, we need an additional relationship that connects these flux values. This is called a closure relation.
The step and diamond difference schemes are simply two different closure relations. They are specific applications of a broader numerical concept known as finite differences, which are methods for approximating derivatives. Since you have a strong background in mathematics but may not have focused on numerical methods, the following video will provide an excellent foundation. It derives the three most common finite difference approximations—forward, backward, and central—using Taylor series, which will give you a powerful tool for understanding their accuracy.
Numerical Differentiation with Finite Difference Derivatives
This video from the "Data Driven Science and Engineering" series by Steve Brunton provides a clear and intuitive introduction to finite difference methods.
Please watch the following segments: Introduction to Finite Difference: This part explains the basic idea of approximating a derivative with a finite step \Delta t. Taylor Series Analysis: This section introduces the key analytical tool, the Taylor series expansion, which we will use to analyze the error of different schemes. Forward & Backward Difference: Watch this derivation for the forward and backward difference schemes. Pay attention to how the leading error term is of order \Delta t. Central Difference: Finally, watch this derivation for the central difference scheme. Note how it cleverly cancels terms to achieve a much smaller error of order \Delta t^2.
The Step Discretization Scheme
The simplest closure relation is the step scheme. It approximates the flux as being constant (a zero-order polynomial) across the entire cell. The key insight is that the value of this constant flux depends on the direction of particle travel, a concept known as upwinding.
- For particles traveling to the right (), the flux entering the cell at the left boundary determines the state within the cell. Therefore, we assume the cell-average flux is equal to this incoming flux:
- For particles traveling to the left (), the flux entering at the right boundary is the determining factor:
This is analogous to the forward and backward difference schemes from the video. It is a first-order accurate method, meaning its error is proportional to the cell width . While simple, its main advantage is that it always produces positive, physically realistic flux values.
Let's derive the update equation for . We substitute the closure into our balance equation:
We can now solve for the outgoing flux in terms of the incoming flux and the cell source.
The Diamond Difference (DD) Scheme
A more accurate approach is the diamond difference scheme. It assumes the flux varies linearly (a first-order polynomial) across the cell.

Under this linear assumption, the average flux in the cell is simply the arithmetic mean of the fluxes at the cell edges:
This is directly analogous to the central difference scheme from the video, and as a result, diamond difference is a second-order accurate method (error proportional to ).
Substituting this closure into the balance equation gives:
This single equation now relates the two edge fluxes, and . As with the step scheme, we can solve for the outgoing flux given the incoming flux. For , we rearrange to solve for :
This is the diamond difference update equation. While more accurate, its major drawback is that if the cell width is too large (specifically, if ), the coefficient multiplying the incoming flux can become negative. This can lead to non-physical negative values for the outgoing flux, a phenomenon known as "overshoot".
The following readings provide the formal definitions of these schemes and discuss their properties.
9.1. XSDRNPM: A One-Dimensional Discrete-Ordinates Code for ...
This section of the XSDRNPM manual describes the step and diamond-difference models and introduces the practical "weighted diamond difference" approach used in production codes to balance accuracy and positivity.
In the section "9.1.2.5. Weighted-difference formulation for discrete-ordinates equations", please read the descriptions of the “step model” (Eqs. 9.1.36-9.1.38) and the “diamond-difference” model (Eq. 9.1.39). Also, skim the discussion on the weighted diamond difference model to see how real-world codes mitigate the negative flux issue.
This excerpt from a dissertation presents the final, rearranged diamond-difference update equations in a very clean and modern form, ready for implementation.
Read the section titled "Diamond-Difference Sweep Formulation". Focus on the update equations for positive directions and negative directions. Compare Equation 3.18 to the update equation we just derived; you'll see they are identical, just expressed with pre-calculated coefficients f^{(l)}_1 and f^{(l)}_2.
Conclusion
In this lesson, we bridged the gap from a continuous-space ODE to a fully discrete algebraic equation that can be solved on a computer. We did this by integrating the S equation over a spatial cell to get a balance equation, and then introducing a closure relation to solve for the unknown fluxes.
Key Takeaways:
- Spatial discretization of the S equations begins with a particle balance equation for each spatial cell, which relates leakage, collisions, and sources.
- This balance equation has more unknowns than equations, requiring a closure relation that assumes a particular form for the flux within the cell.
- The step scheme assumes a constant (zeroth-order) flux, leading to a simple, robust, but less accurate (first-order) method.
- The diamond difference scheme assumes a linear (first-order) flux, yielding a more accurate (second-order) method that can, however, produce non-physical negative fluxes if the spatial mesh is not sufficiently fine.
- The choice of scheme represents a fundamental trade-off between numerical accuracy and physical stability.
Preview of the Next Lesson:
We now have an equation that allows us to compute the outgoing flux from a cell, given the incoming flux and the source within that cell. But how do we solve for the fluxes across the entire problem domain, especially when the source in one cell depends on the flux in every other cell? The next lesson will address this by introducing the source iteration algorithm and the spatial sweep procedure, which together form the computational engine for solving S problems.