Post on 22-Jul-2020
MONTE CARLO METHODS IN RADIATIVE TRANSFER
George W. Kattawar
Center for ‘Theoretical T(ysics
Department of TIjsics, Thas &94( Vuiversity
Coltege Station, ‘Tea.c 77843 -4242
I. Introduction
Let us begin our scenario with a visualization of our ultimate goal
i.e., the solution of the equation of transfer for any arbitrary geometry
of source, medium, and detector. We should state at the outset that the
power of the Monte Carlo method is usually not demonstrated for plane-
parallel systems with no lateral variations since we have more accurate
methods for obtaining solutions for this situation. The power of the
method is borne out when one wishes to solve such problems as those
involving spherical atmospheres, laser beam propagation (LIDAR), search
light beam propagation, and broken cloud problems, just to mention a few.
The basic idea behind the Monte Carlo method is the following: if
one knows the probability of each in a sequence of events then one can
obtain an estimate of the final outcome. Let us analyze this statement
in the context of radiation incident upon a scattering and absorbing
medium. When radiation impinges on a medium we know that the path lengths
are distributed with an exponential probability density function. At an
interaction point the photon is either scattered or absorbed. If it is
scattered then the probability that it is scattered through some angle
is governed by another density function which we normally call the phase
function. This process is continued until the particle encounters some
obstacle, for example the ground, which again has some known scattering
-2—
and absorbing probability. Now this process is repeated enough times until
we have statistics which are sufficient for our purposes. Now this type
of straight forward simulation is called “brute force” or ‘crude” Monte
Carlo. The real finesse comes when we learn to play the game with
“loaded dice”. Such schemes fall under the general classification of
variance reduction techniques and involve such things as Russian roulette,
sequential sampling, importance sampling, forced collisions, etc. Some
of these methods will be described later in the sequel.
II. Random Numbers
In any Monte Carlo simulation we must have an adequate supply of
random numbers, actually they are called pseudorandom numbers since they
are produced by a precise algorithm. Most random numbers generators use
a variation of a method first proposed by Lehmer in 1951 called con
gruential methods. One such method is the following:
x E c x1 + (modulo m) (1)
where m is usually taken as 2(bit length 1) for a binary computer where
the first bit is the sign bit and c, , and x. are integers between 0
and m-l. The numbers x/m are then used as the pseudorandom sequence.
Prob. 1 Let m = 16, = 3, = 1 and = 2 and compute the sequence
of numbers and the period of this generator.
-3-
F or the algorithm of eqn (1) the full period of m can always be achieved
provided that
a) 6 and m have no comon divisor
b) . 1 (modulo p) for every prime factor p of m
c) 1 (modulo 4) if m is a multiple of 4.
Now let us state the fundamental principle of Monte Carlo calculations.
Let r be a random number which is uniformly distributed on 0 < r < 1 and let
p(x)dx be the probability of x lying between x and x ÷ dx with a<x < b, and
ajb p()dn = 1 (2)
then
r = P(x) = afX p()d (3)
determine x uniquely as a function of r and x falls with frequency p(x)dx
in the interval (x, x+dx). Let us now consider an application of the
above method as it pertains to radiative transfer theory. The probability
that a photon makes a collision between optical depth t and t + dt is
—tp(t) dr = e dt (4)
Therefore r ft e_tdt = 1 - e (5)
and t = - n (l-r) (6)
but since l-r is also uniformly distributed we can just as well use r leaving
us with
-4-
— 2n r (7)
Prob. 2 Use equation (7) to generate a sequence of -r5 and plot their
density on semi-logarithmic paper
It should be clear from our example that if a medium is optically thin
then most photons will escape the medium. This of course can be quite
wasteful and costly in terms of computer time. To avoid this we will
use the method of forced collisions and introduce the use of a statisti
cal weight. Instead of considering each photon as a single entity we
will regard it as a packet of photons. As an example let the injected
photons have initial Weight W0 (usually set equal to unity). The fraction
of photons escaping a first collision and passing through the medium is
e_tm where Tm is the optical thickness of the medium. Therefore the
fraction remaining is 1 - e_Tm. We will now force a collision by sampling
from the density function
e dtp(t) dt = , 0 < < r 81 - e_tm
Using eqn (3) we get
1 - eTr= (9)1 - e Tm
and
=- n[l - r(l - eTm)] (10)
To remove the “bias” in our sampling we must multiply the weight W0 by
—5—
1 - etm which gives the fraction of our packet of particles which remain.
We will illustrate the generalization of the method just used. Con
sider the expectation value of some function f(x)
<f(x)> = I f(x) p(x)dx (11)
where p(x) is the probability density and f(x) is called the estimator.
Now suppose that instead of sampling from p(x) we sample from p(x) then
= I f(x) p(x)dx = I f(x) p(x)dx (12)p(x)
so the estimator must be multiplied by p(x)/p(x).
Let us use this method to analyze the converse of the case for thin
media, namely media of large optical thickness >> 1. If we are inter
ested in transmission through the medium it is clear that sampling from
the exponential density function will place very few particles deep in
side the medium. We can remedy this by sampling uniformly in t i.e.,
r=1— , (13)tm
where now p(t) = and p(t) = e_t therefore the weight is multiplied by
Tm e
We have now seen how eqn. (3) can be effectively used to sample from
a given probability density; however, it is clear that this equation can
result in very difficult implicit problems since x must be determined
from r. An example of such a complication arises when one wishes to
sample a highly asymmetric phase function which is encountered from aero
-6-
sols, or clouds. In these cases we may have only tabular data to work
with. Let us assume that in the interval (a,b) we have accurate values
of P(x) P1 stored for points
x0=a<x1<. . . <x=b
Let i be the first value for which r - P. < 0 where r is a random
number, then x can be determined from one of the following formulas
x =- (x - x11) , (14)
x = [x2 -(x2 - x1)]2 (15)
x = [x2-
p’ (x2 -x1)2]2 (16)
Eqn (14) distributes x uniformly on (x1, x) and is correct only when p(x)
is a step function. Eqns (16) and (17) are appropriate when P(x) is concave
up or down, respectively.
Another very useful scheme which can be used when p(x) is easy to com
pute was introduced by Von Neumann and is called the rejection technique.
To illustrate consider p(x) defined on the interval [a,b] and let
p(x) = p(x) / sup p(x)a<x<b
y —7—
1
px)
a
Think of now throwing points at the board bounded by x = a, x = b,
y = 0, y = 1 and rejecting points lying above the curve
y = p(x)
and letting x = whenever (,n) falls below the curve. For a large
number of throws, the ratio of the number of points retained with 5 between
xand x+dx to the number of points retained altogether will be the ratio of
areas i.e.,
b bPiX)dX/af p()ds = P(X)dX/af p()d = p(x)dx (17)
Prob. 3 In the rejection method we could also retain points (,n) above
the curve y = p(x), but the weight will have to be adjusted.
Determine the factor which multiplies the weight for such a
scheme.
III. Direction Cosine Routines
We have now discussed ways of sampling path length and scattering angle
relative to the incident photon direction. We now need a set of equations
to give us the new photon direction in our fixed coordinate system. Let
(u, v, w) be the direction cosines
. (,Ti)
x
z
x
Y
of the photon before scattering relative to the (x,y,z) axes respectively.
Let be the scattering angle and the angle representing the rotation of
the scattering plane. These angles will be selected from the phase function
p(c)dc2 = p( e , ) sine d d. Also let (u, v, wj be the direction
cosines of the scattered photon relative to the fixed coordinate system
(x,y,z). Now let
a = cos C
b = sine
C = COS
d = sin
-r’r
With this notation we have
= (bcwu - bdv)/A - w2 ÷ au (18)
= (bcwv + bdu)/A - w2 + av
1 2w = - bc l - w + aw
(19)
I (u,v’,w’)I (u,v,w)
(20)
-9-
It should be noted these equations are indeterminate for wi = 1 and are
inaccurate for wi 1 and should be bypassed in favor of
= bc (21)
v = bd (22)
w = aw (23)
IV. Isotropic Scattering
The phase function for isotropic scattering is simply given by
= = dd(24)
where = cose
Prob. 4 Derive an algorithm which will generate the variables .i and for
isotropic scattering. (eqn (24))
It should now be noted that for isotropic scattering it is totally un
necessary to use eqns (18) - (20), since a uniform distribution of points
does not depend on a fiduciary axis. Therefore our technique for generating
(u,v,w) is quite simple and goes as follows:
w = cos e
and p(w)dw = , - 1 < w < 1
wtherefore r
= .1.1 = (25)
-10-
Now the azimuthal angle is obtained from
r = p()d = = (26)
It is now easy to compute u and v, namely
u= l—w cosp .27)
v = A - w2 sin • (28)
V. Ground and Other Surface Reflections
Let us now assume that our photon encounters some surface. The
simplest type of surface we can consider is the so called Lambert surface.
What is meant here is that the radiance emanating from this surface is a
constant in all directions. This implies that the probability density
function for photon reflection from the surface is
p(3.i,) = - ddp 0 < < 1, 0 < < 2Tr (29)
(Convince yourself that this density function will produce constant radiance
in all directions.)
Prob. 5 Develop a simple algorithm using the point rejection method to
sample the normalized density function p() = 2 used in eqn. (29).
—11—
If the Lambert surface has albedo A then upon reflection the weight is
multiplied by A. It should now be clear that by carrying multiple photon
weights that any number of surface albedos can be handled in a single
computer run.
If the surface is a dielectric, such as water, then one needs the
Fresnell reflection coefficients as a function of angle. Let R(i) denote
the reflection coefficient, then a random number can be generated and
tested against R(). If it is less than R() then specular reflection
will occur, and if it is greater then the photon is transmitted into the
medium and its angle of entrance appropriately transformed by Snell ‘S law.
It should now be clear that as long as we know the reflection properties
of any surface, whether in tabular or analytic form, it can be successfully
simulated by Monte Carlo techniques.
VI. Selection of Type of Scattering
Suppose the photon has made a collision in some layer of the medium.
Also let
SR = Rayleigh scattering coefficient
SM = Mie scattering coefficient
= total extinction coefficient
The single scattering albedo= sR sM)/ST. At each collision the
weight is multiplied by A random number r is then generated and tested
—12-
against the ratio SR/(SSR + If r is less than this ratio then the
Rayleigh scattering phase function is used to select the scattering angle.
If it is greater than this ratio then the Mie scattering phase function is
used.
VII. Backward Monte Carlo
In the forward Monte Carlo method we start photons at the source and
track them to the detector. In the backward Monte Carlo we use time re
versal and track photons from the detector back to the source.
We will demostrate the efficacy of the backward Monte Carlo method by
considering the following simple example. Consider a semi-infinite, plane-
parallel, homogeneous, conservative, isotropically scattering medium. Let
us assume that the medium is illuminated vertically by a flux F(r,p) (see
figure below). Let us now compute a scalar irradiance (ia) from the radiance
I at point 0 on the top of the medium (see figure below). Now
(30)10 = i 1(2)dc2
Incident SourceF(r,Ø)
z
Interaction Point
-13-
where the integral is taken over the upper hemisphere and the quantity
is also proportional to the energy density of the scattered radiation
at point 0. The contribution to I from singly scattered photons can be
written as
F’ -6p —6Z10 1 f f 6 e rdrdz, (31)
0 0 0 4irp
where 6 is the extinction coefficient. Now we immediately see a problem
using forward Monte Carlo, i.e., source coordinates. We must select some
maximum radius to terminate the selection of the r coordinate. A poor choice
of this cutoff will lead to sampling in regions which produce no significant
contribution to the final result. Also the presence of the term in the
estimator can cause large statistical fluctuations in the results for small
p. These problems can be eliminated by going to backward Monte Carlo, i.e.,
we will transform (3l)from source coordinates to detector coordinates.
This can easily be done with the following coordinate relationships (see the
Figure on the preceeding page).
r = p sin e,
(32)
z = p cos 8.
Evaluating the Jacobian for the transformation we get
-14-
2ir 7T/2 F ‘-
= I J .1. r,p,e e 8d8dd.0
000 (33)
This integral can easily be evaluated by the Monte Carlo method by first
sampling o from the normalized density function sinede, sampling from
the normalized density function dp/2rr, and sampling p from the normalized
density function The estimator is now F(r,)e e72
should be noted that the two basic problems encountered with forward Monte
Carlo have now been eliminated.
VIII. Inclusion of Polarization
Up to the present we have only demonstrated the technique to generate
the radiance which is only one component of the more general Stokes Vector.
We will adopt the I, Q, U, V representation where I Ir + I and Q = I.z - Ir
where r and 2. refer to components parallel and perpendicular respectively to
the reference plane. A clockwise rotation of the axes through an angle
(looking into the direction of propogation) produces the following transforma
tion matrix
1 0 0 010 cos2 sin2cp 0
L() = I (34)0 -sin2c cos2 0
0 0 1
This respresentation of the rotation of the axes is not the one normally found
in the literature (see Chandrasekhar ref 4 pg 35) since earlier researchers
-15—
used the I, Ir, U, V representation. The linear transformation connecting
the two can easily be derived as follows
1 1 0 0
1 -l 0 0
0 0 1 0
0 0 0 1
1
½ -½ 0 0
0 0 10
0 0 01
0 in the dia
the angle of
let I
Jr Q1 ‘2
U U
V V
where I = I + Ir, and Q = LQ - Jr. Therefore
where
(35)
(36)
(37)and
Now let us consider that a scattering has occured at point
gram below. Let I. be the incident direction of the particle,e
scattering, and i1 the orientation of the scattering plane
I
.0•
—j
- 16 -
relative to the meridian reference plane. Then the Stokes vector I’ after
scattering is related to the Stokes vector I before scattering by
I’ L(—12) (e) L(—i1) (38>
where
_____
M2-M1 a a2 2
M2-M1 M2+M1 a a2 2 (39
R(e) =
o a - D21
o o 1321 S21
The four quantities in the scattering matrix M1, M2, S21, and are
consistent with the definition used by van de Huist (Ref.5, pg. 44).
Now if L1 and are in the 12., Ir, U, ‘I representation and L2 and R2 are in
the I, Q, U, V representations then from eqn. (38)
= i (-i2) l (-i1) (40)
multiplying eqn. (40) from the left by T we get
1 (-ia) T T R () T T L1 (i1) T T ‘1 (41)
= 2 12’) R2(e)L2(-i1) .2 (42)
In the Monte Carlo method, the scattering angle C is selected by
a random process from the cumulative distribution of the scattering
function ½ (M1 + M2); similarly the angle i1 is chosen from a uniform dis
tirbution between 0 and 271. These distributions are a first approximation
to the correct distributions fore and i1. The calculation allows for the
— 17 —
difference between the actual distribution and the approximate one by correct
ing the components of the Stokes’ vector after collision by a method described
below. It should be emphasized that the procedure would yield the correct
result for any initial distribution function for e and i1, but the statistical
fluctuations are less if the initial density functions are reasonably close
to the actual ones. Once the angles e and i1 have been selected, the angle
is computed from the equations of spherical trigonometry. It should be
noted that it is not necessary to sample a and i1 from a bivariate density
function but instead a biased density may be used
To see the bivariate nature of the density function, let us expand eqn.
(38) without the final rotation L C-i2). We find
(M1 + M2) (M2 - M1)I’ (e, jl = I 2 + 2 C cos 2i1 + U sin 2 i1) (43)
it is now clear that I’ not only depends on I but on Q and U as well.
At this juncture we will now show how to sample a bivariate density funtion
p (x,y), when x and y are functionally independent variables i.e., x may
change arbitrarily holding y fixed and vice versa. The conditional probability
p (xy) can be expressed as
p (xy) = p (x,y) / p(y) (44)
whereb
p (y) f P (x,y) dx (45)
a
is called the unconditional probability. Let us apply the above theorem
(eqn. (44)) to eqn. (43). Since we now have the machinery to sample highly
anisotropic phase functions, we will first sample the scattering angle
= cos 9 by
- 18 -
2 (M1 () + 112 (.))p () = I p ( , i) d i = 2 , and f1p() d u 1 (46)
0 2 -1
Mi + 112where ( ) 2ir is the phase function used for unpolarized light and
2
p () has been normalized by dividing by I. Therefore
1 M -Mp Ci ) = { 1 + 2 1 C cos 2i1 + U sin 2i1)} (47)
M2 +
We can nowuse the rejection method to sample eqn (47), however, to do this we must
have the maximum value of the function over the interral therefore i ) =
diM -M 1
2 1) (Q sin 2i1 + U cos 211))M + M1
Setting di1 0 gives
tan 2i1 = U/Q
using this result in eqn. (47) gives
max (i) =
+ : : : (/Q2 ÷u2 (48)
We can now use the rejection method to sample eqn.(47) for i1. We should
now make a very important point and that is if we are doing
backward Monte Carlo we can not use the method just described since we
do not know the initial state of the photon. It should be remembered
that the last collision in the backward Monte Carlo is the first collision in the
forward Monte Carlo and vice versa. We are therefore forced to use biased
sampling i.e., we first sample . from and i1 randomly between 0
and 2’rr. Now since we are performing time reversal the matrix product in
eqn. (38) now becomes
- 19 —
M +M= 2j2 2 2(-i1) 21(
12)(49)
M +Mwhere the factor 12 2 is used to remove the bias.
Prob. 6. Use the transformations (eqn (37)) and show that
cos2 sin ½ sin 2 0
sin Co5 -½ sin 2 0L1(e) =
-sin 2p sin 2 cos 2 0
0 0 0 1
which is in the I, Ir, U, V representation can be transformed into eqn. (34).
VIII. Sampling the Henyey-Greenstein Phase Function
The Henyey-Greenstein phase function is given by
1 2p() =
-
4i(l -
where = cos e and e is of course the usual scattering angle and the quantity
g is called the asymmetry factor and is just the first moment of the density
function. Let P() be the distribution function of defined by
2= f .1 p(u,)dud
-l 0
Setting r = p(j) and solving for in terms of the random number r we get
- 20 -
= {l + g2 - [(1 - g2)/(g(2r - 1) + l)]2}/2g
It should be noted -l when r = 0 and = 1 when r = 1. In Fig. 1 below
we show how good the above algorithm is for sampling this density function.
r r rr T r
• -o7 FxAcr• qO7 M \E AL
IgO5 EXAC’+O5 MCNECRLD
IDo,occ SOR ES
Ziâz_
D‘.a.. .
LJJCl) -
L—
LAJ
H L
H
0 08 060402 0O02Q406O80Cos
I I ii \[ nh ( in’I inni plnnig1Inni n—( irennntfnnn nhae linnin Inn n rh t h
I nI(nnIaI rn.
- 21 —
Biblography
1. Hammersley, J. M. and Handscomb, D. C., “Monte Carlo Methods’
(1964) John Wiley & Sons, Inc., New York.
2. Spanier, Jerome and Gelbard, Ely M., ‘Monte Carlo Principles and
Neutron Transport Problems”, (1969) Addison-Wesley Publishing Co.
Reading, Mass.
3. Cashwell, E. D. and Everett, C. J., “A Practical Manual on the
Monte Carlo Method for Random Walk Problems”, (1959) Pergamon Press,
New York.
4. Chandrasckhar, S. “Radiative Transfer” (1960) Dover Publ. Inc.,
New York.
5. Van de Hulst, H. C., “Light Scattering by Small Particles”, (1957)
John Wiley & Sons, Inc., New York.
Backward Monte Carlo Comparisons
for Conservative Rayleigh Scattering
Figure 1 Comparison of plane parallel calculation for intensity with
the backward spherical Monte Carlo for = 66.9, t = 0.25,
• = 0 and 1800 for ground albedos of A = 0 and 0.8. Solid
curves are taken from Coulson, et. al.
Figure 2 Same as Fig. 1 except the ordinate is the degree of polariza
tion.
Figure 3 Same as Fig. 1 except for • = 30 and 150°.
Figure 4 Same as Fig. 2 except for • = 30 and 1500.
Figure 5 Same as Fig. 1 except for • = 60 and 120°.
Figure 6 Same as Fig. 2 except for • = 60 and 120°.
LU
0,9
0.8
U.S
0.4
0.3
0.2
0.1
0.0
90
0:0
0
0:6
6.9
°
TA
U:Q
,25
0:1
800
A=
0.8
>_
0.1
F— ,—
_-
0.6
(f)
2:
u-i
F 2:
A:Q
.0
6030
030
6090
NA
DIR
ANGL
EF
igu
re1
z 60
F—
50
ci:
rJqo
GE
20
0 cL
’0
100
90
U
o‘
80 10 U90
6030
U30
60
NA
DIR
ANGL
E90
Fig
ure
2
1.0
iI
II
II
II
0=
300
ø13O
0
O=
66.9
°
0.8
-T
AU
=O
.25
A0.8
E::: LU 1_0.I4
2:
I—1
(1.3 :
44
p*
•L
0.0
II
II
II
‘ii
Ii
a
9060
300
3060
90
NA
DIR
ANGL
E
Fig
ure
3
U90
100
90
a
80
70z 60
H—
50
cc
30
—j
20
0 010
6030
030
60
NfRD
JRFI
NGLE
90
Fig
ure
4
>—
07
F— i_t
O.G
cn z0
u-i 0
.4
—4
0.3
0.2
0.1
NA
üIR
ANGL
E90
1.0
0.8 5
0.0
9060
30U
30.6
0
Fig
ure
5
100
90
a°
80
70z060
H- 50
r0cc30—j 20011.10
090
NADIRANGLE
60300306090
Figure6