PDF

Gaussian Pulse Absorption by Perfectly Matched Layers: Pressure Acoustics, Transient
Introduction
This tutorial model is a test and benchmark model for perfectly matched layers (PML) in the time domain. PMLs are widely used for problems of wave propagation in open domains. A perfectly matched layer is supposed to meet two main requirements. First, a wave must propagate without spurious reflections from the interface between the physical domain and the PML. Second, a PML must ensure long time stability of the numerical solution.
The model solves the same problem as in Gaussian Pulse in 2D Uniform Flow: Convected Wave Equation and Absorbing Layers in the absence of the background flow. The Pressure Acoustics, Transient interface solves the wave equation in a squared computational domain and the Perfectly Matched Layers surround the computational domain suppressing the reflections from the outer boundary. An acoustic pulse is generated by an initial Gaussian distribution at the center of the computational domain. An analytical solution to the problem exists and is used to validate the solution. The model shows how to set up and use the PMLs.
For more information about PMLs in acoustics, see the section Modeling with the Pressure Acoustics Branch (FEM-Based Interfaces) in the Acoustics Module User’s Guide.
Model Definition
The computational domain with perfectly matched layers is depicted in Figure 1. The model is set up in a dimensionless system where the speed of sound c= 1 and the density ρ0 = 1. The Gaussian pulse is emitted at the origin x = 0 with initial values
(1)
where α = ln(2)/9 and β = 0.04. Since the velocity u = (u, v) does not enter the wave equation explicitly, the two last initial values are reformulated in terms of the first time derivative of the pressure. The use of the mass conservation law yields
The Gaussian pulse parameters and the expressions for the initial values are included to the model as parameters and variables.
The analytical solution to Equation 1 is given by (see Ref. 1)
In the model, the integrate() operator is used to express the analytical solution. The integration is performed on a finite interval.
Figure 1: Geometry: physical domain and perfectly matched layers.
Results and Discussion
The propagation of the acoustic pulse is depicted in Figure 2. It shows the distribution of the acoustic pressure across the computational domain at four time steps. By the time t = 30, the pulse has entered the PML domain without any reflections from the interface between the physical domain and the PMLs. The pressure at the final simulated time t = 120 is depicted in Figure 3. By this time, the pulse has left the computational domain. There are no visible signals propagating back to the physical domain, which asserts the long-time stability of the perfectly matched layers.
In the next two figures, the simulated results are compared with the analytical solution. In Figure 4, the pressure at point (20, 10) is depicted as function of time. In Figure 5, the pressure is depicted along the x-axis at t = 40. Both show very good agreement with the analytical solution.
Figure 6 shows the frequency spectrum of the signal at point (20, 10).
Figure 2: The pressure profile at different time steps.
Figure 3: The pressure profile at the final simulated time t = 120.
Figure 4: The pressure as function of time at point (x, y) = (20, 10). The model solution compared with the analytical solution.
Figure 5: Pressure profile along the x-axis at t = 40 comparing the analytical solution with the COMSOL solution.
Figure 6: Frequency spectrum of the signal at point (x, y) = (20, 10).
Reference
1. H.L. Atkins and C.W. Shu, “Quadrature-Free Implementation of Discontinuous Galerkin Method for Hyperbolic Equations,” AIAA Journal, vol. 36, pp. 775–782, 1998.
Application Library path: Acoustics_Module/Tutorials,_Pressure_Acoustics/gaussian_pulse_perfectly_matched_layers
Modeling Instructions
From the File menu, choose New.
New
In the New window, click  Model Wizard.
Model Wizard
1
In the Model Wizard window, click  2D.
2
In the Select Physics tree, select Acoustics>Pressure Acoustics>Pressure Acoustics, Transient (actd).
3
Click Add.
4
Click  Study.
5
In the Select Study tree, select General Studies>Time Dependent.
6
Geometry 1
Before setting up the physics, change the unit system to be dimensionless.
Root
1
In the Model Builder window, click the root node.
2
In the root node’s Settings window, locate the Unit System section.
3
From the Unit system list, choose None.
Load the parameters that define the geometry and the Gaussian pulse properties.
Global Definitions
Parameters 1
1
In the Model Builder window, under Global Definitions click Parameters 1.
2
In the Settings window for Parameters, locate the Parameters section.
3
Click  Load from File.
4
Browse to the model’s Application Libraries folder and double-click the file gaussian_pulse_perfectly_matched_layers_parameters.txt.
Definitions
Variables 1
1
In the Model Builder window, under Component 1 (comp1) right-click Definitions and choose Variables.
Next, load the variables that define the initial Gaussian shape. These variables will be used as initial conditions for the acoustic pressure and its first time derivative.
2
In the Settings window for Variables, locate the Variables section.
3
Click  Load from File.
4
Browse to the model’s Application Libraries folder and double-click the file gaussian_pulse_perfectly_matched_layers_variables.txt.
The geometry contains a physical domain surrounded by perfectly matched layers (PML), see Figure 1. The latter are used to truncate the physical domain without introducing spurious numerical reflections from the outer boundary.
Geometry 1
Square 1 (sq1)
1
In the Geometry toolbar, click  Square.
2
In the Settings window for Square, locate the Position section.
3
From the Base list, choose Center.
4
Locate the Size section. In the Side length text field, type W.
5
Click to expand the Layers section. Select the Layers to the left check box.
6
Select the Layers to the right check box.
7
Select the Layers on top check box.
Specify the width of the PMLs.
8
9
In the Geometry toolbar, click  Build All.
Definitions
Set up a PML surrounding the physical domain.
Perfectly Matched Layer 1 (pml1)
1
In the Definitions toolbar, click  Perfectly Matched Layer.
2
Use cubic polynomial coordinate stretching in the PML domain.
3
In the Settings window for Perfectly Matched Layer, locate the Scaling section.
4
In the PML scaling curvature parameter text field, type 3.
Modify the Typical Wave Speed for Perfectly Matched Layers and Transient Solver Settings according to the problem formulation.
Pressure Acoustics, Transient (actd)
1
In the Model Builder window, under Component 1 (comp1) click Pressure Acoustics, Transient (actd).
2
In the Settings window for Pressure Acoustics, Transient, locate the Typical Wave Speed for Perfectly Matched Layers section.
3
In the cref text field, type c0.
4
Locate the Transient Solver and Mesh Settings section. In the fmax,sol text field, type 0.3.
The frequency content of sources is often known or can be analyzed with an FFT. In this model, the FFT of the source signal is depicted in Figure 6 created when analyzing the results. A maximal frequency of 0.3 (dimensionless) will capture the full signal information.
Transient Pressure Acoustics Model 1
1
In the Model Builder window, under Component 1 (comp1)>Pressure Acoustics, Transient (actd) click Transient Pressure Acoustics Model 1.
2
In the Settings window for Transient Pressure Acoustics Model, locate the Transient Pressure Acoustics Model section.
3
From the c list, choose User defined. In the associated text field, type c0.
4
From the ρ list, choose User defined. In the associated text field, type rho0.
Specify the initial values for the pressure and its first time derivative.
Initial Values 1
1
In the Model Builder window, click Initial Values 1.
2
In the Settings window for Initial Values, locate the Initial Values section.
3
In the p text field, type p_i.
4
In the dp/dt text field, type dp_i.
Note that it is not required to impose any special boundary conditions on the outer boundary.
Mesh 1
Free Triangular 1
1
In the Mesh toolbar, click  Free Triangular.
2
In the Settings window for Free Triangular, locate the Domain Selection section.
3
From the Geometric entity level list, choose Domain.
4
Size 1
1
Right-click Free Triangular 1 and choose Size.
2
In the Settings window for Size, locate the Element Size section.
3
Click the Custom button.
4
Locate the Element Size Parameters section. Select the Maximum element size check box.
5
Create a mapped mesh in the PML domains.
Mapped 1
1
In the Mesh toolbar, click  Mapped.
Choose the same mesh element size as in the physical domain. The generated mesh will contain 6 mesh layers.
Size 1
1
Right-click Mapped 1 and choose Size.
2
In the Settings window for Size, locate the Element Size section.
3
Click the Custom button.
4
Locate the Element Size Parameters section. Select the Maximum element size check box.
5
Study 1
Step 1: Time Dependent
Solve the model from time t = 0 to 120 in steps of 1 (dimensionless time units).
1
In the Model Builder window, under Study 1 click Step 1: Time Dependent.
2
In the Settings window for Time Dependent, locate the Study Settings section.
3
In the Output times text field, type range(0,1,120).
4
In the Home toolbar, click  Compute.
Results
Acoustic Pressure (actd)
The first default plot shows the acoustic pressure in the computational domain. You can see the pressure distribution at various times in Figure 2 and Figure 3.
1
In the Settings window for 2D Plot Group, locate the Data section.
2
From the Time (s) list, choose 0.
3
In the Acoustic Pressure (actd) toolbar, click  Plot.
Create a Cut Point 2D dataset to plot the pressure as a function of time.
Cut Point 2D 1
1
In the Results toolbar, click  Cut Point 2D.
2
In the Settings window for Cut Point 2D, locate the Point Data section.
3
In the X text field, type 20.
4
In the Y text field, type 10.
The plot in Figure 4 shows the comparison of the pressure and the analytical solution at the cut point.
Pressure at Point
1
In the Results toolbar, click  1D Plot Group.
2
In the Settings window for 1D Plot Group, type Pressure at Point in the Label text field.
3
Locate the Data section. From the Dataset list, choose Cut Point 2D 1.
Point Graph 1
1
Right-click Pressure at Point and choose Point Graph.
2
In the Settings window for Point Graph, locate the y-Axis Data section.
3
In the Expression text field, type p.
4
Click to expand the Legends section. Select the Show legends check box.
5
From the Legends list, choose Manual.
6
Point Graph 2
1
In the Model Builder window, right-click Pressure at Point and choose Point Graph.
2
In the Settings window for Point Graph, locate the y-Axis Data section.
3
In the Expression text field, type p_a.
4
Locate the Legends section. Select the Show legends check box.
5
From the Legends list, choose Manual.
6
7
Click to expand the Coloring and Style section. Find the Line style subsection. From the Line list, choose None.
8
Find the Line markers subsection. From the Marker list, choose Point.
9
In the Number text field, type 100.
10
In the Pressure at Point toolbar, click  Plot.
Create Cut Line 2D datasets to plot the pressure along the line at a given time.
Cut Line 2D 1
1
In the Results toolbar, click  Cut Line 2D.
2
In the Settings window for Cut Line 2D, locate the Line Data section.
3
In row Point 1, set X to -W/2.
4
In row Point 2, set X to W/2.
Cut Line 2D 2
1
In the Results toolbar, click  Cut Line 2D.
2
In the Settings window for Cut Line 2D, locate the Line Data section.
3
In row Point 1, set X to -W/2+dW.
4
In row Point 2, set X to W/2-dW.
The comparison of the pressure and the analytical solution along the x-axis for a given time is depicted in Figure 5.
Pressure along Cut Line
1
In the Results toolbar, click  1D Plot Group.
2
In the Settings window for 1D Plot Group, type Pressure along Cut Line in the Label text field.
3
Locate the Data section. From the Dataset list, choose None.
Line Graph 1
1
Right-click Pressure along Cut Line and choose Line Graph.
2
In the Settings window for Line Graph, locate the Data section.
3
From the Dataset list, choose Cut Line 2D 1.
4
From the Time selection list, choose From list.
5
In the Times (s) list, select 40.
6
Locate the y-Axis Data section. In the Expression text field, type p.
7
Locate the x-Axis Data section. From the Parameter list, choose Expression.
8
In the Expression text field, type x.
9
Click to expand the Legends section. Select the Show legends check box.
10
From the Legends list, choose Manual.
11
Line Graph 2
1
In the Model Builder window, right-click Pressure along Cut Line and choose Line Graph.
2
In the Settings window for Line Graph, locate the Data section.
3
From the Dataset list, choose Cut Line 2D 2.
4
From the Time selection list, choose From list.
5
In the Times (s) list, select 40.
6
Locate the y-Axis Data section. In the Expression text field, type p_a.
7
Locate the x-Axis Data section. From the Parameter list, choose Expression.
8
In the Expression text field, type x.
9
Locate the Legends section. Select the Show legends check box.
10
From the Legends list, choose Manual.
11
12
Click to expand the Coloring and Style section. Find the Line style subsection. From the Line list, choose None.
13
Find the Line markers subsection. From the Marker list, choose Point.
14
In the Number text field, type 100.
15
In the Pressure along Cut Line toolbar, click  Plot.
Figure 6 shows the frequncy spectrum of the pressure wave at the cut point.
Pressure at Point, FFT
1
In the Home toolbar, click  Add Plot Group and choose 1D Plot Group.
2
In the Settings window for 1D Plot Group, type Pressure at Point, FFT in the Label text field.
3
Locate the Data section. From the Dataset list, choose Cut Point 2D 1.
Point Graph 1
1
Right-click Pressure at Point, FFT and choose Point Graph.
2
In the Settings window for Point Graph, locate the x-Axis Data section.
3
From the Parameter list, choose Discrete Fourier transform.
4
From the Show list, choose Frequency spectrum.
5
In the Pressure at Point, FFT toolbar, click  Plot.