________________________________
MATLAB Functions for Mie
Scattering and Absorption
Christian Mätzler
________________________________
Research Report No. 2002-08
June 2002
Institut für Angewandte Physik Mikrowellenabteilung
__________________________________________________________
Sidlerstrasse 5 Tel. : +41 31 631 89 11
3012 Bern Fax. : +41 31 631 37 65
Schweiz E-mail : matzler@iap.unibe.ch
1
MATLAB Functions for Mie Scattering and Absorption
Christian Mätzler, Institute of Applied Physics, University of Bern, June 2002
1
List of Contents
Abstract ...................................................................................................................1
1 Introduction..........................................................................................................2
2 Formulas for a homogeneous sphere ...................................................................2
2.1 Mie coefficients and Bessel functions................................................................................. 2
2.2 Mie efficiencies and cross sections ..................................................................................... 3
2.3 The scattered far field........................................................................................................... 4
2.4 The internal field .................................................................................................................. 5
2.5 Computation of Q
abs
, based on the internal field ................................................................ 6
3 The MATLAB Programs.........................................................................................7
3.1 Comments ............................................................................................................................. 7
3.2 The Function Mie_abcd ....................................................................................................... 8
3.3 The Function Mie ................................................................................................................. 8
3.4 The Function Mie_S12......................................................................................................... 9
3.5 The Function Mie_xscan...................................................................................................... 10
3.6 The Function Mie_tetascan.................................................................................................. 10
3.7 The Function Mie_pt............................................................................................................ 11
3.8 The Function Mie_Esquare.................................................................................................. 11
3.9 The Function Mie_abs.......................................................................................................... 12
4 Examples and Tests............................................................................................13
4.1 The situation of x=1, m=5+0.4i........................................................................................... 13
4.2 Large size parameters........................................................................................................... 15
4.3 Large refractive index .......................................................................................................... 16
5 Conclusion, and outlook to further developments .............................................18
References..............................................................................................................18
Abstract
A set of Mie functions has been developed in MATLAB to compute the four Mie
coefficients a
n
, b
n
, c
n
and d
n
, efficiencies of extinction, scattering, backscattering
and absorption, the asymmetry parameter, and the two angular scattering func-
tions S
1
and S
2
. In addition to the scattered field, also the absolute-square of the
internal field is computed and used to get the absorption efficiency in a way inde-
pendent from the scattered field. This allows to test the computational accuracy.
This first version of MATLAB Mie Functions is limited to homogeneous dielectric
spheres without change in the magnetic permeability between the inside and out-
side of the particle. Required input parameters are the complex refractive index, m=
m’+ im”, of the sphere (relative to the ambient medium) and the size parameter,
x=ka, where a is the sphere radius and k the wave number in the ambient medium.
1
Equation on p. 16 corrected, April 2006
2
1 Introduction
This report is a description of Mie-Scattering and Mie-Absorption programs written
in the numeric computation and visualisation software, MATLAB (Math Works,
1992), for the improvement of radiative-transfer codes, especially to account for rain
and hail in the microwave range and for aerosols and clouds in the submillimeter,
infrared and visible range. Excellent descriptions of Mie Scattering were given by
van de Hulst (1957) and by Bohren and Huffman (1983). The present programs are
related to the formalism of Bohren and Huffman (1983). In addition an extension
(Section 2.5) is given to describe the radial dependence of the internal electric field
of the scattering sphere and the absorption resulting from this field. Except for
Section 2.5, equation numbers refer to those in Bohren and Huffman (1983), in
short BH, or in case of missing equation numbers, page numbers are given. For a
description of computational problems in the Mie calculations, see the notes on p.
126-129 and in Appendix A of BH.
2 Formulas for a homogeneous sphere
2.1 Mie coefficients and Bessel functions
MATLAB function: Mie_abcd
The key parameters for Mie calculations are the Mie coefficients a
n
and b
n
to com-
pute the amplitudes of the scattered field, and c
n
and d
n
for the internal field,
respectively. The computation of these parameters has been the most challenging
part in Mie computations due to the involvement of spherical Bessel functions up to
high order. With MATLAB’s built-in double-precision Bessel functions, the com-
putation of the Mie coefficients has so far worked well up to size parameters
exceeding 10’000; the coefficients are given in BH on p.100:
)]'()[()]'()[(
)]'()[()]'()[(
)]'()[()]'()[(
)]'()[()]'()[(
)1()1(
1
1
)1(
1
)1(2
1
2
mxmxjxhxxhmxj
mxmxjxjxxjmxj
b
mxmxjxhxxhmxjm
mxmxjxjxxjmxjm
a
nnnn
nnnn
n
nnnn
nnnn
n
!
!
=
!
!
=
µ
µ
µ
µ
(4.53)
)]'()[()]'()[(
)]'()[()]'()[(
)]'()[()]'()[(
)]'()[()]'()[(
)1(
1
)1(2
)1(
1
)1(
1
)1()1(
1
)1(
1
)1(
1
mxmxjxhxxhmxjm
xxjxmhxxhxmj
d
mxmxjxhxxhmxj
xxjxhxxhxj
c
nnnn
nnnn
n
nnnn
nnnn
n
µ
µµ
µ
µµ
!
!
=
!
!
=
(4.52)
where m is the refractive index of the sphere relative to the ambient medium, x=ka
is the size parameter, a the radius of the sphere and k =2π/λ is the wave number
and λ the wavelength in the ambient medium. In deviation from BH, µ
1
is the ratio
of the magnetic permeability of the sphere to the magnetic permeability of the
ambient medium (corresponding to µ
1
/µ in BH). The functions j
n
(z) and
)(
)1(
zh
n
=j
n
(z)+iy
n
(z) are spherical Bessel functions of order n (n= 1, 2,..) and of the
given arguments, z= x or mx, respectively, and primes mean derivatives with respect
to the argument. The derivatives follow from the spherical Bessel functions them-
selves, namely
)()()]'([);()()]'([
)1()1(
1
)1(
1
znhzzhzzhznjzzjzzj
nnnnnn
!=!=
!!
(p.127)
3
For completeness, the following relationships between Bessel and spherical Bessel
functions are given:
)(
2
)(
5.0
zJ
z
zj
nn +
=
!
(4.9)
)(
2
)(
5.0
zY
z
zy
nn +
=
!
(4.10)
Here, J
ν
and Y
ν
are Bessel functions of the first and second kind. For n=0 and 1 the
spherical Bessel functions are given (BH, p. 87) by
zzzzzyzzzy
zzzzzjzzzj
/sin/cos)(;/cos)(
/cos/sin)(;/sin)(
2
10
2
10
!!=!=
!==
and the recurrence formula
)(
12
)()(
11
zf
z
n
zfzf
nnn
+
=+
+!
(4.11)
where f
n
is any of the functions j
n
and y
n
. Taylor-series expansions for small argu-
ments of j
n
and y
n
are given on p. 130 of BH. The spherical Hankel functions are
linear combinations of j
n
and y
n
. Here, the first type is required
)()()(
)1(
ziyzjzh
nnn
+=
(4.13)
The following related functions are also used in Mie theory (although we try to avoid
them here):
)()();()();()(
)1(
zzhzzzyzzzjz
nnnnnn
=!==
"#$
(p.101, 183)
Often µ
1
=1; then, (4.52-4.53) simplify to
)]'()[()]'()[(
)]'()[()]'()[(
;
)]'()[()]'()[(
)]'()[()]'()[(
)1()1(
)1()1(2
2
mxmxjxhxxhmxj
mxmxjxjxxjmxj
b
mxmxjxhxxhmxjm
mxmxjxjxxjmxjm
a
nnnn
nnnn
n
nnnn
nnnn
n
!
!
=
!
!
=
)]'()[()]'()[(
)]'()[()]'()[(
;
)]'()[()]'()[(
)]'()[()]'()[(
)1()1(2
)1()1(
)1()1(
)1()1(
mxmxjxhxxhmxjm
xxjxmhxxhxmj
d
mxmxjxhxxhmxj
xxjxhxxhxj
c
nnnn
nnnn
n
nnnn
nnnn
n
!
!
=
!
!
=
The parameters used in radiative transfer depend on a
n
and b
n
, but not on c
n
and
d
n
. The latter coefficients are needed when the electric field inside the sphere is of
interest, e.g. to test the field penetration in the sphere, to study the distribution of
heat sources or to compute absorption. The absorption efficiency Q
abs
, however, can
also be computed from the scattered radiation, Equations (3.25), (4.61-62) to be
shown below.
2.2 Mie efficiencies and cross sections
MATLAB functions: Mie, Mie_xscan