Skip to content

Add adiabatic absorbing boundaries - #81

Open
AlexDFischer wants to merge 10 commits into
gdsfactory:mainfrom
AlexDFischer:feat/absorbing_boundaries
Open

AlexDFischer wants to merge 10 commits into
gdsfactory:mainfrom
AlexDFischer:feat/absorbing_boundaries

Conversation

@AlexDFischer

Copy link
Copy Markdown
Contributor

Summary

There is now a class AbsorberParams that can be passed to a Mesh2D via parameters absorbing_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:
image
Resulting imaginary part of refractive index:
image

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:

image image

Increasing the PML thickness fails to make the loss of this mode converge in a reasonable length, while it does converge with adiabatic absorbers:

image

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:

image image

PMLs show gain (!!) while adiabatic absorbers correctly show loss in this leaky mode:

image

Other miscellaneous additions I made that were helpful, in the course of making this feature:

  • The user can pass draw_pml=True or draw_absorbers=True to the Cell and CrossSection visualization function to see transparent grey boxes overlaying the PMLs and absorbers respectively. Both are True by default. Examples:
image image
  • The user can pass draw_mesh=True to the same visualization functions to see the mesh. mesh_draw_option can be primal, dual, or full. Example:
image
  • The user can pass index_part="imag" to CrossSection visualization function to visualize extinction. Default behavior is index_part="real". This was used to make the above Im[n] plot.
  • Helper property loss_dB_per_um in Mode. 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

  • A few tests that the various options for absorbers the user can pass (e.g., absorbing_boundary for all sides, absorbing_boundary_x for left and right, absorbing_boundary_left for left only, and similar options for right/y/top/bottom) resolve correctly into left/right/top/bottom absorbers.
  • A test that with different absorber options at different boundaries, the imaginary parts of n_full, nx, ny, and nz from a CrossSection correctly ramp up towards the boundaries and are 0 in the interior.
  • Visualization tests that test that the PMLs and absorbing boundaries are drawn on plots when requested.
  • I added tests that the Lumerical and MEEP backends do not support this feature and raise NotImplementedError if the user tries with them. I also added tests that ensure that these backends raise NotImplementedError for 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.

@AlexDFischer AlexDFischer changed the title Adiabatic absorbing boundaries Add adiabatic absorbing boundaries Nov 23, 2026
@github-actions github-actions Bot added the feat New feature or request label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant