# PML boundary conditions

This section discusses the issues that must be taken into consideration when employing perfectly matched layer (PML) absorbing boundaries. A new PML boundary condition formulation was introduced in the 2015a release of the FDTD and varFDTD solvers. The new formulation is based on the stretched coordinate formulation proposed by Gedney and Zhao.

## Introduction

By construction, PML absorbing boundary conditions are impedance matched to the simulation region and its materials1. This allows them to absorb light waves (both propagating and evanescent) with minimal reflections. An ideal PML boundary produces zero reflections, however, in practice, there will always be small reflections due to the discretization of the underlying PML equations. Furthermore, as a consequence of using finite difference approximations to discretize the PML equations, there is some chance of producing numerical instabilities2. The goal of this section is to outline best practices for minimizing reflection errors and getting rid of numerical instabilities without increasing simulation times unnecessarily.

## PML Type

A new PML boundary condition formulation was introduced in the 2015a release of the FDTD and varFDTD solvers. The new formulation is based on the stretched coordinate formulation proposed by Gedney and Zhao2. The previously employed PML formulation (based on a uniaxial anisotropic material formulation) can still be used, and any project file that was created using the old PML formulation will continue to use it unless the PML type is updated at the top of the PML settings table.

## PML Profiles

In FDTD or varFDTD simulation regions, the user can directly specify all the parameters that control the absorption properties of the selected PML boundaries (see the screenshot on the right). To facilitate the selection of PML parameters, a number of profiles are available on the PML settings table under the boundary conditions tab. Under most simulation scenarios, the user only needs to choose one of the predefined profiles (standard, stabilized, steep angle and custom) and fine tune the number of layers. For all profiles, increasing the number of layers will usually lead to lower reflections. Having said that, each profile has a different numerical behavior and was designed with a particular application in mind.

### PML Profile options

**Standard**

The standard profile was designed to provide good overall absorption with a relatively small number of layers. Large numbers of PML layers can significantly increase simulation times, so it is suggested to try this profile before considering any of the remaining choices. If a simulation does not contain material boundaries that cut through PML regions, this profile will almost certainly be the most sensible choice. In general, PML boundaries perform best when structures extend completely through the PML region. Whenever material interfaces cut through a PML region, it may be necessary to employ the stabilized profile.

**Stabilized**

When material boundaries cut through PML regions, there is some chance that numerical instabilities will appear. These usually manifest themselves as a localized exponential growth of the field amplitudes inside the PML regions (usually near material interfaces). Most numerical instabilities that can occur inside PML regions will go away with the use of this profile, however, this profile will require a higher number of PML layers than the standard profile to achieve the same absorption performance. The stabilized profile was designed to provide enhanced stability at the expense of having to increase the number of PML layers.

**Steep Angle**

This profile is very similar to the standard profile, and it is meant to be used when PML boundaries are combined with periodic boundary conditions. It is designed to provide enhanced absorption in situations where light travels in directions that are nearly parallel to PML boundaries. This profile is usually less absorptive than the standard profile at very coarse discretizations (less than ten points per wavelength).

**Custom**

The standard, stabilized and steep anlge profiles have fixed PML parameters. The custom profile allows users to experiment by giving the user full control over all the PML parameter values. The initial values of the custom profile are those of the standard profile.

Setting PML parameters for boundaries in all diections

### Using Different Profiles for Different Boundaries

PML profiles can be set individually for each PML boundary. This option can be enabled by un-checking the option "SAME SETTINGS ON ALL BOUNDARIES" at the top of the PML settings table (see the screenshot on the right). This option allows users to make changes - like increasing the number of layers - only on the boundaries that actually need them.

Using different PML profiles for different boundaries can significantly reduce simulation times. The example on the right shows the PML settings table for a 3D simulation where a stabilized profile is only needed on the x min boundary. Using the stabilized profile on all boundaries would lead to much longer simulation times, so it is recommended to increase the number of layers only on the boundaries that actually need them.

### FDE vs. varFDTD and FDTD Solvers

In FDE simulation regions, the user can also specify the parameters that control the absorption properties of PML boundaries. From the onset, the FDE solver has employed a stretched coordinate PML formulation. Unlike the FDTD and varFDTD solvers, the FDE solver does not come with predefined profiles, and it employs a fixed number of layers.

## PML Parameters

Unlike conventional boundary conditions, PML boundaries have a finite thickness. In other words, they occupy a finite volume that surrounds the simulation region. It is within this volume that the absorption of light happens.

- LAYERS: For discretization purposes, PML regions are divided into layers.

- KAPPA, SIGMA, ALPHA : The absorption properties of PML regions are controlled by three parameters. Their definition can be found in the second reference at the top of this page. Kappa is unitless by definition, but sigma and alpha must be entered into the PML settings table as normalized unitless values. Kappa, sigma and alpha are all graded inside the PML regions using polynomial functions. Parameter alpha is sometimes described as a complex frequency shift (CFS) in the literature2. Its main role is to improve numerical stability. Increasing the ratio alpha / sigma will make a a PML boundary more stable, but it will reduce its absorption effectiveness; this is why the stabilized profile requires a larger number of layers. To recover the S.I. unit values of alpha and sigma, it is necessary to multiply by twice the permittivity of free space and divide by the time step employed in the simulation.
- POLYNOMIAL: It specifies the order of the polynomial used to grade kappa and sigma.
- ALPHA POLYNOMIAL: It specifies the order of the polynomial used to grade alpha.
- MIN LAYERS, MAX LAYERS: They enforce a sensible range of values for the number of PML layers.