Module polarizability
The file mie_functions.py contain all the functions needed to calculate the (dipolar) polarizability of Mie spherical particles.
- List of functions:
sph_jn, sph_yn, sph_djn, sph_dyn, (Spherical Bessel functions of integer order)
psi, diff_psi, xi, diff_xi (Auxiliary functions)
Mie_an, Mie_bn (Mie coefficients)
get_alpha (dipolar polarizability)
- cemd_metasurf.polarizability.mie_functions.sph_jn(n, x)[source]
Spherical Bessel function of the first kind.
- Parameters:
n (int) – Order
x (float) – Argument
- Returns:
Spherical Bessel function of the first kind.
- cemd_metasurf.polarizability.mie_functions.sph_yn(n, x)[source]
Spherical Bessel function of the second kind.
- Parameters:
n (int) – Order
x (float) – Argument
- Returns:
Spherical Bessel function of the second kind.
- cemd_metasurf.polarizability.mie_functions.sph_djn(n, x)[source]
Derivative of the spherical Bessel function of the first kind.
- Parameters:
n (int) – Order.
x (float) – Argument.
- Returns:
Derivative of the spherical Bessel function of the first kind.
- cemd_metasurf.polarizability.mie_functions.sph_dyn(n, x)[source]
Derivative of the spherical Bessel function of the second kind.
- Parameters:
n (int) – Order.
x (float) – Argument.
- Returns:
Derivative of the spherical Bessel function of the second kind.
- cemd_metasurf.polarizability.mie_functions.psi(n, x)[source]
Auxiliary function for Mie coeficients.
- Parameters:
n (int) – Order.
x (float) – Argument.
- Returns:
Auxiliary function.
- cemd_metasurf.polarizability.mie_functions.diff_psi(n, x)[source]
Auxiliary function for Mie coeficients.
- Parameters:
n (int) – Order.
x (float) – Argument.
- Returns:
Auxiliary function.
- cemd_metasurf.polarizability.mie_functions.xi(n, x)[source]
Auxiliary function for Mie coeficients.
- Parameters:
n (int) – Order.
x (float) – Argument.
- Returns:
Auxiliary function.
- cemd_metasurf.polarizability.mie_functions.diff_xi(n, x)[source]
Auxiliary function for Mie coeficients.
- Parameters:
n (int) – Order.
x (float) – Argument.
- Returns:
Auxiliary function.
- cemd_metasurf.polarizability.mie_functions.mie_n(k0, r_p, m_p, m_bg, order)[source]
Calculation of Mie coeficients.
- Parameters:
k0 (float) – Vacuum wavevector.
r_p (float) – Particle radius.
m_p (float) – Particle refractive index.
m_bg (float) – Background refractive index.
n (int) – Order.
- Returns:
The first element is the electric Mie coefficient, an.
The second element is the magnetic Mie coefficient, bn.
- cemd_metasurf.polarizability.mie_functions.get_alpha_mie(k0, r_p, m_p, m_bg)[source]
Calculation of the dipolar polarizability using the Mie coeficients.
- Parameters:
k0 (float) – Vacuum wavevector.
r_p (float) – Particle radius.
m_p (float) – Particle refractive index.
m_bg (float) – Background refractive index.
- Returns:
6x6 polarizability matrix alp.