CrustModel

class shakermaker.crustmodel.CrustModel(nlayers)[source]

Define a 1-D layered crust model.

Parameters:nlayers (int) – Number of layers that the new CrustModel will have.

Initialize the crust model with how many layer it has:

from shakermaker.crustmodel import CrustModel model = CrustModel(2)

See :mod:shakermaker.cm_library for some pre-defined models.

a
add_layer(d, vp, vs, rho, qp, qs)[source]

Add a new layer to the model.

This function must be called as many times as layers were specified when the CrustModel was defined. Layer are stacked from top (surface) to bottom.

Parameters:
  • d (double > 0) – Thickness of new layer. d=0 defines an infinite half-space layer. The last layer, and only that layer, must can be a half-space.
  • vp (double > 0) – Compression-wave speed (\(V_p\)) of new layer.
  • vs (double) – Shear-wave speed (\(V_s\)) of new layer.
  • rho (double > 0) – Mass density (\(\rho\)) of the new layer.
  • qp (double > 0) – Q-factor (\(Q_P\)) for compression-waves for the new layer.
  • qs (double > 0) – Q-factor (\(Q_S\)) for shear-waves for the new layer.

Example:

#This is a two-layer model
#
# --------------------------------------- surface (layer 1)    ---   
# vp  = 1.5 (km/s)     vs = 0.8 (km/s)                          |
# Qp  = 50  (    )     Qs = 100 (    )                         500m
# rho = 2.1 (gr/cm^3)  d  = 0.5 (km)                            |
# --------------------------------------- halfspace (layer 2)  ---
# vp  = 3.2 (km/s)     vs = 1.6 (km/s)                          |
# Qp  = 80  (    )     Qs = 200 (    )                          v
# rho = 2.8 (gr/cm^3)  d  = 0   (km)                            z+       
#
model = CrustModel(2)
model.add_layer(0.5, 1.5, 0.8, 2.1, 50., 100.)
model.add_layer(0  , 3.2, 1.6, 2.8, 80., 200.)

Note

Must use the units of km for length, km/s for speed, and gr/cm^3 for density.

b
d
get_layer(z, tol=0.01)[source]

Split the layer at depth z.

Parameters:
  • z (double) – Depth for which layer number is needed
  • tol (double) – Tolerance for detection
Returns:

Index of layer

Return type:

int

modify_layer(layer_idx, d=None, vp=None, vs=None, rho=None, gp=None, gs=None)[source]

Modify the properties of layer number k.

Parameters:
  • k (int) – Layer to modify.
  • d (double >= 0) – New thickness of layer-k. d=0 defines an infinite half-space layer.
  • vp (double >= 0) – New compression-wave speed (\(V_p\)) of layer-k.
  • vs (double >= 0) – New shear-wave speed (\(V_s\)) of layer-k.
  • rho (double >= 0) – New mass density (\(\rho\)) of the layer-k.
  • qp (double >= 0) – New Q-factor (\(Q_P\)) for compression-waves for the layer-k.
  • qs (double >= 0) – New Q-factor (\(Q_S\)) for shear-waves for the layer-k.

Positive values of parameters means change that parameter, zero values (default) leave that property unaltered.

Example:

#Change Vs for layer 2.
model.modify_layer(2, vs=2.5)

Note

Must use the units of km for length, km/s for speed, and gr/cm^3 for density.

nlayers
properties_at_depths(z, kind='previous')[source]

Return (interpolated) properties at depths specified by vector zz.

Internally uses scipy.interpolate.interp1d to do interpolation with kind='previous'.

Parameters:
  • zz (double or np.array of shape (N,)) – Positions at which to interpolate.
  • kind (string) – Kind of interpolation to use. See options in scipy.interpolate.interp1d.
qa
qb
rho
split_at_depth(z, tol=0.01)[source]

Split the layer at depth z.

Parameters:
  • z (double) – Depth at which to split.
  • tol (double) – Split tolerance. Will not split if there is a layer interface within z-tol < z < z + tol.

Predefined CrustModel Library

A small library of pre-defined crustal models collected over the years.

AbellThesis

shakermaker.cm_library.AbellThesis.AbellThesis(split=1)[source]

Crustal model in Jose Abell’s PhD thesis and paper

_images/crust_model_abellthesis.png

Note

Zero anelastic attenuation has been approximated using high values for the Q-factor.

Arguments: :param split: The layering can be subdivided if needed. :type split: int

Returns: :returns: shakermaker.CrustModel

References: + Abell, J. A. (2016). Earthquake-Soil-Structure Interaction Modeling of Nuclear Power Plants for Near-Field Events. University of California, Davis. + Abell, J. A., Orbović, N., McCallen, D. B., & Jeremic, B. (2018). Earthquake soil-structure interaction of nuclear power plants, differences in response to 3-D, 3 × 1-D, and 1-D excitations. Earthquake Engineering and Structural Dynamics, 47(6), 1478–1495. https://doi.org/10.1002/eqe.3026

SCEC LOH

shakermaker.cm_library.LOH.SCEC_LOH_1()[source]

This is an shakermaker Crustal Model for problem LOH.1 from the SCEC test suite.

This is a slow layer over a half-space with no attenuation.

Note

Zero anelastic attenuation has been approximated using high values for the Q-factor.

Reference: + Steven Day et al., Tests of 3D Elastodynamic Codes: Final report for lifelines project 1A01, Pacific Eartquake Engineering Center, 2001

shakermaker.cm_library.LOH.SCEC_LOH_3()[source]

This is an shakermaker Crustal Model for problem LOH.3 from the SCEC test suite.

This is a slow layer over a half-space with attenuation.

Reference: + Steven Day et al., Tests of 3D Elastodynamic Codes: Final report for lifelines project 1A01, Pacific Eartquake Engineering Center, 2001