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 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
The PMLs damp a certain wavelength existing in the system. The wavelength is deducted from the frequency and a reference wave speed cref. The wave speed is defined in the Typical Wave Speed section. Set cref equal to the speed of sound of the material in the PML.
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. 41).
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.