Infinite Cylinder Optics Tool Readme

Daniel Brandl



ICOTool is a C# implementation of Mie theory for infinite cylinders. The physical solution is taken from Absorption and Scattering of Light by Small Particles by Bohren and Huffman. This program uses ALGLIB by Sergey Bochkanov and Vladimir Bystritsky, found online at www.alglib.net, and ZedGraph found at www.zedgraph.org.

QUICK GUIDE:

All distance and wavelength parameters need to be in nanometers

Material data from files needs to be specified as [wavelength in nm] [real RI] [imaginary RI (optional)]. Only the real part of the medium refractive index will be used if it is loaded from a file.



Polarization I is light with E parallel to the xz plane, and II has E along the y direction. Incident angle is theta in spherical coordinates. Be wary of integer values (0, 1*pi, 2*pi, etc) inputs for the incident angle as it may cause divide by zero errors in the Mie theory calculation.

Before the run, you will be asked to specify a file to write the data into, which will be overwritten if it already exists. It is not overwritten if added as a batch run until the simulation is actually run.

Program Guide:



The left area of the program contains tabs to view optical data from a text input file, imported material data for the cylinder or medium, a graph of imported optical data, and a batch-run manager to run simulations in sequence. The right area contains controls for setting up and running a Mie simulation and loading and graphing data from such a run.


Simulation Parameters Panel:



Cylinder/Medium Refractive Index:

The material of the cylinder and medium can either be fixed or read from a material file. The fixed cylinder refractive index is a complex number given in the form ([real], [imaginary]). For a real refractive index, you can leave the imaginary part blank or enter zero. The medium refractive index is only real. A material file is a plain text file with lines having the format,

[nm] [real refractive index] [imag refractive index (optional for cylinder, ignored for medium)]

The data is interpolated using an Akima spline fit if there are at least 5 points and a parabolically terminated cubic spline if there are 2-4. The ordering of the data does not matter. Also, the program ignores all other lines, so any headers, for instance, may be placed in the material file. Note that if there is more data on a line, the program will not give an error but will use the first 3 entries as described above. In particular, the output data files generated by this program will not cause an error if they are loaded as a material file, although the resulting data from such a run will likely be of dubious physical relevance.

Incident Angle:

The incident angle is the angle of the incoming light as measured from the z-axis. It is equivalent to theta in spherical coordinates. So, an incident angle of 0 is k-vector parallel to the cylinder, and 0.5 * pi radians is 90 degree (normal) incidence. Be wary of using integer inputs (0, 1*pi, 2*pi, etc) as the incident angle as it may cause divide by zero errors in the Mie theory calculation.

Fixed Incident Wavelength/Cylinder Diameter:

The domain of the run will be either wavelength or diameter; the other remains fixed. The value of the other parameter will be read from here. All distance and wavelength parameters need to be in nanometers.

Nmax: The calculation of the scattering and extinction efficiencies contains an infinite series of Mie coefficients. This parameter sets the cutoff for this series; higher nmax = better convergence. Alternatively, you can set the nmax to autocalculate based on the equation nmax=x*4x^(0.3333)+2 where x=k*radius. This equation is taken from the Bohren and Huffman Fortran code.

Mmax: The calculation of complex valued Bessel functions is done using the addition theorem, which has an infinite series. This sets the cutoff for this series; higher mmax = better convergence. It is ignored in calculations where the cylinder has a real refractive index.

Bottom Panel



Domain Settings:

This panel contains the minimum value, maximum value, and step length of the domain in nanometers. The radio button to the right specifies whether the domain will be wavelength or diameter.

Graph Data After Run: If checked, after running a simulation using the run button below, the resulting data text file is automatically loaded and graphed.

Run: Performs a Mie theory simulation with the present variables for the simulation. You will be asked to specify a file to write the data into, which will be overwritten if it already exists. The output data file has a header that contains all of the parameters for that run. The output data format is,

[nm] [QscatI] [QextI] [QscatII] [QextII]

where I and II specify the polarization of the incident light (parallel and perpendicular to xz plane, respectively) and [nm] is either wavelength or diameter depending what was specified.

Load Data: Loads a data file from one of the runs and enables graphing. You will see the currently loaded data file displayed to the left in the Optical Data tab if it loads successfully.

Graph Data: Graphs the loaded data in the Graph tab. Use the checkboxes to view the extinction, scattering, or absorption curves for the "I" (E field parallel to xz plane) or "II" (E field perpendicular to xz plane) incident polarizations, or unpolarized incident light. The x-title of the graph is determined by a line in the input data file, "Domain Data: [Diameter or Wavelength]". This line is written into the header when the data is obtained through this program, but it should be added into a data file that is generated by an external program to add a domain title to the graph.

Batch Runs:



The batch run panel on the left side of the program allows you to run multiple simulations in sequence. Pressing Add to Batch will add a simulation to the batch list using the current parameters for the simulation. Once added, you may remove simulations, run selected simulations from the batch, or run all in the list using the respective buttons at the bottom of the tab page. Some notes: (1) the data will not Graph After Running even if you have that option checked. (2) The batch runs are named by the output filename you specify for the data (3) The output data file is not created until the batch is run, and any existing data file is not overwritten until the simulation is actually run. (4) You are allowed to add multiple runs with the same filename, but earlier runs will be overwritten by later runs of the same name.