pyrocko.modelling.okada¶
Elastostatic solutions and boundary element modelling for rectangular dislocation sources.
Functions

BEM least squares inversion to get fault dislocations given stress field. 

Build coefficient matrix for given fault patches. 
Classes

Rectangular analytical source model. 

Base class for analytical source models. 

Okada source with additional 2D indexes for bookkeeping. 

Rectangular Okada source model. 
 class AnalyticalSource(**kwargs)[source]¶
Bases:
Location
Base class for analytical source models.
 ♦ name¶
str
, optional, default:''
 ♦ time¶
pyrocko.util.get_time_float (
pyrocko.guts.Timestamp
), optional, default:0.0
Source origin time
 ♦ vr¶
float
, optional, default:0.0
Rupture velocity [m/s]
 class AnalyticalRectangularSource(**kwargs)[source]¶
Bases:
AnalyticalSource
Rectangular analytical source model.
Coordinates on the source plane are with respect to the origin point given by (lat, lon, east_shift, north_shift, depth).
 ♦ strike¶
float
, default:0.0
Strike direction in [deg], measured clockwise from north.
 ♦ dip¶
float
, default:90.0
Dip angle in [deg], measured downward from horizontal.
 ♦ rake¶
float
, default:0.0
Rake angle in [deg], measured counterclockwise from righthorizontal in onplane view.
 ♦ al1¶
float
, default:0.0
Left edge source plane coordinate [m].
 ♦ al2¶
float
, default:0.0
Right edge source plane coordinate [m].
 ♦ aw1¶
float
, default:0.0
Lower edge source plane coordinate [m].
 ♦ aw2¶
float
, default:0.0
Upper edge source plane coordinate [m].
 ♦ slip¶
float
, optional, default:0.0
Slip on the rectangular source area [m].
 class OkadaSource(**kwargs)[source]¶
Bases:
AnalyticalRectangularSource
Rectangular Okada source model.
 ♦ opening¶
float
, optional, default:0.0
Opening of the plane in [m].
 ♦ poisson¶
float
, optional, default:0.25
Poisson ratio . The Poisson ratio . If set to
None
, calculated from the Lame’ parameters and using (e.g. Mueller 2007).
 ♦ lamb¶
float
, optionalFirst Lame parameter [Pa]. If set to
None
, it is computed from Poisson ratio and shear modulus . Important: We assume a perfect elastic solid with . Through this leads to .
 ♦ shearmod¶
float
, optional, default:32000000000.0
Shear modulus [Pa]. If set to
None
, it is computed from poisson ratio. Important: We assume a perfect elastic solid with . Through this leads to .
 property seismic_moment¶
Scalar Seismic moment .
Code copied from Kite. It disregards the opening (as for now). We assume .
Important
We assume a perfect elastic solid with .
Through this leads to .
 Returns:
Seismic moment release.
 Return type:
 property moment_magnitude¶
Moment magnitude from seismic moment.
We assume .
 Returns:
Moment magnitude.
 Return type:
 source_patch()[source]¶
Get source location and geometry array for okada_ext.okada input.
The values are defined according to Okada (1992).
 Returns:
Source data as input for okada_ext.okada. The order is northing [m], easting [m], depth [m], strike [deg], dip [deg], al1 [m], al2 [m], aw1 [m], aw2 [m].
 Return type:
ndarray
:(9, )
 source_disloc()[source]¶
Get source dislocation array for okada_ext.okada input.
The given slip is splitted into a strike and an updip part based on the source rake.
 Returns:
Source dislocation data as input for okada_ext.okada. The order is dislocation in strike [m], dislocation updip [m], opening [m].
 Return type:
ndarray
:(3, )
 discretize(nlength, nwidth, *args, **kwargs)[source]¶
Discretize fault into rectilinear grid of fault patches.
Fault orientation, slip and elastic parameters are passed to the subfaults unchanged.
 Parameters:
 Returns:
Discrete fault patches.
 Return type:
list of
OkadaPatch
 class OkadaPatch(parent=None, *args, **kwargs)[source]¶
Bases:
OkadaSource
Okada source with additional 2D indexes for bookkeeping.
 ♦ ix¶
int
Relative index of the patch in x
 ♦ iy¶
int
Relative index of the patch in y
 make_okada_coefficient_matrix(source_patches_list, pure_shear=False, rotate_sdn=True, nthreads=1, variant='normal')[source]¶
Build coefficient matrix for given fault patches.
The boundary element method (BEM) for a discretized fault and the determination of the slip distribution from stress drop is based on . Here the coefficient matrix is built, based on the displacements from Okada’s solution (Okada, 1992) and their partial derivatives.
 Parameters:
source_patches_list (list of
OkadaSource
.) – Source patches, to be used in BEM.pure_shear (bool) – If
True
, only shear forces are taken into account.rotate_sdn (bool) – If
True
, rotate to strike, dip, normal.nthreads (int) – Number of threads.
 Returns:
Coefficient matrix for all source combinations.
 Return type:
ndarray
:(len(source_patches_list) * 3, len(source_patches_list) * 3)
 invert_fault_dislocations_bem(stress_field, coef_mat=None, source_list=None, pure_shear=False, epsilon=None, nthreads=1, **kwargs)[source]¶
BEM least squares inversion to get fault dislocations given stress field.
Follows least squares inversion approach by Menke (1989) to calculate dislocations on a fault with several segments from a given stress field. The coefficient matrix connecting stresses and displacements of the fault patches can either be specified by the user (
coef_mat
) or it is calculated using the solution of Okada (1992) for a rectangular fault in a homogeneous half space (source_list
). Parameters:
stress_field (
ndarray
:(nsources, 3)
) – Stress change [Pa] for each source patch (asstress_field[isource, icomponent]
where isource indexes the source patch andicomponent
indexes component, ordered (strike, dip, tensile).coef_mat (
ndarray
:(len(source_list) * 3, len(source_list) * 3)
) – Coefficient matrix connecting source patch dislocations and the stress field.source_list (list of
OkadaSource
) – Source patches to be used for BEM.epsilon (float) – If given, values in
coef_mat
smaller thanepsilon
are set to zero.nthreads (int) – Number of threads allowed.
 Returns:
Inverted displacements as
displacements[isource, icomponent]
where isource indexes the source patch andicomponent
indexes component, ordered (strike, dip, tensile). Return type:
ndarray
:(nsources, 3)