diff --git a/README.md b/README.md index 4c60a33ec..a3a26f16d 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ We kindly request that you cite the following paper in any published work for which you used Meep: -- A. Oskooi, D. Roundy, M. Ibanescu, P. Bermel, J.D. Joannopoulos, and S.G. Johnson, [MEEP: A flexible free-software package for electromagnetic simulations by the FDTD method](http://dx.doi.org/doi:10.1016/j.cpc.2009.11.008), Computer Physics Communications, Vol. 181, pp. 687-702, 2010 ([pdf](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf)). +- A. Oskooi, D. Roundy, M. Ibanescu, P. Bermel, J.D. Joannopoulos, and S.G. Johnson, [MEEP: A flexible free-software package for electromagnetic simulations by the FDTD method](http://dx.doi.org/doi:10.1016/j.cpc.2009.11.008), Computer Physics Communications, Vol. 181, pp. 687-702 (2010) ([pdf](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf)). ## Documentation diff --git a/doc/docs/Acknowledgements.md b/doc/docs/Acknowledgements.md index b784b73a3..cc04a1189 100644 --- a/doc/docs/Acknowledgements.md +++ b/doc/docs/Acknowledgements.md @@ -12,7 +12,7 @@ Referencing We request that you cite the following technical reference in any work for which you used Meep: -- A. Oskooi, D. Roundy, M. Ibanescu, P. Bermel, J.D. Joannopoulos, and S.G. Johnson, [MEEP: A flexible free-software package for electromagnetic simulations by the FDTD method](http://dx.doi.org/doi:10.1016/j.cpc.2009.11.008), Computer Physics Communications, Vol. 181, pp. 687-702, 2010 ([pdf](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf)). +- A. Oskooi, D. Roundy, M. Ibanescu, P. Bermel, J.D. Joannopoulos, and S.G. Johnson, [MEEP: A flexible free-software package for electromagnetic simulations by the FDTD method](http://dx.doi.org/doi:10.1016/j.cpc.2009.11.008), Computer Physics Communications, Vol. 181, pp. 687-702 (2010) ([pdf](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf)). If you want a one-sentence description of the algorithm for inclusion in a publication, we recommend something like: diff --git a/doc/docs/FAQ.md b/doc/docs/FAQ.md index 46377a6b2..884a49f82 100644 --- a/doc/docs/FAQ.md +++ b/doc/docs/FAQ.md @@ -27,7 +27,7 @@ There is a public [mailing list](http://ab-initio.mit.edu/cgi-bin/mailman/listin ### Is there a technical reference for Meep? -Yes. The technical details of Meep's inner workings are described in the peer-reviewed publication [MEEP: A flexible free-software package for electromagnetic simulations by the FDTD method](http://dx.doi.org/doi:10.1016/j.cpc.2009.11.008), Computer Physics Communications, Vol. 181, pp. 687-702, 2010 ([pdf](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf)). Additional information is provided in the book [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707) in Chapters 4 ("Electromagnetic Wave Source Conditions"), 5 ("Rigorous PML Validation and a Corrected Unsplit PML for Anisotropic Dispersive Media"), 6 ("Accurate FDTD Simulation of Discontinuous Materials by Subpixel Smoothing"), and 20 ("MEEP: A Flexible Free FDTD Software Package"). A [video presentation](https://www.youtube.com/watch?v=9CA949csYvM) and [slides](http://ab-initio.mit.edu/~ardavan/stuff/IEEE_Photonics_Society_SCV3.pdf) as well as a [podcast](http://www.rce-cast.com/Podcast/rce-118-meep.html) are also available. +Yes. The technical details of Meep's inner workings are described in the peer-reviewed publication [MEEP: A flexible free-software package for electromagnetic simulations by the FDTD method](http://dx.doi.org/doi:10.1016/j.cpc.2009.11.008), Computer Physics Communications, Vol. 181, pp. 687-702 (2010) ([pdf](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf)). Additional information is provided in the book [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707) in Chapters 4 ("Electromagnetic Wave Source Conditions"), 5 ("Rigorous PML Validation and a Corrected Unsplit PML for Anisotropic Dispersive Media"), 6 ("Accurate FDTD Simulation of Discontinuous Materials by Subpixel Smoothing"), and 20 ("MEEP: A Flexible Free FDTD Software Package"). A [video presentation](https://www.youtube.com/watch?v=9CA949csYvM) and [slides](http://ab-initio.mit.edu/~ardavan/stuff/IEEE_Photonics_Society_SCV3.pdf) as well as a [podcast](http://www.rce-cast.com/Podcast/rce-118-meep.html) are also available. ### Where can I find a list of projects which have used Meep? @@ -91,7 +91,7 @@ Meep doesn't implement a frequency-independent complex $\varepsilon$. Not only i ### Why does my simulation diverge if the permittivity ε is less than 0? -Maxwell's equations have exponentially growing solutions for a frequency-independent negative $\varepsilon$. For any physical medium with negative $\varepsilon$, there must be dispersion, and you must likewise use dispersive materials in Meep to obtain negative $\varepsilon$ at some desired frequency. The requirement of dispersion to obtain negative $\varepsilon$ follows from the [Kramers–Kronig relations](https://en.wikipedia.org/wiki/Kramers%E2%80%93Kronig_relations), and also follows from thermodynamic considerations that the energy in the electric field must be positive. For example, see [Electrodynamics of Continuous Media](https://www.amazon.com/Electrodynamics-Continuous-Media-Second-Theoretical/dp/0750626348) by Landau, Pitaevskii, and Lifshitz. At an even more fundamental level, it can be derived from passivity constraints as shown in [Physical Review A, Vol. 90, 023847, 2014](http://arxiv.org/abs/arXiv:1405.0238). +Maxwell's equations have exponentially growing solutions for a frequency-independent negative $\varepsilon$. For any physical medium with negative $\varepsilon$, there must be dispersion, and you must likewise use dispersive materials in Meep to obtain negative $\varepsilon$ at some desired frequency. The requirement of dispersion to obtain negative $\varepsilon$ follows from the [Kramers–Kronig relations](https://en.wikipedia.org/wiki/Kramers%E2%80%93Kronig_relations), and also follows from thermodynamic considerations that the energy in the electric field must be positive. For example, see [Electrodynamics of Continuous Media](https://www.amazon.com/Electrodynamics-Continuous-Media-Second-Theoretical/dp/0750626348) by Landau, Pitaevskii, and Lifshitz. At an even more fundamental level, it can be derived from passivity constraints as shown in [Physical Review A, Vol. 90, 023847 (2014)](http://arxiv.org/abs/arXiv:1405.0238). If you solve Maxwell's equations in a homogeneous-epsilon material at some real wavevector $\mathbf{k}$, you get a dispersion relation $\omega^2 = c^2 |\mathbf{k}|^2 / \varepsilon$. If $\varepsilon$ is positive, there are two real solutions $\omega = \pm c |\mathbf{k}| / \sqrt{\varepsilon}$, giving oscillating solutions. If $\varepsilon$ is negative, there are two imaginary solutions corresponding to exponentially decaying and exponentially growing solutions from any current source. These solutions can always be spatially decomposed into a superposition of real-$\mathbf{k}$ values via a spatial Fourier transform. @@ -239,7 +239,7 @@ For a linear system, you can use a [ContinuousSource](Python_User_Interface.md#c ### Why are the fields not being absorbed by the PML? -The decay coefficient of the fields within any PML contains a $\cos(\theta)$ factor where $\theta$ is the incidence angle ($\theta=0^{\circ}$ is normal incidence). The decay therefore becomes *slower* as glancing incidence ($\theta=90^{\circ}$) is approached. This is true in the continuum limit and can be demonstrated by verifying that the reflections from the PML do *not* change with resolution. Otherwise, if the reflection decreases with increasing resolution then it may be due to transition reflections (i.e., the impedance mismatch at the PML interface) which can also be reduced by making the PML thicker instead of increasing the resolution. Transition reflections also increase as glancing incidence is approached, because at glancing incidence the phase-velocity mismatch between incident and reflected waves goes to zero as described in [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). Glancing-angle fields commonly arise in simulations where one direction is periodic and the other is terminated by a PML (such as in [diffraction gratings](Python_Tutorials/Mode_Decomposition.md#diffraction-spectrum-of-a-binary-grating)), in which case you can have spurious solutions that travel *parallel* to the PML interface; a workaround is to use a thicker non-PML [absorber](Python_User_Interface.md#absorber). This is demonstrated in the figure below by the glancing-angle fields remaining in the cell after a [source planewave](Python_Tutorials/Eigenmode_Source.md#planewaves-in-homogeneous-media) at 45° has long been turned off: the PML (left inset) is unable to absorb these fields unlike the absorber (right inset). +The decay coefficient of the fields within any PML contains a $\cos(\theta)$ factor where $\theta$ is the incidence angle ($\theta=0^{\circ}$ is normal incidence). The decay therefore becomes *slower* as glancing incidence ($\theta=90^{\circ}$) is approached. This is true in the continuum limit and can be demonstrated by verifying that the reflections from the PML do *not* change with resolution. Otherwise, if the reflection decreases with increasing resolution then it may be due to transition reflections (i.e., the impedance mismatch at the PML interface) which can also be reduced by making the PML thicker instead of increasing the resolution. Transition reflections also increase as glancing incidence is approached, because at glancing incidence the phase-velocity mismatch between incident and reflected waves goes to zero as described in [Optics Express, Vol. 16, pp. 11376-92 (2008)](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). Glancing-angle fields commonly arise in simulations where one direction is periodic and the other is terminated by a PML (such as in [diffraction gratings](Python_Tutorials/Mode_Decomposition.md#diffraction-spectrum-of-a-binary-grating)), in which case you can have spurious solutions that travel *parallel* to the PML interface; a workaround is to use a thicker non-PML [absorber](Python_User_Interface.md#absorber). This is demonstrated in the figure below by the glancing-angle fields remaining in the cell after a [source planewave](Python_Tutorials/Eigenmode_Source.md#planewaves-in-homogeneous-media) at 45° has long been turned off: the PML (left inset) is unable to absorb these fields unlike the absorber (right inset).
![](images/pml_glancing_field.png) @@ -279,7 +279,7 @@ For the Fourier-transformed fields, you can use [`add_energy`](Python_User_Inter ### How do I compute the energy density for a dispersive material? -The energy density computed by Meep is $\frac{1}{2}(\vec{E}\cdot\vec{D}+\vec{H}\cdot\vec{B})$ via [`add_energy`](Python_User_Interface.md#energy-density-spectra) (Fourier-transformed fields) or [`electric_energy_in_box`](Python_User_Interface.md#field-computations)/`magnetic_energy_in_box`/`field_energy_in_box` (instantaneous fields). This is *not* the energy density for a dispersive medium. With dispersion and negligible absorption, the energy density is described by a "Brillouin" formula that includes an additional $\frac{dε}{dω}$ term (and $\frac{dμ}{dω}$ in magnetic media) as described in [Classical Electrodynamics](https://www.amazon.com/Classical-Electrodynamics-Third-David-Jackson/dp/047130932X) by J.D. Jackson as well as other standard textbooks. More generally, one can define a "dynamical energy density" that captures the energy in the fields and the work done on the polarization currents; as reviewed in [Physical Review A, 90, 023847, 2014](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.90.023847) ([pdf](http://math.mit.edu/~stevenj/papers/Welters14.pdf)), the dynamical energy density reduces to the Brillouin formula for negligible absorption, and is constructed so as to enforce [Poynting's theorem](https://en.wikipedia.org/wiki/Poynting%27s_theorem) for conservation of energy. +The energy density computed by Meep is $\frac{1}{2}(\vec{E}\cdot\vec{D}+\vec{H}\cdot\vec{B})$ via [`add_energy`](Python_User_Interface.md#energy-density-spectra) (Fourier-transformed fields) or [`electric_energy_in_box`](Python_User_Interface.md#field-computations)/`magnetic_energy_in_box`/`field_energy_in_box` (instantaneous fields). This is *not* the energy density for a dispersive medium. With dispersion and negligible absorption, the energy density is described by a "Brillouin" formula that includes an additional $\frac{dε}{dω}$ term (and $\frac{dμ}{dω}$ in magnetic media) as described in [Classical Electrodynamics](https://www.amazon.com/Classical-Electrodynamics-Third-David-Jackson/dp/047130932X) by J.D. Jackson as well as other standard textbooks. More generally, one can define a "dynamical energy density" that captures the energy in the fields and the work done on the polarization currents; as reviewed in [Physical Review A, 90, 023847 (2014)](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.90.023847) ([pdf](http://math.mit.edu/~stevenj/papers/Welters14.pdf)), the dynamical energy density reduces to the Brillouin formula for negligible absorption, and is constructed so as to enforce [Poynting's theorem](https://en.wikipedia.org/wiki/Poynting%27s_theorem) for conservation of energy. Although Meep does not currently implement a function to compute the dynamical energy density (or the limiting case of the Brillouin formula) explicitly, since this density is expressed in terms of time derivatives it could in principle be implemented by processing the fields during time-stepping. However, if you only want the total *energy* in some box, you can instead compute it via Poynting's theorem from the [total energy flux flowing into that box](#how-do-i-compute-the-absorbed-power-in-a-local-subregion-of-the-cell), and this is equivalent to integrating the dynamical energy density or its special case of the Brillouin formula. @@ -339,7 +339,7 @@ Usage: Subpixel Averaging ### Why doesn't turning off subpixel averaging work? -By default, when Meep assigns a dielectric constant $\varepsilon$ or $\mu$ to each pixel, it uses a carefully designed average of the $\varepsilon$ values within that pixel. This subpixel averaging generally improves the accuracy of the simulation — perhaps counter-intuitively, for geometries with discontinuous $\varepsilon$ it is *more* accurate (i.e. closer to the exact Maxwell result for the *discontinuous* case) to do the simulation with the subpixel-averaged (*smoothed*) $\varepsilon$, as long as the averaging is done properly. For details, see Section 3 ("Interpolation and the illusion of continuity") of [Computer Physics Communications, Vol. 181, pp. 687-702, 2010](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf). +By default, when Meep assigns a dielectric constant $\varepsilon$ or $\mu$ to each pixel, it uses a carefully designed average of the $\varepsilon$ values within that pixel. This subpixel averaging generally improves the accuracy of the simulation — perhaps counter-intuitively, for geometries with discontinuous $\varepsilon$ it is *more* accurate (i.e. closer to the exact Maxwell result for the *discontinuous* case) to do the simulation with the subpixel-averaged (*smoothed*) $\varepsilon$, as long as the averaging is done properly. For details, see Section 3 ("Interpolation and the illusion of continuity") of [Computer Physics Communications, Vol. 181, pp. 687-702 (2010)](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf). Still, there are times when, for whatever reason, you might not want this feature. For example, if your accuracy is limited by other issues, or if you want to skip the wait at the beginning of the simulation for it do to the averaging. In this case, you can disable the subpixel averaging by setting `Simulation.eps_averaging = False` (Python) or `(set! eps-averaging? false)` (Scheme). For more details, see [Python Interface](Python_User_Interface.md). Note: even if subpixel averaging is disabled, the time required for the grid initialization may still be non trivial (e.g., minutes for a 3d cell with large `resolution` — it still needs to evaluate $\varepsilon$ three times for every voxel due to the Yee grid). @@ -425,7 +425,7 @@ At least 8 pixels per wavelength in the lossless dielectric material with the hi ### What is Meep's frequency-domain solver and how does it work? -Meep contains a [frequency-domain solver](Python_User_Interface.md#frequency-domain-solver) that directly computes the steady-state fields produced in a geometry in response to a [continuous-wave (CW) source](https://en.wikipedia.org/wiki/Continuous_wave), using an [iterative linear solver](https://en.wikipedia.org/wiki/Iterative_method) instead of time-stepping. This is possible because the FDTD timestep can be used to formulate a frequency-domain problem via an iterative linear solver. The frequency-domain response can often be determined using many fewer timesteps while exploiting the FDTD code almost without modification. For details, see Section 5.3 ("Frequency-domain solver") of [Computer Physics Communications, Vol. 181, pp. 687-702, 2010](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf). +Meep contains a [frequency-domain solver](Python_User_Interface.md#frequency-domain-solver) that directly computes the steady-state fields produced in a geometry in response to a [continuous-wave (CW) source](https://en.wikipedia.org/wiki/Continuous_wave), using an [iterative linear solver](https://en.wikipedia.org/wiki/Iterative_method) instead of time-stepping. This is possible because the FDTD timestep can be used to formulate a frequency-domain problem via an iterative linear solver. The frequency-domain response can often be determined using many fewer timesteps while exploiting the FDTD code almost without modification. For details, see Section 5.3 ("Frequency-domain solver") of [Computer Physics Communications, Vol. 181, pp. 687-702 (2010)](http://ab-initio.mit.edu/~oskooi/papers/Oskooi10.pdf). This means that all of the features from the time-domain solver (e.g., arbitrary materials, symmetries, subpixel averaging, parallelization, etc.) are also available as a frequency-domain solver. For certain problems, such as cavities (e.g., ring resonators) with long-lived resonant modes, the frequency-domain solver converges much faster than the straightforward approach of simply running a long simulation until transients have disappeared. Another benefit is that an arbitrary, complex, refractive index can be specified directly using the [electric conductivity](Materials.md#conductivity-and-complex) without having to fit the data to a sum of [Drude-Lorentz susceptibility terms](Materials.md#material-dispersion). diff --git a/doc/docs/Materials.md b/doc/docs/Materials.md index e3b3e3c5f..ef6b354cf 100644 --- a/doc/docs/Materials.md +++ b/doc/docs/Materials.md @@ -172,7 +172,7 @@ For the two-level atomic gain model used in this example, $D_0$ can be calculate $$ D_0 = \frac{\Gamma_{12} - \Gamma_{21}}{\Gamma_{12} + \Gamma_{21}} N_0 $$ -Similar relationships can be found for systems with more than two atomic levels in [Optics Express, Vol. 20, pp. 474-88, 2012](https://www.osapublishing.org/oe/abstract.cfm?URI=oe-20-1-474). +Similar relationships can be found for systems with more than two atomic levels in [Optics Express, Vol. 20, pp. 474-88 (2012)](https://www.osapublishing.org/oe/abstract.cfm?URI=oe-20-1-474). ### Natural Units for Saturable Media @@ -190,7 +190,7 @@ The relationship among Meep and SALT units are: $$ D_0 \; (\textrm{SALT}) = \frac{|\theta|^2}{\hbar (\gamma_n/2)} D_0 \; (\textrm{Meep}) $$ $$ \mathbf{E} \; (\textrm{SALT}) = \frac{2 |\theta|}{\hbar \sqrt{(\gamma_n/2) \Gamma_\parallel}} \mathbf{E} \; (\textrm{Meep}) $$ -For more details on applying SALT to atomic media with an arbitrary number of levels, see [Optics Express, Vol. 23, pp. 6455-77, 2015](https://www.osapublishing.org/oe/abstract.cfm?uri=oe-23-5-6455). +For more details on applying SALT to atomic media with an arbitrary number of levels, see [Optics Express, Vol. 23, pp. 6455-77 (2015)](https://www.osapublishing.org/oe/abstract.cfm?uri=oe-23-5-6455). An additional discussion of the natural units for saturable media is given in [arXiv:2007.09329](https://arxiv.org/abs/2007.09329). @@ -245,7 +245,7 @@ Materials Library A materials library is available for [Python](https://github.com/NanoComp/meep/tree/master/python/materials.py) and [Scheme](https://github.com/NanoComp/meep/tree/master/scheme/materials.scm) containing [crystalline silicon](https://en.wikipedia.org/wiki/Crystalline_silicon) (c-Si), [amorphous silicon](https://en.wikipedia.org/wiki/Amorphous_silicon) (a-Si) including the hydrogenated form, [silicon dioxide](https://en.wikipedia.org/wiki/Silicon_dioxide) (SiO2), [indium tin oxide](https://en.wikipedia.org/wiki/Indium_tin_oxide) (ITO), [alumina](https://en.wikipedia.org/wiki/Aluminium_oxide) (Al2O3), [gallium arsenide](https://en.wikipedia.org/wiki/Gallium_arsenide) (GaAs), [aluminum arsenide](https://en.wikipedia.org/wiki/Aluminium_arsenide) (AlAs), [aluminum nitride](https://en.wikipedia.org/wiki/Aluminium_nitride) (AlN), [borosilicate glass](https://en.wikipedia.org/wiki/Borosilicate_glass) (BK7), [fused quartz](https://en.wikipedia.org/wiki/Fused_quartz), [silicon nitride](https://en.wikipedia.org/wiki/Silicon_nitride) (Si3N4), [germanium](https://en.wikipedia.org/wiki/Germanium) (Ge), [indium phosphide](https://en.wikipedia.org/wiki/Indium_phosphide) (InP), [gallium nitride](https://en.wikipedia.org/wiki/Gallium_nitride) (GaN), [cadmium telluride](https://en.wikipedia.org/wiki/Cadmium_telluride) (CdTe), [lithium niobate](https://en.wikipedia.org/wiki/Lithium_niobate) (LiNbO3), [barium borate](https://en.wikipedia.org/wiki/Barium_borate) (BaB2O4), [calcium tungstate](https://en.wikipedia.org/wiki/Scheelite) (CaWO4), [calcium carbonate](https://en.wikipedia.org/wiki/Calcium_carbonate) (CaCO3), [yttrium oxide](https://en.wikipedia.org/wiki/Yttrium(III)_oxide) (Y2O3), [yttrium aluminum garnet](https://en.wikipedia.org/wiki/Yttrium_aluminium_garnet) (YAG), [poly(methyl methacrylate)](https://en.wikipedia.org/wiki/Poly(methyl_methacrylate)) (PMMA), [polycarbonate](https://en.wikipedia.org/wiki/Polycarbonate), [polystyrene](https://en.wikipedia.org/wiki/Polystyrene), [cellulose](https://en.wikipedia.org/wiki/Cellulose), as well as 11 elemental metals: [silver](https://en.wikipedia.org/wiki/Silver) (Ag), [gold](https://en.wikipedia.org/wiki/Gold) (Au), [copper](https://en.wikipedia.org/wiki/Copper) (Cu), [aluminum](https://en.wikipedia.org/wiki/Aluminium) (Al), [berylium](https://en.wikipedia.org/wiki/Beryllium) (Be), [chromium](https://en.wikipedia.org/wiki/Chromium) (Cr), [nickel](https://en.wikipedia.org/wiki/Nickel) (Ni), [palladium](https://en.wikipedia.org/wiki/Palladium) (Pd), [platinum](https://en.wikipedia.org/wiki/Platinum) (Pt), [titanium](https://en.wikipedia.org/wiki/Titanium) (Ti), and [tungsten](https://en.wikipedia.org/wiki/Tungsten) (W). -Experimental values of the complex refractive index are fit to a [Drude-Lorentz susceptibility model](#material-dispersion) over various wavelength ranges. For example, the fit for crystalline silicon is based on [Progress in Photovoltaics, Vol. 3, pp. 189-92, 1995](https://onlinelibrary.wiley.com/doi/full/10.1002/pip.4670030303) for the wavelength range of 0.4-1.0 µm as described in [J. Optical Society of America A, Vol. 28, pp. 770-77, 2011](https://www.osapublishing.org/josaa/abstract.cfm?uri=josaa-28-5-770). The fit for the elemental metals is over the range of 0.2-12.4 μm and is described in [Applied Optics, Vol. 37, pp. 5271-83, 1998](https://www.osapublishing.org/ao/abstract.cfm?uri=ao-37-22-5271). +Experimental values of the complex refractive index are fit to a [Drude-Lorentz susceptibility model](#material-dispersion) over various wavelength ranges. For example, the fit for crystalline silicon is based on [Progress in Photovoltaics, Vol. 3, pp. 189-92 (1995)](https://onlinelibrary.wiley.com/doi/full/10.1002/pip.4670030303) for the wavelength range of 0.4-1.0 µm as described in [J. Optical Society of America A, Vol. 28, pp. 770-77 (2011)](https://www.osapublishing.org/josaa/abstract.cfm?uri=josaa-28-5-770). The fit for the elemental metals is over the range of 0.2-12.4 μm and is described in [Applied Optics, Vol. 37, pp. 5271-83 (1998)](https://www.osapublishing.org/ao/abstract.cfm?uri=ao-37-22-5271). Fitting parameters for all materials are defined for a unit distance of 1 µm. For simulations which use a different value for the unit distance, the predefined variable `um_scale` (Python) or `um-scale` (Scheme) must be scaled by *multiplying* by whatever the unit distance is, in units of µm. For example, if the unit distance is 100 nm, this would require adding the line `um_scale = 0.1*um_scale` after the line where [`um_scale` is defined](https://github.com/NanoComp/meep/blob/master/python/materials.py#L7). This change must be made directly to the materials library file. diff --git a/doc/docs/Perfectly_Matched_Layer.md b/doc/docs/Perfectly_Matched_Layer.md index ea3042980..342496c4c 100644 --- a/doc/docs/Perfectly_Matched_Layer.md +++ b/doc/docs/Perfectly_Matched_Layer.md @@ -2,21 +2,21 @@ # Perfectly Matched Layer --- -The [perfectly matched layer](https://en.wikipedia.org/wiki/Perfectly_matched_layer) (**PML**) approach to implementing absorbing boundary conditions in FDTD simulation was originally proposed in [J. Computational Physics, Vol. 114, pp. 185-200, 1994](http://dx.doi.org/10.1006/jcph.1994.1159). The approach involves surrounding the computational cell with a medium that in theory absorbs without any reflection electromagnetic waves at *all* frequencies and angles of incidence. The original PML formulation involved "splitting" Maxwell's equations into two sets of equations in the absorbing layers, appropriately defined. These split-field equations produce wave attenuation but are unphysical. It was later shown in [IEEE Transactions on Antennas and Propagation, Vol. 43, pp. 1460-3, 1995](https://ieeexplore.ieee.org/abstract/document/477075) that a similar reflectionless absorbing medium can be constructed as a lossy anisotropic dielectric and magnetic material with "matched" impedance and electrical and magnetic conductivities. This is known as the uniaxial PML (UPML). +The [perfectly matched layer](https://en.wikipedia.org/wiki/Perfectly_matched_layer) (**PML**) approach to implementing absorbing boundary conditions in FDTD simulation was originally proposed in [J. Computational Physics, Vol. 114, pp. 185-200 (1994)](http://dx.doi.org/10.1006/jcph.1994.1159). The approach involves surrounding the computational cell with a medium that in theory absorbs without any reflection electromagnetic waves at *all* frequencies and angles of incidence. The original PML formulation involved "splitting" Maxwell's equations into two sets of equations in the absorbing layers, appropriately defined. These split-field equations produce wave attenuation but are unphysical. It was later shown in [IEEE Transactions on Antennas and Propagation, Vol. 43, pp. 1460-3, 1995](https://ieeexplore.ieee.org/abstract/document/477075) that a similar reflectionless absorbing medium can be constructed as a lossy anisotropic dielectric and magnetic material with "matched" impedance and electrical and magnetic conductivities. This is known as the uniaxial PML (UPML). The finite-difference implementation of PML requires the conductivities to be turned on *gradually* over a distance of a few grid points to avoid numerical reflections from the discontinuity. It is also important when using PMLs to make the computational cell sufficiently large so as not to overlap the PML with [evanescent fields](https://en.wikipedia.org/wiki/Evanescent_field) from resonant-cavity or waveguide modes (otherwise, the PML could induce artificial losses in such modes). As a rule of thumb, a PML thickness comparable to half the largest wavelength in the simulation usually works well. The PML thickness should be repeatedly doubled until the simulation results are [sufficiently converged](FAQ.md#checking-convergence). For a more detailed discussion of PMLs in Meep, see Chapter 5 ("Rigorous PML Validation and a Corrected Unsplit PML for Anisotropic Dispersive Media") of the book [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707). In particular, there are two useful references: - [Notes on Perfectly Matched Layers](https://arxiv.org/abs/2108.05348) (arXiv:2108.05348) by S. G. Johnson: a general introduction to PML concepts -- [J. Computational Physics, Vol. 230, pp. 2369-77, 2011](http://math.mit.edu/~stevenj/papers/OskooiJo11.pdf): a description of the precise PML formulation that is used in Meep, which is slightly different from many PML formulations described elsewhere in order to properly handle arbitrary anisotropy. This paper also describes a general strategy to validate PML. +- [J. Computational Physics, Vol. 230, pp. 2369-77 (2011)](http://math.mit.edu/~stevenj/papers/OskooiJo11.pdf): a description of the precise PML formulation that is used in Meep, which is slightly different from many PML formulations described elsewhere in order to properly handle arbitrary anisotropy. This paper also describes a general strategy to validate PML. [TOC] Breakdown of PML in Inhomogeneous Media --------------------------------------- -As shown in the figure below, there are two important cases involving *inhomogeneous* media where the fundamental coordinate stretching idea behind PML breaks down giving rise to reflection artifacts. The workaround is to replace the PML with an adiabatic [absorber](Python_User_Interface.md#absorber). Additionally, if you operate near a low-group velocity band edge in a periodic media, you may need to make the PML/absorber very thick (overlapping many periods) to be effective. For more details on why PML breaks down in these cases, see [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). Also, [Physical Review E, Vol. 79, 065601, 2011](http://math.mit.edu/~stevenj/papers/LohOs09.pdf) describes a separate case where PML fails involving backward-wave modes which may occur at metal-dielectric interfaces (i.e., [surface-plasmon polaritons](https://en.wikipedia.org/wiki/Surface_plasmon_polariton)). +As shown in the figure below, there are two important cases involving *inhomogeneous* media where the fundamental coordinate stretching idea behind PML breaks down giving rise to reflection artifacts. The workaround is to replace the PML with an adiabatic [absorber](Python_User_Interface.md#absorber). Additionally, if you operate near a low-group velocity band edge in a periodic media, you may need to make the PML/absorber very thick (overlapping many periods) to be effective. For more details on why PML breaks down in these cases, see [Optics Express, Vol. 16, pp. 11376-92 (2008)](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). Also, [Physical Review E, Vol. 79, 065601 (2011)](http://math.mit.edu/~stevenj/papers/LohOs09.pdf) describes a separate case where PML fails involving backward-wave modes which may occur at metal-dielectric interfaces (i.e., [surface-plasmon polaritons](https://en.wikipedia.org/wiki/Surface_plasmon_polariton)).
![](images/PML_failure.png) diff --git a/doc/docs/Python_User_Interface.md b/doc/docs/Python_User_Interface.md index 8ceaf20cf..b35cd6de9 100644 --- a/doc/docs/Python_User_Interface.md +++ b/doc/docs/Python_User_Interface.md @@ -1362,7 +1362,7 @@ Technically, MPB computes $\omega_n(\mathbf{k})$ and then inverts it with Newton **Note:** for planewaves in homogeneous media, the `kpoints` may *not* necessarily be equivalent to the actual wavevector of the mode. This quantity is given by `kdom`. -Note that Meep's MPB interface only supports dispersionless non-magnetic materials but it does support anisotropic $\\varepsilon$. Any nonlinearities, magnetic responses $\\mu$ conductivities $\\sigma$, or dispersive polarizations in your materials will be *ignored* when computing the mode decomposition. PML will also be ignored. +Note that Meep's MPB interface only supports dispersionless non-magnetic materials but it does support anisotropic $\varepsilon$. Any nonlinearities, magnetic responses $\mu$ conductivities $\sigma$, or dispersive polarizations in your materials will be *ignored* when computing the mode decomposition. PML will also be ignored. @@ -2318,11 +2318,11 @@ is a 1d array of `nfreq` dimensions. ### Load and Dump Simulation State -The functions below add support for saving and restoring parts of the MEEP -Simulation state. +These functions add support for saving and restoring parts of the +`Simulation` state. -For all functions below, when dumping/loading state to/from a distributed filesystem -(using say, parallel HDF5) and running in a MPI environment, setting +For all functions listed below, when dumping/loading state to/from a distributed filesystem +(using say, parallel HDF5) and running in an MPI environment, setting `single_parallel_file=True` (the default) will result in all processes writing/reading to/from the same/single file after computing their respective offsets into this file. When set to `False`, each process writes/reads data for the chunks it owns @@ -2402,11 +2402,12 @@ sim2.run(...) #### Load and Dump Fields -These functions can be used to dump (and later load) the raw fields, auxillary -fields and the dft fields at a certain timestamp. The timestamp at which the -dump happens is also saved so that simulation can continue from where it was saved. -The one pre-requisite of this feature is that it needs the Simulation object to have -been setup *exactly* the same as the one it was dumped from. +These functions can be used to dump (and later load) the time-domain fields, auxiliary +fields for PMLs, polarization fields (for dispersive materials), and the DFT fields +at a certain timestamp. The timestamp at which the dump happens is also saved so that +the simulation can continue from where it was saved. The one pre-requisite of this +feature is that it needs the `Simulation` object to have been setup *exactly* the +same as the one it was dumped from. @@ -2444,7 +2445,7 @@ Loads a fields from the file `fname`. #### Checkpoint / Restore. The above dump/load related functions can be used to implement a -checkpoint/restore *like* feature for MEEP. The caveat of this feature is that +checkpoint/restore *like* feature. The caveat of this feature is that it does *not* store all the state required to re-create the `Simulation` object itself. Instead, it expects the user to create and set up the new `Simulation` object to be *exactly* the same as the one the state was dumped from. @@ -2879,7 +2880,7 @@ follows the `run` function (e.g., outputting fields). -Finally, another run function, useful for computing ω(**k**) band diagrams, is available via these `Simulation` methods: +Finally, another run function, useful for computing $\omega(\mathbf{k})$ band diagrams, is available via these `Simulation` methods: @@ -4401,7 +4402,8 @@ def __init__(self, grid_type='U_DEFAULT', do_averaging=False, beta=0, - eta=0.5): + eta=0.5, + damping=0): ```
@@ -4438,11 +4440,15 @@ a *discontinuous* function from otherwise continuously varying (via the bilinear grid values. Subpixel smoothing is fast and accurate because it exploits an analytic formulation for level-set functions. +A nonzero damping term creates an artificial conductivity σ = u(1-u)*damping, which acts as +dissipation loss that penalize intermediate pixel values of non-binarized structures. The value of +damping should be proportional to 2π times the typical frequency of the problem. + It is possible to overlap any number of different `MaterialGrid`s. This can be useful for defining grids which are symmetric (e.g., mirror, rotation). One way to set this up is by overlapping a given `MaterialGrid` object with a symmetrized copy of itself. In the case of spatially overlapping `MaterialGrid` objects (with no intervening objects), any overlapping points are computed using the -method `grid_type` which is one of `"U_MIN"` (minimum of the overlapping grid values), `"U_PROD"` +method `grid_type` which is one of `"U_MIN"` (minimum of the overlapping grid values), `"U_PROD"` (product), `"U_MEAN"` (mean), `"U_DEFAULT"` (topmost material grid). In general, these `"U_*"` options allow you to combine any material grids that overlap in space with no intervening objects. @@ -6010,8 +6016,8 @@ def __init__(self, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML - absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, - 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For + absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92 + (2008)](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `pml_profile=lambda u: u*u*u`. @@ -6046,14 +6052,14 @@ The main reason to use `Absorber` is if you have **a case in which PML fails:** - No true PML exists for *periodic* media, and a scalar absorber is computationally less expensive and generally just as good. See [Optics Express, Vol. 16, pp. - 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). + 11376-92 (2008)](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). - PML can lead to *divergent* fields for certain waveguides with "backward-wave" modes; this can readily occur in metals with surface plasmons, and a scalar - absorber is your only choice. See [Physical Review E, Vol. 79, 065601, - 2009](http://math.mit.edu/~stevenj/papers/LohOs09.pdf). + absorber is your only choice. See [Physical Review E, Vol. 79, 065601 + (2009)](http://math.mit.edu/~stevenj/papers/LohOs09.pdf). - PML can fail if you have a waveguide hitting the edge of your cell *at an angle*. - See [J. Computational Physics, Vol. 230, pp. 2369-77, - 2011](http://math.mit.edu/~stevenj/papers/OskooiJo11.pdf). + See [J. Computational Physics, Vol. 230, pp. 2369-77 + (2011)](http://math.mit.edu/~stevenj/papers/OskooiJo11.pdf).
@@ -6288,33 +6294,34 @@ def __init__(self, Construct an `EigenModeSource`. -+ **`eig_band` [`integer` or `DiffractedPlanewave` class]** — Either the index *n* (1,2,3,...) of the desired band - ω*n*(**k**) to compute in MPB where 1 denotes the lowest-frequency - band at a given **k** point, and so on, or alternatively a diffracted planewave in homogeneous media. ++ **`eig_band` [`integer` or `DiffractedPlanewave` class]** — Either the index $n$ + (1,2,3,...) of the desired band $\omega_n(\mathbf{k})$ to compute in MPB where + 1 denotes the lowest-frequency band at a given $\mathbf{k}$ point, and so on, + or alternatively a diffracted planewave in homogeneous media. + **`direction` [`mp.X`, `mp.Y`, or `mp.Z;` default `mp.AUTOMATIC`], `eig_match_freq` [`boolean;` default `True`], `eig_kpoint` [`Vector3`]** — By default (if `eig_match_freq` is `True`), Meep tries to find a mode with the same - frequency ω*n*(**k**) as the `src` property (above), by scanning - **k** vectors in the given `direction` using MPB's `find_k` functionality. + frequency $\omega_n(\mathbf{k})$ as the `src` property (above), by scanning + $\mathbf{k}$ vectors in the given `direction` using MPB's `find_k` functionality. Alternatively, if `eig_kpoint` is supplied, it is used as an initial guess for - **k**. By default, `direction` is the direction normal to the source region, + $\mathbf{k}$. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `mp.NO_DIRECTION`, then `eig_kpoint` is - not only the initial guess and the search direction of the **k** vectors, but is + not only the initial guess and the search direction of the $\mathbf{k}$ vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Python_Tutorials/Eigenmode_Source.md#oblique-waveguides) (not perpendicular to the source plane). If `eig_match_freq` is `False`, then the - **k** vector of the desired mode is specified with `eig_kpoint` (in Meep units + $\mathbf{k}$ vector of the desired mode is specified with `eig_kpoint` (in Meep units of 2π/(unit length)). Also, the eigenmode frequency computed by MPB overwrites the `frequency` parameter of the `src` property for a `GaussianSource` and `ContinuousSource` but not `CustomSource` (the `width` or any other parameter of - `src` is unchanged). By default, the **k** components in the plane of the source + `src` is unchanged). By default, the $\mathbf{k}$ components in the plane of the source region are zero. However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the - `k_point` parameter, then the mode's **k** components in those directions will + `k_point` parameter, then the mode's $\mathbf{k}$ components in those directions will match `k_point` so that the mode satisfies the Meep boundary conditions, - regardless of `eig_kpoint`. Note that once **k** is either found by MPB, or + regardless of `eig_kpoint`. Note that once $\mathbf{k}$ is either found by MPB, or specified by `eig_kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate @@ -7221,7 +7228,7 @@ def __call__(self, level): Convenience for setting the verbosity level. This lets you set the global level by calling the instance like a function. For example, if -`verbosity` is an instance of this class, then it's value can be changed +`verbosity` is an instance of this class, then its value can be changed like this: ``` diff --git a/doc/docs/Python_User_Interface.md.in b/doc/docs/Python_User_Interface.md.in index 1b323aa0d..237fe4500 100644 --- a/doc/docs/Python_User_Interface.md.in +++ b/doc/docs/Python_User_Interface.md.in @@ -181,7 +181,7 @@ Technically, MPB computes $\omega_n(\mathbf{k})$ and then inverts it with Newton **Note:** for planewaves in homogeneous media, the `kpoints` may *not* necessarily be equivalent to the actual wavevector of the mode. This quantity is given by `kdom`. -Note that Meep's MPB interface only supports dispersionless non-magnetic materials but it does support anisotropic $\\varepsilon$. Any nonlinearities, magnetic responses $\\mu$ conductivities $\\sigma$, or dispersive polarizations in your materials will be *ignored* when computing the mode decomposition. PML will also be ignored. +Note that Meep's MPB interface only supports dispersionless non-magnetic materials but it does support anisotropic $\varepsilon$. Any nonlinearities, magnetic responses $\mu$ conductivities $\sigma$, or dispersive polarizations in your materials will be *ignored* when computing the mode decomposition. PML will also be ignored. @@ Simulation.add_mode_monitor @@ @@ -351,11 +351,11 @@ And this [`DftNear2Far`](#DftNear2Far) method: ### Load and Dump Simulation State -The functions below add support for saving and restoring parts of the MEEP -Simulation state. +These functions add support for saving and restoring parts of the +`Simulation` state. -For all functions below, when dumping/loading state to/from a distributed filesystem -(using say, parallel HDF5) and running in a MPI environment, setting +For all functions listed below, when dumping/loading state to/from a distributed filesystem +(using say, parallel HDF5) and running in an MPI environment, setting `single_parallel_file=True` (the default) will result in all processes writing/reading to/from the same/single file after computing their respective offsets into this file. When set to `False`, each process writes/reads data for the chunks it owns @@ -390,11 +390,12 @@ sim2.run(...) #### Load and Dump Fields -These functions can be used to dump (and later load) the raw fields, auxillary -fields and the dft fields at a certain timestamp. The timestamp at which the -dump happens is also saved so that simulation can continue from where it was saved. -The one pre-requisite of this feature is that it needs the Simulation object to have -been setup *exactly* the same as the one it was dumped from. +These functions can be used to dump (and later load) the time-domain fields, auxiliary +fields for PMLs, polarization fields (for dispersive materials), and the DFT fields +at a certain timestamp. The timestamp at which the dump happens is also saved so that +the simulation can continue from where it was saved. The one pre-requisite of this +feature is that it needs the `Simulation` object to have been setup *exactly* the +same as the one it was dumped from. @@ Simulation.dump_fields @@ @@ Simulation.load_fields @@ @@ -402,7 +403,7 @@ been setup *exactly* the same as the one it was dumped from. #### Checkpoint / Restore. The above dump/load related functions can be used to implement a -checkpoint/restore *like* feature for MEEP. The caveat of this feature is that +checkpoint/restore *like* feature. The caveat of this feature is that it does *not* store all the state required to re-create the `Simulation` object itself. Instead, it expects the user to create and set up the new `Simulation` object to be *exactly* the same as the one the state was dumped from. @@ -506,7 +507,7 @@ In particular, a useful value for `until_after_sources` or `until` is often `sto @@ stop_after_walltime @@ @@ stop_on_interrupt @@ -Finally, another run function, useful for computing ω(**k**) band diagrams, is available via these `Simulation` methods: +Finally, another run function, useful for computing $\omega(\mathbf{k})$ band diagrams, is available via these `Simulation` methods: @@ Simulation.run_k_points @@ @@ Simulation.run_k_point @@ diff --git a/doc/docs/Subpixel_Smoothing.md b/doc/docs/Subpixel_Smoothing.md index 82d1a3484..4ef4334b0 100644 --- a/doc/docs/Subpixel_Smoothing.md +++ b/doc/docs/Subpixel_Smoothing.md @@ -23,7 +23,7 @@ $$ \tilde{\varepsilon}^{-1} = \textbf{P}\langle\varepsilon^{-1}\rangle + \big(1-
-where $\textbf{P}$ is the projection matrix $P_{ij}=n_{i}n_{j}$ onto the normal $\vec{n}$. The $\langle\cdots\rangle$ denotes an average over the voxel $sΔx\times sΔy\times sΔz$ surrounding the grid point in question where $s$ is a smoothing diameter in grid units equal to 1/`resolution`. (This analysis assumes that the interface is approximately planar throughout the voxel, which will hold in the regime where the voxels are small compared to the geometric feature sizes.) If the initial materials are anisotropic (via `epsilon_diag` and `epsilon_offdiag`), a more complicated formula is used. The key point is that, even if the structure consists entirely of isotropic materials, the discretized structure will use anisotropic materials. Also, the smoothing will transform a discontinuous interface separating $\varepsilon_1$ and $\varepsilon_2$ into a continuously varying interface in the range [$\varepsilon_1$, $\varepsilon_2$]. For interface pixels, Meep computes the effective permittivity tensor automatically at the start of the simulation prior to time stepping via analytic expressions for the filling fraction and local normal vector. For details involving derivation of the effective permittivity tensor and its implementation in Meep/FDTD, see [Optics Letters, Vol. 36, pp. 2972-4, 2006](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-31-20-2972) and [Optics Letters, Vol. 35, pp. 2778-80, 2009](https://www.osapublishing.org/abstract.cfm?uri=ol-34-18-2778). +where $\textbf{P}$ is the projection matrix $P_{ij}=n_{i}n_{j}$ onto the normal $\vec{n}$. The $\langle\cdots\rangle$ denotes an average over the voxel $sΔx\times sΔy\times sΔz$ surrounding the grid point in question where $s$ is a smoothing diameter in grid units equal to 1/`resolution`. (This analysis assumes that the interface is approximately planar throughout the voxel, which will hold in the regime where the voxels are small compared to the geometric feature sizes.) If the initial materials are anisotropic (via `epsilon_diag` and `epsilon_offdiag`), a more complicated formula is used. The key point is that, even if the structure consists entirely of isotropic materials, the discretized structure will use anisotropic materials. Also, the smoothing will transform a discontinuous interface separating $\varepsilon_1$ and $\varepsilon_2$ into a continuously varying interface in the range [$\varepsilon_1$, $\varepsilon_2$]. For interface pixels, Meep computes the effective permittivity tensor automatically at the start of the simulation prior to time stepping via analytic expressions for the filling fraction and local normal vector. For details involving derivation of the effective permittivity tensor and its implementation in Meep/FDTD, see [Optics Letters, Vol. 36, pp. 2972-4 (2006)](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-31-20-2972) and [Optics Letters, Vol. 35, pp. 2778-80 (2009)](https://www.osapublishing.org/abstract.cfm?uri=ol-34-18-2778). Impact on Runtime Performance ----------------------------- diff --git a/python/materials.py b/python/materials.py index 028b6dcaa..c4f6c24c5 100644 --- a/python/materials.py +++ b/python/materials.py @@ -11,8 +11,8 @@ eV_um_scale = um_scale/1.23984193 #------------------------------------------------------------------ -# crystalline silicon (c-Si) from A. Deinega et al., J. Optical Society of America A, Vol. 28, No. 5, pp. 770-77, 2011 -# based on experimental data for intrinsic silicon at T=300K from M.A. Green and M. Keevers, Progress in Photovoltaics, Vol. 3, pp. 189-92, 1995 +# crystalline silicon (c-Si) from A. Deinega et al., J. Optical Society of America A, Vol. 28, No. 5, pp. 770-77 (2011) +# based on experimental data for intrinsic silicon at T=300K from M.A. Green and M. Keevers, Progress in Photovoltaics, Vol. 3, pp. 189-92 (1995) # wavelength range: 0.4 - 1.0 um cSi_range = mp.FreqRange(min=um_scale, max=um_scale/0.4) @@ -231,7 +231,7 @@ Si3N4_NIR = mp.Medium(epsilon=1.0, E_susceptibilities=Si3N4_NIR_susc, valid_freq_range=Si3N4_NIR_range) #------------------------------------------------------------------ -# elemental metals from A.D. Rakic et al., Applied Optics, Vol. 37, No. 22, pp. 5271-83, 1998 +# elemental metals from A.D. Rakic et al., Applied Optics, Vol. 37, No. 22, pp. 5271-83 (1998) # wavelength range: 0.2 - 12.4 um metal_range = mp.FreqRange(min=um_scale/12.398, max=um_scale/.24797) @@ -674,7 +674,7 @@ ## WARNING: unstable; field divergence may occur # aluminum (Al) -# fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985 +# fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985 Al_visible_frq0 = 1/(0.0625841659042985*um_scale) Al_visible_gam0 = 1/(0.606007002962666*um_scale) @@ -691,7 +691,7 @@ #------------------------------------------------------------------ # chroimium (Cr) -# fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985 +# fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985 Cr_visible_frq0 = 1/(0.118410119507342*um_scale) Cr_visible_gam0 = 1/(0.628596264869804*um_scale) @@ -710,7 +710,7 @@ ## WARNING: unstable; field divergence may occur # titanium (Ti) -# fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985 +# fit to E.D. Palik, Handbook of Optical Constants, Academic Press, 1985 Ti_visible_frq0 = 1/(0.101331651921602*um_scale) Ti_visible_gam0 = 1/(0.365743382258719*um_scale) @@ -882,7 +882,7 @@ InP = mp.Medium(epsilon=7.255, E_susceptibilities=InP_susc, valid_freq_range=InP_range) #------------------------------------------------------------------ -# germanium (Ge) from N. P. Barnes and M. S. Piltch, J. Optical Society America, Vol. 69, pp. 178-180, 1979 +# germanium (Ge) from N. P. Barnes and M. S. Piltch, J. Optical Society America, Vol. 69, pp. 178-180 (1979) # ref: https://refractiveindex.info/?shelf=main&book=Ge&page=Icenogle # wavelength range: 2.5 - 12 um @@ -901,7 +901,7 @@ Ge = mp.Medium(epsilon=9.28156, E_susceptibilities=Ge_susc, valid_freq_range=Ge_range) #------------------------------------------------------------------ -# silicon (Si) from C. D. Salzberg and J. J. Villa, , J. Optical Society America, Vol. 47, pp. 244-246, 1957 +# silicon (Si) from C. D. Salzberg and J. J. Villa, , J. Optical Society America, Vol. 47, pp. 244-246 (1957) # ref: https://refractiveindex.info/?shelf=main&book=Si&page=Salzberg # wavelength range: 1.36 - 11 um @@ -924,7 +924,7 @@ Si = mp.Medium(epsilon=1.0, E_susceptibilities=Si_susc, valid_freq_range=Si_range) #------------------------------------------------------------------ -# poly(methyl methacrylate) (PMMA) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7, 2009 +# poly(methyl methacrylate) (PMMA) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7 (2009) # ref: https://refractiveindex.info/?shelf=organic&book=poly%28methyl_methacrylate%29&page=Sultanova # wavelength range: 0.437 - 1.052 um @@ -939,7 +939,7 @@ PMMA = mp.Medium(epsilon=1.0, E_susceptibilities=PMMA_susc, valid_freq_range=PMMA_range) #------------------------------------------------------------------ -# polycarbonate (PC) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7, 2009 +# polycarbonate (PC) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7 (2009) # ref: https://refractiveindex.info/?shelf=organic&book=polycarbonate&page=Sultanova # wavelength range: 0.437 - 1.052 um @@ -954,7 +954,7 @@ PC = mp.Medium(epsilon=1.0, E_susceptibilities=PC_susc, valid_freq_range=PC_range) #------------------------------------------------------------------ -# polystyrene (PS) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7, 2009 +# polystyrene (PS) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7 (2009) # ref: https://refractiveindex.info/?shelf=organic&book=polystyren&page=Sultanova # wavelength range: 0.437 - 1.052 um @@ -969,7 +969,7 @@ PS = mp.Medium(epsilon=1.0, E_susceptibilities=PS_susc, valid_freq_range=PS_range) #------------------------------------------------------------------ -# cellulose (CLS) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7, 2009 +# cellulose (CLS) from N. Sultanova et al., Acta Physica Polonica A, Vol. 116, pp. 585-7 (2009) # ref: https://refractiveindex.info/?shelf=organic&book=cellulose&page=Sultanova # wavelength range: 0.437 - 1.052 um @@ -984,7 +984,7 @@ CLS = mp.Medium(epsilon=1.0, E_susceptibilities=CLS_susc, valid_freq_range=CLS_range) #------------------------------------------------------------------ -# barium borate (BaB2O4), beta phase, from G. Tamosauskas et al., Optical Materials Express, Vol. 8, pp. 1410-18, 2018 +# barium borate (BaB2O4), beta phase, from G. Tamosauskas et al., Optical Materials Express, Vol. 8, pp. 1410-18 (2018) # ref: https://refractiveindex.info/?shelf=main&book=BaB2O4&page=Tamosauskas-o # ref: https://refractiveindex.info/?shelf=main&book=BaB2O4&page=Tamosauskas-e # wavelength range: 0.188 - 5.2 um @@ -1024,7 +1024,7 @@ BaB2O4 = mp.Medium(epsilon=1.0, E_susceptibilities=BaB2O4_susc_o+BaB2O4_susc_e, valid_freq_range=BaB2O4_range) #------------------------------------------------------------------ -# lithium niobate (LiNbO3) from D.E. Zelmon et al., J. Optical Society of America B, Vol. 14, pp. 3319-22, 1997 +# lithium niobate (LiNbO3) from D.E. Zelmon et al., J. Optical Society of America B, Vol. 14, pp. 3319-22 (1997) # ref: https://refractiveindex.info/?shelf=main&book=LiNbO3&page=Zelmon-o # ref: https://refractiveindex.info/?shelf=main&book=LiNbO3&page=Zelmon-e # wavelength range: 0.4 - 5.0 um @@ -1064,7 +1064,7 @@ LiNbO3 = mp.Medium(epsilon=1.0, E_susceptibilities=LiNbO3_susc_o+LiNbO3_susc_e, valid_freq_range=LiNbO3_range) #------------------------------------------------------------------ -# calcium tungstate (CaWO4) from W.L. Bond, J. Applied Physics, Vol. 36, pp. 1674-77, 1965 +# calcium tungstate (CaWO4) from W.L. Bond, J. Applied Physics, Vol. 36, pp. 1674-77 (1965) # ref: https://refractiveindex.info/?shelf=main&book=CaWO4&page=Bond-o # ref: https://refractiveindex.info/?shelf=main&book=CaWO4&page=Bond-e # wavelength range: 0.45 - 4.0 um @@ -1096,7 +1096,7 @@ CaWO4 = mp.Medium(epsilon=1.0, E_susceptibilities=CaWO4_susc_o+CaWO4_susc_e, valid_freq_range=CaWO4_range) #------------------------------------------------------------------ -# calcium carbonate (CaCO3) from G. Ghosh, Optics Communication, Vol. 163, pp. 95-102, 1999 +# calcium carbonate (CaCO3) from G. Ghosh, Optics Communication, Vol. 163, pp. 95-102 (1999) # ref: https://refractiveindex.info/?shelf=main&book=CaCO3&page=Ghosh-o # ref: https://refractiveindex.info/?shelf=main&book=CaCO3&page=Ghosh-e # wavelength range: 0.204 - 2.172 um @@ -1128,7 +1128,7 @@ CaCO3 = mp.Medium(epsilon_diag=mp.Vector3(1.73358749,1.73358749,1.35859695), E_susceptibilities=CaCO3_susc_o+CaCO3_susc_e, valid_freq_range=CaCO3_range) #------------------------------------------------------------------ -# silicon dioxide (SiO2) from G. Ghosh, Optics Communication, Vol. 163, pp. 95-102, 1999 +# silicon dioxide (SiO2) from G. Ghosh, Optics Communication, Vol. 163, pp. 95-102 (1999) # ref: https://refractiveindex.info/?shelf=main&book=SiO2&page=Ghosh-o # ref: https://refractiveindex.info/?shelf=main&book=SiO2&page=Ghosh-e # wavelength range: 0.198 - 2.0531 um @@ -1160,7 +1160,7 @@ SiO2_aniso = mp.Medium(epsilon_diag=mp.Vector3(1.28604141,1.28604141,1.28851804), E_susceptibilities=SiO2_susc_o+SiO2_susc_e, valid_freq_range=SiO2_range) #------------------------------------------------------------------ -# gallium nitride (GaN), alpha phase (wurtzite), from A.S. Barker Jr. and M. Ilegems, Physical Review B, Vol. 7, pp. 743-50, 1973 +# gallium nitride (GaN), alpha phase (wurtzite), from A.S. Barker Jr. and M. Ilegems, Physical Review B, Vol. 7, pp. 743-50 (1973) # ref: https://refractiveindex.info/?shelf=main&book=GaN&page=Barker-o # ref: https://refractiveindex.info/?shelf=main&book=GaN&page=Barker-e # wavelength range: 0.35 - 10 um @@ -1188,7 +1188,7 @@ GaN = mp.Medium(epsilon_diag=mp.Vector3(3.6,3.6,5.35), E_susceptibilities=GaN_susc_o+GaN_susc_e, valid_freq_range=GaN_range) #------------------------------------------------------------------ -# aluminum nitride (AlN) from J. Pastrnak and L. Roskovcova, Physica Status Solidi, Vol. 14, K5-8, 1966 +# aluminum nitride (AlN) from J. Pastrnak and L. Roskovcova, Physica Status Solidi, Vol. 14, K5-8 (1966) # ref: https://refractiveindex.info/?shelf=main&book=AlN&page=Pastrnak-o # ref: https://refractiveindex.info/?shelf=main&book=AlN&page=Pastrnak-e # wavelength range: 0.22 - 5 um @@ -1220,7 +1220,7 @@ AlN_aniso = mp.Medium(epsilon_diag=mp.Vector3(3.1399,3.1399,3.0729), E_susceptibilities=AlN_susc_o+AlN_susc_e, valid_freq_range=AlN_range) #------------------------------------------------------------------ -# alumina/sapphire (Al2O3) from I.H. Malitson and M.J. Dodge, J. Optical Society of America, Vol. 62, pp. 1405, 1972 +# alumina/sapphire (Al2O3) from I.H. Malitson and M.J. Dodge, J. Optical Society of America, Vol. 62, pp. 1405 (1972) # ref: https://refractiveindex.info/?shelf=main&book=Al2O3&page=Malitson-o # ref: https://refractiveindex.info/?shelf=main&book=Al2O3&page=Malitson-e # wavelength range: 0.2 - 5 um @@ -1260,7 +1260,7 @@ Al2O3_aniso = mp.Medium(epsilon=1, E_susceptibilities=Al2O3_susc_o+Al2O3_susc_e, valid_freq_range=Al2O3_range) #------------------------------------------------------------------ -# yttrium oxide (Y2O3) from Y. Nigara, Japanese J. of Applied Physics, Vol. 7, pp. 404-8, 1968 +# yttrium oxide (Y2O3) from Y. Nigara, Japanese J. of Applied Physics, Vol. 7, pp. 404-8 (1968) # ref: https://refractiveindex.info/?shelf=main&book=Y2O3&page=Nigara # wavelength range: 0.25 - 9.6 um @@ -1279,7 +1279,7 @@ Y2O3 = mp.Medium(epsilon=1.0, E_susceptibilities=Y2O3_susc, valid_freq_range=Y2O3_range) #------------------------------------------------------------------ -# undoped yttrium aluminum garnet (YAG) from D.E. Zelmon et al., Applied Optics, Vol. 37, 4933-5, 1998 +# undoped yttrium aluminum garnet (YAG) from D.E. Zelmon et al., Applied Optics, Vol. 37, 4933-5 (1998) # ref: https://refractiveindex.info/?shelf=main&book=Y3Al5O12&page=Zelmon # wavelength range: 0.4 - 5.0 um @@ -1298,7 +1298,7 @@ YAG = mp.Medium(epsilon=1.0, E_susceptibilities=YAG_susc, valid_freq_range=YAG_range) #------------------------------------------------------------------ -# cadmium telluride (CdTe) from D.T.F. Marple, J. Applied Physics, Vol. 35, pp. 539-42, 1964 +# cadmium telluride (CdTe) from D.T.F. Marple, J. Applied Physics, Vol. 35, pp. 539-42 (1964) # ref: https://refractiveindex.info/?shelf=main&book=CdTe&page=Marple # wavelength range: 0.86 - 2.5 um diff --git a/python/simulation.py b/python/simulation.py index 99a5b8330..5315a4905 100644 --- a/python/simulation.py +++ b/python/simulation.py @@ -218,8 +218,8 @@ def __init__(self, thickness, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML - absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, - 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For + absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92 + (2008)](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `pml_profile=lambda u: u*u*u`. """ @@ -275,14 +275,14 @@ class Absorber(PML): - No true PML exists for *periodic* media, and a scalar absorber is computationally less expensive and generally just as good. See [Optics Express, Vol. 16, pp. - 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). + 11376-92 (2008)](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). - PML can lead to *divergent* fields for certain waveguides with "backward-wave" modes; this can readily occur in metals with surface plasmons, and a scalar - absorber is your only choice. See [Physical Review E, Vol. 79, 065601, - 2009](http://math.mit.edu/~stevenj/papers/LohOs09.pdf). + absorber is your only choice. See [Physical Review E, Vol. 79, 065601 + (2009)](http://math.mit.edu/~stevenj/papers/LohOs09.pdf). - PML can fail if you have a waveguide hitting the edge of your cell *at an angle*. - See [J. Computational Physics, Vol. 230, pp. 2369-77, - 2011](http://math.mit.edu/~stevenj/papers/OskooiJo11.pdf). + See [J. Computational Physics, Vol. 230, pp. 2369-77 + (2011)](http://math.mit.edu/~stevenj/papers/OskooiJo11.pdf). """ diff --git a/python/source.py b/python/source.py index 52d3e3fc6..63887314e 100644 --- a/python/source.py +++ b/python/source.py @@ -383,33 +383,34 @@ def __init__(self, """ Construct an `EigenModeSource`. - + **`eig_band` [`integer` or `DiffractedPlanewave` class]** — Either the index *n* (1,2,3,...) of the desired band - ω*n*(**k**) to compute in MPB where 1 denotes the lowest-frequency - band at a given **k** point, and so on, or alternatively a diffracted planewave in homogeneous media. + + **`eig_band` [`integer` or `DiffractedPlanewave` class]** — Either the index $n$ + (1,2,3,...) of the desired band $\\omega_n(\\mathbf{k})$ to compute in MPB where + 1 denotes the lowest-frequency band at a given $\\mathbf{k}$ point, and so on, + or alternatively a diffracted planewave in homogeneous media. + **`direction` [`mp.X`, `mp.Y`, or `mp.Z;` default `mp.AUTOMATIC`], `eig_match_freq` [`boolean;` default `True`], `eig_kpoint` [`Vector3`]** — By default (if `eig_match_freq` is `True`), Meep tries to find a mode with the same - frequency ω*n*(**k**) as the `src` property (above), by scanning - **k** vectors in the given `direction` using MPB's `find_k` functionality. + frequency $\\omega_n(\\mathbf{k})$ as the `src` property (above), by scanning + $\\mathbf{k}$ vectors in the given `direction` using MPB's `find_k` functionality. Alternatively, if `eig_kpoint` is supplied, it is used as an initial guess for - **k**. By default, `direction` is the direction normal to the source region, + $\\mathbf{k}$. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `mp.NO_DIRECTION`, then `eig_kpoint` is - not only the initial guess and the search direction of the **k** vectors, but is + not only the initial guess and the search direction of the $\\mathbf{k}$ vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Python_Tutorials/Eigenmode_Source.md#oblique-waveguides) (not perpendicular to the source plane). If `eig_match_freq` is `False`, then the - **k** vector of the desired mode is specified with `eig_kpoint` (in Meep units + $\\mathbf{k}$ vector of the desired mode is specified with `eig_kpoint` (in Meep units of 2π/(unit length)). Also, the eigenmode frequency computed by MPB overwrites the `frequency` parameter of the `src` property for a `GaussianSource` and `ContinuousSource` but not `CustomSource` (the `width` or any other parameter of - `src` is unchanged). By default, the **k** components in the plane of the source + `src` is unchanged). By default, the $\\mathbf{k}$ components in the plane of the source region are zero. However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the - `k_point` parameter, then the mode's **k** components in those directions will + `k_point` parameter, then the mode's $\\mathbf{k}$ components in those directions will match `k_point` so that the mode satisfies the Meep boundary conditions, - regardless of `eig_kpoint`. Note that once **k** is either found by MPB, or + regardless of `eig_kpoint`. Note that once $\\mathbf{k}$ is either found by MPB, or specified by `eig_kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\\mathbf{u}_{n,\\mathbf{k}}(\\mathbf{r})$, multiplied by the appropriate