Repository navigation
Add adiabatic absorbing boundaries - #81
Open
AlexDFischer wants to merge 10 commits into
Open
AlexDFischer wants to merge 10 commits into
AlexDFischer wants to merge 10 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
There is now a class


AbsorberParamsthat can be passed to aMesh2Dvia parametersabsorbing_boundary,absorbing_boundary_x,absorbing_boundary_left,absorbing_bondary_right, and likewise for y/top/bottom. These specify absorbing boundaries that add an imaginary part to the refractive index that ramps up as L^3 (the user can specify the exponent and max value of the polynomial) from the start of the boundary to the end. This implements adiabatic absorbers from Oskooi et al. "The failure of perfectly matched layers, and towards their redemption by adiabatic absorbers". Here's what they might look like:Resulting imaginary part of refractive index:
PMLs are usually the preferred absorbing boundaries, as they suppress reflections with less extra simulation volume than these adiabatic absorbers under most circumstances, however there are a few notable circumstances under which they fail to suppress reflections and adiabatic absorbers are more appropriate. 2 notable such circumstances relevant to EME/mode solves include spatially varying (in the direction perpendicular to the boundary) structures extending into the boundary, and plasmonic modes with opposite-direction group and phase velocities. Examples below:
Spatially varying (in the direction orthogonal to the boundary) media extending into the boundary is a known case where PMLs fail to absorb. See the following cross section, and mode solve with adiabatic boundaries. Grey boxes are absorbers:
Increasing the PML thickness fails to make the loss of this mode converge in a reasonable length, while it does converge with adiabatic absorbers:
Another example is plasmonic modes, which don't play nicely with PMLs due to the group and phase velocity being in opposite directions. I don't fully understand the physics here (I should learn more about plasmonics), so I'll just drop this paper here that explains how PMLs fail when group and phase velocity point in opposite directions: Loh e. al. Fundamental relation between phase and group velocity, and application to the failure of perfectly matched layers in backward-wave structures. Here's a cross section and mode solve that shows a conventional dielectric waveguide mode leaking into a plasmonic mode that is not confined horizontally. Again, the grey boxes are absorbers, and the imaginary refractive index material acts like a metal here:
PMLs show gain (!!) while adiabatic absorbers correctly show loss in this leaky mode:
Other miscellaneous additions I made that were helpful, in the course of making this feature:
draw_pml=Trueordraw_absorbers=Trueto theCellandCrossSectionvisualization function to see transparent grey boxes overlaying the PMLs and absorbers respectively. Both areTrueby default. Examples:draw_mesh=Trueto the same visualization functions to see the mesh.mesh_draw_optioncan beprimal,dual, orfull. Example:index_part="imag"toCrossSectionvisualization function to visualize extinction. Default behavior isindex_part="real". This was used to make the above Im[n] plot.loss_dB_per_uminMode. I've written variants of this function a million different times, so I figured it should be built in. I defaulted the units to dB/um, since different users will want per cm or per m or per mm, so the user can convert themselves with a simple power of 10, instead of having to remember or look up where to put the factors of 20 log10(e) and such.Tests
absorbing_boundaryfor all sides,absorbing_boundary_xfor left and right,absorbing_boundary_leftfor left only, and similar options for right/y/top/bottom) resolve correctly into left/right/top/bottom absorbers.n_full,nx,ny, andnzfrom aCrossSectioncorrectly ramp up towards the boundaries and are 0 in the interior.NotImplementedErrorif the user tries with them. I also added tests that ensure that these backends raiseNotImplementedErrorfor other features they don't support, like anisotropic and spatially varying materials for both Lumerical and MEEP, and PMLs and complex refractive indices for MEEP.