NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.2k stars 612 forks source link

"1d" Green's functions for near2far #2866

Open stevengj opened 1 month ago

stevengj commented 1 month ago

For a "1d" system described by a 2d (or 3d) simulation with Bloch-periodic boundary conditions in the x (or xy) directions, the Green's function is simply a planewave. It would be nice to support this directly in the near2far feature.

(We support a finite periodicity by a lattice sum, but in the limit of zero periodicity this is absurdly inefficient … the lattice sum effectively goes to a quadrature rule. We should just use the planewave formula.)

This is potentially useful for things like computing the Green's function (dipole emission pattern) for a multilayer film, which corresponds to simply integrating this "1d" near2far field over kx and ky (inside the light code). Of course, there are many specialized methods to compute multilayer Green's functions that will be vastly more efficient than Meep for this purpose (for free/open-source code, see e.g. https://github.com/modelics/strata and https://github.com/odmiller/MultilayerEM), but it shouldn't be too expensive in Meep.

stevengj commented 1 month ago

The first step is to write out all of the Green's functions in "1d".

For example, consider an electric current sheet $\vec{J} = \delta(z) \hat{x} e^{i(k_x x + k_y y) - i \omega t}$. This produces two planewaves, one for $z > 0$ propagating in the $+z$ direction, and one in $z < 0$ propagating in $-z$. These planewaves are proportional to $\sim \exp(i(k_x x + k_y y \pm k_z z))$ where $k_z = \sqrt{(\omega/c)^2 \varepsilon \mu - k_x^2 - k_y^2}$. (For $k_y=0$, by symmetry it must be "p" polarized with electric field in the $xz$ plane, but for $k_y \ne 0$ it's more messy.) One then just matches boundary conditions (there is a jump in the tangential H field across an electric current sheet) to work out the amplitudes of these two planewave and hence the field everywhere in space.

Similarly for an electric current polarized in the y direction, and similarly (swapping E and H) for magnetic currents.

Probably someone has written this all out somewhere if you can find it, but it is also not too hard to re-derive.

oskooi commented 1 month ago

The equation for planewave propagation through a 1D multilayer stack using the transfer-matrix method is derived in Section 4.1 "Complex amplitudes for reflection and transmission" of the notes "Multilayer optical calculations" by Steven J. Byrnes in arXiv:1603.02720:

image

image

stevengj commented 1 month ago

That's not what we're talking about. We're talking about (a) a homogeneous medium and (b) off-axis propagation.

For on-axis propagation, this is just the $e^{i\delta_n}$ term in the expressions you quoted (which are on-axis). We don't have multiple layers in near2far.

stevengj commented 1 month ago

There should be papers somewhere on the 4x4 off-axis transfer matrices that work all this out (e.g. I know Yariv did it in the cylindrical case, and the off-axis planar case might be in his book someplace). You still have to relate it to the current sources, but that's not too hard. (The whole thing is not too hard in principle, just tedious.)

stevengj commented 9 hours ago

(Once you get the $k_y=0$ solution, you can just rotate them around the $z$ axis to get the other directions.)

stevengj commented 9 hours ago

The underlying principle here is Brillouin zone integration, also called the "array scanning method" because you can think of it as a phased-array antenna that you integrate over the phases. On review article is Capolino et al. (2007). If you put in a "dipole" with Bloch-periodic boundary conditions (really a phased array of dipoles) and you integrate k over the Brillouin zone, you get the response of an isolated dipole.

In the case of continuous translational symmetry (zero period), the Brillouin zone is infinite, so you are just integrating over all k. That's the case for multilayer films.