Module depolarization_gf
- class cemd_metasurf.depolarization_gf.depolarization_gf.DGreenFunction[source]
- calc_gb_kxky(my_bloch=None, append_k_gb=True)[source]
Calculates the depolarization Green functions (gb) for the lattice at the given Bloch wavevectors.
If my_bloch is not provided, gb would be calculated by using the wavevector configuration of the lattice and the clean function will be called.
- Parameters:
my_bloch (classes.BlochWavevector) – The object with the information of the wavevectos at which gb is calculated.
append_k_gb (Bool) – Set if the values are stored in the self.array_k_gb.
Sub-functions
The file depolarization_functions.py contain all the functions needed to calculate the depolariztion function and for the class DGreenFunction.
- List of functions:
calc_gb_1puc (depolarization Green function for one partilce per unit cell)
calc_gb_1d_kx (depolarization Green function for one dimensional arrays, like an array of cylinders)
calc_gb_ch (depolarization Green function for a chain of particles)
polylog_2, polylog_3, clausen2 (implementation of polylog functions at the unit circle)
- cemd_metasurf.depolarization_gf.depolarization_functions.calc_gb_1puc(my_metasurface, n_sum=100)[source]
Function that calculates the Green function for an 2D array with one particle per unit cell.
The parameters “n_sum” and “n_l” (defined in the code) are the number of elements taken in the sum. For bigger “n_sum” the convergence is better, but be careful with “n_l”. With “n_l = 4” is enough to get a good convergence, but for bigger “n_l” is necessary to take bigger “n_sum” to get convergence. See PRB 2020, D. R. Abuejetas et. al., 102, 125411 for more information about the convergence and the menaing of “n_l”.
For better performance at the calculation of the depolarization Green function, try to place “kx” and “ky” inside the first Brillouin zone. I need to implement a function for doing that.
- Parameters:
my_metasurface (classes.Metasurface) – Vacuum wavevector.
n_sum (int) – Number of elements taken in the sum.
- Returns:
6x6 deplarization matrix for 2 dimensional arrays, gb_2d.
- cemd_metasurf.depolarization_gf.depolarization_functions.calc_gb_1d_kx(n_sum, b, k, ky, kx)[source]
Function for calculating the depolarization Green function for an array of 1D cylinders or particles with translational symmetry along the “x” axis where the projection of the wavevector is along the “x” axis. Therefore, the cylinder axis is along the “x” axis and they are periodically spaced along the “y” axis.
Also, the sums have been rewriten to performe a convergence better than “1/m^3”.
- Parameters:
n_sum (int) – Number of elements taken in the sum.
b (float) – Lattice constant along the y-axis.
k (float) – Wavevector in the medium.
ky (float) – Bloch wavevector (Floquet periodicity) along the y-axis.
kx (float) – Periodicity along the trnslational symmetry x-axis.
- Returns:
6x6 deplarization matrix for 1 dimensional arrays, gb_1d.
- cemd_metasurf.depolarization_gf.depolarization_functions.calc_gb_ch(d, k, kp)[source]
Function for calculating the depolarization Green function of a chain of particles align along the “x” axis oriented for the calculation of “Gb” of an two dimensional array.
- Parameters:
d (float) – Lattice constant along the x-axis.
k (float) – Wavevector in the medium.
kp (float) – Projection of the wavevector over the axis of the chain.
- Returns:
6x6 deplarization matrix for a chain of particles, gb_ch.
- cemd_metasurf.depolarization_gf.depolarization_functions.polylog_2(z)[source]
Evaluation of the polylogarithm functions of order 2 at the unit circle.
- Parameters:
z (numpy.complex) – Argument. Complex number of modulo 1 (np.abs(z) = 1).
- Returns:
Polylogarithm functions of order 2 at z.
- cemd_metasurf.depolarization_gf.depolarization_functions.polylog_3(z, n_sum=50)[source]
Evaluation of the polylogarithm functions of order 3 at the unit circle.
- Parameters:
z (numpy.complex) – Argument. Complex number of modulo 1 (np.abs(z) = 1).
- Returns:
Polylogarithm functions of order 3 at z.
- cemd_metasurf.depolarization_gf.depolarization_functions.clausen2(x)[source]
Evaluation of Clausen function of order 2 needed for the evaluation of “polylog_2”.
- Parameters:
x – The input value.
- Returns:
The value of the Clausen function of order 2.
\(\mathrm{Cl}_2(x) = - \int_0^x \log \Big[ 2\sin t/2 \Big]\mathrm{d}t\).
Original code in Julia by Alexander Voigt with MIT License. Python implementation by Diego Romero Abujetas.