seisgo.simulation
The simulation module provides a 1-D finite-difference acoustic wave solver and
a layered velocity model builder for synthetic testing and method validation.
Function Summary
fd1d_dx4dt4 — 1-D FD Acoustic Solver
Solves the first-order acoustic wave equation on a 1-D spatial grid using:
Spatial accuracy: O(Δx⁴) — 4th-order staggered-grid finite differences
Temporal accuracy: O(Δt⁴) — Adams–Bashforth multi-step time integration
Note
Based on the scheme described in:
Bohlen, T., & Wittkamp, F. (2016). Three-dimensional viscoelastic time-domain finite-difference seismic modelling using the staggered Adams-Bashforth time integrator. Geophysical Journal International, 204(3), 1781–1788.
Parameter |
Default |
Description |
|---|---|---|
|
required |
1-D spatial grid vector (m or km, consistent with |
|
required |
Time step (s). Must satisfy CFL condition: |
|
required |
Total simulation duration (s). |
|
required |
1-D velocity model, same length as |
|
required |
1-D density model, same length as |
|
required |
Source grid index (integer). |
|
required |
Receiver grid index (integer). |
|
|
Source time function frequency parameter: central frequency (Hz) for Ricker; width σ (s) for Gaussian. |
|
|
Source onset time (s). Default: |
|
|
Source wavelet: |
|
|
Output time sub-sampling factor. |
Returns: (tout, seisout)
tout— time vector (s) starting from 0, accounting for source shiftseisout— pressure seismogram at the receiver
CFL check
The solver raises ValueError if the provided dt exceeds the CFL limit:
build_vmodel — Layered Velocity Model Builder
Constructs a fine-grid 1-D layered velocity model with linearly increasing velocity
between vmin and vmax across nlayer layers.
Parameter |
Default |
Description |
|---|---|---|
|
required |
Maximum model depth/length. |
|
required |
Fine-grid spacing. |
|
required |
Number of velocity layers. |
|
required |
Velocity range (surface to bottom). |
|
required |
Density range. |
|
|
Starting depth. |
|
|
Array of fractional velocity perturbations per layer, e.g. |
Returns: (z, v, rho) — depth grid, velocity, and density arrays.
from seisgo import simulation
import numpy as np
# 500-point model, 5 layers, with layer 2 perturbed -10%
layer_dv = np.zeros(5)
layer_dv[1] = -0.10
z, v, rho = simulation.build_vmodel(
zmax=500, dz=1.0, nlayer=5,
vmin=1500, vmax=3500,
rhomin=1800, rhomax=2500,
layer_dv=layer_dv,
)