Lecture 3 Numerical Solutions to the Transport Equationbaron/grk_lectures/lec03.pdf ·...
Transcript of Lecture 3 Numerical Solutions to the Transport Equationbaron/grk_lectures/lec03.pdf ·...
Lecture 3Numerical Solutions to the Transport Equation
Introduction I
There are numerous methods for solving the transport problemnumerically.First we must recognize that we need to solve two problems:
I The formal solutionI Integral MethodsI Feautrier MethodI Characteristic Methods
I The scattering problemI Λ–iterationI Variable Eddington Factor MethodI Accelerated Λ–iteration
Today we will study the “Feautrier Method”, Λ–iterations, the VariableEddington Factor Method, and “Accelerated Λ–Iteration”
Λ–Iterations ILet’s first start out with what to avoid. First off let’s be clear that thesolution of the RTE is a solution for Jν . Once we have that we justhave to do a formal solution. The existance of scattering terms is whatmakes the solution of the RTE so difficult. Physically these termscouple regions that are spatial separate and hence couple regions withvastly different temperatures causing large departures of Jν from Bνeven for τν >> 1. This leads to the failure of Λ–iteration.Consider
Sν = (1− εν)Jν + ενBν
µdIνdτν
= Iν − Sν
Jν = Λτν [Sν ] = Λτν [ενBν ] + Λτν [(1− εν)Jν ]
if εν = 1 the answer is exact. So the obvious thing to do is to setJν = Bν (which is true at great depth) and then iterate
J(n)ν = Λτν [S(n)
ν ] = Λτν [ενBν ] + Λτν [(1− εν)J(n−1)ν ]
Λ–Iterations II
But
Λτν [f (t)] = 1/2∫ ∞
0f (t)E1(|t − τν |) dt
but for large ∆τ
E1 ∼e−∆τ
∆τ
so information about J can only propagate of©(∆τ = 1). If we startwith Jν = Bν then we need 1√
ενiterations to allow the outer boundary
to be felt by the solution.For lines εν ∼ 10−8 → 104 iterations. In practice J(n)
ν − J(n−1)ν tends to
stabilize leading to apparent convergence even though Jν is still farfrom the true solution.
Convergence Rate in Static Atmosphere
Geometry for Solution to Plane-Parallel Equation
Variable Eddington Factor Method IFeautrier Solution
The Plane-parallel transfer can be written as
±µ dIdτ
= I − S
ordI−ωdτω
= −I−ω − S−ω
dIωdτω
= Iω − Sω
wheredτω ≡ dτ/µ
If we assumeSω = S−ω
Then we can definejω = 1/2(Iω + I−ω)
Variable Eddington Factor Method IIFeautrier Solution
hω = 1/2(Iω − I−ω)
Then adding the two equations we get
djωdτω
= hω
and subtracting givesdhωdτω
= jω − Sω
ord2jωdτ2
ω
= jω − Sω
for each ray and each frequency. Okay we need two boundaryconditions
I−ω(0) = 0 and Iω(τ∗) = IBC
so we can write these in terms of the Feautrier variables as
Variable Eddington Factor Method IIIFeautrier Solution
at τ = 0
hω = 1/2(Iω − I−ω) + 1/2I−ω − 1/2I−ω = jω − I−ω
and at τ = τ∗
hω = 1/2(Iω − I−ω) + 1/2Iω − 1/2Iω = I+ω − jω
Moment Equations
dτω = dτ/µ
so we haveµ
dhdτ
= j − S
µdjdτ
= h
Variable Eddington Factor Method IVFeautrier Solution
J =
∫ 1
0j dµ
H =
∫ 1
0hµ dµ
K =
∫ 1
0jµ2 dµ
thendHdτ
= J − S
dKdτ
= H
ord2Kdτ2 = J − S
Variable Eddington Factor Method VFeautrier SolutionLet’s define the Eddington factor:
fK = K/J =
∫ 10 jµ2 dµ∫ 1
0 j dµ
and at the surface, we’ll define
fH = H/J =
∫ 10 jµ dµ∫ 10 j dµ
where we used the BC at the surface and assumed no incomingradiation.Okay now we can solve the whole problem numerically, if we assumethat the Eddington factors are known functions of depth. Then we get
d2(fK J)
dτ2 = J − S
Variable Eddington Factor Method VIFeautrier Solutionwith BCs
d(fK J)
dτ= f HJ + H− at τ = 0
d(fK J)
dτ= H+ − f HJ at τ = τ∗
where
H− =
∫ 1
0µI− dµ
H+ =
∫ 1
0µI+ dµ
These follow directly from the Feautrier BCsOkay now we have the tools to solve the scattering problem: We startwith the Feautrier Equations
µ2 d2jdτ2 = j − S
Variable Eddington Factor Method VIIFeautrier Solution
and BCsµ
djdτ
= j − I− at τ = 0
µdjdτ
= I+ − j at τ = τ∗
Now we introduce a grid and Finite Difference
dfdx
=fj+1 − fj
∆x
d2fdx2 =
fj+1 − 2fj + fj−1
∆x2
so our transfer equation becomes
µ2
∆2 [jd+1 − 2jd + jd−1] = Sd
Variable Eddington Factor Method VIIIFeautrier Solution
with BCsµ
∆[j2 − j1] = j1 − I−1
µ
∆[jD − jD−1] = −jD − I+
D
or− µ
∆j2 + (1 +
µ
∆)j1 = I−1
− µ∆
jD−1 + (1 +µ
∆)jD = I+
D
Variable Eddington Factor Method IXFeautrier Solution
1 + µ∆ − µ
∆
− µ2
∆2 1 + 2 µ2
∆2 − µ2
∆2
− µ2
∆2 1 + 2 µ2
∆2 − µ2
∆2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .− µ
∆ 1 + µ∆
j1j2j3...jD
=
I−
S2S3
. . . . .
. . . . .SD−1
I+D
Variable Eddington Factor Method XFeautrier Solution
So given Sd I can solve this by solving the tri-diagonal matrix.
Solution to a Tri-diagonal Matrix Equation IIn general inverting an N × N matrix requires N3 operations, so evenwith a supercomputer you can’t invert a very big matrixN < few thousandBut consider a system of equations of the form
Ajuj+1 + Bjuj + Cjuj−1 = Dj (1)
Then we can solve this for the vector ~u with©(N) operations asfollows:We seek two quantities Ej and Fj such that
uj = Ejuj+1 + Fj (2)
We assume the boundary conditions require
u0 = 0 and uN = 0
which implies thatE0 = F0 = 0
Solution to a Tri-diagonal Matrix Equation IIthen re-writing equation 2 as
uj−1 = Ej−1uj + Fj−1
and plugging into equation 1 we obtain
uj = −Aj
Bj + CjEj−1uj+1 +
Dj − CjFj−1
Bj + CjEj−1
from which we can read off
Ej = −Aj
Bj + CjEj−1
and
Fj =Dj − CjFj−1
Bj + CjEj−1
and we sweep through the grid twice, first to get the E and F startingat j = 1 and then backwards to get the uj , starting with the BC valueuN = 0.
Putting together VEF ISo now we can consider the scattering problem
S = (1− ε)J + εB
J =
∫ 1
0j(µ) dµ
The Eddington factor Equation is
d2(fK J)
dτ2 = J − S = ε(J − B)
with BCsd(fK J)
dτ= f HJ + H− at τ = 0
d(fK J)
dτ= H+ − f HJ at τ = τ∗
Again we finite difference and obtain
Putting together VEF II
f Kd+1Jd+1 − 2f K
d Jd + f Kd−1Jd−1
∆2 = εdJd − εdBd
or−f K
d+1Jd+1
∆2 − (εd +2f K
d∆2 )Jd −
f Kd−1Jd−1
∆2 = εdBd
with BCs
(f H1 +
f K1∆
)J1 −f K2∆
J2 = H−1
−f KD−1
∆JD−1 + (f H
D +f KD∆
)JD = H+D
Putting together VEF IIIAnd again we have a tridiagonal matrix
f H1 +
f K1∆ − f k
2∆
− f K1
∆2 ε2 + 2 f K2
∆2 − f K3
∆2
− f K2
∆2 ε3 + 2 f K3
∆2 − f K4
∆2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
− f KD−1∆ f H
D +f KD∆
J1J2J3. .. .. .JD
=
H−1ε2B2ε3B3
. . . . . . . . .
. . . . . . . . .εD−1BD−1
H+D
Putting together VEF IV
So given f Kd , f H
1 , and f HD we can solve for Jd and then given Jd we have
Sd = (1− εd )Jd + εdBd . But then given Sd we get get jd at each µ andfrom that we can calculate the Eddington factors: f K
d , f H1 , and f H
D . As afirst approximation we can take f K
d = 1/3, f H1 = 1/
√3, and f H
D = 0 andrepeat the whole thing until it converges
Accelerated Λ–Interation IWe have an idea already how to constuct the Λτ operator using theExponential Integrals. Numerically we will not construct the operatorthat way and I leave the details to papers by Olson & Kunasz;Hauschildt; Hauschildt & Baron.Let’s for the moment return to the Plane-Parallel static RTE
µdIdz
= −χI + κB + σJ
J = 1/2∫ 1
−1I dµ
χ = κ+ σ
dτ = −χdz
µdIdτ
= I − κB + σJχ
= I − S
S = εB + (1− ε)J
Accelerated Λ–Interation II
ε =κ
χ
And we’ve seen in Lecture 2, that if S is known then I can becomputed by numerical integration
J = Λ[S]
Formal solutions are numerically “cheap” and we don’t need an explicitexpression for Λ in order to obtain the formal solution.Problems:
1. Stability of numerical integration (relatively easy to beat down)
2. S depends on J
Accelerated Λ–Interation IIIIf we knew Λ numerically then solution is simple:
J = Λ[εB] + Λ[(1− ε)J]
[1− Λ[(1− ε)]J = Λ[εB]
J = [1− Λ[(1− ε)]−1Λ[εB]
but1. Numerical computation of Λ is expensive2. Numerical inversion of Λ may also be expensive
Straight forward Λ–iteration
Jnew = Λ[Sold]
Snew = (1− ε)Jnew + εB
I Will always converge
Accelerated Λ–Interation IV
I Formal solutions are cheapI Needs©(1/
√ε) iterations for convergence
MathematicallyΛ–iterations are totally stable and will converge→ Eigenvalues < 1,but Eigenvalues of©(1−
√ε). So convergence is extremely slow.
Idea: Accelerate convergenceTechnically: Reduce Eigenvalues of Amplification matrixPractically: Introduce approximate Lambda–operator Λ∗
Λ = Λ∗ + (Λ− Λ∗)
Now operator split iteration so
Accelerated Λ–Interation V
Jnew = Λ∗[Snew] + (Λ− Λ∗)Sold
= Λ∗[(1− ε)Jnew] + (Λ[Sold]− Λ∗[(1− ε)Jold])
= Λ∗[(1− ε)Jnew] + JFS − Λ∗[(1− ε)Jold]
JFS = Λ[Sold]
Jnew = [1− Λ∗[(1− ε)]−1 [JFS − Λ∗[(1− ε)Jold]]
Now if Λ∗ has a simple form inversion is not too expensive. We wantthat the eigenvalues of Λ− Λ∗ << Eigenvalues of ΛSolution: Choose Λ∗ as bands of Λ including diagonal.
I Diagonal: Core saturation (Rybicki & Hummer, Scharmer)I Tri-Diag: Olson & KunaszI Bands: Hauschildt et al.
Why use bands?I Easy to invert
Accelerated Λ–Interation VI
I Eigenvalues significantly reducedI Easy to evaluateI Practically: Exists a tradeoff between band-width of Λ∗ and
number of iterationsI Tridiag is often a good choiceI Can be Ng accelerated
Convergence Rate in Static Atmosphere
Spherical Geometry
This is standard method for spherical symmetry
Spherical Geometry Question
But why not do it this way?