Main Program
Set up and solve equations
Same old Solver
SH Wave equation

By simply putting another time derivative on the transient term, we can turn the transient diffusion equation into a solver for displacements due to body waves - in this case SH shear waves, which have no displacement component normal to interfaces that they hit.

The main program sets up the geometry of the solution domain, and boundary conditions and initial conditions.

  • The solution domain can be either 1-D or 2-D.
  • Boundary conditions are applied on half-volumes, such that nodes are on boundaries, as described in Patankar.

Second m-file sets up and solves equations in a time-stepping loop.

  • For illustration only, the code includes a parameter "fig_num" controlling the type of problem solved.
  • fig_num = 1.  Plane-wave source on upper boundary sends wave into homogeneous medium.
  • fig_num = 2.  Point (line) source on upper boundary, homogeneous medium
  • fig_num = 3.   Plane wave hits a sloping interface, with slower velocity below.
  • fig_num = 4.  Plane wave hits circular fluid inclusion, where shear velocity is 0.
  • visualization is still totally clunky - uses "pause" function - hit any key to continue

Solver solve.m (same old solver) solves the resulting system of linear equations at every time step.