Appearance
3. A perfectly matched layer
The Silver–Müller faces of the previous page let the pulse out to first order. A perfectly matched layer (PML) absorbs it inside a layer next to the face, with a damping that grows towards the boundary. This page adds one on the
The changes
Start from the Silver–Müller input of the previous page (pulse at Silver_Muller on the [PML] section:
ini
[PML]
PML_type = classic
width = 0.04 ; metres: about 10 cells of 0.0042 at each x face
x_minus_layer = .true.
x_plus_layer = .true.
y_minus_layer = .false.
y_plus_layer = .false.
z_minus_layer = .false.
z_plus_layer = .false.
gamma_max = 7.8E10 ; peak damping rate (1/s)
gamma_exponent = 2.0 ; quadratic profile
[time]
it_max = -1 ; run to time_max, not a step count
time_max = 6.6712814328639916E-10Each PML_type has its own parameters (classic takes gamma_max and gamma_exponent; the list and the profiles are on the PML page). The PML needs centred FD and an SSP Runge–Kutta scheme, which this input has.
Why time_max. The PML caps the time step at C_gamma = 0.1 by default). The log shows
text
[mpi-00000] C_gamma: +0.10000000000000001E+000
[mpi-00000]time step: 0.12820512820512821E-011time_max above is the time the 192 steps of the previous pages reached, and the run takes 521 steps.
The result
Total energy -energy_history.dat:
| step | 10 | 110 | 210 | 310 | 410 | 521 |
|---|---|---|---|---|---|---|
| 84628.44 | 84491.46 | 35867.34 | 46.86 | 0.256 |
At the same final time the PML leaves
One caveat. The PML profile is computed per rank, from the blocks the rank holds: a layer deeper than one block, whose blocks sit on different ranks, gives results that depend on the decomposition (#108). Here the layer (0.04) lies inside the outermost layer of blocks (0.05 wide), so every rank that holds part of it sees its whole width. Keep the layer within one block until #108 is fixed.
What you learned
- A PML is a
[PML]section: a type, a width, the faces, the type's parameters. - The PML caps the time step; compare runs at equal physical time, not equal step count.
- The energy history measures the absorption: here
against for the first-order condition.
Previous: 2. Reflecting and absorbing faces. Next: 4. The same on the GPU.