P-N Equations
P-N Equations
Abstract
This paper explains the method to solve spherical harmonics mo-
ment systems, such as the time-dependent equations, of radiative
transfer. The method, which works for arbitrary moment order N,
makes use of the specific coupling between the moments in the PN
equations. This coupling naturally induces staggered grids in space
and time, which in turn give rise to a canonical, second order accurate
finite difference scheme. While the scheme does not possess TVD o
realizability limiters, its simplicity allows for a very efficient imple-
mentation in MATLAB. We present several test cases, some of which
demonstrate that the code solves poblems with ten million degees of
feedom in space angle, and time within a few seconds. The code
for the numerical scheme, called StaRMAP (Staggered grid Radiation
Moment Approximation), along with files for all presented test cases,
can be downloaded so that all results can be reproduced by the reader.
1 Introduction
The purpose of this paper is to present a simple and accurate solution method
for the PN equations of radiative transfer, and its efficient implementation in
MATLAB. The key idea is to make use of the specific coupling of unknowns
that is induce by the spherical harmonics being a family of orthogonal poly-
nomials. This leads to a natural staggered grid on which this equations are
discretized.
Z
sr nf (v.er )dsr dv (1)
Z
=− dr 5 .(nf (v)d(drdv) = −.(v + nf 5 .v) (2)
= −.f (v) (3)
5.v = 0, (4)
2
Because collisions of the first and the second kinds or symmetric |( dσd
d)dv1 dv| =
|( dσ
d
d)dv1 dv|The net rate of increase in the number of molecules of class v
in the phase space element dvdr due to the two types of collisions can be
written as: n2 (f f1 )vr dσ
d
ddv1 dvdr
To get the total rate of increase in the number of molecules of class v, we
need to integrate over all possibleRcollision partners of class v1 and over all
n (f f1 − f f1 )vr dσ
R 2
possible elementary solid angles d d
ddv1 dvdr
Combining
R R all2 three processes and cancel out dvdr we get ∂ (nf )+v. ∂ (nf )+
∂ dσ
F. (nf ) = n (f f1 − f f1 )vr d dd
The angular flux Ψ(x, t) describe the particle density at position x3 , di-
rection 2 at velocity v.
The time-dependent, isotrophically scattering linear Boltzmann Equa-
tions are
1∂
v4
(x, , t) + . 5 4(x, , t) + t (x, t)Ψ(x, , t) = 1
s(x,t)4π 2 Ψ(x,,t)d+ Ψπ Q(x,t)
Where
3
1 ∂
µ ∂ Ψ(x, µ, t)P ndµ +
R R R
vΨ
rt(x, µ, t)Pn dµ + t (x, t)Ψ(x, µ, t)P ndµ =
s(x,t)4n
RR 1
Ψ(x,µ,ϕ,t)P nd+ 4π Q(x,t)
(6)
R
Define the azimutually-integrated
R 1∂ angular flux Ψ(x, µ, t) := Ψ(x, µ, Q, t)dϕ
We obtain vΨ
(x, µ, t)P ndµ = s(x,t)2 R Ψ(x,µ,t)dµ+ 1
Q(x,t) 2
l l+1
Using the recursion relation for Pn (µ) = 2l+1 Pl−1 (µ)+ 2l+1 Pl+1 (µ) and us-
1∂ ∂ n+1
R
ing (x, t) = P n(µ)Ψ(x, µ, t)dµ,
n
R n ≥ 0, we have v (x, t)+ ( 2n+1 φn+1 (x, t)+
ϕ (x, t)) + t (x, t)ϕn = n,0 [s (x, t)ϕ0 (x, t) + Q(x, t)]
2n+1 n+1
Z
∂t ψ(t, x, Ω)+Ω.∇x ψ(t, x, Ω)+Σt (t, x)ψ(t, x, Ω) = Σs (t, x, Ω, Ω0 )ψ(t, x, Ω0 )dΩ0 +q(t, x, Ω)
S2
where
1 dl 2
Pl (µ) = l 2
(µ − 1)l ;
2 l! dµ
Legendre polynomial
These form an orthogonal basis of the space of polynomials w.r.t. the stan-
dard scalar product on [-1,1], when
4
where ψ is known, then ψl can be obtained as the Fourier Coefficient.
Z1
i.e.ψl = ψPl dµ
−1
Thus(1) =⇒
∞ 2l + 1 2l + 1 2l + 1
∂l [σl=0 ψl (t, z) Pl (µ)]+Ω.5x [Σ∞l=0 ψl (t, z) ψl (µ)]+Σt (t, x)[Sigma∞
l=0 ψl (t, z) Pl (µ)
2 2 2
Z
2l + 1
= Σs (t, x, Ω, Ω) Σ∞
l=0 ψl (t, z) Pl (µ) + q(t, x, Ω)
2
s2
Z1
∂t ψl + ∂z µPl ψdµ + σtl ψl = ql , l = 0, 1, ...
−1
Here
Z1 Z1
(2) → ∂t ψl + ∂z µPl ψdµ + [Σa + Σso − 2π Pl (µ)Σs (µ)dµ]ψl = ql
−1 −1
when l=2
Z1 Z1
∂t ψ2 + ψz µPl ψdµ + [Σa + Σso − 2π Pl Σs (µ)dµ]ψ2 = q2
−1 −1
Z1 Z1
1
= ∂l ψ2 + ∂z µ( (−1 + 3µ2 )dµ + [Σa + Σso − π (3µ2 − 1)Σs (µ)dµ]ψl = q2
2
−1 −1
5
and truncating the expression at l =N,
Z1
l l+1
(2) → ∂t ψl + ∂z Pl−1 (µ) + Pl+1 (µ) ψdµ + Σtl ψl = ql
2l + 1 2l + 1
−1
1
Z Z1
l l+1
i.e.∂t ψl + ∂t Pl−1 (µ)ψdµ + Pl+1 (µ)ψdµ + Σtl ψl = ql
2l + 1 2l + 1
−1 −1
l l+1
i.e∂t ψl + ∂t ψl−1 + ψl+1 + Σtl ψl = ql → (3)
2l + 1 2l + 1
Now consider
l+1 l
∂z ψl+1 + ψl−1
2l + 1 2l + 1
l = 0, the term is
1
∂z ψ1 + 0 = ∂z (ψ1 )
1
l = 1, the term is
2 1
∂z ψ2 + ψ0
3 3
l = 2, the term is
3 2
∂z ψ3 + ψ1
5 5
l = 3, the term is
4 3
∂z ψ4 + ψ2
7 7
6
0 1 0 0 . . .
1 0 2 0 . . .
3 2 3 3
0 0 5 0 . .
5
0 0 3 0 4
0 .
7 7
. . . . . . .
. . . . . . .
. . . . . . .
Thus equation (3) can be represented as a matrix equation:
∂t ū + M.∂z ū + c.ū = q̄
whereū = ψl .
0 1 0 . . .
1 0 2 0
M= 3 3
0 2 0 3 0
5 5
0 0 73 0 47 0
Σt0 . . . . .
. Σt1 . . . .
. . . Σt2 . .
and C= .
. . . . .
. . . . . .
. . . . . .
The PN approximations is based on the assumption is based on the as-
sumption that all ΨM l = 0, forl > N q
m m 2L+1 (l−m)! imφ m
The complex valued spherical harmonics are defined asYl = (−1) 4π (l+m)!
e Pl (µ), Ylm
form an orthogonal family on the unit sphere.
They satisfy
recursion of the form
m+1
−cm−1
l−1 Y m−1
l−1 + d m−1 m−1
l+1 Y l+1 + e m+1
l−1 Y l − 1 − f m+1 m+1
l+1 Y l
ΩYlm = 12 i(cm−1 m−1 m−1 m+1 m+1 m+1 m+1
l−1 − d l+1 Y l+1 + el−1 Y l − 1 − f l+1 Y l
m m m m
2(al−1 Yl−1 + bl+1 Yl=1 )
with coefficients
q q q
(l−m+1)(l+m+1) m (l−m)(l+m) l+m+1)(l+m+2)
aml = (2l+3)(2l+1)
, bl = ,
(2l+1)(2l−1) l
c m
=
q q q (2l+3)(2l+1)
(l−m)(l−m−1 m
dml = (2l+1)(2l−1)
, el = (l−m+1)(l−m+2)
(2l+3)(2l+1)
, flm = (l+m)(l+m−1)
(2l+1)(2l−1)
NowR consider the scattering term in 1
i.e. s2 Σs (t, x, Ω, Ω0 )Ψ(t, x, Ω0 )dΩ0
Multiplying this byYlm and integrating over Ω , we get
Y m (Ω) S 2 Σs (Ω.Ω0 )ψ(t, x, Ω0 )dΩ0 dΩ = Σsl Ψm
R R
S2 l R m l (t, x)
m
where Ψl (t, x) = s2 yl (Ω)ψ(t, x, Ω)dΩ
7
Hence the complex valued PN equations are
1
∂t ψlm + ∂x (−cm−1 m−1 m−1 m−1 m+1 m+1 m+1 m+1
l−1 ψl−1 + dl+1 ψl+1 + el−1 ψl−1 − fl+1 ψl+1 )
2
i
+ ψy (cm−1 m−1 m−1 m−1 m+1 m+1 m+1 m+1
l−1 ψl−1 + dl+1 ψl+1 + el−1 ψl−1 − fl+1 ψl+1 )
2
+∂z (am m m l m
l−1 ψl−1 + bl+1 ) + Σtl ψ1 = ql
for
0 ≤ l < ∞, −l ≤ m ≤ l
We assume that all data are z-independent, then the solution ψ is z-independent
and additionally an even function is µ. If l+m is odd, the associated Legen-
dre polynomial Plm is an odd function in µ, and as a consequence positive
moments for which l+m is odd have to vanish. Thus the choice of l and m
are (0, 0), (1, −1), (1, 1), (2, −2), (2, 0), (2, 2) . . . thus we obtain the following
matrix formula
0
ψ 0
. d−1 −f11 .
ψ00
1 . . ψ −1
0 −2 0 1
ψ −1 e0 . . d2 −f2 0 ψ 1
1 1 . e−1
1
1 0 . . . −2
∂t ψ1 + ∂x 1 ψ2
ψ −2 2 .
. . . . . ψ0
2 −1 1 2
.. . −c 1 e 1 . . . ψ2
. . 0 −c11 . .
2
..
.
8
ψ00
−1
. −d−1 ψ1
1 −f11 . . .
0 2 0 ψ1
e0 . . −d2 −f2 0 1
i −1
ψ −2
+∂y . e1 0 . . . 2
2 0
. e−1
1 e 1
1 . . . ψ2
ψ2
. 0 c11 . . . 2
..
.
ψ00
−1
ψ1 q00
Σt0
ψ11 −1
Σt1 q1
−2
= ψ2 = q11
+ Σt1
0 −2
ψ2 q2
Σt2
Σt2
ψ2 ..
2 .
..
.
Hence the complex valued PN equations are
1 m−1 m−1 m−1 m−1 m+1 m+1 m+1 m+1
∂t Ψml + 2 ∂x (−cl−1 Ψl − 1m − 1+dl−1 +dl+1 Ψl+1 +el−1 Ψl − 1 −fl+1 Ψl+1 )
i m−1 m−1 m−1 m−1 m+1 m+1 m+1 m+1
+ 2 ∂y (cl−1 Ψl − 1m − 1 − dl−1 + dl+1 Ψl+1 + el−1 Ψl − 1 − fl+1 Ψl+1 )
+∂t (am m m l m
l−1 Ψl−1 + bl+1 ) + Σtl Ψl = ql , 0 ≤< ∞, −l ≤ m ≤ l
9
ψ00
−1
. −d−1 ψ1
1 −f11 . . .
0 2 0 ψ1
e0 . . −d2 −f2 0 1
i −1
ψ −2
+∂y . e1 0 . . . 2
2 0
. e−1
1 e 1
1 . . . ψ2
ψ2
. 0 c11 . . . 2
..
.
ψ00
−1 0
ψ1 q0
Σt0
ψ 1 q −1
Σt1
1 1
−2 1
ψ = q1
+ Σt1 =
2
0 −2
ψ2 q2
Σt2
Σt2
ψ2 ..
2 .
..
.
Let
ψ00
d−1
−f11 .
. 1 . . ψ1−1
e00
. . d−2 −f 0
0
ψ11
2 2
. e−1
1 0 . . .
ψ2−2
Mxcomplex = 1
2 . . . . . .
ψ20
. −c−1
e11 . . .
ψ22
1
1
. 0 −c1 . .
..
.
ψ00
. −d−1 ψ1−1
−f11
. . .
1
e00
. . −d2 −f20
2
0 ψ11
i
ψ2−2
MYcomplex = . −1
e1 0 . . .
2
. e−1
1 e 1
1 . . .
ψ20
. 0 c11
. . .
ψ22
..
.
m −m
and the matrix containing Σtl by c . Note that Ψml = (−1) Ψl
m m
The real variables Rl (f or0 ≤ m ≤ l) and Il (f or0 < m ≤ l can be obtained
by setting Rlo = Ψol For m 6= 0,
(−1)m m
Rlm = √ (Ψl + (−1)m ψl−m )
2
10
(−1)m i m
Ilm = √ (ψl − (−1)m Ψ−m
l
2
Z
ψlm = (Ω)ΨdΩ − − − −(A)
s2
s
m 2l + 1 (l − m) imφ m
Y l = (−1)m e Pl (µ) − − − − − − − − − − − (B)
4π (l + m)
(−1)m m
Rlm = √ [Ψl − Ψ−m
l ] − − − − − − − − − − − −(C)
2
Evaluation : −
T of indR00
l = 0, m = 0
r
2(0) + 1 i0φ 0
Y00 = (−1)0 e Po (µ)sincePo0 (µ) = 1
4π
0 1
Yo = √
Z 4π
1 Ω
Ψ00 = √ dΩ = √
4π 4π
0
√
(−1) 2 o
Therefore Roo = Ψo − Ψ−o
o ] = 0
[
T of indR11
l = 1, m = 1
q
1 1 3 0! iφ 1
Y1 = (−1) 4π 2!
e P1 (µ)
q p
3 iφ
= − 8π e (− −1 − µ2 )
q p
3 iφ
= 8π e ( −1 − µ2 )
11
q
Y1−1 3 −iφ
p
=− 8π
e ( −1 − µ2 )
R q 3 iφ
p
Ψ11 = s2 8π
e ( −1 − µ2 ΨdΩ
q p
3 iφ
Ψ11 = 8π
e ( −1 − µ2 ΨΩ
q
−Ψ−1 3 −iφ
p
1 = 8π
e ( 1 − µ2 ΨΩ
1
Therefore R11 = (−1)
√ [ψ 1 − Ψ−1 ]
2 1 1
q q
−1
−1 3
p 3 −iφ
p
1 iφ 2
= √2 [Ψ1 = 8π e ( −1 − µ ΨΩ + Ψ1 = 8π e ( 1 − µ2 ΨΩ]
q p
−1 3
=√ 2 8π
( −1 − µ2 ΨΩ[2cosφ]
q p
3
R11 = 4π 1 − µ2 ΨΩcosφ
We always place the first component of the solution vector, i.e the scalar
flux R00 , on this cell-centered grid G11 .
12
For our example
1 1 1 3 3 3 9 9 9
G11 = ,1 , ,3 , ,5 , ,1 , ,3 , ,5 ,..., ,1 , ,3 , ,5
2 2 2 2 2 2 2 2 2
G21 = {(1, 1), (1, 3), (1, 5)(2, 1), (2, 3), (2, 5), . . . , (5, 1), (5, 3), (5, 5)}
1 1 1 3 3 3 9 9 9
G12 = ,2 , ,4 , ,6 , ,2 , ,4 , ,6 ,..., ,2 , ,4 , ,6
2 2 2 2 2 2 2 2 2
G22 = {(1, 2), (1, 4), (1, 6)(2, 2), (2, 4), (2, 6), . . . , (5, 2), (5, 4), (5, 6)}
5 Numerical Method
We now develop a numerical scheme for linear system of hyperbolic balance
laws of the form
∂t ū + Mx · ∂x ū + My · ∂y ū + c · ū = q̄..........(8)
where the matrices Mx , My and C possess very specific patterns of their non
zero entries that admit the systematic placement of the components of the
solution vector ū(x, y, t) on staggered grids. Specifically let the solution (8)
have N components, i.e., ū(x, y, t) ∈ RN and the source q̄(x, y, t) ∈ RN and
the martrices Mx , My ∈ RN ×N and C(x, y, t) ∈ RN ×N are of appropriate
sizes. Moreover the matrix C(x, y, t) is diagonal and the matrices Mx , My
are constant-coefficient, and possesses patterns of their non-zero entries, as
described in lemma 2. Hence the real value PN equations are covered as are
the SPN equation.
Spatial Approximation on staggered grids. We consider the partial differ-
ential equation (8) to hold in the interior of a rectangular computational
domain Ω = (Lx , 0) × (0, Ly ) and on each of the two boundary directions, we
allow for one of two types of boundary conditions periodic or extrapolation.
The domain Ω is divided into nx ×ny rectangular cells of size ∆x×∆y, where
∆x = Lnxx and ∆y = Lnyy . The center points of these cells then lies on the grid
1 1
G11 = i− ∆x, j − ∆y i ∈ {1, 2, . . . , nx }, j ∈ {1, 2, . . . , ny } .....(9)
2 2
To reiterate, the condition on the non zero entry patterns of Mx , My &C,
the components of S ū canSbe distributed
S into four disjoint sets, according to
{1, 2, . . . , N } = I11 I21 I12 I22 such that the following properties hold
[ [ [ [
(Mx )i,j =0∀(i, j) ∈ / (I11 × I21 ) (I21 × I11 ) (I12 × I22 ) (I22 × I12 )
[ [ [ [
(My )i,j =0∀(i, j) ∈ / (I11 × I12 ) (I12 × I11 ) (I21 × I22 ) (I22 × I21 )
13
Having defined these fully staggered grids, the solution components with
indices in Ikl are assigned to the corresponding grid Gkl , where k, l ∈ {1, 2} on
these staggered grids, spatial derivatives of a function ω can be approximated
by the half-grid central difference approximation
1 1 1 Z
∂x ω(i∆x, j∆y) ≈ ω i+ ∆x, j∆y −ω i− ∆x, j∆y ∀i, j ∈
∆x 2 2 2
1 1 1 Z
∂y ω(i∆x, j∆y) ≈ ω i∆x, j + ∆y −ω i∆x, j − ∆y ∀j, i ∈
∆y 2 2 2
We donote the resulting finite difference operators Dx &Dy , respectively with
these finite difference approxiamations, x-derivative of components on the
grid Gkl are associated with the grid G3−k,l and y derivatives of components
on the grid Gkl are placed on the grid Gk,3−l , where k, l ∈ {1, 2}
The non zero entry patterns (10) guarantee that the distribution of the indices
of Mx · Dx ū + My · Dy ū + C · ū. Moreover the components of the source vector
q̄ in (8) are placed on the same grids as the corresponding components of the
solution vector.
Boundary conditions: In each of the two coordiane direction(as in the
paper).
14
Time Stepping:
BootshappingSis followed to resolve the time domain in equation(8) i.e data S on
the grids G11 G22 is updatedS alternatingly with data on the grids G21 SG12 .
The solution components I11 I22 depend on the components in I21 I12 .
The former is called as even components as i + j is even and the latter is
called as odd components accordingly. When using a time step ∆t, the even
components would be defined at times n∆t, while the odd components would
be defined at times (n + 21 )∆t. Now define the solution components on the
same time grid n∆t , and conduct a time-step fromt to t+∆ t as follows
ūe
Consider the solution vector in the block form ū =
ūo
where ūe is the vector of the even components and ūo is the vector of the odd
components. Similarly apply to the source vector q̄ and the matrices Mx , My
and C, the equation (8) becomes
0 Myeo
e e e
ū 0 Mxeo ū ū
∂t + · Dx + · Dx
ūo Mxeo 0 ūo Myeo 0 ūo
e e e
c 0 ū q̄
+ o · o = .........(14)
0 c ū q̄ o
Define two evolution operators. The first operator updates only the even
components by freezing the odd components and second updates only odd
components by freezing the even ones. In the first consider the odd compo-
nents to be constant on the interval [t, t + ∆t]. Similar procedure is applied
for the matrix C and the source vector q̄, both are evaluated at time t + 12 ∆t
with these assumption the bolck system (14) decouples into two ODE’s
e e e
In general St+ 1
∆t,t
· St+ 1
∆t,t
6= St+ 1
∆t,t
2 2 2
Accuracy: The spatial truncation error is O(h2 ) , where h = max{∆x, ∆y}.
Due to the symmetry in the arragement of the sub-half steps in (21), the
splitting error in a single time step in O(∆t3 ) and the global temporal trun-
catin error due to the fractional steps is O(∆t2 ). This second order accuracy
in time is preserved because all temporal evaluated are done in a symmet-
ric fashion. The overall second order accuracy i.e the truncation error is
O(∆t2 ) + O(h2 ) is confirmed by the numerical result sec 6.1
Stability: Here we shall see the L2 stability namely the combination of
staggered spatial grids with the temporal splitting (21). Consider the P1
system in one space dimension with constant coefficients and without a source
T
q̄ = 0. Here the solution vector has two scalar fields ū = ue uo which
satisfy the equation
∂t ue + ∂x uo + ce ue = 0
∂t uo + ∂x ue + co uo = 0
Conducting Von Neumann stability analysis, let the numerical solution
at time t be represented interms of its Fourier coefficients.
16
The even Fourier coefficient
X
ue (x, t) = aek (t)eikx
k
where the domain is of periodic length 2π. Due to the linearity of the updated
rule, the coefficients aek (t, ∆t) and aok (t, ∆t) depends only on the coefficients
aek (t) and aok (t) for a particular k. Hence Fourier modes of different frequences
do not mix. Consequently it is enough to analyse the growth factor for basic
wave solution
ue (x, t) = aek (t)eikx and uo (x, t) = aok (t)eikx ...........(22)
Let x = hj , j ∈ Z for the grid hj in ue and for uo , let x = h(j + 21 ), j ∈ Z.
Then the grid solution values are
1 1
ue (hj , t) = aek (t)eikhj and uo (h( j + ), t) = aek (t)eikh( j+ 2 )
2
The staggered grid derivative are
1 ae (t)eikh(j+1) − eikhj
(Dx ue )(h(j + ), t) = k
2 h
aek (t)eikhj ikh
= (e − 1)
h
h
aek (t)eikhj eik 2 ik h h
= (e 2 − e−ik 2 )
h
2i ikh(j+ 1 ) h e
= e 2 sin k a (t)
h 2 k
and
1 1
o aok (t)(eikh(j+ 2 ) − eikh(j− 2 ) )
(Dx u )(hj, t) =
h
i kh ikhj o
= 2 sin( )e ak (t)
h 2
Hence, for the basic waves (22) on the staggered grids, the even half-steps
solution operator (19) updates the Fourier coefficient by the linear operation
e e e e
ak 1 d f ak
o (t + ∆t) = (t)
ak 2 0 1 aok
= Ge1 ∆t
2
17
where de = exp(− 12 ce ∆t) and f e = −i ∆t
h
E(− 21 ce ∆t) sin( kh
2
).
Similarly the odd half-step solution operation (20) acts on the Fourier
coefficient as
e e
ak 1 0 1 ak
(t + ∆t) = (t)
aok 2 d o
f o
aok
= Go1 ∆t
2
18