The open-source MATLAB package MDS is a numerical projection program for multipole decomposition. Lebedev and Gaussian quadrature method are introduced to calculate the surface and volume integrals in the numerical projection procedure, respectively. The program is capable of computing high-order electromagnetic multipoles up to 8th order.
Two approaches for numerical projection are included, each suitable for different situations. The first type is surface integration based on the scattered field outside the scatterer, which is used for the multipole analysis of single scatterer. The second type is volume integration based on the induced current density inside the scatterer, which is applicable to the building blocks in periodic structures such as metasurfaces and photonic crystals.
If you find the numerical package useful for your research, please consider citing the following paper:
The functions for surface/volume integration method are provided in ./MDS
. Codes for Mie theory calculation are also included for reference.
generate_sphere_pt.m
: Generate Lebedev quadrature weights and points that are given in both Cartesian and spherical coordinates.
quad_point52tetra.m
: Get the Gaussian quadrature points and corresponding weights inside the scatterer.
field_build.m
: Read the scattered field/induced current density at each quadrature point computed by COMSOL.field_from_cart2sph.m
: Convert the field data in the Cartesian coordinate to spherical coordinate.pm6_NeMo.m
: Calculate electric and magnetic multipole coefficientsaml
andbml
. The expressions of vector spherical harmonics up to 8th order are included in this function.coff.m
: Summation for quadrature.
mie_scatter.m
: Compute the multipole coefficients for spherical scatterers using Mie theory.mie_cross_section.m
: Compute the normalized scattering cross-section based on multipole coefficients.
Examples of the surface/volume integration method are in ./examples
. You can follow the following steps to run the benchmark:
- Run the COMSOL file
silicon_sphere.mph
and store each step of the parameter sweep in./step
- Run the script
main_surface.m
/main_volume.m
. - Run the script
main_mie.m
. - Run the script
numerical_and_mie_plot.m
to visualize the results.