Users guide, Part I: Optics programs

3.a Mie Scattering Program (Reduced version)

V. Ossenkopf, MPG AG “Dust in Star-Forming Regions” Jena

Abstract

The Mie Calculator (Reduced version) (MIERED) is a simple sequential program for the computation of the absorption and scattering efficiencies and the asymmetry factor of spherical particles with a fixed radius from given optical constants m and permeabilities μ. It differs from the full version of the Mie calculator (MIE) in three ways. It only allows the treatment of spherical particles with given optical constants. Neither the oscillator representation nor the treatment of ellipsoids nor the computation of Planck averages are included. However, the file output is not restricted to the absorption efficiencies but also the scattering efficiencies and the asymmetry parameter are written into files. The computation of the asymmetry parameter substitutes for the backscattering efficiency. Furthermore, the program allows the treatment of materials with magnetic permeabilities different from 1.

1 Basic algorithms

The kernel of the program bases on the Mie routines from Bohren & Huffman (1983). Here, the efficiencies for spherical particles are computed from

Q_{sca} = \frac{2}{x^{2}} ∑_{n=1}^{∞}(2n + 1)(|a_{n}|^{2} + |b_{n}|^{2})
Q_{ext} = \frac{4}{x^{2}} Re(S(0))
Q_{abs} = Q_{ext} − Q_{sca}  (1)
S(0) = \frac{1}{2} ∑_{n=1}^{∞}(2n + 1)(a_{n} + b_{n})

a_{n} = \frac{[D_{n}(mx)/m + n/x]ψ_{n}(x) − ψ_{n−1}(x)}{[D_{n}(mx)/m + n/x]χ_{n}(x) − χ_{n−1}(x)}
b_{n} = \frac{[m × D_{n}(mx) + n/x]ψ_{n}(x) − ψ_{n−1}(x)}{[m × D_{n}(mx) + n/x]χ_{n}(x) − χ_{n−1}(x)}  (2)

with the recurrence relations

D_{n−1}(mx) = \frac{n}{mx} \frac{1}{D_{n}(mx) + n/(mx)}  (3)
ψ_{n}(x) = (2n − 1)ψ_{n−1}(x)/x − ψ_{n−2}(x)
χ_{n}(x) = (2n − 1)χ_{n−1}(x)/x − χ_{n−2}(x)  (4)

and the initial conditions

ψ_{−1}(x) = cos(x)  ψ_{0}(x) = sin(x)
χ_{−1}(x) = −sin(x) χ_{0}(x) = cos(x) (5)
D_{∞}(mx) = 0  (6)

The series are terminated after x + 4 × x^{1/3} + 2 terms.

Beside the removal of unused parts of the routines, some essential modifications were introduced. The treatment of a relative permeability of the materials increases the size parameter of the particles by Re(\sqrt{μ_{env}}), it increses the refractive index m by Re(\sqrt{μ}), and it changes the factor m in the translation from the logarithmic derivatives D_{n} to the scattering coefficients a_{n} and b_{n} (Eq. 2) into m/μ = sqrtϵ/μ. The additional average asymmetry parameter is computed from

g = \frac{4}{Q_{sca}x^{2}} ∑_{n=1}^{∞} Re (\frac{n(n + 2)}{n + 1}(a_{n}a_{n+1}^{∗} + b_{n}b_{n+1}^{∗}) + \frac{2n + 1}{n(n + 1)}(a_{n}b_{n}^{∗})) .  (7)

The basic routine consists of three steps. In a first step, the logarithimc derivatives D_{n} are computed by downward recurrence. The next step computes the Bessel functions ψ and χ and the scattering coefficients a_{n} and b_{n} in upward recurrence and adds them up as required for the scattering amplitude, the scattering efficiency and the asymmetry parameter. Herein, the computation of the asymmetry parameter combines the scattering coefficients with different indices in contrast to the original version of Bohren & Huffman (1983). The third step is the translation into the final efficiencies and the asymmetry parameter, respectively.

2 User interface

2.1 Terminal interaction

According to the linear structure of the program, the user has exactly to follow the dialog sequence of the program. The first questions ask for the parameters which are considered to be constant at all wavelengths: the refractive index and relative permeability of the surrounding medium and the physical particle size. Corrections are possible. Then, the user has to give the names for the data files containing the optical constants and the permeabilities and for the files which shall be used for output. In case of nonmagnetic materials no permeability file may be provided. Then, the computation routines are called. For test purposes, the most important input parameters and results for each wavelength are printed to the screen. Finally, the results are written to the output files.

2.2 Data files

The input data files are ASCII files containing lines with three numbers separated by blanks. Every line represents one wavelength point. Four different file types for optical constants are recognized automatically according to their file extensions. The first letter of a file extension states whether the first column contains wavelengths (in cm) (letter “l”) or wavenumbers (in cm^{−1}) (letter “z”). The next two letters stand for the content of the second and third column. An “nk” states that they have to be considered as real and imaginary part of the refractive index n and k and “ee” leads to an interpretation of the data as real and imaginary part of the dielectric function ϵ′ and ϵ′′. All files with other extensions are rejected by the program. For magnetic media, permeability files have to be given with the same name as for the optical constants except that their extension is “lmu” or “zmu”. The scaling in wavelengths or wavenumbers has to be identical to that in the file of optical constants. In the file of permeabilities the lines contain wavelength (in cm) or wavenumber (in cm^{−1}), respectively, and real and imaginary part of the relative permeability. The existence of a permeability file is not required.

Three output files are produced. They all have the same name but the extensions “lqa” (absorption efficiencies), “lsc” (scattering efficiencies), and “lg” (asymmetry parameters). A possible extension given for the output filename is omitted. The output files are ASCII files with two numbers per line. They contain always the wavelength (in cm) and the second number according to their name.

3 System requirements

The program is written in standard FORTRAN 77 so that it can be compiled on all machines providing an f77 compiler. It does not use large data arrays. Hence, the storage requirement is mainly dependent on the compiler efficiency. The running size is between about 40 kB for a PC version and 180 kB for a SUN version.

4 Local particularities - Jena

All PC versions available on the net are compiled to use a numerical coprocessor. On machines without physical coprocessor it may be emulated by Franke or other software coprocessors.

5 Limitations and bugs

In this version the number of wavelengths to be treated is restricted to 256. From longer files of optical constants only the first 256 lines are read. The file containing the optical constants has to follow the structure conventions discussed above. Different file structures may cause abnormal program termination.

The Mie series is restricted to 3000 terms. This means that huge particles with Re(m × x) > 3000 cannot be treated. To avoid abnormal termination in case of such grains, their size parameter is simply set to the largest value that can be handled with the given refractive index.

6 Description of the different parts of the program

6.1 Main program (MIERED,SCAFN)

These routines provide the outer shell of the program. They call the input and output routines and translate between different quantities from the subroutines. They also produce the test output of the results on the screen.

6.2 Computational routines (MIEMUE, SPX)

MIEMUE is the basic routine computing the efficiencies. In a first step, the logarithimc derivatives D_{n} are computed by downward recurrence. The next step computes the Bessel functions ψ and χ and the scattering coefficients a_{n} and b_{n} in upward recurrence and adds them up as required for the scattering amplitude, the scattering efficiency and the asymmetry parameter. The third step is the translation into the final efficiencies and the asymmetry parameter, respectively. SPX computes the size parameter.

6.3 User interface routines (PHYSPAR, NAMEREAD)

These small routines handle the user interaction for the input of the physical parameters and the file names. PHYSPAR asks for the refractive index (n) and relative permeability of the surrounding medium (μ) and the particle radius (a) in cm. NAMEREAD asks for the name of the output files, removes a possible extension and adds the extensions “lqa”, “lsc”, and “lg”.

6.4 File operations (READMUFILE, NAMECHEC, NAMEPERM, QA-WRITE)

READMUFILE aks the user for the name of the file of the optical constants, calls NAMECHEC to determine the type of the file, and tries to read it. In case of success, the user is asked wheter there exists a permeability file and if so, NAMEPERM is called to produce a file name with the same name as that of the optical constants but the extension “lmu” or “zmu”. This file is read to obtain the permeability data. Finally the consistency of both files is checked. QAWRITE simply produces one specified output file with two columns.

6.5 Used data structures and the data exchange between different parts

The optical constants, relative permeabilities and resulting efficiencies are stored in separated fields. They are passed as parameters between the different routines. A COMMON block PHYS contains only the parameters n, μ, a and is accessed by SCAFN, PHYSPAR and SPX. The fields of results is written to the disk in one call so that no result files are produced when the program is stopped before all wavelength points are treated.

7 Source files

The following files contain the sources for the different routines:

miered.for: MIERED, SCAFN, MIEMUE, SPX

inpred.for: PHYSPAR, NAMEREAD, READMUFILE, NAMECHEC, NAMEPERM, QAWRITE

The routines READMUFILE, NAMECHEC, and NAMEPERM are identical to the routines with the same names in NEMC.

8 References

Bohren C.F., Huffman D.R., 1983, Absorption and Scattering of Light by Small Particles, Wiley, New York

Ossenkopf V. 1990, Diploma thesis, Friedrich-Schiller-Universität Jena

Ossenkopf V. 1991, A&A 251, 210 Erratum