SourceTimeFunction

Ground motion responses (seismic traces) in ShakerMaker are computed by convolving the medium’s Green’s function evaluated at the receiver point with the source time function. This convolution is done numerically using scipy.signal.convolve(). Therefore, it is most convenient to specify source time functions as slip rate functions, with the resultant traces corresponding to the ground velocity history at the point of interest.

Note

T.L.D.R. These are all slip-rate functions. Treat them as such.

Dirac

class shakermaker.stf_extensions.dirac.Dirac[source]

Bases: shakermaker.sourcetimefunction.SourceTimeFunction

The Dirac delta

Generate Green’s functions using a Diract delta source-time-function.

Brune

class shakermaker.stf_extensions.brune.Brune(slip=1.0, f0=0.0, t0=0.0, dsigma=0.0, M0=1.0, Vs=0.0, smoothed=False)[source]

Bases: shakermaker.sourcetimefunction.SourceTimeFunction

The Brune Source Time Function

_images/stf_brune.png

Implements the classic STF as a slip rate function

\[f_s(t) = \Delta\cdot\omega_w0^2 \cdot \left(t - t_0\right)\cdot\exp\left\lbrace-w_0(t - t_0)\right\rbrace \quad \mathrm{for}\, t \geq t_0\]

Where \(\Delta\) is the total slip across the fault, \(w_0 = 2 \pi f_0\) and \(f_0\) is the corner-frequency defined by:

\[f_0 = 4.9 \times 10^6 V_s \left(\dfrac{\Delta\sigma}{M_0}\right)^{1/3}\]

\(V_s\) is the local shear-wave speed in km/s, \(M_0\) is the seismic-moment in dyne-cm, and \(\Delta\sigma\) is the stress-drop in bars.

The source is defined by the slip (slip) and the fault trigger time (t0) and either of: (i) the corner frequency directly f0 or (ii) the stress drop dsigma, seismic moment m0 and local shear-wave speed Vs.

Note

The t0 parameter displaces the STF in its own time vector, it is more convenient to use the point source’s trigger time``tt`` to specify the rupture process.

Parameters:
  • slip (double) – Total slip across the fault.
  • f0 (double) – Corner frequency.
  • t0 (double) – Trigger time.
  • dsigma (double) – Stress-drop.
  • M0 (double) – Seismic moment.
  • Vs (double) – Local shear-wave speed.
  • smoothed (bool) – Use a smoothed version of the source function.

Discrete

class shakermaker.stf_extensions.discrete.Discrete(data, t)[source]

Bases: shakermaker.sourcetimefunction.SourceTimeFunction

Specify the STF using discrete values at your discretion.

Parameters:
  • data (numpy vector shape (Nt,0)) – STF values
  • t (numpy vector shape (Nt,0)) – STF time-values. Must start and end at 0, can be un-evenly spaced.

Note

If the supplied STF specification is un-evenly spaced it gets interpolated to the simulation time-step before numerical convolution.

Example:

t = np.array([0,0.01,0.02,0.1,0.2])
slip = np.array([0,0.2,1,0.4,0])
stf = Discrete(data,t)