Acoustic¶
Governing equation¶
Acoustic solves the two-dimensional constant-density acoustic wave equation
where \(p\) is the pressure-like wavefield h1 (the source and receiver field)
and \(v_p\) is the model vp. Time is discretised with the second-order central
difference and the second derivatives with central differences of order
spatial_order (default 4):
After each update the wavelet sample \(s^n\) is added to \(p^{n+1}\) at the source cell. It is not multiplied by \(v_p^2 \Delta t^2\), so the recorded amplitude depends on \(\Delta t\) and the grid spacing.
Boundary conditions¶
The default pml_type="cpmlr" replaces each term \(\partial_{xx} p\) of the
Laplacian inside the absorbing layers by the stretched form
\(\partial_{\tilde{x}} ( \partial_{\tilde{x}} p )\), carried by the memory
fields psix, zetax (\(x\)) and psiz, zetaz (\(z\)); the profiles and the
recursion are given under
Absorbing boundaries. With
free_surface=True the selected faces are pressure-release, \(p = 0\).
sweep.equations.Acoustic ¶
Bases: sweep.equations.base.SecondOrderEquation
Second-order 2-D acoustic wave equation with CPML auxiliary fields.
The default scalar-wave solver: a pressure-like field h1 is driven by
vp**2 · Laplace(u) and absorbed at every side by a split-step CPML
formulation (cpmlr by default). This is the most common forward and
inversion equation in the codebase.
Models (constructor input order)
vp(m/s): Acoustic P-wave velocity model.
Wavefields
h1(aliases:pressure,p): Primary acoustic pressure-like wavefield; default source and receiver.h2(aliases:pressure_prev): Previous-step pressure-like wavefield (internal).psix: CPML memory variable for the x-derivative term (internal).psiz: CPML memory variable for the z-derivative term (internal).zetax: CPML auxiliary wavefield for the x-direction update (internal).zetaz: CPML auxiliary wavefield for the z-direction update (internal).
Defaults
source_type:['h1']receiver_type:['h1']pml_type:'cpmlr'
Build the acoustic equation operator.
Parameters:
-
spatial_order–FD accuracy order of the spatial Laplacian — e.g.
spatial_order=4is fourth-order accurate. Internally the half-stencil width isM = spatial_order // 2(used for loop bounds and PML padding). Must be an even integer (typical values2, 4, 6, 8, 10, …). Higher orders cut grid dispersion at the cost of more compute per step and a wider PML halo. Performance note (impl='c'on CUDA): the compiled kernels ship template specialisations only forspatial_order ∈ {2, 4, 6, 8}. Above 8 the dispatcher drops to a generic runtime path (order = -1insrc/sweep/csrc/cuda/equations/acoustic2d/forward.cu) which uses more registers and runs noticeably slower. The PyTorch eager path is unaffected. Defaults to 4. -
device–Device for the operator's static kernels (Laplace / gradient coefficients). Use
'cuda'/ atorch.devicewhen running on GPU so the propagator can follow without a host↔device copy. Defaults to'cpu'. -
backend–Array / programming backend,
'torch'or'jax'. When you later wantimpl='c', leave this on'torch'— the compiled CUDA kernels are dispatched through the Torch binding. Defaults to'torch'. -
dim–Stored dimensionality. Always
2for this class; use :class:Acoustic3Dfor 3-D. Defaults to 2.
C_NAME
class-attribute
¶
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'.
air_cells_are_vacuum
class-attribute
¶
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_batched_models
class-attribute
¶
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_image_topography
class-attribute
¶
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_image_topography_c
class-attribute
¶
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
¶
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
¶
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
¶
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.