Skip to content
BeamZ BeamZ

CPML

A convolutional perfectly matched layer (CPML) absorbs outgoing radiation around the useful domain. It modifies spatial derivatives and adds memory variables to the Yee updates.

Why a matched layer

Simply stopping the grid creates a reflecting boundary. Adding ordinary electric conductivity absorbs energy, but its impedance change can also reflect the incoming wave. A PML transforms Maxwell’s equations so that the ideal continuous interface is matched while waves decay inside the layer.

The finite, discretized layer is not perfectly reflectionless. Grid resolution, thickness, material variation, and incidence angle affect its performance. The coordinate-stretch interpretation is developed in Steven G. Johnson’s Notes on Perfectly Matched Layers.

Stretched derivatives

Using the e−iωte^{-i\omega t} convention, replace a derivative in direction uu by

∂∂u⟶1su(ω)∂∂u,su(ω)=κu+σuαu−iωε0.\frac{\partial}{\partial u}\longrightarrow \frac{1}{s_u(\omega)}\frac{\partial}{\partial u}, \qquad s_u(\omega)=\kappa_u+ \frac{\sigma_u}{\alpha_u-i\omega\varepsilon_0}.

Here κu≥1\kappa_u\ge1 is dimensionless, while σu≥0\sigma_u\ge0 and αu≥0\alpha_u\ge0 have conductivity units in this convention. These are artificial PML parameters, not the physical conductivity of the device. The magnetic stretching uses the matched counterpart; a magnetic conductivity formulation requires the corresponding electric/magnetic scaling.

The frequency dependence of 1/su1/s_u becomes a convolution in time. CPML evaluates that convolution recursively instead of storing the entire field history.

A memory recurrence

Let DuFD_uF be one ordinary finite-difference derivative in a curl. Replace it by

D~uFq=1κuDuFq+ψuq,ψuq=buψuq−1+auDuFq,\widetilde D_uF^q=\frac{1}{\kappa_u}D_uF^q+\psi_u^q, \qquad \psi_u^q=b_u\psi_u^{q-1}+a_uD_uF^q,

where successive values of qq refer to successive updates of that same derivative, separated by Δt\Delta t. The coefficients are

bu=exp⁡[−(σuκu+αu)Δtε0],b_u=\exp\left[-\left(\frac{\sigma_u}{\kappa_u}+\alpha_u\right) \frac{\Delta t}{\varepsilon_0}\right],au=σuκu(σu+κuαu)(bu−1).a_u=\frac{\sigma_u}{\kappa_u(\sigma_u+\kappa_u\alpha_u)}(b_u-1).

Initialize the memories to zero. When both σu\sigma_u and αu\alpha_u vanish, set au=0a_u=0 explicitly instead of evaluating 0/00/0. In the interior, κu=1\kappa_u=1 and the zero memory restores the original derivative.

Each affected derivative has its own memory. For TMz, the two derivatives of EzE_z used to update Hx,HyH_x,H_y and the two derivatives of HH used to update EzE_z need distinct memories. Electric and magnetic updates also sample profiles at their own staggered positions. The recurrence and coefficient convention above match BeamZ’s CPML kernel.

The recursive convolution approach was introduced for this application by Roden and Gedney.

Grading the absorption

Let ξ\xi run from zero at the interior interface to one at the outer boundary. A common family of profiles is

σ(ξ)=σmax⁡ξm,κ(ξ)=1+(κmax⁡−1)ξm,α(ξ)=αmax⁡(1−ξ).\sigma(\xi)=\sigma_{\max}\xi^m,\qquad \kappa(\xi)=1+(\kappa_{\max}-1)\xi^m,\qquad \alpha(\xi)=\alpha_{\max}(1-\xi).

These expressions illustrate smooth grading, not fixed BeamZ defaults. A gradual onset reduces discretization reflections. The frequency shift α\alpha changes the memory decay and can improve absorption of slowly varying or evanescent fields. Increasing absorption strength alone can make the spatial transition harder to resolve, so stronger is not always better.

Placement and convergence

Keep sources and measurement planes in the physical interior, with a buffer between localized fields and the absorber. Continue exiting waveguides through the layer; terminating their material at its entrance creates a physical discontinuity.

Compare a result with a thicker layer and, separately, a larger physical buffer. For resolution studies, hold physical layer thickness fixed so that refinement adds cells through the absorber. Grazing waves, slow modes, and some inhomogeneous or periodic media can be difficult for PML; see Meep’s discussion of PML limitations.

To estimate reflected power, separate forward and backward modes on an interior plane or time-gate an isolated reflected pulse. A standing-wave pattern alone cannot distinguish reflection from the device from reflection at the boundary.

Continue to Mode Sources.