This repository contains the Julia code to solve the elastic wave equation with Perfectly Matched Layers (PML) in layered media. The code can be used to generate the results presented in the accompanying manuscript found on Arxiv: https://arxiv.org/abs/2210.00229. This code is in v1.0 and will be constantly updated to make it more organised and performant. To use the package, download the latest release and run
julia> ]
pkg> activate /path/to/this/project
julia> using SummationByPartsPML
The only method currently available in this repository is the fourth-order Summation By Parts Finite Difference technique [1]
. To check, run this test snippet:
sbp_1d = SBP4_1D(20)
φ(x) = x^2
Dₓ = sbp_1d.D1; Dₓₓ = sbp_1d.D2[1];
using Test
x = LinRange(0,1,20)
@test Dₓ*φ.(x) ≈ 2x.^1
@test Dₓₓ*φ.(x) ≈ 2x.^0
An example to solve a 1D Hyperbolic problem is given in the test/
folder: To run the package testing routine, in the julia terminal, type
julia> ]
(SummationByPartsPML) pkg> test SummationByPartsPML
Four examples are considered in the paper.
- Two-layer problem: We consider a two-layer example with discontinuous material properties across an interface. We consider two cases: i) a planar interface and ii) a Gaussian hill interface separating the two layers. We also study the convergence of the PML by comparing with a reference elastic-wave solution computed on a large domain.
- Four-layer problem: This is an extension of the two-layer example, with four layers separated by planar interface.
- Marmousi model: We apply the PML method to the Marmousi model, a real-life elastic wave model.
For the time stepping, we rewrite the wave equation into a system of first-order PDE and use the fourth-order Runge Kutta scheme to discretize the temporal direction.
To run the codes, stay in the root directory of the package, and run
julia> include("./examples/2_layer_PML_elastic_wave.jl"); # To run the 2-layer example
To change the domain, change the parametric function describing the boundaries of the domain. The argument of the function must x
where x
is a f(x) = sin(x[1])*sin(x[2])
. The PML width is controlled by δ
and σ₀ᵛ, σ₀ʰ
, the strength of the PML along the vertical and horizontal directions. More details of the code will be posted later.
To run the other examples, type
julia> include("./examples/4_layer_PML_elastic_wave.jl"); # To run the 4-layer example
julia> include("./examples/2_layer_PML_vs_ABC.jl"); # To run the convergence tests
julia> include("./examples/Marmousi2/solver_marmousi2.jl"); # To run the Marmousi2 example
NOTE: The examples usually take a while to run.
In this example, we consider the two-layer example with a planar interface. We denote the two layers by
We impose the characteristic boundary conditions at the left bounadry
Solution at |
Solution at |
Solution at |
---|---|---|
Curvilinear domains are implemented using the transfinite interpolation technique. The boundaries of the domain are parametrized as a mapping from the reference domain
Solution at |
Solution at |
Solution at |
---|---|---|
To check the efficacy of the PML, we compare the solution obtained by truncating the domain using the PML and the Characteristic/Absorbing Boundary Condition (ABC).
We then compare the PML/ABC with the standard elastic-wave reference solution computed on a large domain. This is done by restricting the reference solution within the truncated region corresponding to the PML/ABC and then computing the pointwise maximum norm between the PML/ABC solution (geometry shown in the following Figure). We observe that the error corresponding to the PML solution is less than the ABC solution. This is expected since PML damps out most incoming waves compared to ABC, which damps only those incident waves orthogonal to the boundary. This shows that we indeed get better results by using PML to truncate the domain. We observed upto two-orders of magnitude difference in the errors between PML and ABC solution. We also show an example with the orthotropic/curvilinear media in the manuscript.
We also test a layered media problem with more than two layers. In this study, we choose to simulate a problem with four layers, each with distinct material properties. The following table details the material properties on all four layers.
Layer | Domain | |||
---|---|---|---|---|
1 | 1.5 | 1.8 | 3.118 | |
2 | 1.9 | 2.3 | 3.984 | |
3 | 2.1 | 2.7 | 4.667 | |
4 | 3 | 3 | 5.196 |
We consider an example where the problem is driven by an explosive moment tensor point source
where
Solution at |
Solution at |
---|---|
We consider the application of the PML to a heterogeneous and discontinuous elastic solid. We use Marmousi2, a large geological dataset based upon the geology from the North Quenguela Trough in the Quanza Basin of Angola. The Marmousi2 [2]
is a fully elastic model which contains the density of the material and the p−and s−wave speeds. The material is highly heterogeneous containing various structural elements including water, water-wet sand channels, oil-gas mixtures, salt and shale. The full computational model is defined on a rectangular domain
We convert the full-domain into a two-layers separated by an interface at a naturally occuring non-conformity (as seen from the white lines in the Figure below). We setup the problem with a traction-free boundary condition at the topmost layer, and we use PMLs with characteristic BC at the left and right boundaries. On the bottom boundary, we use an absorbing boundary condition. We simulate the problem with the same external source as in the 4-layer case, but at three different points in the domain. Following figures show the evolution of the solution at
[1] Mattsson, Ken, and Jan Nordström. "Summation by parts operators for finite difference approximations of second derivatives." Journal of Computational Physics 199.2 (2004): 503-540.
[2] Martin, Gary S., Robert Wiley, and Kurt J. Marfurt. "Marmousi2: An elastic upgrade for Marmousi." The leading edge 25.2 (2006): 156-166.