A collocated (cell-centered) finite-difference time-domain (FDTD) solver for shear wave propagation in viscoelastic media with Kelvin-Voigt damping.
pip install -e .For JAX GPU acceleration:
pip install -e ".[jax-gpu]"import numpy as np
from shearwave import shear_fdtd
# Define body force, material properties, grid spacing, time step
u, v = shear_fdtd(bx, by, bz, rho, mu, dX, dY, dZ, dT, nT, opts={})- 3D collocated (cell-centered) FDTD with central-difference time stepping
- Kelvin-Voigt viscoelastic damping
- Helmholtz-Hodge decomposition for divergence-free force projection
- Conjugate-gradient Poisson solver
- NumPy (CPU) and JAX (GPU/TPU) backends
- Acoustic radiation force computation (plane-wave and Poynting vector)
- Strain tensor and invariant computation
- Acoustic strain and strain gradient analysis
Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE for details.