Sources to approximate a dipole in a uLED #114
-
Hello developers and researchers, thank you for the code and the great paper published. I am currently in the midst of my master's and my professors and I are looking to employ fmmax for inverse designs of uLED and compare the results to FDTD simulations. When running the code uLED in the examples given, it seems that the selection of FWHM for the gaussian do play a role in the convergence and they affect the extraction efficiency that I obtain when its varied. How should I go ahead in its selection then in relation to the wavelength that I wish to simulate? Is the FWHM tied to the diffraction limit? I have also noticed that you have provided another source in the source file which is the dirac delta function. Why did you choose a gaussian to approximate a dipole here instead of the dirac delta function and is there a case where they are both identical? I thank you in advance and look forward to your reply :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @chuanhong98, I have also noticed the effect of dipole fwhm on convergence, but didn't go into depth in the paper. Ideally, you would use a zero-fwhm Gaussian (or equivalently, the dirac delta dipole) as the source. In principle, this has the closest correspondence to the actual physics. However, in the truncated Fourier basis, representing a profile with such rapid spatial variation is not really possible, and so the actual modeled dipole would have finite width and ringing, i.e. additional content spatially separated from the dipole location. This can be verified by creating a dipole profile and With a Gaussian having finite width, you will obviously still be modeling an extended source, but you can avoid the ringing seen in the delta dipole case. I have seen that this leads to better convergence, and gives results that correspond better to a high-fidelity simulation that includes a narrow dipole and a large number of Fourier terms. Here is a code snippet that can help explore this effect, and an example figure. import jax.numpy as jnp
import matplotlib.pyplot as plt
from fmmax import basis, fft, sources
for approximate_num_terms, fwhm in [(1000, 0.01), (1000, 0.025)]:
primitive_lattice_vectors=basis.LatticeVectors(u=basis.X, v=basis.Y)
expansion = basis.generate_expansion(
primitive_lattice_vectors=primitive_lattice_vectors,
approximate_num_terms=approximate_num_terms,
truncation=basis.Truncation.CIRCULAR,
)
# Place a diploe at x=0, y=0.5
profile = sources.gaussian_source(
fwhm=fwhm,
location=jnp.asarray([[0.0, 0.5]]),
in_plane_wavevector=jnp.zeros((2,)),
primitive_lattice_vectors=primitive_lattice_vectors,
expansion=expansion,
)
profile_ifft = fft.ifft(profile, expansion, (1000, 1000), axis=-2)
profile_ifft /= jnp.amax(jnp.abs(profile_ifft))
# Plot a cross section at x=0
plt.semilogy(
jnp.linspace(0, 1, profile_ifft.shape[1]),
jnp.abs(profile_ifft)[0, :, 0],
label=f"N={approximate_num_terms}, fwhm={fwhm:.3f}"
)
plt.legend()
plt.xlabel("y") To ultimately settle on an fwhm value, it is probably best to perform a convergence study, and then simply pick the value that is sufficiently converged for your purposes. I am not sure there is a much more rigorous solution here. One final point to emphasize is that the simulation settings used during the optimization itself need not be the same as those used for convergence check. In fact, it is probably best to use settings that result in better convergence, to avoid the overfitting effect we showed in the paper. |
Beta Was this translation helpful? Give feedback.
Hi @chuanhong98, I have also noticed the effect of dipole fwhm on convergence, but didn't go into depth in the paper.
Ideally, you would use a zero-fwhm Gaussian (or equivalently, the dirac delta dipole) as the source. In principle, this has the closest correspondence to the actual physics. However, in the truncated Fourier basis, representing a profile with such rapid spatial variation is not really possible, and so the actual modeled dipole would have finite width and ringing, i.e. additional content spatially separated from the dipole location. This can be verified by creating a dipole profile and
With a Gaussian having finite width, you will obviously still be modeling an extended sou…