Perfectly Matched Layers (PMLs)
The perfectly matched layer (PML) is a domain or layer (sometimes called sponge layer) that is added to an acoustic model to mimic an open and nonreflecting infinite domain. It sets up a perfectly absorbing domain as an alternative to nonreflecting boundary conditions. The PML works with all types of waves, not only plane waves. It is also efficient at very oblique angles of incidence. In the frequency domain the PML imposes a complex-valued coordinate transformation to the selected domain that effectively makes it absorbing at a maintained wave impedance, and thus eliminating reflections at the interface. In the time domain, additional equations are solved in the PML for the inverse Laplace transformed equations.
A Perfectly Matched Layers () is added to the model in the Definitions node in the component where the physics is solved. In the frequency domain the PMLs can be used for the Pressure Acoustics, Acoustic-Structure Interaction, Aeroacoustics, and Thermoviscous Acoustics interfaces. In the time domain the PMLs only exist for the Pressure Acoustics, Transient interface. Note that for Pressure Acoustics, Frequency Domain models, the Perfectly Matched Boundary is an alternative to the PML for radiation and scattering problems. This boundary conditions applies the PML automatically using the extra dimension machinery of COMSOL Multiphysics.
In this section:
Geometry of the PML Layer
When creating the geometry for your model, it is advantageous to use the Layers feature in the geometry to create the PML domains. This ensures that the geometry is suited for a structured mesh. The physical thickness of the layers is not important in frequency domain models. Here a real stretching is applied to mathematically scale the thickness relative to the wavelength. The thickness should however be such that the mesh is more or less regular (avoid too thin mesh elements). In the time domain the thickness is important, see Time Domain Perfectly Matched Layers for details.
If the PML is located close to a radiating source or a scatterer, evanescent wave components can interact with the PML stretching and generate unphysical reflections. This can be avoided by tuning the Coordinate Stretching, Scaling, and Curvature parameters. To further prevent this, it is also recommended to place the PML more than λ/8 away from these surfaces, but it is not necessary, if the PML parameters are tuned correctly.
Geometry Type (User Defined Option)
When setting up a PML, you select the geometry type of the layer. This is only related to how the layer looks in the geometry. Typically, the predefined options Cartesian, Cylindrical, or Spherical can apply in most situations. Using these, COMSOL will automatically detect the layer thickness and define the local coordinates inside the PML. In some cases the automatic detection can fail (this can, for example, happen for certain imported CAD geometries). The automatic detection also fails if the domain is not the outer most entity in the geometry.
A workaround, when the automatic detection fails, is then to use the User defined geometry type. This advanced option makes it possible to define the local Distance functions and layer Thickness manually. For example, for a spherical PML geometry the typical distance function is sqrt(x^2+y^2+z^2)-r0, where r0 is the radius of the inner domain. The user-defined option can also be used for special layer shapes.
To verify that the geometry detection is correct, or a user defined geometry type is set up correctly, it can be useful to plot the normalized distance functions of the PMLs. The values should lie be between 0 and 1. Select Get Initial Value on the study (it is not necessary to solve) and then plot the variable <tag>.sDist<i>, where <tag> is the PML tag (pml1, pml2, and so on) and a number <i> (1, 2, and so on) is added if several stretching functions are used in the PML, for example in a corner.
Infinite Elements, Perfectly Matched Layers, and Absorbing Layers in the COMSOL Multiphysics Reference Manual
In the following model a user defined geometry type is used: Headphone on an Artificial Ear: Application Library path Acoustics_Module/Electroacoustic_Transducers/headphone_artificial_ear
Meshing the PMLs
Optimal behavior of the PML is achieved when the mesh inside the PML domain is structured. Use a mapped mesh in 2D models and a swept mesh in 3D models. Use at least 8 layers when using the default polynomial stretching option. As a good starting point for the rational stretching use 5 or 6 mesh layers inside the PML.
Coordinate Stretching, Scaling, and Curvature
The choice of the Coordinate stretching type and the PML scaling factor and the PML curvature parameter depends on the problem at hand. A detailed description is given in the PML Implementation section of the COMSOL Multiphysics Reference Manual. In general, the Rational stretching option is used for open radiation problems for propagating waves (it is efficient for many angles of incidence). The Polynomial stretching option is good for systems with a mix of different wave types, for example, in multiphysics problems involving structural and acoustic waves, or problems containing a combination of propagating and evanescent waves. For the polynomial stretching type, the PML scaling curvature parameter can in general be increase to a value between 3 and 5 for better performance at low frequencies. Note that when solving a model using an iterative solver the Polynomial scaling should always be used to ensure convergence.
The polynomial stretching should also be used at the end of waveguides. However, in pressure acoustics (and thermoviscous acoustic) models you should use the Port condition as the waveguide termination as is provides a superior nonreflecting condition.
There is also a User Defined coordinate stretching type which allow users to define advanced stretching functions to handle special cases. The stretching can in this way be optimized to a special problem.
To ensure that the PML is working optimally, it is good practice to make a mesh convergence test by refining (adding more layers to) the structured mesh in the PML domain. This is especially important at low frequencies, where evanescent waves may interact with the PML and give erroneous solutions.
The behavior of the PMLs at low frequencies is discussed in the following model. Plotting the total radiated power can be a good indicator of possible issues. Lumped Loudspeaker Driver: Application Library path Acoustics_Module/Electroacoustic_Transducers/lumped_loudspeaker_driver
Infinite Elements, Perfectly Matched Layers, and Absorbing Layers in the COMSOL Multiphysics Reference Manual
Limitations of the Perfectly Matched Layers
When a model contains a Background Pressure Field and PMLs, certain configurations will create incompatibilities that lead to erroneous behavior. The problem arises if a domain with a background pressure field is next to a domain without the feature (for example when setting up absorption problems) and the two domains have a common PML attached to them. Meaning that the PML next to the background pressure field touches the PML next to the domain without the background pressure field. In this case, there is an incompatibility at the common edge of the PMLs. In one PML domain the pressure DOF is interpreted as a scattered field, while it is the total field in the other. Note that you can set up models that contain this feature configuration as long as the PMLs do not touch.
When a perfectly matched layer (PML) is present in the model do not apply an Incident Pressure Field on its outer boundaries. The PML is applied to absorb waves that move out of the computational domain. Defining an incident field on its boundary will lead to unphysical results.
Time Domain Perfectly Matched Layers
In the time domain the PML does not include a real stretching component. This means that the geometrical thickness L, of the layer in the geometry, needs to be set adequately. When meshing the PMLs for time domain simulations, it is recommended to use a structured mesh in the same way as in the frequency domain. Use at least 8 mesh layers for the rational scaling and 6 for the polynomial scaling and the same mesh element size as that in the adjacent physical domain (a detailed investigation is available in Ref. 42).
The frequency content of the transient signal should be considered when defining the layer thickness L. Assume most of th energy is carried in a band from fmin to fmax. This represents wavelengths from λmax to λmin (remember λ = c/f). The geometrical thickness of the layer has two considerations to fulfill:
1
2
In the limit of a signal with a narrow band frequency content (or a single frequency), the two points will be fulfilled by defining a thickness L = λ.
The recommended values of the PML scaling factor and the PML scaling curvature parameter are 1, 3 and 1, 1 for the Polynomial and the Rational stretching types, respectively. For the Polynomial stretching, the PML scaling factor equal to 1 corresponds to the theoretical reflection coefficient R0 = 10-3 from the interface between the physical domain and the PML for a plane wave.
Note that the absence of a real stretching makes the time domain PMLs unable to efficiently absorb evanescent waves.
In the settings for the Perfectly Matched Layer it is important that if you change the Typical wavelength from option to User defined, then it is not the actual wavelength that should be entered but rather the speed of sound per Hertz. For example, if User defined is selected in a normal air domain, then enter 343[m/s]/1[Hz]. The reason is that in the time domain the PML is not related to wavelength but to speed of sound. Transient signals typically include many Fourier frequency components.
Perfectly Matched Layers in an Eigenfrequency Analysis
Care should be taken if a perfectly matched layer (PML) is used when performing an eigenfrequency analysis. Because the frequency is not a priori known (it is solved for), the real scaling of PML will be defined with the typical wavelength set equal to the PML layer thickness. To obtain adequate scaling and absorption, the Typical wavelength from should be set to User defined and wavelength entered, given at the expected eigenfrequency looked for (remember λ = c/f). In practice the solution will only be correct in the vicinity of that frequency. Use the Search for eigenfrequencies around option to tune the analysis.
Note also that the PML is a mathematical, unphysical construction. Firstly, this means that it will introduce damping into the model. This will typically reflect in a complex valued eigenfrequency (where the magnitude of the complex part cannot be associated with a physical damping mechanism). Secondly, spurious (unphysical) modes inside of the PML can exist. Therefore, it is always important to inspect the computed modes to ensure that they represent a physical solution.
Typically, a good approach is to use a radiation condition instead of a PML in open problems, solved in an eigenfrequency study.