Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Mie Scattering Repository

Welcome to our repository. We refer to Mie Scattering Theory as all solutions for wave scattering by a dielectric nonhomogeneous media, where Maxwell’s electromagnetic equations are solved with all the spatial components separately. This terminology is named after Gustav Mie, who developed a solution for plane wave scattering by a homogeneous dielectric sphere. Since this solution, other generalizations have been solved, such as plane wave scattering by a multi-layer dielectric sphere, where three consecutive layers don’t have the same dielectric properties.

Here, we use the Mie Scattering theory to describe the light scattering by colloidal spheres, whose size is in the order of mesoscopic size (from a few nanometers to microns), immersed in a solvent. The particle’s light-scattering behavior is relevant to the study of new photonics and optics materials, where it is relevant to know the scattering cross-section, extinction, and backscattering efficiency, and the light scattering intensity as a function of scattering angle. We use light scattering techniques such as static light scattering, which measures the mean light scattering intensity by colloidal suspensions as a function of scattering angle. Other methods like UV-Vis spectrometry measure the light extinction by material slab as a function of wavelength. In all these cases, the Mie Scattering theory could be used to fit the size and dielectric parameters of the particles with experimental data and, before this, used to engineer particles with unique scattering properties. Recently, we published a paper that showed how to use the Mie Scattering theory for nonhomogeneous colloidal spheres.1

Whatever the application, here you have two Mie Scattering programs to calculate the light scattering properties for homogenous and radial nonhomogeneous spheres. The first one uses the well-known Bohren and Huffman’s algorithm for homogeneous spheres,2 and the second one uses Yang’s algorithm for multi-layer spheres.3

How to use this repository?

In this repository, you can find our Mie Scattering program source code written in Fortran 2008 and the executables only for Linux. If you have Windows, we recommend that you install the Windows Subsystem for Linux by following the steps on this webpage: https://learn.microsoft.com/en-us/windows/wsl/install. If you still prefer to work on Windows, you must modify the source code to compile on Windows; for example, the file path on Linux uses /, so you must change all file paths on the source code.

  • The executable for the Mie Scattering program for a single homogeneous sphere and a multilayer nonhomogeneous sphere is in the repository’s MieScatt folder.
  • The executable for our least-squares minimization for a single homogeneous sphere and a nonhomogeneous sphere with a Gaussian decay refractive index profile reported in our paper1 is in the repository’s Least_squares_routines folder.

MieScatt folder

MieScatt folder contains the executable MieScatt.exe, parameters.nml file, and source and test folders. In the test folder, you can find two examples for a single homogeneous sphere and for a multilayer nonhomogeneous sphere. In the source folder you can find all the source code for Mie Scattering program.

Execute Mie Scattering Program

To execute our Mie Scattering program follow the next steps:

  1. Download MieScatt.exe and parameters.nml files and save them in the folder that you choose to execute the program, where also output files will be saved.
  2. Open a Linux terminal and navigate to the folder where the executable and parameters files are.
  3. Open the parameters.nml file and fill in the required fields. The structure of the parameters.nml file doesn’t need to be changed. The comments in this file start with the exclamation mark “!”. All the comments describe the field and the input format, which could be a real, an integer or a complex number. Also, we use logical values as a flag.
    • For a homogeneous sphere, you can see here an example of the parameters file. Note that HomoSphe is a logical parameter and must be .TRUE. if you want to calculate the scattering properties for a homogeneous sphere.
    • For a nonhomogeneous sphere, you can see here an example of the parameters file. Note that HomoSphe must be .FALSE. if you want to calculate the scattering properties for a nonhomogeneous sphere. You also must have a file named RIprofile.dat with two columns: the first for the radius and the second for the refractive index value for each layer in the sphere. Here you can see an example the RIprofile table in .dat file.
  4. Save the parameters.nml changes and run MieScatt program in the Linux terminal as ./MieScatt.exe
  5. The output files are log.out, where you can find a resume of the inputs parameters and extinction, scattering, absortion and backscattering efficiencies results, and Ang_FormFactor.dat and Ang_S1S1_S2S2.dat files, that are tables for the scattering form factor and scattering amplitudes as a function of scattering angle, respectively. For more information about this last two tables, please read ref. 11

Compile Mie Scattering program

If you need to make changes to Mie Scattering's main program, MieScatt.F08, or you use our modules, you need to compile a new executable file. All our source code is written in Fortran 2008, and we use GFortran as a compiler. Before this, you must have already installed gfortran-8 for your Linux distro. Compile the program as follow:

gfortran-8 -o MieScatt.exe MieScatt.F08 MieScattMod.F08 inputdata.F08

Footnotes

  1. Balderas-Cabrera, C., & Castillo, R. (2024). Mie scattering theory applied to light scattering of large nonhomogeneous colloidal spheres. The Journal of Chemical Physics, 161(8). https://doi.org/10.1063/5.0216489 2 3

  2. Bohren, C. F., & Huffman, D. R. (1998). Absorption and Scattering of Light by Small Particles (C. F. Bohren & D. R. Huffman, Eds.). Wiley. https://doi.org/10.1002/9783527618156

  3. Yang, W. (2003). Improved recursive algorithm for light scattering by a multilayered sphere. Applied Optics, 42(9), 1710. https://doi.org/10.1364/AO.42.001710

About

Mie Scattering theory - codes to calculate the radiative properties of spheres

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages