Skip to content

Elastic

Governing equations

Elastic solves the two-dimensional isotropic elastic wave equation in velocity–stress form (Virieux, 1986):

\[ \begin{aligned} \rho \frac{\partial v_x}{\partial t} &= \frac{\partial \sigma_{xx}}{\partial x} + \frac{\partial \sigma_{xz}}{\partial z}, & \rho \frac{\partial v_z}{\partial t} &= \frac{\partial \sigma_{xz}}{\partial x} + \frac{\partial \sigma_{zz}}{\partial z}, \\ \frac{\partial \sigma_{xx}}{\partial t} &= (\lambda + 2\mu) \frac{\partial v_x}{\partial x} + \lambda \frac{\partial v_z}{\partial z}, & \frac{\partial \sigma_{zz}}{\partial t} &= \lambda \frac{\partial v_x}{\partial x} + (\lambda + 2\mu) \frac{\partial v_z}{\partial z}, \\ \frac{\partial \sigma_{xz}}{\partial t} &= \mu \left( \frac{\partial v_x}{\partial z} + \frac{\partial v_z}{\partial x} \right), \end{aligned} \]

where \(v_x\), \(v_z\) are the particle velocities vx, vz and \(\sigma_{xx}\), \(\sigma_{zz}\), \(\sigma_{xz}\) the stresses sxx, szz, sxz. The Lamé parameters are computed from the models vp, vs and rho as

\[ \lambda = \rho \left( v_p^2 - 2 v_s^2 \right), \qquad \mu = \rho\, v_s^2 . \]

The fields are stored on the standard staggered grid: \(\sigma_{xx}\) and \(\sigma_{zz}\) at the integer nodes \((x, z)\), \(v_x\) at \((x + h/2, z)\), \(v_z\) at \((x, z + h/2)\) and \(\sigma_{xz}\) at \((x + h/2, z + h/2)\). The first derivatives are staggered differences of order spatial_order (default 4). Time stepping is leapfrog: the velocities are advanced from the stresses at step \(n\), then the stresses from the new velocities. The model values are not averaged onto the staggered positions; \(v_x\), \(v_z\) and \(\sigma_{xz}\) use \(\rho\) and \(\mu\) of the cell with the same index. After each step the wavelet sample is added, unscaled, to every source field at the source cell; the default source fields sxx and szz form an explosive source. The default receiver fields are vx and vz; sxz can be a source but not a receiver field.

Boundary conditions

The default pml_type="cpmls" is the staggered-grid C-PML: each of the eight first derivatives in the equations above is replaced inside the layer by its stretched form with one memory variable (m_vxx, m_vxz, m_vzx, m_vzz, m_txxx, m_tzzz, m_txzx, m_txzz), using the profiles of the integer or the half-integer nodes as the derivative requires; see Absorbing boundaries.

With free_surface, the traction-free condition \(\sigma_{zz} = \sigma_{xz} = 0\) is imposed on the plane of the first model row (the \(\sigma_{zz}\) nodes) by the image method. Above the surface \(\sigma_{zz}\) and \(v_x\) are mirrored about that plane, and \(\sigma_{xz}\) and \(v_z\) about the plane half a cell above it (Kristek et al., 2002); \(\sigma_{zz}\), \(\sigma_{xz}\) and \(v_z\) are odd and \(v_x\) is even. After each step \(\sigma_{zz}\) is set to zero on the surface row. The surface value of \(\sigma_{xx}\) is updated with the modulus that follows from \(\sigma_{zz} = 0\),

\[ \frac{\partial \sigma_{xx}}{\partial t} = \frac{4\mu (\lambda + \mu)}{\lambda + 2\mu} \frac{\partial v_x}{\partial x} \]

(Robertsson, 1996). On a flat surface, the derivatives normal to the surface are second-order accurate in the \(M\) = spatial_order/2 rows next to it, the surface row included. Any subset of the four faces can be a free surface (for example free_surface=["top", "left"]). On an \(x\) face the roles of \(x\) and \(z\) are exchanged, and on a bottom or right face the surface row of \(\sigma_{xz}\) is also set to zero. With topography, the top surface follows a staircase of per-column surface rows. A PML that runs between two faces of the other axis with no PML, one of them free, is refused: the solid between them is a plate, whose backward-propagating Lamb modes the PML amplifies (Loh et al., 2009).

References

  • Kristek, J., P. Moczo, and R. J. Archuleta, 2002, Efficient methods to simulate planar free surface in the 3D 4th-order staggered-grid finite-difference schemes: Studia Geophysica et Geodaetica, 46(2), 355–381, doi:10.1023/a:1019866422821.
  • Loh, P.-R., A. F. Oskooi, M. Ibanescu, M. Skorobogatiy, and S. G. Johnson, 2009, Fundamental relation between phase and group velocity, and application to the failure of perfectly matched layers in backward-wave structures: Physical Review E, 79(6), 065601, doi:10.1103/PhysRevE.79.065601.
  • Robertsson, J. O. A., 1996, A numerical free-surface condition for elastic/viscoelastic finite-difference modeling in the presence of topography: Geophysics, 61(6), 1921–1934, doi:10.1190/1.1444107.
  • Virieux, J., 1986, P-SV wave propagation in heterogeneous media: Velocity-stress finite-difference method: Geophysics, 51(4), 889–901, doi:10.1190/1.1442147.

sweep.equations.Elastic

Elastic(spatial_order=4, device='cpu', backend='torch')

Bases: sweep.equations.base.FirstOrderEquation

First-order 2-D elastic wave equation on a staggered grid (Virieux 1986).

Velocity-stress formulation. The five physical fields (vx, vz, sxx, szz, sxz) are evolved together with ten CPML memory variables (one per first-derivative direction). Sources are typically an explosion (['sxx', 'szz'] — the default in the propagator) or a directional body force; receivers usually read particle velocities (['vx'] or ['vz']) or stresses.

Reference: J. Virieux, 1986, P-SV wave propagation in heterogeneous media: velocity-stress finite-difference method, Geophysics 51(4), 10.1190/1.1442147.

Models (constructor input order)

  • vp (m/s): Elastic P-wave velocity model.
  • vs (m/s): Elastic S-wave velocity model.
  • rho (kg/m^3): Density model.

Wavefields

  • vx (aliases: velocity_x): Particle velocity in the x direction; default receiver.
  • vz (aliases: velocity_z): Particle velocity in the z direction; default receiver.
  • sxx (aliases: stress_xx): Normal stress in the x direction; default source.
  • szz (aliases: stress_zz): Normal stress in the z direction; default source.
  • sxz (aliases: stress_xz, shear_xz): Shear stress component.
  • m_vxx: CPML memory variable for dvx/dx (internal).
  • m_vxz: CPML memory variable for dvx/dz (internal).
  • m_vzx: CPML memory variable for dvz/dx (internal).
  • m_vzz: CPML memory variable for dvz/dz (internal).
  • m_txxx: CPML memory variable for dsxx/dx (internal).
  • m_txxz: Reserved elastic auxiliary field (internal).
  • m_tzzx: Reserved elastic auxiliary field (internal).
  • m_tzzz: CPML memory variable for dszz/dz (internal).
  • m_txzx: CPML memory variable for dsxz/dx (internal).
  • m_txzz: CPML memory variable for dsxz/dz (internal).

Defaults

  • source_type: ['sxx', 'szz']
  • receiver_type: ['vx', 'vz']
  • pml_type: 'cpmls'

Build the elastic equation operator.

Parameters:

  • spatial_order –

    FD accuracy order of the staggered first-derivative operator — e.g. spatial_order=4 is fourth-order accurate. Internally the half-stencil width is M = spatial_order // 2 (used for loop bounds and PML padding). Must be an even integer (2, 4, 6, 8, 10, …). Higher orders reduce grid dispersion — most visibly on the slower S-wave, which is the first thing to alias at marginal ppw — at the cost of more compute per step and a wider PML halo. Performance note (impl='c' on CUDA): the compiled kernels are template-specialised only for spatial_order ∈ {2, 4, 6, 8}. Above 8 the dispatcher falls through to the generic order = -1 runtime path (see src/sweep/csrc/cuda/equations/elastic2d/kernels.cu) which is noticeably slower; the PyTorch eager path is unaffected. Defaults to 4.

  • device –

    Device for the operator's static gradient kernels. Use 'cuda' / a torch.device for GPU runs so the propagator can follow without a host↔device copy. Defaults to 'cpu'.

  • backend –

    Array / programming backend, 'torch' or 'jax'. When you later want impl='c', leave this on 'torch' — the compiled CUDA kernels go through the Torch binding. Defaults to 'torch'.

C_NAME class-attribute

C_NAME = 'elastic2d'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

free_plate_unstable class-attribute

free_plate_unstable = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

image_topography_hint class-attribute

image_topography_hint = "The elastic image-method staircase was removed; for an elastic surface with topography use ElasticCurvilinear (2-D) or PropSEM."

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supports_batched_models class-attribute

supports_batched_models = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

supports_bs_free_surface class-attribute

supports_bs_free_surface = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

supports_per_edge_free_surface class-attribute

supports_per_edge_free_surface = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

supports_per_edge_free_surface_c class-attribute

supports_per_edge_free_surface_c = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

takes_invariants class-attribute

takes_invariants = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

interior_substeps

interior_substeps()

The Virieux leapfrog as reversible sub-steps, REUSING the shared elastic_velocity_substep / elastic_stress_substep that :func:elastic_step_core (and thus func) is built from — no rewritten copy of the physics. Called with pml zeroed (boundary saving reconstructs only the lossless interior) but the free-surface BC KEPT, so the eager boundary-saving 'substep' driver inverts the step exactly by composing the list in reverse order at -dt.