modelling
¶
pyrocko.modelling.okada
¶
-
class
AnalyticalSource
(**kwargs)[source]¶ Undocumented.
-
♦
name
¶ str
, optional, default:''
-
♦
time
¶ builtins.float
(pyrocko.guts.Timestamp
), optional, default:0.0
source origin time
-
♦
vr
¶ float
, optional, default:0.0
Rupture velocity
-
clone
(pool=None)¶ Clone guts object tree.
Traverses guts object tree and recursively clones all guts attributes, falling back to
copy.deepcopy()
for non-guts objects. Objects deriving fromObject
are instantiated using their respective init function. Multiply referenced objects in the source tree are multiply referenced also in the destination tree.This function can be used to clone guts objects ignoring any contained run-time state, i.e. any of their attributes not defined as a guts property.
-
♦
-
class
AnalyticalRectangularSource
(**kwargs)[source]¶ Rectangular analytical source model
-
♦
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 counter-clockwise from right-horizontal in on-plane view
-
♦
al1
¶ float
, default:0.0
Distance “left” side to source point [m]
-
♦
al2
¶ float
, default:0.0
Distance “right” side to source point [m]
-
♦
aw1
¶ float
, default:0.0
Distance “lower” side to source point [m]
-
♦
aw2
¶ float
, default:0.0
Distance “upper” side to source point [m]
-
♦
slip
¶ float
, optional, default:0.0
Slip on the rectangular source area [m]
-
♦
-
class
OkadaSource
(**kwargs)[source]¶ Rectangular Okada source model
-
♦
opening
¶ float
, optional, default:0.0
Opening of the plane in [m]
-
♦
poisson
¶ float
, optional, default:0.25
Poisson’s ratio, typically 0.25
-
♦
shearmod
¶ float
, optional, default:32000000000.0
Shear modulus along the plane [Pa]
-
lamb
¶ Calculation of first Lame’s parameter
According to Mueller (2007), the first Lame parameter lambda can be determined from the formulation for the poisson ration : with the shear modulus
-
seismic_moment
¶ Scalar Seismic moment
Code copied from Kite Disregarding the opening (as for now) We assume a shear modulus of and
Important
We assume a perfect elastic solid with
Through this leads to
Returns: Seismic moment release Return type: float
-
moment_magnitude
¶ Moment magnitude from Seismic moment
We assume
Returns: Moment magnitude Return type: float
-
source_patch
()[source]¶ Build source information array for okada_ext.okada input
Returns: array of the source data as input for okada_ext.okada Return type: numpy.ndarray
,(1, 9)
-
source_disloc
()[source]¶ Build source dislocation for okada_ext.okada input
Returns: array of the source dislocation data as input for okada_ext.okada Return type: numpy.ndarray
,(1, 3)
-
discretize
(nlength, nwidth, *args, **kwargs)[source]¶ Discretize the given fault by
nlength * nwidth
fault patchesDiscretizing the fault into several sub faults.
nlength
is number of points in strike direction,nwidth
in down dip direction along the fault. Fault orientation, slip and elastic parameters are kept.Parameters: Returns: Discrete fault patches
Return type: list of
pyrocko.modelling.okada.OkadaSource
objects
-
♦
-
class
DislocationInverter
[source]¶ Toolbox for Boundary Element Method (BEM) and dislocation inversion based on okada_ext.okada
-
static
get_coef_mat
(source_patches_list, pure_shear=False, rotate_sdn=True, nthreads=1)[source]¶ Build coefficient matrix for given source_patches
The BEM for a fault and the determination of the slip distribution from the stress drop is based on the relation . Here the coefficient matrix is build and filled based on the okada_ext.okada displacements and partial displacement differentiations.
Parameters: - source_patches_list (list of
pyrocko.modelling.okada.OkadaSource
) – list of all OkadaSources, which shall be used for BEM - pure_shear (optional, bool) – Shall only shear forces be taken into account, or additionally include opening, default False.
- rotate_sdn (optional, bool) – Rotation towards strike, dip, normal, default True.
- nthreads (optional, int) – Number of threads, default 1
Returns: coefficient matrix for all sources
Return type: numpy.ndarray
,(len(source_patches_list) * 3, len(source_patches_list) * 3)
- source_patches_list (list of
-
static
get_coef_mat_single
(source_patches_list, pure_shear=False, rotate_sdn=True, nthreads=1)[source]¶ Build coefficient matrix for given source_patches
The BEM for a fault and the determination of the slip distribution from the stress drop is based on the relation . Here the coefficient matrix is build and filled based on the okada_ext.okada displacements and partial displacement differentiations.
Parameters: - source_patches_list (list of
pyrocko.modelling.okada.OkadaSource
) – list of all OkadaSources, which shall be used for BEM - pure_shear (optional, bool) – Flag, if also opening mode shall be taken into account (False) or the fault is described as pure shear (True).
- rotate_sdn (optional, bool) – Rotation towards strike, dip, normal, default True.
- nthreads (optional, int) – Number of threads, default 1
Returns: coefficient matrix for all sources
Return type: numpy.ndarray
,(len(source_patches_list) * 3, len(source_patches_list) * 3)
- source_patches_list (list of
-
static
get_coef_mat_slow
(source_patches_list, pure_shear=False, rotate_sdn=True, nthreads=1)[source]¶ Build coefficient matrix for given source_patches (Slow version)
The BEM for a fault and the determination of the slip distribution from the stress drop is based on the relation . Here the coefficient matrix is build and filled based on the okada_ext.okada displacements and partial displacement differentiations.
Parameters: - source_patches_list (list of
pyrocko.modelling.okada.OkadaSource
) – list of all OkadaSources, which shall be used for BEM - pure_shear (optional, bool) – Flag, if also opening mode shall be taken into account (False) or the fault is described as pure shear (True).
- rotate_sdn (optional, bool) – Rotation towards strike, dip, normal, default True.
- nthreads (optional, int) – Number of threads, default 1
Returns: coefficient matrix for all sources
Return type: numpy.ndarray
,(source_patches_list.shape[0] * 3, source_patches_list.shape[0] * 3(2))
- source_patches_list (list of
-
static
get_disloc_lsq
(stress_field, coef_mat=None, source_list=None, pure_shear=False, epsilon=None, nthreads=1, **kwargs)[source]¶ Least square inversion to get displacement from stress
Follows approach for Least-Square Inversion published in Menke (1989) to calculate displacements on a fault with several segments from a given stress field. If not done, the coefficient matrix is determined within the code.
Parameters: - stress_field (
numpy.ndarray
,(n_sources * 3, )
) – Array containing the stress change [Pa] for each source patch (order: [ src1 dstress_Strike, src1 dstress_Dip, src1 dstress_Tensile, src2 dstress_Strike, …]) - coef_mat (optional,
numpy.ndarray
,(source_patches_list.shape[0] * 3, source_patches.shape[] * 3(2)
) – Coefficient matrix to connect source patches displacement and the resulting stress field - source_list (optional, list of
pyrocko.modelling.okada.OkadaSource
) – list of all OkadaSources, which shall be used for BEM - epsilon (optional, float) – regularize small values from the coefficient matrix, default None.
- nthreads (optional, int) – number of threads for the least squares inversion, default 1
Returns: inverted displacements (u_strike, u_dip , u_tensile) for each source patch. order: [ [patch1 u_Strike, patch1 u_Dip, patch1 u_Tensile], [patch2 u_Strike, patch2 u_Dip, patch2 u_Tensile], …]
Return type: numpy.ndarray
,(n_sources, 3)
- stress_field (
-
static
pyrocko.modelling.cracksol
¶
-
class
GriffithCrack
(**kwargs)[source]¶ Analytical Griffith crack model
-
♦
width
¶ float
, default:1.0
Width equals to 2*a
-
♦
poisson
¶ float
, default:0.25
Poisson ratio
-
♦
shearmod
¶ float
, default:1000000000.0
Shear modulus [Pa]
-
♦
stressdrop
¶ numpy.ndarray
(pyrocko.guts_array.Array
), default:array([0., 0., 0.])
Stress drop array:[sigi3_r - sigi3_c, sigi2_r - sigi2_c, sigi1_r - sigi1_c][dstress_Strike, dstress_Dip, dstress_Tensile]
-
a
¶ Half width of the crack
-
youngsmod
¶ Shear (Youngs) modulus
-
disloc_infinite2d
(x_obs)[source]¶ Calculation of dislocation at crack surface along x2 axis
Follows equations by Pollard and Segall (1987) to calculate dislocations for an infinite 2D crack extended in x3 direction, opening in x1 direction and the crack extending in x2 direction.
Parameters: x_obs ( numpy.ndarray
,(N,)
) – Observation point coordinates along x2-axis. If or , output dislocations are zeroReturns: dislocations at each observation point in strike, dip and tensile direction. Return type: numpy.ndarray
,(N, 3)
-
disloc_circular
(x_obs)[source]¶ Calculation of dislocation at crack surface along x2 axis
Follows equations by Pollard and Segall (1987) to calculate displacements for a circulat crack extended in x2 and x3 direction and opening in x1 direction.
Parameters: x_obs ( numpy.ndarray
,(N,)
) – Observation point coordinates along axis through crack centre. If or , output dislocations are zeroReturns: dislocations at each observation point in strike, dip and tensile direction. Return type: numpy.ndarray
,(N, 3)
-
displ_infinite2d
(x1_obs, x2_obs)[source]¶ Calculation of displacement at crack surface along different axis
Follows equations by Pollard and Segall (1987) to calculate displacements for an infinite 2D crack extended in x3 direction, opening in x1 direction and the crack tip in x2 direction.
Parameters: - x1_obs (
numpy.ndarray
,(M,)
) – Observation point coordinates along x1-axis. If x1_obs = 0., displacment is calculated along x2-axis - x2_obs (
numpy.ndarray
,(N,)
) – Observation point coordinates along x2-axis. If x2_obs = 0., displacment is calculated along x1-axis
Returns: displacements at each observation point in strike, dip and tensile direction.
Return type: numpy.ndarray
,(M, 3)
or(N, 3)
- x1_obs (
-
♦