morphogen.homogenization.photonic¶
Electromagnetic Bloch waves of three-dimensional photonic crystals, by plane waves.
In a periodic medium of permittivity ε(x) and permeability μ(x), a harmonic field
without sources obeys curl(ε⁻¹ curl H) = ω² B with B = μ H and div B = 0. At
the wave vector k the induction of a Bloch wave is a sum of plane waves over the
reciprocal vectors G of the cell,
B(x) = Σ_G (b¹_G e¹_G + b²_G e²_G) exp(i (k + G)·x),
with two amplitudes per plane wave on the unit vectors e¹, e² normal to q = k + G
((e¹, e², q/|q|) direct): the fields are divergence-free by construction, and the
gradients, which the curl ignores and which clutter the spectrum of the nodal
discretizations with zero frequencies, are left out (Ho, Chan & Soukoulis 1990; Johnson &
Joannopoulos 2001). The frequencies are those of the Hermitian problem
Pᴴ μ⁻¹ C ε⁻¹ C μ⁻¹ P b = ω² Pᴴ μ⁻¹ P b, C = i q ×,
P the map of the amplitudes to the plane waves. The curls are taken on the plane
waves and the products by ε⁻¹ and μ⁻¹ on the grid of the cell, a pair of fast
Fourier transforms apart, so that the matrices are never formed: the lowest frequencies
are found by a block Davidson method (the Rayleigh-Ritz values of a subspace that the
preconditioned residuals of its lowest waves extend, restarted from them and from those
of the step before), from the waves of the previous wave vector; small cells are
diagonalized. The preconditioner is the operator of the inverse medium, Pᴴ μ C⁻¹ ε C⁻¹
μ P with C⁻¹ = i q × / |q|² on the transverse waves (Johnson & Joannopoulos 2001):
the inverse of the operator but for the projections, whatever the contrast of the
phases. A uniform permeability leaves the standard problem Pᴴ C ε⁻¹ C P h = ω² μ h of
the dielectric crystals. The Galerkin projection on the transverse waves is exact: the
residual of an eigenvector is transverse and orthogonal to the transverse waves in the
product of μ⁻¹.
The grid of the plane waves is that of the voxels, or one coarsen times coarser
whose cells hold several voxels. A cell that an interface cuts then takes the tensor of
Meade et al. (1993), as averaged by Johnson & Joannopoulos (2001),
ε̃⁻¹ = <ε⁻¹> n ⊗ n + <ε>⁻¹ (1 - n ⊗ n),
the harmonic mean for the field normal to the interface and the arithmetic mean along
it (the effective tensor of the layers that the interface draws in the cell), n the
sum of the gradients of the permittivity over the voxels of the cell. The stairs of the
voxels cost the frequencies an error of first order in the size of the cells; this
average brings it back to the second order: voxelize three or four times finer than
the plane waves.
With relative permittivities and permeabilities the frequencies are in units of the
speed of light over the unit of length (ω a / 2π c: normalized()). A cell one voxel thick is a crystal invariant along
that axis: its waves in the plane are the two polarizations "tm" and "te" of
scalar_band_structure() together, and those that
leave the plane (a wave vector with a component along the axis) are found here only.
- morphogen.homogenization.photonic.DENSE_LIMIT = 1800¶
Up to this number of unknowns (two per plane wave) the matrices are formed and diagonalized
- morphogen.homogenization.photonic.BLOCK_VALUES = 6000000¶
The amplitudes of a block handled at once (bounds the memory of the transforms)
- morphogen.homogenization.photonic.SUBSPACE = 5¶
The subspace of the Davidson method, in blocks of the waves sought, before a restart
- morphogen.homogenization.photonic.smoothed_inverse(field: ndarray, coarsen: int = 1) ndarray[source]¶
The inverse of an isotropic coefficient of the voxels (
field: the permittivity) on a gridcoarsentimes coarser along each axis (the axes of one voxel are kept):1 / fieldon the voxels themselves, else the tensor<1/ε> n ⊗ n + (1 - n ⊗ n) / <ε>of each cell ((3, 3) + shape; see the module). The normalnis the sum of the gradients of the field over the voxels of the cell (central differences: the normal of a plane that cuts the cell, whatever its stairs), or, where they cancel (a layer thinner than the cell, with its two faces), their principal direction; the cells that hold one value keep it.
- class morphogen.homogenization.photonic.PlaneWaves(inverse_permittivity, size, inverse_permeability=1.0)[source]¶
Bases:
objectThe plane waves of a periodic cell of edges
sizeon the grid of the inverse coefficientsinverse_permittivityandinverse_permeability(arrays of the shape of the grid, or(3, 3) + shape; the permeability a number when uniform), and the Maxwell operators at a wave vector (at()).- scale¶
the square of the first reciprocal vector
- Type:
the unit of the eigenvalues
- property unknowns: int¶
- at(wavevector) PlaneWaves[source]¶
Set the wave vector: the vectors
q = k + G, their norms and their transverse unit vectorse1ande2.
- stiffness(x: ndarray) ndarray[source]¶
Pᴴ μ⁻¹ C ε⁻¹ C μ⁻¹ Ptimes the amplitudesx(unknowns, or unknowns x p), in units of the square of the first reciprocal vector.
- mass(x: ndarray) ndarray[source]¶
Pᴴ μ⁻¹ Ptimes the amplitudes (the identity for a uniform permeability, which the stiffness then carries).
- morphogen.homogenization.photonic.electromagnetic_band_structure(sample, permittivity: dict, path=('G', 'X', 'M', 'G', 'R'), *, permeability=1.0, bands: int = 8, points: int = 12, coarsen: int = 1, tol: float = 0.0001)[source]¶
The lowest
bandsfrequencies of the electromagnetic Bloch waves of a periodic cell (aVoxelImageof phases) alongpath(corners of the Brillouin zone,pointsper segment; or an array of wave vectors), by plane waves (see the module):permittivity, that of each phase (a number, three principal values or a 3 x 3 tensor in the axes of the cell), andpermeability(a number for the whole cell, or those of the phases likewise).coarsen: the plane waves on a grid that many times coarser than the voxels, whose cells cut by the interfaces take the averaged tensor of Meade et al. (isotropic phases).tol: the residual of the bands, in units of the square of the first reciprocal vector (the squares of the frequencies are then within about its square). Returns aBandStructure; at the centre of the zone the first two frequencies are zero (the uniform fields).