Algorithmcore
Discrete ordinates method
Also called SN method.
Solves the transport equation along a finite set of directions with quadrature weights, sweeping each direction through the mesh.
- Time
- O(I N M) worst
- Space
- O(N M) extra
- Where
- I = the number of source iterations; M = the number of cells; N = the number of directions
- Model
- Real RAM
- Properties
- deterministicnot exactiterativenot randomized
- Evidence
- Proof sketchCode in 1 languages
- Origin
- G. C. Wick, S. Chandrasekhar, B. G. Carlson, 1943
The discrete ordinates method, or method, solves the linear Boltzmann transport equation on a finite set of directions. It replaces the integral of the angular flux over all directions by a quadrature with weights, so the equation becomes transport equations, one per direction, coupled only through the scattering source. Each of these is solved by a sweep through the mesh in the direction of flight, and the coupling is handled by source iteration. The spherical harmonics method expands the angular flux in moments instead of sampling it at points, the method of characteristics sweeps along long tracks instead of through cells, and Monte Carlo transport follows random particle histories.
In plain words
Particles fly in every direction, so the unknown depends on position and on direction. The method keeps only a few directions, for example eight, chosen so that a sum over them with fixed weights gives the total over all directions very accurately.
For one direction the problem is easy. Particles that fly to the right only depend on what is to their left, so you start at the left edge and walk through the cells one by one to the right. In each cell you compute how many particles come out from how many go in and how many are made inside.
The particles that scatter change direction, so the directions are linked. You guess the scattered particles, walk all directions, add them up with the weights to get a better guess, and repeat until nothing changes.
The problem
The model is one-speed transport in a slab with isotropic scattering. The direction is the cosine of the angle with the axis, the angular flux is and the scalar flux is . With the total and scattering cross sections and in and an isotropic source per unit length, the equation is
with the incoming flux given for and given for . A vacuum face has zero incoming flux, and a reflecting face sends the outgoing flux back in the mirror direction. This page uses , so the emission per unit is and the weights sum to 2. Books that keep the azimuthal factor have weights that sum to 1 or to , with the source divided to match. The scattering ratio is .
The equations replace the integral by the -point Gauss-Legendre rule with nodes and weights , even:
The rule is exact for polynomials in of degree up to , it is symmetric about , and it has no node at . In space, the slab has cells of widths with constant data, and the scheme is diamond difference: the cell balance with the cell value equal to the mean of the two face values.
The algorithm
DISCRETE-ORDINATES(N, Σt, Σs, q, Δx, boundary conditions, tol)- 1
μ_1..μ_N, w_1..w_N ← the N-point Gauss-Legendre rule - 2
φ_j ← 0 for every cell j - 3
repeat - 4
S_j ← (Σs_j φ_j + q_j) / 2 for every cell j ▷ lagged scattering source - 5
for each direction n with μ_n > 0 do - 6
ψ_in ← the incoming value at x = 0 (0, the data, or the mirror outgoing value) - 7
for j ← 1 to M do a ← 2|μ_n| / Δx_j; ψ_nj ← (S_j + a ψ_in) / (Σt_j + a); ψ_in ← 2 ψ_nj − ψ_in - 8
for each direction n with μ_n < 0: the same from x = L, for j ← M down to 1 - 9
φ_j ← Σ_n w_n ψ_nj for every cell j - 10
until the largest change of φ is at most tol times the largest φ
Line L7 is the diamond difference cell solve: the cell balance with , solved for the cell value, and then the outgoing value becomes the incoming value of the next cell. Lines L5 to L8 are the transport sweep of each direction, and lines L3 to L10 are the source iteration. At a reflecting face, line L6 uses the outgoing value of the mirror direction from the last iteration, which the symmetric rule provides.
Example
A two-cell slab by hand. Take , two cells of width 1 cm, , , and vacuum faces. Line L1 gives and , so .
- Iteration 1, line L4: , so .
- Line L7 for : cell 1 gets and passes to cell 2, which gets and sends out at .
- Line L8: by symmetry, gives in cell 1 and in cell 2.
- Line L9: .
The two directions of each cell together give with , and . So each iteration maps to , and the error falls by the factor per iteration. The iterates are , , , and the fixed point is . At the fixed point the absorption is and each face leaks , so absorption plus leakage is , the total source.
A pure absorber, refined in angle. A slab of 2 mean free paths (, , ) has the incoming flux for all at . The exact transmitted fraction of the incoming current is , where is the exponential integral. With 200 cells:
| transmission | error | |
|---|---|---|
| 2 | 0.031298 | |
| 4 | 0.057516 | |
| 8 | 0.059652 | |
| 16 | 0.060081 |
The error comes from the angular quadrature. The integrand is very flat near , and few nodes fall there. A beam along through the same slab gives , which line L7 reproduces to with 400 cells.
Second order in space. A slab of 10 mean free paths with , and leaks , , and through each face with 20, 40, 80 and 160 cells. The observed orders from three successive meshes are and , which is the second order of diamond difference.
An infinite medium. With reflecting faces on both sides, , and , the solution is in every cell, to .
Correctness
The proofs are in the proof file. Line L7 solves the diamond difference equations of one cell exactly, and lines L5 to L8 solve those of a whole direction, because each cell needs only the cell upstream. At a fixed point of the iteration, the total absorption plus the net leakage equals the total source exactly, because the weights sum to 2 and the face fluxes telescope. With vacuum or given incoming faces and , the discrete equations have exactly one solution, and the iteration reaches it with the error reduced at least by the factor per iteration in a weighted norm. This holds for diamond difference although it can give negative values. In a pure absorber the diamond difference transmission along one direction has an error of at most . The second order with scattering in the example is a measurement.
Proof: The diamond difference sweep solves each direction, the converged S_N solution balances, the discrete solution is unique, and the spatial error is second orderfull
We assume exact arithmetic. The slab, the cross sections and the lines L1 to L10 are those of the page. Every cell has , and . The directions and the weights are the -point Gauss-Legendre rule with even, so every , the weights are positive and sum to 2, and the rule is symmetric: if is a node, then is a node with the same weight (Gauss-Legendre quadrature).
For one direction and one cell , write for the incoming face value, for the outgoing face value and for the cell value. With (the optical thickness of the cell along the direction) and the cell source , the diamond difference equations of the cell are
The first equation is the balance of the cell, and the second is the diamond relation.
Lemma 1 (one cell). For every and , the equations (1) have exactly one solution, and it is the one of line L7:
Proof. The diamond relation gives . Put this into the balance: , that is . The factor on the left is positive, so is unique and equals the formula. Then is fixed by the diamond relation. Both equations hold by construction.
Lemma 2 (one sweep). Fix the sources and the incoming value at the face where direction enters. Lines L5 to L8 compute the unique solution of the equations (1) of direction in all cells, with the outgoing value of each cell equal to the incoming value of the next cell downstream.
Proof. Take ; the case is the mirror image, with the cells in the order . We use induction on the cell index. Cell 1 has the incoming value of the boundary, so by Lemma 1 its equations have one solution, and line L7 computes it. If cells are solved, the incoming value of cell is the outgoing value of cell , which is now known, and Lemma 1 again gives the one solution. The equations of cell contain no unknown of a cell downstream, so the order of line L7 solves them all.
So one iteration of lines L4 to L9 is : it sweeps all directions with the source of the last iterate and integrates with the weights. The map is affine in , and its linear part is the sweep of the source with zero incoming values.
Theorem 3 (balance at the fixed point). Let be a fixed point of the iteration, , with incoming face values given (vacuum or data). Let be the incoming partial current and the outgoing one, with the outgoing face values. Then
Proof. Multiply the balance in (1) for direction and cell by and sum over . The source is the same for all directions, and , so the right side is . The collision term gives by line L9, because at the fixed point the of line L9 is the of line L4. The streaming term is for cell . Now sum over . For a direction with , the outgoing value of cell is the incoming value of cell (Lemma 2), so the sum over telescopes to . For it telescopes to . The sum of these over with the weights is . Move to the left.
At a reflecting face, the incoming current equals the outgoing one at the fixed point, because the rule is symmetric and the mirror direction has the same weight and the same , so the two terms of that face cancel. The page checks the balance with the leakages that the implementation returns.
Theorem 4 (existence, uniqueness and convergence). Let , and let the incoming face values be given (vacuum or data, not reflecting). Then the discrete equations have exactly one solution, and the iteration of lines L3 to L10 converges to it from every start, with
Proof. It is enough to show for every vector . Then is a contraction in this norm, the map has exactly one fixed point by the contraction mapping theorem (fixed-point iteration), and the error of iterate is applied to the first error.
Fix and one direction , and let be its sweep with the source and zero incoming value. Multiply the balance in (1) by . With the diamond relation, . The sum over the cells telescopes as in Theorem 3:
where is the value that leaves the slab and the incoming value is 0. The first term is not negative. Write the right side as and use the Cauchy-Schwarz inequality in the weighted inner product:
because and . Line L9 forms , so by the triangle inequality , since the weights are positive and sum to 2.
The proof does not need the cell values to be positive, so it holds for diamond difference, which can give negative values (Theorem 6). The source iteration page shows that the factor is sharp in thick media and gives the Fourier analysis of the rate.
Theorem 5 (second order in space along a direction). Take a pure absorber with constant, no source, equal cells on , a direction and the incoming value 1. Let be the optical thickness of one cell along the direction. The exact transmitted value is , and the diamond difference value satisfies
and when .
Proof. With , Lemma 1 gives with , so . Let . Then , with , and . By Taylor's formula with the integral remainder, , so . Since ,
Both and lie in for . For numbers in , , so . With and this gives . If , then , so .
For a smooth problem with scattering, the same local error of order per cell gives a global error of order ; the page measures this order on a scattering slab and does not prove it in general.
Theorem 6 (negative values). In a pure absorber cell with and , the outgoing value is negative if and only if , that is .
Proof. By Lemma 1, with , and exactly when .
The cell value stays positive. The negative face value enters the next cell, and there it can make the cell value negative too.
Complexity
In the real RAM model, line L7 costs a fixed number of operations, so one iteration costs , and iterations cost . The number of iterations depends on the problem: it grows like in a thick medium, so it is large for near 1 (source iteration gives the analysis, and diffusion synthetic acceleration removes the growth). Storing all needs memory; if only and the face values for reflection are kept, is enough. In three dimensions with cells and a quadrature of directions the cost of an iteration is again , and for the level-symmetric sets the number of directions is .
Properties
- Deterministic. The result has no statistical noise; its errors come from the angular quadrature, the spatial mesh and the stopping test.
- Conservative. The converged solution satisfies the particle balance of each cell and of the whole slab exactly (Theorem 3 of the proof).
- Not positive. Diamond difference gives a negative outgoing value in a source-free cell when . In the test, , and turn the incoming value 1 into .
- Second order in space. For smooth solutions and thin cells; the order drops where the solution has kinks, for example near a boundary where the incoming flux jumps.
- Exact in angle up to degree . The Gauss rule integrates every polynomial in up to this degree, so any angular flux that is such a polynomial has an exact scalar flux.
Variants and improvements
- Other spatial schemes. The step scheme (the outgoing value equals the cell value) is positive and first order. The step characteristic scheme integrates the equation exactly in each cell for a flat source. Weighted diamond schemes and linear discontinuous finite elements trade accuracy against positivity; linear discontinuous elements stay accurate with thick cells in diffusive regions, where diamond difference can oscillate and go negative.
- Multidimensional quadratures. In two and three dimensions, the directions form sets on the unit sphere. Level-symmetric sets have the same cosines on each axis, and product sets combine a Gauss rule in the polar cosine with equal azimuthal steps.
- Energy and anisotropy. The multigroup approximation gives one problem per energy group, coupled by group to group scattering. Anisotropic scattering adds Legendre moments of the flux to the source.
- Faster iterations. Diffusion synthetic acceleration or a Krylov method such as GMRES with the sweep as the operator replaces plain source iteration in diffusive problems.
- Eigenvalue problems. The k-eigenvalue problem is solved by power iteration on the fission source, with an fixed source solve in each step.
When to use it
Use the method for shielding, reactor core and radiation problems where the whole flux field is needed without statistical noise, the geometry fits a mesh, and the cross sections can be put into groups. In optically thick, highly scattering media, use it with an acceleration. When the geometry is very complex, use the method of characteristics or Monte Carlo; when the flux is nearly isotropic everywhere, the diffusion approximation is much cheaper.
Pitfalls
- Negative fluxes (line L7). Thick cells give negative values, which can make a cross section feedback or a nonlinear coupling fail. A set-to-zero fixup puts the outgoing value to zero and computes the cell value again from the balance. This keeps the balance, but the scheme becomes nonlinear and only first order in those cells. Refine the mesh or use a positive scheme.
- Ray effects. In two and three dimensions, a localized source in a weakly scattering medium is seen only along the few quadrature directions, so the flux far away has unphysical rays (Lathrop 1968). More directions reduce them slowly; a first collision source or a Monte Carlo estimate of the uncollided flux removes their main cause.
- The weight convention. The source term must match the normalization of the weights. With weights that sum to 2 the source is ; mixing this with a rule normalized to 1 or to makes the scattering source wrong by a constant factor.
- The stopping test (line L10). A small change between iterations does not mean a small error when is near 1: the error can be about times the change.
- Reflecting faces (line L6). The reflected value lags one iteration behind. This slows the iteration, and the quadrature must contain the mirror of each direction.
- Isotropic incident flux. A flux that is constant in on is not a polynomial on , and the transmitted current has the slow angular convergence of the second example.
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/discrete-ordinates-method/. The authors are listed in prov/S57PHM.jsonl.
"""The discrete ordinates (S_N) method for one-speed transport in a slab.
The slab 0 <= x <= L is cut into M cells of widths dx[j], each with a total
cross section sigma_t[j], a scattering cross section sigma_s[j] (both in
cm^-1) and an isotropic source q[j] per unit length. Scattering is isotropic.
The convention is phi(x) = integral of psi(x, mu) over mu in [-1, 1], so the
emission density per unit mu is (sigma_s phi + q) / 2 and the weights of the
Gauss-Legendre rule sum to 2.
The angular variable is replaced by the N Gauss-Legendre directions mu_n
(N even). The space variable is discretized by diamond differences: in each
cell, psi_cell = (psi_in + psi_out) / 2. The coupled equations are solved by
source iteration: a transport sweep for each direction with the scattering
source of the last iterate.
Boundary conditions: "vacuum" (no incoming flux), "reflect" (the incoming
flux at a face is the outgoing flux in the mirror direction, from the last
iteration), or a list of incoming angular fluxes, one per direction that
enters the slab at that face (in the order of the rule).
"""
import math
def legendre(n: int, x: float):
"""P_n(x) and its derivative, by the three-term recurrence."""
p0, p1 = 1.0, x
if n == 0:
return 1.0, 0.0
for k in range(2, n + 1):
p0, p1 = p1, ((2 * k - 1) * x * p1 - (k - 1) * p0) / k
dp = n * (x * p1 - p0) / (x * x - 1.0)
return p1, dp
def gauss_legendre(n: int):
"""Nodes (in increasing order) and weights of the n-point Gauss-Legendre rule on [-1, 1]."""
nodes, weights = [0.0] * n, [0.0] * n
for i in range((n + 1) // 2):
x = math.cos(math.pi * (i + 0.75) / (n + 0.5)) # a start near the i-th largest root
for _ in range(100):
p, dp = legendre(n, x)
dx = p / dp
x -= dx
if abs(dx) < 1e-16:
break
p, dp = legendre(n, x)
w = 2.0 / ((1.0 - x * x) * dp * dp)
nodes[n - 1 - i], weights[n - 1 - i] = x, w
nodes[i], weights[i] = -x, w
return nodes, weights
def sweep_cell(mu_abs: float, psi_in: float, sigma_t: float, src: float, dx: float):
"""Diamond difference in one cell. Returns (cell average, outgoing flux)."""
a = 2.0 * mu_abs / dx
psi_c = (src + a * psi_in) / (sigma_t + a)
return psi_c, 2.0 * psi_c - psi_in
def sweep(mu: float, psi_in: float, sigma_t, src, dx):
"""Sweep one direction through all cells in the direction of flight.
Returns (cell averages in cell order, outgoing flux at the far face)."""
m = len(dx)
cells = [0.0] * m
order = range(m) if mu > 0 else range(m - 1, -1, -1)
psi = psi_in
for j in order:
cells[j], psi = sweep_cell(abs(mu), psi, sigma_t[j], src[j], dx[j])
return cells, psi
def discrete_ordinates(n, sigma_t, sigma_s, q, dx, left="vacuum", right="vacuum", tol=1e-10, max_iter=100000):
"""Solve the S_N equations with diamond differences by source iteration.
Returns a dict with phi (cell-average scalar flux), psi (psi[n][j]),
the outgoing angular fluxes at both faces, the partial currents that
leave at both faces, and the number of iterations."""
mus, ws = gauss_legendre(n) # @line L1
m = len(dx)
pos = [k for k in range(n) if mus[k] > 0]
neg = [k for k in range(n) if mus[k] < 0]
mirror = {k: n - 1 - k for k in range(n)}
out_left = {k: 0.0 for k in neg} # psi leaving at x = 0
out_right = {k: 0.0 for k in pos} # psi leaving at x = L
phi = [0.0] * m # @line L2
psi = [[0.0] * m for _ in range(n)]
for it in range(1, max_iter + 1): # @line L3
src = [(sigma_s[j] * phi[j] + q[j]) / 2.0 for j in range(m)] # @line L4
new_left, new_right = {}, {}
for idx, k in enumerate(pos): # @line L5
if left == "vacuum": # @line L6
psi_in = 0.0
elif left == "reflect":
psi_in = out_left[mirror[k]]
else:
psi_in = left[idx]
psi[k], new_right[k] = sweep(mus[k], psi_in, sigma_t, src, dx) # @line L7
for idx, k in enumerate(neg): # @line L8
if right == "vacuum":
psi_in = 0.0
elif right == "reflect":
psi_in = out_right[mirror[k]]
else:
psi_in = right[idx]
psi[k], new_left[k] = sweep(mus[k], psi_in, sigma_t, src, dx)
out_left, out_right = new_left, new_right
new_phi = [sum(ws[k] * psi[k][j] for k in range(n)) for j in range(m)] # @line L9
change = max(abs(new_phi[j] - phi[j]) for j in range(m))
scale = max(abs(v) for v in new_phi) or 1.0
phi = new_phi
if change <= tol * scale: # @line L10
break
j_left = sum(ws[k] * abs(mus[k]) * out_left[k] for k in neg)
j_right = sum(ws[k] * mus[k] * out_right[k] for k in pos)
return {"phi": phi, "psi": psi, "mu": mus, "w": ws, "out_left": out_left, "out_right": out_right,
"leak_left": j_left, "leak_right": j_right, "iterations": it}
test_discrete_ordinates_method.py 124 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/discrete-ordinates-method/. The authors are listed in prov/S57PHM.jsonl.
import math
import unittest
from discrete_ordinates_method import discrete_ordinates, gauss_legendre, sweep, sweep_cell
def e3(x, k=20000):
"""E_3(x) = integral over mu in (0, 1] of mu e^(-x/mu), by the midpoint rule."""
s = 0.0
for i in range(k):
m = (i + 0.5) / k
s += m * math.exp(-x / m)
return s / k
class TestGaussLegendre(unittest.TestCase):
def test_weights_sum_to_two_and_rule_is_symmetric(self):
for n in (2, 4, 8, 16):
x, w = gauss_legendre(n)
self.assertAlmostEqual(sum(w), 2.0, places=13)
for i in range(n):
self.assertAlmostEqual(x[i], -x[n - 1 - i], places=14)
self.assertAlmostEqual(w[i], w[n - 1 - i], places=14)
def test_exact_to_degree_2n_minus_1(self):
for n in (2, 4, 8):
x, w = gauss_legendre(n)
for d in range(0, 2 * n, 2):
got = sum(wi * xi ** d for xi, wi in zip(x, w))
self.assertAlmostEqual(got, 2.0 / (d + 1), places=12)
def test_known_nodes(self):
x, w = gauss_legendre(2)
self.assertAlmostEqual(x[1], 1.0 / math.sqrt(3.0), places=14)
x, w = gauss_legendre(4)
self.assertAlmostEqual(x[3], 0.8611363115940526, places=13)
self.assertAlmostEqual(w[3], 0.3478548451374538, places=13)
class TestHandTrace(unittest.TestCase):
def test_first_sweep_and_first_iterate(self):
cells, out = sweep(1.0 / math.sqrt(3.0), 0.0, [1.0, 1.0], [0.5, 0.5], [1.0, 1.0])
self.assertAlmostEqual(cells[0], 0.2320508075688773, places=12)
self.assertAlmostEqual(cells[1], 0.4807621135331595, places=12)
self.assertAlmostEqual(out, 0.4974226119285644, places=12)
r = discrete_ordinates(2, [1.0, 1.0], [0.5, 0.5], [1.0, 1.0], [1.0, 1.0], tol=0.0, max_iter=1)
self.assertAlmostEqual(r["phi"][0], 0.7128129211020369, places=12)
self.assertAlmostEqual(r["phi"][1], 0.7128129211020369, places=12)
def test_balance(self):
r = discrete_ordinates(2, [1.0, 1.0], [0.5, 0.5], [1.0, 1.0], [1.0, 1.0], tol=1e-14)
absorbed = sum(0.5 * p * 1.0 for p in r["phi"])
self.assertAlmostEqual(absorbed + r["leak_left"] + r["leak_right"], 2.0, places=11)
self.assertAlmostEqual(r["leak_left"], r["leak_right"], places=12)
class TestPureAbsorber(unittest.TestCase):
def test_single_direction_is_second_order(self):
mu = 1.0 / math.sqrt(3.0)
exact = math.exp(-2.0 / mu)
errs = []
for m in (8, 16, 32):
_, out = sweep(mu, 1.0, [1.0] * m, [0.0] * m, [2.0 / m] * m)
errs.append(abs(out - exact))
for a, b in zip(errs, errs[1:]):
self.assertAlmostEqual(math.log2(a / b), 2.0, delta=0.05)
def test_normal_beam_transmission(self):
# one direction with mu = 1 is not in the rule, so sweep it directly
m = 400
_, out = sweep(1.0, 1.0, [1.0] * m, [0.0] * m, [2.0 / m] * m)
self.assertAlmostEqual(out, math.exp(-2.0), delta=2e-6)
self.assertAlmostEqual(math.exp(-2.0), 0.135335, places=6)
def test_isotropic_incidence_converges_in_angle(self):
exact = 2.0 * e3(2.0)
m = 200
errs = []
for n in (2, 4, 8, 16):
x, w = gauss_legendre(n)
r = discrete_ordinates(n, [1.0] * m, [0.0] * m, [0.0] * m, [2.0 / m] * m, left=[1.0] * (n // 2))
jin = sum(w[k] * x[k] for k in range(n) if x[k] > 0)
errs.append(abs(r["leak_right"] / jin - exact))
for a, b in zip(errs, errs[1:]):
self.assertLess(b, a)
self.assertLess(errs[-1], 3e-4)
class TestScattering(unittest.TestCase):
def test_infinite_medium(self):
# reflecting faces: phi = q / sigma_a = 1 / 0.5 = 2
r = discrete_ordinates(8, [1.0] * 10, [0.5] * 10, [1.0] * 10, [0.5] * 10,
left="reflect", right="reflect", tol=1e-13)
for p in r["phi"]:
self.assertAlmostEqual(p, 2.0, places=11)
def test_balance_with_strong_scattering(self):
m, length = 40, 10.0
r = discrete_ordinates(8, [1.0] * m, [0.9] * m, [1.0] * m, [length / m] * m, tol=1e-13)
absorbed = sum(0.1 * p * length / m for p in r["phi"])
self.assertAlmostEqual(absorbed + r["leak_left"] + r["leak_right"], length, places=9)
def test_leakage_is_second_order_in_space(self):
length = 10.0
leaks = []
for m in (20, 40, 80):
r = discrete_ordinates(8, [1.0] * m, [0.9] * m, [1.0] * m, [length / m] * m, tol=1e-13)
leaks.append(r["leak_left"])
p = math.log2((leaks[0] - leaks[1]) / (leaks[1] - leaks[2]))
self.assertAlmostEqual(p, 2.0, delta=0.2)
class TestNegativeFlux(unittest.TestCase):
def test_thick_cell_gives_negative_outgoing_flux(self):
c, out = sweep_cell(0.1, 1.0, 1.0, 0.0, 1.0)
self.assertAlmostEqual(c, 0.2 / 1.2, places=14)
self.assertAlmostEqual(out, -0.8 / 1.2, places=14)
self.assertLess(out, 0.0)
if __name__ == "__main__":
unittest.main()
History
Wick (1943) replaced the angular integral of the transfer equation by a Gauss quadrature, and Chandrasekhar developed this method of discrete ordinates for radiative transfer in plane-parallel atmospheres; his book Radiative Transfer (1950) collects the work. At Los Alamos, Carlson made the method for neutron transport in the 1950s, first with a piecewise linear angular flux and then with general quadrature sets, and it became the basis of the deterministic transport codes of the following decades. Lathrop (1968) explained the ray effects of multidimensional solutions. Lewis and Miller (1984) give the slab and multidimensional methods in textbook form, and Adams and Larsen (2002) review the spatial schemes and the iterations.
References
- E. E. Lewis and W. F. Miller, Jr., Computational Methods of Neutron Transport, Wiley, 1984, the chapters on discrete ordinates in slab geometry (Gauss quadrature, diamond difference, negative fluxes, source iteration) and in multidimensional geometry (level-symmetric quadrature, ray effects)
- Marvin L. Adams and Edward W. Larsen, Fast iterative methods for discrete-ordinates particle transport calculations, Progress in Nuclear Energy 40(1), 2002, 3-159, the sections on the slab geometry S_N equations, the spatial discretizations and the source iteration
- K. D. Lathrop, Ray effects in discrete ordinates equations, Nuclear Science and Engineering 32, 1968, 357-369, the origin of ray effects in two-dimensional S_N solutions and their size
- S. Chandrasekhar, Radiative Transfer, Oxford University Press, 1950, Dover reprint 1960, the chapter on the method of discrete ordinates with Gauss points for the transfer equation in plane-parallel atmospheres
- G. C. Wick, Über ebene Diffusionsprobleme, Zeitschrift für Physik 121, 1943, 702-718, the replacement of the angular integral by a Gauss quadrature in plane problems
- B. G. Carlson, Solution of the transport equation by S_n approximations, Los Alamos Scientific Laboratory report LA-1891, 1955, the S_n method of Los Alamos
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag S57PHM Edit this page History Report an error Markdown